Re: How is it possible to flash an image (wic-file) to emmc?

2024-07-23 Thread Fabio Estevam
Hi Michael,

On Tue, Jul 23, 2024 at 10:37 AM Stahl, Michael  wrote:
>
> Hi,
> after I swichted to the new uboot (2024.01) I can't flash a wic-file to the 
> emmc anymore.

Not so new :-) 2024.07 is the new one.

> I use a uboot version for imx8 processors but I think the fastboot parts are 
> equal. There is a special tool supported from NXP called uuu-tool to flash 
> files by the fastboot protocol

Which i.MX8 processor do you use exactly?

> With the old uboot (2021.04) I can flash the uboot-image as the wic-image as 
> follows:

Is the old U-Boot based on a NXP release?

> Which fastboot command can I use to flash the raw emmc regardless of whether 
> there are already partitions or not?

The scripts you showed should also work with mainline U-Boot.

Have you added fastboot support to your board in U-Boot 2024.01?

Also, does it enter fastboot mode when booting from USB?

Here are some suggestions:

https://lore.kernel.org/u-boot/caomzo5bb9c+9-gj22lnvlggqbh259h7iuff5jind3ledpan...@mail.gmail.com/

Regards,

Fabio Estevam


Re: [PATCHv1 3/5] cmd: cpu: add release subcommand

2024-07-23 Thread Fabio Estevam
On Tue, Jul 23, 2024 at 11:43 AM Zhiqiang Hou  wrote:
>
> From: Hou Zhiqiang 
>
> Add a new subcommand 'release' to bring up a core to run baremetal
> and RTOS applications.
>
> For example on i.MX8M Plus EVK, release the LAST core to run a RTOS
> application, passing the sequence number of the CPU core to release,
> here it is 3:
> u-boot=> cpu list
>   0: cpu@0  NXP i.MX?? Rev1.1 A53 at 4154504685 MHz at 31C

What is this ?? and this super high frequency?


Re: [PATCH 1/4] clk: imx: clk-imx8mn Fix nand and spi clock parent

2024-07-22 Thread Fabio Estevam
On Thu, Jul 11, 2024 at 2:56 AM Michael Nazzareno Trimarchi
 wrote:

> I will rephrase the commit message

It looks good as is.

Applied all, thanks.


Re: [PATCH v2 1/4] udoo_neo: Convert to watchdog driver model

2024-07-22 Thread Fabio Estevam
On Fri, Jul 19, 2024 at 5:33 PM 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.
>
> With the watchdog driver model in place, it is no longer needed
> to have board code to initialize the watchdog, so remove
> its related board code.
>
> Signed-off-by: Fabio Estevam 
> ---
> Changes since v1:
> - Remove board wdog board code.

Applied all, thanks.


Re: [PATCH] imx93-u-boot: Describe the CPU clocks in the devicetree

2024-07-22 Thread Fabio Estevam
On Thu, Jul 18, 2024 at 1:55 PM Fabio Estevam  wrote:
>
> Currently, there is an error when the i.MX93 CPU frequency is
> read:
>
> Could not read CPU frequency: -2
> CPU:   NXP i.MX93(52) Rev1.1 A55 at 0 MHz
>
> Fix it by describing the A55 clock nodes in the devicetree, like done
> on other i.MX SoCs.
>
> With this change, the CPU frequency error is gone and it can be correctly
> retrieved:
>
> CPU:   NXP i.MX93(52) Rev1.1 A55 at 1700 MHz
> CPU:   Industrial temperature grade  (-40C to 105C) at 35C
>
> As the upstream imx93.dtsi does not describe the CPU clocks,
> keep the clock node in imx93-u-boot.dtsi for now.
>
> Signed-off-by: Fabio Estevam 

Applied, thanks.


Re: [PATCH] clk: imx6q: Add definition for IMX6QDL_CLK_PWM1

2024-07-22 Thread Fabio Estevam
On Fri, Jul 12, 2024 at 8:10 PM Emil Kronborg
 wrote:
>
> Enabling CONFIG_CMD_PWM, and consequently CONFIG_DM_PWM, causes the pwm
> command to fail due to a missing clock.
>
> => pwm enable 0 0
> Enable clock-controller@20c4000 failed
> Failed to enable per_clk
> pwm: '0' not found
> Command 'pwm' failed: Error -2
>
> Note that it is trivial to also add the clocks for PWM2, PWM3, and PWM4.
> However, I only tested PWM1 and thus only added the clock for that
> signal.
>
> Signed-off-by: Emil Kronborg 

Applied, thanks.


Re: [PATCH] clk: imx6q: Add definition for IMX6QDL_CLK_I2C3

2024-07-22 Thread Fabio Estevam
On Fri, Jul 12, 2024 at 8:10 PM Emil Kronborg
 wrote:
