From 1b697407aede9d545f7229d2defa64c7ae1eb070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Wed, 28 Dec 2022 19:18:39 +0100 Subject: [PATCH 1/9] powerpc/mpc85xx: socrates: Re-enable building u-boot-socrates.bin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit U-Boot build system builds final U-Boot binary for socrates board in custom file u-boot-socrates.bin (instead of standard u-boot.bin). Output target file u-boot-socrates.bin is generated by binman as defined in board binman config file arch/powerpc/dts/socrates-u-boot.dtsi. But binman was disabled in commit 5af42eafd7e1 ("Makefile: Reduce usage of custom mpc85xx u-boot.bin target") for all mpc85xx boards which do not use standard powerpc binman config file arch/powerpc/dts/u-boot.dtsi and boards which do not require binman at all. The only such mpc85xx board is socrates. So since that commit, U-Boot does not final binary for socrates board anymore. Fix this issue by re-enabling binman for socrates board. And build process starts again producing u-boot-socrates.bin binary. Note that build process for this socrates board always produce u-boot.bin binary which is broken and not usable for socrates board. Long term solution should be to disable building broken binary u-boot.bin and then renaming u-boot-socrates.bin to u-boot.bin, or switching to use common powerpc binman config file arch/powerpc/dts/socrates-u-boot.dtsi (if it is possible). Fixes: 5af42eafd7e1 ("Makefile: Reduce usage of custom mpc85xx u-boot.bin target") Signed-off-by: Pali Rohár Tested-by: Heiko Schocher --- arch/powerpc/cpu/mpc85xx/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig index 9d12bf168d9..687c51a8c69 100644 --- a/arch/powerpc/cpu/mpc85xx/Kconfig +++ b/arch/powerpc/cpu/mpc85xx/Kconfig @@ -72,6 +72,7 @@ choice config TARGET_SOCRATES bool "Support socrates" select ARCH_MPC8544 + select BINMAN config TARGET_P3041DS bool "Support P3041DS" From f8548ce0e09385926574283b17af6c2cd4e32af2 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sat, 31 Dec 2022 13:25:14 -0300 Subject: [PATCH 2/9] imx7d-pico: Fix the name of the u-boot.dtsi file Since commit 2f96d4dd95f8 ("imx7s/d: synchronise device trees with linux") the imx7d-pico board no longer boots. The reason is that prior to the above commit there was an explicit inclusion of arch/arm/dts/imx7d-pico-u-boot.dtsi inside imx7d-pico.dtsi. After the syncing with the Linux upstream dtsi, this u-boot.dtsi inclusion is gone and the board fails to boot. U-Boot uses the imx7d-pico-pi.dtb file, so rename the u-boot.dtsi to imx7d-pico-pi-u-boot.dtsi which gets included automatically by U-Boot standard make logic and makes the board boot again. Signed-off-by: Fabio Estevam --- .../arm/dts/{imx7d-pico-u-boot.dtsi => imx7d-pico-pi-u-boot.dtsi} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename arch/arm/dts/{imx7d-pico-u-boot.dtsi => imx7d-pico-pi-u-boot.dtsi} (100%) diff --git a/arch/arm/dts/imx7d-pico-u-boot.dtsi b/arch/arm/dts/imx7d-pico-pi-u-boot.dtsi similarity index 100% rename from arch/arm/dts/imx7d-pico-u-boot.dtsi rename to arch/arm/dts/imx7d-pico-pi-u-boot.dtsi From 4671435c54ce79d3c671177cb47461d208186eae Mon Sep 17 00:00:00 2001 From: Dai Okamura Date: Fri, 9 Dec 2022 20:38:27 +0900 Subject: [PATCH 3/9] i2c: uniphier-f: correct error recovery The uniphier i2c block can recognize some handshake errors. But driver handles all error detections as no error if no timeout. So this makes unrecoverable state. This replaces the return values with the right ones to tell the i2c framework the errors: - EDEADLK for arbitration lost error - ENODATA for no answer error Signed-off-by: Dai Okamura Acked-by: Kunihiko Hayashi Reviewed-by: Heiko Schocher --- drivers/i2c/i2c-uniphier-f.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/i2c-uniphier-f.c b/drivers/i2c/i2c-uniphier-f.c index 9d6f1688cb1..3dcd382469e 100644 --- a/drivers/i2c/i2c-uniphier-f.c +++ b/drivers/i2c/i2c-uniphier-f.c @@ -130,12 +130,12 @@ static int wait_for_irq(struct uniphier_fi2c_priv *priv, u32 flags, if (irq & I2C_INT_AL) { dev_dbg(priv->dev, "error: arbitration lost\n"); *stop = false; - return ret; + return -EDEADLK; } if (irq & I2C_INT_NA) { dev_dbg(priv->dev, "error: no answer\n"); - return ret; + return -ENODATA; } return 0; From ab644db9ba037b695b1faf82889527971013cd62 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Mon, 2 Jan 2023 23:53:45 +0530 Subject: [PATCH 4/9] rockchip: Fix the broken Video out for rk3288 boards Video out on RK3288 boards has been broken since from few releases due to the adding of reset support on vop but missed enabling DM_RESET on associated boards. This patch fixes those RK3288 boards. Cc: Simon Glass Cc: Lin Huang Cc: Jernej Skrabec Cc: Michael Trimarchi Cc: Arnaud Patard (Rtp) Fixes: <9749d2ea29e1> ("rockchip: video: vop: Add reset support") Reported-by: Manoj Sai Signed-off-by: Jagan Teki Reviewed-by: Simon Glass --- configs/evb-rk3288_defconfig | 1 + configs/firefly-rk3288_defconfig | 1 + configs/miqi-rk3288_defconfig | 1 + configs/rock-pi-n8-rk3288_defconfig | 1 + configs/tinker-rk3288_defconfig | 1 + configs/tinker-s-rk3288_defconfig | 1 + configs/vyasa-rk3288_defconfig | 1 + 7 files changed, 7 insertions(+) diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig index 7c0b856ca56..2c2c679b290 100644 --- a/configs/evb-rk3288_defconfig +++ b/configs/evb-rk3288_defconfig @@ -80,6 +80,7 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y CONFIG_SPL_RAM=y +CONFIG_DM_RESET=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig index 63c53a0248f..12ed055acfa 100644 --- a/configs/firefly-rk3288_defconfig +++ b/configs/firefly-rk3288_defconfig @@ -77,6 +77,7 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y CONFIG_SPL_RAM=y +CONFIG_DM_RESET=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig index 0811e70dcef..2cf0efc816c 100644 --- a/configs/miqi-rk3288_defconfig +++ b/configs/miqi-rk3288_defconfig @@ -74,6 +74,7 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y CONFIG_SPL_RAM=y +CONFIG_DM_RESET=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y diff --git a/configs/rock-pi-n8-rk3288_defconfig b/configs/rock-pi-n8-rk3288_defconfig index 4ed98c0a511..757d99b8b58 100644 --- a/configs/rock-pi-n8-rk3288_defconfig +++ b/configs/rock-pi-n8-rk3288_defconfig @@ -73,6 +73,7 @@ CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y CONFIG_SPL_RAM=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +CONFIG_DM_RESET=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 85d94a6ea89..e69ef6875f5 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -82,6 +82,7 @@ CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y CONFIG_SPL_RAM=y +CONFIG_DM_RESET=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 7dfbad80838..eb153dc8d57 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -82,6 +82,7 @@ CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y CONFIG_SPL_RAM=y +CONFIG_DM_RESET=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig index cbae60f9876..f503cc16042 100644 --- a/configs/vyasa-rk3288_defconfig +++ b/configs/vyasa-rk3288_defconfig @@ -82,6 +82,7 @@ CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y CONFIG_SPL_RAM=y +CONFIG_DM_RESET=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y From bee3551e00046678e300e5ba1392443f30cbe45a Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 17 Dec 2022 18:41:13 +0100 Subject: [PATCH 5/9] Revert "Revert "cmd: pxe_utils: Check fdtcontroladdr in label_boot"" This reverts commit ed6251187afabf811a5fd49a44ebd61c53c7b378. Superseded by "cmd: pxe_utils: Limit fdtcontroladdr usage to non-fitImage" which is less heavy-handed approach and retains part of the original behavior for non-fitImage. Signed-off-by: Marek Vasut Acked-by: Neil Armstrong --- boot/pxe_utils.c | 8 +++++++- drivers/net/tsec.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 96528aa14c0..8133006875f 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -616,7 +616,10 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) * Scenario 2: If there is an fdt_addr specified, pass it along to * bootm, and adjust argc appropriately. * - * Scenario 3: fdt blob is not available. + * Scenario 3: If there is an fdtcontroladdr specified, pass it along to + * bootm, and adjust argc appropriately. + * + * Scenario 4: fdt blob is not available. */ bootm_argv[3] = env_get("fdt_addr_r"); @@ -721,6 +724,9 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) if (!bootm_argv[3]) bootm_argv[3] = env_get("fdt_addr"); + if (!bootm_argv[3]) + bootm_argv[3] = env_get("fdtcontroladdr"); + if (bootm_argv[3]) { if (!bootm_argv[2]) bootm_argv[2] = "-"; diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 519ea14b070..d69a9ff4773 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -156,7 +156,7 @@ static int tsec_mcast_addr(struct udevice *dev, const u8 *mcast_mac, int join) return 0; } -static int tsec_set_promisc(struct udevice *dev, bool enable) +static int __maybe_unused tsec_set_promisc(struct udevice *dev, bool enable) { struct tsec_private *priv = dev_get_priv(dev); struct tsec __iomem *regs = priv->regs; From 519e6641dbdd46907feac094ccd032743f4174b0 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 14 Dec 2022 07:45:18 +0100 Subject: [PATCH 6/9] cmd: pxe_utils: Limit fdtcontroladdr usage to non-fitImage Commit d5ba6188dfb ("cmd: pxe_utils: Check fdtcontroladdr in label_boot") forces '$fdtcontroladdr' DT address as a third parameter of bootm command even if the PXE transfer pulls in a fitImage which contains configuration node with its own DT that is preferrable to be passed to Linux. Limit the $fdtcontroladdr fallback utilization to non-fitImages, since it is highly likely a fitImage would come with its own DT, while single-file images do need a separate DT. Fixes: d5ba6188dfb ("cmd: pxe_utils: Check fdtcontroladdr in label_boot") Signed-off-by: Marek Vasut Reviewed-by: Quentin Schulz Tested-by: Quentin Schulz Reviewed-by: Simon Glass Reviewed-by: Peter Hoyes Tested-by: Peter Hoyes Reviewed-by: Neil Armstrong --- boot/pxe_utils.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 8133006875f..099aa2f4bc7 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -617,7 +617,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) * bootm, and adjust argc appropriately. * * Scenario 3: If there is an fdtcontroladdr specified, pass it along to - * bootm, and adjust argc appropriately. + * bootm, and adjust argc appropriately, unless the image type is fitImage. * * Scenario 4: fdt blob is not available. */ @@ -724,7 +724,10 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) if (!bootm_argv[3]) bootm_argv[3] = env_get("fdt_addr"); - if (!bootm_argv[3]) + kernel_addr_r = genimg_get_kernel_addr(kernel_addr); + buf = map_sysmem(kernel_addr_r, 0); + + if (!bootm_argv[3] && genimg_get_format(buf) != IMAGE_FORMAT_FIT) bootm_argv[3] = env_get("fdtcontroladdr"); if (bootm_argv[3]) { @@ -733,8 +736,6 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) bootm_argc = 4; } - kernel_addr_r = genimg_get_kernel_addr(kernel_addr); - buf = map_sysmem(kernel_addr_r, 0); /* Try bootm for legacy and FIT format image */ if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID && IS_ENABLED(CONFIG_CMD_BOOTM)) From 141659187667e83cc89e3a1e9d1d5640e0059df3 Mon Sep 17 00:00:00 2001 From: Philippe Schenker Date: Wed, 4 Jan 2023 15:43:33 +0100 Subject: [PATCH 7/9] pylibfdt: Fix disable version normalization On Arch Linux based systems python setuptools does not contain "setuptools.extern" hence it is failing with the following error-message: " ModuleNotFoundError: No module named 'setuptools.extern' " According to a eschwartz `setuptools.extern` is not a public API and shall not be assumed to be present in the setuptools package. He mentions that the setuptools project anyway wants to drop this. [1] Use the correct solution introduced by python setuptools developers to disable normalization. [2] [1] https://bbs.archlinux.org/viewtopic.php?id=259608 [2] https://github.com/pypa/setuptools/pull/2026 Fixes: 440098c42e73 ("pylibfdt: Fix version normalization warning") Signed-off-by: Philippe Schenker Reviewed-by: Marek Vasut Reviewed-by: Simon Glass --- scripts/dtc/pylibfdt/setup.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/dtc/pylibfdt/setup.py b/scripts/dtc/pylibfdt/setup.py index 9abdb57595a..c07f65e6bca 100755 --- a/scripts/dtc/pylibfdt/setup.py +++ b/scripts/dtc/pylibfdt/setup.py @@ -20,16 +20,12 @@ allows this script to be run stand-alone, e.g.: ./pylibfdt/setup.py install [--prefix=...] """ -from setuptools import setup, Extension +from setuptools import setup, Extension, sic from setuptools.command.build_py import build_py as _build_py -from setuptools.extern.packaging import version import os import re import sys -# Disable version normalization -version.Version = version.LegacyVersion - srcdir = os.path.dirname(__file__) with open(os.path.join(srcdir, "../README"), "r") as fh: @@ -141,7 +137,7 @@ class build_py(_build_py): setup( name='libfdt', - version=version, + version=sic(version), cmdclass = {'build_py' : build_py}, author='Simon Glass', author_email='sjg@chromium.org', From edd9c891d20e440d87196a848cad3f85cca8ef2b Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Wed, 4 Jan 2023 09:53:09 -0600 Subject: [PATCH 8/9] arm: dts: rz-g2-beacon-u-boot: Fix QSPI Regression The QSPI is accessed via the RPC-IF, but the compatible flags previously used a different name. This compatibel name was changed which broke the ability to access the QSPI. Fix this by removing the custom naming reference. Fixes: 68083b897b57 ("renesas: Fix RPC-IF compatible values") Signed-off-by: Adam Ford Reviewed-by: Marek Vasut --- arch/arm/dts/rz-g2-beacon-u-boot.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/dts/rz-g2-beacon-u-boot.dtsi b/arch/arm/dts/rz-g2-beacon-u-boot.dtsi index 4d178549187..da1c3b0939c 100644 --- a/arch/arm/dts/rz-g2-beacon-u-boot.dtsi +++ b/arch/arm/dts/rz-g2-beacon-u-boot.dtsi @@ -45,7 +45,6 @@ }; &rpc { - compatible = "renesas,rcar-gen3-rpc"; pinctrl-0 = <&qspi_pins>; pinctrl-names = "default"; num-cs = <1>; From 5404dfcc4dbb56a9b255e08b67b46d1181565e6f Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Wed, 4 Jan 2023 12:05:43 -0600 Subject: [PATCH 9/9] arm: rmobile: rzg2_beacon: Enable alternative Ethernet PHY Due to the part shortage, the AR8031 PHY was replaced with a Micrel KSZ9131. Enabling both config options keeps backward compatibility with either platform, and both appear to be auto-detected. Signed-off-by: Adam Ford Reviewed-by: Marek Vasut --- configs/rzg2_beacon_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/rzg2_beacon_defconfig b/configs/rzg2_beacon_defconfig index 36787057a28..b4ea6c630ab 100644 --- a/configs/rzg2_beacon_defconfig +++ b/configs/rzg2_beacon_defconfig @@ -68,6 +68,8 @@ CONFIG_SPI_FLASH_WINBOND=y CONFIG_BITBANGMII=y CONFIG_BITBANGMII_MULTI=y CONFIG_PHY_ATHEROS=y +CONFIG_PHY_MICREL=y +CONFIG_PHY_MICREL_KSZ90X1=y CONFIG_RENESAS_RAVB=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y