From 2f9c472dd7a91bc2d6e7840a550edcd257ff8b57 Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Tue, 10 Sep 2024 12:27:50 +0200 Subject: [PATCH 01/20] dfu: fix Kconfig dependencies Fix link errors caused by missing Kconfig dependencies: 1. DFU_OVER_USB compiles common/dfu.c which calls g_dnl_clear_detach() which is implemented in drivers/usb/gadget/g_dnl.c which needs USB_GADGET_DOWNLOAD. Test case: $ printf "CONFIG_USB_GADGET_DOWNLOAD=n\nCONFIG_USB_FUNCTION_FASTBOOT=n" \ >>configs/am62px_evm_a53_defconfig $ make am62px_evm_a53_defconfig $ make CROSS_COMPILE=aarch64-linux-gnu- [...] common/dfu.c:34:(.text.run_usb_dnl_gadget+0x68): undefined reference to `g_dnl_clear_detach [...] 2. With the above fixed, the same build causes: common/spl/spl_dfu.c:29:(.text.spl_dfu_cmd+0xb0): undefined reference to `run_usb_dnl_gadget' This is because SPL_DFU compiles common/spl/spl_dfu.c which calls run_usb_dnl_gadget() which is implemented in common/dfu.c which needs DFU_OVER_USB. Therefore add these dependencies to Kconfig. Signed-off-by: Jerome Forissier Reviewed-by: Marek Vasut Reviewed-by: Mattijs Korpershoek Reviewed-by: Ilias Apalodimas Link: https://lore.kernel.org/r/20240910102751.3182982-1-jerome.forissier@linaro.org Signed-off-by: Mattijs Korpershoek --- drivers/dfu/Kconfig | 2 +- drivers/usb/gadget/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index 971204758aa..aadd7e8cf7f 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -7,7 +7,7 @@ config DFU config DFU_OVER_USB bool select HASH - depends on USB_GADGET + depends on USB_GADGET_DOWNLOAD config DFU_OVER_TFTP bool diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 4621a6fd5e6..2634154f94a 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -323,6 +323,7 @@ config SPL_DFU bool "Support DFU (Device Firmware Upgrade) in SPL" select SPL_HASH select SPL_DFU_NO_RESET + depends on DFU_OVER_USB depends on SPL_RAM_SUPPORT help This feature enables the DFU (Device Firmware Upgrade) in SPL with From 8e7a7ffec6711069e2c0032574d93f75cf0ab454 Mon Sep 17 00:00:00 2001 From: Roger Quadros Date: Wed, 18 Sep 2024 16:49:21 +0300 Subject: [PATCH 02/20] mux: mmio: Support "reg-mux" compatible With "reg-mux" compatible the driver no longer expects the parent device to be a syscon type. It uses it's own regmux. Signed-off-by: Roger Quadros --- drivers/mux/mmio.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mux/mmio.c b/drivers/mux/mmio.c index e1125458a62..e06f4462b5a 100644 --- a/drivers/mux/mmio.c +++ b/drivers/mux/mmio.c @@ -31,6 +31,7 @@ static const struct mux_control_ops mux_mmio_ops = { static const struct udevice_id mmio_mux_of_match[] = { { .compatible = "mmio-mux" }, + { .compatible = "reg-mux" }, { /* sentinel */ }, }; @@ -45,7 +46,11 @@ static int mmio_mux_probe(struct udevice *dev) int ret; int i; - regmap = syscon_node_to_regmap(dev_ofnode(dev->parent)); + if (ofnode_device_is_compatible(dev_ofnode(dev), "mmio-mux")) + regmap = syscon_node_to_regmap(dev_ofnode(dev->parent)); + else + regmap_init_mem(dev_ofnode(dev), ®map); + if (IS_ERR(regmap)) { ret = PTR_ERR(regmap); dev_err(dev, "failed to get regmap: %d\n", ret); From 28a4e4314902aa48de61a8abf3596df3544541e0 Mon Sep 17 00:00:00 2001 From: Roger Quadros Date: Wed, 18 Sep 2024 16:49:22 +0300 Subject: [PATCH 03/20] phy: cadence: sierra: Don't spam console use dev_dbg() instead of dev_info() for debug related prints. Get's rid of below print from console. "cdns,sierra serdes@5030000: sierra probed" Signed-off-by: Roger Quadros --- drivers/phy/cadence/phy-cadence-sierra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index f5e23f36c56..2c9d5a12127 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -1126,7 +1126,7 @@ static int cdns_sierra_phy_probe(struct udevice *dev) sp->autoconf = dev_read_bool(dev, "cdns,autoconf"); - dev_info(dev, "sierra probed\n"); + dev_dbg(dev, "sierra probed\n"); return 0; clk_disable: From 91a7927aa6679d1a3ea30ed9dfe17002d11bcac4 Mon Sep 17 00:00:00 2001 From: Udit Kumar Date: Tue, 17 Sep 2024 13:43:29 +0530 Subject: [PATCH 04/20] dts: beagleboneai64: Add boothph in chipid node beagleboneai64 boot was broken after OF_UPSTREAM support for J721E SOC. So add bootph in chipid node similar to other boards of this SOC. Fixes: 46bb1405b461 ("arm: dts: k3-j721e: Move to OF_UPSTREAM") Reported-by: Robert Nelson Signed-off-by: Udit Kumar --- arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi b/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi index 884f44239e1..27851b7d083 100644 --- a/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi +++ b/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi @@ -64,6 +64,10 @@ bootph-all; }; +&chipid { + bootph-all; +}; + &mcu_ringacc { reg = <0x0 0x2b800000 0x0 0x400000>, <0x0 0x2b000000 0x0 0x400000>, From 58da850c87240c397242ebd47341c69aa6278119 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 18 Sep 2024 23:37:28 +0200 Subject: [PATCH 05/20] efi_loader: fix some function descriptions * The function name must be provided in the description. * The function name must match the name used in the description. Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- lib/efi_loader/efi_console.c | 2 +- lib/efi_loader/efi_file.c | 2 +- lib/efi_loader/efi_rng.c | 2 +- lib/efi_loader/efi_unicode_collation.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index c944c10b216..b760e36d874 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -100,7 +100,7 @@ static int term_get_char(s32 *c) } /** - * Receive and parse a reply from the terminal. + * term_read_reply() - receive and parse a reply from the terminal * * @n: array of return values * @num: number of return values expected diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index 222001d6a3b..c92d8ccf004 100644 --- a/lib/efi_loader/efi_file.c +++ b/lib/efi_loader/efi_file.c @@ -295,7 +295,7 @@ out: } /** - * efi_file_open_() + * efi_file_open() - open file synchronously * * This function implements the Open service of the File Protocol. * See the UEFI spec for details. diff --git a/lib/efi_loader/efi_rng.c b/lib/efi_loader/efi_rng.c index 9bad7ed6931..4734f95eee1 100644 --- a/lib/efi_loader/efi_rng.c +++ b/lib/efi_loader/efi_rng.c @@ -91,7 +91,7 @@ back: } /** - * rng_getrng() - get random value + * getrng() - get random value * * This function implement the GetRng() service of the EFI random number * generator protocol. See the UEFI spec for details. diff --git a/lib/efi_loader/efi_unicode_collation.c b/lib/efi_loader/efi_unicode_collation.c index 627bb9123cf..d48700a352b 100644 --- a/lib/efi_loader/efi_unicode_collation.c +++ b/lib/efi_loader/efi_unicode_collation.c @@ -266,7 +266,7 @@ static void EFIAPI efi_fat_to_str(struct efi_unicode_collation_protocol *this, } /** - * efi_fat_to_str() - convert a utf-16 string to legal characters for a FAT + * efi_str_to_fat() - convert a utf-16 string to legal characters for a FAT * file name in an OEM code page * * @this: unicode collation protocol instance From 1a58da936588234780197bfc87b65a2f7b8a39a0 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 18 Sep 2024 23:43:42 +0200 Subject: [PATCH 06/20] cmd/efidebug: fix some function descriptions The function name must match the name used in the description. Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- cmd/efidebug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 1a191eb9994..e040fe75fa1 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -665,7 +665,7 @@ enum efi_lo_dp_part { }; /** - * create_lo_dp() - create a special device path for our Boot### option + * create_lo_dp_part() - create a special device path for our Boot### option * * @dev: device * @part: disk partition @@ -1127,7 +1127,7 @@ static void show_efi_boot_opt(u16 *varname16) } /** - * show_efi_boot_dump() - dump all UEFI load options + * do_efi_boot_dump() - dump all UEFI load options * * @cmdtp: Command table * @flag: Command flag From 016c39c3b24e390f4672e3a2a649230acab0afd3 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 18 Sep 2024 23:49:40 +0200 Subject: [PATCH 07/20] doc: include/getopt.h: remove comments confusing Sphinx The Sphinx documentation build process cannot handle the interspersed 'private:' and 'public:' comments. Remove them. Signed-off-by: Heinrich Schuchardt --- include/getopt.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/getopt.h b/include/getopt.h index 8645082da2a..0cf7ee84d6f 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -20,11 +20,9 @@ struct getopt_state { * parsed all of @argv, then @index will equal @argc. */ int index; - /* private: */ /** @arg_index: Index within the current argument */ int arg_index; union { - /* public: */ /** * @opt: Option being parsed when an error occurs. @opt is only * valid when getopt() returns ``?`` or ``:``. @@ -35,7 +33,6 @@ struct getopt_state { * is only valid when getopt() returns an option character. */ char *arg; - /* private: */ }; }; From 89d911e386cc439c68ab961e76937c377e7d7127 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 18 Sep 2024 23:51:34 +0200 Subject: [PATCH 08/20] efi_loader: correct efi_set_variable_int() description The name used in the function description must match the function. Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- include/efi_variable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/efi_variable.h b/include/efi_variable.h index 223bb9a4a5b..4065cf45eca 100644 --- a/include/efi_variable.h +++ b/include/efi_variable.h @@ -38,7 +38,7 @@ efi_status_t efi_get_variable_int(const u16 *variable_name, void *data, u64 *timep); /** - * efi_set_variable() - set value of a UEFI variable + * efi_set_variable_int() - set value of a UEFI variable * * @variable_name: name of the variable * @vendor: vendor GUID From 55ff5ffdd4aa4e27464f7dc5758ade4b31219bc9 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 18 Sep 2024 23:54:08 +0200 Subject: [PATCH 09/20] sandbox: fix OS function descriptions * Add missing function names. * Align names used in descriptions with function names. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/os.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/os.h b/include/os.h index 877404a6c13..4f73f0b60f1 100644 --- a/include/os.h +++ b/include/os.h @@ -24,7 +24,7 @@ struct sandbox_state; int os_printf(const char *format, ...); /** - * Access to the OS read() system call + * os_read() - access the OS read() system call * * @fd: File descriptor as returned by os_open() * @buf: Buffer to place data @@ -34,7 +34,7 @@ int os_printf(const char *format, ...); ssize_t os_read(int fd, void *buf, size_t count); /** - * Access to the OS write() system call + * os_write() - access the OS write() system call * * @fd: File descriptor as returned by os_open() * @buf: Buffer containing data to write @@ -44,7 +44,7 @@ ssize_t os_read(int fd, void *buf, size_t count); ssize_t os_write(int fd, const void *buf, size_t count); /** - * Access to the OS lseek() system call + * os_lseek() - access the OS lseek() system call * * @fd: File descriptor as returned by os_open() * @offset: File offset (based on whence) @@ -67,7 +67,7 @@ off_t os_lseek(int fd, off_t offset, int whence); off_t os_filesize(int fd); /** - * Access to the OS open() system call + * os_open() - access the OS open() system call * * @pathname: Pathname of file to open * @flags: Flags, like OS_O_RDONLY, OS_O_RDWR @@ -162,7 +162,7 @@ void os_raise_sigalrm(void); void os_tty_raw(int fd, bool allow_sigs); /** - * os_fs_restore() - restore the tty to its original mode + * os_fd_restore() - restore the tty to its original mode * * Call this to restore the original terminal mode, after it has been changed * by os_tty_raw(). This is an internal function. @@ -207,14 +207,14 @@ void *os_realloc(void *ptr, size_t length); void os_usleep(unsigned long usec); /** - * Gets a monotonic increasing number of nano seconds from the OS + * os_get_nsec() - get monotonically increasing number of nano seconds from OS * - * Return: a monotonic increasing time scaled in nano seconds + * Return: a monotoniccally increasing time scaled in nano seconds */ uint64_t os_get_nsec(void); /** - * Parse arguments and update sandbox state. + * os_parse_args() - parse arguments and update sandbox state. * * @state: sandbox state to update * @argc: argument count From d168c637e4d4b70f9991f6e78520e3e987fa00f4 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 18 Sep 2024 23:58:03 +0200 Subject: [PATCH 10/20] boot: correct struct expo_action description Correct the description of the select.id member to fix a kernel-doc warning. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/expo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/expo.h b/include/expo.h index 264745f7f01..c235fa2709d 100644 --- a/include/expo.h +++ b/include/expo.h @@ -42,7 +42,7 @@ enum expoact_type { * * @type: Action type (EXPOACT_NONE if there is no action) * @select: Used for EXPOACT_POINT_ITEM and EXPOACT_SELECT - * @id: ID number of the object affected. + * @select.id: ID number of the object affected. */ struct expo_action { enum expoact_type type; From 73de2598735e0698592a33096a91cc1038b9fedd Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 19 Sep 2024 00:01:13 +0200 Subject: [PATCH 11/20] events: correct event_uninit() description The function name in the description must match the function. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/event.h b/include/event.h index fb353ad623e..75141a192a4 100644 --- a/include/event.h +++ b/include/event.h @@ -385,7 +385,7 @@ static inline int event_notify_null(enum event_t type) int event_uninit(void); /** - * event_uninit() - Set up dynamic events + * event_init() - Set up dynamic events * * Init a list of dynamic event handlers, so that these can be added as * needed From 7803a66399381570dae5cea030b01b26cd5ca676 Mon Sep 17 00:00:00 2001 From: Thomas Perrot Date: Fri, 20 Sep 2024 16:56:41 +0200 Subject: [PATCH 12/20] doc: usage: cmd: ums: fix dependencies Replace CONFIG_USB_USB_GADGET by CONFIG_USB_GADGET_DOWNLOAD. Signed-off-by: Thomas Perrot Reviewed-by: Heinrich Schuchardt --- doc/usage/cmd/ums.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/usage/cmd/ums.rst b/doc/usage/cmd/ums.rst index 9d379e3c829..e96222785f2 100644 --- a/doc/usage/cmd/ums.rst +++ b/doc/usage/cmd/ums.rst @@ -48,7 +48,7 @@ Configuration ------------- The ums command is only available if CONFIG_CMD_USB_MASS_STORAGE=y -and depends on CONFIG_USB_USB_GADGET and CONFIG_BLK. +which depends on CONFIG_USB_GADGET_DOWNLOAD and CONFIG_BLK. Return value ------------ From 541d21cf08ed318a6088d90a7db423b1e50e4038 Mon Sep 17 00:00:00 2001 From: Udit Kumar Date: Thu, 29 Aug 2024 14:04:53 +0530 Subject: [PATCH 13/20] ram: k3-ddrss: Handle error properly in lpddr4_start In lpddr4_start function error returned by lpddr4_enablepiinitiator may go undetected due to overwrite of return code. Add support to handle error in above case. Reported-by: Andreas Dannenberg Signed-off-by: Udit Kumar Reviewed-by: Bryan Brattlof --- drivers/ram/k3-ddrss/lpddr4.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/ram/k3-ddrss/lpddr4.c b/drivers/ram/k3-ddrss/lpddr4.c index 11ef242a37b..9f9abfeca48 100644 --- a/drivers/ram/k3-ddrss/lpddr4.c +++ b/drivers/ram/k3-ddrss/lpddr4.c @@ -155,10 +155,11 @@ u32 lpddr4_start(const lpddr4_privatedata *pd) u32 result = 0U; result = lpddr4_startsf(pd); - if (result == (u32)0) { + if (result == (u32)0) result = lpddr4_enablepiinitiator(pd); + if (result == (u32)0) result = lpddr4_startsequencecontroller(pd); - } + return result; } From 6b84683acc86f94c7dc15d621b5bca533bf8a01a Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 19 Jun 2024 00:57:25 +0200 Subject: [PATCH 14/20] ARM: stm32: Fix TAMP_SMCR BKP..PROT fields on STM32MP15xx Update the TAMP_SMCR BKP..PROT fields to put first 10 registers into protection zone 1 and next 5 into zone 2. This fixes use of boot counter which is often in zone 3 and has to be updated from Linux, which runs in NS. Fixes: 73f7fc944cf6 ("ARM: stm32: Initialize TAMP_SMCR BKP..PROT fields on STM32MP15xx") Signed-off-by: Marek Vasut Reviewed-by: Patrice Chotard --- arch/arm/mach-stm32mp/stm32mp1/stm32mp15x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-stm32mp/stm32mp1/stm32mp15x.c b/arch/arm/mach-stm32mp/stm32mp1/stm32mp15x.c index f096fe538d8..ca202bec8ee 100644 --- a/arch/arm/mach-stm32mp/stm32mp1/stm32mp15x.c +++ b/arch/arm/mach-stm32mp/stm32mp1/stm32mp15x.c @@ -148,8 +148,8 @@ static void security_init(void) */ clrsetbits_le32(TAMP_SMCR, TAMP_SMCR_BKPRWDPROT | TAMP_SMCR_BKPWDPROT, - FIELD_PREP(TAMP_SMCR_BKPRWDPROT, 0x20) | - FIELD_PREP(TAMP_SMCR_BKPWDPROT, 0x20)); + FIELD_PREP(TAMP_SMCR_BKPRWDPROT, 0x0A) | + FIELD_PREP(TAMP_SMCR_BKPWDPROT, 0x0F)); /* GPIOZ: deactivate the security */ writel(BIT(0), RCC_MP_AHB5ENSETR); From b0348a97de9e01fe2165520cfc1bc9ed5594f9ab Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 8 Jul 2024 13:43:23 +0200 Subject: [PATCH 15/20] ARM: stm32: Fix secure_waitbits() mask check Do not apply bitwise AND to register value and expected value, only apply bitwise AND to register value and mask, and only then compare the result with expected value that the function polls for. Fixes: b49105320a5b ("stm32mp: psci: Implement PSCI system suspend and DRAM SSR") Signed-off-by: Marek Vasut --- arch/arm/mach-stm32mp/stm32mp1/psci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-stm32mp/stm32mp1/psci.c b/arch/arm/mach-stm32mp/stm32mp1/psci.c index bfbf420fdb5..a02a8988a68 100644 --- a/arch/arm/mach-stm32mp/stm32mp1/psci.c +++ b/arch/arm/mach-stm32mp/stm32mp1/psci.c @@ -393,8 +393,7 @@ static int __secure secure_waitbits(u32 reg, u32 mask, u32 val) asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (start)); for (;;) { tmp = readl(reg); - tmp &= mask; - if ((tmp & val) == val) + if ((tmp & mask) == val) return 0; asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (end)); if ((end - start) > delay) From c0435ed04bd9fb264cb6284399556b11825e96e8 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 25 Sep 2024 00:08:23 +0200 Subject: [PATCH 16/20] arm: imx: Enable always-on regulators using board specific workaround on DHCOM SoM U-Boot is currently unable to automatically enable regulators which contain DT property regulator-always-on or regulator-boot-on. There is an ongoing work to add this functionality to regulator core code, but until the proper solution lands, add this awful workaround code to force these regulators on. This is specifically needed to assure the VIO regulator used to supply ethernet magnetics is enabled. Signed-off-by: Marek Vasut --- board/dhelectronics/dh_imx6/dh_imx6.c | 3 +++ board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c index c8dd30dfeaf..ada44e01424 100644 --- a/board/dhelectronics/dh_imx6/dh_imx6.c +++ b/board/dhelectronics/dh_imx6/dh_imx6.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -127,6 +128,8 @@ int board_init(void) setup_fec_clock(); + regulators_enable_boot_on(_DEBUG); + return 0; } diff --git a/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c b/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c index c635735d89c..a389ab3c2d9 100644 --- a/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c +++ b/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "lpddr4_timing.h" #include "../common/dh_common.h" @@ -111,6 +112,8 @@ int dh_setup_mac_address(void) int board_init(void) { + regulators_enable_boot_on(_DEBUG); + return 0; } From 596465138175cd7e4171cad1e68a2ef7c5c002bc Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Tue, 17 Sep 2024 20:59:17 +0000 Subject: [PATCH 17/20] regulator: rk8xx: Fix buck get and set enabled state on RK806 Wrong POWER_EN reg is used to get and set enabled state for the RK806 buck 4 and 8 regulators, also wrong POWER_SLP_EN0 bit is used for suspend state for the RK806 buck 1-8 regulators. Fix this by not adding one to the zero based buck variable. Fixes: f172575d92cd ("power: rk8xx: add support for RK806") Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang Reviewed-by: Quentin Schulz --- drivers/power/regulator/rk8xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c index 34e61511d88..b910943c2c4 100644 --- a/drivers/power/regulator/rk8xx.c +++ b/drivers/power/regulator/rk8xx.c @@ -415,7 +415,7 @@ static int _buck_set_enable(struct udevice *pmic, int buck, bool enable) break; case RK806_ID: value = RK806_POWER_EN_CLRSETBITS(buck % 4, enable); - en_reg = RK806_POWER_EN((buck + 1) / 4); + en_reg = RK806_POWER_EN(buck / 4); ret = pmic_reg_write(pmic, en_reg, value); break; case RK808_ID: @@ -494,7 +494,7 @@ static int _buck_get_enable(struct udevice *pmic, int buck) break; case RK806_ID: mask = BIT(buck % 4); - ret = pmic_reg_read(pmic, RK806_POWER_EN((buck + 1) / 4)); + ret = pmic_reg_read(pmic, RK806_POWER_EN(buck / 4)); break; case RK808_ID: case RK818_ID: @@ -544,7 +544,7 @@ static int _buck_set_suspend_enable(struct udevice *pmic, int buck, bool enable) mask = BIT(buck + 1 - 3); } else { reg = RK806_POWER_SLP_EN0; - mask = BIT(buck + 1); + mask = BIT(buck); } ret = pmic_clrsetbits(pmic, reg, mask, enable ? mask : 0); } @@ -595,7 +595,7 @@ static int _buck_get_suspend_enable(struct udevice *pmic, int buck) mask = BIT(buck + 1 - 3); } else { reg = RK806_POWER_SLP_EN0; - mask = BIT(buck + 1); + mask = BIT(buck); } val = pmic_reg_read(pmic, reg); } From 7210de40a25a222043aed1348ec667a5ccc204b6 Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Tue, 17 Sep 2024 20:59:18 +0000 Subject: [PATCH 18/20] regulator: rk8xx: Use buck variable consistently The buck variable is zero based, i.e. buck=0 match BUCK1 in datasheet. Remove any buck + 1 calculation to be more consistent in usage of the buck variable across the different RK8xx variants in the driver. Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- drivers/power/regulator/rk8xx.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c index b910943c2c4..375d06e3207 100644 --- a/drivers/power/regulator/rk8xx.c +++ b/drivers/power/regulator/rk8xx.c @@ -381,7 +381,7 @@ static int _buck_set_value(struct udevice *pmic, int buck, int uvolt) val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; debug("%s: volt=%d, buck=%d, reg=0x%x, mask=0x%x, val=0x%x\n", - __func__, uvolt, buck + 1, info->vsel_reg, mask, val); + __func__, uvolt, buck, info->vsel_reg, mask, val); if (priv->variant == RK816_ID) { pmic_clrsetbits(pmic, info->vsel_reg, mask, val); @@ -470,7 +470,7 @@ static int _buck_set_suspend_value(struct udevice *pmic, int buck, int uvolt) val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; debug("%s: volt=%d, buck=%d, reg=0x%x, mask=0x%x, val=0x%x\n", - __func__, uvolt, buck + 1, info->vsel_sleep_reg, mask, val); + __func__, uvolt, buck, info->vsel_sleep_reg, mask, val); return pmic_clrsetbits(pmic, info->vsel_sleep_reg, mask, val); } @@ -539,9 +539,10 @@ static int _buck_set_suspend_enable(struct udevice *pmic, int buck, bool enable) { u8 reg; - if (buck + 1 >= 9) { + if (buck >= 8) { + /* BUCK9 and BUCK10 */ reg = RK806_POWER_SLP_EN1; - mask = BIT(buck + 1 - 3); + mask = BIT(buck - 2); } else { reg = RK806_POWER_SLP_EN0; mask = BIT(buck); @@ -590,9 +591,10 @@ static int _buck_get_suspend_enable(struct udevice *pmic, int buck) { u8 reg; - if (buck + 1 >= 9) { + if (buck >= 8) { + /* BUCK9 and BUCK10 */ reg = RK806_POWER_SLP_EN1; - mask = BIT(buck + 1 - 3); + mask = BIT(buck - 2); } else { reg = RK806_POWER_SLP_EN0; mask = BIT(buck); From 17da9795c115dcfac49338ea044fa9413f5d0763 Mon Sep 17 00:00:00 2001 From: Siddharth Vadapalli Date: Mon, 30 Sep 2024 15:04:07 +0530 Subject: [PATCH 19/20] usb: gadget: cdns3: Fix missing cache operations for non-zero Endpoints Transfer initiation and completion for the non-zero Endpoints are handled by cdns3_ep_run_transfer() and cdns3_transfer_completed() respectively. Failing to flush the cache associated with the TRB Pool within cdns3_ep_run_transfer() results in the transfers never being initiated. Similarly, failing to invalidate the cache associated with the TRB pool within cdns3_transfer_completed() results in the transfers never being completed. Fix this. Fixes: 7e91f6ccdc84 ("usb: Add Cadence USB3 host and gadget driver") Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Reviewed-by: Marek Vasut --- drivers/usb/cdns3/gadget.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 32b2c412068..ac7e469469a 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -965,6 +965,12 @@ int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, if (priv_dev->dev_ver <= DEV_VER_V2) cdns3_wa1_tray_restore_cycle_bit(priv_dev, priv_ep); + /* Flush TRBs */ + flush_dcache_range((unsigned long)priv_ep->trb_pool, + (unsigned long)priv_ep->trb_pool + + ROUND(sizeof(struct cdns3_trb) * priv_ep->num_trbs, + CONFIG_SYS_CACHELINE_SIZE)); + trace_cdns3_prepare_trb(priv_ep, priv_req->trb); /* @@ -1153,6 +1159,13 @@ static void cdns3_transfer_completed(struct cdns3_device *priv_dev, priv_ep->endpoint.desc->bEndpointAddress); #endif + /* Invalidate TRBs */ + invalidate_dcache_range((unsigned long)priv_ep->trb_pool, + (unsigned long)priv_ep->trb_pool + + ROUND(sizeof(struct cdns3_trb) * + priv_ep->num_trbs, + CONFIG_SYS_CACHELINE_SIZE)); + if (!cdns3_request_handled(priv_ep, priv_req)) goto prepare_next_td; From 9cfe0cab3bf135a505e1e163ca442a4e4064d58e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 30 Sep 2024 16:47:28 -0600 Subject: [PATCH 20/20] Prepare v2024.10-rc6 Signed-off-by: Tom Rini --- Makefile | 2 +- doc/develop/release_cycle.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index bde038972e3..bd221795d46 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION = 2024 PATCHLEVEL = 10 SUBLEVEL = -EXTRAVERSION = -rc5 +EXTRAVERSION = -rc6 NAME = # *DOCUMENTATION* diff --git a/doc/develop/release_cycle.rst b/doc/develop/release_cycle.rst index de1d3045b44..3cb63a0f402 100644 --- a/doc/develop/release_cycle.rst +++ b/doc/develop/release_cycle.rst @@ -75,9 +75,9 @@ For the next scheduled release, release candidates were made on:: * U-Boot v2024.10-rc4 was released on Mon 02 September 2024. -.. * U-Boot v2024.10-rc5 was released on Mon 16 September 2024. +* U-Boot v2024.10-rc5 was released on Mon 16 September 2024. -.. * U-Boot v2024.10-rc6 was released on Mon 30 September 2024. +* U-Boot v2024.10-rc6 was released on Mon 30 September 2024. Please note that the following dates are planned only and may be deviated from as needed.