>
> Commit 727fa4539ca2 ("clk: Add support for I2C clocks on NXP's imx6q SoC
> which use CCF") added I2C clocks for I2C1 and I2C2, but not I2C3.
> Consequently, devices using I2C3 fail after enabling CONFIG_CLK_IMX6Q
> and thus CONFIG_CLK. Therefore, this commit adds the last I2C clock.
>
> Signed-off-by: Emil Kronborg 

Applied, thanks.


Re: [PATCH] kontron-sl-mx6ul: switch to DM_SERIAL

2024-07-22 Thread Fabio Estevam
On Sat, Jul 20, 2024 at 12:54 PM Anatolij Gustschin  wrote:
>
> Enable DM_SERIAL to avoid board removal warning.
>
> Signed-off-by: Anatolij Gustschin 
> Cc: Frieder Schrempf 

Applied, thanks.


Re: [PATCH] mx6boards: convert to DM_I2C and DM_SERIAL

2024-07-22 Thread Fabio Estevam
On Sat, Jul 20, 2024 at 12:36 PM Anatolij Gustschin  wrote:
>
> Rework to remove use of legacy I2C API. Also switch
> to DM_SERIAL to avoid board removal warning.
>
> Signed-off-by: Anatolij Gustschin 
> Cc: Eric Bénard 

Applied, thanks.


Re: [PATCH] nitrogen6x: convert to DM_I2C and DM_SERIAL

2024-07-22 Thread Fabio Estevam
On Sat, Jul 20, 2024 at 9:50 AM Anatolij Gustschin  wrote:
>
> Rework to remove use of legacy I2C API. Also switch
> to DM_SERIAL to avoid board removal warning.
>
> Signed-off-by: Anatolij Gustschin 
> Cc: Troy Kisky 

Applied, thanks.


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

2024-07-22 Thread Fabio Estevam
Hi Tom,

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

The following changes since commit 5024a96db8ea6ff2e814f4599af9e5faf09296b7:

  Subtree merge tag 'v6.10-dts' of devicetree-rebasing repo [1] into 
dts/upstream (2024-07-20 11:15:22 -0600)

are available in the Git repository at:

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

for you to fetch changes up to a9c962941e119017eb9d5985c5c214d9711c9433:

  kontron-sl-mx6ul: switch to DM_SERIAL (2024-07-22 17:55:35 -0300)

u-boot-imx-master-20240722
--

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

- Conversions to DM_I2C and DM_SERIAL.
- Support for I2C3 and PWM1 for the imx6q clock driver.
- Improvements for udoo-neo
- Describe the i.MX93 CPU clocks in the devicetree to fix CPU clock printing
- Fix for SPI and NANC clk-imx8mn clock driver

Anatolij Gustschin (3):
  nitrogen6x: convert to DM_I2C and DM_SERIAL
  mx6boards: convert to DM_I2C and DM_SERIAL
  kontron-sl-mx6ul: switch to DM_SERIAL

Emil Kronborg (2):
  clk: imx6q: Add definition for IMX6QDL_CLK_I2C3
  clk: imx6q: Add definition for IMX6QDL_CLK_PWM1

Fabio Estevam (5):
  imx93-u-boot: Describe the CPU clocks in the devicetree
  udoo_neo: Convert to watchdog driver model
  udoo_neo: Select LTO
  udoo-neo: Do not print devicetree model
  udoo-neo: Convert to OF_UPSTREAM

Michael Trimarchi (4):
  clk: imx: clk-imx8mn Fix nand and spi clock parent
  clk: imx8mn: Make parent names arrays const pointers
  clk: imx8mm: Make parent names arrays const pointers
  clk: imx8mp: Make parent names arrays const pointers

 arch/arm/dts/Makefile  |   5 +-
 arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi |  12 +
 arch/arm/dts/imx6sx-udoo-neo-basic.dts |  33 --
 arch/arm/dts/imx6sx-udoo-neo-extended.dts  |  26 --
 arch/arm/dts/imx6sx-udoo-neo-full.dts  |  41 ---
 arch/arm/dts/imx6sx-udoo-neo.dtsi  | 482 -
 arch/arm/dts/imx93-u-boot.dtsi |   8 +
 arch/arm/mach-imx/mx6/Kconfig  |   1 +
 board/boundary/nitrogen6x/nitrogen6x.c |  79 +---
 board/embest/mx6boards/mx6boards.c |  70 +---
 board/udoo/neo/neo.c   |  59 +--
 configs/kontron-sl-mx6ul_defconfig |   1 +
 configs/marsboard_defconfig|   6 +-
 configs/mx6qsabrelite_defconfig|   7 +-
 configs/nitrogen6dl2g_defconfig|   7 +-
 configs/nitrogen6dl_defconfig  |   7 +-
 configs/nitrogen6q2g_defconfig |   7 +-
 configs/nitrogen6q_defconfig   |   7 +-
 configs/nitrogen6s1g_defconfig |   7 +-
 configs/nitrogen6s_defconfig   |   7 +-
 configs/riotboard_defconfig|   6 +-
 configs/udoo_neo_defconfig |   9 +-
 drivers/clk/imx/clk-imx6q.c|   4 +
 drivers/clk/imx/clk-imx8mm.c   | 157 
 drivers/clk/imx/clk-imx8mn.c   | 151 
 drivers/clk/imx/clk-imx8mp.c   | 242 ++---
 include/configs/nitrogen6x.h   |   2 -
 27 files changed, 393 insertions(+), 1050 deletions(-)
 delete mode 100644 arch/arm/dts/imx6sx-udoo-neo-basic.dts
 delete mode 100644 arch/arm/dts/imx6sx-udoo-neo-extended.dts
 delete mode 100644 arch/arm/dts/imx6sx-udoo-neo-full.dts
 delete mode 100644 arch/arm/dts/imx6sx-udoo-neo.dtsi


[PATCH v2] warp7: Convert to OF_UPSTREAM

2024-07-22 Thread Fabio Estevam
Instead of using the local imx7s-warp devicetree copies from U-Boot,
convert the imx7s-warp board to OF_UPSTREAM so that the upstream
kernel devicetree can be used instead.

Signed-off-by: Fabio Estevam 
---
Changes since v1:
- Also change warp7_bl33_defconfig.

 arch/arm/dts/Makefile |   1 -
 arch/arm/dts/imx7s-warp.dts   | 500 --
 arch/arm/mach-imx/mx7/Kconfig |   1 +
 configs/warp7_bl33_defconfig  |   2 +-
 configs/warp7_defconfig   |   2 +-
 5 files changed, 3 insertions(+), 503 deletions(-)
 delete mode 100644 arch/arm/dts/imx7s-warp.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index a4d95c8306bb..8908e0c2fe29 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -883,7 +883,6 @@ dtb-$(CONFIG_MX7) += imx7d-sdb.dtb \
imx7-cm.dtb \
imx7d-colibri-emmc-eval-v3.dtb \
imx7d-colibri-eval-v3.dtb \
-   imx7s-warp.dtb \
imx7d-meerkat96.dtb \
imx7d-pico-pi.dtb \
imx7d-pico-hobbit.dtb \
diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
deleted file mode 100644
index e8734d218b9d..
--- a/arch/arm/dts/imx7s-warp.dts
+++ /dev/null
@@ -1,500 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (C) 2016 NXP Semiconductors.
- * Author: Fabio Estevam 
- */
-
-/dts-v1/;
-
-#include 
-#include "imx7s.dtsi"
-
-/ {
-   model = "Element14 Warp i.MX7 Board";
-   compatible = "element14,imx7s-warp", "fsl,imx7s";
-
-   memory@8000 {
-   device_type = "memory";
-   reg = <0x8000 0x2000>;
-   };
-
-   gpio-keys {
-   compatible = "gpio-keys";
-   pinctrl-0 = <_gpio>;
-   autorepeat;
-
-   back {
-   label = "Back";
-   gpios = < 1 GPIO_ACTIVE_HIGH>;
-   linux,code = ;
-   wakeup-source;
-   };
-   };
-
-   reg_brcm: regulator-brcm {
-   compatible = "regulator-fixed";
-   enable-active-high;
-   gpio = < 10 GPIO_ACTIVE_HIGH>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_brcm_reg>;
-   regulator-name = "brcm_reg";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   startup-delay-us = <20>;
-   };
-
-   reg_bt: regulator-bt {
-   compatible = "regulator-fixed";
-   pinctrl-names = "default";
-   pinctrl-0 = <_bt_reg>;
-   enable-active-high;
-   gpio = < 17 GPIO_ACTIVE_HIGH>;
-   regulator-name = "bt_reg";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   regulator-always-on;
-   };
-
-   reg_peri_3p15v: regulator-peri-3p15v {
-   compatible = "regulator-fixed";
-   regulator-name = "peri_3p15v_reg";
-   regulator-min-microvolt = <315>;
-   regulator-max-microvolt = <315>;
-   regulator-always-on;
-   };
-
-   sound {
-   compatible = "simple-audio-card";
-   simple-audio-card,name = "imx7-sgtl5000";
-   simple-audio-card,format = "i2s";
-   simple-audio-card,bitclock-master = <_master>;
-   simple-audio-card,frame-master = <_master>;
-   simple-audio-card,cpu {
-   sound-dai = <>;
-   };
-
-   dailink_master: simple-audio-card,codec {
-   sound-dai = <>;
-   clocks = < IMX7D_AUDIO_MCLK_ROOT_DIV>;
-   };
-   };
-};
-
- {
-   assigned-clocks = < IMX7D_PLL_AUDIO_POST_DIV>;
-   assigned-clock-rates = <884736000>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_i2c1>;
-   status = "okay";
-
-   pmic: pfuze3000@8 {
-   compatible = "fsl,pfuze3000";
-   reg = <0x08>;
-
-   regulators {
-   sw1a_reg: sw1a {
-   regulator-min-microvolt = <70>;
-   regulator-max-microvolt = <1475000>;
-   regulator-boot-on;
-   regulator-always-on;
-   regulator-ramp-delay = <6250>;
-   };
-
-   /* use sw1c_reg t

[PATCH] warp7: Convert to OF_UPSTREAM

2024-07-21 Thread Fabio Estevam
Instead of using the local imx7s-warp devicetree copies from U-Boot,
convert the imx7s-warp board to OF_UPSTREAM so that the upstream
kernel devicetree can be used instead.

Signed-off-by: Fabio Estevam 
---
 arch/arm/dts/Makefile |   1 -
 arch/arm/dts/imx7s-warp.dts   | 500 --
 arch/arm/mach-imx/mx7/Kconfig |   1 +
 configs/warp7_defconfig   |   2 +-
 4 files changed, 2 insertions(+), 502 deletions(-)
 delete mode 100644 arch/arm/dts/imx7s-warp.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7265e5542574..7e17edf21889 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -886,7 +886,6 @@ dtb-$(CONFIG_MX7) += imx7d-sdb.dtb \
imx7-cm.dtb \
imx7d-colibri-emmc-eval-v3.dtb \
imx7d-colibri-eval-v3.dtb \
-   imx7s-warp.dtb \
imx7d-meerkat96.dtb \
imx7d-pico-pi.dtb \
imx7d-pico-hobbit.dtb \
diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
deleted file mode 100644
index e8734d218b9d..
--- a/arch/arm/dts/imx7s-warp.dts
+++ /dev/null
@@ -1,500 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (C) 2016 NXP Semiconductors.
- * Author: Fabio Estevam 
- */
-
-/dts-v1/;
-
-#include 
-#include "imx7s.dtsi"
-
-/ {
-   model = "Element14 Warp i.MX7 Board";
-   compatible = "element14,imx7s-warp", "fsl,imx7s";
-
-   memory@8000 {
-   device_type = "memory";
-   reg = <0x8000 0x2000>;
-   };
-
-   gpio-keys {
-   compatible = "gpio-keys";
-   pinctrl-0 = <_gpio>;
-   autorepeat;
-
-   back {
-   label = "Back";
-   gpios = < 1 GPIO_ACTIVE_HIGH>;
-   linux,code = ;
-   wakeup-source;
-   };
-   };
-
-   reg_brcm: regulator-brcm {
-   compatible = "regulator-fixed";
-   enable-active-high;
-   gpio = < 10 GPIO_ACTIVE_HIGH>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_brcm_reg>;
-   regulator-name = "brcm_reg";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   startup-delay-us = <20>;
-   };
-
-   reg_bt: regulator-bt {
-   compatible = "regulator-fixed";
-   pinctrl-names = "default";
-   pinctrl-0 = <_bt_reg>;
-   enable-active-high;
-   gpio = < 17 GPIO_ACTIVE_HIGH>;
-   regulator-name = "bt_reg";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   regulator-always-on;
-   };
-
-   reg_peri_3p15v: regulator-peri-3p15v {
-   compatible = "regulator-fixed";
-   regulator-name = "peri_3p15v_reg";
-   regulator-min-microvolt = <315>;
-   regulator-max-microvolt = <315>;
-   regulator-always-on;
-   };
-
-   sound {
-   compatible = "simple-audio-card";
-   simple-audio-card,name = "imx7-sgtl5000";
-   simple-audio-card,format = "i2s";
-   simple-audio-card,bitclock-master = <_master>;
-   simple-audio-card,frame-master = <_master>;
-   simple-audio-card,cpu {
-   sound-dai = <>;
-   };
-
-   dailink_master: simple-audio-card,codec {
-   sound-dai = <>;
-   clocks = < IMX7D_AUDIO_MCLK_ROOT_DIV>;
-   };
-   };
-};
-
- {
-   assigned-clocks = < IMX7D_PLL_AUDIO_POST_DIV>;
-   assigned-clock-rates = <884736000>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_i2c1>;
-   status = "okay";
-
-   pmic: pfuze3000@8 {
-   compatible = "fsl,pfuze3000";
-   reg = <0x08>;
-
-   regulators {
-   sw1a_reg: sw1a {
-   regulator-min-microvolt = <70>;
-   regulator-max-microvolt = <1475000>;
-   regulator-boot-on;
-   regulator-always-on;
-   regulator-ramp-delay = <6250>;
-   };
-
-   /* use sw1c_reg to align with pfuze100/pfuze200 */
-   sw1c_reg: sw1b {
-   regulator-min-microvolt = <

[PATCH] warp7: Convert to OF_UPSTREAM

2024-07-21 Thread Fabio Estevam
Instead of using the local imx7s-warp devicetree copies from U-Boot,
convert the imx7s-warp board to OF_UPSTREAM so that the upstream
kernel devicetree can be used instead.

Signed-off-by: Fabio Estevam 
---
 arch/arm/dts/Makefile |   1 -
 arch/arm/dts/imx7s-warp.dts   | 500 --
 arch/arm/mach-imx/mx7/Kconfig |   1 +
 configs/warp7_defconfig   |   2 +-
 4 files changed, 2 insertions(+), 502 deletions(-)
 delete mode 100644 arch/arm/dts/imx7s-warp.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7265e5542574..7e17edf21889 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -886,7 +886,6 @@ dtb-$(CONFIG_MX7) += imx7d-sdb.dtb \
imx7-cm.dtb \
imx7d-colibri-emmc-eval-v3.dtb \
imx7d-colibri-eval-v3.dtb \
-   imx7s-warp.dtb \
imx7d-meerkat96.dtb \
imx7d-pico-pi.dtb \
imx7d-pico-hobbit.dtb \
diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
deleted file mode 100644
index e8734d218b9d..
--- a/arch/arm/dts/imx7s-warp.dts
+++ /dev/null
@@ -1,500 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (C) 2016 NXP Semiconductors.
- * Author: Fabio Estevam 
- */
-
-/dts-v1/;
-
-#include 
-#include "imx7s.dtsi"
-
-/ {
-   model = "Element14 Warp i.MX7 Board";
-   compatible = "element14,imx7s-warp", "fsl,imx7s";
-
-   memory@8000 {
-   device_type = "memory";
-   reg = <0x8000 0x2000>;
-   };
-
-   gpio-keys {
-   compatible = "gpio-keys";
-   pinctrl-0 = <_gpio>;
-   autorepeat;
-
-   back {
-   label = "Back";
-   gpios = < 1 GPIO_ACTIVE_HIGH>;
-   linux,code = ;
-   wakeup-source;
-   };
-   };
-
-   reg_brcm: regulator-brcm {
-   compatible = "regulator-fixed";
-   enable-active-high;
-   gpio = < 10 GPIO_ACTIVE_HIGH>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_brcm_reg>;
-   regulator-name = "brcm_reg";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   startup-delay-us = <20>;
-   };
-
-   reg_bt: regulator-bt {
-   compatible = "regulator-fixed";
-   pinctrl-names = "default";
-   pinctrl-0 = <_bt_reg>;
-   enable-active-high;
-   gpio = < 17 GPIO_ACTIVE_HIGH>;
-   regulator-name = "bt_reg";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   regulator-always-on;
-   };
-
-   reg_peri_3p15v: regulator-peri-3p15v {
-   compatible = "regulator-fixed";
-   regulator-name = "peri_3p15v_reg";
-   regulator-min-microvolt = <315>;
-   regulator-max-microvolt = <315>;
-   regulator-always-on;
-   };
-
-   sound {
-   compatible = "simple-audio-card";
-   simple-audio-card,name = "imx7-sgtl5000";
-   simple-audio-card,format = "i2s";
-   simple-audio-card,bitclock-master = <_master>;
-   simple-audio-card,frame-master = <_master>;
-   simple-audio-card,cpu {
-   sound-dai = <>;
-   };
-
-   dailink_master: simple-audio-card,codec {
-   sound-dai = <>;
-   clocks = < IMX7D_AUDIO_MCLK_ROOT_DIV>;
-   };
-   };
-};
-
- {
-   assigned-clocks = < IMX7D_PLL_AUDIO_POST_DIV>;
-   assigned-clock-rates = <884736000>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_i2c1>;
-   status = "okay";
-
-   pmic: pfuze3000@8 {
-   compatible = "fsl,pfuze3000";
-   reg = <0x08>;
-
-   regulators {
-   sw1a_reg: sw1a {
-   regulator-min-microvolt = <70>;
-   regulator-max-microvolt = <1475000>;
-   regulator-boot-on;
-   regulator-always-on;
-   regulator-ramp-delay = <6250>;
-   };
-
-   /* use sw1c_reg to align with pfuze100/pfuze200 */
-   sw1c_reg: sw1b {
-   regulator-min-microvolt = <

[PATCH v2 4/4] udoo-neo: Convert to OF_UPSTREAM

2024-07-19 Thread Fabio Estevam
Instead of using the local imx6sx-udoo-neo  devicetree copies from U-Boot,
convert the imx6sx-udoo-neo boards to OF_UPSTREAM so that the upstream
kernel devicetrees can be used instead.

Tested on a imx6sx-udoo-neo-full board.

Signed-off-by: Fabio Estevam 
---
Changes since v1:
- Newly introduced.

 arch/arm/dts/Makefile |   5 +-
 arch/arm/dts/imx6sx-udoo-neo-basic.dts|  33 --
 arch/arm/dts/imx6sx-udoo-neo-extended.dts |  26 --
 arch/arm/dts/imx6sx-udoo-neo-full.dts |  41 --
 arch/arm/dts/imx6sx-udoo-neo.dtsi | 482 --
 arch/arm/mach-imx/mx6/Kconfig |   1 +
 configs/udoo_neo_defconfig|   2 +-
 7 files changed, 3 insertions(+), 587 deletions(-)
 delete mode 100644 arch/arm/dts/imx6sx-udoo-neo-basic.dts
 delete mode 100644 arch/arm/dts/imx6sx-udoo-neo-extended.dts
 delete mode 100644 arch/arm/dts/imx6sx-udoo-neo-full.dts
 delete mode 100644 arch/arm/dts/imx6sx-udoo-neo.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7265e5542574..a4d95c8306bb 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -840,10 +840,7 @@ dtb-$(CONFIG_MX6SLL) += imx6sll-evk.dtb
 dtb-$(CONFIG_MX6SX) += \
imx6sx-sabreauto.dtb \
imx6sx-sdb.dtb \
-   imx6sx-softing-vining-2000.dtb \
-   imx6sx-udoo-neo-basic.dtb \
-   imx6sx-udoo-neo-extended.dtb \
-   imx6sx-udoo-neo-full.dtb
+   imx6sx-softing-vining-2000.dtb
 
 dtb-$(CONFIG_MX6UL) += \
imx6ul-geam.dtb \
diff --git a/arch/arm/dts/imx6sx-udoo-neo-basic.dts 
b/arch/arm/dts/imx6sx-udoo-neo-basic.dts
deleted file mode 100644
index 205ea26484e3..
--- a/arch/arm/dts/imx6sx-udoo-neo-basic.dts
+++ /dev/null
@@ -1,33 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2016 Andreas Färber
- */
-
-/dts-v1/;
-
-#include "imx6sx-udoo-neo.dtsi"
-
-/ {
-   model = "UDOO Neo Basic";
-   compatible = "udoo,neobasic", "fsl,imx6sx";
-
-   memory@8000 {
-   device_type = "memory";
-   reg = <0x8000 0x2000>;
-   };
-};
-
- {
-   phy-handle = <>;
-   status = "okay";
-
-   mdio {
-   #address-cells = <1>;
-   #size-cells = <0>;
-
-   ethphy1: ethernet-phy@0 {
-   compatible = "ethernet-phy-ieee802.3-c22";
-   reg = <0>;
-   };
-   };
-};
diff --git a/arch/arm/dts/imx6sx-udoo-neo-extended.dts 
b/arch/arm/dts/imx6sx-udoo-neo-extended.dts
deleted file mode 100644
index 5817b4985391..
--- a/arch/arm/dts/imx6sx-udoo-neo-extended.dts
+++ /dev/null
@@ -1,26 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2016 Andreas Färber
- */
-
-/dts-v1/;
-
-#include "imx6sx-udoo-neo.dtsi"
-
-/ {
-   model = "UDOO Neo Extended";
-   compatible = "udoo,neoextended", "fsl,imx6sx";
-
-   memory@8000 {
-   device_type = "memory";
-   reg = <0x8000 0x4000>;
-   };
-};
-
- { /* Onboard Motion sensors */
-   status = "okay";
-};
-
- { /* Bluetooth */
-   status = "okay";
-};
diff --git a/arch/arm/dts/imx6sx-udoo-neo-full.dts 
b/arch/arm/dts/imx6sx-udoo-neo-full.dts
deleted file mode 100644
index 96f4d89848a3..
--- a/arch/arm/dts/imx6sx-udoo-neo-full.dts
+++ /dev/null
@@ -1,41 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2016 Andreas Färber
- */
-
-/dts-v1/;
-
-#include "imx6sx-udoo-neo.dtsi"
-
-/ {
-   model = "UDOO Neo Full";
-   compatible = "udoo,neofull", "fsl,imx6sx";
-
-   memory@8000 {
-   device_type = "memory";
-   reg = <0x8000 0x4000>;
-   };
-};
-
- {
-   phy-handle = <>;
-   status = "okay";
-
-   mdio {
-   #address-cells = <1>;
-   #size-cells = <0>;
-
-   ethphy1: ethernet-phy@0 {
-   compatible = "ethernet-phy-ieee802.3-c22";
-   reg = <0>;
-   };
-   };
-};
-
- { /* Onboard Motion sensors */
-   status = "okay";
-};
-
- { /* Bluetooth */
-   status = "okay";
-};
diff --git a/arch/arm/dts/imx6sx-udoo-neo.dtsi 
b/arch/arm/dts/imx6sx-udoo-neo.dtsi
deleted file mode 100644
index c84ea1fac5e9..
--- a/arch/arm/dts/imx6sx-udoo-neo.dtsi
+++ /dev/null
@@ -1,482 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2016 Andreas Färber
- */
-
-#include "imx6sx.dtsi"
-
-/ {
-   compatible = "fsl,imx6sx";
-
-   chosen {
-   stdout-path = "serial0:115200n8";
-   };
-
-   

[PATCH v2 3/4] udoo-neo: Do not print devicetree model

2024-07-19 Thread Fabio Estevam
The udoo_neo_defconfig target supports several board variants.
All of these variants use the imx6sx-udoo-neo-basic devicetree in U-Boot.

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

...
Model: UDOO Neo Basic
Board: UDOO Neo FULL
...

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

Unselect the CONFIG_DISPLAY_BOARDINFO option and move the board printing
inside board_init() so that only the real board name that is detected
in run-time is printed.

Signed-off-by: Fabio Estevam 
---
Changes since v1:
- Newly introduced.

 board/udoo/neo/neo.c   | 43 +-
 configs/udoo_neo_defconfig |  1 +
 2 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 1a0aaecc3328..4cf214bf17c6 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -136,8 +136,25 @@ static int setup_fec(void)
return enable_fec_anatop_clock(0, ENET_25MHZ);
 }
 
+static char *board_string(int type)
+{
+   switch (type) {
+   case UDOO_NEO_TYPE_BASIC:
+   return "BASIC";
+   case UDOO_NEO_TYPE_BASIC_KS:
+   return "BASICKS";
+   case UDOO_NEO_TYPE_FULL:
+   return "FULL";
+   case UDOO_NEO_TYPE_EXTENDED:
+   return "EXTENDED";
+   }
+   return "UNDEFINED";
+}
+
 int board_init(void)
 {
+   int *board_type = (int *)OCRAM_START;
+
/* Address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
@@ -149,6 +166,8 @@ int board_init(void)
gpio_request(IMX_GPIO_NR(4, 16), "ncp692");
gpio_direction_output(IMX_GPIO_NR(4, 16) , 1);
 
+   printf("Board: UDOO Neo %s\n", board_string(*board_type));
+
setup_fec();
 
return 0;
@@ -179,30 +198,6 @@ int board_mmc_init(struct bd_info *bis)
return fsl_esdhc_initialize(bis, _cfg[0]);
 }
 
-static char *board_string(int type)
-{
-   switch (type) {
-   case UDOO_NEO_TYPE_BASIC:
-   return "BASIC";
-   case UDOO_NEO_TYPE_BASIC_KS:
-   return "BASICKS";
-   case UDOO_NEO_TYPE_FULL:
-   return "FULL";
-   case UDOO_NEO_TYPE_EXTENDED:
-   return "EXTENDED";
-   }
-   return "UNDEFINED";
-}
-
-/* Override the default implementation, DT model is not accurate */
-int checkboard(void)
-{
-   int *board_type = (int *)OCRAM_START;
-
-   printf("Board: UDOO Neo %s\n", board_string(*board_type));
-   return 0;
-}
-
 int board_late_init(void)
 {
int *board_type = (int *)OCRAM_START;
diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index 97e3b379835f..826d5a115043 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -25,6 +25,7 @@ CONFIG_BOARD_SIZE_LIMIT=523264
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd"
 CONFIG_SYS_PBSIZE=532
+# CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL_SYS_MALLOC=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_FS_EXT4=y
-- 
2.34.1



[PATCH v2 2/4] udoo_neo: Select LTO

2024-07-19 Thread Fabio Estevam
u-boot.img has grown in such a way that it overwrites the
environment region.

Select CONFIG_LTO to help reducing the U-Boot binary size
and add a build-time size check to avoid U-Boot to overlap
the environment region.

Signed-off-by: Fabio Estevam 
---
Changes since v1:
- Newly introduced.

 configs/udoo_neo_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index 9f9ad0ad5ec7..97e3b379835f 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -19,6 +19,9 @@ CONFIG_SPL_SERIAL=y
 CONFIG_SPL=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 # CONFIG_CMD_BMODE is not set
+CONFIG_LTO=y
+CONFIG_HAS_BOARD_SIZE_LIMIT=y
+CONFIG_BOARD_SIZE_LIMIT=523264
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd"
 CONFIG_SYS_PBSIZE=532
-- 
2.34.1



[PATCH v2 1/4] udoo_neo: Convert to watchdog driver model

2024-07-19 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.

With the watchdog driver model in place, it is no longer needed
to have board code to initialize the watchdog, so remove
its related board code.

Signed-off-by: Fabio Estevam 
---
Changes since v1:
- Remove board wdog board code.

 arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi | 12 
 board/udoo/neo/neo.c   | 16 
 configs/udoo_neo_defconfig |  3 +++
 3 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi 
b/arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi
index b5e1f2b9a16f..7f5a6424bac8 100644
--- a/arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi
+++ b/arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi
@@ -1,5 +1,13 @@
 // SPDX-License-Identifier: GPL-2.0+
 
+/ {
+   wdt-reboot {
+   compatible = "wdt-reboot";
+   wdt = <>;
+   bootph-pre-ram;
+   };
+};
+
  {
bootph-all;
 };
@@ -15,3 +23,7 @@
  {
bootph-all;
 };
+
+ {
+   bootph-pre-ram;
+};
diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index b435b721e53c..1a0aaecc3328 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -57,9 +57,6 @@ enum {
 #define ENET_RX_PAD_CTRL  (PAD_CTL_PKE | PAD_CTL_PUE |  \
PAD_CTL_SPEED_MED   | PAD_CTL_SRE_FAST)
 
-#define WDOG_PAD_CTRL (PAD_CTL_PUE | PAD_CTL_PKE | PAD_CTL_SPEED_MED | \
-   PAD_CTL_DSE_40ohm)
-
 #define BOARD_DETECT_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED |   \
PAD_CTL_DSE_34ohm | PAD_CTL_HYS | PAD_CTL_SRE_FAST)
@@ -113,10 +110,6 @@ static iomux_v3_cfg_t const phy_control_pads[] = {
MUX_PAD_CTRL(ENET_CLK_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const wdog_b_pad = {
-   MX6_PAD_GPIO1_IO13__GPIO1_IO_13 | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const peri_3v3_pads[] = {
MX6_PAD_QSPI1A_DATA0__GPIO4_IO_16 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
@@ -148,15 +141,6 @@ int board_init(void)
/* Address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
-   /*
-* Because kernel set WDOG_B mux before pad with the commone pinctrl
-* framwork now and wdog reset will be triggered once set WDOG_B mux
-* with default pad setting, we set pad setting here to workaround this.
-* Since imx_iomux_v3_setup_pad also set mux before pad setting, we set
-* as GPIO mux firstly here to workaround it.
-*/
-   imx_iomux_v3_setup_pad(wdog_b_pad);
-
/* Enable PERI_3V3, which is used by SD2, ENET, LVDS, BT */
imx_iomux_v3_setup_multiple_pads(peri_3v3_pads,
 ARRAY_SIZE(peri_3v3_pads));
diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index 4986b4c26260..9f9ad0ad5ec7 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -61,5 +61,8 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_ANATOP=y
 CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
+CONFIG_IMX_WATCHDOG=y
-- 
2.34.1



[PATCH] udoo_neo: Convert to watchdog driver model

2024-07-19 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/imx6sx-udoo-neo-basic-u-boot.dtsi | 12 
 configs/udoo_neo_defconfig |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi 
b/arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi
index b5e1f2b9a16f..7f5a6424bac8 100644
--- a/arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi
+++ b/arch/arm/dts/imx6sx-udoo-neo-basic-u-boot.dtsi
@@ -1,5 +1,13 @@
 // SPDX-License-Identifier: GPL-2.0+
 
+/ {
+   wdt-reboot {
+   compatible = "wdt-reboot";
+   wdt = <>;
+   bootph-pre-ram;
+   };
+};
+
  {
bootph-all;
 };
@@ -15,3 +23,7 @@
  {
bootph-all;
 };
+
+ {
+   bootph-pre-ram;
+};
diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index 4986b4c26260..9f9ad0ad5ec7 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -61,5 +61,8 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_ANATOP=y
 CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
+CONFIG_IMX_WATCHDOG=y
-- 
2.34.1



Re: [PATCH] imx93-u-boot: Describe the CPU clocks in the devicetree

2024-07-19 Thread Fabio Estevam
Hi Sébastien,

On Fri, Jul 19, 2024 at 12:47 PM Sébastien Szymanski
 wrote:

> I did look at imx8mm.dtsi but the clock IMX8MM_CLK_ARM is not defined in
> U-Boot and in Linux it's defined as:
>
> hws[IMX8MM_CLK_ARM] = imx_clk_hw_cpu("arm", "arm_a53_core",
>   hws[IMX8MM_CLK_A53_CORE]->clk,
>  hws[IMX8MM_CLK_A53_CORE]->clk,
>   hws[IMX8MM_ARM_PLL_OUT]->clk,
>  hws[IMX8MM_CLK_A53_DIV]->clk);
>
> So in Linux for the i.MX93, the clocks property in the device tree has
> to be IMX93_CLK_A55_CORE:
>
> clks[IMX93_CLK_A55_CORE] = imx_clk_hw_cpu("a55_core", "a55_sel",
> clks[IMX93_CLK_A55_SEL]->clk,
> clks[IMX93_CLK_A55_SEL]->clk,
> clks[IMX93_CLK_ARM_PLL]->clk,
> clks[IMX93_CLK_A55_GATE]->clk);
>
> ?

Yes, that's correct. I will use IMX93_CLK_A55_CORE when upstreaming it.

At some point, we should align these clock names between Linux and U-Boot.

For now, as I am touching arch/arm/dts/imx93-u-boot.dtsi this is OK
for U-Boot purposes.

Thanks


Re: [PATCHv1 1/2] mp: imx8m: add cpu command support

2024-07-19 Thread Fabio Estevam
Hi Zhiqiang,

On Fri, Jul 19, 2024 at 11:01 AM Z.Q. Hou  wrote:

> This patch is to add the needed functions to enable cmd/mp.c, which is well 
> known, so I don't think it's necessary to add an example to the commit log.

I have never used cmd/mp.c. I see several other Layerscape boards use it.

How did you test this series?

Please share more information about it in the commit log, such as the
command line you tested, which OS was used, etc.

This is important information in the commit log as you introduce a new feature.




>
> >
> > > --- /dev/null
> > > +++ b/arch/arm/mach-imx/imx8m/mp.c
> >
> > What does mp mean?
>
> Short of 'multiprocessor', the same mean as cmd/mp.c.
>
> Thanks,
> Zhiqiang


Re: [PATCH] imx93-u-boot: Describe the CPU clocks in the devicetree

2024-07-19 Thread Fabio Estevam
Hi Sébastien,

On Fri, Jul 19, 2024 at 11:00 AM Sébastien Szymanski
 wrote:

> > +_0 {
> > + clocks = < IMX93_CLK_ARM_PLL>;
>
> Why IMX93_CLK_ARM_PLL and not IMX93_CLK_A55_SEL ?

IMX93_CLK_A55_SEL is a mux that can select between a55_alt versus arm_pll.

The real CPU clock is IMX93_CLK_ARM_PLL, so this one better represents it.

This is also consistent with the other i.MX8M SoCs.

Take imx8mm.dtsi for example:

A53_0: cpu@0 {

 clocks = < IMX8MM_CLK_ARM>;

This also uses the "real" CPU clock, not the mux one (imx8mm_a53_sels).

I also plan to upstream this clock change to the Linux devicetree.

Thanks


Re: [PATCHv1 1/2] mp: imx8m: add cpu command support

2024-07-19 Thread Fabio Estevam
On Fri, Jul 19, 2024 at 6:47 AM Zhiqiang Hou  wrote:
>
> From: Hou Zhiqiang 
>
> Implement the cpu command to kick cpu core to run barematel or RTOS
> applications.

s/barematel/baremetal

Please add documentation explaining how to run this command, how it
was tested, etc.

> --- /dev/null
> +++ b/arch/arm/mach-imx/imx8m/mp.c

What does mp mean?


Re: [PATCH] imx: hab: Make imx_hab_is_enabled dependent on FIELD_RETURN

2024-07-18 Thread Fabio Estevam
Hi Ye Li,

On Tue, Jul 2, 2024 at 6:09 AM Paul Geurts
 wrote:

> > Thanks for confirm. I also cross checked with teams. 8MP must burn a
> > pattern. Otherwise HAB won't covert to field return.
>
> Okay, thanks for checking, I will wait for the details and make the necessary 
> adjustments

Please let us know if you have more information on this so we can
proceed with this patch.

Thanks


[PATCH] imx93-u-boot: Describe the CPU clocks in the devicetree

2024-07-18 Thread Fabio Estevam
Currently, there is an error when the i.MX93 CPU frequency is
read:

Could not read CPU frequency: -2
CPU:   NXP i.MX93(52) Rev1.1 A55 at 0 MHz

Fix it by describing the A55 clock nodes in the devicetree, like done
on other i.MX SoCs.

With this change, the CPU frequency error is gone and it can be correctly
retrieved:

CPU:   NXP i.MX93(52) Rev1.1 A55 at 1700 MHz
CPU:   Industrial temperature grade  (-40C to 105C) at 35C

As the upstream imx93.dtsi does not describe the CPU clocks,
keep the clock node in imx93-u-boot.dtsi for now.

Signed-off-by: Fabio Estevam 
---
 arch/arm/dts/imx93-u-boot.dtsi | 8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/dts/imx93-u-boot.dtsi b/arch/arm/dts/imx93-u-boot.dtsi
index 289aba175843..b2b3d57318fc 100644
--- a/arch/arm/dts/imx93-u-boot.dtsi
+++ b/arch/arm/dts/imx93-u-boot.dtsi
@@ -9,6 +9,14 @@
};
 };
 
+_0 {
+   clocks = < IMX93_CLK_ARM_PLL>;
+};
+
+_1 {
+   clocks = < IMX93_CLK_ARM_PLL>;
+};
+
  {
u-boot-spl-ddr {
align = <4>;
-- 
2.34.1



Re: [PATCH 1/4] clk: imx: clk-imx8mn Fix nand and spi clock parent

2024-07-10 Thread Fabio Estevam
On Wed, Jul 10, 2024 at 10:39 AM Michael Nazzareno Trimarchi
 wrote:

> clk dump
>
> It's how uboot is registering the clk in dts. My idea now was not to
> change it to not impact other architectures.
> I have a lot of changes but I don't want to address regression and fix
> and test before send more patches

Ok, I see that 'clock-osc-24m' is already used in U-Boot by the other
peripherals.

Your change looks correct.

Ideally, we should use 'osc_24m' in the future to align with the
kernel, but that's a different task.


Re: [PATCH 1/4] clk: imx: clk-imx8mn Fix nand and spi clock parent

2024-07-10 Thread Fabio Estevam
Hi Michael,

On Sun, Jul 7, 2024 at 5:20 AM Michael Trimarchi
 wrote:

> -static const char *imx8mn_ecspi1_sels[] = {"osc_24m", "sys_pll2_200m", 
> "sys_pll1_40m",
> +static const char *imx8mn_ecspi1_sels[] = {"clock-osc-24m", "sys_pll2_200m", 
> "sys_pll1_40m",

The kernel uses osc_24m. Why does U-Boot need to be different?


Re: [PATCH] mx9: Correct repeatable build error

2024-07-06 Thread Fabio Estevam
On Tue, Jul 2, 2024 at 12:38 PM Simon Glass  wrote:
>
> For some reason every second time imx93_11x11_evk is built it gives an
> error:
>
>make O=/tmp/x BINMAN_ALLOW_MISSING=1
>
> It seems to sometimes skip generation of the .cfgout file and then
> eventually Binman complains:
>
>ValueError: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n
>   spl/u-boot-spl.cfgout -T imx8image -e 0x2049A000
>   ./mkimage-out.spl.mkimage': Fail open first container file
>   mx93a1-ahab-container.img
>
> Correct this by using if_changed instead of if_changed_dep
>
> The only reason this hasn't come up in CI is that buildman did not retry
> failing builds of current source, but now it does.
>
> Note: The logic in this Makefile should be moved to Binman, e.g. these
> warnings duplicate Binman functionality:
>
>   WARNING 'bl31.bin' not found, resulting binary may be not-functional
>   WARNING 'tee.bin' not found, resulting binary may be not-functional
>
> Signed-off-by: Simon Glass 

This breaks imx93_11x11_evk_defconfig:

  BINMAN  .binman_stamp
Wrote map file './spl.map' to show errors
binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n
spl/u-boot-spl.cfgout -T imx8image -e 0x2049A000
./mkimage-out.spl.mkimage': Error: spl/u-boot-spl.cfgout - Can't open
cfg file

make: *** [Makefile:1126: .binman_stamp] Error 1


Re: [PATCH V2 0/2] Support imx8m composite mux

2024-07-06 Thread Fabio Estevam
On Fri, Jul 5, 2024 at 4:30 AM Michael Trimarchi
 wrote:
>
> The mux ops for i.MX8M composite clk needs to be specialized.
> In order to reduce the code duplication we need to make public some
> interface and write a specific function in the mux ops. Those patches
> implement the behavior.
>
> Addressed comment in V1
>
> Michael Trimarchi (2):
>   clk: clk-mux: Make public the clk_fetch_parent_index
>   clk: imx: add mux ops for i.MX8M composite clk

Applied both, thanks.


Re: [PATCH 1/2] clk: imx: Fix wrong flags assignment clk-composite-8m

2024-07-06 Thread Fabio Estevam
On Tue, Jul 2, 2024 at 7:26 AM Michael Trimarchi
 wrote:
>
> The mux flags (u8), div flags (u8), and gate flags (u8)  are not the clk
> flags (unsigned long). They have different meanings
>
> Signed-off-by: Michael Trimarchi 

Applied both, thanks.


Re: [PATCH 1/2] ARM: imx: Enable PCA953x driver on DH i.MX8MP DHCOM PDK2

2024-07-06 Thread Fabio Estevam
On Wed, Jun 26, 2024 at 9:14 PM Marek Vasut  wrote:
>
> Enable PCA953x GPIO expander driver in DH i.MX8MP DHCOM PDK2 configuration.
> The PCA9539 GPIO expander is used on production DH i.MX8MP DHCOM SoM rev.200.
> This is already enabled in DH i.MX8MP DHCOM PDK3 configuration so align the
> two configurations.
>
> Fixes: 9de599ec3d59 ("arm64: dts: imx8mp: Update i.MX8MP DHCOM SoM DT to 
> production rev.200")
> Signed-off-by: Marek Vasut 

Applied both, thanks.


Re: [PATCH] ARM: imx: Enable cat and xxd commands on DH i.MX8M Plus DHCOM

2024-07-06 Thread Fabio Estevam
On Wed, Jun 26, 2024 at 9:01 PM Marek Vasut  wrote:
>
> Enable 'cat' command to print file from filesystem to stdout.
> Enable 'xxd' command to hexdump file from filesystem to stdout.
>
> Signed-off-by: Marek Vasut 

Applied, thanks.


Re: [PATCH v3] ARM: imx: verdin-imx8mm: Set CAN oscillator frequency based on model

2024-07-06 Thread Fabio Estevam
On Tue, Jun 25, 2024 at 5:26 AM Marek Vasut  wrote:
>
> The older i.MX8M Mini Verdin SoMs may came with 20 MHz SPI CAN controller
> oscillator, the newer SoMs always use 40 MHz oscillator. Handle both by
> overriding the oscillator frequency just before booting the kernel.
>
> These are the known variants with 20 MHz oscillator:
> - 0055, V1.1A, V1.1B, V1.1C and V1.1D, use a 20MHz oscillator
> - 0059, V1.1A and V1.1B, use a 20MHz oscillator
>
> Signed-off-by: Marek Vasut 

Applied, thanks.


Re: [PATCH] configs: phycore-imx8mp_defconfig: Initialize caam

2024-07-06 Thread Fabio Estevam
On Fri, Jul 5, 2024 at 9:11 AM Leonard Anderweit  wrote:
>
> Initialize the Cryptographic Accelerator and Assurance Module.
>
> Signed-off-by: Leonard Anderweit 

Applied, thanks.


Re: [PATCH v2] msc_sm2s_imx8mp: Adjust the initrd_addr location

2024-07-06 Thread Fabio Estevam
On Thu, Jul 4, 2024 at 9:03 AM Fabio Estevam  wrote:
>
> From: Fabio Estevam 
>
> Booting an initramfs with the current initrd_addr address may lead to
> initramfs corruption and boot failure.
>
> Fix the initramfs problem by applying the following layout
> suggested by Tom Rini:
>
> loadaddr=0x4048 --> Gets moved to 0x4060 in run-time:
>
>Uncompressing Kernel Image
> Moving Image from 0x4048 to 0x4060, end=41e8
>
> fdt_addr_r= moved loadaddr + 128 MiB = 0x4860
>
> initrd_addr=fdt_addr_r + 512 KiB = 0x4868
>
> Signed-off-by: Fabio Estevam 
> Tested-by: Stefano Babic 

Applied, thanks.


Re: [PATCH 1/1] mmc: fsl_esdhc_imx: Fix error message

2024-07-06 Thread Fabio Estevam
On Fri, Jul 5, 2024 at 11:26 AM Alexander Stein
 wrote:
>
> Add missing newline character and also add the return code of
> regulator_set_value() to the output.
>
> Signed-off-by: Alexander Stein 

Applied, thanks.


Re: [PATCH] ARM: dts: imx8mp-beacon-kit-u-boot: Drop EQoS clock work-around

2024-07-06 Thread Fabio Estevam
On Thu, Jul 4, 2024 at 6:22 PM Adam Ford  wrote:
>
> Since commit ecb1c37a7b64 ("clk: imx8mp: Add EQoS MAC clock"),
> the clocks for the DWMAC driver can be configured, and removing
> them breaks operation.
>
> Fixes: ecb1c37a7b64 ("clk: imx8mp: Add EQoS MAC clock")
> Suggested-by: Tim Harvey 
> Signed-off-by: Adam Ford 

Applied, thanks.


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

2024-07-06 Thread Fabio Estevam
Hi Tom,

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

The following changes since commit fd46ea0e701920eb205c2bce9d527bf0dec10b59:

  Merge branch '2024-07-05-assorted-updates' (2024-07-05 16:36:43 -0600)

are available in the Git repository at:

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

for you to fetch changes up to 3d4c29258f8b4c4a5cf4ce79fb1ac80f66e4cf65:

  clk: imx: add mux ops for i.MX8M composite clk (2024-07-06 15:40:04 -0300)

u-boot-imx-master-20240706
--

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

- Fixes for i.MX8M and i.MX93 clk-composite.
- Set CAN oscillator frequency based on model on verdin-imx8mm.
- Enable CAAM for phycore-imx8mp_defconfig.
- Miscellaneous improvements for Gateworks i.MX8M boards.
- Fix initramfs boot on msc_sm2s_imx8mp.
- Fixe EQoS on imx8mp-beacon-kit.
- Fix error message in fsl_esdhc_imx.

Adam Ford (1):
  ARM: dts: imx8mp-beacon-kit-u-boot: Drop EQoS clock work-around

Alexander Stein (1):
  mmc: fsl_esdhc_imx: Fix error message

Fabio Estevam (1):
  msc_sm2s_imx8mp: Adjust the initrd_addr location

Leonard Anderweit (1):
  configs: phycore-imx8mp_defconfig: Initialize caam

Marek Vasut (4):
  ARM: imx: verdin-imx8mm: Set CAN oscillator frequency based on model
  ARM: imx: Enable cat and xxd commands on DH i.MX8M Plus DHCOM
  ARM: imx: Enable PCA953x driver on DH i.MX8MP DHCOM PDK2
  ARM: imx: Update Fast ethernet PHY MDIO addresses to match DH i.MX8MP 
DHCOM rev.200

Michael Trimarchi (4):
  clk: imx: Fix wrong flags assignment clk-composite-8m
  clk: imx: Fix wrong flags assignment clk-composite-93
  clk: clk-mux: Make public the clk_fetch_parent_index
  clk: imx: add mux ops for i.MX8M composite clk

 arch/arm/dts/Makefile|  1 +
 arch/arm/dts/imx8mp-beacon-kit-u-boot.dtsi   |  6 
 arch/arm/dts/imx8mp-dhcom-som-overlay-rev100.dts |  5 +++
 arch/arm/dts/imx8mp-dhcom-som.dtsi   |  8 ++---
 board/toradex/verdin-imx8mm/verdin-imx8mm.c  | 29 +
 configs/imx8mp_dhcom_pdk2_defconfig  |  3 ++
 configs/imx8mp_dhcom_pdk3_defconfig  |  2 ++
 configs/phycore-imx8mp_defconfig |  5 ++-
 drivers/clk/clk-mux.c|  5 ++-
 drivers/clk/imx/clk-composite-8m.c   | 41 +---
 drivers/clk/imx/clk-composite-93.c   |  2 --
 drivers/mmc/fsl_esdhc_imx.c  |  4 +--
 include/configs/msc_sm2s_imx8mp.h|  4 +--
 include/linux/clk-provider.h |  1 +
 14 files changed, 92 insertions(+), 24 deletions(-)


Re: [PATCH] msc_sm2s_imx8mp: Adjust the initrd_addr location

2024-07-04 Thread Fabio Estevam
Hi Tom,

On Wed, Jul 3, 2024 at 3:22 PM Tom Rini  wrote:

> How is the fdt at 0x4300 not being clobbered if the initramfs at
> 0x4380 is? Is it because it's just enough of a bad spot that we
> relocate the fdt out of the way? With the kernel at 0x4048
> everything else is too low. kernel address + 128MiB for fdt address, then
> +512KiB (or a bit more, for nicer numbers) for initrd.

Thanks for the suggestion, it works.

I sent a v2 with that proposal.

Thanks


[PATCH v2] msc_sm2s_imx8mp: Adjust the initrd_addr location

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

Booting an initramfs with the current initrd_addr address may lead to
initramfs corruption and boot failure.

Fix the initramfs problem by applying the following layout
suggested by Tom Rini:

loadaddr=0x4048 --> Gets moved to 0x4060 in run-time:

   Uncompressing Kernel Image
Moving Image from 0x4048 to 0x4060, end=41e8

fdt_addr_r= moved loadaddr + 128 MiB = 0x4860

initrd_addr=fdt_addr_r + 512 KiB = 0x4868

Signed-off-by: Fabio Estevam 
Tested-by: Stefano Babic 
---
Changes since v2:
- Apply Tom's suggested layout.
- Added Stefano's Tested-by.

 include/configs/msc_sm2s_imx8mp.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/configs/msc_sm2s_imx8mp.h 
b/include/configs/msc_sm2s_imx8mp.h
index 3c7d96cb3c0..d0c5da7b98d 100644
--- a/include/configs/msc_sm2s_imx8mp.h
+++ b/include/configs/msc_sm2s_imx8mp.h
@@ -36,10 +36,10 @@
"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
"image=Image\0" \
"console=ttymxc1,115200\0" \
-   "fdt_addr_r=0x4300\0"   \
+   "fdt_addr_r=0x4860\0"   \
"boot_fdt=try\0" \
"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
-   "initrd_addr=0x4380\0"  \
+   "initrd_addr=0x4868\0"  \
"bootm_size=0x1000\0" \
"mmcpart=1\0" \
"mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
-- 
2.34.1



Re: [PATCH] msc_sm2s_imx8mp: Adjust the initrd_addr location

2024-07-03 Thread Fabio Estevam
Hi Tom,

On Wed, Jul 3, 2024 at 3:03 PM Tom Rini  wrote:

> Shouldn't fdt_addr_r change too? This is making me suspect the whole map
> is too small for safety, how much memory does the platform have at
> minimum?

It has 2GB of RAM.

Changing only initrd_addr and keeping fdt_addr_r unchanged allows a
successful initramfs boot.


[PATCH] msc_sm2s_imx8mp: Adjust the initrd_addr location

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

Booting an initramfs with the current address may lead to initramfs
corruption and boot failure.

Move it 0x4800 which avoids initramfs overlap and allows a
successful initramfs boot.

Signed-off-by: Fabio Estevam 
---
 include/configs/msc_sm2s_imx8mp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/msc_sm2s_imx8mp.h 
b/include/configs/msc_sm2s_imx8mp.h
index 3c7d96cb3c0a..2a52455ace34 100644
--- a/include/configs/msc_sm2s_imx8mp.h
+++ b/include/configs/msc_sm2s_imx8mp.h
@@ -39,7 +39,7 @@
"fdt_addr_r=0x4300\0"   \
"boot_fdt=try\0" \
"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
-   "initrd_addr=0x4380\0"  \
+   "initrd_addr=0x4800\0"  \
"bootm_size=0x1000\0" \
"mmcpart=1\0" \
"mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
-- 
2.34.1



Re: [PATCH 2/2] clk: imx: add mux ops for i.MX8M composite clk

2024-07-03 Thread Fabio Estevam
Hi Michael,

On Wed, Jul 3, 2024 at 6:15 AM Michael Trimarchi
 wrote:
>
> Upstream Linux commit f90b68d6c8b0.


> The CORE/BUS root slice has following design, simplied graph:
> The difference is core not have pre_div block.
> A composite core/bus clk has 8 inputs for mux to select, saying clk[0-7].
>
> It support target(smart) interface and normal interface. Target interface
> is exported for programmer easy to configure ccm root. Normal interface
> is also exported, but we not use it in our driver, because it will
> introduce more complexity compared with target interface.
>
> The normal interface simplified as below:
> SEL_A  GA
> +--+  +-+
> |  +->+ +--+
> CLK[0-7]--->+  |  +-+  |
>||  |  +v---+++
>|+--+  |pre_diva+>|  +-+
>|  ++|mux +--+post_div |
>|+--+  |pre_divb+--->+|  +-+
>||  |  +^---+++
>+--->+  |  +-+  |
> |  +->+ +--+
> +--+  +-+
> SEL_B  GB
>
> The mux in the upper pic is not the target interface MUX, target
> interface MUX is hiding SEL_A and SEL_B. When you choose clk[0-7],
> you are actually writing SEL_A or SEL_B depends on the internal
> counter which will also control the internal "mux".
>
> The target interface simplified as below which is used by Linux Kernel:
> CLK[0-7]--->MUX-->Gate-->pre_div-->post_div
>
> A requirement of the Target Interface's software is that the
> target clock source is active, it means when setting SEL_A, the
> current input clk to SEL_A must be active, same to SEL_B.
>
> We touch target interface, but hardware logic actually also need
> configure normal interface.
>
> There will be system hang, when doing the following steps:
> The initial state:
> SEL_A/SEL_B are both sourcing from clk0, the internal counter
> choose SEL_A.
> 1. switch mux from clk0 to clk1
>The hardware logic will choose SEL_B and configure SEL_B to clk1.
>SEL_A no changed.
> 2. gate off clk0
>Disable clk0, then the input to SEL_A is off.
> 3. switch from clk1 to clk2
>The hardware logic will choose SEL_A and configure SEL_A to clk2,
>however the current SEL_A input clk0 is off, the system hang.
>
> The solution to fix the issue is in step 1, write twice to
> target interface MUX, it will make SEL_A/SEL_B both sources
> from clk1, then no need to care about the state of clk0. And
> finally system performs well.

Shouldn't this also contain the original kernel commit author's Signed-off-by?

> Signed-off-by: Michael Trimarchi 


Re: [PATCH 1/2] spi: soft_spi: fix miso gpio property name

2024-07-02 Thread Fabio Estevam
Hi Mikhail,

On Tue, Jul 2, 2024 at 10:16 PM Mikhail Kshevetskiy
 wrote:
>
> The patch fix a missprint introduced in commit 2e9fe73a883a ("spi: soft_spi:
> Support the recommended soft spi properties").
>
> Signed-off-by: Mikhail Kshevetskiy 

Thanks for the fix:

Reviewed-by: Fabio Estevam 


Re: [PATCH 1/2] spi: soft_spi: fix miso gpio property name

2024-07-02 Thread Fabio Estevam
Hi Mikhail,

On Tue, Jul 2, 2024 at 6:50 AM Mikhail Kshevetskiy
 wrote:

> This is exactly what the patch did. Actually it just fix a miss-print.
> Other properties already have a proper fallback.

Ah, you are right.

I introduced this issue in commit 2e9fe73a883a ("spi: soft_spi:
Support the recommended soft spi properties").

Please add a commit log explaining this.

Reviewed-by: Fabio Estevam 

Thanks


Re: [PATCH 1/2] spi: soft_spi: fix miso gpio property name

2024-06-27 Thread Fabio Estevam
On Thu, Jun 27, 2024 at 8:31 AM Mikhail Kshevetskiy
 wrote:
>
> Signed-off-by: Mikhail Kshevetskiy 
> ---
>  drivers/spi/soft_spi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
> index 0fa14339bdc..3fe62818a44 100644
> --- a/drivers/spi/soft_spi.c
> +++ b/drivers/spi/soft_spi.c
> @@ -272,7 +272,7 @@ static int soft_spi_probe(struct udevice *dev)
> ret = gpio_request_by_name(dev, "gpio-miso", 0, >miso,
>GPIOD_IS_IN);
> if (ret)
> -   ret = gpio_request_by_name(dev, "gpio-miso", 0, >miso,
> +   ret = gpio_request_by_name(dev, "miso-gpios", 0, >miso,

We should support the deprecated 'gpio-miso' property and the
preferred 'miso-gpios' one.

The same applies for  gpio-sck and gpio-mosi.


>GPIOD_IS_IN);
> if (ret)
> plat->flags |= SPI_MASTER_NO_RX;
> --
> 2.43.0
>


Re: USB OTG mode for DWC3 (ie imx8mp) host controller with usb_ether USB Ethernet gadget?

2024-06-24 Thread Fabio Estevam
On Mon, Jun 24, 2024 at 4:54 PM Adam Ford  wrote:

> I think some people tried to push a Type-C driver if memory serves,
> but I think it was rejected.  I don't recall the details and my memory
> is terrible.  :-)

There is a recent series from Sebastian that adds USB Type-C support:

https://lore.kernel.org/u-boot/20240604163546.60225-1-sebastian.reic...@collabora.com/


Re: [PATCH] ARM: imx: Enable SPL DTO application support for i.MX8MP DHCOM PDK2

2024-06-24 Thread Fabio Estevam
On Sun, Jun 23, 2024 at 3:44 PM Marek Vasut  wrote:
>
> Enable SPL DTO support to apply matching SoM specific DTOs to cater
> for the SoM differences in DH i.MX8MP DHCOM PDK2 configuration. This
> is already enabled in DH i.MX8MP DHCOM PDK3 configuration so align
> the two configurations.
>
> Fixes: ad1158c50e0e ("arm64: dts: imx8mp: Switch to DT overlays for i.MX8MP 
> DHCOM SoM")
> Signed-off-by: Marek Vasut 

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


Re: [PATCH] imx8mp-venice-gw702x: Drop EQos clock workaround

2024-06-24 Thread Fabio Estevam
Hi Tim,

On Fri, Jun 21, 2024 at 12:42 PM Tim Harvey  wrote:

> Hi Fabio,
>
> It doesn't make much difference to me. This is a fix for a board model
> that was renamed from gw7905 to gw7500 anyway which is a change in
> dts/upstream I'm going to have to wait for anyway so you can leave it
> for next if you want. I actually have about 8 patches in my repo to
> dts/upstream from linux 6.9 and upcoming linux 6.10 as dts/upstream
> was last merged from v6.8.
>
> The set of 5 or so patches I sent in the last few days are all fixes
> of sorts and they are all isolated to board/gateworks/venice so don't
> affect anyone else.

Applied this one and your other patches to u-boot-imx/next, thanks.


Re: [PATCH] dt-bindings: imx: Drop redundant imports with dts/upstream

2024-06-24 Thread Fabio Estevam
On Wed, Jun 19, 2024 at 12:10 PM Sumit Garg  wrote:
>
> Drop redundant header imports with dts/upstream already providing
> updated headers which have been checked to be backwards compatibility.
>
> The imx headers which aren't present in dts/upstream are as follows:
>
> - include/dt-bindings/clock/imxrt1020-clock.h
> - include/dt-bindings/clock/imx8qm-clock.h
> - include/dt-bindings/clock/imxrt1170-clock.h
> - include/dt-bindings/clock/imx8qxp-clock.h
> - include/dt-bindings/memory/imxrt-sdram.h
> - include/dt-bindings/pinctrl/pads-imx8qxp.h
> - include/dt-bindings/pinctrl/pads-imx8qm.h
> - include/dt-bindings/soc/imx8_pd.h
> - include/dt-bindings/soc/imx_rsrc.h
>
> hence these aren't dropped yet but there was an unused header:
>
> - include/dt-bindings/pinctrl/pins-imx8mq.h
>
> which has been dropped as well. There shouldn't be any funtional impact
> with this change but it rather allows iMX platforms to use upstream
> dt-bindings headers in a backwards compatible manner.
>
> Signed-off-by: Sumit Garg 

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


Re: [PATCH] arm: fsl: imx6ulz_bsh_smm_m2: Migrate to OF_UPSTREAM

2024-06-24 Thread Fabio Estevam
On Thu, Jun 13, 2024 at 7:24 AM Patrick Barsanti
 wrote:
>
> Migrate imx6ulz_bsh_smm_m2 board to OF_UPSTREAM.
>
> Signed-off-by: Patrick Barsanti 

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


Re: [PATCH] arm: fsl: imx8mn_bsh_smm_s2: Migrate to OF_UPSTREAM

2024-06-24 Thread Fabio Estevam
On Mon, Jun 10, 2024 at 6:23 PM Patrick Barsanti
 wrote:
>
> Migrate imx8mn_bsh_smm_s2 and imx8mn_bsh_smm_s2pro boards to OF_UPSTREAM.
>
> Signed-off-by: Patrick Barsanti 
> Tested-by: Michael Trimarchi 

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


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

2024-06-24 Thread Fabio Estevam
Hi Tom,

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

The following changes since commit 81e2b69880566a90e909a7e2c02dff0c39a8c1e5:

  Merge patch series "boot: fix crash in bootflow menu with EFI BOOTMGR support 
+ typos" (2024-06-20 11:41:43 -0600)

are available in the Git repository at:

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

for you to fetch changes up to b7f677dc40429a8172c7ba5edcf3b426097e2881:

  ARM: imx: Enable SPL DTO application support for i.MX8MP DHCOM PDK2 
(2024-06-24 09:24:16 -0300)

u-boot-imx-next-20240624
--

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

- Enable SPL DTO application support for i.MX8MP DHCOM PDK2.
- Migrate imx8mn_bsh_smm_s2 and imx6ulz_bsh_smm_m2 to OF_UPSTREAM.
- Drop redundant imports with dts/upstream.
- Miscellaneous improvements for Gateworks i.MX8M boards.

Marek Vasut (1):
  ARM: imx: Enable SPL DTO application support for i.MX8MP DHCOM PDK2

Patrick Barsanti (2):
  arm: fsl: imx8mn_bsh_smm_s2: Migrate to OF_UPSTREAM
  arm: fsl: imx6ulz_bsh_smm_m2: Migrate to OF_UPSTREAM

Sumit Garg (1):
  dt-bindings: imx: Drop redundant imports with dts/upstream

Tim Harvey (7):
  board: gateworks: venice: enable GSC supervisor for new board models
  board: gateworks: venice: delay before reading GSC EEPROM
  board: gateworks: venice: add print for GPY111 PHY name
  imx8m{m,p}_venice: add NVMe to boot devices
  imx8mp-venice-gw74xx: default USB1 to host mode
  imx8mp-venice-gw702x: Drop EQos clock workaround
  board: gateworks: venice: Simplify Ethernet initialization

 arch/arm/dts/Makefile |   3 -
 arch/arm/dts/imx6ulz-bsh-smm-m2.dts   | 146 --
 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi| 426 -
 arch/arm/dts/imx8mn-bsh-smm-s2.dts|  48 --
 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts | 170 ---
 arch/arm/dts/imx8mp-venice-gw702x-u-boot.dtsi |   6 -
 arch/arm/dts/imx8mp-venice-gw74xx-u-boot.dtsi |   5 +
 arch/arm/mach-imx/imx8m/Kconfig   |   2 +
 arch/arm/mach-imx/mx6/Kconfig |   1 +
 board/gateworks/venice/spl.c  |  21 +-
 board/gateworks/venice/venice.c   |  22 +-
 configs/imx6ulz_smm_m2_defconfig  |   2 +-
 configs/imx8mn_bsh_smm_s2_defconfig   |   2 +-
 configs/imx8mn_bsh_smm_s2pro_defconfig|   2 +-
 configs/imx8mp_dhcom_pdk2_defconfig   |   3 +-
 include/configs/imx8mm_venice.h   |   1 +
 include/configs/imx8mp_venice.h   |   1 +
 include/dt-bindings/clock/imx5-clock.h| 219 -
 include/dt-bindings/clock/imx6qdl-clock.h | 278 ---
 include/dt-bindings/clock/imx6sl-clock.h  | 178 
 include/dt-bindings/clock/imx6sll-clock.h | 210 -
 include/dt-bindings/clock/imx6sx-clock.h  | 281 
 include/dt-bindings/clock/imx6ul-clock.h  | 262 ---
 include/dt-bindings/clock/imx7d-clock.h   | 456 ---
 include/dt-bindings/clock/imx7ulp-clock.h | 119 -
 include/dt-bindings/clock/imx8mm-clock.h  | 286 
 include/dt-bindings/clock/imx8mn-clock.h  | 262 ---
 include/dt-bindings/clock/imx8mp-clock.h  | 401 
 include/dt-bindings/clock/imx8mq-clock.h  | 431 --
 include/dt-bindings/clock/imx8ulp-clock.h | 258 ---
 include/dt-bindings/clock/imx93-clock.h   | 209 -
 include/dt-bindings/clock/imxrt1050-clock.h   |  72 ---
 include/dt-bindings/interconnect/fsl,imx8mp.h |  59 ---
 include/dt-bindings/interconnect/imx8mm.h |  50 --
 include/dt-bindings/interconnect/imx8mn.h |  41 --
 include/dt-bindings/interconnect/imx8mq.h |  48 --
 include/dt-bindings/phy/phy-imx8-pcie.h   |  14 -
 include/dt-bindings/pinctrl/pins-imx8mq.h | 632 --
 include/dt-bindings/power/fsl,imx93-power.h   |  15 -
 include/dt-bindings/power/imx7-power.h|  13 -
 include/dt-bindings/power/imx8mm-power.h  |  31 --
 include/dt-bindings/power/imx8mn-power.h  |  20 -
 include/dt-bindings/power/imx8mp-power.h  |  59 ---
 include/dt-bindings/power/imx8mq-power.h  |  24 -
 include/dt-bindings/power/imx8ulp-power.h |  26 --
 include/dt-bindings/reset/imx7-reset.h|  52 ---
 include/dt-bindings/reset/imx8mp-reset.h  |  50 --
 include/dt-bindings/reset/imx8mq-reset.h  |  67 ---
 include/dt-bindings/reset/imx8ulp-pcc-reset.h |  59 ---
 include/dt-bindings/sound/fsl-imx-audmux.h|  64 ---
 50 files changed, 37 insertions(+), 6070 deletions(-)
 delete mode 100644 arch/arm/dts/imx6ulz-bsh-smm-m2.dts
 delete mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi
 delete mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2.dts
 delete mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts
 

Re: [PATCH] imx: hab: Make imx_hab_is_enabled dependent on FIELD_RETURN

2024-06-24 Thread Fabio Estevam
Hi Paul,

On Fri, Jun 21, 2024 at 10:06 AM Paul Geurts
 wrote:

> -struct imx_sec_config_fuse_t {
> +struct imx_fuse_t {

Please make the struct renaming a separate patch.

Peng Fan, Ye Li,

Could you please help review this patch?

Thanks


Re: [PATCH v4 00/14] Introduce the lwIP network stack

2024-06-21 Thread Fabio Estevam
Hi Tim and Jerome,

On Fri, Jun 21, 2024 at 1:08 PM Tim Harvey  wrote:

> I tried your to-upstream/v5-wip branch
> (042bea36eb9731079a3d7afffe3774d79e06ac5d) and it behaves the same. Do
> you have something else to try/test?

Yes, when I tested older versions from Maxim I could never get lwIP to
work with i.MX.

Jerome,

Please try to run the lwIP series on any i.MX board, if possible.

Thanks


Re: [PATCH] imx8mp-venice-gw702x: Drop EQos clock workaround

2024-06-21 Thread Fabio Estevam
Hi Tim,

On Wed, Jun 19, 2024 at 10:30 PM Tim Harvey  wrote:
>
> The assigned-clock no longer have to be dropped, the clock are now
> defined in clk-imx8mp.c and used by DWMAC driver to configure the
> DWMAC clock. Drop the workarounds from U-Boot specific DT extras.
>
> Having the clocks dropped causes the EQoS to be non-functional.
>
> See commit c7ea9612df0f ("arm64: dts: imx8mp: Drop EQoS clock
> workaround").
>
> Fixes: 48c6f9777cee ("board: gateworks: venice: add imx8mp-gw7905-2x support")
> Signed-off-by: Tim Harvey 

Is this targetted for master or next?


Re: [PATCH] imx8mp-venice-gw74xx: fix USB host

2024-06-19 Thread Fabio Estevam
Hi Tim,

On Wed, Jun 19, 2024 at 6:27 PM Tim Harvey  wrote:
>
> Signed-off-by: Tim Harvey 

Please write a commit message.


Re: [PATCH v6 4/4] test: cmd: fdt: fix chosen test for DM_RNG

2024-06-18 Thread Fabio Estevam
Hi Tim,

On Tue, Jun 18, 2024 at 4:30 PM Tim Harvey  wrote:

> This seems like something from test/dm/wdt.c and unrelated to my patchset.

Do you have this recent commit applied?

https://github.com/u-boot/u-boot/commit/1fd754cebd38d7456caa82bef15225cbe77960ec


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

2024-06-14 Thread Fabio Estevam
Hi Tom,

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

The following changes since commit ca6a992e09441d6cca73439c63c3735f86b36ea4:

  cmd: sound: fix help text (2024-06-13 09:31:56 -0600)

are available in the Git repository at:

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

for you to fetch changes up to 09d63e647a0eee024b493ad1d0e0d4a7a65ae500:

  board: imx8mn_s2: Update timing with production one (2024-06-14 11:42:19 
-0300)

u-boot-imx-master-20240614
--

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

- Update imx8mn_s2 DDR initialization to fix USB boot.

Michael Trimarchi (1):
  board: imx8mn_s2: Update timing with production one

 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c | 23 +--
 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c | 14 --
 2 files changed, 21 insertions(+), 16 deletions(-)


Re: [PATCH] board: imx8mn_s2: Update timing with production one

2024-06-14 Thread Fabio Estevam
On Mon, Jun 10, 2024 at 3:38 AM Michael Trimarchi
 wrote:
>
> The timing upstream was wrong corresponding to the production.
> This come evident after commit b614ddb5d33
> (ddr: imx: Save the FW loading if it hasn't changed). This
> change fix booting from usb
>
> Signed-off-by: Michael Trimarchi 

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


Re: silent u-boot not working

2024-06-14 Thread Fabio Estevam
On Fri, Jun 14, 2024 at 8:51 AM Jonas Kvinge  wrote:

> The u-boot logo in the upper right corner is still showing, is it
> possible to disable that too?

If you don't want the U-Boot splash to appear, you can remove the
CONFIG_VIDEO options from configs/rpi_4_defconfig


Re: silent u-boot not working

2024-06-14 Thread Fabio Estevam
Hi Jonas,

On Fri, Jun 14, 2024 at 7:49 AM Jonas Kvinge  wrote:

> Where do I find CONFIG_EXTRA_ENV_SETTINGS? Is it an option in make
> menuconfig, or do I need to edit the header file include/configs/rpi.h?

In recent U-Boot versions, this option has been renamed to
CFG_EXTRA_ENV_SETTINGS.

It is located at include/configs/.h


Re: [PATCH 1/2] imx8mm-cl-iot-gate: Add support for Samsung 4GB DDR

2024-06-03 Thread Fabio Estevam
On Tue, May 28, 2024 at 4:15 PM Fabio Estevam  wrote:
>
> From: Fabio Estevam 
>
> Newer versions of the imx8mm-cl-iot-gate boards may come populated with a
> Samsung 4GB DDR model.
>
> Add support for it.
>
> Signed-off-by: Fabio Estevam 

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


Re: [PATCH 0/4] Support all phyCORE-i.MX8MP RAM variants

2024-06-03 Thread Fabio Estevam
On Tue, May 28, 2024 at 10:35 AM Teresa Remmet  wrote:
>
> Add support for several RAM sizes and speed grades for phyCORE-i.MX8MP.
>
> We have support with this series for:
> - 1GB 1.5GHz
> - 1GB 2GHz
> - 2GB 1.5GHz (was supported before)
> - 2GB 2GHz (was supported before)
> - 4GB 1.5GHz
> - 4GB 2GHz
> - 8GB 2GHz
>
> RAM size and speed grade is detected and set using EEPROM data on default.
> Alternative it is possible to set fix RAM size and speed over Kconfig.

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


Re: [PATCH 0/2] Migrate PHYTEC imx8m boards to OF_UPSTREAM

2024-06-03 Thread Fabio Estevam
On Tue, May 28, 2024 at 8:25 AM Yannic Moog  wrote:
>
> - update MAINTAINERS
> - delete synced dt files
> - imply OF_UPSTREAM
> - update default device tree

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


Re: [PATCH v1 0/5] board: toradex: Add new Verdin and Aquila SKUs

2024-06-03 Thread Fabio Estevam
On Tue, May 28, 2024 at 7:00 AM Emanuele Ghidoli
 wrote:
>
> From: Emanuele Ghidoli 
>
> Hi,
> This series adds support for 0090 PID4 Verdin iMX8M Mini Quad 4GB WB ET SKU.
> It also adds two new SKUs config block support: 0088 Aquila AM69 Octa 32GB WB 
> IT and 0089 Verdin iMX95 Hexa 16GB WB IT.

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


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

2024-06-03 Thread Fabio Estevam
Hi Tom,

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

The following changes since commit 7e52d6ccfb76e2afc2d183b357abe2a2e2f948cf:

  Merge patch series "FWU: Add support for FWU metadata version 2" (2024-05-24 
13:42:07 -0600)

are available in the Git repository at:

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

for you to fetch changes up to fb95661116fb4269883721afd80578e6d88ce043:

  imx8mm-cl-iot-gate: Add support for the Realtek RTL8211E PHY (2024-06-03 
12:14:29 -0300)

u-boot-imx-next-20240603
--

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

- Support different RAM sizes on imx8m phycoce boards.
- Support new toradex variants.
- Support Samsung 4GB DDR and Realtek RTL8211E PHY on imx8mm-cl-iot-gate.
- Convert imx8mm-phycore and imx8mp-phycore boards to use OF_UPSTREAM.


Benjamin Hahn (1):
  board: phycore_imx8mp: enable setting 2GHz timings without RAM size

Emanuele Ghidoli (5):
  board: toradex: verdin-imx8mm: add 4 GB lpddr4 memory support
  board: toradex: verdin-imx8mm: increase maximum addressable ram to 4GB
  toradex: tdx-cfg-block: add aquila am69 sku 0088 pid4
  toradex: tdx-cfg-block: add verdin imx95 sku 0089 pid4
  toradex: tdx-cfg-block: add verdin i.mx8m mini 0090 pid4

Fabio Estevam (2):
  imx8mm-cl-iot-gate: Add support for Samsung 4GB DDR
  imx8mm-cl-iot-gate: Add support for the Realtek RTL8211E PHY

Teresa Remmet (3):
  board: phytec: phycore-imx8mp: spl: Fix syle issue
  board: phytec: phycore_imx8mp: Add support for different RAM sizes
  board: phytec: phycore_imx8mp: Make RAM size configuration fix

Yannic Moog (2):
  arm: imx8mm-phycore: move to OF_UPSTREAM
  arm: imx8mp-phycore: move to OF_UPSTREAM

 arch/arm/dts/Makefile  |   3 -
 arch/arm/dts/imx8mm-phyboard-polis-rdk.dts | 460 ---
 arch/arm/dts/imx8mm-phycore-som.dtsi   | 440 --
 arch/arm/dts/imx8mm-phygate-tauri-l.dts| 489 -
 arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts| 361 ---
 arch/arm/dts/imx8mp-phycore-som.dtsi   | 323 --
 arch/arm/mach-imx/imx8m/Kconfig|   2 +
 board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c|   4 +-
 .../imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c| 106 -
 board/phytec/phycore_imx8mm/MAINTAINERS|   3 -
 board/phytec/phycore_imx8mp/Kconfig|  67 +++
 board/phytec/phycore_imx8mp/MAINTAINERS|   1 -
 board/phytec/phycore_imx8mp/lpddr4_timing.c| 153 +++
 board/phytec/phycore_imx8mp/lpddr4_timing.h|  16 +
 board/phytec/phycore_imx8mp/phycore-imx8mp.c   |  11 +
 board/phytec/phycore_imx8mp/spl.c  | 136 +++---
 board/toradex/common/tdx-cfg-block.c   |   3 +
 board/toradex/common/tdx-cfg-block.h   |   3 +
 board/toradex/verdin-imx8mm/lpddr4_timing.c|  14 +-
 board/toradex/verdin-imx8mm/verdin-imx8mm.c|   5 +-
 configs/imx8mm-phygate-tauri-l_defconfig   |   2 +-
 configs/phycore-imx8mm_defconfig   |   2 +-
 configs/phycore-imx8mp_defconfig   |   2 +-
 include/configs/imx8mm-cl-iot-gate.h   |   2 +-
 include/configs/phycore_imx8mp.h   |   4 +-
 include/configs/verdin-imx8mm.h|   6 +-
 26 files changed, 454 insertions(+), 2164 deletions(-)
 delete mode 100644 arch/arm/dts/imx8mm-phyboard-polis-rdk.dts
 delete mode 100644 arch/arm/dts/imx8mm-phycore-som.dtsi
 delete mode 100644 arch/arm/dts/imx8mm-phygate-tauri-l.dts
 delete mode 100644 arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts
 delete mode 100644 arch/arm/dts/imx8mp-phycore-som.dtsi
 create mode 100644 board/phytec/phycore_imx8mp/lpddr4_timing.h


[PATCH 2/2] imx8mm-cl-iot-gate: Add support for the Realtek RTL8211E PHY

2024-05-28 Thread Fabio Estevam
From: Fabio Estevam 

Newer imx8mm-cl-iot-gate versions are populated with a Realtek RTL8211E
PHY instead of the Atheros AR8033.

Adapted Compulab's patch from:
https://github.com/compulab-yokneam/meta-bsp-imx8mm/blob/iot-gate-imx8_5.10.72/recipes-bsp/u-boot/compulab/imx8mm/0125-imx8mm-net-enable-phy-Realtek-RTL8211E.patch

to support both PHYs in U-Boot.

Signed-off-by: Fabio Estevam 
---
 .../imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c   | 106 +-
 include/configs/imx8mm-cl-iot-gate.h  |   2 +-
 2 files changed, 104 insertions(+), 4 deletions(-)

diff --git a/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c 
b/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c
index af070ec315c4..bf196e062bd0 100644
--- a/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c
+++ b/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c
@@ -9,6 +9,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -31,6 +32,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+static int fec_phyaddr = -1;
+
 #if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
 struct efi_fw_image fw_images[] = {
 #if defined(CONFIG_TARGET_IMX8MM_CL_IOT_GATE)
@@ -110,10 +113,72 @@ static int setup_fec(void)
return 0;
 }
 
+#define FDT_PHYADDR "/soc@0/bus@3080/ethernet@30be/mdio/ethernet-phy@0"
+#define FLIP_32B(val) (((val >> 24) & 0xff) | ((val << 8) & 0xff) | ((val 
>> 8) & 0xff00) | ((val << 24) & 0xff00))
+static int fdt_set_fec_phy_addr(void *blob)
+{
+   u32 val;
+
+   if (fec_phyaddr < 0)
+   return -EINVAL;
+
+   val = FLIP_32B(fec_phyaddr);
+   return fdt_find_and_setprop(blob, FDT_PHYADDR, "reg", (const void 
*),
+   sizeof(val), 0);
+}
+
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+   fdt_set_fec_phy_addr(blob);
+   return 0;
+}
+
+/*
+ * These are specific ID, purposed to distiguish between PHY vendors.
+ * These values are not equal to real vendors' OUI (half of MAC address)
+ */
+#define OUI_PHY_ATHEROS 0x1374
+#define OUI_PHY_REALTEK 0x0732
+
 int board_phy_config(struct phy_device *phydev)
 {
-   if (IS_ENABLED(CONFIG_FEC_MXC)) {
+   unsigned int model, rev, oui;
+   int phyid1, phyid2;
+   unsigned int reg;
+
+   if (!IS_ENABLED(CONFIG_FEC_MXC))
+   return 0;
+
+   phyid1 = phy_read(phydev, MDIO_DEVAD_NONE, MII_PHYSID1);
+   if (phyid1 < 0) {
+   printf("%s: PHYID1 registry read fail %i\n", __func__, phyid1);
+   return phyid1;
+   }
+
+   phyid2 = phy_read(phydev, MDIO_DEVAD_NONE, MII_PHYSID2);
+   if (phyid2 < 0) {
+   printf("%s: PHYID2 registry read fail %i\n", __func__, phyid2);
+   return phyid2;
+   }
+
+   reg = phyid2 | phyid1 << 16;
+   if (reg == 0x) {
+   printf("%s: There is no device @%i\n", __func__, phydev->addr);
+   return -ENODEV;
+   }
+
+   rev = reg & 0xf;
+   reg >>= 4;
+   model = reg & 0x3f;
+   reg >>= 6;
+   oui = reg;
+   debug("%s: PHY @0x%x OUI 0x%06x model 0x%x rev 0x%x\n",
+ __func__, phydev->addr, oui, model, rev);
+
+   switch (oui) {
+   case OUI_PHY_ATHEROS:
/* enable rgmii rxc skew and phy mode select to RGMII copper */
+   printf("phy: AR803x@%x\t", phydev->addr);
phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x1f);
phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x8);
 
@@ -121,10 +186,45 @@ int board_phy_config(struct phy_device *phydev)
phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x82ee);
phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05);
phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100);
+   break;
+   case OUI_PHY_REALTEK:
+   printf("phy: RTL8211E@%x\t", phydev->addr);
+   /* RTL8211E-VB-CG - add TX and RX delay */
+   unsigned short val;
+
+   phy_write(phydev, MDIO_DEVAD_NONE, 0x1f, 0x07);
+   phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0xa4);
+   val = phy_read(phydev, MDIO_DEVAD_NONE, 0x1c);
+   val |= (0x1 << 13) | (0x1 << 12) | (0x1 << 11);
+   phy_write(phydev, MDIO_DEVAD_NONE, 0x1c, val);
+   /* LEDs: set to extension page */
+   phy_write(phydev, MDIO_DEVAD_NONE, 0x1f, 0x0007);
+   /* extension Page44 */
+   phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x002c);
+   phy_write(phydev, MDIO_DEVAD_NONE, 0x1c, 0x0430);//LCR
+   phy_write(phydev, MDIO_DEVAD_NONE, 0x1a, 0x0010);//LACR
+   /*
+* To disable EEE LED mode (blinking .4s/2s)
+* Extension Page5
+*/
+

[PATCH 1/2] imx8mm-cl-iot-gate: Add support for Samsung 4GB DDR

2024-05-28 Thread Fabio Estevam
From: Fabio Estevam 

Newer versions of the imx8mm-cl-iot-gate boards may come populated with a
Samsung 4GB DDR model.

Add support for it.

Signed-off-by: Fabio Estevam 
---
 board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c 
b/board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c
index b230478b611a..f1048a1ab2ab 100644
--- a/board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c
+++ b/board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c
@@ -47,7 +47,9 @@ struct lpddr4_desc {
 static const struct lpddr4_desc lpddr4_array[] = {
{ .name = "Nanya",  .id = 0x0510, .subind = 0xff,
  .size = 2048, .count = 1, .timing = _dram_timing_01061010},
-   { .name = "Samsung",.id = 0x01061010, .subind = 0xff,
+   { .name = "Samsung",.id = 0x01061010, .subind = 0x04,
+ .size = 4096, .count = 1, .timing = _dram_timing_ff000110},
+   { .name = "Samsung",.id = 0x01061010, .subind = 0x02,
  .size = 2048, .count = 1, .timing = _dram_timing_01061010},
{ .name = "Kingston",   .id = 0xff10, .subind = 0x04,
  .size = 4096, .count = 1, .timing = _dram_timing_ff000110},
-- 
2.34.1



Re: [PATCH 2/2] arm: imx8mp-phycore: move to OF_UPSTREAM

2024-05-28 Thread Fabio Estevam
On Tue, May 28, 2024 at 8:25 AM Yannic Moog  wrote:
>
> The PHYCORE_IMX8MP is used by the phyBOARD-Pollux. Migrate board to
> OF_UPSTREAM. Linux kernel device tree for the board can be used as is,
> corresponding U-Boot device tree files are removed. U-Boot tweaks are
> kept unchanged.
>
> Signed-off-by: Yannic Moog 

Reviewed-by: Fabio Estevam 


Re: [PATCH 1/2] arm: imx8mm-phycore: move to OF_UPSTREAM

2024-05-28 Thread Fabio Estevam
Hi Yannic,

On Tue, May 28, 2024 at 8:25 AM Yannic Moog  wrote:
>
> The PHYCORE_IMX8MM is used by the phyBOARD-Polis and the
> phyGATE-Tauri-L. Migrate both boards to OF_UPSTREAM. Linux kernel device
> trees for both boards can be used as is, corresponding U-Boot device
> tree files are removed. U-Boot tweaks are kept unchanged.
>
> Signed-off-by: Yannic Moog 

Reviewed-by: Fabio Estevam 


Re: [PATCH v1 0/5] board: toradex: Add new Verdin and Aquila SKUs

2024-05-28 Thread Fabio Estevam
Hi Francesco,

On Tue, May 28, 2024 at 9:39 AM Francesco Dolcini  wrote:

> I disagree on doing this on this specific series. The reason is that the
> changes on the tdx-cfg-block are depending one on each other and they
> have nothing nxp nor ti specific, they are toradex specific.
>
> If I misunderstood your request, how would you do it?
> Patches 1,2,4 and 5 are for Toradex NXP board variant, patch 3 is for a
> Toradex TI board, patches 4 and 5 depend on patch 3.

Thanks for the clarification. I will assign this series to me in patchwork then.


Re: [PATCH v1 0/5] board: toradex: Add new Verdin and Aquila SKUs

2024-05-28 Thread Fabio Estevam
Hi Emanuele,

On Tue, May 28, 2024 at 7:00 AM Emanuele Ghidoli
 wrote:
>
> From: Emanuele Ghidoli 
>
> Hi,
> This series adds support for 0090 PID4 Verdin iMX8M Mini Quad 4GB WB ET SKU.
> It also adds two new SKUs config block support: 0088 Aquila AM69 Octa 32GB WB 
> IT and 0089 Verdin iMX95 Hexa 16GB WB IT.
>
> Signed-off-by: Emanuele Ghidoli 
>
> Emanuele Ghidoli (5):
>   board: toradex: verdin-imx8mm: add 4 GB lpddr4 memory support
>   board: toradex: verdin-imx8mm: increase maximum addressable ram to 4GB
>   toradex: tdx-cfg-block: add aquila am69 sku 0088 pid4
>   toradex: tdx-cfg-block: add verdin imx95 sku 0089 pid4
>   toradex: tdx-cfg-block: add verdin i.mx8m mini 0090 pid4

It would be better to split the series in two: one for the TI-SoC
boards and another one for the NXP-SoC boards.


Re: [PATCH] ARM: imx: mx5: Simplify TFTP server layout on MX53 Menlo board

2024-05-24 Thread Fabio Estevam
On Tue, May 21, 2024 at 7:50 AM Marek Vasut  wrote:
>
> From: Olaf Mandel 
>
> By removing the "boot" directory in the "m53menlo/boot/fitImage" path,
> we simplify the TFTP server directory layout a bit. This also requires a
> change to the mmcload command as it (mis-)uses the same variable as the
> TFTP boot.
>
> Signed-off-by: Olaf Mandel 
> Signed-off-by: Marek Vasut 

Applied, thanks.


Re: [PATCH] ARM: imx: mx5: Enable BMODE command on MX53 Menlo board

2024-05-24 Thread Fabio Estevam
On Tue, May 21, 2024 at 6:42 AM Marek Vasut  wrote:
>
> The board can do primary/secondary boot switching, enable the bmode command.
>
> Signed-off-by: Marek Vasut 

Applied, thanks.


Re: [PATCH] ARM: dts: imx8mm: Update iMX8MM Menlo board configuration

2024-05-24 Thread Fabio Estevam
On Tue, May 21, 2024 at 6:41 AM Marek Vasut  wrote:
>
> Synchronize Toradex Verdin iMX8MM based MX8Menlo board configuration
> with Toradex Verdin iMX8MM and enable convenience commands like cat,
> hexdump, xxd.
>
> Signed-off-by: Marek Vasut 

Applied, thanks.


Re: [PATCH] ARM: imx: Increase PHY auto-negotiation timeout to 20s on MX8Menlo

2024-05-24 Thread Fabio Estevam
On Tue, May 21, 2024 at 6:40 AM Marek Vasut  wrote:
>
> The ethernet PHY on MX8Menlo board takes a while to come out of
> reset, increase the auto-negotiation timeout to prevent it from
> timing out in case the ethernet is used right after the board was
> reset.
>
> Signed-off-by: Marek Vasut 

Applied, thanks.


Re: [PATCH v2] imx: hab: add documentation about the required keys/certs

2024-05-24 Thread Fabio Estevam
On Thu, May 16, 2024 at 5:36 AM Claudius Heine  wrote:
>
> For CST to find the certificates and keys for signing, some keys and
> certs need to be copied into the u-boot build directory.
>
> Signed-off-by: Claudius Heine 

Applied, thanks.


Re: [PATCH] ARM: imx: Add doc/imx/ to i.MX MAINTAINERS entry

2024-05-24 Thread Fabio Estevam
On Mon, May 13, 2024 at 12:28 AM Marek Vasut  wrote:
>
> Make sure i.MX maintainers are CCed on doc/imx/ patches.
>
> Signed-off-by: Marek Vasut 

Applied, thanks.


Re: [PATCH v4 1/4] binman: Add nxp_imx8mcst etype for i.MX8M flash.bin signing

2024-05-24 Thread Fabio Estevam
On Tue, May 21, 2024 at 7:48 AM Marek Vasut  wrote:
>
> Add new binman etype which allows signing both the SPL and fitImage sections
> of i.MX8M flash.bin using CST. There are multiple DT properties which govern
> the signing process, nxp,loader-address is the only mandatory one which sets
> the SPL signature start address without the imx8mimage header, this should be
> SPL text base. The key material can be configured using optional DT properties
> nxp,srk-table, nxp,csf-crt, nxp,img-crt, all of which default the key material
> names generated by CST tool scripts. The nxp,unlock property can be used to
> unlock CAAM access in SPL section.
>
> Reviewed-by: Tim Harvey 
> Signed-off-by: Marek Vasut 

Applied the series, thanks.


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

2024-05-24 Thread Fabio Estevam
Hi Tom,

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

The following changes since commit 377e91c162ab09ec20f96f966f380cb55c590edd:

  Merge patch series "Clean-up patch set for MbedTLS integration" (2024-05-22 
08:55:35 -0600)

are available in the Git repository at:

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

for you to fetch changes up to 7457dc6f183303aaf2d58fff0a622e6791aba33c:

  imx: hab: add documentation about the required keys/certs (2024-05-24 
11:33:15 -0300)

u-boot-imx-master-20240524
--

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

- Allow signing i.MX8M flash.bin via binman, which is a much more elegant
solution that using scripts.
- Improve i.MX8M HAB documentation.
- Increase PHY auto-negotiation timeout to 20s on MX8Menlo
- Add bmode support for the MX53 Menlo board.
- Update Update iMX8MM Menlo board configuration

Claudius Heine (1):
  imx: hab: add documentation about the required keys/certs

Marek Vasut (8):
  binman: Add nxp_imx8mcst etype for i.MX8M flash.bin signing
  ARM: dts: imx: Introduce SPL and FIT labels to i.MX8M DTs binman nodes
  ARM: dts: imx: Wrap i.MX8M binman SPL and FIT nodes in CST node if 
IMX_HAB enabled
  imx: hab: Use nxp_imx8mcst etype for i.MX8M flash.bin signing
  ARM: imx: Add doc/imx/ to i.MX MAINTAINERS entry
  ARM: imx: Increase PHY auto-negotiation timeout to 20s on MX8Menlo
  ARM: dts: imx8mm: Update iMX8MM Menlo board configuration
  ARM: imx: mx5: Enable BMODE command on MX53 Menlo board

Olaf Mandel (1):
  ARM: imx: mx5: Simplify TFTP server layout on MX53 Menlo board

 .gitignore  |   2 +
 MAINTAINERS |   1 +
 Makefile|   2 +-
 arch/arm/dts/imx8mm-u-boot.dtsi | 195 --
 arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi |   8 +-
 arch/arm/dts/imx8mn-u-boot.dtsi | 209 +---
 arch/arm/dts/imx8mp-dhcom-u-boot.dtsi   | 124 +++---
 arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi  |  26 ++-
 arch/arm/dts/imx8mp-u-boot.dtsi | 172 ++-
 arch/arm/dts/imx8mq-librem5-r4-u-boot.dtsi  |  10 +-
 arch/arm/dts/imx8mq-u-boot.dtsi | 182 -
 configs/imx8mm-mx8menlo_defconfig   |  28 +++-
 configs/m53menlo_defconfig  |   3 +-
 doc/imx/habv4/csf_examples/mx8m/csf.sh  |  92 ---
 doc/imx/habv4/csf_examples/mx8m/csf_fit.txt |  30 
 doc/imx/habv4/csf_examples/mx8m/csf_spl.txt |  33 
 doc/imx/habv4/guides/mx8m_spl_secure_boot.txt   | 131 ++-
 include/configs/imx8mm-mx8menlo.h   |   3 +
 include/configs/m53menlo.h  |   2 +-
 tools/binman/btool/cst.py   |  48 ++
 tools/binman/etype/nxp_imx8mcst.py  | 164 +++
 21 files changed, 799 insertions(+), 666 deletions(-)
 delete mode 100644 doc/imx/habv4/csf_examples/mx8m/csf.sh
 delete mode 100644 doc/imx/habv4/csf_examples/mx8m/csf_fit.txt
 delete mode 100644 doc/imx/habv4/csf_examples/mx8m/csf_spl.txt
 create mode 100644 tools/binman/btool/cst.py
 create mode 100644 tools/binman/etype/nxp_imx8mcst.py


Re: [PATCH] ARM: imx: Add doc/imx/ to i.MX MAINTAINERS entry

2024-05-13 Thread Fabio Estevam
Hi Marek,

On Mon, May 13, 2024 at 12:28 AM Marek Vasut  wrote:
>
> Make sure i.MX maintainers are CCed on doc/imx/ patches.
>
> Signed-off-by: Marek Vasut 

Reviewed-by: Fabio Estevam 

Thanks


Re: imx8mp: Flashing U-Boot into eMMC hardware partition via UUU

2024-05-10 Thread Fabio Estevam
Hi Michael,

On Fri, May 10, 2024 at 11:28 AM Michael Nazzareno Trimarchi
 wrote:

> You can just change as you want. We have this file in buildroot, uuu
> can run command on the device
> using FB command. Example how call it

Thanks for sharing the example.

I adapted the UUU script like this:

SDPS: boot -f flash.bin
FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: ucmd mmc dev 2 1
FB: download -f flash.bin
FB: ucmd setexpr blkcnt $filesize + 0x1ff
FB: ucmd setexpr blkcnt $blkcnt / 0x200
FB: ucmd mmc write $loadaddr 0 $blkcnt
FB: reboot
FB: done

Did the following changes based on imx8mn_bsh_smm_s2pro:

index 024b46ef8bc2..0b6026c34309 100644
--- a/board/freescale/imx8mp_evk/imx8mp_evk.c
+++ b/board/freescale/imx8mp_evk/imx8mp_evk.c
@@ -3,6 +3,8 @@
  * Copyright 2019 NXP
  */

+#include 
+#include 
 #include 

 int board_init(void)
@@ -17,5 +19,11 @@ int board_late_init(void)
env_set("board_rev", "iMX8MP");
 #endif

+   if (is_usb_boot()) {
+   printf("* Entering in USB download mode\n");
+   env_set("bootcmd", "fastboot usb 0");
+   env_set("bootdelay", "0");
+   }
+
return 0;
 }
diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index 1759318fdd35..148b36bd3169 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -25,8 +25,17 @@

 #include 

+#define EMMCARGS \
+   "fastboot_partition_alias_all=" \
+   __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".0:0\0" \
+   "fastboot_partition_alias_bootloader=" \
+   __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".1:0\0" \
+   "emmc_dev=" __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) "\0" \
+   "emmc_ack=1\0" \
+
 /* Initial environment variables */
 #define CFG_EXTRA_ENV_SETTINGS \
+   EMMCARGS \
BOOTENV \
"scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \

and now UUU correctly flashes the eMMC hardware partition.

Thanks a lot,

Fabio Estevam


imx8mp: Flashing U-Boot into eMMC hardware partition via UUU

2024-05-10 Thread Fabio Estevam
Hi,

I am using an imx8mp-evk board and I can flash the U-Boot into the
eMMC hardware partition 0 by running:

   => tftpboot $loadaddr flash.bin
   => setexpr blkcnt $filesize + 0x1ff && setexpr blkcnt $blkcnt / 0x200
   => mmc dev 2 1
   => mmc write $loadaddr 0 $blkcnt

Now I want to do the same via UUU.

I tried to create a script called emmc_flash:

uuu_version 1.5.21

SDPS: boot -f flash.bin
SDPS: done
FB: ucmd setenv fastboot_dev mmc
FB: ucmd mmc dev 2 1
FB: flash bootloader flash.bin
FB: Done

Then on the PC: uuu emmc_flash

U-Boot is loaded to RAM, but the eMMC hardware partition is not programmed.

What is the correct script for doing this?

Any suggestions?

Thanks


[PATCH] rockchip: rv1108: Remove unneeded local rv1108-cru.h

2024-05-09 Thread Fabio Estevam
After the conversion of RV1108 to OF_UPSTREAM, 
include/dt-bindings/clock/rv1108-cru.h is no longer needed because
there is dts/upstream/include/dt-bindings/clock/rv1108-cru.h from
upstream Linux.

Remove the unneeded rv1108-cru.h file.

Reported-by: Jonas Karlman 
Signed-off-by: Fabio Estevam 
---
 include/dt-bindings/clock/rv1108-cru.h | 356 -
 1 file changed, 356 deletions(-)
 delete mode 100644 include/dt-bindings/clock/rv1108-cru.h

diff --git a/include/dt-bindings/clock/rv1108-cru.h 
b/include/dt-bindings/clock/rv1108-cru.h
deleted file mode 100644
index 10ed9d140f4b..
--- a/include/dt-bindings/clock/rv1108-cru.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (c) 2017 Rockchip Electronics Co. Ltd.
- * Author: Shawn Lin 
- */
-
-#ifndef _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H
-#define _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H
-
-/* pll id */
-#define PLL_APLL   0
-#define PLL_DPLL   1
-#define PLL_GPLL   2
-#define ARMCLK 3
-
-/* sclk gates (special clocks) */
-#define SCLK_SPI0  65
-#define SCLK_NANDC 67
-#define SCLK_SDMMC 68
-#define SCLK_SDIO  69
-#define SCLK_EMMC  71
-#define SCLK_UART0 72
-#define SCLK_UART1 73
-#define SCLK_UART2 74
-#define SCLK_I2S0  75
-#define SCLK_I2S1  76
-#define SCLK_I2S2  77
-#define SCLK_TIMER078
-#define SCLK_TIMER179
-#define SCLK_SFC   80
-#define SCLK_SDMMC_DRV 81
-#define SCLK_SDIO_DRV  82
-#define SCLK_EMMC_DRV  83
-#define SCLK_SDMMC_SAMPLE  84
-#define SCLK_SDIO_SAMPLE   85
-#define SCLK_EMMC_SAMPLE   86
-#define SCLK_VENC_CORE 87
-#define SCLK_HEVC_CORE 88
-#define SCLK_HEVC_CABAC89
-#define SCLK_PWM0_PMU  90
-#define SCLK_I2C0_PMU  91
-#define SCLK_WIFI  92
-#define SCLK_CIFOUT93
-#define SCLK_MIPI_CSI_OUT  94
-#define SCLK_CIF0  95
-#define SCLK_CIF1  96
-#define SCLK_CIF2  97
-#define SCLK_CIF3  98
-#define SCLK_DSP   99
-#define SCLK_DSP_IOP   100
-#define SCLK_DSP_EPP   101
-#define SCLK_DSP_EDP   102
-#define SCLK_DSP_EDAP  103
-#define SCLK_CVBS_HOST 104
-#define SCLK_HDMI_SFR  105
-#define SCLK_HDMI_CEC  106
-#define SCLK_CRYPTO107
-#define SCLK_SPI   108
-#define SCLK_SARADC109
-#define SCLK_TSADC 110
-#define SCLK_MAC_PRE   111
-#define SCLK_MAC   112
-#define SCLK_MAC_RX113
-#define SCLK_MAC_REF   114
-#define SCLK_MAC_REFOUT115
-#define SCLK_DSP_PFM   116
-#define SCLK_RGA   117
-#define SCLK_I2C1  118
-#define SCLK_I2C2  119
-#define SCLK_I2C3  120
-#define SCLK_PWM   121
-#define SCLK_ISP   122
-#define SCLK_USBPHY123
-#define SCLK_I2S0_SRC  124
-#define SCLK_I2S1_SRC  125
-#define SCLK_I2S2_SRC  126
-#define SCLK_UART0_SRC 127
-#define SCLK_UART1_SRC 128
-#define SCLK_UART2_SRC 129
-#define SCLK_MAC_TX130
-#define SCLK_MACREF131
-#define SCLK_MACREF_OUT132
-
-#define DCLK_VOP_SRC   185
-#define DCLK_HDMIPHY   186
-#define DCLK_VOP   187
-
-/* aclk gates */
-#define ACLK_DMAC  192
-#define ACLK_PRE   193
-#define ACLK_CORE  194
-#define ACLK_ENMCORE   195
-#define ACLK_RKVENC196
-#define ACLK_RKVDEC197
-#define ACLK_VPU   198
-#define ACLK_CIF0  199
-#define ACLK_VIO0  200
-#define ACLK_VIO1  201
-#define ACLK_VOP   202
-#define ACLK_IEP   203
-#define ACLK_RGA   204
-#define ACLK_ISP   205
-#define ACLK_CIF1  206
-#define ACLK_CIF2  207
-#define ACLK_CIF3  208
-#define ACLK_PERI  209
-#define ACLK_GMAC

Re: [PATCH] configs: Make USB_GADGET_MANUFACTURER consistent over all PHYTEC boards

2024-05-07 Thread Fabio Estevam
Hi Benjamin,

On Mon, May 6, 2024 at 7:52 AM Benjamin Hahn  wrote:

> We are not registered at USB-IF and therefore don't have a valid
> VENDOR_NUM and PRODUCT_NUM, so we rely on the VENDOR_NUM and PRODUCT_NUM
> of the SoC Vendor, so the correct features get enabled by the driver.

Ok, understood.

Reviewed-by: Fabio Estevam 


Re: [PATCH 1/3] rng: Introduce SPL_DM_RNG

2024-05-05 Thread Fabio Estevam
On Thu, Apr 25, 2024 at 8:03 PM Marek Vasut  wrote:
>
> Add SPL variant of DM_RNG so that the DM_RNG can be disabled in SPL
> if necessary. This may be necessary due to e.g. size constraints of
> the SPL.
>
> Signed-off-by: Marek Vasut 

Applied all, thanks.


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

2024-05-05 Thread Fabio Estevam
Hi Tom,

Please pull from u-boot-imx/master, thanks.
The following changes since commit 2f1e76bcfee75b9f99ade63002c05ffaaec86afb:

  Merge branch '2024-05-02-assorted-updates' (2024-05-03 16:18:51 -0600)

are available in the Git repository at:

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

for you to fetch changes up to cecb5fbb42c8b3de3d5a7df40bc01d1fdf4731d3:

  crypto/fsl: Differentiate between CAAM and DCP in Kconfig entry (2024-05-05 
11:21:39 -0300)

u-boot-imx-master-20240505
--

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

- Add SPL variant of DM_RNG so that the DM_RNG can be disabled in SPL
if necessary. This may be necessary due to e.g. size constraints of
the SPL.
- dd SPL variant of SPL_FSL_CAAM_RNG so that the SPL_FSL_CAAM_RNG can
be disabled in SPL if necessary. This may be necessary due to e.g.
size constraints of the SPL.
- Differentiate between CAAM and DCP in Kconfig entry.

Marek Vasut (3):
  rng: Introduce SPL_DM_RNG
  crypto/fsl: Introduce SPL_FSL_CAAM_RNG
  crypto/fsl: Differentiate between CAAM and DCP in Kconfig entry

 boot/pxe_utils.c|  4 +---
 boot/vbe_request.c  |  2 +-
 drivers/Makefile|  2 +-
 drivers/crypto/fsl/Kconfig  | 11 +--
 drivers/crypto/fsl/Makefile |  2 +-
 drivers/crypto/fsl/jr.c |  4 ++--
 drivers/rng/Kconfig |  7 +++
 drivers/rng/Makefile|  2 +-
 lib/uuid.c  |  2 +-
 net/net_rand.h  |  2 +-
 test/dm/Makefile|  2 +-
 11 files changed, 26 insertions(+), 14 deletions(-)


Re: [PATCH] configs: Make USB_GADGET_MANUFACTURER consistent over all PHYTEC boards

2024-05-03 Thread Fabio Estevam
Hi Benjamin,

On Fri, May 3, 2024 at 4:01 AM Benjamin Hahn  wrote:

> -CONFIG_USB_GADGET_MANUFACTURER="FSL"
> +CONFIG_USB_GADGET_MANUFACTURER="PHYTEC"
>  CONFIG_USB_GADGET_VENDOR_NUM=0x0525
>  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
...
> -CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
> +CONFIG_USB_GADGET_MANUFACTURER="PHYTEC"
>  CONFIG_USB_GADGET_VENDOR_NUM=0x0451
>  CONFIG_USB_GADGET_PRODUCT_NUM=0x6165

What about making VENDOR_NUM/PRODUCT_NUM consistent as well?


Re: Use header file from external library in u-boot

2024-05-02 Thread Fabio Estevam
Hi Johannes,

On Thu, May 2, 2024 at 10:18 AM Johannes Kirchmair - SKIDATA
 wrote:
>
> Dear u-boot folks,
>
> we are trying to share some information between u-boot and a Linux user space 
> tool. For this we place some information in a FRAM. This information is just 
> some numeric values, indicating some wanted behaviour. I thought of using a 
> header file to keep these values aligned between the user space tool and 
> u-boot. This header is provided by a library.  Including it into the user 
> space tool is straight forward, but into u-boot does seem complicated, as the 
> build system is not meant to include external libraries. Is there a preferred 
> way to do this kind of alignment or a suggestion on how to handle this?

Would libubootenv work for you?
https://github.com/sbabic/libubootenv


Re: imx8mn: bootcount does not increment

2024-05-02 Thread Fabio Estevam
Hi Heiko,

On Fri, Apr 26, 2024 at 12:40 AM Heiko Schocher  wrote:

> No chance for a bootcounter in a register?

Yes, this is a better approach. I changed it to:

CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C4
CONFIG_SYS_BOOTCOUNT_ADDR=0x30370090
CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y

and now bootcount increments.

Thanks,

Fabio Estevam


Re: [PATCH v2 1/3] binman: Add nxp_imx8mimage etype

2024-04-29 Thread Fabio Estevam
On Thu, Apr 25, 2024 at 8:01 PM Marek Vasut  wrote:
>
> Add new binman etype derived from mkimage etype which generates configuration
> input file for mkimage -T imx8mimage, and runs the mkimage on input data. The
> mkimage -T imx8mimage is used to generate combined image with SPL and DDR PHY
> blobs which is bootable on i.MX8M.
>
> The configuration file generated here is equivalent of imx8mimage.cfg, which
> is the file passed to '$ mkimage -T imx8mimage -n imx8mimage.cfg ...' . The
> settings generated into the imx8mimage.cfg file are configured via supported
> binman DT properties, nxp,boot-from, nxp,loader-address, nxp,rom-version.
>
> Signed-off-by: Marek Vasut 

Applied all, thanks.


Re: [PATCH 0/2] imx93-11x11-evk: Convert to OF_UPSTREAM

2024-04-29 Thread Fabio Estevam
On Wed, Apr 24, 2024 at 5:12 AM Peng Fan (OSS)  wrote:
>
> From: Peng Fan 
>
> patch 1 is to avoid build break when using upstream dts
> Patch 2 is moving to OF_UPSTREAM
>
> This is a resend of V3 imx93: Conver to OF_UPSTREAM patch 5,6
>
> Peng Fan (2):
>   dt-bindings: imx93: sync clock header
>   imx: imx93-11x11-evk: convert to OF_UPSTREAM

Applied all, thanks.


Re: [PATCH] ARM: dts: imx: Enable PCIe and NVMe on DH i.MX8M Plus DHCOM PDK3

2024-04-29 Thread Fabio Estevam
On Tue, Apr 23, 2024 at 8:15 PM Marek Vasut  wrote:
>
> Enable PCIe/NVMe support on DH i.MX8M Plus DHCOM PDK3. Except for
> the configuration options which are enabled, add slight adjustment
> to board u-boot.dtsi, which is necessary as there is currently no
> driver for the I2C PCIe clock generator. Since the generator is
> strapped to be always on, it is possible to supplant the generator
> functionality by fixed-clock.
>
> Signed-off-by: Marek Vasut 

Applied, thanks.


Re: [PATCH v1] board: toradex: colibri-imx(6ull|imx7): Fix missing fdt_fixup boot error

2024-04-29 Thread Fabio Estevam
On Tue, Apr 23, 2024 at 12:57 PM Francesco Dolcini  wrote:
>
> From: Francesco Dolcini 
>
> In commit 51aaaf5e7975 ("board: toradex: imx: Remove not needed env 
> variables")
> the empty definition of fdt_fixup variable was removed, however this was
> still referenced from the boot command leading to boot failures:
>  ## Error: \"fdt_fixup\" not defined`
>
> Fix this by removing "run fdt_fixup" from the boot command and instead
> enable CONFIG_OF_ENV_SETUP in the defconfig that would achieve the same
> but in a more robust way (it works fine even if the variable is not
> defined).
>
> Fixes: 51aaaf5e7975 ("board: toradex: imx: Remove not needed env variables")
> Signed-off-by: Francesco Dolcini 

Applied, thanks.


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

2024-04-29 Thread Fabio Estevam
Hi Tom,

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

The following changes since commit 174ac987655c888017c82df1883c0c2ea0dc2495:

  Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-mmc 
(2024-04-26 07:39:18 -0600)

are available in the Git repository at:

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

for you to fetch changes up to 37e50627efacd8dae18b564e9d8886a033e181bc:

  ARM: dts: imx: Convert i.MX8M flash.bin image generation to binman 
(2024-04-28 12:10:13 -0300)

u-boot-imx-master-20240429
--

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

- Fix missing fdt_fixup on colibri-imx(6ull|imx7).
- Enable PCIe and NVMe on DH i.MX8M Plus DHCOM PDK3.
- Convert i.MX8M flash.bin image generation to binman
- Convert imx93-11x11-evk to OF_UPSTREAM.

Francesco Dolcini (1):
  board: toradex: colibri-imx(6ull|imx7): Fix missing fdt_fixup boot error

Marek Vasut (4):
  ARM: dts: imx: Enable PCIe and NVMe on DH i.MX8M Plus DHCOM PDK3
  binman: Add nxp_imx8mimage etype
  ARM: dts: imx: Switch Ronetix iMX8MQ-CM to imx8mq-u-boot.dtsi
  ARM: dts: imx: Convert i.MX8M flash.bin image generation to binman

Peng Fan (2):
  dt-bindings: imx93: sync clock header
  imx: imx93-11x11-evk: convert to OF_UPSTREAM

 arch/arm/dts/Makefile   |   1 -
 arch/arm/dts/imx8mm-u-boot.dtsi | 126 --
 arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi |   8 +-
 arch/arm/dts/imx8mn-u-boot.dtsi | 147 +--
 arch/arm/dts/imx8mp-dhcom-pdk3-u-boot.dtsi  |  12 +
 arch/arm/dts/imx8mp-dhcom-u-boot.dtsi   |   2 +-
 arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi  |   2 +-
 arch/arm/dts/imx8mp-u-boot.dtsi |  96 +++
 arch/arm/dts/imx8mq-cm-u-boot.dtsi  | 111 +---
 arch/arm/dts/imx8mq-librem5-r4-u-boot.dtsi  |  15 +-
 arch/arm/dts/imx8mq-u-boot.dtsi | 109 
 arch/arm/dts/imx93-11x11-evk-u-boot.dtsi| 118 +
 arch/arm/dts/imx93-11x11-evk.dts| 322 
 arch/arm/dts/imx93-u-boot.dtsi  |  15 ++
 arch/arm/mach-imx/imx9/Kconfig  |   1 +
 configs/colibri-imx6ull_defconfig   |   1 +
 configs/colibri_imx7_defconfig  |   1 +
 configs/imx8mp_dhcom_pdk3_defconfig |   5 +
 configs/imx93_11x11_evk_defconfig   |   2 +-
 configs/imx93_11x11_evk_ld_defconfig|   2 +-
 include/configs/colibri-imx6ull.h   |   2 +-
 include/configs/colibri_imx7.h  |   2 +-
 include/dt-bindings/clock/imx93-clock.h |   3 +-
 tools/binman/etype/nxp_imx8mimage.py|  74 ++
 24 files changed, 437 insertions(+), 740 deletions(-)
 delete mode 100644 arch/arm/dts/imx93-11x11-evk.dts
 create mode 100644 tools/binman/etype/nxp_imx8mimage.py


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 


  1   2   3   4   5   6   7   8   9   10   >