imx8mn: bootcount does not increment

2024-04-25 Thread Fabio Estevam
Hi,

When enabling bootcount on the imx8mm-evk like this:

--- a/configs/imx8mm_evk_defconfig
+++ b/configs/imx8mm_evk_defconfig
@@ -120,3 +120,5 @@ CONFIG_SDP_LOADADDR=0x4040
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_IMX_WATCHDOG=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y

It works as expected, and the "bootcount" environment variable gets
incremented after a reset.

However, if I try the same on an imx8mn_evk, the "bootcount" variable
always stays at 1 and never increments.

Do you happen to have any idea as to why imx8mn behaves differently in
this aspect?

Thanks,

Fabio Estevam


Re: [PATCH] cmd: mmc: allow use of hardware parittion names for mmc partconf

2024-04-25 Thread Fabio Estevam
On Thu, Apr 25, 2024 at 10:35 PM Fabio Estevam  wrote:

> This is a nice improvement:
>
> Reviewed-by: Fabio Estevam 

There is a typo in the Subject: "partition"


Re: [PATCH] cmd: mmc: allow use of hardware parittion names for mmc partconf

2024-04-25 Thread Fabio Estevam
Hi Tim,

On Thu, Apr 25, 2024 at 9:14 PM Tim Harvey  wrote:
>
> eMMC devices have hardware partitions such as user, boot0, and boot1.
> Allow these names to be displayed when reading the mmc PARTITION_CONFIG
> field via 'mmc partconf'. Additionally allow a name to be specified when
> setting the PARTITION_CONFIG.
>
> Before:
> u-boot=> mmc partconf 2 1 1 0 && mmc partconf 2
> EXT_CSD[179], PARTITION_CONFIG:
> BOOT_ACK: 0x1
> BOOT_PARTITION_ENABLE: 0x2
> PARTITION_ACCESS: 0x0
>
> After:
> u-boot=> mmc partconf 2 1 1 0 && mmc partconf 2
> EXT_CSD[179], PARTITION_CONFIG:
> BOOT_ACK: 0x1
> BOOT_PARTITION_ENABLE: 0x1 (boot0)
> PARTITION_ACCESS: 0x0
> u-boot=> mmc partconf 2 1 boot1 0 && mmc partconf 2
> EXT_CSD[179], PARTITION_CONFIG:
> BOOT_ACK: 0x1
> BOOT_PARTITION_ENABLE: 0x2 (boot1)
> PARTITION_ACCESS: 0x0

This is a nice improvement:

Reviewed-by: Fabio Estevam 


Re: [PATCH 3/3] ARM: dts: imx: Convert i.MX8M flash.bin image generation to binman

2024-04-25 Thread Fabio Estevam
On Thu, Apr 25, 2024 at 5:34 PM Tim Harvey  wrote:

> Marek,
>
> Thanks - this is neat and I look forward to seeing a CST signing etype!
>
> Reviewed-By: Tim Harvey 
>
> I did test this on imx8mm_venice_defconfig and it worked great:
> Tested-By: Tim Harvey  # imx8mm_venice

I tested on imx8mm-evk and imx8mn-evk, thanks!

Tested-by: Fabio Estevam 


[PATCH v3] rockchip: rv1108: Convert to OF_UPSTREAM

2024-04-24 Thread Fabio Estevam
Instead of using the local rv1108 devicetree copies from U-Boot,
let's convert the rv1108 boards to OF_UPSTREAM so that the upstream kernel
devicetrees can be used instead.

Tested on a rv1108-elgin-r1 board.

Signed-off-by: Fabio Estevam 
---
Changes since v2:
- Also removed the arch/arm/dts/Makefile entries.

 arch/arm/dts/Makefile|   4 -
 arch/arm/dts/rv1108-elgin-r1.dts |  59 
 arch/arm/dts/rv1108-evb.dts  |  79 -
 arch/arm/dts/rv1108.dtsi | 581 ---
 arch/arm/mach-rockchip/Kconfig   |   1 +
 configs/elgin-rv1108_defconfig   |   2 +-
 configs/evb-rv1108_defconfig |   2 +-
 7 files changed, 3 insertions(+), 725 deletions(-)
 delete mode 100644 arch/arm/dts/rv1108-elgin-r1.dts
 delete mode 100644 arch/arm/dts/rv1108-evb.dts
 delete mode 100644 arch/arm/dts/rv1108.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index b1c9c6222e5d..e600f9c6ed25 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -182,10 +182,6 @@ dtb-$(CONFIG_ROCKCHIP_RK3588) += \
rk3588-rock-5b.dtb \
rk3588-turing-rk1.dtb
 
-dtb-$(CONFIG_ROCKCHIP_RV1108) += \
-   rv1108-elgin-r1.dtb \
-   rv1108-evb.dtb
-
 dtb-$(CONFIG_ROCKCHIP_RV1126) += \
rv1126-edgeble-neu2-io.dtb
 
diff --git a/arch/arm/dts/rv1108-elgin-r1.dts b/arch/arm/dts/rv1108-elgin-r1.dts
deleted file mode 100644
index 83e8b3183847..
--- a/arch/arm/dts/rv1108-elgin-r1.dts
+++ /dev/null
@@ -1,59 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Elgin RV1108 R1 board";
-   compatible = "elgin,rv1108-elgin", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_clk _cmd _bus8>;
-   bus-width = <8>;
-   cap-mmc-highspeed;
-   disable-wp;
-   non-removable;
-   status = "okay";
-};
-
- {
-   status = "okay";
-
-   u2phy_otg: otg-port {
-   status = "okay";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_xfer_pullup>;
-   status = "okay";
-};
-
-_otg {
-   status = "okay";
-};
-
- {
-   uart2m0 {
-   uart2m0_xfer_pullup: uart2m0-xfer-pullup {
-   rockchip,pins = <2 RK_PD2 RK_FUNC_1 
_pull_up_drv_8ma>,
-   <2 RK_PD1 RK_FUNC_1 
_pull_up_drv_8ma>;
-   };
-   };
-};
diff --git a/arch/arm/dts/rv1108-evb.dts b/arch/arm/dts/rv1108-evb.dts
deleted file mode 100644
index c91776bc106e..
--- a/arch/arm/dts/rv1108-evb.dts
+++ /dev/null
@@ -1,79 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Rockchip RV1108 Evaluation board";
-   compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-
-   vcc5v0_otg: vcc5v0-otg-drv {
-   compatible = "regulator-fixed";
-   enable-active-high;
-   regulator-name = "vcc5v0_otg";
-   gpio = < RK_PB0 GPIO_ACTIVE_HIGH>;
-   regulator-min-microvolt = <500>;
-   regulator-max-microvolt = <500>;
-   };
-};
-
- {
-   status = "okay";
-   clock_in_out = <0>;
-   snps,reset-active-low;
-   snps,reset-delays-us = <0 1 100>;
-   snps,reset-gpio = < RK_PC1 GPIO_ACTIVE_LOW>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-   flash@0 {
-   compatible = "gd25q256","jedec,spi-nor";
-   reg = <0>;
-   spi-tx-bus-width = <1>;
-   spi-rx-bus-width = <1>;
-   spi-max-frequency = <9600>;
-   };
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
-_otg {
-   vbus-supply = <_otg>;
-   status = "okay";
-};
-
-_host_ehci {
-   status = "okay";
-};
-
-_host_ohci {
-   status = "okay";
-};
diff --git a/arch/arm/dts/rv1108.dtsi b/arch/arm/dts/rv1108.dtsi
deleted file mode 100644
index

Re: [PATCH 2/2] tools: type arguemnts

2024-04-23 Thread Fabio Estevam
On Fri, Apr 19, 2024 at 9:13 AM Heinrich Schuchardt
 wrote:
>
> %s/arguemnts/arguemnts/

There is a typo in the Subject: %s/type/typo/


[PATCH v2] rockchip: rv1108: Convert to OF_UPSTREAM

2024-04-23 Thread Fabio Estevam
Instead of using the local rv1108 devicetree copies from U-Boot,
let's convert the rv1108 boards to OF_UPSTREAM so that the upstream kernel
devicetrees can be used instead.

Tested on a rv1108-elgin-r1 board.

Signed-off-by: Fabio Estevam 
---
Changes since v1:
- Fixed typo in commit log.

 arch/arm/dts/rv1108-elgin-r1.dts |  59 
 arch/arm/dts/rv1108-evb.dts  |  79 -
 arch/arm/dts/rv1108.dtsi | 581 ---
 arch/arm/mach-rockchip/Kconfig   |   1 +
 configs/elgin-rv1108_defconfig   |   2 +-
 configs/evb-rv1108_defconfig |   2 +-
 6 files changed, 3 insertions(+), 721 deletions(-)
 delete mode 100644 arch/arm/dts/rv1108-elgin-r1.dts
 delete mode 100644 arch/arm/dts/rv1108-evb.dts
 delete mode 100644 arch/arm/dts/rv1108.dtsi

diff --git a/arch/arm/dts/rv1108-elgin-r1.dts b/arch/arm/dts/rv1108-elgin-r1.dts
deleted file mode 100644
index 83e8b3183847..
--- a/arch/arm/dts/rv1108-elgin-r1.dts
+++ /dev/null
@@ -1,59 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Elgin RV1108 R1 board";
-   compatible = "elgin,rv1108-elgin", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_clk _cmd _bus8>;
-   bus-width = <8>;
-   cap-mmc-highspeed;
-   disable-wp;
-   non-removable;
-   status = "okay";
-};
-
- {
-   status = "okay";
-
-   u2phy_otg: otg-port {
-   status = "okay";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_xfer_pullup>;
-   status = "okay";
-};
-
-_otg {
-   status = "okay";
-};
-
- {
-   uart2m0 {
-   uart2m0_xfer_pullup: uart2m0-xfer-pullup {
-   rockchip,pins = <2 RK_PD2 RK_FUNC_1 
_pull_up_drv_8ma>,
-   <2 RK_PD1 RK_FUNC_1 
_pull_up_drv_8ma>;
-   };
-   };
-};
diff --git a/arch/arm/dts/rv1108-evb.dts b/arch/arm/dts/rv1108-evb.dts
deleted file mode 100644
index c91776bc106e..
--- a/arch/arm/dts/rv1108-evb.dts
+++ /dev/null
@@ -1,79 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Rockchip RV1108 Evaluation board";
-   compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-
-   vcc5v0_otg: vcc5v0-otg-drv {
-   compatible = "regulator-fixed";
-   enable-active-high;
-   regulator-name = "vcc5v0_otg";
-   gpio = < RK_PB0 GPIO_ACTIVE_HIGH>;
-   regulator-min-microvolt = <500>;
-   regulator-max-microvolt = <500>;
-   };
-};
-
- {
-   status = "okay";
-   clock_in_out = <0>;
-   snps,reset-active-low;
-   snps,reset-delays-us = <0 1 100>;
-   snps,reset-gpio = < RK_PC1 GPIO_ACTIVE_LOW>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-   flash@0 {
-   compatible = "gd25q256","jedec,spi-nor";
-   reg = <0>;
-   spi-tx-bus-width = <1>;
-   spi-rx-bus-width = <1>;
-   spi-max-frequency = <9600>;
-   };
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
-_otg {
-   vbus-supply = <_otg>;
-   status = "okay";
-};
-
-_host_ehci {
-   status = "okay";
-};
-
-_host_ohci {
-   status = "okay";
-};
diff --git a/arch/arm/dts/rv1108.dtsi b/arch/arm/dts/rv1108.dtsi
deleted file mode 100644
index 215d88522587..
--- a/arch/arm/dts/rv1108.dtsi
+++ /dev/null
@@ -1,581 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-/ {
-   #address-cells = <1>;
-   #size-cells = <1>;
-
-   compatible = "rockchip,rv1108";
-
-   interrupt-parent = <>;
-
-   aliases {
-   serial0 = 
-   serial1 

[PATCH] rockchip: rv1108: Convert to OF_UPSTREAM

2024-04-23 Thread Fabio Estevam
Instead of using the local rv1108 devicetree copies from U-Boot,
let's convert the rv11008 board to OF_UPSTREAM so that the upstream kernel
devicetrees can be used instead.

Tested on a rv1108-elgin-r1 board.

Signed-off-by: Fabio Estevam 
---
 arch/arm/dts/rv1108-elgin-r1.dts |  59 
 arch/arm/dts/rv1108-evb.dts  |  79 -
 arch/arm/dts/rv1108.dtsi | 581 ---
 arch/arm/mach-rockchip/Kconfig   |   1 +
 configs/elgin-rv1108_defconfig   |   2 +-
 configs/evb-rv1108_defconfig |   2 +-
 6 files changed, 3 insertions(+), 721 deletions(-)
 delete mode 100644 arch/arm/dts/rv1108-elgin-r1.dts
 delete mode 100644 arch/arm/dts/rv1108-evb.dts
 delete mode 100644 arch/arm/dts/rv1108.dtsi

diff --git a/arch/arm/dts/rv1108-elgin-r1.dts b/arch/arm/dts/rv1108-elgin-r1.dts
deleted file mode 100644
index 83e8b3183847..
--- a/arch/arm/dts/rv1108-elgin-r1.dts
+++ /dev/null
@@ -1,59 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Elgin RV1108 R1 board";
-   compatible = "elgin,rv1108-elgin", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_clk _cmd _bus8>;
-   bus-width = <8>;
-   cap-mmc-highspeed;
-   disable-wp;
-   non-removable;
-   status = "okay";
-};
-
- {
-   status = "okay";
-
-   u2phy_otg: otg-port {
-   status = "okay";
-   };
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_xfer_pullup>;
-   status = "okay";
-};
-
-_otg {
-   status = "okay";
-};
-
- {
-   uart2m0 {
-   uart2m0_xfer_pullup: uart2m0-xfer-pullup {
-   rockchip,pins = <2 RK_PD2 RK_FUNC_1 
_pull_up_drv_8ma>,
-   <2 RK_PD1 RK_FUNC_1 
_pull_up_drv_8ma>;
-   };
-   };
-};
diff --git a/arch/arm/dts/rv1108-evb.dts b/arch/arm/dts/rv1108-evb.dts
deleted file mode 100644
index c91776bc106e..
--- a/arch/arm/dts/rv1108-evb.dts
+++ /dev/null
@@ -1,79 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-/dts-v1/;
-
-#include "rv1108.dtsi"
-
-/ {
-   model = "Rockchip RV1108 Evaluation board";
-   compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
-
-   memory@6000 {
-   device_type = "memory";
-   reg = <0x6000 0x0800>;
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-
-   vcc5v0_otg: vcc5v0-otg-drv {
-   compatible = "regulator-fixed";
-   enable-active-high;
-   regulator-name = "vcc5v0_otg";
-   gpio = < RK_PB0 GPIO_ACTIVE_HIGH>;
-   regulator-min-microvolt = <500>;
-   regulator-max-microvolt = <500>;
-   };
-};
-
- {
-   status = "okay";
-   clock_in_out = <0>;
-   snps,reset-active-low;
-   snps,reset-delays-us = <0 1 100>;
-   snps,reset-gpio = < RK_PC1 GPIO_ACTIVE_LOW>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-   flash@0 {
-   compatible = "gd25q256","jedec,spi-nor";
-   reg = <0>;
-   spi-tx-bus-width = <1>;
-   spi-rx-bus-width = <1>;
-   spi-max-frequency = <9600>;
-   };
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
- {
-   status = "okay";
-};
-
-_otg {
-   vbus-supply = <_otg>;
-   status = "okay";
-};
-
-_host_ehci {
-   status = "okay";
-};
-
-_host_ohci {
-   status = "okay";
-};
diff --git a/arch/arm/dts/rv1108.dtsi b/arch/arm/dts/rv1108.dtsi
deleted file mode 100644
index 215d88522587..
--- a/arch/arm/dts/rv1108.dtsi
+++ /dev/null
@@ -1,581 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-/ {
-   #address-cells = <1>;
-   #size-cells = <1>;
-
-   compatible = "rockchip,rv1108";
-
-   interrupt-parent = <>;
-
-   aliases {
-   serial0 = 
-   serial1 = 
-   serial2 = 
-   spi0= 
-   };
-
-  

Re: [PATCH] clk: imx8mn: add video clocks support

2024-04-22 Thread Fabio Estevam
Hi Michael,

On Mon, Apr 22, 2024 at 7:36 AM Michael Nazzareno Trimarchi
 wrote:

> Are you considering if I wrap properly with VIDEO IS_ENABLED?

I prefer you resend this patch as part of a complete series that adds
panel support to an imx8mn board target.

Otherwise, if this gets in as-is, it will become a dead code, which we
want to avoid.


Re: [PATCH] clk: imx8mn: add video clocks support

2024-04-21 Thread Fabio Estevam
Hi Michael,

On Sun, Apr 21, 2024 at 11:07 AM Michael Trimarchi
 wrote:
>
> Add clocks support for the video subsystem.
>
> Signed-off-by: Michael Trimarchi 

Which target will make use of these clocks?

As-is this patch adds only dead code.

Adding a defconfig that uses these newly introduced clocks would be nice.

Also, to avoid size increase, please protect this code against
CONFIG_VIDEO or something, like done here:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/commit/2b3310ef13998dfd03196a0806e03035212b102c


Re: [PATCH v3 1/3] clk: imx8mm: Add support for PCIe clocks

2024-04-20 Thread Fabio Estevam
On Fri, Apr 19, 2024 at 12:29 PM Tim Harvey  wrote:
>
> Add support for PCIe clocks required to enable PCIe support on
> iMX8MM SoC.
>
> Signed-off-by: Tim Harvey 
> ---
> v3: wrap pcie clk config around IS_ENABLED to avoid SPL growth as
> suggested by Marek

Applied all, thanks.


Re: [PATCH v1] board: toradex: imx: Remove not needed env variables

2024-04-20 Thread Fabio Estevam
On Thu, Apr 18, 2024 at 10:12 AM Francesco Dolcini  wrote:
>
> From: Francesco Dolcini 
>
> Remove not needed variables from environment and include config files.
>
>  - setup variable used to be executed from some bootscript, however
>it's not required and there is no point on having this small helper
>here
>  - boot_file, kernel_file, ip_dyn variables are not used anywhere
>  - fdt_fixup variable is just set empty
>  - defargs, vidargs variables used to be used from some bootscript,
>however there is no point on having it here and even old legacy
>bootscript can work without them
>  - removed CONFIG_ENABLE_DDR_TRAINING_DEBUG, this is a leftover from
>some copy/paste
>
> On colibri imx6ull/imx7 NAND module, remove consoleblank=0, this is
> already the Linux kernel default therefore useless.
>
> Various Linux Kernel command line options removed are not-existing
> left-over that applied to some old NXP i.MX downstream branch
>
> Signed-off-by: Francesco Dolcini 

Applied, thanks.


Re: [PATCH] imx8m*_venice_defconfig: enable ipv6, wget and tftpput

2024-04-20 Thread Fabio Estevam
On Wed, Apr 17, 2024 at 5:03 PM Tim Harvey  wrote:
>
> Enable ipv6, wget, and tftpput support
>
> Signed-off-by: Tim Harvey 

Applied, thanks.


Re: [PATCH] board: gateworks: venice: fix dt adjustment for gw73xx baseboard for imx8mp

2024-04-20 Thread Fabio Estevam
On Wed, Apr 17, 2024 at 5:01 PM Tim Harvey  wrote:
>
> The GW73xx baseboard needs a PCI dt adjustment for revC/D based on a
> change of the PCIe switch. Make sure we are only doing this for a pci
> based ethernet to avoid causing a boot hang when the ethernet1 alias
> points to eqos or fec. To know this is a pcie device ensure the alias
> begins with the pcie controller.
>
> Signed-off-by: Tim Harvey 

Applied, thanks.


Re: [PATCH v1] arm: dts: verdin-imx8mm/imx8mp: use gpio-hog for sleep moci

2024-04-20 Thread Fabio Estevam
On Wed, Apr 17, 2024 at 5:49 AM Stefan Eichenberger  wrote:
>
> From: Stefan Eichenberger 
>
> In Linux, we allow sleep moci to be turned off when the carrier board
> supports it and the system is in suspend. In U-Boot, however, we want
> the sleep moci to be always on. So we use a gpio hog and disable the
> regulator. This change is necessary because we switched to upstream
> device tree files with commit 23fe2def1edf
> ("verdin-imx8mm/verdin-imx8mp: move imx verdins to OF_UPSTREAM"). A
> recent upstream patch removes the gpio hog from the Linux device tree,
> so we need to add it to the u-boot dtsi. The following patch will remove
> the gpio hog from the Linux device tree:
> https://lore.kernel.org/linux-devicetree/20240405160720.5977-1-eich...@gmail.com/
> The U-Boot patch can be applied without it and will not break the build.
>
> Signed-off-by: Stefan Eichenberger 

Applied, thanks.


Re: [PATCH] imx93: Move SoC and lifeclycle information to debug level

2024-04-20 Thread Fabio Estevam
On Mon, Apr 15, 2024 at 6:57 PM Fabio Estevam  wrote:
>
> From: Fabio Estevam 
>
> The following information printed on every boot is not very
> helpful for the users:
>
> SOC: 0xa0009300
> LC: 0x40040
>
> Move them to debug() level.
>
> Signed-off-by: Fabio Estevam 

Applied, thanks.


Re: [PATCH] imx8m*-venice: enable TPM support

2024-04-20 Thread Fabio Estevam
On Mon, Mar 25, 2024 at 1:27 PM Tim Harvey  wrote:
>
> Enable support for TPM2 devices. As the ATTPM20P TPM2 used on the
> Gateworks Venice boards hangs off the SPI bus we enable SPI support
> as well.
>
> Signed-off-by: Tim Harvey 

Applied, thanks.


[GIT PULL] Please pull u-boot-imx-master-20240420

2024-04-20 Thread Fabio Estevam
Hi Tom,

Please pull from u-boot-imx/master, thanks.

The following changes since commit af04f37a78c7e61597fb9ed6db2c8f8d7f8b0f92:

  Merge tag 'u-boot-stm32-20240419' of 
https://source.denx.de/u-boot/custodians/u-boot-stm (2024-04-19 14:25:04 -0600)

are available in the Git repository at:

  https://gitlab.denx.de/u-boot/custodians/u-boot-imx.git 
tags/u-boot-imx-master-20240420

for you to fetch changes up to 8b8c699d88171b0d40f072e114f32cce93cb2987:

  imx8mm_venice_defconfig: Enable PCIe/NVMe support (2024-04-20 00:37:51 -0300)

u-boot-imx-master-20240420
--

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/20444

- Make i.MX93 boot less verbose.
- Remove unneedd environment variables from Toradex i.MX boards.
- Use gpio-hog on verdin-imx8mm/imx8mp.
- Add PCIe support for i.MX8MM.
- Add TPM support for imx8m*-venice.

Fabio Estevam (1):
  imx93: Move SoC and lifeclycle information to debug level

Francesco Dolcini (1):
  board: toradex: imx: Remove not needed env variables

Stefan Eichenberger (1):
  arm: dts: verdin-imx8mm/imx8mp: use gpio-hog for sleep moci

Tim Harvey (6):
  imx8m*-venice: enable TPM support
  board: gateworks: venice: fix dt adjustment for gw73xx baseboard for 
imx8mp
  imx8m*_venice_defconfig: enable ipv6, wget and tftpput
  clk: imx8mm: Add support for PCIe clocks
  pci: dw_imx: add support for IMX8MM
  imx8mm_venice_defconfig: Enable PCIe/NVMe support

 arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi |  5 +
 arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi |  4 
 board/freescale/imx93_evk/spl.c |  4 ++--
 board/gateworks/venice/venice.c |  7 ---
 board/phytec/phycore_imx93/spl.c|  4 ++--
 board/variscite/imx93_var_som/spl.c |  4 ++--
 configs/imx8mm_venice_defconfig | 21 +++
 configs/imx8mn_venice_defconfig | 15 ++
 configs/imx8mp_venice_defconfig | 15 ++
 drivers/clk/imx/clk-imx8mm.c| 27 +
 drivers/pci/pcie_dw_imx.c   | 18 +++--
 include/configs/apalis-imx8.h   |  2 --
 include/configs/apalis_imx6.h   |  9 +
 include/configs/colibri-imx6ull.h   | 10 +++--
 include/configs/colibri-imx8x.h |  2 --
 include/configs/colibri_imx6.h  |  9 +
 include/configs/colibri_imx7.h  | 11 +++---
 include/configs/verdin-imx8mm.h |  3 ---
 include/configs/verdin-imx8mp.h |  5 -
 19 files changed, 121 insertions(+), 54 deletions(-)


Re: [PATCH] ARM: imx: Enable kaslrseed command on DH i.MX8M Plus DHCOM

2024-04-18 Thread Fabio Estevam
On Thu, Apr 18, 2024 at 9:47 PM Fabio Estevam  wrote:

> I don't get the error if I pass CONFIG_FSL_CAAM_JR_NTZ_ACCESS=y:

Ops, sorry. This is not correct. CONFIG_DM_RNG was unselected. Please discard.


Re: [PATCH] ARM: imx: Enable kaslrseed command on DH i.MX8M Plus DHCOM

2024-04-18 Thread Fabio Estevam
On Thu, Apr 18, 2024 at 4:05 PM Fabio Estevam  wrote:

> I tested with mainline TFA 2.10 and also with NXP 2.8. The error
> happens in both cases.

I don't get the error if I pass CONFIG_FSL_CAAM_JR_NTZ_ACCESS=y:

U-Boot SPL 2024.04-00793-g3434b88d2c2f-dirty (Apr 18 2024 - 21:46:06 -0300)
No pmic
SEC0:  RNG instantiated
WDT:   Started watchdog@3028 with servicing every 1000ms (60s timeout)
Trying to boot from MMC1
NOTICE:  Do not release JR0 to NS as it can be used by HAB
NOTICE:  BL31: v2.10.3(release):lts-v2.10.3
NOTICE:  BL31: Built : 21:04:50, Apr 15 2024


Re: [PATCH] ARM: imx: Enable kaslrseed command on DH i.MX8M Plus DHCOM

2024-04-18 Thread Fabio Estevam
Hi Marek,

On Thu, Apr 18, 2024 at 3:42 PM Marek Vasut  wrote:

> Interesting. Which TFA blob version do you use ? I used the mainline
> 2.10 for my tests.

I tested with mainline TFA 2.10 and also with NXP 2.8. The error
happens in both cases.

> btw. 'no pmic' ? Is that expected ?

Yes, this is a separate issue. It happens because there are two PMIC
variants on the imx8mm evk.


Re: [PATCH] ARM: imx: Enable kaslrseed command on DH i.MX8M Plus DHCOM

2024-04-18 Thread Fabio Estevam
Hi Tim,

On Thu, Apr 18, 2024 at 2:54 PM Tim Harvey  wrote:

> Fabio, if you enable CONFIG_DM_RNG on an imx8m{m,p}_evk do you get the
> following in the SPL?
> Couldn't bind rng driver (-96)
> SEC0:  RNG instantiated
>
> sec_init failed!

Yes, if I add CONFIG_DM_RNG=y to imx8mm_evk_defconfig I get:

U-Boot SPL 2024.04-00793-g3434b88d2c2f-dirty (Apr 18 2024 - 14:58:57 -0300)
No pmic
Couldn't bind rng driver (-96)
SEC0:  RNG instantiated

sec_init failed!


Re: [PATCH] imx8m*-venice: enable TPM support

2024-04-17 Thread Fabio Estevam
Hi Tim,

On Wed, Apr 17, 2024 at 2:00 PM Tim Harvey  wrote:

> Fabio,
>
> This one got tagged as 'changes requested' in patchwork but I'm not
> clear why. Are there any issues with this?

Sorry, this was a mistake. I will apply it in the next batch of patches.


Re: [PATCH v6 0/5] imx93: Conver to OF_UPSTREAM

2024-04-17 Thread Fabio Estevam
On Mon, Apr 15, 2024 at 9:55 AM Peng Fan  wrote:

> ok.
> Do I need to switch back to only convert i.MX93 11x11 EVK to
> OF_UPSTREM?

Yes, please convert only the imx93 evk board for now.

Currently, on the dts/upstream repo in U-Boot master, only the imx93
evk board is present.

The Variscite and Phytec i.MX93 boards are not there yet.

They will show up after the dts/upstream is synced with kernel 6.9.


[PATCH] imx93: Move SoC and lifeclycle information to debug level

2024-04-15 Thread Fabio Estevam
From: Fabio Estevam 

The following information printed on every boot is not very
helpful for the users:

SOC: 0xa0009300
LC: 0x40040

Move them to debug() level.

Signed-off-by: Fabio Estevam 
---
 board/freescale/imx93_evk/spl.c | 4 ++--
 board/phytec/phycore_imx93/spl.c| 4 ++--
 board/variscite/imx93_var_som/spl.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c
index 7331a20f94c8..6d5e110b2776 100644
--- a/board/freescale/imx93_evk/spl.c
+++ b/board/freescale/imx93_evk/spl.c
@@ -120,8 +120,8 @@ void board_init_f(ulong dummy)
if (ret) {
printf("Fail to init Sentinel API\n");
} else {
-   printf("SOC: 0x%x\n", gd->arch.soc_rev);
-   printf("LC: 0x%x\n", gd->arch.lifecycle);
+   debug("SOC: 0x%x\n", gd->arch.soc_rev);
+   debug("LC: 0x%x\n", gd->arch.lifecycle);
}
 
power_init_board();
diff --git a/board/phytec/phycore_imx93/spl.c b/board/phytec/phycore_imx93/spl.c
index f03bfee9ffa8..5efa38a14427 100644
--- a/board/phytec/phycore_imx93/spl.c
+++ b/board/phytec/phycore_imx93/spl.c
@@ -126,8 +126,8 @@ void board_init_f(ulong dummy)
if (ret) {
printf("Fail to init ELE API\n");
} else {
-   printf("SOC: 0x%x\n", gd->arch.soc_rev);
-   printf("LC: 0x%x\n", gd->arch.lifecycle);
+   debug("SOC: 0x%x\n", gd->arch.soc_rev);
+   debug("LC: 0x%x\n", gd->arch.lifecycle);
}
 
clock_init();
diff --git a/board/variscite/imx93_var_som/spl.c 
b/board/variscite/imx93_var_som/spl.c
index 71f346cf77bd..8852aea156b7 100644
--- a/board/variscite/imx93_var_som/spl.c
+++ b/board/variscite/imx93_var_som/spl.c
@@ -125,8 +125,8 @@ void board_init_f(ulong dummy)
if (ret) {
printf("Fail to init ELE API\n");
} else {
-   printf("SOC: 0x%x\n", gd->arch.soc_rev);
-   printf("LC: 0x%x\n", gd->arch.lifecycle);
+   debug("SOC: 0x%x\n", gd->arch.soc_rev);
+   debug("LC: 0x%x\n", gd->arch.lifecycle);
}
power_init_board();
 
-- 
2.34.1



Re: [PATCH 1/1] net: wget: fix TCP sequence number wrap around issue

2024-04-15 Thread Fabio Estevam
Hi Yasuharu,

On Mon, Apr 15, 2024 at 10:01 AM Yasuharu Shibata
 wrote:
>
> If tcp_seq_num is wrap around, tcp_seq_num >= initial_data_seq_num
> isn't satisfied and store_block() isn't called.
> The condition has a wrap around issue, so it is fixed in this patch.
>
> Signed-off-by: Yasuharu Shibata 

Great work!

I applied your previous patch:
https://lore.kernel.org/u-boot/20240414104607.5966-1-yasuharu.shib...@gmail.com/

and this one against top-of-tree U-Boot and I no longer observe the
wget corruption.

Reported-by: Tim Harvey 
Tested-by: Fabio Estevam 

Thanks a lot for fixing this long-standing wget bug.

Cheers,

Fabio Estevam


Re: [PATCH v6 0/5] imx93: Conver to OF_UPSTREAM

2024-04-15 Thread Fabio Estevam
Hi Peng,

On Fri, Apr 12, 2024 at 10:40 AM Fabio Estevam  wrote:
>
> On Fri, Apr 12, 2024 at 10:24 AM Peng Fan (OSS)  wrote:
> >
> > A few nodes were added to soc and board u-boot.dtsi(lpi2c, usbotg), those 
> > nodes
> > could be dropped after upstream linux supports them.
> >
> > To support OF_UPSTREAM, a few driver changes are included.
> > For TMU, still use U-Boot node, I will prepare a kernel update,
> > then back to U-Boot support.
> >
> >  Mathieu: please help test the boards you maintain when you have time.
>
> The series looks good.
>
> I will apply it after Mathieu or the Phytec folks confirm this series
> does not break imx93-phyboard-segin.

I applied patches 1 to 4, thanks.

I dropped the last OF_UPSTREAM patch as it is causing boot issues on
Mathieu's tests.


[GIT PULL] Please pull u-boot-imx-master-20240415

2024-04-15 Thread Fabio Estevam
Hi Tom,

Please pull from u-boot-imx/master, thanks.

The following changes since commit b03b49046af5dfca599d2ce8f0aafed89b97aa91:

  Merge https://source.denx.de/u-boot/custodians/u-boot-usb (2024-04-14 
15:58:31 -0600)

are available in the Git repository at:

  https://gitlab.denx.de/u-boot/custodians/u-boot-imx.git 
tags/u-boot-imx-master-20240415

for you to fetch changes up to 8ecb0931940cc19728d686b9dba06585f4d93709:

  clk: imx93: fix anatop base (2024-04-15 08:09:41 -0300)

u-boot-imx-master-20240415
--

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/20348

- Update the imx_rgpio2p to only access one address as per the dt-schema.
- Remove unused imx9_cpu.c file.
- Only use the LPUART ipg clk for i.MX7ULP.
- Use the correct anatop base for accessing the PLL clocks on i.MX93.

Peng Fan (4):
  gpio: imx_rgpio2p: support one address
  serial: lpuart: use ipg clk for i.MX7ULP
  cpu: drop imx9_cpu
  clk: imx93: fix anatop base

 drivers/clk/imx/clk-imx93.c|   2 +-
 drivers/cpu/imx9_cpu.c | 224 -
 drivers/gpio/imx_rgpio2p.c |  42 +++-
 drivers/serial/serial_lpuart.c |  42 +---
 4 files changed, 65 insertions(+), 245 deletions(-)
 delete mode 100644 drivers/cpu/imx9_cpu.c


Re: [PATCH] net: wget: Support retransmission a dropped packet

2024-04-15 Thread Fabio Estevam
Hi Yasuharu,

On Mon, Apr 15, 2024 at 7:10 AM Yasuharu Shibata
 wrote:

> I have seen similar issue apart from this patch and will investigate
> it as a next step.
> If I have any information about the issue, I will send it to the thread.

Thanks, if you have any updates about this wget corruption, please
keep me on Cc.

Thanks,

Fabio Estevam


Re: [PATCH] net: wget: Support retransmission a dropped packet

2024-04-15 Thread Fabio Estevam
Hi Yasuharu,

On Sun, Apr 14, 2024 at 9:46 AM Yasuharu Shibata
 wrote:
>
> The server sends multiple packets without waiting for an ACK
> by window control and if some packets are dropped,
> wget will return an ACK including the dropped packets.
>
> Following log indicates this issue.
>
>   wget_handler() wget: Transferring, seq=97bbdd4a, ack=30,len=580
>   wget_handler() wget: Transferring, seq=97bbedca, ack=30,len=580
>
> First packet of TCP sequence number is 0x97bbdd4a.
> Second packet of TCP sequence number should be 0x97bbe2ca,
> however it is 0x97bbedca and returns its ACK, so the server
> suppose that 0x97bbe2ca and 0x97bbedca are received appropriately.
> In this case, 0x97bbe2ca was lost and the data of wget was broken.
>
> In this patch, next_data_seq_num holds the next expected
> TCP sequence number.
> If the TCP sequence number different from next_data_seq_num,
> trying to retransmit the packet.
>
> Signed-off-by: Yasuharu Shibata 

Tested-by: Fabio Estevam 


Re: [PATCH] net: wget: Support retransmission a dropped packet

2024-04-14 Thread Fabio Estevam
Hi Yasuharu,

On Sun, Apr 14, 2024 at 9:46 AM Yasuharu Shibata
 wrote:
>
> The server sends multiple packets without waiting for an ACK
> by window control and if some packets are dropped,
> wget will return an ACK including the dropped packets.
>
> Following log indicates this issue.
>
>   wget_handler() wget: Transferring, seq=97bbdd4a, ack=30,len=580
>   wget_handler() wget: Transferring, seq=97bbedca, ack=30,len=580
>
> First packet of TCP sequence number is 0x97bbdd4a.
> Second packet of TCP sequence number should be 0x97bbe2ca,
> however it is 0x97bbedca and returns its ACK, so the server
> suppose that 0x97bbe2ca and 0x97bbedca are received appropriately.
> In this case, 0x97bbe2ca was lost and the data of wget was broken.
>
> In this patch, next_data_seq_num holds the next expected
> TCP sequence number.
> If the TCP sequence number different from next_data_seq_num,
> trying to retransmit the packet.

Thanks for your patch.

I tested it in the hope that it would fix the following issue:
https://lore.kernel.org/u-boot/caj+vnu2u9w2nrt6hf1caeq_56sdqviuezudd1iyopdf1cna...@mail.gmail.com/

but I still get wget corruption when loading large files multiple
times in a row.

Would you happen to have any suggestions?

Thanks


Re: [PATCH v6 0/5] imx93: Conver to OF_UPSTREAM

2024-04-12 Thread Fabio Estevam
On Fri, Apr 12, 2024 at 10:24 AM Peng Fan (OSS)  wrote:
>
> A few nodes were added to soc and board u-boot.dtsi(lpi2c, usbotg), those 
> nodes
> could be dropped after upstream linux supports them.
>
> To support OF_UPSTREAM, a few driver changes are included.
> For TMU, still use U-Boot node, I will prepare a kernel update,
> then back to U-Boot support.
>
>  Mathieu: please help test the boards you maintain when you have time.

The series looks good.

I will apply it after Mathieu or the Phytec folks confirm this series
does not break imx93-phyboard-segin.


Re: [PATCH v5 2/5] serial: lpuart: use ipg clk for i.MX7ULP

2024-04-12 Thread Fabio Estevam
Hi Peng,

On Thu, Apr 11, 2024 at 12:23 AM Peng Fan (OSS)  wrote:
>
> From: Peng Fan 
>
> To i.MX7ULP compatible lpuart, there is only ipg clk, no per clk.
> So add a devtype check for i.MX7ULP.
>
> Signed-off-by: Peng Fan 
> ---
>  drivers/serial/serial_lpuart.c | 28 +++-
>  1 file changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
> index ce08a6b4486..891352293f9 100644
> --- a/drivers/serial/serial_lpuart.c
> +++ b/drivers/serial/serial_lpuart.c
> @@ -111,11 +111,18 @@ u32 __weak get_lpuart_clk(void)
>  #if CONFIG_IS_ENABLED(CLK)
>  static int get_lpuart_clk_rate(struct udevice *dev, u32 *clk)
>  {
> +   struct lpuart_serial_plat *plat = dev_get_plat(dev);
> struct clk per_clk;

You ignored my previous comment. Here I go again:

Please rename 'per_clk' to 'clk'.

> ulong rate;
> int ret;
> +   char *name;
> +
> +   if (plat->devtype == DEV_MX7ULP)
> +   name = "ipg";
> +   else
> +   name = "per";
>
> -   ret = clk_get_by_name(dev, "per", _clk);
> +   ret = clk_get_by_name(dev, name, _clk);

... because it is confusing that per_clk can be ipg or per clock.

> if (ret) {
> dev_err(dev, "Failed to get per clk: %d\n", ret);

And then also change the error message to "clk".


Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-04-10 Thread Fabio Estevam
Hi Tom,

On Sat, Mar 30, 2024 at 5:03 PM Fabio Estevam  wrote:
>
> Hi Tom,
>
> On Mon, Mar 25, 2024 at 5:37 PM Hiago De Franco  wrote:
>
> > > How much testing has this seen outside of imx?
> >
> > Tom, I tested with the AM62 TI arm processor (Toradex Verdin AM62) and
> > it works fine.
>
> Do you think this one can be applied to next?
>
> Then we would have time for more testing until 2024.07.

Can this go in now?

Thanks


Re: [PATCH v4 2/3] imx: imx93_evk: add rtc PCF2131

2024-04-09 Thread Fabio Estevam
Hi Joy,

On Sun, Apr 7, 2024 at 5:57 AM Joy Zou  wrote:
>
> support rtc PCF2131 for imx93.

Please improve the commit log:

- Start with a capital letter.
- You are adding the RTC support for the imx93-evk board, not for imx93.

> +
> +   aliases {
> +   rtc0 = 
> +   };
> +

There is no need for this extra blank line. Please drop it.

BTW, you should also add the alias in the patch you sent to Linux.

> +   pcf2131: rtc@53 {
> +   compatible = "nxp,pcf2131";
> +   reg = <0x53>;
> +   interrupt-parent = <>;
> +   interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
> +   status = "okay";

The status should be dropped as per the feedback you received in the
kernel submission.


Re: [PATCH v4 0/5] imx93: Conver to OF_UPSTREAM

2024-04-07 Thread Fabio Estevam
On Sun, Apr 7, 2024 at 8:51 PM Peng Fan  wrote:

> Ok. But these should not be related to this patchset.

Yes, that's why my first sentence was:

"Here are some comments unrelated to the UART issue."

Thanks for taking a look at these issues.


Re: [PATCH v4 0/5] imx93: Conver to OF_UPSTREAM

2024-04-07 Thread Fabio Estevam
Hi Peng,

Here are some comments unrelated to the UART issue.

On Sun, Apr 7, 2024 at 7:35 AM Peng Fan  wrote:

> SOC: 0xa1009300
> LC: 0x2040010
> M33 prepare ok

Could you remove these three lines?

They are not very helpful and add noise to the boot log.

> Normal Boot
> Trying to boot from BOOTROM
> Boot Stage: Primary boot
> image offset 0x8000, pagesize 0x200, ivt offset 0x0
> Load image from 0x49800 by ROM_API
> NOTICE:  BL31: v2.8(release):lf-6.6.3-1.0.0-10-gf12d90141
> NOTICE:  BL31: Built : 09:34:44, Mar 27 2024
>
>
> U-Boot 2024.04-rc5-00388-g351988e2dce (Apr 07 2024 - 19:29:56 +0800)
>
> Reset Status: POR
>
> Could not read CPU frequency: -2
> CPU:   NXP i.MX93(52) Rev1.1 A55 at 0 MHz

Please fix this. I am sure the CPU is not running at 0 MHz :-)

> CPU:   Industrial temperature grade  (-40C to 105C) at 26C
>
> Model: NXP i.MX93 11X11 EVK board
> DRAM:  2 GiB
> Core:  188 devices, 24 uclasses, devicetree: separate
> WDT:   Started watchdog@4249 with servicing every 1000ms (40s timeout)
> MMC:   FSL_SDHC: 0, FSL_SDHC: 1
> Loading Environment from MMC... *** Warning - bad CRC, using default 
> environment
>
> In:serial@4438
> Out:   serial@4438
> Err:   serial@4438
> switch to partitions #0, OK
> mmc1 is current device
> Net:
> Warning: ethernet@428a (eth1) using random MAC address - 6a:c2:96:d2:68:a6
> eth0: ethernet@4289 [PRIME], eth1: ethernet@428a

Aren't the MAC address fuses programmed? Or are they not being read correctly?


Re: [PATCH] configs: imx8mp_beacon: Enable PCIe NVMe drives

2024-04-05 Thread Fabio Estevam
On Tue, Mar 26, 2024 at 6:25 PM Adam Ford  wrote:
>
> The baseboard supports and NVMe drives via the PCIe slot. This
> requires a few extra config options to be enabled.
>
> The NVMe can be enumerated with the following commands:
>
> u-boot=> pci enum
> PCIE-0: Link up (Gen1-x1, Bus0)
> u-boot=> nvme scan
> u-boot=> nvme info
> Device 0: Vendor: 0x15b7 Rev: 20120022 Prod: 184960441105
> Type: Hard Disk
> Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
> u-boot=>
>
> Signed-off-by: Adam Ford 

Applied, thanks.


Re: [PATCH v2] arm: imx: fix signature_block_hdr struct fields order

2024-04-05 Thread Fabio Estevam
On Thu, Apr 4, 2024 at 12:11 PM Javier Viguera  wrote:
>
> According to the documentation (for example NXP's AN13994 on encrypted
> boot on AHAB-enabled devices), the format of the signature block is:
>
>   +--+--+--+-+
>   | Tag  | Length - msb | Length - lsb | Version |
>   +--+--+--+-+
>   | SRK Table offset| Certificate offset |
>   +-++
>   | Blob offset | Signature offset   |
>   +-++
>
> There is no runtime error in the current u-boot code. The only user of
> struct signature_block_hdr is the "get_container_size" function in the
> "arch/arm/mach-imx/image-container.c" file, and it's only using the very
> first fields of the struct (which are in the correct position) and thus
> there is no runtime failure.
>
> On the other hand, extending the code to get the data encryption key
> blob offset on the signature header gives a wrong value as the field is
> in the wrong order.
>
> Signed-off-by: Javier Viguera 

Applied, thanks.


Re: [PATCH v1] verdin-imx8mm/verdin-imx8mp: move imx verdins to OF_UPSTREAM

2024-04-05 Thread Fabio Estevam
On Wed, Apr 3, 2024 at 4:16 AM Marcel Ziswiler  wrote:
>
> From: Marcel Ziswiler 
>
> Move verdin-imx8mm and verdin-imx8mp to OF_UPSTREAM:
> - handle the fact that dtbs now have a 'freescale/' prefix
> - imply OF_UPSTREAM
> - remove redundant files from arch/arm/dts leaving only the
>   *-u-boot.dtsi files
> - update MAINTAINERS files
>
> Signed-off-by: Marcel Ziswiler 

Applied, thanks.


Re: [PATCH v2 1/2] arm: imx9: Correct imx9_probe_mu prototype

2024-04-05 Thread Fabio Estevam
On Sun, Mar 31, 2024 at 10:41 PM Ye Li  wrote:
>
> Since the event callback imx9_probe_mu is re-defined, update
> its prototype.
>
> Signed-off-by: Ye Li 
> ---
> Changes in v2:
>  Fix imx93_var_som and phycore_imx93 as well

Applied both, thanks.


Re: [PATCH v2] mx6cuboxi: Fix Ethernet after DT sync with Linux

2024-04-05 Thread Fabio Estevam
On Sat, Mar 30, 2024 at 6:36 PM Fabio Estevam  wrote:
>
> From: Josua Mayer 
>
> The i.MX6 Cubox-i and HummingBoards can have different PHYs at varying
> addresses. U-Boot needs to auto-detect which phy is actually present,
> and at which address it is responding.
>
> Auto-detection from multiple phy nodes specified in device-tree does not
> currently work correct. As a work-around merge all three possible phys
> into one node with the special address 0x which indicates to the
> generic phy driver to probe all addresses.
>
> Signed-off-by: Josua Mayer 
> [fabio: Added the changes to imx6qdl-sr-som-u-boot.dtsi.]
> Signed-off-by: Fabio Estevam 
> Tested-by: Christian Gmeiner 

Applied, thanks.


Re: [PATCH v2] mx6cuboxi: Do not print devicetree model

2024-04-05 Thread Fabio Estevam
On Sat, Mar 30, 2024 at 6:03 PM Fabio Estevam  wrote:
>
> The mx6cuboxi_defconfig target supports several board
> variants. All of these variants use the hummingboard devicetree in U-Boot.
>
> Currently, the devicetree model as well as the board variant name
> are shown:
>
> ...
> Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
> Board: MX6 Cubox-i
> ...
>
> Printing the devicetree model that is used internally by U-Boot
> may confuse users.
>
> Unselect the CONFIG_DISPLAY_BOARDINFO option so that only the
> board name is printed in board_late_init() instead.
>
> Signed-off-by: Fabio Estevam 

Applied, thanks.


Re: [PATCH 1/3] arm64: imx: imx8mp-beacon: Migrate to OF_UPSTREAM

2024-04-05 Thread Fabio Estevam
On Wed, Apr 3, 2024 at 11:59 PM Adam Ford  wrote:
>
> The imx8mp-beacon boards can migrate to OF_UPSTREAM which also
> allows for the removal the device tree files.
>
> Signed-off-by: Adam Ford 

Applied, thanks.


Re: [PATCH] ARM: imx: stm32: Test whether ethernet node is enabled before reading MAC EEPROM on DHSOM

2024-04-05 Thread Fabio Estevam
On Tue, Mar 12, 2024 at 6:16 PM Marek Vasut  wrote:
>
> Check whether the ethernet interface is enabled at all before reading
> MAC EEPROM. As a cost saving measure, it can happen that the MAC EEPROM
> is not populated on SoMs which do not use ethernet.
>
> Signed-off-by: Marek Vasut 

Applied, thanks.


[GIT PULL] Please pull u-boot-imx-master-20240405

2024-04-05 Thread Fabio Estevam
Hi Tom,

Please pull this material for from u-boot-imx/master, thanks.

The following changes since commit cdfcc37428e06f4730ab9a17cc084eeb7676ea1a:

  Merge tag 'u-boot-dfu-next-20240402' of 
https://source.denx.de/u-boot/custodians/u-boot-dfu (2024-04-02 22:37:23 -0400)

are available in the Git repository at:

  https://gitlab.denx.de/u-boot/custodians/u-boot-imx.git 
tags/u-boot-imx-master-20240405

for you to fetch changes up to f6be41c83c17c09dddfb1e29a7ca391b5190634d:

  arm: imx: fix signature_block_hdr struct fields order (2024-04-05 09:39:18 
-0300)

u-boot-imx-master-20240405
--

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/20228

- Convert imx8mp-beacon and verdin-imx8mm/verdin-imx8mp to OF_UPSTREAM.
- Enable PCIe NVMe support on imx8mp_beacon.
- Fix Ethernet and board detection on mx6cuboxi.
- Fix signature_block_hdr struct fields.
- Fix imx9_probe_mu prototype and make it to get called in EVT_DM_POST_INIT_R.
- Test whether ethernet node is enabled before reading MAC EEPROM on DHSOM SoMs.

Adam Ford (4):
  arm64: imx: imx8mp-beacon: Migrate to OF_UPSTREAM
  arm64: imx: imx8mm-beacon: Migrate to OF_UPSTREAM
  arm64: imx: imx8mn-beacon: Migrate to OF_UPSTREAM
  configs: imx8mp_beacon: Enable PCIe NVMe drives

Fabio Estevam (1):
  mx6cuboxi: Do not print devicetree model

Javier Viguera (1):
  arm: imx: fix signature_block_hdr struct fields order

Josua Mayer (1):
  mx6cuboxi: Fix Ethernet after DT sync with Linux

Marcel Ziswiler (1):
  verdin-imx8mm/verdin-imx8mp: move imx verdins to OF_UPSTREAM

Marek Vasut (1):
  ARM: imx: stm32: Test whether ethernet node is enabled before reading MAC 
EEPROM on DHSOM

Ye Li (2):
  arm: imx9: Correct imx9_probe_mu prototype
  arm: imx9: Call imx9_probe_mu for DM post in board_r

 arch/arm/dts/Makefile  |5 -
 .../imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi |1 +
 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi|   49 +
 arch/arm/dts/imx8mm-beacon-kit.dts |   19 -
 arch/arm/dts/imx8mm-beacon-som.dtsi|  461 ---
 arch/arm/dts/imx8mm-verdin-dev.dtsi|  160 ---
 arch/arm/dts/imx8mm-verdin-wifi-dev.dts|   18 -
 arch/arm/dts/imx8mm-verdin-wifi.dtsi   |   94 --
 arch/arm/dts/imx8mm-verdin.dtsi| 1319 --
 arch/arm/dts/imx8mn-beacon-kit.dts |   19 -
 arch/arm/dts/imx8mn-beacon-som.dtsi|  472 ---
 arch/arm/dts/imx8mp-beacon-kit.dts |  783 ---
 arch/arm/dts/imx8mp-beacon-som.dtsi|  487 ---
 arch/arm/dts/imx8mp-verdin-dev.dtsi|  165 ---
 arch/arm/dts/imx8mp-verdin-wifi-dev.dts|   18 -
 arch/arm/dts/imx8mp-verdin-wifi.dtsi   |   87 --
 arch/arm/dts/imx8mp-verdin.dtsi| 1438 
 arch/arm/include/asm/arch-imx9/mu.h|2 +-
 arch/arm/mach-imx/imx8m/Kconfig|5 +
 arch/arm/mach-imx/imx9/soc.c   |1 +
 board/dhelectronics/common/dh_common.c |   16 +
 board/dhelectronics/common/dh_common.h |8 +
 board/dhelectronics/dh_imx6/dh_imx6.c  |3 +
 board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c  |6 +
 board/dhelectronics/dh_stm32mp1/board.c|6 +
 board/freescale/imx93_evk/spl.c|2 +-
 board/phytec/phycore_imx93/spl.c   |2 +-
 board/solidrun/mx6cuboxi/mx6cuboxi.c   |   40 +-
 board/toradex/verdin-imx8mm/MAINTAINERS|4 -
 board/toradex/verdin-imx8mp/MAINTAINERS|4 -
 board/variscite/imx93_var_som/spl.c|2 +-
 configs/imx8mm_beacon_defconfig|2 +-
 configs/imx8mm_beacon_fspi_defconfig   |2 +-
 configs/imx8mn_beacon_2g_defconfig |2 +-
 configs/imx8mn_beacon_defconfig|2 +-
 configs/imx8mn_beacon_fspi_defconfig   |2 +-
 configs/imx8mp_beacon_defconfig|8 +-
 configs/mx6cuboxi_defconfig|1 +
 configs/verdin-imx8mm_defconfig|2 +-
 configs/verdin-imx8mp_defconfig|2 +-
 include/imx_container.h|4 +-
 41 files changed, 124 insertions(+), 5599 deletions(-)
 create mode 100644 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi
 delete mode 100644 arch/arm/dts/imx8mm-beacon-kit.dts
 delete mode 100644 arch/arm/dts/imx8mm-beacon-som.dtsi
 delete mode 100644 arch/arm/dts/imx8mm-verdin-dev.dtsi
 delete mode 100644 arch/arm/dts/imx8mm-verdin-wifi-dev.dts
 delete mode 100644 arch/arm/dts/imx8mm-verdin-wifi.dtsi
 delete mode 100644 arch/arm/dts/imx8mm-verdin.dtsi
 delete mode 100644 arch/arm/dts/imx8mn-beacon

Re: [PATCH] arm: imx: fix signature_block_hdr struct fields order

2024-04-04 Thread Fabio Estevam
Hi Javier,

On Thu, Apr 4, 2024 at 8:58 AM Viguera, Javier  wrote:

> The struct has the fields in the wrong order according to other documentation 
> from NXP (see for example the AN13994 - Encrypted Boot on AHAB-enabled 
> devices).
>
> In the current upstream u-boot code there is NO runtime error, as those 
> fields are not being used. Only ' get_container_size`on  
> `arch/arm/mach-imx/image-container.c`  defines a variable of that type. But 
> then it only uses the "length_lsb" and "length_msb" fiels, which are at the 
> beginning of the struct and thus in the correct position.
>
> On the other hand, we were hit by this problem in some bootloader encryption 
> related code we do in our (as of Digi) BSP. We get the blob offset from the 
> signature block header to read the data encryption key blob and due to the 
> wrong order this patch fixes, we were getting a wrong position of the DEK 
> blob.
>
> Hope this clears it up a bit.

Thanks for the clarification.

Please put all this explanation into the commit log and send a v2.

Thanks


Re: [PATCH v2] mx6cuboxi: Fix Ethernet after DT sync with Linux

2024-04-01 Thread Fabio Estevam
Hi Tom,

On Mon, Apr 1, 2024 at 7:13 AM Christian Gmeiner  wrote:

> I am happy with the patch and love the idea to fix Ethernet for 2024.04.
>
> Tested-by: Christian Gmeiner 

Could you please pick this one directly for 2024.04?

It fixes an Ethernet regression on mx6cuboxi.

Christian has tested it on i.MX6 Cuboxi and I tested it on i.MX6 Hummingboard.

Thanks


Re: [PATCH v2] arm: imx9: Correct imx9_probe_mu prototype

2024-03-31 Thread Fabio Estevam
Hi Ye Li,

On Sun, Mar 31, 2024 at 10:33 PM Ye Li  wrote:
>
> Since the event callback imx9_probe_mu is re-defined, update
> its prototype.
>
> Signed-off-by: Ye Li 
> ---
> Changes in v2:
>  Fix imx93_var_som and phycore_imx93 as well

Thanks for the fix, but please submit it as part of a series along with
[PATCH 2/2] arm: imx9: Call imx9_probe_mu for DM post in board_r
that you have sent previously.


[PATCH v2] mx6cuboxi: Fix Ethernet after DT sync with Linux

2024-03-30 Thread Fabio Estevam
From: Josua Mayer 

The i.MX6 Cubox-i and HummingBoards can have different PHYs at varying
addresses. U-Boot needs to auto-detect which phy is actually present,
and at which address it is responding.

Auto-detection from multiple phy nodes specified in device-tree does not
currently work correct. As a work-around merge all three possible phys
into one node with the special address 0x which indicates to the
generic phy driver to probe all addresses.

Signed-off-by: Josua Mayer 
[fabio: Added the changes to imx6qdl-sr-som-u-boot.dtsi.]
Signed-off-by: Fabio Estevam 
Tested-by: Christian Gmeiner 
---
Changes since v1:
- Disable ethernet-phy at addresses 0, 1 and 4.
- Remove the fixup of the fake 0xff address before booting Linux.

Josua and Christian,

I got access to a imx6 humming board and I was able to test it.

This is the minimal fix I came up based on your suggestions.

There is no need to fixup of the fake 0xff address before booting Linux,
as this fake address does not exist in Linux.

Successfully tested Ethernet in U-Boot and in the kernel.

Given that Ethernet is currently broken, I suggest we go with this
version to restore Ethernet for 2024.04.

What do you think?

 ...qdl-hummingboard2-emmc-som-v15-u-boot.dtsi |  1 +
 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi   | 49 +++
 2 files changed, 50 insertions(+)
 create mode 100644 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi

diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi 
b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
index e9b188ed6587..358cf8abc4ff 100644
--- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include "imx6qdl-u-boot.dtsi"
+#include "imx6qdl-sr-som-u-boot.dtsi"
 
 / {
board-detect {
diff --git a/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi 
b/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi
new file mode 100644
index ..0bd7df02dd66
--- /dev/null
+++ b/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+#include 
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_microsom_enet_ar8035>;
+   phy-handle = <>;
+   phy-mode = "rgmii-id";
+
+   /*
+* The PHY seems to require a long-enough reset duration to avoid
+* some rare issues where the PHY gets stuck in an inconsistent and
+* non-functional state at boot-up. 10ms proved to be fine .
+*/
+   phy-reset-duration = <10>;
+   phy-reset-gpios = < 15 GPIO_ACTIVE_LOW>;
+   status = "okay";
+
+   mdio {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   ethernet-phy@0 {
+   status = "disabled";
+   };
+
+   ethernet-phy@1 {
+   status = "disabled";
+   };
+
+   ethernet-phy@4 {
+   status = "disabled";
+   };
+
+   phy: ethernet-phy@ {
+   /*
+* The PHY can appear either:
+* - AR8035: at address 0 or 4
+* - ADIN1300: at address 1
+* Actual address being detected at runtime.
+*/
+   reg = <0x>;
+   qca,clk-out-frequency = <12500>;
+   qca,smarteee-tw-us-1g = <24>;
+   adi,phy-output-clock = "125mhz-free-running";
+   };
+   };
+};
-- 
2.34.1



[PATCH v2] mx6cuboxi: Do not print devicetree model

2024-03-30 Thread Fabio Estevam
The mx6cuboxi_defconfig target supports several board
variants. All of these variants use the hummingboard devicetree in U-Boot.

Currently, the devicetree model as well as the board variant name
are shown:

...
Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
Board: MX6 Cubox-i
...

Printing the devicetree model that is used internally by U-Boot
may confuse users.

Unselect the CONFIG_DISPLAY_BOARDINFO option so that only the
board name is printed in board_late_init() instead.

Signed-off-by: Fabio Estevam 
---
Changes since v1:
- Remove checkboard and print the board name in board_late_init().

 board/solidrun/mx6cuboxi/mx6cuboxi.c | 40 ++--
 configs/mx6cuboxi_defconfig  |  1 +
 2 files changed, 9 insertions(+), 32 deletions(-)

diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c 
b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 8edabf4404c2..31d30cfbbd7b 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -381,37 +381,6 @@ static bool has_emmc(void)
return (mmc_get_op_cond(mmc, true) < 0) ? 0 : 1;
 }
 
-/* Override the default implementation, DT model is not accurate */
-int checkboard(void)
-{
-   request_detect_gpios();
-
-   switch (board_type()) {
-   case CUBOXI:
-   puts("Board: MX6 Cubox-i");
-   break;
-   case HUMMINGBOARD:
-   puts("Board: MX6 HummingBoard");
-   break;
-   case HUMMINGBOARD2:
-   puts("Board: MX6 HummingBoard2");
-   break;
-   case UNKNOWN:
-   default:
-   puts("Board: Unknown\n");
-   goto out;
-   }
-
-   if (is_rev_15_som())
-   puts(" (som rev 1.5)\n");
-   else
-   puts("\n");
-
-   free_detect_gpios();
-out:
-   return 0;
-}
-
 static int find_ethernet_phy(void)
 {
struct mii_dev *bus = NULL;
@@ -505,12 +474,15 @@ int board_late_init(void)
switch (board_type()) {
case CUBOXI:
env_set("board_name", "CUBOXI");
+   puts("Board: MX6 Cubox-i");
break;
case HUMMINGBOARD:
env_set("board_name", "HUMMINGBOARD");
+   puts("Board: MX6 HummingBoard");
break;
case HUMMINGBOARD2:
env_set("board_name", "HUMMINGBOARD2");
+   puts("Board: MX6 HummingBoard2");
break;
case UNKNOWN:
default:
@@ -522,8 +494,12 @@ int board_late_init(void)
else
env_set("board_rev", "MX6DL");
 
-   if (is_rev_15_som())
+   if (is_rev_15_som()) {
env_set("som_rev", "V15");
+   puts(" (som rev 1.5)\n");
+   } else {
+   puts("\n");
+   }
 
if (has_emmc())
env_set("has_emmc", "yes");
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 27ceb22599a6..e3aba715aa58 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -28,6 +28,7 @@ CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run 
distro_bootcmd"
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="if hdmidet; then usb start; setenv stdin  serial,usbkbd; 
setenv stdout serial,vidconsole; setenv stderr serial,vidconsole; else setenv 
stdin  serial; setenv stdout serial; setenv stderr serial; fi;"
 CONFIG_SYS_PBSIZE=532
+# CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_SYS_MALLOC=y
 CONFIG_SPL_FS_EXT4=y
-- 
2.34.1



Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-30 Thread Fabio Estevam
Hi Tom,

On Mon, Mar 25, 2024 at 5:37 PM Hiago De Franco  wrote:

> > How much testing has this seen outside of imx?
>
> Tom, I tested with the AM62 TI arm processor (Toradex Verdin AM62) and
> it works fine.

Do you think this one can be applied to next?

Then we would have time for more testing until 2024.07.


Re: [PATCH] net: fec_mxc: Avoid enable regulator failure

2024-03-30 Thread Fabio Estevam
On Thu, Mar 28, 2024 at 7:58 AM Ye Li  wrote:
>
> Change to regulator_set_enable_if_allowed to avoid enable failure,
> in case same phy supply shared by multiple FEC controllers.
>
> Signed-off-by: Ye Li 

Applied to u-boot-imx/next, thanks.


Re: [PATCH] arm: imx: Fix incorrect return value

2024-03-30 Thread Fabio Estevam
On Thu, Mar 28, 2024 at 7:51 AM Ye Li  wrote:
>
> The spl_spi_get_uboot_offs weak function is defined unsigned int.
>
> Signed-off-by: Ye Li 

The original Subject is too generic, I changed it to:

image-container: Fix incorrect return value

Applied to u-boot-imx/next, thanks.


Re: [PATCH] thermal: imx_tmu: Fix TMU error on iMX8MQ

2024-03-30 Thread Fabio Estevam
On Thu, Mar 28, 2024 at 7:50 AM Ye Li  wrote:
>
> imx_tmu_arch_init does not implement for iMX8MQ, error is returned
>
> Signed-off-by: Ye Li 

Applied to u-boot-imx/next, thanks.


Re: [PATCH] arm: imx9: Fix MMU map table overlap

2024-03-30 Thread Fabio Estevam
On Thu, Mar 28, 2024 at 7:49 AM Ye Li  wrote:
>
> The size for flexspi AHB buffer space is wrong, so correct it.
>
> Signed-off-by: Ye Li 

Applied to u-boot-imx/next, thanks.


Re: [PATCH v2 0/3] crypto/fsl: allow accessing Job Ring from non-TrustZone

2024-03-30 Thread Fabio Estevam
On Thu, Mar 28, 2024 at 7:18 AM Emanuele Ghidoli
 wrote:
>
> From: Emanuele Ghidoli 
>
> This series allows using Freescale CAAM Job Ring from Linux without having 
> OP-TEE,
> this is needed for example on Toradex Colibri iMX7 where we just have U-Boot 
> + Linux kernel.
>
> To achieve this add a new config option to allow the non-secure world to 
> access job rings.
>
> The functionality has been broken since U-Boot v2019.07, with commit 
> 51f1357f3428
> ("Revert "drivers/crypto/fsl: assign job-rings to non-TrustZone"")
>
> Link: 
> https://lore.kernel.org/all/4b64a9de-a840-4065-a530-f81155b4b...@toradex.com/
>
> ---
> v2:
>  * Kconfig: spelt "CAAM" instead of caam
>  * Kconfig: removed "default=n"
> v1: 
> https://lore.kernel.org/all/20240325114642.3664840-1-ghidoliemanu...@gmail.com/

Applied to u-boot-imx/next, thanks.


Re: [PATCH v2 0/4] imx8m: convert i.MX8MM/Q/N/P-EVK to OF_UPSTREAM

2024-03-30 Thread Fabio Estevam
On Wed, Mar 27, 2024 at 10:46 PM Peng Fan (OSS)  wrote:
>
> This patchset is to convert NXP i.MX8M[Q,M,N,P] EVK boards to
> OF_UPSTREAM
>
> Signed-off-by: Peng Fan 
> ---
> Changes in v2:
> - Sorry for the quick respin.
> - Drop the dtb build in arch/arm/dts/Makefile
> - Link to v1: 
> https://lore.kernel.org/r/20240328-imx8m-v1-0-2be5e6657...@nxp.com

Applied to u-boot-imx/next, thanks.


Re: [PATCH v1] board: toradex: colibri-imx8x: Remove board_gpio_init

2024-03-30 Thread Fabio Estevam
On Wed, Mar 27, 2024 at 9:46 AM Hiago De Franco  wrote:
>
> From: Hiago De Franco 
>
> On Colibri iMX8X, the gpio initialization and usage should be handled by
> the device tree, not by the colibri-imx8x.c code. Therefore, remove it.
>
> Signed-off-by: Hiago De Franco 

Applied to u-boot-imx/next, thanks.


Re: [PATCH] imx8: Add a default reset_cpu() implementation

2024-03-30 Thread Fabio Estevam
On Tue, Mar 26, 2024 at 9:19 AM Fabio Estevam  wrote:
>
> From: Fabio Estevam 
>
> Add a weak default reset_cpu() implementation just like
> it is done on arch/arm/mach-imx/cpu.c.
>
> This allows the removal of the empty reset_cpu() in several
> board files.
>
> Signed-off-by: Fabio Estevam 

Applied to u-boot-imx/next, thanks.


Re: [PATCH] arm: dts: imx8m*-venice-gw72xx: add TPM device

2024-03-30 Thread Fabio Estevam
On Mon, Mar 25, 2024 at 1:27 PM Tim Harvey  wrote:
>
> The GW71xx baseboard has a TPM that defined in the upstream dt however
> we need to ensure the GPIO reset line is de-asserted which we do in boot
> firmware with a gpio hog.
>
> Signed-off-by: Tim Harvey 

Applied to u-boot-imx/next, thanks.


Re: [PATCH] arm: dts: imx8mm-venice-gw7901: add digital I/O direction control GPIO's

2024-03-30 Thread Fabio Estevam
On Mon, Mar 25, 2024 at 1:27 PM Tim Harvey  wrote:
>
> The GW7901 has GPIO's to configure the direction of its isolated
> digital I/O signals. Add the GPIO pinmux, line names, and hog
> configuration.
>
> Signed-off-by: Tim Harvey 

Applied to u-boot-imx/next, thanks.


Re: [PATCH] phycore_pcl063: Drop leading zero from USB vendor number

2024-03-30 Thread Fabio Estevam
On Mon, Mar 25, 2024 at 10:52 AM Fabio Estevam  wrote:
>
> CONFIG_USB_GADGET_VENDOR_NUM is a 16-bit number, so remove
> the leading zero.
>
> Reported-by: Marek Vasut 
> Signed-off-by: Fabio Estevam 

Applied to u-boot-imx/next, thanks.


Re: [PATCH] imx8mq_evk: Remove FEC and Ethernet PHY board code

2024-03-30 Thread Fabio Estevam
On Thu, Mar 28, 2024 at 3:43 PM Fabio Estevam  wrote:
>
> With Ethernet DM in place, there is no longer the need for having
> the board_phy_config() and setup_fec() functions anymore.
>
> Remove them.
>
> Successfully tested a TFTP transfer after these changes.
>
> Signed-off-by: Fabio Estevam 

Applied to u-boot-imx/next, thanks.


Re: [PATCH 0/4] arm: xea: Provide enhancements for XEA board

2024-03-30 Thread Fabio Estevam
On Fri, Mar 29, 2024 at 8:18 AM Lukasz Majewski  wrote:
>
>
> This patch series is a preparatory patch for supporting
> different versions of XEA board HW (until problem with
> Linux kernel support for multiple revisions is resorted).
>
> Moreover, limits for u-boot.sb and u-boot.img has been set
> to avoid binary sizes exceeding in the future.
>
> Changes in v2:
> Remove "inline" from get_som_rev() function definition
> Squash with 'config: xea: Enable late board initialization to set revision 
> variable'
> Update commit message
> Squash with 'arm: xea: Print information about XEA's SoM HW revision'

Next time, please properly mark the patch revision (v2, v3, etc).

Applied, thanks.


[GIT PULL] Please pull u-boot-imx-next-20240330

2024-03-30 Thread Fabio Estevam
Hi Tom,

Please pull this material for next from u-boot-imx, thanks.

The following changes since commit 6e2228fb052b68c84688d5baff06e2ebc787a4a5:

  Merge patch series "Clean up arm linker scripts" (2024-03-29 10:39:38 -0400)

are available in the Git repository at:

  https://gitlab.denx.de/u-boot/custodians/u-boot-imx.git 
tags/u-boot-imx-next-20240330

for you to fetch changes up to f21b3e2cd954634d405fb522198d099879f3f1e7:

  config: xea: Add limits for SPL and u-boot proper sizes (2024-03-30 15:12:22 
-0300)

u-boot-imx-next-20240330
--

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/20128

- Allow accessing job-rings from non-TrustZone on colibri-imx7.
- Add support for reading XEA hardware revision.
- Convert imx8mq/8mm/8mn/8mp-evk to OF_UPSTREAM.
- Add TMP support on imx8m*-venice-gw72xx.
- Miscellaneous fixes and improvements.

Emanuele Ghidoli (3):
  crypto/fsl: allow accessing Job Ring from non-TrustZone
  configs: colibri-imx7: set non-secure boot mode as default
  configs: colibri-imx7: allow accessing job-rings from non-TrustZone

Fabio Estevam (3):
  phycore_pcl063: Drop leading zero from USB vendor number
  imx8: Add a default reset_cpu() implementation
  imx8mq_evk: Remove FEC and Ethernet PHY board code

Hiago De Franco (1):
  board: toradex: colibri-imx8x: Remove board_gpio_init

Lukasz Majewski (4):
  arm: spl: xea: Remove I2S pins configuration from early initialization
  arm: spl: Add definition for PHY reset GPIO for XEA HW rev. 2
  arm: xea: Add support for reading SoM (CPU) board HW revision
  config: xea: Add limits for SPL and u-boot proper sizes

Peng Fan (4):
  imx: imx8mq_evk: convert to OF_UPSTREAM
  imx: imx8mm_evk: convert to OF_UPSTREAM
  imx: imx8mn-evk: convert to OF_UPSTREAM
  imx: imx8mp_evk: convert to OF_UPSTREAM

Tim Harvey (2):
  arm: dts: imx8mm-venice-gw7901: add digital I/O direction control GPIO's
  arm: dts: imx8m*-venice-gw72xx: add TPM device

Ye Li (4):
  arm: imx9: Fix MMU map table overlap
  thermal: imx_tmu: Fix TMU error on iMX8MQ
  image-container: Fix incorrect return value
  net: fec_mxc: Avoid enable regulator failure

 arch/arm/dts/Makefile  |   5 -
 arch/arm/dts/imx8mm-evk.dts| 128 
 arch/arm/dts/imx8mm-evk.dtsi   | 615 --
 arch/arm/dts/imx8mm-venice-gw71xx-0x-u-boot.dtsi   |   7 +
 arch/arm/dts/imx8mm-venice-gw7901-u-boot.dtsi  |  14 +
 arch/arm/dts/imx8mn-ddr4-evk.dts   | 160 -
 arch/arm/dts/imx8mn-evk.dts| 128 
 arch/arm/dts/imx8mp-evk.dts| 684 
 arch/arm/dts/imx8mp-venice-gw71xx-2x-u-boot.dtsi   |   9 +
 arch/arm/dts/imx8mq-evk.dts| 712 -
 arch/arm/mach-imx/image-container.c|   2 +-
 arch/arm/mach-imx/imx8/cpu.c   |   4 +
 arch/arm/mach-imx/imx8m/Kconfig|   5 +
 arch/arm/mach-imx/imx9/soc.c   |   2 +-
 .../imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c  |  11 -
 .../imx8qm_rom7720_a1/imx8qm_rom7720_a1.c  |   8 -
 board/congatec/cgtqmx8/cgtqmx8.c   |   7 -
 board/freescale/imx8mq_evk/imx8mq_evk.c|  30 -
 board/freescale/imx8qm_mek/imx8qm_mek.c|   8 -
 board/freescale/imx8qxp_mek/imx8qxp_mek.c  |   8 -
 board/liebherr/xea/spl_xea.c   |  21 +-
 board/liebherr/xea/xea.c   |  49 ++
 board/toradex/apalis-imx8/apalis-imx8.c|   8 -
 board/toradex/colibri-imx8x/colibri-imx8x.c|  19 -
 configs/colibri_imx7_defconfig |   1 +
 configs/colibri_imx7_emmc_defconfig|   2 +-
 configs/imx28_xea_defconfig|   4 +
 configs/imx28_xea_sb_defconfig |   1 +
 configs/imx8mm_evk_defconfig   |   2 +-
 configs/imx8mm_evk_fspi_defconfig  |   2 +-
 configs/imx8mn_ddr4_evk_defconfig  |   2 +-
 configs/imx8mn_evk_defconfig   |   2 +-
 configs/imx8mp_evk_defconfig   |   2 +-
 configs/imx8mq_evk_defconfig   |   2 +-
 configs/phycore_pcl063_defconfig   |   2 +-
 configs/phycore_pcl063_ull_defconfig   |   2 +-
 drivers/crypto/fsl/Kconfig |   6 +
 drivers/crypto/fsl/jr.c|  19 +
 drivers/crypto/fsl/jr.h|   2 +
 drivers/net/fec_mxc.c  |   2 +-
 drivers/thermal/imx_tmu.c  |   3 +
 41 files changed, 149 insertions(+), 2551 deletions(-)
 delete mode 100644 arch/arm/dts/imx8mm-evk.dts
 delete mode 100644 arch/arm/

Re: [PATCH 1/2] arm: imx9: Correct imx9_probe_mu prototype

2024-03-30 Thread Fabio Estevam
On Thu, Mar 28, 2024 at 7:48 AM Ye Li  wrote:

> -   ret = imx9_probe_mu(NULL, NULL);
> +   ret = imx9_probe_mu();

This series breaks the build because you missed updating phycore_imx93 and
imx93_var_som:

board/phytec/phycore_imx93/spl.c:   ret = imx9_probe_mu(NULL, NULL);
board/variscite/imx93_var_som/spl.c:ret = imx9_probe_mu(NULL, NULL);

Please fix and resend.


Re: [PATCH] mx6cuboxi: Convert to watchdog driver model

2024-03-30 Thread Fabio Estevam
On Wed, Mar 27, 2024 at 11:19 AM Fabio Estevam  wrote:
>
> Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
> the 'reset' command in U-Boot to not cause a board reset.
>
> Fix it by switching to the watchdog driver model via sysreset, which
> is the preferred method for implementing the watchdog reset.
>
> Signed-off-by: Fabio Estevam 

Applied, thanks.


Re: [PATCH] warp7: Convert to watchdog driver model

2024-03-30 Thread Fabio Estevam
On Wed, Mar 27, 2024 at 10:46 AM Fabio Estevam  wrote:
>
> Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
> the 'reset' command in U-Boot to not cause a board reset.
>
> Fix it by switching to the watchdog driver model via sysreset, which
> is the preferred method for implementing the watchdog reset.
>
> Signed-off-by: Fabio Estevam 

Applied, thanks.


Re: [PATCH] mx6cuboxi: Fix board revision detection

2024-03-30 Thread Fabio Estevam
On Wed, Mar 27, 2024 at 8:50 AM Fabio Estevam  wrote:
>
> Currently, an i.MX6 Cuboxi board is incorrectly detected
> as the HummingBoard model:
>
> U-Boot 2024.04-rc5 (Mar 26 2024 - 15:59:22 +0100)
>
> CPU:   Freescale i.MX6Q rev1.3 996 MHz (running at 792 MHz)
> CPU:   Extended Commercial temperature grade (-20C to 105C) at 26C
> Reset cause: POR
> Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
> gpio@20a4000: set_dir_flags: error: gpio GPIO3_8 not reserved
> gpio@20a4000: get_value: error: gpio GPIO3_8 not reserved
> gpio@20a8000: set_dir_flags: error: gpio GPIO4_4 not reserved
> gpio@20a8000: get_value: error: gpio GPIO4_4 not reserved
> gpio@20b: set_dir_flags: error: gpio GPIO6_9 not reserved
> gpio@20b: get_value: error: gpio GPIO6_9 not reserved
> Board: MX6 HummingBoard
> DRAM:  2 GiB
> ...
>
> This error happens because request_detect_gpios() uses the GPIO DM
> API, but board_type() still uses the legacy non-DM GPIO API.
>
> Fix it by using the GPIO DM API in board_type() to read the
> board revision pins in SPL.
>
> Reported-by: Christian Gmeiner 
> Signed-off-by: Fabio Estevam 

Applied, thanks.


[GIT PULL] Please pull u-boot-imx-master-20240330

2024-03-30 Thread Fabio Estevam
Hi Tom,

Please pull the following fixes from u-boot-master-imx, thanks.

The following changes since commit 9468bf3a69b05bda05adb06f954b089ace301afc:

  Merge tag 'doc-2024-04-rc6' of 
https://source.denx.de/u-boot/custodians/u-boot-efi (2024-03-28 16:01:03 -0400)

are available in the Git repository at:

  https://gitlab.denx.de/u-boot/custodians/u-boot-imx.git 
tags/u-boot-imx-master-20240330

for you to fetch changes up to fc07cac02adebc87b69cd82f6ca6f0283d11cd5a:

  mx6cuboxi: Convert to watchdog driver model (2024-03-30 09:49:53 -0300)

u-boot-imx-master-20240330
--

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/20122

- Fix reset regression on mx6cuboxi and warp7.
- Fix Fix board revision detection on mx6cuboxi.

Fabio Estevam (3):
  mx6cuboxi: Fix board revision detection
  warp7: Convert to watchdog driver model
  mx6cuboxi: Convert to watchdog driver model

 arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi | 10 ++
 arch/arm/dts/imx7s-warp-u-boot.dtsi | 10 ++
 board/solidrun/mx6cuboxi/mx6cuboxi.c| 13 +
 configs/mx6cuboxi_defconfig |  3 +++
 configs/warp7_defconfig |  3 +++
 5 files changed, 31 insertions(+), 8 deletions(-)


[PATCH] imx8mq_evk: Remove FEC and Ethernet PHY board code

2024-03-28 Thread Fabio Estevam
With Ethernet DM in place, there is no longer the need for having
the board_phy_config() and setup_fec() functions anymore.

Remove them.

Successfully tested a TFTP transfer after these changes.

Signed-off-by: Fabio Estevam 
---
 board/freescale/imx8mq_evk/imx8mq_evk.c | 30 -
 1 file changed, 30 deletions(-)

diff --git a/board/freescale/imx8mq_evk/imx8mq_evk.c 
b/board/freescale/imx8mq_evk/imx8mq_evk.c
index e39480585609..e577e4d9ccaa 100644
--- a/board/freescale/imx8mq_evk/imx8mq_evk.c
+++ b/board/freescale/imx8mq_evk/imx8mq_evk.c
@@ -54,38 +54,8 @@ int board_early_init_f(void)
return 0;
 }
 
-#ifdef CONFIG_FEC_MXC
-static int setup_fec(void)
-{
-   struct iomuxc_gpr_base_regs *gpr =
-   (struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR;
-
-   /* Use 125M anatop REF_CLK1 for ENET1, not from external */
-   clrsetbits_le32(>gpr[1], BIT(13) | BIT(17), 0);
-   return set_clk_enet(ENET_125MHZ);
-}
-
-int board_phy_config(struct phy_device *phydev)
-{
-   /* enable rgmii rxc skew and phy mode select to RGMII copper */
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x1f);
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x8);
-
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05);
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100);
-
-   if (phydev->drv->config)
-   phydev->drv->config(phydev);
-   return 0;
-}
-#endif
-
 int board_init(void)
 {
-#ifdef CONFIG_FEC_MXC
-   setup_fec();
-#endif
-
 #if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_DWC3)
init_usb_clk();
 #endif
-- 
2.34.1



Re: [PATCH 2/6] arm: xea: Add support for reading SoM (CPU) and base board HW revision

2024-03-28 Thread Fabio Estevam
Hi Lukasz,

On Thu, Mar 28, 2024 at 12:34 PM Lukasz Majewski  wrote:

> +static inline u8 get_som_rev(void)

There is no need for 'inline' here.

Also, get_som_rev() is only used 5/6, so I suggest to squash this
patch with 5/6.

Besides that, the series looks good.


Re: [PATCH] mx6cuboxi: Do not print devicetree model

2024-03-28 Thread Fabio Estevam
Hi Christian,

On Thu, Mar 28, 2024 at 4:18 AM Christian Gmeiner  wrote:

> This is not what this patch is doing. show_board_info() is the only
> caller of checkboard()
> so we end with the following output:

You're right. The attached patch should do what we want.
From b74a410127cabc100a8993840a3b00d403a316ad Mon Sep 17 00:00:00 2001
From: Fabio Estevam 
Date: Thu, 28 Mar 2024 10:39:29 -0300
Subject: [PATCH v2] mx6cuboxi: Do not print devicetree model

The mx6cuboxi_defconfig target supports several board
variants. All of these variants use the hummingboard devicetree in U-Boot.

Currently, the devicetree model as well as the board variant name
are shown:

...
Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
Board: MX6 Cubox-i
...

Printing the devicetree model that is used internally by U-Boot
may confuse users.

Unselect the CONFIG_DISPLAY_BOARDINFO option so that only the
board name is printed in board_late_init() instead.

Signed-off-by: Fabio Estevam 
---
Changes since v1:
- Remove checkboard and print the board name in board_late_init().

 board/solidrun/mx6cuboxi/mx6cuboxi.c | 40 ++--
 configs/mx6cuboxi_defconfig  |  1 +
 2 files changed, 9 insertions(+), 32 deletions(-)

diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 8edabf4404c2..31d30cfbbd7b 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -381,37 +381,6 @@ static bool has_emmc(void)
 	return (mmc_get_op_cond(mmc, true) < 0) ? 0 : 1;
 }
 
-/* Override the default implementation, DT model is not accurate */
-int checkboard(void)
-{
-	request_detect_gpios();
-
-	switch (board_type()) {
-	case CUBOXI:
-		puts("Board: MX6 Cubox-i");
-		break;
-	case HUMMINGBOARD:
-		puts("Board: MX6 HummingBoard");
-		break;
-	case HUMMINGBOARD2:
-		puts("Board: MX6 HummingBoard2");
-		break;
-	case UNKNOWN:
-	default:
-		puts("Board: Unknown\n");
-		goto out;
-	}
-
-	if (is_rev_15_som())
-		puts(" (som rev 1.5)\n");
-	else
-		puts("\n");
-
-	free_detect_gpios();
-out:
-	return 0;
-}
-
 static int find_ethernet_phy(void)
 {
 	struct mii_dev *bus = NULL;
@@ -505,12 +474,15 @@ int board_late_init(void)
 	switch (board_type()) {
 	case CUBOXI:
 		env_set("board_name", "CUBOXI");
+		puts("Board: MX6 Cubox-i");
 		break;
 	case HUMMINGBOARD:
 		env_set("board_name", "HUMMINGBOARD");
+		puts("Board: MX6 HummingBoard");
 		break;
 	case HUMMINGBOARD2:
 		env_set("board_name", "HUMMINGBOARD2");
+		puts("Board: MX6 HummingBoard2");
 		break;
 	case UNKNOWN:
 	default:
@@ -522,8 +494,12 @@ int board_late_init(void)
 	else
 		env_set("board_rev", "MX6DL");
 
-	if (is_rev_15_som())
+	if (is_rev_15_som()) {
 		env_set("som_rev", "V15");
+		puts(" (som rev 1.5)\n");
+	} else {
+		puts("\n");
+	}
 
 	if (has_emmc())
 		env_set("has_emmc", "yes");
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 27ceb22599a6..e3aba715aa58 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -28,6 +28,7 @@ CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="if hdmidet; then usb start; setenv stdin  serial,usbkbd; setenv stdout serial,vidconsole; setenv stderr serial,vidconsole; else setenv stdin  serial; setenv stdout serial; setenv stderr serial; fi;"
 CONFIG_SYS_PBSIZE=532
+# CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_SYS_MALLOC=y
 CONFIG_SPL_FS_EXT4=y
-- 
2.34.1



Re: [PATCH] mx6cuboxi: Fix Ethernet after DT sync with Linux

2024-03-28 Thread Fabio Estevam
Hi Josua,

On Thu, Mar 28, 2024 at 10:03 AM Josua Mayer  wrote:

> I suggest changing their status to disabled, and keeping the nodes.
> >> +
> >> +phy: ethernet-phy@0 {
> > This node name is shared with upstream imx6qdl-sr-som.dtsi
> Give this one a u-boot-only internal name, maybe ethernet-phy@ff
...
> Just disable the u-boot-internal phy node unconditionally, or delete it.
> Because u-boot DTB is synced with upstream, the code below will update status 
> properties
> for the standard etherent-phy@[0,1,4] nodes used by Linux.

Thanks for the suggestions.

My imx6-cuboxi board does not turn on anymore, unfortunately.

As I cannot test it, I am not comfortable doing the changes.

I hope you or Christian can submit a proper fix.


[PATCH] mx6cuboxi: Fix Ethernet after DT sync with Linux

2024-03-28 Thread Fabio Estevam
From: Josua Mayer 

The i.MX6 Cubox-i and HummingBoards can have different PHYs at varying
addresses. U-Boot needs to auto-detect which phy is actually present,
and at which address it is responding.

Auto-detection from multiple phy nodes specified in device-tree does not
currently work correct. As a work-around merge all three possible phys
into one node with the special address 0x which indicates to the
generic phy driver to probe all addresses.
Also fixup this fake address before booting Linux, *if* booting with
U-Boot's internal dtb.

Signed-off-by: Josua Mayer 
[fabio: Added the changes to imx6qdl-sr-som-u-boot.dtsi.]
Signed-off-by: Fabio Estevam 
Tested-by: Christian Gmeiner 
---
 ...qdl-hummingboard2-emmc-som-v15-u-boot.dtsi |  1 +
 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi   | 40 +++
 board/solidrun/mx6cuboxi/mx6cuboxi.c  |  8 +++-
 3 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi

diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi 
b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
index e9b188ed6587..358cf8abc4ff 100644
--- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include "imx6qdl-u-boot.dtsi"
+#include "imx6qdl-sr-som-u-boot.dtsi"
 
 / {
board-detect {
diff --git a/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi 
b/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi
new file mode 100644
index ..4c5f043ea92a
--- /dev/null
+++ b/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+#include 
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_microsom_enet_ar8035>;
+   phy-handle = <>;
+   phy-mode = "rgmii-id";
+
+   /*
+* The PHY seems to require a long-enough reset duration to avoid
+* some rare issues where the PHY gets stuck in an inconsistent and
+* non-functional state at boot-up. 10ms proved to be fine .
+*/
+   phy-reset-duration = <10>;
+   phy-reset-gpios = < 15 GPIO_ACTIVE_LOW>;
+   status = "okay";
+
+   mdio {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   /delete-node/ ethernet-phy@1;
+   /delete-node/ ethernet-phy@4;
+
+   phy: ethernet-phy@0 {
+   /*
+* The PHY can appear either:
+* - AR8035: at address 0 or 4
+* - ADIN1300: at address 1
+* Actual address being detected at runtime.
+*/
+   reg = <0x>;
+   qca,clk-out-frequency = <12500>;
+   qca,smarteee-tw-us-1g = <24>;
+   adi,phy-output-clock = "125mhz-free-running";
+   };
+   };
+};
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c 
b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 8edabf4404c2..fbab39e800a6 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -447,7 +447,7 @@ static int find_ethernet_phy(void)
  */
 int ft_board_setup(void *fdt, struct bd_info *bd)
 {
-   int node_phy0, node_phy1, node_phy4;
+   int node_phy, node_phy0, node_phy1, node_phy4;
int ret, phy;
bool enable_phy0 = false, enable_phy1 = false, enable_phy4 = false;
enum board_type board;
@@ -479,6 +479,12 @@ int ft_board_setup(void *fdt, struct bd_info *bd)
return 0;
}
 
+   // update U-Boot's own unified phy node phy address, if present
+   node_phy = fdt_path_offset(fdt, 
"/soc/bus@210/ethernet@2188000/mdio/phy");
+   ret = fdt_setprop_u32(fdt, node_phy, "reg", phy);
+   if (ret < 0)
+   pr_err("%s: failed to update unified PHY node address\n", 
__func__);
+
// update all phy nodes status
node_phy0 = fdt_path_offset(fdt, 
"/soc/bus@210/ethernet@2188000/mdio/ethernet-phy@0");
ret = fdt_setprop_string(fdt, node_phy0, "status", enable_phy0 ? "okay" 
: "disabled");
-- 
2.34.1



Re: Thoughts about U-boot binary size increase

2024-03-28 Thread Fabio Estevam
Hi Lukasz,

On Thu, Mar 28, 2024 at 6:20 AM Lukasz Majewski  wrote:
>
> Dear Community,
>
> I'd like to share with you some thoughts about growth of u-boot's
> binary size for SPL and u-boot proper.
>
> Board: XEA
> SoC  : imx287 (still in active production)
> Problem: SPL size constrained to ~55 KiB (This cannot be exceeded).
>  Board design constraints u-boot proper size to less than ~448
>  KiB
>
>
> When XEA was added (2019.07):
> - u-boot.sb (SPL): 37 KiB
> - u-boot.img : 401 KiB
>
> Now (2024.04):
> - u-boot.sb (SPL): 40 KiB
> - u-boot.img : 427 KiB
>
> (With a _lot_ of effort put to reduce the size)
>
> Hence, the question - would it be possible to take more concern about
> the binary size growth?
>
> Maybe CI could catch patches, which enable by default some features and
> the size is unintentionally increased?
>
> I'm open for any feedback and thoughts on "stopping" the binary size
> increase.

In addition to adding CONFIG_BOARD_SIZE_LIMIT and CONFIG_SPL_SIZE_LIMIT checks,
could you try the change below?

diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig
index d2e4205c5ce5..ee8c23d0e04f 100644
--- a/arch/arm/mach-imx/mxs/Kconfig
+++ b/arch/arm/mach-imx/mxs/Kconfig
@@ -32,6 +32,7 @@ if ARCH_MX28

 config MX28
bool
+   select LTO
default y

I did a quick imx28_xea_defconfig build test here:

U-Boot mainline
---

$ ls -al u-boot.img
-rw-rw-r-- 1 fabio fabio 444128 mar 28 09:11 u-boot.img

$ ls -al spl/u-boot-spl.bin
-rwxrwxr-x 1 fabio fabio 39800 mar 28 09:12 spl/u-boot-spl.bin


U-Boot mainline + LTO
-

$ ls -al u-boot.img
-rw-rw-r-- 1 fabio fabio 424144 mar 28 09:14 u-boot.img

$ ls -al spl/u-boot-spl.bin
-rw-rw-r-- 1 fabio fabio 37664 mar 28 09:14 spl/u-boot-spl.bin


Re: [PATCH 4/4] imx: imx8mp_evk: convert to OF_UPSTREAM

2024-03-27 Thread Fabio Estevam
Hi Peng,

On Wed, Mar 27, 2024 at 10:27 PM Peng Fan (OSS)  wrote:

> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -1105,7 +1105,6 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
> imx8mp-dhcom-pdk2.dtb \
> imx8mp-dhcom-pdk3.dtb \
> imx8mp-dhcom-pdk3-overlay-rev100.dtbo \
> -   imx8mp-evk.dtb \

Here you removed imx8mp-evk.dtb from the Makefile, which is correct.

You should do the same on the other patches.

Have you boot-tested all these boards?


Re: [PATCH v3 6/6] imx: imx93-11x11-evk: convert to OF_UPSTREAM

2024-03-27 Thread Fabio Estevam
Hi Peng,

On Wed, Mar 27, 2024 at 9:40 PM Peng Fan  wrote:

> I could help convert all imx93 boards, but I could only test nxp
> imx93 boards, not able to test others.

Just copy the board maintainers in your patch and they could help test
the conversion to OF_UPSTREAM.

Thanks!


Re: [PATCH v3 6/6] imx: imx93-11x11-evk: convert to OF_UPSTREAM

2024-03-27 Thread Fabio Estevam
On Wed, Mar 27, 2024 at 8:53 PM Peng Fan (OSS)  wrote:

> + {
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +   clock-frequency = <40>;
> +   pinctrl-names = "default", "sleep";
> +   pinctrl-0 = <_lpi2c2>;
> +   pinctrl-1 = <_lpi2c2>;
> +   status = "okay";
> +
> +   pmic@25 {

> +   adp5585gpio: gpio@34 {
> +   compatible = "adp5585";
> +   reg = <0x34>;
> +   gpio-controller;
> +   #gpio-cells = <2>;

Please add a comment saying these nodes are already available in 6.9-rc1.

> --- a/arch/arm/mach-imx/imx9/Kconfig
> +++ b/arch/arm/mach-imx/imx9/Kconfig
> @@ -31,6 +31,7 @@ choice
>  config TARGET_IMX93_11X11_EVK
> bool "imx93_11x11_evk"
> select IMX93
> +   imply OF_UPSTREAM

Sumit and I asked you to add OF_UPSTREAM to all imx93 boards, not just this one.

Please don't ignore review comments.


Re: [PATCH v3 2/6] serial: lpuart: use ipg clk for i.MX7ULP

2024-03-27 Thread Fabio Estevam
On Wed, Mar 27, 2024 at 8:53 PM Peng Fan (OSS)  wrote:

> +   struct lpuart_serial_plat *plat = dev_get_plat(dev);
> struct clk per_clk;

Please rename from "per_clk" to "clk".


Re: [PATCH] mx6cuboxi: fix ethernet after synchronise device-tree

2024-03-27 Thread Fabio Estevam
On Wed, Mar 27, 2024 at 6:04 PM Fabio Estevam  wrote:

> I took Josua's patch and modified it a bit.
>
> Does the attached patch fix Ethernet?

I forgot to delete the old ethernet-phy nodes.

Please try this one instead.

If it works in U-Boot, please also test Ethernet in Linux as we are
touching ft_board_setup().
From 5af15e698ad89fac3cc3433ac4ac87bb10bc014d Mon Sep 17 00:00:00 2001
From: Josua Mayer 
Date: Wed, 27 Mar 2024 17:58:47 -0300
Subject: [PATCH] mx6cuboxi: Fix Ethernet after DT sync with Linux

The i.MX6 Cubox-i and HummingBoards can have different PHYs at varying
addresses. U-Boot needs to auto-detect which phy is actually present,
and at which address it is responding.

Auto-detection from multiple phy nodes specified in device-tree does not
currently work correct. As a work-around merge all three possible phys
into one node with the special address 0x which indicates to the
generic phy driver to probe all addresses.
Also fixup this fake address before booting Linux, *if* booting with
U-Boot's internal dtb.

Signed-off-by: Josua Mayer 
[fabio: Added the changes to imx6qdl-sr-som-u-boot.dtsi.]
Signed-off-by: Fabio Estevam 
---
 ...qdl-hummingboard2-emmc-som-v15-u-boot.dtsi |  1 +
 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi   | 40 +++
 board/solidrun/mx6cuboxi/mx6cuboxi.c  |  8 +++-
 3 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi

diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
index e9b188ed6587..358cf8abc4ff 100644
--- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include "imx6qdl-u-boot.dtsi"
+#include "imx6qdl-sr-som-u-boot.dtsi"
 
 / {
 	board-detect {
diff --git a/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi b/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi
new file mode 100644
index ..4c5f043ea92a
--- /dev/null
+++ b/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+#include 
+
+ {
+	pinctrl-names = "default";
+	pinctrl-0 = <_microsom_enet_ar8035>;
+	phy-handle = <>;
+	phy-mode = "rgmii-id";
+
+	/*
+	 * The PHY seems to require a long-enough reset duration to avoid
+	 * some rare issues where the PHY gets stuck in an inconsistent and
+	 * non-functional state at boot-up. 10ms proved to be fine .
+	 */
+	phy-reset-duration = <10>;
+	phy-reset-gpios = < 15 GPIO_ACTIVE_LOW>;
+	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/delete-node/ ethernet-phy@1;
+		/delete-node/ ethernet-phy@4;
+
+		phy: ethernet-phy@0 {
+			/*
+			 * The PHY can appear either:
+			 * - AR8035: at address 0 or 4
+			 * - ADIN1300: at address 1
+			 * Actual address being detected at runtime.
+			 */
+			reg = <0x>;
+			qca,clk-out-frequency = <12500>;
+			qca,smarteee-tw-us-1g = <24>;
+			adi,phy-output-clock = "125mhz-free-running";
+		};
+	};
+};
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 8edabf4404c2..fbab39e800a6 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -447,7 +447,7 @@ static int find_ethernet_phy(void)
  */
 int ft_board_setup(void *fdt, struct bd_info *bd)
 {
-	int node_phy0, node_phy1, node_phy4;
+	int node_phy, node_phy0, node_phy1, node_phy4;
 	int ret, phy;
 	bool enable_phy0 = false, enable_phy1 = false, enable_phy4 = false;
 	enum board_type board;
@@ -479,6 +479,12 @@ int ft_board_setup(void *fdt, struct bd_info *bd)
 		return 0;
 	}
 
+	// update U-Boot's own unified phy node phy address, if present
+	node_phy = fdt_path_offset(fdt, "/soc/bus@210/ethernet@2188000/mdio/phy");
+	ret = fdt_setprop_u32(fdt, node_phy, "reg", phy);
+	if (ret < 0)
+		pr_err("%s: failed to update unified PHY node address\n", __func__);
+
 	// update all phy nodes status
 	node_phy0 = fdt_path_offset(fdt, "/soc/bus@210/ethernet@2188000/mdio/ethernet-phy@0");
 	ret = fdt_setprop_string(fdt, node_phy0, "status", enable_phy0 ? "okay" : "disabled");
-- 
2.34.1



Re: [PATCH] mx6cuboxi: fix ethernet after synchronise device-tree

2024-03-27 Thread Fabio Estevam
Hi Christian,

On Wed, Mar 27, 2024 at 4:29 PM Fabio Estevam  wrote:

> Please make these changes in a new imx6qdl-sr-som-u-boot.dtsi file instead.

I took Josua's patch and modified it a bit.

Does the attached patch fix Ethernet?
From 24f57c3cd8b1a2b113bcffad26e2bb1b9b582e35 Mon Sep 17 00:00:00 2001
From: Josua Mayer 
Date: Wed, 27 Mar 2024 17:58:47 -0300
Subject: [PATCH] mx6cuboxi: Fix Ethernet after DT sync with Linux

The i.MX6 Cubox-i and HummingBoards can have different PHYs at varying
addresses. U-Boot needs to auto-detect which phy is actually present,
and at which address it is responding.

Auto-detection from multiple phy nodes specified in device-tree does not
currently work correct. As a work-around merge all three possible phys
into one node with the special address 0x which indicates to the
generic phy driver to probe all addresses.
Also fixup this fake address before booting Linux, *if* booting with
U-Boot's internal dtb.

Signed-off-by: Josua Mayer 
[fabio: Added the changes to imx6qdl-sr-som-u-boot.dtsi.]
Signed-off-by: Fabio Estevam 
---
 ...qdl-hummingboard2-emmc-som-v15-u-boot.dtsi |  1 +
 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi   | 76 +++
 board/solidrun/mx6cuboxi/mx6cuboxi.c  |  8 +-
 3 files changed, 84 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi

diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
index e9b188ed6587..358cf8abc4ff 100644
--- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include "imx6qdl-u-boot.dtsi"
+#include "imx6qdl-sr-som-u-boot.dtsi"
 
 / {
 	board-detect {
diff --git a/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi b/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi
new file mode 100644
index ..3f2d92be7061
--- /dev/null
+++ b/arch/arm/dts/imx6qdl-sr-som-u-boot.dtsi
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2013,2014 Russell King
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include 
+
+ {
+	pinctrl-names = "default";
+	pinctrl-0 = <_microsom_enet_ar8035>;
+	phy-handle = <>;
+	phy-mode = "rgmii-id";
+
+	/*
+	 * The PHY seems to require a long-enough reset duration to avoid
+	 * some rare issues where the PHY gets stuck in an inconsistent and
+	 * non-functional state at boot-up. 10ms proved to be fine .
+	 */
+	phy-reset-duration = <10>;
+	phy-reset-gpios = < 15 GPIO_ACTIVE_LOW>;
+	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+
+		phy: ethernet-phy@0 {
+			/*
+			 * The PHY can appear either:
+			 * - AR8035: at address 0 or 4
+			 * - ADIN1300: at address 1
+			 * Actual address being detected at runtime.
+			 */
+			reg = <0x>;
+			qca,clk-out-frequency = <12500>;
+			qca,smarteee-tw-us-1g = <24>;
+			adi,phy-output-clock = "125mhz-free-running";
+		};
+	};
+};
dif

Re: [PATCH] mx6cuboxi: fix ethernet after synchronise device-tree

2024-03-27 Thread Fabio Estevam
Hi Christian,

On Wed, Mar 27, 2024 at 9:06 AM Josua Mayer  wrote:
>
> Cc: christian.gmei...@gmail.com
>
> Hi Christian,
>
> please take a look at this patch, I suspect it will (hack-)fix your
> ethernet issue.
>
> Unfortunately I had no time to revisit this yet and implement a correct 
> solution.

> >  arch/arm/dts/imx6qdl-sr-som.dtsi | 30 +---
> >  board/solidrun/mx6cuboxi/mx6cuboxi.c |  6 +-
> >  2 files changed, 14 insertions(+), 22 deletions(-)
> >
> > diff --git a/arch/arm/dts/imx6qdl-sr-som.dtsi 
> > b/arch/arm/dts/imx6qdl-sr-som.dtsi
> > index ce543e325c..2d7cbc26b3 100644
> > ---_a/arch/arm/dts/imx6qdl-sr-som.dtsi
> > +++ b/arch/arm/dts/imx6qdl-sr-som.dtsi

Please make these changes in a new imx6qdl-sr-som-u-boot.dtsi file instead.

This way, the changes will not get lost after a new sync with Linux or
if OF_UPSTREAM is used.


[PATCH] mx6cuboxi: Do not print devicetree model

2024-03-27 Thread Fabio Estevam
The mx6cuboxi_defconfig target supports several board
variants. All of these variants use the hummingboard devicetree in U-Boot.

Currently, the devicetree model as well as the board variant name
are shown:

U-Boot 2024.04-rc5-3-g774ec4fda8 (Mar 27 2024 - 16:48:35 +0100)

...
Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
Board: MX6 Cubox-i
...

Printing the devicetree model that is used internally by U-Boot
may confuse users.

Unselect the CONFIG_DISPLAY_BOARDINFO option so that only the
board name is printed instead.

Signed-off-by: Fabio Estevam 
---
 configs/mx6cuboxi_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 27ceb22599a6..e3aba715aa58 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -28,6 +28,7 @@ CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run 
distro_bootcmd"
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="if hdmidet; then usb start; setenv stdin  serial,usbkbd; 
setenv stdout serial,vidconsole; setenv stderr serial,vidconsole; else setenv 
stdin  serial; setenv stdout serial; setenv stderr serial; fi;"
 CONFIG_SYS_PBSIZE=532
+# CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_SYS_MALLOC=y
 CONFIG_SPL_FS_EXT4=y
-- 
2.34.1



[PATCH] mx6cuboxi: Convert to watchdog driver model

2024-03-27 Thread Fabio Estevam
Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset.

Signed-off-by: Fabio Estevam 
---
Christian,

Can you test this, please?

 .../dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi | 10 ++
 configs/mx6cuboxi_defconfig|  3 +++
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi 
b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
index 23a05773b579..e9b188ed6587 100644
--- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
@@ -13,6 +13,12 @@
 4 0
>;
};
+
+   wdt-reboot {
+   compatible = "wdt-reboot";
+   wdt = <>;
+   bootph-pre-ram;
+   };
 };
 
  {
@@ -58,3 +64,7 @@
  {
bootph-all;
 };
+
+ {
+   bootph-pre-ram;
+};
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 66d4aaeda2d9..27ceb22599a6 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -71,6 +71,8 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_DM_THERMAL=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
@@ -89,3 +91,4 @@ CONFIG_IMX_HDMI=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
+CONFIG_IMX_WATCHDOG=y
-- 
2.34.1



Re: [PATCH 5/6] Makefile: tune the include order

2024-03-27 Thread Fabio Estevam
Peng,

On Wed, Mar 27, 2024 at 11:07 AM Sumit Garg  wrote:

> That's the real reason why we should try to migrate to OF_UPSTREAM at
> SoC level rather than at board level. If a particular board isn't
> supported upstream then they can opt out for the time being.

All the imx93 boards in U-Boot are supported by the upstream kernel, so, yes,
please migrate all of them to  OF_UPSTREAM.


[PATCH] warp7: Convert to watchdog driver model

2024-03-27 Thread Fabio Estevam
Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset.

Signed-off-by: Fabio Estevam 
---
 arch/arm/dts/imx7s-warp-u-boot.dtsi | 10 ++
 configs/warp7_defconfig |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/dts/imx7s-warp-u-boot.dtsi 
b/arch/arm/dts/imx7s-warp-u-boot.dtsi
index 4f44598c9a27..98784fd7a2ef 100644
--- a/arch/arm/dts/imx7s-warp-u-boot.dtsi
+++ b/arch/arm/dts/imx7s-warp-u-boot.dtsi
@@ -7,6 +7,12 @@
chosen {
stdout-path = 
};
+
+   wdt-reboot {
+   compatible = "wdt-reboot";
+   wdt = <>;
+   bootph-pre-ram;
+   };
 };
 
  {
@@ -24,3 +30,7 @@
  {
bootph-all;
 };
+
+ {
+   bootph-pre-ram;
+};
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 9b518a121be6..48042b702c22 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -67,6 +67,8 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
@@ -80,5 +82,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_ETHER=y
 CONFIG_USB_ETH_CDC=y
 CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
+CONFIG_IMX_WATCHDOG=y
 CONFIG_OPTEE_TZDRAM_SIZE=0x300
 CONFIG_BOOTM_OPTEE=y
-- 
2.34.1



Re: mx6cuboxi: failes to detect model

2024-03-27 Thread Fabio Estevam
Hi Christian,

On Wed, Mar 27, 2024 at 3:54 AM Christian Gmeiner
 wrote:

> It does help \o/

Ok, great!

> When you send out a proper patch feel free to add Tested-by: Christian
> Gmeiner 

I have sent a more complete fix, so I have not included your Tested-by.

Please test the formal version and reply with your Tested-by tag.

> Time to look into the next broken thing on the device: network :)

If you still have issues with Ethernet, please share the details on a
new thread.


[PATCH] mx6cuboxi: Fix board revision detection

2024-03-27 Thread Fabio Estevam
Currently, an i.MX6 Cuboxi board is incorrectly detected
as the HummingBoard model:

U-Boot 2024.04-rc5 (Mar 26 2024 - 15:59:22 +0100)

CPU:   Freescale i.MX6Q rev1.3 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 26C
Reset cause: POR
Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
gpio@20a4000: set_dir_flags: error: gpio GPIO3_8 not reserved
gpio@20a4000: get_value: error: gpio GPIO3_8 not reserved
gpio@20a8000: set_dir_flags: error: gpio GPIO4_4 not reserved
gpio@20a8000: get_value: error: gpio GPIO4_4 not reserved
gpio@20b: set_dir_flags: error: gpio GPIO6_9 not reserved
gpio@20b: get_value: error: gpio GPIO6_9 not reserved
Board: MX6 HummingBoard
DRAM:  2 GiB
...

This error happens because request_detect_gpios() uses the GPIO DM
API, but board_type() still uses the legacy non-DM GPIO API.

Fix it by using the GPIO DM API in board_type() to read the
board revision pins in SPL.

Reported-by: Christian Gmeiner 
Signed-off-by: Fabio Estevam 
---
 board/solidrun/mx6cuboxi/mx6cuboxi.c | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c 
b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 8edabf4404c2..7fe515f928a0 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -336,20 +336,17 @@ static enum board_type board_type(void)
 * HB 1 1x
 */
 
-   gpio_direction_input(IMX_GPIO_NR(2, 8));
-   val3 = gpio_get_value(IMX_GPIO_NR(2, 8));
+   val3 = !!dm_gpio_get_value(_detect_desc[0]);
 
if (val3 == 0)
return HUMMINGBOARD2;
 
-   gpio_direction_input(IMX_GPIO_NR(3, 4));
-   val2 = gpio_get_value(IMX_GPIO_NR(3, 4));
+   val2 = !!dm_gpio_get_value(_detect_desc[1]);
 
if (val2 == 0)
return HUMMINGBOARD;
 
-   gpio_direction_input(IMX_GPIO_NR(4, 9));
-   val1 = gpio_get_value(IMX_GPIO_NR(4, 9));
+   val1 = !!dm_gpio_get_value(_detect_desc[2]);
 
if (val1 == 0) {
return CUBOXI;
@@ -363,8 +360,8 @@ static bool is_rev_15_som(void)
int val1, val2;
SETUP_IOMUX_PADS(som_rev_detect);
 
-   val1 = gpio_get_value(IMX_GPIO_NR(6, 0));
-   val2 = gpio_get_value(IMX_GPIO_NR(6, 4));
+   val1 = !!dm_gpio_get_value(_detect_desc[3]);
+   val2 = !!dm_gpio_get_value(_detect_desc[4]);
 
if (val1 == 1 && val2 == 0)
return true;
-- 
2.34.1



Re: [PATCH] arm: imx: fix signature_block_hdr struct fields order

2024-03-26 Thread Fabio Estevam
Hi Javier,

On Tue, Mar 26, 2024 at 8:07 AM Javier Viguera  wrote:
>
> According to the documentation (for example AN13994), for AHAB-enabled
> devices the format of the signature block is:
>
>   +--+--+--+-+
>   | Tag  | Length - msb | Length - lsb | Version |
>   +--+--+--+-+
>   | SRK Table offset| Certificate offset |
>   +-++
>   | Blob offset | Signature offset   |
>   +-++

Could you elaborate more about this and share more details?

Have you seen a run-time error or did you catch it by code inspection?

Please clarify.

Thanks


Re: [PATCH 5/7] arm64: imx: imx8mm-beacon: Migrate to OF_UPSTREAM

2024-03-26 Thread Fabio Estevam
Hi Adam,

On Tue, Mar 26, 2024 at 5:25 PM Adam Ford  wrote:
>
> The imx8mm-beacon boards can migrate to OF_UPSTREAM which also
> allows for the removal the device tree files.
>
> Signed-off-by: Adam Ford 

Please split the series by SoC family, thanks.


Re: [PATCH v3 2/3] imx: imx93_evk: add rtc pcf2131

2024-03-26 Thread Fabio Estevam
On Tue, Mar 26, 2024 at 12:30 AM Joy Zou  wrote:

> + {
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +   clock-frequency = <40>;
> +   pinctrl-names = "default", "sleep";
> +   pinctrl-0 = <_lpi2c3>;
> +   pinctrl-1 = <_lpi2c3>;
> +   status = "okay";
> +
> +   pcf2131: rtc@53 {
> +   compatible = "nxp,pcf2131";
> +   reg = <0x53>;
> +   interrupt-parent = <>;
> +   interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
> +   status = "okay";

Please submit the RTC support to Linux first, then you can sync the
devicetree with Linux in U-Boot.

In the meantime, you can add the RTC support to the -u-boot.dtsi.

Please consider using OF_UPSTREAM available in the U-Boot next branch.


Re: [PATCH v3 3/3] configs: Enable RTC pcf2131 support

2024-03-26 Thread Fabio Estevam
On Tue, Mar 26, 2024 at 12:30 AM Joy Zou  wrote:
>
> Enable CONFIG_RTC_PCF2127 configs to support pcf2131.

Subject should  be imx93_11x11_evk specific:

imx93_11x11_evk: Add PCF2131 RTC support


Re: [PATCH v3 1/3] drivers: rtc: add pcf2131 rtc driver

2024-03-26 Thread Fabio Estevam
On Tue, Mar 26, 2024 at 12:30 AM Joy Zou  wrote:

> +bool is_pcf2131_type(struct udevice *dev)

static bool

>  static int pcf2127_rtc_read(struct udevice *dev, uint offset, u8 *buffer, 
> uint len)
>  {
> struct dm_i2c_chip *chip = dev_get_parent_plat(dev);
> @@ -43,10 +75,64 @@ static int pcf2127_rtc_read(struct udevice *dev, uint 
> offset, u8 *buffer, uint l
> return dm_i2c_xfer(dev, , 1);
>  }
>
> +static int pcf2131_rtc_lock(struct udevice *dev)
> +{
> +   int ret = 0;

No need to initialize ret with 0.

> +static int pcf2131_rtc_unlock(struct udevice *dev)
> +{
> +   int ret = 0;

Ditto.

>  static int pcf2127_rtc_write(struct udevice *dev, uint offset,
>  const u8 *buffer, uint len)
>  {
> -   return dm_i2c_write(dev, offset, buffer, len);
> +   int ret = 0;

Ditto.


Re: mx6cuboxi: failes to detect model

2024-03-26 Thread Fabio Estevam
On Tue, Mar 26, 2024 at 1:11 PM Christian Gmeiner
 wrote:

> It got better but the model is (still) wrong:
>
> U-Boot 2024.04-rc5-dirty (Mar 26 2024 - 17:03:41 +0100)
>
> CPU:   Freescale i.MX6Q rev1.3 996 MHz (running at 792 MHz)
> CPU:   Extended Commercial temperature grade (-20C to 105C) at 20C
> Reset cause: POR
> Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
> Board: MX6 HummingBoard2
> DRAM:  2 GiB
> Core:  82 devices, 17 uclasses, devicetree: fit
> MMC:   FSL_SDHC: 1, FSL_SDHC: 2
> Loading Environment from MMC... *** Warning - bad CRC, using default 
> environment

It seems to me that there is a mix of DM GPIO and non-DM GPIO.

Does the change below help?

--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -336,20 +336,16 @@ static enum board_type board_type(void)
 * HB 1 1x
 */

-   gpio_direction_input(IMX_GPIO_NR(2, 8));
-   val3 = gpio_get_value(IMX_GPIO_NR(2, 8));
+   val3 = !!dm_gpio_get_value(&(board_detect_desc[0]));

if (val3 == 0)
return HUMMINGBOARD2;

-   gpio_direction_input(IMX_GPIO_NR(3, 4));
-   val2 = gpio_get_value(IMX_GPIO_NR(3, 4));
+   val2 = !!dm_gpio_get_value(&(board_detect_desc[1]));

if (val2 == 0)
return HUMMINGBOARD;
-
-   gpio_direction_input(IMX_GPIO_NR(4, 9));
-   val1 = gpio_get_value(IMX_GPIO_NR(4, 9));
+   val1 = !!dm_gpio_get_value(&(board_detect_desc[2]));

if (val1 == 0) {
return CUBOXI;


Re: mx6cuboxi: failes to detect model

2024-03-26 Thread Fabio Estevam
Hi Christian,

On Tue, Mar 26, 2024 at 12:17 PM Christian Gmeiner
 wrote:
>
> I am seeing model detection problems with the current git master.
>
> U-Boot 2024.04-rc5 (Mar 26 2024 - 15:59:22 +0100)
>
> CPU:   Freescale i.MX6Q rev1.3 996 MHz (running at 792 MHz)
> CPU:   Extended Commercial temperature grade (-20C to 105C) at 26C
> Reset cause: POR
> Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
> gpio@20a4000: set_dir_flags: error: gpio GPIO3_8 not reserved
> gpio@20a4000: get_value: error: gpio GPIO3_8 not reserved
> gpio@20a8000: set_dir_flags: error: gpio GPIO4_4 not reserved
> gpio@20a8000: get_value: error: gpio GPIO4_4 not reserved
> gpio@20b: set_dir_flags: error: gpio GPIO6_9 not reserved
> gpio@20b: get_value: error: gpio GPIO6_9 not reserved
> Board: MX6 HummingBoard

Unfortunately, my mx6cuboxi no longer works, so I can't test it myself.

I am adding Baruch on Cc. Hopefully, Baruch or Josua can take a look.

The 'not reserved' errors may be caused by the lack of gpio_request().

Do the changes below help?

--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -336,18 +336,21 @@ static enum board_type board_type(void)
 * HB 1 1x
 */

+   gpio_request(IMX_GPIO_NR(2, 8), "val3");
gpio_direction_input(IMX_GPIO_NR(2, 8));
val3 = gpio_get_value(IMX_GPIO_NR(2, 8));

if (val3 == 0)
return HUMMINGBOARD2;

+   gpio_request(IMX_GPIO_NR(3, 4), "val2");
gpio_direction_input(IMX_GPIO_NR(3, 4));
val2 = gpio_get_value(IMX_GPIO_NR(3, 4));

if (val2 == 0)
return HUMMINGBOARD;

+   gpio_request(IMX_GPIO_NR(4, 9), "val1");
gpio_direction_input(IMX_GPIO_NR(4, 9));
val1 = gpio_get_value(IMX_GPIO_NR(4, 9));

> DRAM:  2 GiB
> Core:  82 devices, 17 uclasses, devicetree: fit
> MMC:   FSL_SDHC: 1, FSL_SDHC: 2
> Loading Environment from MMC... *** Warning - bad CRC, using default 
> environment
>
> In:serial
> Out:   serial
> Err:   serial
> Net:   eth0: ethernet@2188000
>
>
> I did a git bisect to find the commit that broke model detection:
>
> # good: [4459ed60cb1e0562bc5b40405e2b4b9bbf766d57] Prepare v2023.10
> git bisect good 4459ed60cb1e0562bc5b40405e2b4b9bbf766d57
> # bad: [873791433602281ed230486606e326983c97a285] Merge
> https://source.denx.de/u-boot/custodians/u-boot-riscv
> git bisect bad 873791433602281ed230486606e326983c97a285
> # bad: [6e0a75d3162a024cb0cdedd871d435e6ee782447] configs: Resync with
> savedefconfig
> git bisect bad 6e0a75d3162a024cb0cdedd871d435e6ee782447
> # good: [99b46477e3495f819f6826d11470d46f12a4f9f7] clk: Dont return
> error when assigned-clocks is empty or missing
> git bisect good 99b46477e3495f819f6826d11470d46f12a4f9f7
> # bad: [50fa67d091b6ffbc1d77d3100d7b31795bf64928] arm: mach-k3:
> j721e_init: Move clk_k3 probe before loading TIFS
> git bisect bad 50fa67d091b6ffbc1d77d3100d7b31795bf64928
> # bad: [827cece3aa550d41e9c08c640b3a73372c8fb14a] pinctrl: renesas:
> Synchronize R8A77980 V3H PFC tables with Linux 6.5.3
> git bisect bad 827cece3aa550d41e9c08c640b3a73372c8fb14a
> # good: [623b3e8f9718a1fbd612b3e42451859e9f98a947] x86: spl: Change
> the condition for copying U-Boot to RAM
> git bisect good 623b3e8f9718a1fbd612b3e42451859e9f98a947
> # good: [ad57b98e212bd15492398cea3a8d4df6297e16fd] x86: doc: Split out
> manual booting into its own file
> git bisect good ad57b98e212bd15492398cea3a8d4df6297e16fd
> # bad: [6d53b50888315252cdd3251551add7a9108a1300] ARM: renesas: Enable
> DM_ETH_PHY on 64-bit R-Car boards
> git bisect bad 6d53b50888315252cdd3251551add7a9108a1300
> # bad: [283dcb63cb7d124fa427938f39aa9362872e02fc] buildman: Show
> progress when regenerating the board.cfg file
> git bisect bad 283dcb63cb7d124fa427938f39aa9362872e02fc
> # bad: [9e644284ab812f2db23f6185af77c0e771b0be73] dm: core: Report
> bootph-pre-ram/sram node as pre-reloc after relocation
> git bisect bad 9e644284ab812f2db23f6185af77c0e771b0be73
> # good: [b05a184379631d13c4a49e423aa1324dc1ae6158] Merge tag
> 'x86-pull-20230922' of
> https://source.denx.de/u-boot/custodians/u-boot-x86 into next
> git bisect good b05a184379631d13c4a49e423aa1324dc1ae6158
> # first bad commit: [9e644284ab812f2db23f6185af77c0e771b0be73] dm:
> core: Report bootph-pre-ram/sram node as pre-reloc after relocation
>
> If I revert 9e644284ab812f2db23f6185af77c0e771b0be73 on top of git
> master everything is fine again. As I am not an export in that area I
> am seeking
> some directions on how to fix this issue.
>
> --
> greets
> --
> Christian Gmeiner, MSc
>
> https://christian-gmeiner.info/privacypolicy


Re: U-boot fails for khadas-edge -v

2024-03-26 Thread Fabio Estevam
Hi Vivek,

[Please don't top-post and do not post HTML]

On Mon, Mar 25, 2024 at 1:37 PM Vivek Jaiswal  wrote:
>
> Hello Fabio,
> I tried using the this github repository.
> https://github.com/u-boot/u-boot.git
>
> And the configuration used was following
>
> rockchip-rk3399-khadas-edge-v.conf
>
> UBOOT_MACHINE = "khadas-edge-v-rk3399_defconfig"
>
> I got some error during the build from the u-boot.
>
> Please check the attachment BuildError1.txt or BuildError2.txt
>
> make[2]: *** 
> [/home/vjaiswal/dev/Projects/SOLAR/khadas-dev/forTesting/yocto2_actual_meta_rockchip/build/tmp/work/rockchip_rk3399_khadas_edge_v-poky-linux/u-boot-rockchip/1_2017.09-r0/git/scripts/Makefile.build:280:
>  cmd/bootm.o] Error 1
> make[1]: *** 
> [/home/vjaiswal/dev/Projects/SOLAR/khadas-dev/forTesting/yocto2_actual_meta_rockchip/build/tmp/work/rockchip_rk3399_khadas_edge_v-poky-linux/u-boot-rockchip/1_2017.09-r0/git/Makefile:1317:
>  cmd] Error 2
> make: *** [Makefile:157: sub-make] Error 2

You are trying to build U-Boot 2017.09.

U-Boot 2024.01 builds khadas-edge-v-rk3399_defconfig just fine.


[PATCH] imx8: Add a default reset_cpu() implementation

2024-03-26 Thread Fabio Estevam
From: Fabio Estevam 

Add a weak default reset_cpu() implementation just like
it is done on arch/arm/mach-imx/cpu.c.

This allows the removal of the empty reset_cpu() in several
board files.

Signed-off-by: Fabio Estevam 
---
 arch/arm/mach-imx/imx8/cpu.c  |  4 
 board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c | 11 ---
 board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c |  8 
 board/congatec/cgtqmx8/cgtqmx8.c  |  7 ---
 board/freescale/imx8qm_mek/imx8qm_mek.c   |  8 
 board/freescale/imx8qxp_mek/imx8qxp_mek.c |  8 
 board/toradex/apalis-imx8/apalis-imx8.c   |  8 
 board/toradex/colibri-imx8x/colibri-imx8x.c   |  8 
 8 files changed, 4 insertions(+), 58 deletions(-)

diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 0b91e448a5d..6e643188f40 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -84,6 +84,10 @@ static char *get_reset_cause(void)
}
 }
 
+__weak void reset_cpu(void)
+{
+}
+
 int arch_cpu_init(void)
 {
 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RECOVER_DATA_SECTION)
diff --git a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c 
b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c
index 8b4d73052eb..56b7bdb57c9 100644
--- a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c
+++ b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c
@@ -136,17 +136,6 @@ void detail_board_ddr_info(void)
puts("\nDDR");
 }
 
-/*
- * Board specific reset that is system reset.
- */
-void reset_cpu(void)
-{
-   puts("SCI reboot request");
-
-   while (1)
-   putc('.');
-}
-
 #ifdef CONFIG_OF_BOARD_SETUP
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c 
b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
index 206ce7d5c13..7f766a688bb 100644
--- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
+++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
@@ -112,14 +112,6 @@ int board_init(void)
return 0;
 }
 
-/*
- * Board specific reset that is system reset.
- */
-void reset_cpu(void)
-{
-   /* TODO */
-}
-
 int board_mmc_get_env_dev(int devno)
 {
return devno;
diff --git a/board/congatec/cgtqmx8/cgtqmx8.c b/board/congatec/cgtqmx8/cgtqmx8.c
index 26189ff66f5..3b01354bb6b 100644
--- a/board/congatec/cgtqmx8/cgtqmx8.c
+++ b/board/congatec/cgtqmx8/cgtqmx8.c
@@ -371,13 +371,6 @@ void detail_board_ddr_info(void)
puts("\nDDR");
 }
 
-/*
- * Board specific reset that is system reset.
- */
-void reset_cpu(void)
-{
-   /* TODO */
-}
 
 #ifdef CONFIG_OF_BOARD_SETUP
 int ft_board_setup(void *blob, struct bd_info *bd)
diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c 
b/board/freescale/imx8qm_mek/imx8qm_mek.c
index d96d1d07bb1..2b209c8886f 100644
--- a/board/freescale/imx8qm_mek/imx8qm_mek.c
+++ b/board/freescale/imx8qm_mek/imx8qm_mek.c
@@ -102,14 +102,6 @@ int board_init(void)
return 0;
 }
 
-/*
- * Board specific reset that is system reset.
- */
-void reset_cpu(void)
-{
-   /* TODO */
-}
-
 #ifdef CONFIG_OF_BOARD_SETUP
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c 
b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
index 516cefd2f24..833bee55462 100644
--- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c
+++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
@@ -126,14 +126,6 @@ int board_init(void)
return 0;
 }
 
-/*
- * Board specific reset that is system reset.
- */
-void reset_cpu(void)
-{
-   /* TODO */
-}
-
 #ifdef CONFIG_OF_BOARD_SETUP
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c 
b/board/toradex/apalis-imx8/apalis-imx8.c
index 49719f2f553..0f993e644d7 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -291,14 +291,6 @@ int board_init(void)
return 0;
 }
 
-/*
- * Board specific reset that is system reset.
- */
-void reset_cpu(void)
-{
-   /* TODO */
-}
-
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c 
b/board/toradex/colibri-imx8x/colibri-imx8x.c
index 6fc8076163c..a507d666c07 100644
--- a/board/toradex/colibri-imx8x/colibri-imx8x.c
+++ b/board/toradex/colibri-imx8x/colibri-imx8x.c
@@ -140,14 +140,6 @@ int board_init(void)
return 0;
 }
 
-/*
- * Board specific reset that is system reset.
- */
-void reset_cpu(void)
-{
-   /* TODO */
-}
-
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
-- 
2.34.1



Re: [PATCH 00/12] arm: xea: Provide support for different XEA board HW versions

2024-03-26 Thread Fabio Estevam
Hi Lukasz,

On Mon, Mar 25, 2024 at 5:48 AM Lukasz Majewski  wrote:

> The case here is that I'm modifying the *-u-boot.dts{i} files only. In

The diff below shows that you are creating imx28-xea-1.dts and imx28-xea-2.dts
for U-Boot consumption and renaming the upstream imx28-xea.dts to imx28-xea.dts.

create mode 100644 arch/arm/dts/imx28-xea-1.dts
create mode 100644 arch/arm/dts/imx28-xea-2-u-boot.dtsi
create mode 100644 arch/arm/dts/imx28-xea-2.dts
rename arch/arm/dts/{imx28-xea.dts => imx28-xea.dtsi} (100%)

> other words, u-boot will not support features described in Linux DTS.

That's OK and this happens frequently.

For example, upstream devicetree may describes audio codec,
but U-Boot does not support audio playback.

Devicetree should be OS agnostic.

In U-Boot, we want to re-use the upstream Linux devicetree files 'as-is'.

Adding -u-boot.dtsi files is OK though.

Can you convert the imx28-xea board to OF_UPSTREAM available in the
U-Boot next branch?

> Hence, the rename of files (which would be in sync with Linux at some
> point) looks like not related to Linux DTS (as even after re-sync with
> upstream Linux those changes will not be in Linux DTS).

I did not understand this part, do you mean that Linux will also do the
imx28-xea.dts => imx28-xea.dtsi rename and will also have the new
imx28-xea-1.dts and imx28-xea-2.dts?

Regards,

Fabio Estevam


  1   2   3   4   5   6   7   8   9   10   >