Re: [PATCH 00/42] imx: i.MX9 update

2023-05-21 Thread Stefano Babic

Hi peng,

On 05.05.23 11:25, Peng Fan wrote:

Hi Stefano, Fabio

Do you have time to give a look? Is there a chance to for this patchset 
landed in 2023.07?




Most patches are very small and clean. I have picked them up, I found a 
small issue due to the different place for sci.h, and I fixed this 
adding to your patch this:


diff --git a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c 
b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c

index 867ceff996..8b4d73052e 100644
--- a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c
+++ b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c
@@ -10,7 +10,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/board/advantech/imx8qm_dmsse20_a1/spl.c 
b/board/advantech/imx8qm_dmsse20_a1/spl.c

index 49067bbfd6..7f2e972425 100644
--- a/board/advantech/imx8qm_dmsse20_a1/spl.c
+++ b/board/advantech/imx8qm_dmsse20_a1/spl.c
@@ -11,7 +11,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 

(by the way, I do not think it is required to repost the patch, as the 
reason is clear and could be easy fixed).


I will rerun CI to check again, but then I agree to get this series soon.

Best regards,
Stefano


Thanks,
Peng

On 4/28/2023 12:08 PM, Peng Fan (OSS) wrote:

From: Peng Fan 

This patchset includes updates mainly for i.MX9, such as Clock, Memory,
Parts, Low drive mode, DDR, cpu driver, Variants

The first patch is not about i.MX9, just include it here since it is a 
simple

one for i.MX8ULP.

For the watchdog reset_cpu, I will move it out from watchdog driver in 
future

patches which would includes other changes. I include it here mainly for
sysreset support.

This patchset depends on two patches from Marek:
https://patchwork.ozlabs.org/project/uboot/patch/20230404192510.160819-1-ma...@denx.de/
https://patchwork.ozlabs.org/project/uboot/patch/20230404192510.160819-2-ma...@denx.de/

Jacky Bai (4):
   ddr: imx9: Change the saved ddr data base to 0x2051c000
   ddr: imx93: Add 625M bypass clock support
   ddr: imx93: update the ddr init to support mult setpoints
   ddr: imx9: update the rank setting for multi fsp support

Peng Fan (33):
   imx8ulp: build ahab
   imx: spl_imx_romapi: typo fix
   imx: move imx8 sci header file to include/firmware/imx
   imx: firmware: sci: add inline functions when IMX8 not enabled
   imx: imx8_cpu: use static for local functions
   imx: imx8_cpu: support i.MX9
   imx: imx8_cpu: support get temperature for i.MX9
   imx: imx8_cpu: print cpu grade temperature
   imx9: configure M33 systick to 24M
   imx9: add more PLL settings
   imx9: use parameter freq when set_arm_clk
   imx9: correct getting LPI2C clk
   imx9: simplify clk settings
   imx9: cut off OPTEE memory region from U-Boot
   imx9: imx93_evk: enable CPU_IMX
   imx9: imx93_evk: drop unused macro
   imx9: imx93_evk: select IMX_TMU
   imx9: imx93_evk: enable CONFIG_WDT
   watchdog: ulp_wdog: guard reset_cpu with condition check
   imx9: soc: support reset cause
   imx9: Get market segment and speed grading
   imx9: clock: clear HW_CTRL_SEL
   imx9: clock: add CONFIG_IMX9_LOW_DRIVE_MODE support
   imx9: clock: config arm alt root to 500mhz
   imx9: add i.MX93 variants support
   imx9: correct coding style
   imx9: use i.MX generic rom api function
   imx9: imx93_evk: add low drive mode support on 11x11 EVK
   arm: dts: imx93: sync device tree with Linux
   arm: dts: imx93: add tmu
   imx9: imx93_evk: Update spl stack & bss base address
   imx9: imx93_evk: update ddr timing file
   imx9: imx93_evk: enable sysreset

Ye Li (5):
   thermal: imx_tmu: Update TMU driver to support iMX93
   imx9: Change hard coded MAC to read from fuse
   imx9: allow to bootaux Mcore with input address
   ddr: imx9: Add workaround for DDRPHY rank-to-rank errata
   imx9: Calculate DDR size from DDRC setting

  arch/arm/dts/imx93-11x11-evk-u-boot.dtsi  |   29 -
  arch/arm/dts/imx93-11x11-evk.dts  |  385 +-
  arch/arm/dts/imx93-pinfunc.h  |  194 +-
  arch/arm/dts/imx93.dtsi   |  618 +--
  arch/arm/include/asm/arch-imx/cpu.h   |    7 +
  arch/arm/include/asm/arch-imx8/power-domain.h |    2 +-
  arch/arm/include/asm/arch-imx8/sci/sci.h  |  138 -
  arch/arm/include/asm/arch-imx8/sys_proto.h    |    2 +-
  arch/arm/include/asm/arch-imx8m/ddr.h |    2 +-
  arch/arm/include/asm/arch-imx9/clock.h    |    6 +
  arch/arm/include/asm/arch-imx9/ddr.h  |   23 +-
  arch/arm/include/asm/arch-imx9/imx-regs.h |    3 +
  arch/arm/include/asm/mach-imx/sys_proto.h |   12 +-
  arch/arm/mach-imx/cmd_dek.c   |    2 +-
  arch/arm/mach-imx/imx8/ahab.c |    2 +-
  arch/arm/mach-imx/imx8/cpu.c  |    2 +-
  arch/arm/mach-imx/imx8/fdt.c  |    2 +-
  arch/arm/mach-imx/imx8/iomux.c    |    2 +-
  arch/arm/mach-imx/imx8/misc.c |    2 +-
  arch/arm/mach-im

Pull request: please pull u-boot-imx-20230525

2023-05-25 Thread Stefano Babic

Hi Tom,

please pull from u-boot-imx, thanks !

This PR conbtains :

- Fixes
- Improvement support for i.MX93


The following changes since commit 6e1852ca2c418e2536ead4b51c4d84a59926b3f1:

  Merge tag 'efi-2023-07-rc3' of 
https://source.denx.de/u-boot/custodians/u-boot-efi (2023-05-16 11:23:30 
-0400)


are available in the Git repository at:

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


for you to fetch changes up to ff476897ed698eae1fa439d52b30694a2b40464a:

  serial: mxs: Add MXS AUART driver (2023-05-21 16:54:41 +0200)


u-boot-imx-20230525
---

- i.MX93 series
- Fixes

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


Fabio Estevam (1):
  ARM: dts: imx7d-sdb-u-boot: Fix usdhc1 UHS operation

Fedor Ross (1):
  ARM: imx: Fix parsing of ROM log event IDs on iMX8M

Jacky Bai (4):
  ddr: imx9: Change the saved ddr data base to 0x2051c000
  ddr: imx93: Add 625M bypass clock support
  ddr: imx93: update the ddr init to support mult setpoints
  ddr: imx9: update the rank setting for multi fsp support

Marek Vasut (3):
  thermal: imx_tmu: Clean up all prints
  thermal: imx_tmu: Move architecture code into driver
  serial: mxs: Add MXS AUART driver

Peng Fan (33):
  imx8ulp: build ahab
  imx: spl_imx_romapi: typo fix
  imx: move imx8 sci header file to include/firmware/imx
  imx: firmware: sci: add inline functions when IMX8 not enabled
  imx: imx8_cpu: use static for local functions
  imx: imx8_cpu: support i.MX9
  imx: imx8_cpu: support get temperature for i.MX9
  imx: imx8_cpu: print cpu grade temperature
  imx9: configure M33 systick to 24M
  imx9: add more PLL settings
  imx9: use parameter freq when set_arm_clk
  imx9: correct getting LPI2C clk
  imx9: simplify clk settings
  imx9: cut off OPTEE memory region from U-Boot
  imx9: imx93_evk: enable CPU_IMX
  imx9: imx93_evk: drop unused macro
  imx9: imx93_evk: select IMX_TMU
  imx9: imx93_evk: enable CONFIG_WDT
  watchdog: ulp_wdog: guard reset_cpu with condition check
  imx9: soc: support reset cause
  imx9: Get market segment and speed grading
  imx9: clock: clear HW_CTRL_SEL
  imx9: clock: add CONFIG_IMX9_LOW_DRIVE_MODE support
  imx9: clock: config arm alt root to 500mhz
  imx9: add i.MX93 variants support
  imx9: correct coding style
  imx9: use i.MX generic rom api function
  imx9: imx93_evk: add low drive mode support on 11x11 EVK
  arm: dts: imx93: sync device tree with Linux
  arm: dts: imx93: add tmu
  imx9: imx93_evk: Update spl stack & bss base address
  imx9: imx93_evk: update ddr timing file
  imx9: imx93_evk: enable sysreset

Ye Li (5):
  thermal: imx_tmu: Update TMU driver to support iMX93
  imx9: Change hard coded MAC to read from fuse
  imx9: allow to bootaux Mcore with input address
  ddr: imx9: Add workaround for DDRPHY rank-to-rank errata
  imx9: Calculate DDR size from DDRC setting

 arch/arm/dts/imx7d-sdb-u-boot.dtsi 
 |   51 +++
 arch/arm/dts/imx93-11x11-evk-u-boot.dtsi 
 |   29 --
 arch/arm/dts/imx93-11x11-evk.dts 
 |  385 -
 arch/arm/dts/imx93-pinfunc.h 
 |  194 +
 arch/arm/dts/imx93.dtsi 
 |  618 +--
 arch/arm/include/asm/arch-imx/cpu.h 
 |7 +
 arch/arm/include/asm/arch-imx8/power-domain.h 
 |2 +-
 arch/arm/include/asm/arch-imx8/sci/sci.h 
 |  138 --
 arch/arm/include/asm/arch-imx8/sys_proto.h 
 |2 +-
 arch/arm/include/asm/arch-imx8m/ddr.h 
 |2 +-
 arch/arm/include/asm/arch-imx9/clock.h 
 |6 +
 arch/arm/include/asm/arch-imx9/ddr.h 
 |   23 +-
 arch/arm/include/asm/arch-imx9/imx-regs.h 
 |3 +
 arch/arm/include/asm/mach-imx/sys_proto.h 
 |   12 +-
 arch/arm/mach-imx/cmd_dek.c 
 |2 +-
 arch/arm/mach-imx/imx8/ahab.c 
 |2 +-
 arch/arm/mach-imx/imx8/cpu.c 
 |2 +-
 arch/arm/mach-imx/imx8/fdt.c 
 |2 +-
 arch/arm/mach-imx/imx8/iomux.c 
 |2 +-
 arch/arm/mach-imx/imx8/misc.c 
 |2 +-
 arch/arm/mach-imx/imx8/snvs_security_sc.c 
 |2 +-
 arch/arm/mach-imx/imx8m/soc.c 
 |   74 +---
 arch/arm/mach-imx/imx8ulp/Kconfig 
 |5 +
 arch/arm/mach-imx/imx8ulp/Makefile 
 |1 +
 arch/arm/mach-imx/imx9/Kconfig 
 |5 +
 arch/arm/mach-imx/imx9/clock.c 
 |  113 -
 arch/arm/mach-imx/imx9/imx_bootaux.c 
 |   10 +-
 arch/arm/mach-imx/imx9/soc.c 
 |  384 -
 arch/arm/mach-imx/parse-container.c 
 |2 +-
 arch/arm/mach-imx/spl_imx_romapi.c 
 |2 +-
 board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c 
 |2 +-
 board/advantech/imx8qm_dmsse20_a1/spl.c 
 |2 +-
 board/advantech/imx8qm_rom77

[PATCH] mkimage: ecdsa: password for signing from environment

2023-05-25 Thread Stefano Babic
Use a variable (MKIMAGE_SIGN_PASSWORD) like already done for RSA to
allow the signing process to run in batch.

Signed-off-by: Stefano Babic 
---
 lib/ecdsa/ecdsa-libcrypto.c | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/ecdsa/ecdsa-libcrypto.c b/lib/ecdsa/ecdsa-libcrypto.c
index d5939af2c5..5fa9be10b4 100644
--- a/lib/ecdsa/ecdsa-libcrypto.c
+++ b/lib/ecdsa/ecdsa-libcrypto.c
@@ -111,16 +111,30 @@ static size_t ecdsa_key_size_bytes(const EC_KEY *key)
return EC_GROUP_order_bits(group) / 8;
 }
 
+static int default_password(char *buf, int size, int rwflag, void *u)
+{
+   strncpy(buf, (char *)u, size);
+   buf[size - 1] = '\0';
+   return strlen(buf);
+}
+
 static int read_key(struct signer *ctx, const char *key_name)
 {
FILE *f = fopen(key_name, "r");
+   const char *key_pass;
 
if (!f) {
fprintf(stderr, "Can not get key file '%s'\n", key_name);
return -ENOENT;
}
 
-   ctx->evp_key = PEM_read_PrivateKey(f, NULL, NULL, NULL);
+   key_pass = getenv("MKIMAGE_SIGN_PASSWORD");
+   if (key_pass) {
+   ctx->evp_key = PEM_read_PrivateKey(f, NULL, default_password, 
(void *)key_pass);
+
+   } else {
+   ctx->evp_key = PEM_read_PrivateKey(f, NULL, NULL, NULL);
+   }
fclose(f);
if (!ctx->evp_key) {
fprintf(stderr, "Can not read key from '%s'\n", key_name);
-- 
2.34.1



Re: [PATCH V4] bsh: imx6ulz_smm_m2: Add imx6ulz BSH SMM M2 boards

2022-09-18 Thread Stefano Babic

Hi Michael,

On 16.09.22 14:53, Michael Nazzareno Trimarchi wrote:

Hi Stefano

I have more patches on m2 and I need to know if you are going to
request the merge to Tom soon or later. Alternative you can drop
this one and keep the new one


I am checking which patches should flow into the release, the other ones 
will go to -next. It seems to me better to drop your V1, and I will 
apply V2 then.


Regards,
Stefano



Michael

On Fri, Jul 29, 2022 at 12:10 PM  wrote:



Introduce BSH SystemMaster (SMM) M2 board family, which consists of:
imx6ulz SMM M2 and imx6ulz SMM M2 PRO boards.
Add support for imx6ulz BSH SMM M2 board:
- 128 MiB DDR3 RAM
- 256MiB Nand
- USBOTG1 peripheral - fastboot.
Signed-off-by: Michael Trimarchi 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=






Re: [PATCH V5] bsh: imx6ulz_smm_m2: Add imx6ulz BSH SMM M2 boards

2022-09-19 Thread Stefano Babic

On 18.09.22 17:48, Fabio Estevam wrote:

On Sun, Sep 18, 2022 at 12:09 PM Michael Trimarchi
 wrote:


Introduce BSH SystemMaster (SMM) M2 board family, which consists of:
imx6ulz SMM M2 and imx6ulz SMM M2 PRO boards.

Add support for imx6ulz BSH SMM M2 board:

- 128 MiB DDR3 RAM
- 256MiB Nand
- USBOTG1 peripheral - fastboot.

Signed-off-by: Michael Trimarchi 


Reviewed-by: Fabio Estevam 


Ok, thanks - I drop the old one and merge this into u-boot.imx (ok, I 
had to rebase it, I hope this does not create many issues). I send a PR 
to Tom now.


Regards,
Stefano


--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Pull request: u-boot-imx u-boot-imx-20220919

2022-09-19 Thread Stefano Babic

Hi Tom,

please pull from u-boot-imx, thanks!

The following changes since commit 1977d72a69f3c8d97bd25a86a6be4da27cde3724:

  Merge https://source.denx.de/u-boot/custodians/u-boot-marvell 
(2022-09-18 08:27:23 -0400)


are available in the Git repository at:

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


for you to fetch changes up to cc74cab86a5f32db93a9f0dc7bc46fa5e83f4f3e:

  bsh: imx6ulz_smm_m2: Add imx6ulz BSH SMM M2 boards (2022-09-18 
22:56:18 +0200)



u-boot-imx-20220919
---

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

- Fix imx8mn-beacon-kit-u-boot
- Merged Purism
- imxrt1170 (already merged in u-boot-imx)
- Fixes in crypto FSL
- Toradex : fixes Verdin
- Serial Driver: fixes when not used as console
- DH Boards : fixes + USB
- Fix CONFIG_SYS_MALLOC_F_LEN (Kconfig)
- Add imx6ulz_smm_m2


Adam Ford (1):
  arm: dts: imx8mn-beacon-kit-u-boot: Fix broken booting

Angus Ainslie (1):
  board: purism: add the Purism Librem5 phone

Denys Drozdov (2):
  verdin-imx8mm: do not save environment when it's nowhere
  verdin-imx8mp: do not save environment when it's nowhere

Fabio Estevam (1):
  MAINTAINERS: imx: Add an entry for the serial driver

Gaurav Jain (1):
  crypto/fsl: fsl_hash: Fix crash in flush dcache

Jesse Taube (8):
  imx: imxrt1170-evk: Add support for the NXP i.MXRT1170-EVK
  ARM: dts: imxrt11170-pinfunc: Add pinctrl binding header
  ARM: dts: imx: add i.MXRT1170-EVK support
  dt-bindings: imx: Add clock binding for i.MXRT1170
  clk: imx: Add i.MXRT11xx pllv3 variant
  clk: imx: Add initial support for i.MXRT1170 clock driver
  RAM: Add changes for i.MXRT11xx series
  ARM: imxrt1170_defconfig: Add i.MXRT1170 defconfig

Johannes Schneider (2):
  serial: mxc: enable the RX pipeline
  serial: mxc: have putc use the TXFIFO

Marcel Ziswiler (5):
  imx: romapi: fix spurious ampersand in address print
  verdin-imx8mm: verdin-imx8mp: update env memory layout
  verdin-imx8mm: prepare for optional job ring driver model
  verdin-imx8mm: improve and extend boot devices
  verdin-imx8mm: various config additions and improvements

Marek Vasut (13):
  doc: imx: habv4: Add Secure Boot guide for i.MX8M SPL targets
  ARM: imx: Enable USB ethernet on i.MX8M Plus DHCOM
  ARM: dts: imx: Add HW variant details to i.MX8M Plus DHCOM PDK2
  ARM: dts: imx: Drop Atheros PHY header from i.MX8M Plus DHCOM PDK2
  ARM: dts: imx: Add SoM compatible to i.MX8M Plus DHCOM PDK2
  ARM: dts: imx: Rename imx8mp-dhcom{-pdk2,}-boot.dtsi
  ARM: dts: imx: Adjust ECSPI1 pinmux on i.MX8M Plus DHCOM
  ARM: dts: imx: Fix I2C5 GPIO assignment on i.MX8M Plus DHCOM
  ARM: imx: dh-imx6: Increase SF erase area for u-boot update
  imx8m: ddrphy_utils: Remove unused file
  ARM: imx: Update DDR frequency on i.MX8M Plus DHCOM
  ARM: imx: Enable SPL GPIO hog on i.MX8M Plus DHCOM
  ARM: imx: Update Data Modul i.MX8M Mini eDM SBC DRAM timing

Michael Trimarchi (1):
  bsh: imx6ulz_smm_m2: Add imx6ulz BSH SMM M2 boards

Peng Fan (1):
  Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN

Tim Harvey (1):
  board: gateworks: venice: add fixup for GW73xx-C+

 Kconfig   |3 +-
 MAINTAINERS   |1 +
 arch/arm/dts/Makefile |7 +-
 arch/arm/dts/imx6ulz-bsh-smm-m2-u-boot.dtsi   |   35 +++
 arch/arm/dts/imx6ulz-bsh-smm-m2.dts   |  146 +
 arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi|4 +
 arch/arm/dts/imx8mp-dhcom-pdk2-u-boot.dtsi|  137 +---
 arch/arm/dts/imx8mp-dhcom-pdk2.dts|9 +-
 arch/arm/dts/imx8mp-dhcom-som.dtsi|   14 +-
 arch/arm/dts/imx8mp-dhcom-u-boot.dtsi |  141 +
 arch/arm/dts/imx8mq-librem5-r4-u-boot.dtsi|   24 ++
 arch/arm/dts/imx8mq-librem5-r4.dts|   35 +++
 arch/arm/dts/imx8mq-librem5.dtsi  | 1255 
++

 arch/arm/dts/imxrt1170-evk-u-boot.dtsi|   94 ++
 arch/arm/dts/imxrt1170-evk.dts|  250 
+++
 arch/arm/dts/imxrt1170-pinfunc.h  | 1561 

 arch/arm/dts/imxrt1170.dtsi   |  257 
+++

 arch/arm/include/asm/arch-imx/cpu.h   |1 +
 arch/arm/mach-imx/imx8m/Kconfig   |9 +
 arch/arm/mach-imx/imxrt/Kconfig   |9 +
 arch/arm/mach-imx/imxrt/soc.c |2 +
 arch

Re: [PATCH v2 4/5] verdin-imx8mm: various config additions and improvements

2022-09-19 Thread Stefano Babic

On 18.09.22 22:41, sba...@denx.de wrote:

From: Marcel Ziswiler 
- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable link-time optimisation
- explicitly set a boot delay of one second
- enable CRC32 and MD5
- enable command for low-level access to data in a partition
- enable time commands
- enable PMIC commands
- improve ETHPRIME configuration
- enable eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- remove stale PFUZE100 PMIC driver
- enable thermal management unit driver
- enable more USB host functionality
- enable hexdump
Signed-off-by: Marcel Ziswiler 

Applied to u-boot-imx, master, thanks !



Not yet: Patch 4/5 and 5/5 require a rebase, I avoid to do it myself as 
I cannot then test if it is ok. These two patches are not in my PR, I 
can pick them up if you repost them.


Best regards,
Stefano Babic

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Re: [PATCH] ARM: imx: Deduplicate i.MX8M SNVS LPGPR unlock

2022-09-19 Thread Stefano Babic

On 23.08.22 19:26, Fabio Estevam wrote:

On 23/08/2022 14:05, Marek Vasut wrote:

Pull this LPGPR unlock into common code, since it is used in multiple
systems already.

Signed-off-by: Marek Vasut 
Cc: Fabio Estevam 
Cc: Peng Fan 
Cc: Stefano Babic 
Cc: Ye Li 
Cc: uboot-imx 


Reviewed-by: Fabio Estevam 


Board is not built clean after applying this patch, I had to remove it. See:

https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/498918

Best regards,
Stefano

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Re: [PATCH] mx8m: csf.sh: Fix the calculation of fit_block_size

2022-09-21 Thread Stefano Babic

Hi Fabio,

On 20.09.22 20:46, Fabio Estevam wrote:

Hi Stefano and Tom,

On Sun, Aug 14, 2022 at 2:25 PM Marek Vasut  wrote:


On 8/13/22 14:03, Fabio Estevam wrote:

From: Fabio Estevam 

When running the script to sign SPL/U-Boot on a kontron-sl-mx8mm board,
the fit_block_size was calculated as 0x1000 instead of 0x1020.

Add an extra parenthesis pair to fix it.

Signed-off-by: Fabio Estevam 
---
Hi Stefano,

This one applies against u-boot-imx.

Since this one has not reached mainline yet, it is OK
if you want to squash this change in the original commit.

   doc/imx/habv4/csf_examples/mx8m/csf.sh | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/imx/habv4/csf_examples/mx8m/csf.sh 
b/doc/imx/habv4/csf_examples/mx8m/csf.sh
index 6898513be51f..7d267a7218d3 100644
--- a/doc/imx/habv4/csf_examples/mx8m/csf.sh
+++ b/doc/imx/habv4/csf_examples/mx8m/csf.sh
@@ -40,7 +40,7 @@ dd if=csf_spl.bin of=flash.bin bs=1 seek=${spl_dd_offset} 
conv=notrunc
   # fitImage tree
   fit_block_base=$(printf "0x%x" $(( $(sed -n "/CONFIG_SYS_TEXT_BASE=/ s@.*=@@p" 
.config) - $(sed -n "/CONFIG_FIT_EXTERNAL_OFFSET=/ s@.*=@@p" .config) - 0x200 - 0x40)) )
   fit_block_offset=$(printf "0x%s" $(fdtget -t x u-boot.dtb 
/binman/imx-boot/uboot offset))
-fit_block_size=$(printf "0x%x" $(( ( $(fdtdump u-boot.itb 2>/dev/null | sed -n 
"/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1) + 0x20 )) 
)
+fit_block_size=$(printf "0x%x" $(( ( ($(fdtdump u-boot.itb 2>/dev/null | sed -n 
"/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1)) + 0x20 
)) )
   sed -i "/Blocks = / s@.*@  Blocks = $fit_block_base $fit_block_offset $fit_block_size 
\"flash.bin\", @" csf_fit.tmp


Reviewed-by: Marek Vasut 


Could you please consider applying this one as a fix to 2022.10?

Thanks


I picked up this and "kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be 
selected", together with Marek's "Deduplicate i.MX8M SNVS LPGPR unlock" 
and the two patches from Tim. CI is running, I will send then the small 
PR to Tom if everything is nice.


Regards,
Stefano

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Pull request: u-boot-imx u-boot-imx-20220919

2022-09-22 Thread Stefano Babic

Hi Tom,

Please pull from u-boot-imx, just some fixes for releases, thanks !


The following changes since commit 12ed6d4911ced1df099a365e0a994b54211b60f3:

  Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb (2022-09-19 
16:49:18 -0400)


are available in the Git repository at:

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


for you to fetch changes up to 1d8f4c85e3c04f596b0464542221b3507af0014e:

  kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be selected 
(2022-09-21 16:19:45 +0200)



u-boot-imx-20220922
---

Fixes for 2022.10

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


Fabio Estevam (2):
  mx8m: csf.sh: Fix the calculation of fit_block_size
  kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be selected

Marek Vasut (1):
  ARM: imx: Deduplicate i.MX8M SNVS LPGPR unlock

Tim Harvey (2):
  arm: dts: imx8mp-venice-gw74xx: add dsa phy handles to u-boot dtsi
  arm: dts: imx8mm-venice-gw7901: add dsa phy handles to u-boot dtsi

 arch/arm/dts/imx8mm-venice-gw7901-u-boot.dtsi   | 51 
+++
 arch/arm/dts/imx8mp-venice-gw74xx-u-boot.dtsi   | 59 
+++

 arch/arm/include/asm/arch-imx8m/imx-regs.h  |  5 +
 arch/arm/mach-imx/imx8m/soc.c   | 12 

 board/data_modul/imx8mm_edm_sbc/imx8mm_data_modul_edm_sbc.c | 17 
-
 board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c   | 17 
-
 board/menlo/mx8menlo/mx8menlo.c | 17 
-

 configs/kontron-sl-mx8mm_defconfig  |  1 -
 doc/imx/habv4/csf_examples/mx8m/csf.sh  |  2 +-
 9 files changed, 128 insertions(+), 53 deletions(-)

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Re: [PATCH v2 4/5] verdin-imx8mm: various config additions and improvements

2022-09-22 Thread Stefano Babic

On 22.09.22 17:03, Marcel Ziswiler wrote:

Hi Stefano

On Mon, 2022-09-19 at 14:39 +0200, Stefano Babic wrote:

On 18.09.22 22:41, sba...@denx.de wrote:

From: Marcel Ziswiler 
- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable link-time optimisation
- explicitly set a boot delay of one second
- enable CRC32 and MD5
- enable command for low-level access to data in a partition
- enable time commands
- enable PMIC commands
- improve ETHPRIME configuration
- enable eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- remove stale PFUZE100 PMIC driver
- enable thermal management unit driver
- enable more USB host functionality
- enable hexdump
Signed-off-by: Marcel Ziswiler 

Applied to u-boot-imx, master, thanks !



Not yet: Patch 4/5 and 5/5 require a rebase, I avoid to do it myself as
I cannot then test if it is ok. These two patches are not in my PR, I
can pick them up if you repost them.


Sure.

Sorry, I missed this email as you missed CCing anybody else (e.g. like my work 
email).



Sorry, you're right.


Plus you probably missed this:

https://patchwork.ozlabs.org/project/uboot/cover/20220822130604.843081-1-mar...@ziswiler.com/#2953792

Anyway, I will send an additional series including Patch 4/5, Patch 5/5 and 
fixing v2 vs. v1 (and more).


Thanks !

Regards,
Stefano



Thanks!


Best regards,
Stefano Babic


Cheers

Marcel



--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Re: [PATCH] ARM: dts: imx: Add WDT bindings on DH i.MX6 DHSOM

2023-03-30 Thread Stefano Babic

Hi Marek,

On 05.03.23 21:49, Marek Vasut wrote:

Add WDT reboot bindings on DH i.MX6 DHSOM to permit the platform
to reboot via WDT in U-Boot. These are custom U-Boot bindings,
hence they are placed in -u-boot.dtsi .

Signed-off-by: Marek Vasut 
---
Cc: Andreas Geisreiter 
Cc: Christoph Niedermaier 
Cc: Fabio Estevam 
Cc: Peng Fan 
Cc: Stefano Babic 
Cc: u-b...@dh-electronics.com
---
  arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi | 10 ++
  1 file changed, 10 insertions(+)

diff --git a/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi 
b/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi
index 190567ab7ba..06ad98bccf6 100644
--- a/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi
@@ -8,6 +8,12 @@
aliases {
eeprom0 = &eeprom0;
};
+
+   wdt-reboot {
+   compatible = "wdt-reboot";
+   wdt = <&wdog1>;
+   u-boot,dm-spl;
+   }


I cannot merge it, u-boot,dm-spl is not allowed anymore (see 
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/604593), 
switched to bootph-pre-ram ?


Same is for the other patch of yours:

http://patchwork.ozlabs.org/project/uboot/patch/20230208113347.131572-1-ma...@denx.de/


Best regards,
Stefano
;

  };
  
  &fec {

@@ -25,3 +31,7 @@
gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>;
enable-active-high;
  };
+
+&wdog1 {
+   u-boot,dm-spl;
+};


--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Pull request: please pull u-boot-imx/next

2023-03-31 Thread Stefano Babic

Hi Tom,

this is a big bunch for /next.

For current release, I have still a couple of fixes that I am picking up.

The following changes since commit 654483d251275d61eb5f93c18e320ad7d6bfcc5d:

  Merge tag 'u-boot-at91-2023.07-a' of 
https://source.denx.de/u-boot/custodians/u-boot-at91 into next 
(2023-03-28 11:21:29 -0400)


are available in the Git repository at:

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


for you to fetch changes up to f216580b642c7244aeb3619aeceecb331e025ad3:

  clk: imx8mp: add pwm clocks support (2023-03-30 13:53:55 +0200)


u-boot-imx-next-20230331 for next
-

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

i.MX patches queued for next:

- Conversions to DM_SERIAL
- Fixes for Toradex boards
- Gateworks Boards
- i.MX8ULP
- EQoS support / fixes, changes in boards


Andrejs Cainikovs (7):
  board: colibri-imx8x: add 2nd ethernet address
  colibri-imx8x: enable fuse command
  colibri-imx8x: construct fdtfile dynamically
  colibri-imx8x: drop obsolete environment variables
  colibri-imx8x: switch from fatload to load
  colibri-imx8x: set bootaux memory base and size
  Revert "imx: imx8x: colibri: switch to binman"

Emanuele Ghidoli (1):
  configs: verdin-imx8mp: Fix wrong early malloc() heap size

Fabio Estevam (12):
  mx53loco: Add DM_SERIAL support
  mx53loco: Add DM_I2C support
  mx51evk: Add DM_SERIAL support
  mx6sxsabresd: Add DM_SERIAL support
  udoo: Add DM_SERIAL support
  pico-imx6: Add DM_SERIAL support
  pico-imx6: Pass the mmc alias to fix boot regression
  mx6sxsabreauto: Remove myself from MAINTAINERS
  mx6sabreauto: Convert to DM_PMIC
  mx6sabresd: Convert to DM_PMIC
  mx53loco: Remove unused mx53loco_video.c file
  mx51evk: Remove unused mx51evk_video.c file

Frieder Schrempf (1):
  doc: sl-mx8mm: Fix mistake in merge conflict resolution

Igor Opaniuk (1):
  colibri-imx8x: provide proper CONFIG_SYS_PROMPT

Jacky Bai (2):
  ddr: imx: Update the ddr init flow on imx8ulp
  imx8ulp_evk: Update the DDR timing

Jean-Marie Lemetayer (1):
  misc: imx: remove DM dependency for ocotp driver in SPL

Marcel Ziswiler (6):
  colibri-imx8x: remove obsolete net usb start
  colibri-imx8x: remove obsolete sdhc related config defines
  colibri-imx8x: update update_uboot confirmation message
  colibri-imx8x: enable environment bootcount limit
  colibri-imx8x: update env memory layout
  colibri-imx8x: set bootdelay

Marek Vasut (24):
  ARM: imx: Enable LTO for DH electronics i.MX8M Plus DHCOM
  ARM: imx: Add 2 GiB DRAM support for DH electronics i.MX8M Plus DHCOM
  arm64: imx8mp: Auto-detect PHY on i.MX8MP DHCOM
  arm64: dts: imx8mp: Adjust EQoS PHY address on i.MX8MP DHCOM
  arm64: dts: imx8mp: Add EQoS RMII pin mux on i.MX8MP DHCOM
  arm64: dts: imx8mp: Add FEC RMII pin mux on i.MX8MP DHCOM
  arm64: dts: imx8mp: Do not delete PHY nodes on i.MX8MP DHCOM PDK2
  ARM: imx: Convert DH i.MX6 DHSOM to DM_SERIAL
  ARM: imx: Include on-SoM microSD in list of i.MX6 DHCOM boot devices
  ARM: dts: imx: Add support for DH electronics i.MX8M Plus DHCOM 
on PDK3

  clk: imx8mp: Add EQoS MAC clock
  net: Pull board_interface_eth_init() into common code
  net: dwc_eth_qos: Drop bogus return after goto
  net: dwc_eth_qos: Drop unused dm_gpio_free() on STM32
  net: dwc_eth_qos: Staticize eqos_inval_buffer_tegra186()
  net: dwc_eth_qos: Set DMA_MODE SWR bit to reset the MAC
  net: dwc_eth_qos: Add DM CLK support for i.MX8M Plus
  net: dwc_eth_qos: Add i.MX8M Plus RMII support
  net: dwc_eth_qos: Add board_interface_eth_init() for i.MX8M Plus
  net: fec_mxc: Add ref clock setup support for i.MX8M Mini/Nano/Plus
  net: fec_mxc: Add board_interface_eth_init() for i.MX8M 
Mini/Nano/Plus

  arm64: dts: imx8mp: Drop EQoS clock workaround
  arm64: imx8mp: Drop EQoS GPR[1] board workaround
  arm64: imx8mm: imx8mn: imx8mp: Drop FEC GPR[1] board workaround

Max Krummenacher (1):
  colibri-imx8x: extract is_imx8dx() from ram detection

Peng Fan (3):
  imx: imx8ulp: upower: replace magic number with macro
  imx: imx8ulp: upower: make code cleaner
  imx8ulp_evk: disable overflow of port0 for LPAV

Philippe Schenker (2):
  colibri-imx8x: Remove baudrate from console argument
  defconfig: colibri-imx8x: enable CONFIG_OF_SYSTEM_SETUP

Rasmus Villemoes (1):
  ARM: imx: imx8mp: fix enable_i2c_clk

Stefan Eichenberger (1):
  configs: colibri-imx7: Fix bad block table in flash configuration

Tim Harvey (3):
  board: gateworks: venice: enable XWAY PHY support
  configs: gwventana_emmc_defconfig: add MV88E61XX DSA switch support
  configs: 

Pull request: please pull u-boot-imx/

2023-04-03 Thread Stefano Babic

Hi Tom,

a fix for current release, please pull from u-boot-imx, thanks !


The following changes since commit 565681e596381b5b6db59cf06931e698f2d829e5:

  imx6sx-udoo-neo-basic: Introduce the u-boot.dtsi (2023-03-28 10:58:16 
-0400)


are available in the Git repository at:

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


for you to fetch changes up to d8aba36d741c01b1e1ea60f3bbbc33ae05fa2505:

  configs: imx8mn_bsh_smm_s2: remove console from bootargs (2023-03-31 
10:51:14 +0200)



Fixes for 2023.04
--

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

- fix for imx8mn_bsh_smm_s2


Dario Binacchi (1):
  configs: imx8mn_bsh_smm_s2: remove console from bootargs

 include/configs/imx8mn_bsh_smm_s2.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Best regards,
Stefano

--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Pull request: please pull u-boot-imx/next: u-boot-imx-next-20230404

2023-04-04 Thread Stefano Babic

Hi Tom,

please pull from u-boot-imx, next !

The following changes since commit a25dcda452bf6a6de72764a8d990d72e5def643d:

  Revert "disk: Use a helper function to reduce duplication" 
(2023-04-03 10:43:37 -0400)


are available in the Git repository at:

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


for you to fetch changes up to ab53bd43dbde4dc8895a9f419e018d219eb4dc20:

  arm64: imx: Add support for imx8mp-beacon-kit (2023-04-04 09:40:25 +0200)


u-boot-imx-next-20230404


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

- boards : DH-Electronics, Toradex, imx8mp-beacon-kit


Adam Ford (1):
  arm64: imx: Add support for imx8mp-beacon-kit

Emanuele Ghidoli (5):
  board: verdin-imx8mp: update ddrc config for different lpddr4 
memories

  board: verdin-imx8mp: fix lpddr4 refresh timing
  board: verdin-imx8mp: update lpddr4 configuration and training
  board: verdin-imx8mp: compact slight different lpddr4 configuration
  board: verdin-imx8mp: change prints in spl_dram_init function

Luca Ceresoli (1):
  arm: imx: add u-boot-nand.imx to boot from NAND without SPL

Marek Vasut (4):
  ARM: imx: Enable SDP download in SPL on DH i.MX6 DHSOM
  ARM: dts: imx: Add WDT reboot bindings on DH i.MX6 DHSOM
  ARM: dts: imx: Add support for Data Modul i.MX8M Plus eDM SBC
  ARM: imx: Enable LTO for DH electronics i.MX6 DHCOM

Markus Niebel (3):
  configs: tqma6: switch to DM_SERIAL
  configs: tqma6: enable DM for MDIO / PHY
  configs: tqma6: enable DM_THERMAL

 Makefile|3 +
 arch/arm/dts/Makefile   |2 +
 arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi  |   10 +
 arch/arm/dts/imx8mp-beacon-kit-u-boot.dtsi  |  216 
+++
 arch/arm/dts/imx8mp-beacon-kit.dts  |  550 
+++
 arch/arm/dts/imx8mp-beacon-som.dtsi |  416 
+

 arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi  |  130 +++
 arch/arm/dts/imx8mp-data-modul-edm-sbc.dts  |  973 


 arch/arm/mach-imx/Makefile  |6 +
 arch/arm/mach-imx/imx8m/Kconfig |   19 +
 board/beacon/imx8mp/Kconfig |   16 +
 board/beacon/imx8mp/MAINTAINERS |6 +
 board/beacon/imx8mp/Makefile|   13 +
 board/beacon/imx8mp/imx8mp_beacon.c |   35 ++
 board/beacon/imx8mp/imx8mp_beacon.env   |   19 +
 board/beacon/imx8mp/imximage-8mp-lpddr4.cfg |9 +
 board/beacon/imx8mp/lpddr4_timing.c | 1881 
+

 board/beacon/imx8mp/spl.c   |  132 +++
 board/data_modul/imx8mp_edm_sbc/Kconfig |   15 +
 board/data_modul/imx8mp_edm_sbc/MAINTAINERS |8 +
 board/data_modul/imx8mp_edm_sbc/Makefile|   13 +
 board/data_modul/imx8mp_edm_sbc/imx8mp_data_modul_edm_sbc.c |   67 
 board/data_modul/imx8mp_edm_sbc/imximage.cfg|8 +
 board/data_modul/imx8mp_edm_sbc/lpddr4_timing.h |   11 +
 board/data_modul/imx8mp_edm_sbc/lpddr4_timing_4G_32.c   | 1849 
+++

 board/data_modul/imx8mp_edm_sbc/spl.c   |  124 +++
 board/toradex/verdin-imx8mp/lpddr4_timing.c |  423 
+

 board/toradex/verdin-imx8mp/lpddr4_timing.h |   11 +
 board/toradex/verdin-imx8mp/spl.c   |   19 +-
 configs/dh_imx6_defconfig   |6 +
 configs/imx8mp_beacon_defconfig |  182 
+
 configs/imx8mp_data_modul_edm_sbc_defconfig |  267 
++

 configs/tqma6dl_mba6_mmc_defconfig  |7 +-
 configs/tqma6dl_mba6_spi_defconfig  |7 +-
 configs/tqma6q_mba6_mmc_defconfig   |7 +-
 configs/tqma6q_mba6_spi_defconfig   |7 +-
 configs/tqma6s_mba6_mmc_defconfig   |7 +-
 configs/tqma6s_mba6_spi_defconfig   |7 +-
 doc/board/beacon/beacon-imx8mp.rst  |   52 +++
 doc/board/beacon/index.rst  |9 +
 doc/board/index.rst |1 +
 includ

Re: [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh

2023-01-13 Thread Stefano Babic

Hi Marcel,

On 10.01.23 11:00, Marcel Ziswiler wrote:

Any feedback?

@Stefano: Any plans to apply anything?


I am not in my office until 23.1, I won't be able to do any merge / PR 
before I will be back, sorry.


Best regards,
Stefano



@Tom: Or should we be sending you pull-requests directly?

On Mon, 2022-12-12 at 01:09 +0100, Marcel Ziswiler wrote:

From: Marcel Ziswiler 


This series fixes a boot issue and refreshes Apalis iMX8 support as
follows:
- fix booting caused by missing DM_EVENT
- implement PCB version and SoC variant handling
- turn off LCD backlight before OS handover
- display build info
- provide proper prompt
- set bootdelay
- add overlays support
- remove global environment variable script
- enable environment bootcount limit
- update SPDX license identifier string
- remove obsolete SDHC related config defines
- remove obsolete net usb start
- introduce setup setting setupargs
- drop obsolete environment variables
- update update_uboot confirmation message
- update env memory layout


Igor Opaniuk (1):
   apalis-imx8: provide proper config_sys_prompt

Marcel Ziswiler (13):
   apalis-imx8: fix booting caused by missing dm_event
   apalis-imx8: implement pcb version and soc variant handling
   apalis-imx8: turn off lcd backlight before os handover
   apalis-imx8: display build info
   apalis-imx8: set bootdelay
   apalis-imx8: enable environment bootcount limit
   apalis-imx8: update spdx license identifier string
   apalis-imx8: remove obsolete sdhc related config defines
   apalis-imx8: remove obsolete net usb start
   apalis-imx8: introduce setup setting setupargs
   apalis-imx8: drop obsolete environment variables
   apalis-imx8: update update_uboot confirmation message
   apalis-imx8: update env memory layout

Oleksandr Suvorov (2):
   apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
   apalis/colibri-imx8/8x: remove global variable script

  arch/arm/dts/fsl-imx8qm-apalis.dts    |   4 +-
  board/toradex/apalis-imx8/Makefile    |   4 +-
  .../apalis-imx8/apalis-imx8-imximage.cfg  |   4 +-
  board/toradex/apalis-imx8/apalis-imx8.c   | 129 +-
  configs/apalis-imx8_defconfig |  10 +-
  configs/colibri-imx8x_defconfig   |   1 +
  include/configs/apalis-imx8.h |  45 ++
  include/configs/colibri-imx8x.h   |   1 -
  8 files changed, 156 insertions(+), 42 deletions(-)


--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Re: [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh

2023-01-13 Thread Stefano Babic




On 10.01.23 17:30, Tom Rini wrote:

On Tue, Jan 10, 2023 at 10:00:25AM +, Marcel Ziswiler wrote:

Any feedback?

@Stefano: Any plans to apply anything?

@Tom: Or should we be sending you pull-requests directly?


Stefano, do you want some help with the iMX queue?


I am not in office until 23.1, and I could not merge / send PR until 
then. Please apply directly series if they cannot wait, I will go on 
when I will be back.


Stefano






On Mon, 2022-12-12 at 01:09 +0100, Marcel Ziswiler wrote:

From: Marcel Ziswiler 


This series fixes a boot issue and refreshes Apalis iMX8 support as
follows:
- fix booting caused by missing DM_EVENT
- implement PCB version and SoC variant handling
- turn off LCD backlight before OS handover
- display build info
- provide proper prompt
- set bootdelay
- add overlays support
- remove global environment variable script
- enable environment bootcount limit
- update SPDX license identifier string
- remove obsolete SDHC related config defines
- remove obsolete net usb start
- introduce setup setting setupargs
- drop obsolete environment variables
- update update_uboot confirmation message
- update env memory layout


Igor Opaniuk (1):
   apalis-imx8: provide proper config_sys_prompt

Marcel Ziswiler (13):
   apalis-imx8: fix booting caused by missing dm_event
   apalis-imx8: implement pcb version and soc variant handling
   apalis-imx8: turn off lcd backlight before os handover
   apalis-imx8: display build info
   apalis-imx8: set bootdelay
   apalis-imx8: enable environment bootcount limit
   apalis-imx8: update spdx license identifier string
   apalis-imx8: remove obsolete sdhc related config defines
   apalis-imx8: remove obsolete net usb start
   apalis-imx8: introduce setup setting setupargs
   apalis-imx8: drop obsolete environment variables
   apalis-imx8: update update_uboot confirmation message
   apalis-imx8: update env memory layout

Oleksandr Suvorov (2):
   apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
   apalis/colibri-imx8/8x: remove global variable script

  arch/arm/dts/fsl-imx8qm-apalis.dts    |   4 +-
  board/toradex/apalis-imx8/Makefile    |   4 +-
  .../apalis-imx8/apalis-imx8-imximage.cfg  |   4 +-
  board/toradex/apalis-imx8/apalis-imx8.c   | 129 +-
  configs/apalis-imx8_defconfig |  10 +-
  configs/colibri-imx8x_defconfig   |   1 +
  include/configs/apalis-imx8.h |  45 ++
  include/configs/colibri-imx8x.h   |   1 -
  8 files changed, 156 insertions(+), 42 deletions(-)




--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Re: imx patches pending

2022-10-19 Thread Stefano Babic

Hi Tim,

On 14.10.22 18:38, Tim Harvey wrote:

Stefano,

With the merge window for v2023.01 closing in about a week (10/24),
can you please look at the pending patches for imx? I'm afraid you may
have some merge conflicts due to dt updates and we likely need time to
respond to any issues you may have.



I will try to sum them in next days and then post the PR to Tom.

Stefano


Best Regards,

Tim


--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v4 5/5] arm: imx8mp: Initial MSC SM2S iMX8MP support

2022-10-20 Thread Stefano Babic

On 04.10.22 13:07, Martyn Welch wrote:

Add support for the MSC SM2S-IMX8PLUS SMARC Module. Tested in conjunction
with the MSC SM2-MB-EP1 Mini-ITX Carrier Board.


I see at least some issues:

- MAINTAINERS file is missing
- a lot of symbols are set in include/configs/msc_sm2s_imx8mp.h instead 
of moving to Kbuild. Running first CI, the following are reported:


Unmigrated symbols found in include/configs/msc_sm2s_imx8mp.h:
CONFIG_ETHPRIME
CONFIG_SPL_BSS_START_ADDR
CONFIG_SPL_STACK
CONFIG_SYS_BARGSIZE
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
CONFIG_SYS_SPL_MALLOC_SIZE
Unmigrated symbols found in include/configs/imx7ulp_spl.h:
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
CONFIG_SPL_STACK
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
CONFIG_SYS_SPL_MALLOC_SIZE

Best regards,
Stefano



Signed-off-by: Martyn Welch 
---

Changes in v2:
  - Renamed FDT to closer match kernel
  - Sync with kernel FDT
  - Update for changes made in U-Boot

Changes in v3:
  - Use imx8mp-u-boot.dtsi
  - Switch to use of DM PMIC support in SPL

Changes in v4:
  - Rebased to latest imx master branch

  arch/arm/dts/Makefile |1 +
  arch/arm/dts/imx8mp-msc-sm2s-u-boot.dtsi  |   65 +
  arch/arm/dts/imx8mp-msc-sm2s.dts  |  820 
  arch/arm/mach-imx/imx8m/Kconfig   |8 +
  board/msc/sm2s_imx8mp/Kconfig |   15 +
  board/msc/sm2s_imx8mp/Makefile|   12 +
  board/msc/sm2s_imx8mp/imximage-8mp-lpddr4.cfg |8 +
  board/msc/sm2s_imx8mp/lpddr4_timing.c | 1842 +
  board/msc/sm2s_imx8mp/sm2s_imx8mp.c   |   60 +
  board/msc/sm2s_imx8mp/spl.c   |  273 +++
  configs/msc_sm2s_imx8mp_defconfig |   91 +
  include/configs/msc_sm2s_imx8mp.h |   96 +
  12 files changed, 3291 insertions(+)
  create mode 100644 arch/arm/dts/imx8mp-msc-sm2s-u-boot.dtsi
  create mode 100644 arch/arm/dts/imx8mp-msc-sm2s.dts
  create mode 100644 board/msc/sm2s_imx8mp/Kconfig
  create mode 100644 board/msc/sm2s_imx8mp/Makefile
  create mode 100644 board/msc/sm2s_imx8mp/imximage-8mp-lpddr4.cfg
  create mode 100644 board/msc/sm2s_imx8mp/lpddr4_timing.c
  create mode 100644 board/msc/sm2s_imx8mp/sm2s_imx8mp.c
  create mode 100644 board/msc/sm2s_imx8mp/spl.c
  create mode 100644 configs/msc_sm2s_imx8mp_defconfig
  create mode 100644 include/configs/msc_sm2s_imx8mp.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 965895bc2a..a5de6e1b5e 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -970,6 +970,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
imx8mq-phanbell.dtb \
imx8mp-dhcom-pdk2.dtb \
imx8mp-evk.dtb \
+   imx8mp-msc-sm2s.dtb \
imx8mp-phyboard-pollux-rdk.dtb \
imx8mp-venice.dtb \
imx8mp-venice-gw74xx.dtb \
diff --git a/arch/arm/dts/imx8mp-msc-sm2s-u-boot.dtsi 
b/arch/arm/dts/imx8mp-msc-sm2s-u-boot.dtsi
new file mode 100644
index 00..cf591adf5a
--- /dev/null
+++ b/arch/arm/dts/imx8mp-msc-sm2s-u-boot.dtsi
@@ -0,0 +1,65 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019 NXP
+ */
+
+#include "imx8mp-u-boot.dtsi"
+
+/ {
+   model = "MSC SM2S-IMX8MPLUS";
+   compatible = "avnet,sm2s-imx8mp", "fsl,imx8mp";
+
+   wdt-reboot {
+   compatible = "wdt-reboot";
+   wdt = <&wdog1>;
+   u-boot,dm-spl;
+   };
+};
+
+®_usdhc2_vmmc {
+   u-boot,dm-spl;
+};
+
+&gpio1 {
+   u-boot,dm-spl;
+};
+
+&gpio2 {
+   u-boot,dm-spl;
+};
+
+&gpio3 {
+   u-boot,dm-spl;
+};
+
+&i2c1 {
+   u-boot,dm-spl;
+};
+
+&i2c2 {
+   u-boot,dm-spl;
+};
+
+&i2c3 {
+   u-boot,dm-spl;
+};
+
+&i2c4 {
+   u-boot,dm-spl;
+};
+
+&i2c5 {
+   u-boot,dm-spl;
+};
+
+&i2c6 {
+   u-boot,dm-spl;
+};
+
+&pinctrl_i2c6 {
+   u-boot,dm-spl;
+};
+
+&pmic {
+   u-boot,dm-spl;
+};
diff --git a/arch/arm/dts/imx8mp-msc-sm2s.dts b/arch/arm/dts/imx8mp-msc-sm2s.dts
new file mode 100644
index 00..5dbec71747
--- /dev/null
+++ b/arch/arm/dts/imx8mp-msc-sm2s.dts
@@ -0,0 +1,820 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022 Avnet Embedded GmbH
+ */
+
+/dts-v1/;
+
+#include "imx8mp.dtsi"
+#include 
+
+/ {
+   aliases {
+   rtc0 = &sys_rtc;
+   rtc1 = &snvs_rtc;
+   };
+
+   chosen {
+   stdout-path = &uart2;
+   };
+
+   reg_usb0_host_vbus: regulator-usb0-vbus {
+   compatible = "regulator-fixed";
+   regulator-name = "usb0_host_vbus";
+   pinctrl-names = "default";
+   pinctrl-0 = <&pinctrl_usb0_vbus>;
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   };
+
+   reg_usb1_host_vbus: regulator-usb1-vbus {
+   compatible = "regulator-fixed";
+   regulator-name = "usb1_host_vb

Re: [PATCH v4 1/2] mx7ulp: add base SPL support for mx7ulp

2022-10-20 Thread Stefano Babic

Hi Oleksandr, Ricardo,

On 05.08.22 20:19, Oleksandr Suvorov wrote:

From: Ricardo Salveti 

Add a base implementation of mx7ulp SPL config header and soc,
and changes in makefiles in order to allow building SPL on mx7ulp
based devices.

Signed-off-by: Ricardo Salveti 
Co-developed-by: Oleksandr Suvorov 
Signed-off-by: Oleksandr Suvorov 
---

Changes in v4:
- rebase to the current master
- fix a reference to a non-existent option SPL_MMC_SUPPORT

Changes in v3:
- rebase the patch to the current codebase

  arch/arm/mach-imx/Makefile |  2 +-
  arch/arm/mach-imx/mx7ulp/soc.c |  2 +-
  arch/arm/mach-imx/spl.c|  6 --
  include/configs/imx7ulp_spl.h  | 39 ++
  4 files changed, 45 insertions(+), 4 deletions(-)
  create mode 100644 include/configs/imx7ulp_spl.h

diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 80c497e6d81..71e6cac2f63 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -29,7 +29,7 @@ endif
  obj-$(CONFIG_GPT_TIMER) += timer.o
  obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
  endif
-ifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs imx8m imx8 imx9 imxrt))
+ifeq ($(SOC),$(filter $(SOC),mx7 mx7ulp mx6 mxs imx8m imx8 imx9 imxrt))
  obj-y += misc.o
  obj-$(CONFIG_CMD_PRIBLOB) += priblob.o
  obj-$(CONFIG_SPL_BUILD)   += spl.o
diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 217b7c45867..951b1888c58 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -234,7 +234,7 @@ void s_init(void)
  }
  #endif
  
-#ifndef CONFIG_ULP_WATCHDOG

+#if !CONFIG_IS_ENABLED(ULP_WATCHDOG) || CONFIG_IS_ENABLED(SPL_BUILD)
  void reset_cpu(void)
  {
setbits_le32(SIM0_RBASE, SIM_SOPT1_A7_SW_RESET);
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index ef00969a5e0..bca0b1123a7 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -147,7 +147,7 @@ u32 spl_boot_device(void)
return BOOT_DEVICE_NONE;
  }
  
-#elif defined(CONFIG_MX7) || defined(CONFIG_IMX8M) || defined(CONFIG_IMX8) || defined(CONFIG_IMX9)

+#elif defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) || defined(CONFIG_IMX8M) 
|| defined(CONFIG_IMX8) || defined(CONFIG_IMX9)
  /* Translate iMX7/i.MX8M boot device to the SPL boot device enumeration */
  u32 spl_boot_device(void)
  {
@@ -160,7 +160,9 @@ u32 spl_boot_device(void)
 */
if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */
return BOOT_DEVICE_BOARD;
+#endif
  
+#if defined(CONFIG_MX7) || defined(CONFIG_MX7ULP)

/*
 * The above method does not detect that the boot ROM used
 * serial downloader in case the boot ROM decided to use the
@@ -178,7 +180,7 @@ u32 spl_boot_device(void)
  
  	return spl_board_boot_device(boot_device_spl);

  }
-#endif /* CONFIG_MX7 || CONFIG_IMX8M || CONFIG_IMX8 */
+#endif /* CONFIG_MX7 || CONFIG_MX7ULP || CONFIG_IMX8M || CONFIG_IMX8 */
  
  #ifdef CONFIG_SPL_USB_GADGET

  int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
diff --git a/include/configs/imx7ulp_spl.h b/include/configs/imx7ulp_spl.h
new file mode 100644
index 000..516238ec02e
--- /dev/null
+++ b/include/configs/imx7ulp_spl.h
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * SPL definitions for the i.MX7ULP SPL
+ *
+ * (C) Copyright 2019 Foundries.io
+ */
+
+#ifndef __IMX7ULP_SPL_CONFIG_H
+#define __IMX7ULP_SPL_CONFIG_H
+
+#if CONFIG_IS_ENABLED(SPL)
+/*
+ * see figure 35-5 in i.MX 7ULP Reference manual:
+ *  - IMX7ULP A7 OCRAM free area RAM is from 0x2F01 to 0x2F03FF00.
+ *  - Set the stack at the end of the free area section, at 0x2003FEB8.
+ *  - The BOOT ROM loads what they consider the firmware image
+ *which consists of a 4K header in front of us that contains the IVT, DCD,
+ *and some padding thus 'our' max size is really 0x2F03FF00 - 0x2F011000.
+ *187KB is more than enough for the SPL.
+ */
+#define CONFIG_SPL_STACK   0x2F03FEB8
+
+/* MMC support */
+#if CONFIG_IS_ENABLED(SPL_MMC)
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1


This should be in defconfig and it is not accepted anymore in header, it 
raises an error. See :


https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/516648

Best regards,
Stefano



+#define CONFIG_SYS_MONITOR_LEN 409600  /* 400 KB */
+#endif
+
+/* Define the payload for FAT/EXT support */
+#if CONFIG_IS_ENABLED(SPL_FS_FAT) || CONFIG_IS_ENABLED(SPL_FS_EXT4)
+#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME"u-boot-dtb.img"
+#endif
+
+#define CONFIG_SYS_SPL_MALLOC_START0x6830
+#define CONFIG_SYS_SPL_MALLOC_SIZE 0x10/* 1 MB */
+
+#endif /* CONFIG_SPL */
+
+#endif /* __IMX7ULP_SPL_CONFIG_H */


--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8

Re: Pending imx patch sets

2022-10-21 Thread Stefano Babic

Hi Marcel,

I have picked up several of yours as first attempt to merge most i.MX, 
CI is running. What is missing, it will go in the "second attempt":


On 21.10.22 11:55, Marcel Ziswiler wrote:

Hi Stefano and Fabio

As follows a list of patch sets which have not yet been applied/merged. Some 
without any feedback from any of
them imx maintainers since almost 3 months:

https://patchwork.ozlabs.org/project/uboot/patch/20220803112009.271563-1-francesco.dolc...@toradex.com/


I have not yet picked up this.



https://patchwork.ozlabs.org/project/uboot/cover/20220826094834.693236-1-mar...@ziswiler.com/



Same here, DT sync is in my second attempt when first is okay.


https://patchwork.ozlabs.org/project/uboot/cover/20220826183141.789236-1-mar...@ziswiler.com/

https://patchwork.ozlabs.org/project/uboot/patch/20220829175953.249441-1-...@pschenker.ch/



Picked up (all already merged and in my test are set to "Under Review" 
in patchworks)



https://patchwork.ozlabs.org/project/uboot/patch/20220907095105.21630-1-francesco.dolc...@toradex.com/



Picked up


https://patchwork.ozlabs.org/project/uboot/patch/20220921113419.1088398-1-mar...@ziswiler.com/



Picked up



https://patchwork.ozlabs.org/project/uboot/cover/20220922212834.2419255-1-mar...@ziswiler.com/


Picked up



https://patchwork.ozlabs.org/project/uboot/patch/20220927155052.40056-1-mar...@ziswiler.com/



Picked up


https://patchwork.ozlabs.org/project/uboot/cover/20221004110632.21045-1-andrejs.cainik...@toradex.com/



Not picked up, I have not merged most of patches sent in October. They 
will come to the second attempt, too.



After almost up to 3 months some of those may require re-basing. However, it 
would be nice if there would be
some subsequent action from the maintainers side after we did do so.

Please advice how we may proceed.



If CI runs, from your list are stioll open a couple of single patches 
(that I have simply forgotten) + the DT sync series. They will follow.



Ci is running here, last attempt still a MX8 was failing, I have fix 
myself and I hope it goes to the end.


Stefano


Thanks!

Cheers

Marcel


--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH 1/4] ARM: imx8m: Deduplicate CAAM init with arch_misc_init() call

2022-10-21 Thread Stefano Babic

Hi Marek,

just for tracking. ARCH_MISC_INIT was missing for imx8mn_ddr4_evk, I 
added myself to have a clean build and applied.


Stefano

On 21.09.22 07:31, Peng Fan wrote:



On 9/20/2022 3:41 AM, Marek Vasut wrote:
Instead of duplicating code implemented by i.MX8M version of 
arch_misc_init()
in every board, enable CONFIG_ARCH_MISC_INIT and call arch_misc_init() 
from

spl_board_init(). This removes the duplication. No functional change.

Signed-off-by: Marek Vasut 
---
Cc: Fabio Estevam 
Cc: Frieder Schrempf 
Cc: Marcel Ziswiler 
Cc: Max Krummenacher 
Cc: Peng Fan 
Cc: Stefano Babic 
Cc: Teresa Remmet 


Reviewed-by: Peng Fan 

---
  board/freescale/imx8mm_evk/spl.c   | 10 +-
  board/freescale/imx8mn_evk/spl.c   |  7 ++-
  board/freescale/imx8mp_evk/spl.c   |  8 +---
  board/kontron/sl-mx8mm/spl.c   |  6 +-
  board/toradex/verdin-imx8mm/spl.c  |  9 +
  configs/imx8mm-mx8menlo_defconfig  |  1 +
  configs/imx8mm_evk_defconfig   |  1 +
  configs/imx8mm_evk_fspi_defconfig  |  1 +
  configs/imx8mp_evk_defconfig   |  1 +
  configs/kontron-sl-mx8mm_defconfig |  1 +
  configs/verdin-imx8mm_defconfig    |  1 +
  11 files changed, 12 insertions(+), 34 deletions(-)

diff --git a/board/freescale/imx8mm_evk/spl.c 
b/board/freescale/imx8mm_evk/spl.c

index e2eb1426c83..e0e97c7fd9a 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -53,15 +53,7 @@ static void spl_dram_init(void)
  void spl_board_init(void)
  {
-    if (IS_ENABLED(CONFIG_FSL_CAAM)) {
-    struct udevice *dev;
-    int ret;
-
-    ret = uclass_get_device_by_driver(UCLASS_MISC, 
DM_DRIVER_GET(caam_jr), &dev);

-    if (ret)
-    printf("Failed to initialize caam_jr: %d\n", ret);
-    }
-    puts("Normal Boot\n");
+    arch_misc_init();
  }
  #ifdef CONFIG_SPL_LOAD_FIT
diff --git a/board/freescale/imx8mn_evk/spl.c 
b/board/freescale/imx8mn_evk/spl.c

index c0bfb67199a..380abecd746 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -49,11 +49,8 @@ void spl_board_init(void)
  struct udevice *dev;
  int ret;
-    if (IS_ENABLED(CONFIG_FSL_CAAM)) {
-    ret = uclass_get_device_by_driver(UCLASS_MISC, 
DM_DRIVER_GET(caam_jr), &dev);

-    if (ret)
-    printf("Failed to initialize caam_jr: %d\n", ret);
-    }
+    arch_misc_init();
+
  puts("Normal Boot\n");
  ret = uclass_get_device_by_name(UCLASS_CLK,
diff --git a/board/freescale/imx8mp_evk/spl.c 
b/board/freescale/imx8mp_evk/spl.c

index 719b1f6d7da..f1b285417d0 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -37,14 +37,8 @@ void spl_dram_init(void)
  void spl_board_init(void)
  {
-    if (IS_ENABLED(CONFIG_FSL_CAAM)) {
-    struct udevice *dev;
-    int ret;
+    arch_misc_init();
-    ret = uclass_get_device_by_driver(UCLASS_MISC, 
DM_DRIVER_GET(caam_jr), &dev);

-    if (ret)
-    printf("Failed to initialize caam_jr: %d\n", ret);
-    }
  /*
   * Set GIC clock to 500Mhz for OD VDD_SOC. Kernel driver does
   * not allow to change it. Should set the clock after PMIC
diff --git a/board/kontron/sl-mx8mm/spl.c b/board/kontron/sl-mx8mm/spl.c
index 09f81351dd4..b884c91aef9 100644
--- a/board/kontron/sl-mx8mm/spl.c
+++ b/board/kontron/sl-mx8mm/spl.c
@@ -205,11 +205,7 @@ void spl_board_init(void)
  struct udevice *dev;
  int ret;
-    if (IS_ENABLED(CONFIG_FSL_CAAM)) {
-    ret = uclass_get_device_by_driver(UCLASS_MISC, 
DM_DRIVER_GET(caam_jr), &dev);

-    if (ret)
-    printf("Failed to initialize %s: %d\n", dev->name, ret);
-    }
+    arch_misc_init();
  puts("Normal Boot\n");
diff --git a/board/toradex/verdin-imx8mm/spl.c 
b/board/toradex/verdin-imx8mm/spl.c

index fb9aae6c9c8..59a3d9e0cae 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -53,14 +53,7 @@ void spl_dram_init(void)
  void spl_board_init(void)
  {
-    if (IS_ENABLED(CONFIG_FSL_CAAM)) {
-    struct udevice *dev;
-    int ret;
-
-    ret = uclass_get_device_by_driver(UCLASS_MISC, 
DM_DRIVER_GET(caam_jr), &dev);

-    if (ret)
-    printf("Failed to initialize %s: %d\n", dev->name, ret);
-    }
+    arch_misc_init();
  /* Serial download mode */
  if (is_usb_boot()) {
diff --git a/configs/imx8mm-mx8menlo_defconfig 
b/configs/imx8mm-mx8menlo_defconfig

index 702162f86de..929ff382f27 100644
--- a/configs/imx8mm-mx8menlo_defconfig
+++ b/configs/imx8mm-mx8menlo_defconfig
@@ -34,6 +34,7 @@ CONFIG_DEFAULT_FDT_FILE="imx8mm-mx8menlo.dtb"
  CONFIG_LOG=y
  # CONFIG_DISPLAY_BOARDINFO is not set
  CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_ARCH_MISC_INIT=y
  CONFIG_BOARD_LATE_INIT=y
  CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
  CONFIG_SPL_BSS_START_ADDR=0x91
diff --git a/configs/imx8mm_evk_defconfig b

Re: [PATCH 0/7] arm: dts: Create common imx8mn-u-boot

2022-10-21 Thread Stefano Babic

Hi Adam,

On 21.10.22 14:10, Adam Ford wrote:

On Sun, Sep 11, 2022 at 11:36 AM Adam Ford  wrote:


On Mon, Aug 15, 2022 at 6:43 AM Adam Ford  wrote:


On Sun, Aug 14, 2022 at 5:57 PM Fabio Estevam  wrote:


Hi Adam,

On Sun, Jul 31, 2022 at 8:46 PM Adam Ford  wrote:


Every imx8mn board has a bunch of similar entries on their
respective board-u-boot.dtsi file to make the board bootable.
Instead of maintaining multiple files with duplicate code,
have them all point to a new, common file.  This file includes
the necessary nodes that were common to nearly all boards
and added spba1 to help faciliate SPL_DM_SERIAL.  This also
adds support for CONFIG_FSPI_CONF_HEADER which can be used
to generate flash.bin files for booting from FlexSPI.

Adam Ford (7):
   arm: dts: imx8mn-u-boot: Create common imx8mn-u-boot.dtsi
   arm: dts: imx8mn-beacon-kit: Consolidate with imx8mn-u-boot
   arm: dts: imx8mn-bsh-smm-s2: Consolidate with imx8mn-u-boot
   arm: dts: imx8mn-ddr4-evk: Consolidate with imx8mn-u-boot
   arm: dts: imx8mn-evk: Consolidate with imx8mn-u-boot
   arm: dts: imx8mn-var-som-symphony: Consolidate with imx8mn-u-boot
   arm: dts: imx8mn-venice: Consolidate with imx8mn-u-boot


For the series:

Reviewed-by: Fabio Estevam 




Stefano,

It's been over a month, and I haven't heard any feedback from you and
it doesn't appear this series has been accepted.  Without it, Nano
boards with DM_SERIAL in SPL won't' boot because of the device tree
change which moved the UART's into a subnode.  Are you able to apply
to this series?  As I mentioned before, I can squash the dependent
patch into this series and push a V2 if you want.  With a pending
release in a few weeks, it would be nice to have the Nano boards
booting again.

thanks!

adam


Thanks!

Stefano,

If you want me to squash the 1 dependent patch, I can squash it into
this series and submit a V2, but getting this series applied should
fix a bunch of boards which don't boot properly.


Stefano,

Gentle nudge on this series.  I posted it back in July and several
people have responded with positive feedback.  Do you think it can be
merged?



I have applied a second bunch of patches, this will be in the third one. 
However, I have fixed a couple of small things during first merge. I 
cannot apply them clean, can you check and rebase on top of u-boot-imx ? 
Thanks !


Stefano


thanks,

adam



adam


--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: Pending imx patch sets

2022-10-21 Thread Stefano Babic

On 21.10.22 14:22, Marcel Ziswiler wrote:

Hi Stefano

On Fri, 2022-10-21 at 12:05 +0200, Stefano Babic wrote:

Hi Marcel,

I have picked up several of yours as first attempt to merge most i.MX,
CI is running. What is missing, it will go in the "second attempt":


Okay, thanks.


On 21.10.22 11:55, Marcel Ziswiler wrote:

Hi Stefano and Fabio

As follows a list of patch sets which have not yet been applied/merged. Some 
without any feedback from any
of
them imx maintainers since almost 3 months:

https://patchwork.ozlabs.org/project/uboot/patch/20220803112009.271563-1-francesco.dolc...@toradex.com/


I have not yet picked up this.



https://patchwork.ozlabs.org/project/uboot/cover/20220826094834.693236-1-mar...@ziswiler.com/



Same here, DT sync is in my second attempt when first is okay.


https://patchwork.ozlabs.org/project/uboot/cover/20220826183141.789236-1-mar...@ziswiler.com/


I just noticed that Jesse gave some feedback on the 3rd patch of this series 
which I somehow missed. Should I
send a v3 with his fixes/suggestions incorporated and you drop v2 and apply the 
new v3?


This is not yet applied and I missed, too, that there are comments. 
Please send them V3.


Stefano




https://patchwork.ozlabs.org/project/uboot/patch/20220829175953.249441-1-...@pschenker.ch/



Picked up (all already merged and in my test are set to "Under Review"
in patchworks)


https://patchwork.ozlabs.org/project/uboot/patch/20220907095105.21630-1-francesco.dolc...@toradex.com/



Picked up


https://patchwork.ozlabs.org/project/uboot/patch/20220921113419.1088398-1-mar...@ziswiler.com/



Picked up



https://patchwork.ozlabs.org/project/uboot/cover/20220922212834.2419255-1-mar...@ziswiler.com/


Picked up



https://patchwork.ozlabs.org/project/uboot/patch/20220927155052.40056-1-mar...@ziswiler.com/



Picked up


https://patchwork.ozlabs.org/project/uboot/cover/20221004110632.21045-1-andrejs.cainik...@toradex.com/



Not picked up, I have not merged most of patches sent in October. They
will come to the second attempt, too.


After almost up to 3 months some of those may require re-basing. However, it 
would be nice if there would
be
some subsequent action from the maintainers side after we did do so.

Please advice how we may proceed.



If CI runs, from your list are stioll open a couple of single patches
(that I have simply forgotten) + the DT sync series. They will follow.


Ci is running here, last attempt still a MX8 was failing, I have fix
myself and I hope it goes to the end.

Stefano


Cheers

Marcel


--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Wolfgang Denk

2022-10-21 Thread Stefano Babic

Dear U-Boot community,

it is my very sad duty to inform you that Wolfgang Denk, the father of 
U-Boot, passed away last week. We have lost a great developer and a very 
good friend.


I met Wolfgang the first time quite 25 years ago, when we worked for the 
same company. I was hired as consultant for a (at the time very 
frequently used) RTOS. I had no time to introduce me, because Wolfgang 
interrupted me with : "Just install Linux !". Well, of course I did. It 
was the first good suggestion he gave me. Many others followed.


Wolfgang was a pioneer and strong supporter of Open Source, in the time 
when Linux for Embedded System started its first steps. In many 
occasions he had strong discussions with customers to explain the 
advantages of Open Source, and he rejected business contracts if 
customer was going against his principles. We will miss him.


Rest in peace, my friend

Stefano Babic

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Re: [PATCH] imx28-xea: Add missing imx28-lwe.dtsi

2022-10-22 Thread Stefano Babic

Hi everybody,

On 22.10.22 15:44, Michael Nazzareno Trimarchi wrote:

Hi

On Sat, Oct 22, 2022 at 3:35 PM Fabio Estevam  wrote:


On Sat, Oct 22, 2022 at 10:31 AM Michael Nazzareno Trimarchi
 wrote:


On my side the Continuous Integration using gitlab-ci, verify board combinations
and test the build. I'm asking if this build breakage happen because
those boards
are not built.


All boards are built by CI and the  build error was reported at:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/517428


Should the patches need to be resend if they are not building? so you
want to take care of them



Just to clarify: the broken patches *are* not applied. As pointed by 
Michael, CI is used to check build *before* applying. What you are 
looking is my master-next branch, that is patches are applied first to a 
test branch (master-next) before going to master. If CI is broken, they 
are simply removed. That is my next step, I have seen that 
imx28-lwe.dtsi is missing, too. But as patch is not applied, I will 
kindly ask Marcel to squash Fabio's in his series and repost.


Thanks,
Stefano


Michael




Re: [PATCH 0/6] imx: imx6ul: kontron-sl-mx6ul: Fixes and improvements

2022-10-24 Thread Stefano Babic

On 24.10.22 09:41, Frieder Schrempf wrote:

On 24.10.22 09:39, Frieder Schrempf wrote:

Hi Stefano,

On 23.08.22 16:29, Frieder Schrempf wrote:

From: Frieder Schrempf 

This series fixes some issues with the kontron-sl-mx6ul board
configuration. It also syncs devicetrees with changes in the
Linux kernel.

Notes:

* This series is based on imx/master and fixes the previously merged
   sync patch from Marcel [1].
* The devicetree changes this is based on are still pending in Linux
   (see [2]).

[1] 
https://patchwork.ozlabs.org/project/uboot/patch/20220721132748.1052244-9-mar...@ziswiler.com/
[2] 
https://patchwork.kernel.org/project/linux-arm-kernel/cover/20220815082814.27651-1-frie...@fris.de/

Frieder Schrempf (6):
   Makefile: Make flash.bin target available for all platforms
   imx: imx6ul: kontron-sl-mx6ul: Enable migrated Kconfig options
   imx: imx6ul: kontron-sl-mx6ul: Fix CONFIG_ENV_SPI_BUS
   imx: imx6ul: kontron-sl-mx6ul: Select correct boot and env device
   imx: imx6ul: kontron-sl-mx6ul: Migrate to use CONFIG_EXTRA_ENV_TEXT
   imx: imx6ul: kontron-sl-mx6ul: Sync devicetrees



Can you please merge these patches so they land in v2023.01?

These have been around for two months and contain some important fixes
for the kontron-sl-mx6ul board configuration.


Ah, I just saw that they are already in imx/master. Sorry for the noise.
For some reason I didn't get pull notification e-mails while for my
other patches I got them.



I have checked this - my script takes the address of the sender (see on 
ML's archive), notification were sent to frie...@fris.de, while patches 
are signed with your company's address.


Regards,
Stefano

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH 0/7] arm: dts: Create common imx8mn-u-boot

2022-10-24 Thread Stefano Babic

On 21.10.22 14:28, Adam Ford wrote:

On Fri, Oct 21, 2022 at 7:27 AM Stefano Babic  wrote:


Hi Adam,

On 21.10.22 14:10, Adam Ford wrote:

On Sun, Sep 11, 2022 at 11:36 AM Adam Ford  wrote:


On Mon, Aug 15, 2022 at 6:43 AM Adam Ford  wrote:


On Sun, Aug 14, 2022 at 5:57 PM Fabio Estevam  wrote:


Hi Adam,

On Sun, Jul 31, 2022 at 8:46 PM Adam Ford  wrote:


Every imx8mn board has a bunch of similar entries on their
respective board-u-boot.dtsi file to make the board bootable.
Instead of maintaining multiple files with duplicate code,
have them all point to a new, common file.  This file includes
the necessary nodes that were common to nearly all boards
and added spba1 to help faciliate SPL_DM_SERIAL.  This also
adds support for CONFIG_FSPI_CONF_HEADER which can be used
to generate flash.bin files for booting from FlexSPI.

Adam Ford (7):
arm: dts: imx8mn-u-boot: Create common imx8mn-u-boot.dtsi
arm: dts: imx8mn-beacon-kit: Consolidate with imx8mn-u-boot
arm: dts: imx8mn-bsh-smm-s2: Consolidate with imx8mn-u-boot
arm: dts: imx8mn-ddr4-evk: Consolidate with imx8mn-u-boot
arm: dts: imx8mn-evk: Consolidate with imx8mn-u-boot
arm: dts: imx8mn-var-som-symphony: Consolidate with imx8mn-u-boot
arm: dts: imx8mn-venice: Consolidate with imx8mn-u-boot


For the series:

Reviewed-by: Fabio Estevam 




Stefano,

It's been over a month, and I haven't heard any feedback from you and
it doesn't appear this series has been accepted.  Without it, Nano
boards with DM_SERIAL in SPL won't' boot because of the device tree
change which moved the UART's into a subnode.  Are you able to apply
to this series?  As I mentioned before, I can squash the dependent
patch into this series and push a V2 if you want.  With a pending
release in a few weeks, it would be nice to have the Nano boards
booting again.

thanks!

adam


Thanks!

Stefano,

If you want me to squash the 1 dependent patch, I can squash it into
this series and submit a V2, but getting this series applied should
fix a bunch of boards which don't boot properly.


Stefano,

Gentle nudge on this series.  I posted it back in July and several
people have responded with positive feedback.  Do you think it can be
merged?



I have applied a second bunch of patches, this will be in the third one.
However, I have fixed a couple of small things during first merge. I
cannot apply them clean, can you check and rebase on top of u-boot-imx ?
Thanks !


Yes, I'll send out a V2 rebased this afternoon


Thanks, CI is testing.

Stefano



adam


Stefano


thanks,

adam



adam


--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v3] imx: imx8qm: cgtqmx8: switch to binman

2022-10-24 Thread Stefano Babic

On 24.10.22 13:37, Fabio Estevam wrote:

Hi Stefano and Oliver,

On Tue, May 3, 2022 at 7:49 AM Oliver Graute
 wrote:


Switch to use binman to pack images

Signed-off-by: Oliver Graute 
Reviewed-by: Fabio Estevam 
Reviewed-by: Simon Glass 
---
Changes for v3
  -added Reviewed-by
  -rebased on master

  arch/arm/dts/imx8qm-cgtqmx8.dts | 1 +
  arch/arm/mach-imx/imx8/Kconfig  | 1 +
  board/congatec/cgtqmx8/imximage.cfg | 4 ++--
  configs/cgtqmx8_defconfig   | 2 +-
  doc/board/congatec/cgtqmx8.rst  | 3 +--
  5 files changed, 6 insertions(+), 5 deletions(-)


Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.



Right - as well as V4, this is what I tried to merge and breaks. I have 
drop it.



The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/20220221090139.10066-1-oliver.gra...@kococonnector.com/


Thanks for noting this - Oliver, can you check and repost a V5, then ? 
Thanks !


Stefano

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v3] imx: imx8qm: cgtqmx8: switch to binman

2022-10-24 Thread Stefano Babic

On 24.10.22 13:59, Oliver Graute wrote:

On 24/10/22, Stefano Babic wrote:

On 24.10.22 13:37, Fabio Estevam wrote:

Hi Stefano and Oliver,

On Tue, May 3, 2022 at 7:49 AM Oliver Graute
 wrote:


Switch to use binman to pack images

Signed-off-by: Oliver Graute 
Reviewed-by: Fabio Estevam 
Reviewed-by: Simon Glass 
---
Changes for v3
   -added Reviewed-by
   -rebased on master

   arch/arm/dts/imx8qm-cgtqmx8.dts | 1 +
   arch/arm/mach-imx/imx8/Kconfig  | 1 +
   board/congatec/cgtqmx8/imximage.cfg | 4 ++--
   configs/cgtqmx8_defconfig   | 2 +-
   doc/board/congatec/cgtqmx8.rst  | 3 +--
   5 files changed, 6 insertions(+), 5 deletions(-)


Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.



Right - as well as V4, this is what I tried to merge and breaks. I have drop
it.


The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/20220221090139.10066-1-oliver.gra...@kococonnector.com/


Thanks for noting this - Oliver, can you check and repost a V5, then ?


The arch/arm/dts/imx8qm-u-boot.dtsi  is applied on the binman Patch for
"PATCH v3 imx: imx8qm-rom7720: switch to binman"

So if you first apply the patches for the imx8qm-rom7720 Board it should work.



Ok, thanks for tipp - I apply both and will test again

Stefano




https://patchwork.ozlabs.org/project/uboot/patch/20221007130945.12493-1-oliver.gra...@kococonnector.com/

Best regards,

Oliver


--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Pull request: u-boot-imx u-boot-imx-20220919

2022-10-24 Thread Stefano Babic

Hi Tom,

please pull from u-boot-imx, thanks !

The following changes since commit 3724ddf157aab3bd009c1da234b9a1af1621b544:

  Merge branch '2022-10-18-TI-platform-updates' (2022-10-18 18:13:39 -0400)

are available in the Git repository at:

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


for you to fetch changes up to 0f5caf351c18b212b856f68a8b9d8ea150cc9fa1:

  configs: verdin-imx8mp: enable caam (2022-10-24 13:43:21 +0200)


u-boot-imx-20221024
---

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

- for 2022.01
- rework Kontron boards (mx6 and mx8)
- fixes for Toradex
- fixes (SPI, CAAM, )
- sync DT with Linux
- fixes for Gateworks GW7903 and GW7904 PMIC
- Engicam i.Core MX8M Plus EDIMM2.2


Adam Ford (7):
  arm: dts: imx8mn-u-boot: Create common imx8mn-u-boot.dtsi
  arm: dts: imx8mn-beacon-kit: Consolidate with imx8mn-u-boot
  arm: dts: imx8mn-bsh-smm-s2: Consolidate with imx8mn-u-boot
  arm: dts: imx8mn-ddr4-evk: Consolidate with imx8mn-u-boot
  arm: dts: imx8mn-evk: Consolidate with imx8mn-u-boot
  arm: dts: imx8mn-var-som-symphony: Consolidate with imx8mn-u-boot
  arm: dts: imx8mn-venice: Consolidate with imx8mn-u-boot

Andrejs Cainikovs (3):
  arm: dts: verdin-imx8mp: enable caam in SPL
  verdin-imx8mp: spl: initialize caam
  configs: verdin-imx8mp: enable caam

Ariel D'Alessandro (1):
  nitrogen6x: Remove extra quotes in fdtfile

Fabio Estevam (8):
  imx8mm_evk: Add an entry for USB boot
  imx8mm_evk: Add Serial Download Protocol support
  clk-imx8mm: Only build PWM clocks in non-SPL code
  clk-imx8mm: Move CLK_ENET_AXI to the non-SPL section
  clk-imx8mm: Only build ecspi clocks when CONFIG_DM_SPI=y
  clk-imx8mm: Only build QSPI clocks when CONFIG_NXP_FSPI=y
  imx8mn-ddr4-evk-u-boot: Fix broken boot
  imx8mn-venice-u-boot: Fix broken boot

Francesco Dolcini (2):
  ARM: imx8mp: verdin-imx8mp: Add memory size detection
  configs: colibri-imx7: Enable bootd command

Frieder Schrempf (25):
  Makefile: Make flash.bin target available for all platforms
  imx: imx6ul: kontron-sl-mx6ul: Enable migrated Kconfig options
  imx: imx6ul: kontron-sl-mx6ul: Fix CONFIG_ENV_SPI_BUS
  imx: imx6ul: kontron-sl-mx6ul: Select correct boot and env device
  imx: imx6ul: kontron-sl-mx6ul: Migrate to use CONFIG_EXTRA_ENV_TEXT
  imx: imx6ul: kontron-sl-mx6ul: Sync devicetrees
  imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees
  imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL
  imx: kontron-sl-mx8mm: Remove custom board_boot_order() workaround
  imx: kontron-sl-mx8mm: Increase CONFIG_SYS_CBSIZE to 2K
  imx: kontron-sl-mx8mm: Enable MTD command
  imx: kontron-sl-mx8mm: Add redundant environment and SPI NOR 
partitions

  imx: kontron-sl-mx8mm: Enable environment in MMC
  imx: kontron-sl-mx8mm: Migrate to use CONFIG_EXTRA_ENV_TEXT
  imx: kontron-sl-mx8mm: Enable bootaux command
  imx: kontron-sl-mx8mm: lpddr4_timing.c: Add spaces for proper 
alignment

  imx: kontron-sl-mx8mm: Remove 100mt DDR setpoint
  imx: kontron-sl-mx8mm: Use new LPDDR4 config parameters
  imx: kontron-sl-mx8mm: Prepare for other i.MX8MM SoM types
  imx: kontron-sl-mx8mm: Adjust devicetree names, compatibles and 
model strings
  imx: kontron-sl-mx8mm: Use the VSELECT signal to switch SD card 
IO voltage
  imx: kontron-sl-mx8mm: Use voltage rail names from schematic for 
PMIC regulator-names

  imx: kontron-sl-mx8mm: Simplify code in spl.c
  imx: kontron-sl-mx8mm: Add support for Kontron Electronics SoM SL 
i.MX8MM OSM-S
  imx: kontron-sl-mx8mm: Prepare for I2C display detection in 
environment script


Manoj Sai (3):
  arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus SoM
  arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit
  board: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit

Marcel Ziswiler (20):
  verdin-imx8mm: verdin-imx8mp: drop obsolete net/phy configs
  apalis/colibri_imx6/-imx6ull/_imx7: update env memory layout
  verdin-imx8mm: verdin-imx8mp: update env memory layout (again)
  verdin-imx8mm: various config additions and improvements
  verdin-imx8mp: various config additions and improvements
  imx7ulp: synchronise device tree with linux
  imx7d: synchronise device tree with linux
  imx6ul: synchronise device tree with linux
  imx6ull: synchronise device tree with linux
  imx6ulz: synchronise device tree with linux
  imx6sx: synchronise device tree with linux
  imx6sll: synchronise device tree with linux
  imx6sl: synchronise device tree with linux
  imx6qp: synchronise device tree with linux
  imx6qdl: synchronise device tre

Re: [PATCH v3] imx: imx8qm: cgtqmx8: switch to binman

2022-10-25 Thread Stefano Babic

On 25.10.22 10:50, Oliver Graute wrote:

On 24/10/22, Stefano Babic wrote:

On 24.10.22 13:59, Oliver Graute wrote:

On 24/10/22, Stefano Babic wrote:

On 24.10.22 13:37, Fabio Estevam wrote:

Hi Stefano and Oliver,

On Tue, May 3, 2022 at 7:49 AM Oliver Graute
 wrote:


Switch to use binman to pack images

Signed-off-by: Oliver Graute 
Reviewed-by: Fabio Estevam 
Reviewed-by: Simon Glass 
---
Changes for v3
-added Reviewed-by
-rebased on master

arch/arm/dts/imx8qm-cgtqmx8.dts | 1 +
arch/arm/mach-imx/imx8/Kconfig  | 1 +
board/congatec/cgtqmx8/imximage.cfg | 4 ++--
configs/cgtqmx8_defconfig   | 2 +-
doc/board/congatec/cgtqmx8.rst  | 3 +--
5 files changed, 6 insertions(+), 5 deletions(-)


Just realized that v3 does not include imx8qm-u-boot.dtsi and this breaks CI.



Right - as well as V4, this is what I tried to merge and breaks. I have drop
it.


The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/20220221090139.10066-1-oliver.gra...@kococonnector.com/


Thanks for noting this - Oliver, can you check and repost a V5, then ?


The arch/arm/dts/imx8qm-u-boot.dtsi  is applied on the binman Patch for
"PATCH v3 imx: imx8qm-rom7720: switch to binman"

So if you first apply the patches for the imx8qm-rom7720 Board it should work.



Ok, thanks for tipp - I apply both and will test again


I saw the CI Pipeline failing. Perhaps the reason is a
missing CONFIG_FIT_EXTERNAL_OFFSET?



I see this, but just applying the two patches, multiple boards are broken:
imx8qm_rom7720_a1_4G cgtqmx8 imx8qm_mek imx8qxp_mek deneb giedi



+++ b/configs/cgtqmx8_defconfig
@@ -20,6 +20,7 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
  CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x8020
  CONFIG_REMAKE_ELF=y
  CONFIG_FIT=y
+CONFIG_FIT_EXTERNAL_OFFSET=0x3000
  CONFIG_SPL_LOAD_FIT=y
  # CONFIG_USE_SPL_FIT_GENERATOR is not set

Can you confirm?



I let CI run just to see if cgtqmx8 is fixed.

Stefano

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v3] imx: imx8qm: cgtqmx8: switch to binman

2022-10-25 Thread Stefano Babic

On 25.10.22 11:28, Stefano Babic wrote:

On 25.10.22 10:50, Oliver Graute wrote:

On 24/10/22, Stefano Babic wrote:

On 24.10.22 13:59, Oliver Graute wrote:

On 24/10/22, Stefano Babic wrote:

On 24.10.22 13:37, Fabio Estevam wrote:

Hi Stefano and Oliver,

On Tue, May 3, 2022 at 7:49 AM Oliver Graute
 wrote:


Switch to use binman to pack images

Signed-off-by: Oliver Graute 
Reviewed-by: Fabio Estevam 
Reviewed-by: Simon Glass 
---
Changes for v3
    -added Reviewed-by
    -rebased on master

    arch/arm/dts/imx8qm-cgtqmx8.dts | 1 +
    arch/arm/mach-imx/imx8/Kconfig  | 1 +
    board/congatec/cgtqmx8/imximage.cfg | 4 ++--
    configs/cgtqmx8_defconfig   | 2 +-
    doc/board/congatec/cgtqmx8.rst  | 3 +--
    5 files changed, 6 insertions(+), 5 deletions(-)


Just realized that v3 does not include imx8qm-u-boot.dtsi and this 
breaks CI.




Right - as well as V4, this is what I tried to merge and breaks. I 
have drop

it.


The previous v2 did include it:
https://patchwork.ozlabs.org/project/uboot/patch/20220221090139.10066-1-oliver.gra...@kococonnector.com/


Thanks for noting this - Oliver, can you check and repost a V5, then ?


The arch/arm/dts/imx8qm-u-boot.dtsi  is applied on the binman Patch for
"PATCH v3 imx: imx8qm-rom7720: switch to binman"

So if you first apply the patches for the imx8qm-rom7720 Board it 
should work.



Ok, thanks for tipp - I apply both and will test again


I saw the CI Pipeline failing. Perhaps the reason is a
missing CONFIG_FIT_EXTERNAL_OFFSET?



I see this, but just applying the two patches, multiple boards are broken:
imx8qm_rom7720_a1_4G cgtqmx8 imx8qm_mek imx8qxp_mek deneb giedi



+++ b/configs/cgtqmx8_defconfig
@@ -20,6 +20,7 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
  CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x8020
  CONFIG_REMAKE_ELF=y
  CONFIG_FIT=y
+CONFIG_FIT_EXTERNAL_OFFSET=0x3000
  CONFIG_SPL_LOAD_FIT=y
  # CONFIG_USE_SPL_FIT_GENERATOR is not set

Can you confirm?



I let CI run just to see if cgtqmx8 is fixed.


So this seems to fix the Congatec board. Rather, all DTS for i.MX8 are 
built together, and other boards have not switched to binman. I feel 
this dependency too hard. Should we maybe split the targets in 
arch/arm/dts/Makefile ? All DTS are build according to CONFIG_ARCH_IMX8, 
so congatec DTS is compiled even in case of deneb and gied.


See https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/13928.

Best regards,
Stefano



Stefano



--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v4 0/8] arm: dts: imx: sync device trees with upstream linux kernel part 1

2022-11-07 Thread Stefano Babic

Hi Tim, Marcel,

On 07.11.22 20:06, Tim Harvey wrote:

On Sat, Nov 5, 2022 at 4:31 AM Marcel Ziswiler  wrote:


From: Marcel Ziswiler 


This series synchronises them imx device trees with the upstream Linux
kernel (v6.1-rc3). I split it into two parts. This is part 1.

It also fixes a few issues as discussed during/after the pre-mature
application of my first series [1].

I am not touching kontron-sl-mx6ul as Frieder already took care of those
[2].

Feedback welcome. Thanks!

[1] 
https://patchwork.ozlabs.org/project/uboot/cover/20220721132748.1052244-1-mar...@ziswiler.com/
[2] 
https://patchwork.ozlabs.org/project/uboot/cover/20220823142917.306176-1-frie...@fris.de/

Changes in v4:
- Re-synched with v6.1-rc3 which now already contains the recent DDR
   pinmux addition.
- Re-named commit subject and re-worded commit message to indicate
   migration to automatic build system included -u-boot.dtsi device
   tree include files. Thanks to Giulio for pointing this out.
- Use imxrt1050-evk-u-boot.dtsi as provided/tested by Jesse.
- Explain intent in commit message as pointed out by Giulio.
- Re-synched with v6.1-rc3.
- Re-based after Adam's common imx8mn-u-boot device tree creation.

Changes in v3:
- Incorporate feedback from Jesse.

Changes in v2:
- imxrt1050: Re-added DDR timings aka semc node as pointed out by Fabio. Thanks!
- imx8ulp: Re-added s400_mu device tree node.

Marcel Ziswiler (8):
   vf610: synchronise device tree with linux
   imxrt1020: migrate to build system included -u-boot.dtsi
   imxrt1050: synchronise device tree with linux
   imx8ulp: synchronise device tree with linux
   imx8mq: synchronise device tree with linux
   imx8mp: synchronise device tree with linux
   imx8mn: synchronise device tree with linux
   imx8mm: synchronise device tree with linux

  arch/arm/dts/imx8mm-beacon-baseboard.dtsi |   4 +-
  arch/arm/dts/imx8mm-evk.dtsi  |  43 ++
  arch/arm/dts/imx8mm-icore-mx8mm.dtsi  |  14 +-
  arch/arm/dts/imx8mm-mx8menlo.dts  |  14 +-
  arch/arm/dts/imx8mm-u-boot.dtsi   |   2 +-
  arch/arm/dts/imx8mm-venice-gw700x.dtsi|  24 +-
  arch/arm/dts/imx8mm-venice-gw7901.dts |  12 +-
  arch/arm/dts/imx8mm-venice-gw7902.dts |  14 +-
  arch/arm/dts/imx8mm-venice-gw7903.dts |   6 +-
  arch/arm/dts/imx8mm-venice-gw7904.dts |   4 +
  arch/arm/dts/imx8mm-verdin.dtsi   |  50 +-
  arch/arm/dts/imx8mn-beacon-baseboard.dtsi |   4 +-
  arch/arm/dts/imx8mn-evk.dtsi  |  45 +-
  arch/arm/dts/imx8mn-var-som-symphony.dts  |   6 +-
  arch/arm/dts/imx8mn-venice-gw7902.dts |   9 +-
  arch/arm/dts/imx8mn.dtsi  |  14 +-
  arch/arm/dts/imx8mp-dhcom-pdk2.dts|  29 +-
  arch/arm/dts/imx8mp-dhcom-som.dtsi|  20 +-
  arch/arm/dts/imx8mp-evk.dts   | 179 --
  arch/arm/dts/imx8mp-icore-mx8mp-edimm2.2.dts  |   2 +-
  arch/arm/dts/imx8mp-icore-mx8mp.dtsi  |   2 +-
  arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts   |  48 +-
  arch/arm/dts/imx8mp-u-boot.dtsi   |   2 +-
  arch/arm/dts/imx8mp-venice-gw74xx.dts | 284 ++---
  arch/arm/dts/imx8mp-verdin.dtsi   |  32 +-
  arch/arm/dts/imx8mp.dtsi  | 147 -
  arch/arm/dts/imx8mq-evk.dts   |  43 ++
  arch/arm/dts/imx8mq-librem5-r3.dtsi   |  45 ++
  arch/arm/dts/imx8mq-librem5-r4.dts|  20 +-
  arch/arm/dts/imx8mq-librem5.dtsi  | 153 -
  arch/arm/dts/imx8mq-u-boot.dtsi   |  10 +-
  arch/arm/dts/imx8mq.dtsi  |  19 +-
  arch/arm/dts/imx8ulp-evk-u-boot.dtsi  |  15 +-
  arch/arm/dts/imx8ulp-evk.dts  | 240 ++-
  arch/arm/dts/imx8ulp-pinfunc.h|   4 +-
  arch/arm/dts/imx8ulp.dtsi | 594 +-
  arch/arm/dts/imxrt1020-evk-u-boot.dtsi|   7 +-
  arch/arm/dts/imxrt1020-evk.dts|   1 -
  arch/arm/dts/imxrt1050-evk-u-boot.dtsi| 174 -
  arch/arm/dts/imxrt1050-evk.dts| 257 +---
  arch/arm/dts/imxrt1050-pinfunc.h  |   2 +-
  arch/arm/dts/imxrt1050.dtsi   | 168 +++--
  arch/arm/dts/vf610-pinfunc.h  |   2 +-
  include/dt-bindings/clock/imx8mp-clock.h  |  13 +-
  include/dt-bindings/clock/imx8ulp-clock.h |  53 +-
  include/dt-bindings/clock/imxrt1050-clock.h   |   9 +-
  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/power/imx8mp-power.h  |  21 +-
  include/dt-bindings/power/imx8ulp-power.h |  26 +
  include/dt-bindings/reset/imx8mp-reset.h  |  50 ++
  include/dt-bindings/reset/imx8mq-reset.h  |  61 +-
  include/dt-bindings/reset/imx8ulp-pcc-reset.h |  59 ++
  54 files changed, 1881 insertions(+), 1325 deletions(-)
  create mode 10

Re: [PATCH v4 0/8] arm: dts: imx: sync device trees with upstream linux kernel part 1

2022-11-07 Thread Stefano Babic

Hi Marcel,

On 07.11.22 22:06, Marcel Ziswiler wrote:

Hi Stefano

On Mon, 2022-11-07 at 20:57 +0100, Stefano Babic wrote:

Hi Tim, Marcel,

On 07.11.22 20:06, Tim Harvey wrote:

On Sat, Nov 5, 2022 at 4:31 AM Marcel Ziswiler  wrote:


From: Marcel Ziswiler 


This series synchronises them imx device trees with the upstream Linux
kernel (v6.1-rc3). I split it into two parts. This is part 1.

It also fixes a few issues as discussed during/after the pre-mature
application of my first series [1].

I am not touching kontron-sl-mx6ul as Frieder already took care of those
[2].

Feedback welcome. Thanks!

[1] 
https://patchwork.ozlabs.org/project/uboot/cover/20220721132748.1052244-1-mar...@ziswiler.com/
[2] 
https://patchwork.ozlabs.org/project/uboot/cover/20220823142917.306176-1-frie...@fris.de/

Changes in v4:
- Re-synched with v6.1-rc3 which now already contains the recent DDR
    pinmux addition.
- Re-named commit subject and re-worded commit message to indicate
    migration to automatic build system included -u-boot.dtsi device
    tree include files. Thanks to Giulio for pointing this out.
- Use imxrt1050-evk-u-boot.dtsi as provided/tested by Jesse.
- Explain intent in commit message as pointed out by Giulio.
- Re-synched with v6.1-rc3.
- Re-based after Adam's common imx8mn-u-boot device tree creation.

Changes in v3:
- Incorporate feedback from Jesse.

Changes in v2:
- imxrt1050: Re-added DDR timings aka semc node as pointed out by Fabio. Thanks!
- imx8ulp: Re-added s400_mu device tree node.

Marcel Ziswiler (8):
    vf610: synchronise device tree with linux
    imxrt1020: migrate to build system included -u-boot.dtsi
    imxrt1050: synchronise device tree with linux
    imx8ulp: synchronise device tree with linux
    imx8mq: synchronise device tree with linux
    imx8mp: synchronise device tree with linux
    imx8mn: synchronise device tree with linux
    imx8mm: synchronise device tree with linux

   arch/arm/dts/imx8mm-beacon-baseboard.dtsi |   4 +-
   arch/arm/dts/imx8mm-evk.dtsi  |  43 ++
   arch/arm/dts/imx8mm-icore-mx8mm.dtsi  |  14 +-
   arch/arm/dts/imx8mm-mx8menlo.dts  |  14 +-
   arch/arm/dts/imx8mm-u-boot.dtsi   |   2 +-
   arch/arm/dts/imx8mm-venice-gw700x.dtsi    |  24 +-
   arch/arm/dts/imx8mm-venice-gw7901.dts |  12 +-
   arch/arm/dts/imx8mm-venice-gw7902.dts |  14 +-
   arch/arm/dts/imx8mm-venice-gw7903.dts |   6 +-
   arch/arm/dts/imx8mm-venice-gw7904.dts |   4 +
   arch/arm/dts/imx8mm-verdin.dtsi   |  50 +-
   arch/arm/dts/imx8mn-beacon-baseboard.dtsi |   4 +-
   arch/arm/dts/imx8mn-evk.dtsi  |  45 +-
   arch/arm/dts/imx8mn-var-som-symphony.dts  |   6 +-
   arch/arm/dts/imx8mn-venice-gw7902.dts |   9 +-
   arch/arm/dts/imx8mn.dtsi  |  14 +-
   arch/arm/dts/imx8mp-dhcom-pdk2.dts    |  29 +-
   arch/arm/dts/imx8mp-dhcom-som.dtsi    |  20 +-
   arch/arm/dts/imx8mp-evk.dts   | 179 --
   arch/arm/dts/imx8mp-icore-mx8mp-edimm2.2.dts  |   2 +-
   arch/arm/dts/imx8mp-icore-mx8mp.dtsi  |   2 +-
   arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts   |  48 +-
   arch/arm/dts/imx8mp-u-boot.dtsi   |   2 +-
   arch/arm/dts/imx8mp-venice-gw74xx.dts | 284 ++---
   arch/arm/dts/imx8mp-verdin.dtsi   |  32 +-
   arch/arm/dts/imx8mp.dtsi  | 147 -
   arch/arm/dts/imx8mq-evk.dts   |  43 ++
   arch/arm/dts/imx8mq-librem5-r3.dtsi   |  45 ++
   arch/arm/dts/imx8mq-librem5-r4.dts    |  20 +-
   arch/arm/dts/imx8mq-librem5.dtsi  | 153 -
   arch/arm/dts/imx8mq-u-boot.dtsi   |  10 +-
   arch/arm/dts/imx8mq.dtsi  |  19 +-
   arch/arm/dts/imx8ulp-evk-u-boot.dtsi  |  15 +-
   arch/arm/dts/imx8ulp-evk.dts  | 240 ++-
   arch/arm/dts/imx8ulp-pinfunc.h    |   4 +-
   arch/arm/dts/imx8ulp.dtsi | 594 +-
   arch/arm/dts/imxrt1020-evk-u-boot.dtsi    |   7 +-
   arch/arm/dts/imxrt1020-evk.dts    |   1 -
   arch/arm/dts/imxrt1050-evk-u-boot.dtsi    | 174 -
   arch/arm/dts/imxrt1050-evk.dts    | 257 +---
   arch/arm/dts/imxrt1050-pinfunc.h  |   2 +-
   arch/arm/dts/imxrt1050.dtsi   | 168 +++--
   arch/arm/dts/vf610-pinfunc.h  |   2 +-
   include/dt-bindings/clock/imx8mp-clock.h  |  13 +-
   include/dt-bindings/clock/imx8ulp-clock.h |  53 +-
   include/dt-bindings/clock/imxrt1050-clock.h   |   9 +-
   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/power/imx8mp-power.h  |  21 +-
   include/dt-bindings/power/imx8ulp-power.h |  26 +
   include/dt-bindings/reset/imx8mp-reset.h  

Re: u-boot-imx master-next CI failure

2022-11-08 Thread Stefano Babic

Hi Tom,

On 08.11.22 15:36, Fabio Estevam wrote:

Hi Tom,

On Tue, Nov 8, 2022 at 11:34 AM Tom Rini  wrote:


Yes, it's CONFIG_SYS_TEXT_BASE -> CONFIG_TEXT BASE and I found that just
by doing 'make msc_sm2s_imx8mp_config oldconfig' :)


Excellent, thanks for the help!


Many thanks, we were puzzled !


Stefano


--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH] msc_sm2s_imx8mp: Convert to CONFIG_TEXT_BASE

2022-11-08 Thread Stefano Babic

Hi Fabio,

On 08.11.22 15:42, Fabio Estevam wrote:

From: Fabio Estevam 

The conversion to CONFIG_TEXT_BASE was missed here.

Convert it to fix a build error in CI.

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

This is against u-boot-imx, master-next branch.

If you prefer to squash with the original commit, feel free to do it.

  configs/msc_sm2s_imx8mp_defconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/msc_sm2s_imx8mp_defconfig 
b/configs/msc_sm2s_imx8mp_defconfig
index a4f39061ae62..6691eb312fe5 100644
--- a/configs/msc_sm2s_imx8mp_defconfig
+++ b/configs/msc_sm2s_imx8mp_defconfig
@@ -1,6 +1,6 @@
  CONFIG_ARM=y
  CONFIG_ARCH_IMX8M=y
-CONFIG_SYS_TEXT_BASE=0x4020
+CONFIG_TEXT_BASE=0x4020
  CONFIG_SYS_MALLOC_LEN=0x200
  CONFIG_SPL_GPIO=y
  CONFIG_SPL_LIBCOMMON_SUPPORT=y



Thanks. I will first run a pipeline, but it makes sense that I squash 
this with Martyn's v5-5-5-arm-imx8mp-Initial-MSC-SM2S-iMX8MP-support, by 
adding Fabio's Signed-off. @Martyn, is it okay for you ?


Regards,
Stefano

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v2 0/8] imx8: switch missing boards to binman

2022-11-08 Thread Stefano Babic

Hi Fabio, Oliver,

On 04.11.22 17:31, Fabio Estevam wrote:

Hi Oliver,

On Fri, Nov 4, 2022 at 12:19 PM Oliver Graute
 wrote:


This patchsets switches the remaining imx8 boards to binman.

Oliver Graute (8):
   imx: imx8qm-rom7720: switch to binman
   imx: imx8qm: cgtqmx8: switch to binman
   imx: imx8qxp: imx8qxp_mek switch to binman
   imx: imx8qm: imx8qm_mek switch to binman
   imx: imx8qxp: giedi switch to binman
   imx: imx8qxp: deneb switch to binman
   imx: imx8x: colibri: switch to binman
   imx: imx8: apalis: switch to binman


Great work, thanks. This series looks good to me:

Reviewed-by: Fabio Estevam 

It would be nice to get some Tested-by from the board maintainers.


I have tried to merge the series, but I get build errors, see:

https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/519510

Could you take a look ?

Thanks,
Stefano

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v2 0/8] imx8: switch missing boards to binman

2022-11-09 Thread Stefano Babic

Hi Fabio,

On 08.11.22 23:16, Fabio Estevam wrote:

Hi Oliver and Stefano,

On Tue, Nov 8, 2022 at 1:43 PM Stefano Babic  wrote:


I have tried to merge the series, but I get build errors, see:

https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/519510

Could you take a look ?


One problem I noticed is the missing CONFIG_TEXT_BASE conversion:

diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi
index 3507489a813c..442e64badc39 100644
--- a/arch/arm/dts/imx8qm-u-boot.dtsi
+++ b/arch/arm/dts/imx8qm-u-boot.dtsi
@@ -50,7 +50,7 @@
 arch = "arm64";
 compression = "none";
 description = "U-Boot (64-bit)";
-   load = ;
+   load = ;
 type = "standalone";

 uboot-blob {
diff --git a/arch/arm/dts/imx8qxp-u-boot.dtsi b/arch/arm/dts/imx8qxp-u-boot.dtsi
index 01183f8ade63..e8df5bb8bfea 100644
--- a/arch/arm/dts/imx8qxp-u-boot.dtsi
+++ b/arch/arm/dts/imx8qxp-u-boot.dtsi
@@ -50,7 +50,7 @@
 arch = "arm64";
 compression = "none";
 description = "U-Boot (64-bit)";
-   load = ;
+   load = ;
 type = "standalone";

 uboot-blob {

With this fix applied, I got:

WARNING './ahab-container.img' not found, resulting binary is not-functional
make[1]: Nothing to be done for 'SPL'.
   BINMAN  all
binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n
spl/u-boot-spl.cfgout -T imx8image -e 0x10
./mkimage-out.spl.mkimage': Fail open first container file
ahab-container.img



This is normal, but CI creates fakes. Most of built boards have warnings 
that build does not run. It is nopt a problem.



make: *** [Makefile:1116: all] Error 1


but if I manually copy the firmware, then the build succeeds.

binman should not thrown an error in case of missing firmware. Oliver,
any ideas?

Also, some boards use ahab-container.img and others use
mx8qxc0-ahab-container.img.

Is it OK to use mx8qxc0-ahab-container.img for all of them?



I try a CI run with this fixed applied and I let you know.

Stefano

--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [RESEND PATCH v2] configs: imx8mn_bsh_smm_s2: remove console from bootargs

2023-02-13 Thread Stefano Babic

On 13.02.23 14:28, Michael Nazzareno Trimarchi wrote:

Hi Stefano

On Wed, Feb 8, 2023 at 9:15 AM Dario Binacchi
 wrote:


The Linux kernel device tree already specifies the device to be used for
boot console output with a stdout-path property under /chosen.

Commit 36b661dc919da ("Merge branch 'next'") re-added the console
setting that commit bede82f750752 ("configs: imx8mn_bsh_smm_s2: remove
console from bootargs") had previously removed.

Fixes: 36b661dc919da ("Merge branch 'next'")
Signed-off-by: Dario Binacchi 
Reviewed-by: Fabio Estevam 

---

Changes in v2:
- Add the 'Reviewed-by' tag.
- Improve commit message.

  include/configs/imx8mn_bsh_smm_s2.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/imx8mn_bsh_smm_s2.h 
b/include/configs/imx8mn_bsh_smm_s2.h
index e97b8e871d22..deeed9c2f582 100644
--- a/include/configs/imx8mn_bsh_smm_s2.h
+++ b/include/configs/imx8mn_bsh_smm_s2.h
@@ -14,7 +14,7 @@
  #include 

  #define NANDARGS \
-   "nandargs=setenv bootargs console=${console} " \
+   "nandargs=setenv bootargs " \
 "${optargs} " \
 "mtdparts=${mtdparts} " \
 "root=${nandroot} " \
--


This patch is a regression fix, can you pick it?


I'll do it, thanks !

Stefano



Michael


2.32.0



--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v8] board: mntre: imx8mq: Add MNT Reform 2 board support

2023-05-02 Thread Stefano Babic

On 28.04.23 23:39, Vagrant Cascadian wrote:

On 2023-04-28, Vagrant Cascadian wrote:

On 2023-02-05, Vagrant Cascadian wrote:

On 2023-02-06, Patrick Wildt wrote:

The MNT Reform 2 is a modular DIY laptop.  In its initial version it
is based on the BoundaryDevices i.MX8MQ SoM.  Some parts have been
lifted from BoundaryDevices official U-Boot downstream project.

Signed-off-by: Patrick Wildt 


Tested booting Debian with a 6.1.x linux kernel on a mnt/reform2 using
nvme rootfs and microsd /boot. Some oddities with video and wifi that do
not occur with the vendor u-boot, but seems like huge progress.


The patch still applies to master; could this be considered for merging
soon?


I've also verified that the patch not only builds, but actually boots,
based on git commit c9c2c95d4cd27fe0cd41fe13a863899d268f973c (and also
works on v2023.04, for good measure)...

Tested-by: Vagrant Cascadian 



Thanks, I apply it and CI is running, if no issues are found it will 
part of my next PR.


Regards,
Stefano


live well,
   vagrant


---
Changes since v7:
- Re-added lost ramdisk_addr_r.
Changes since v6:
- Cleaned up some CONFIG_* pollution.
Changes since v5:
- Adjusted to further Binman changes.
- Adjusted to further Kconfig conversions.
- Removed some phy init in favor of DM.
- Removed some pinmux which are now handled by DM_SERIAL.
- Compared with Librem5/EVK and adjusted for similarity.
Changes since v4:
- Adjusted to Kconfig conversions.
- Removed U-Boot-specific device tree changes.
- Synced device tree to Linux v5.19-rc3.
Changes since v3:
- Adjusted to Binman changes in main branch.
- Cleaned up environment variables akin to i.MX8MM.
- Added vendor-prefix to device tree filename.
- Provided ramdisk_addr_r.
Changes since v2:
- Switched to Binman.
Changes since v1:
- Synced DTS with files in Linux git repo.
- Added support for USB host ports.

  arch/arm/dts/imx8mq-mnt-reform2-u-boot.dtsi   |   11 +
  arch/arm/mach-imx/imx8m/Kconfig   |7 +
  board/mntre/imx8mq_reform2/Kconfig|   15 +
  board/mntre/imx8mq_reform2/MAINTAINERS|7 +
  board/mntre/imx8mq_reform2/Makefile   |   12 +
  board/mntre/imx8mq_reform2/imx8mq_reform2.c   |  171 +++
  board/mntre/imx8mq_reform2/lpddr4_timing.c| 1014 +
  .../mntre/imx8mq_reform2/lpddr4_timing_ch2.h  |   95 ++
  board/mntre/imx8mq_reform2/spl.c  |  260 +
  configs/imx8mq_reform2_defconfig  |  107 ++
  include/configs/imx8mq_reform2.h  |   67 ++
  11 files changed, 1766 insertions(+)
  create mode 100644 arch/arm/dts/imx8mq-mnt-reform2-u-boot.dtsi
  create mode 100644 board/mntre/imx8mq_reform2/Kconfig
  create mode 100644 board/mntre/imx8mq_reform2/MAINTAINERS
  create mode 100644 board/mntre/imx8mq_reform2/Makefile
  create mode 100644 board/mntre/imx8mq_reform2/imx8mq_reform2.c
  create mode 100644 board/mntre/imx8mq_reform2/lpddr4_timing.c
  create mode 100644 board/mntre/imx8mq_reform2/lpddr4_timing_ch2.h
  create mode 100644 board/mntre/imx8mq_reform2/spl.c
  create mode 100644 configs/imx8mq_reform2_defconfig
  create mode 100644 include/configs/imx8mq_reform2.h


--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v8] board: mntre: imx8mq: Add MNT Reform 2 board support

2023-05-02 Thread Stefano Babic

On 02.05.23 10:39, Stefano Babic wrote:

On 28.04.23 23:39, Vagrant Cascadian wrote:

On 2023-04-28, Vagrant Cascadian wrote:

On 2023-02-05, Vagrant Cascadian wrote:

On 2023-02-06, Patrick Wildt wrote:

The MNT Reform 2 is a modular DIY laptop.  In its initial version it
is based on the BoundaryDevices i.MX8MQ SoM.  Some parts have been
lifted from BoundaryDevices official U-Boot downstream project.

Signed-off-by: Patrick Wildt 


Tested booting Debian with a 6.1.x linux kernel on a mnt/reform2 using
nvme rootfs and microsd /boot. Some oddities with video and wifi 
that do

not occur with the vendor u-boot, but seems like huge progress.


The patch still applies to master; could this be considered for merging
soon?


I've also verified that the patch not only builds, but actually boots,
based on git commit c9c2c95d4cd27fe0cd41fe13a863899d268f973c (and also
works on v2023.04, for good measure)...

Tested-by: Vagrant Cascadian 



Thanks, I apply it and CI is running, if no issues are found it will 
part of my next PR.




Just FYI: CI stoppt because u-boot,dm-spl is not valid anymore. I have 
replaced it with "bootph-pre-ram" in dtsi and Ci is successful, I merge 
it now into u-boot-imx.


Regards,
Stefano


Regards,
Stefano


live well,
   vagrant


---
Changes since v7:
- Re-added lost ramdisk_addr_r.
Changes since v6:
- Cleaned up some CONFIG_* pollution.
Changes since v5:
- Adjusted to further Binman changes.
- Adjusted to further Kconfig conversions.
- Removed some phy init in favor of DM.
- Removed some pinmux which are now handled by DM_SERIAL.
- Compared with Librem5/EVK and adjusted for similarity.
Changes since v4:
- Adjusted to Kconfig conversions.
- Removed U-Boot-specific device tree changes.
- Synced device tree to Linux v5.19-rc3.
Changes since v3:
- Adjusted to Binman changes in main branch.
- Cleaned up environment variables akin to i.MX8MM.
- Added vendor-prefix to device tree filename.
- Provided ramdisk_addr_r.
Changes since v2:
- Switched to Binman.
Changes since v1:
- Synced DTS with files in Linux git repo.
- Added support for USB host ports.

  arch/arm/dts/imx8mq-mnt-reform2-u-boot.dtsi   |   11 +
  arch/arm/mach-imx/imx8m/Kconfig   |    7 +
  board/mntre/imx8mq_reform2/Kconfig    |   15 +
  board/mntre/imx8mq_reform2/MAINTAINERS    |    7 +
  board/mntre/imx8mq_reform2/Makefile   |   12 +
  board/mntre/imx8mq_reform2/imx8mq_reform2.c   |  171 +++
  board/mntre/imx8mq_reform2/lpddr4_timing.c    | 1014 
+

  .../mntre/imx8mq_reform2/lpddr4_timing_ch2.h  |   95 ++
  board/mntre/imx8mq_reform2/spl.c  |  260 +
  configs/imx8mq_reform2_defconfig  |  107 ++
  include/configs/imx8mq_reform2.h  |   67 ++
  11 files changed, 1766 insertions(+)
  create mode 100644 arch/arm/dts/imx8mq-mnt-reform2-u-boot.dtsi
  create mode 100644 board/mntre/imx8mq_reform2/Kconfig
  create mode 100644 board/mntre/imx8mq_reform2/MAINTAINERS
  create mode 100644 board/mntre/imx8mq_reform2/Makefile
  create mode 100644 board/mntre/imx8mq_reform2/imx8mq_reform2.c
  create mode 100644 board/mntre/imx8mq_reform2/lpddr4_timing.c
  create mode 100644 board/mntre/imx8mq_reform2/lpddr4_timing_ch2.h
  create mode 100644 board/mntre/imx8mq_reform2/spl.c
  create mode 100644 configs/imx8mq_reform2_defconfig
  create mode 100644 include/configs/imx8mq_reform2.h




--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Pull request: please pull u-boot-imx-20230503

2023-05-03 Thread Stefano Babic

Hi Tom,

please pull from u-boot-imx, thanks !


The following changes since commit 50f64026f7a4c2d0a101c93916e01782e4fbbe7f:

  Merge branch 'master' of 
https://source.denx.de/u-boot/custodians/u-boot-spi (2023-05-01 13:29:52 
-0400)


are available in the Git repository at:

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


for you to fetch changes up to bb6ea0fe9290b4d64df8e716b58515b5325c2ea5:

  usb: ehci-mx6: move phy setup before register access (2023-05-02 
10:57:32 +0200)



u-boot-imx-20230503
---

- Fixes for : pico-imx6ul, smegw01
- new boards: DMSSE20, Reform 2
- fix: get_boot_device, PLL video rate

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


Dario Binacchi (3):
  imx6: clock: improve calculations to get the PLL video rate
  imx6: clock: add support to get LCD pixel clock rate
  imx6: clock: print real pixel clock rate

Eduard Strehlau (12):
  smegw01: Enable setting additional boot params
  smegw01: Select CONFIG_CMD_SQUASHFS
  smegw01: Select bootcount support
  smegw01: Add altbootcmd
  smegw01: Run altbootcmd in the case of failure
  smegw01: Only commit to new partition if update was successful
  smegw01: Enable EMMC boot from multiple partitions
  smegw01: Change default boot device to eMMC
  smegw01: Switch to fitImage
  smegw01: Add lockdown U-Boot env support
  smegw01: Disable additional boot menu options
  smegw01: Fix fallback to altbootcmd

Fabio Estevam (3):
  pico-imx6ul: Convert to CONFIG_DM_SERIAL
  smegw01: Read the second MAC address
  smegw01: Convert CFG_EXTRA_ENV_SETTINGS to an env file

Heinrich Schuchardt (1):
  imx8mn: buffer overflow in low_drive_gpu_freq()

Hugo Villeneuve (1):
  arm: imx8m: remove unused and obsolete board_fix_fdt() in SOC context

Oliver Graute (1):
  imx: support i.MX8QM DMSSE20 a1 board

Patrick Wildt (1):
  board: mntre: imx8mq: Add MNT Reform 2 board support

Tim Harvey (2):
  imx: fix get_boot_device() for imx8
  usb: ehci-mx6: move phy setup before register access

 arch/arm/dts/Makefile   |1 +
 arch/arm/dts/imx8mq-mnt-reform2-u-boot.dtsi |   11 +++
 arch/arm/dts/imx8qm-dmsse20-a1.dts  |  397 


 arch/arm/include/asm/arch-mx6/clock.h   |2 +
 arch/arm/mach-imx/imx8/Kconfig  |8 ++
 arch/arm/mach-imx/imx8m/Kconfig |7 ++
 arch/arm/mach-imx/imx8m/soc.c   |   36 +--
 arch/arm/mach-imx/mx6/clock.c   |   66 
-

 arch/arm/mach-imx/romapi.c  |2 +
 board/advantech/imx8qm_dmsse20_a1/Kconfig   |   15 +++
 board/advantech/imx8qm_dmsse20_a1/MAINTAINERS   |7 ++
 board/advantech/imx8qm_dmsse20_a1/Makefile  |8 ++
 board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20-a1.env |   48 ++
 board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c   |  188 


 board/advantech/imx8qm_dmsse20_a1/imximage.cfg  |   23 +
 board/advantech/imx8qm_dmsse20_a1/spl.c |  223 
+++

 board/mntre/imx8mq_reform2/Kconfig  |   15 +++
 board/mntre/imx8mq_reform2/MAINTAINERS  |7 ++
 board/mntre/imx8mq_reform2/Makefile |   12 +++
 board/mntre/imx8mq_reform2/imx8mq_reform2.c |  171 
+
 board/mntre/imx8mq_reform2/lpddr4_timing.c  | 1014 
++
 board/mntre/imx8mq_reform2/lpddr4_timing_ch2.h  |   95 
+++
 board/mntre/imx8mq_reform2/spl.c|  260 
++

 board/storopack/smegw01/Kconfig |7 ++
 board/storopack/smegw01/smegw01.c   |   33 +++
 board/storopack/smegw01/smegw01.env |   89 
+

 common/Kconfig  |2 +-
 configs/imx8mq_reform2_defconfig|  107 
+
 configs/imx8qm_dmsse20a1_defconfig  |  129 
+

 configs/pico-imx6ul_defconfig   |1 +
 configs/smegw01_defconfig   |   18 +++-
 doc/board/advantech/imx8qm-dmsse20-a1.rst   |   58 


 doc/board/advantech/in

Re: [PATCH 1/9] clk: imx8mp: Add EQoS MAC clock

2023-01-30 Thread Stefano Babic

Hi Marek,

not related to this patch, but to the whole series. I have applied it to 
my test (master-next) branch and I ran CI, this series breaks 3 boards.


https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/565207

Can you fix it into a V2 ?

Best regards,
Stefano

On 19.01.23 22:44, Marek Vasut wrote:

Add clock for the DWMAC EQoS block. This is used among other things
to configure the MII clock via DM CLK.

Signed-off-by: Marek Vasut 
---
Cc: "Ariel D'Alessandro" 
Cc: "NXP i.MX U-Boot Team" 
Cc: Andrey Zhizhikin 
Cc: Fabio Estevam 
Cc: Joe Hershberger 
Cc: Lukasz Majewski 
Cc: Marcel Ziswiler 
Cc: Marek Vasut 
Cc: Michael Trimarchi 
Cc: Peng Fan 
Cc: Ramon Fried 
Cc: Sean Anderson 
Cc: Stefano Babic 
Cc: Tim Harvey 
Cc: Tommaso Merciai 
Cc: u-boot@lists.denx.de
---
  drivers/clk/imx/clk-imx8mp.c | 13 +
  1 file changed, 13 insertions(+)

diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index ffbc1d1ba9f..6dda0403e35 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -70,6 +70,14 @@ static const char *imx8mp_i2c6_sels[] = {"clock-osc-24m", 
"sys_pll1_160m", "sys_
 "sys_pll3_out", "audio_pll1_out", 
"video_pll1_out",
 "audio_pll2_out", "sys_pll1_133m", };
  
+static const char *imx8mp_enet_qos_sels[] = {"clock-osc-24m", "sys_pll2_125m", "sys_pll2_50m",

+"sys_pll2_100m", "sys_pll1_160m", 
"audio_pll1_out",
+"video_pll1_out", "clk_ext4", };
+
+static const char *imx8mp_enet_qos_timer_sels[] = {"clock-osc-24m", "sys_pll2_100m", 
"audio_pll1_out",
+  "clk_ext1", "clk_ext2", 
"clk_ext3",
+  "clk_ext4", 
"video_pll1_out", };
+
  static const char *imx8mp_usdhc1_sels[] = {"clock-osc-24m", "sys_pll1_400m", 
"sys_pll1_800m",
   "sys_pll2_500m", "sys_pll3_out", 
"sys_pll1_266m",
   "audio_pll2_out", "sys_pll1_100m", };
@@ -250,6 +258,8 @@ static int imx8mp_clk_probe(struct udevice *dev)
clk_dm(IMX8MP_CLK_DRAM_APB, imx8m_clk_composite_critical("dram_apb", 
imx8mp_dram_apb_sels, base + 0xa080));
clk_dm(IMX8MP_CLK_I2C5, imx8m_clk_composite("i2c5", imx8mp_i2c5_sels, 
base + 0xa480));
clk_dm(IMX8MP_CLK_I2C6, imx8m_clk_composite("i2c6", imx8mp_i2c6_sels, 
base + 0xa500));
+   clk_dm(IMX8MP_CLK_ENET_QOS, imx8m_clk_composite("enet_qos", 
imx8mp_enet_qos_sels, base + 0xa880));
+   clk_dm(IMX8MP_CLK_ENET_QOS_TIMER, imx8m_clk_composite("enet_qos_timer", 
imx8mp_enet_qos_timer_sels, base + 0xa900));
clk_dm(IMX8MP_CLK_ENET_REF, imx8m_clk_composite("enet_ref", 
imx8mp_enet_ref_sels, base + 0xa980));
clk_dm(IMX8MP_CLK_ENET_TIMER, imx8m_clk_composite("enet_timer", 
imx8mp_enet_timer_sels, base + 0xaa00));
clk_dm(IMX8MP_CLK_ENET_PHY_REF, imx8m_clk_composite("enet_phy_ref", 
imx8mp_enet_phy_ref_sels, base + 0xaa80));
@@ -292,10 +302,13 @@ static int imx8mp_clk_probe(struct udevice *dev)
clk_dm(IMX8MP_CLK_I2C2_ROOT, imx_clk_gate4("i2c2_root_clk", "i2c2", 
base + 0x4180, 0));
clk_dm(IMX8MP_CLK_I2C3_ROOT, imx_clk_gate4("i2c3_root_clk", "i2c3", 
base + 0x4190, 0));
clk_dm(IMX8MP_CLK_I2C4_ROOT, imx_clk_gate4("i2c4_root_clk", "i2c4", 
base + 0x41a0, 0));
+   clk_dm(IMX8MP_CLK_QOS_ROOT, imx_clk_gate4("qos_root_clk", "ipg_root", 
base + 0x42c0, 0));
+   clk_dm(IMX8MP_CLK_QOS_ENET_ROOT, imx_clk_gate4("qos_enet_root_clk", 
"ipg_root", base + 0x42e0, 0));
clk_dm(IMX8MP_CLK_QSPI_ROOT, imx_clk_gate4("qspi_root_clk", "qspi", 
base + 0x42f0, 0));
clk_dm(IMX8MP_CLK_I2C5_ROOT, imx_clk_gate2("i2c5_root_clk", "i2c5", 
base + 0x4330, 0));
clk_dm(IMX8MP_CLK_I2C6_ROOT, imx_clk_gate2("i2c6_root_clk", "i2c6", 
base + 0x4340, 0));
clk_dm(IMX8MP_CLK_SIM_ENET_ROOT, imx_clk_gate4("sim_enet_root_clk", 
"enet_axi", base + 0x4400, 0));
+   clk_dm(IMX8MP_CLK_ENET_QOS_ROOT, imx_clk_gate4("enet_qos_root_clk", 
"sim_enet_root_clk", base + 0x43b0, 0));
clk_dm(IMX8MP_CLK_UART1_ROOT, imx_clk_gate4("uart1_root_clk", "uart1", 
base + 0x4490, 0));
clk_dm(IMX8MP_CLK_UART2_ROOT, imx_clk_gate4("uart2_root_clk", "uart2", 
base + 0x44a0, 0));
clk_dm(IMX8MP_CLK_UART3_ROOT, imx_clk_gate4("uart3_root_clk", "uart3", 
base + 0x44b0, 0));


--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Re: [PATCH] imx: imx6ul: kontron-sl-mx6ul: Disable CONFIG_FSL_QSPI_AHB_FULL_MAP to fix SPI NAND read access

2023-01-31 Thread Stefano Babic

On 31.01.23 11:08, Frieder Schrempf wrote:

Hi Stefano,

On 14.11.22 13:01, Frieder Schrempf wrote:

From: Frieder Schrempf 

The introduction of CONFIG_FSL_QSPI_AHB_FULL_MAP as default in:

def88bce094e ("spi: fsl_qspi: Support to use full AHB space on i.MX")

broke the SPI NAND read access on the Kontron SL i.MX6UL/ULL boards.
Reading data from the flash returns garbage instead of the actual
content. Fix this for now by disabling the introduced option.

In the long run this should be fixed globally.

Fixes: def88bce094e ("spi: fsl_qspi: Support to use full AHB space on i.MX")
Signed-off-by: Frieder Schrempf 


Can you pick up this patch, please?



Yes, it is already marked for the next CI run.

Regards,
Stefano


Thanks
Frieder


--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH 01/11] imx: implement get_effective_memsize

2023-01-31 Thread Stefano Babic

On 31.01.23 12:02, Fabio Estevam wrote:

Hi Peng,

On Mon, Nov 7, 2022 at 4:13 AM Peng Fan (OSS)  wrote:


From: Peng Fan 

To i.MX6/7 which has 2GB memory, the upper 4KB cut off, will cause the
top 1MB not mapped as normal memory, because ARMV7-A use section
mapping. So implement i.MX6/7 specific get_effective_memsize to fix the
issue.

Fixes: 777706bc("common/memsize.c: Fix get_effective_memsize() to check for 
overflow")


This commit has been reverted in master for non-Power PC platforms:

commit d1f4b090dd17ee11373859f2c91af94bf254af7a
Author: Pali Rohár 
Date:   Sat Jan 7 22:55:26 2023 +0100

 common/memsize.c: Check for overflow in get_effective_memsize()
only for mpc85xx

 This reverts commit 777706bc ("common/memsize.c: Fix
 get_effective_memsize() to check for overflow") for non-mpc85xx platforms.

 The changes to this generic function, which is intended to help with
 32bit platforms with large amounts of memory has unintended side effects
 (which in turn lead to boot failures) on other platforms which were
 previously functional.

 For now do overflow check only for powerpc mpc85xx platform. It is needed
 to prevent crashing of P1/P2 boards with 4GB DDR module in 32-bit mode.

 Fixes: 777706bc ("common/memsize.c: Fix
get_effective_memsize() to check for overflow")
 Signed-off-by: Pali Rohár 

Can this patch be discarded then?

I just noticed that Stefano applied it to u-boot-imx master-next branch.



Yes, it is in test - I could let it out for the moment, waiting for 
Peng's answer.


Regards,
Stefano

--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=



Re: [PATCH v6] board: mntre: imx8mq: Add MNT Reform 2 board support

2023-01-31 Thread Stefano Babic
eform2/lpddr4_timing_ch2.h
@@ -0,0 +1,95 @@
+/*
+ * Copyright Boundary Devices
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+#include 
+#include 
+#include 
+#include 
+
+/* MNT Reform2 */
+#define CONFIG_DDR_MB 4096
+#define CONFIG_DDR_RANK_BITS 1
+#define CONFIG_DDR_CHANNEL_CNT 2


These are not allowed anymore - any new CONFIG_ should flow into Kbuild.

See:

https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/565798

CONFIG_DDR_MB  is already in Kbuild, just move the value in defconfig.

Best regards,
Stefano Babic


+
+#ifdef WR_POST_EXT_3200
+#define CH2_VAL_INIT4  ((LPDDR4_MR3 << 16) | 0x00020008)
+#else
+#define CH2_VAL_INIT4  ((LPDDR4_MR3 << 16) | 8)
+#endif
+
+#if CONFIG_DDR_MB == 1024
+   /* Address map is from MSB 28: r14, r13-r0, b2-b0, c9-c0 */
+#define CH2_VAL_DDRC_ADDRMAP0_R0   0x001F
+#define CH2_VAL_DDRC_ADDRMAP6_R0   0x0F070707
+
+#elif CONFIG_DDR_MB == 2048
+   /* Address map is from MSB 28: r15, r14, r13-r0, b2-b0, c9-c0 */
+#define CH2_VAL_DDRC_ADDRMAP0_R0   0x001F
+#define CH2_VAL_DDRC_ADDRMAP6_R0   0x07070707
+   /* Address map is from MSB 28: cs, r14, r13-r0, b2-b0, c9-c0 */
+#define CH2_VAL_DDRC_ADDRMAP0_R1   0x0016
+#define CH2_VAL_DDRC_ADDRMAP6_R1   0x0F070707
+
+#elif CONFIG_DDR_MB == 3072
+   /* Address map is from MSB 29: r15, r14, cs, r13-r0, b2-b0, c9-c0 */
+#define CH2_VAL_DDRC_ADDRMAP0_R1   0x0015
+#define CH2_VAL_DDRC_ADDRMAP6_R1   0x48080707
+
+#elif CONFIG_DDR_MB == 4096
+   /* Address map is from MSB 29: cs, r15, r14, r13-r0, b2-b0, c9-c0 */
+#define CH2_VAL_DDRC_ADDRMAP0_R1   0x0017
+#define CH2_VAL_DDRC_ADDRMAP6_R1   0x07070707
+#else
+#error unsupported memory size
+#endif
+
+#define LPDDR4_CS_R0   0x1 /* 0 rank bits, 1 chip select */
+#define LPDDR4_CS_R1   0x3 /* 1 rank bit, 2 chip selects */
+
+#if (CONFIG_DDR_RANK_BITS == 0) || !defined(CH2_VAL_DDRC_ADDRMAP0_R1)
+#ifdef CH2_VAL_DDRC_ADDRMAP0_R0
+#define CH2_LPDDR4_CS  LPDDR4_CS_R0
+#define CH2_VAL_DDRC_ADDRMAP0  CH2_VAL_DDRC_ADDRMAP0_R0
+#define CH2_VAL_DDRC_ADDRMAP6  CH2_VAL_DDRC_ADDRMAP6_R0
+#else
+#error unsupported memory rank/size
+#endif
+/*
+ * rank0 will succeed, even if really rank 1, so we need
+ * to probe memory if rank0 succeeds
+ */
+#if defined(CH2_VAL_DDRC_ADDRMAP0_R0) && defined(CH2_VAL_DDRC_ADDRMAP0_R1)
+#define CH2_LPDDR4_CS_NEW  LPDDR4_CS_R1
+#define CH2_VAL_DDRC_ADDRMAP0_NEW  CH2_VAL_DDRC_ADDRMAP0_R1
+#define CH2_VAL_DDRC_ADDRMAP6_NEW  CH2_VAL_DDRC_ADDRMAP6_R1
+#endif
+
+#elif (CONFIG_DDR_RANK_BITS == 1) || !defined(CH2_VAL_DDRC_ADDRMAP0_R0)
+#ifdef CH2_VAL_DDRC_ADDRMAP0_R1
+#define CH2_LPDDR4_CS  LPDDR4_CS_R1
+#define CH2_VAL_DDRC_ADDRMAP0  CH2_VAL_DDRC_ADDRMAP0_R1
+#define CH2_VAL_DDRC_ADDRMAP6  CH2_VAL_DDRC_ADDRMAP6_R1
+#else
+#error unsupported memory rank/size
+#endif
+
+#if defined(CH2_VAL_DDRC_ADDRMAP0_R0) && defined(CH2_VAL_DDRC_ADDRMAP0_R1)
+#define CH2_LPDDR4_CS_NEW  LPDDR4_CS_R0
+#define CH2_VAL_DDRC_ADDRMAP0_NEW  CH2_VAL_DDRC_ADDRMAP0_R0
+#define CH2_VAL_DDRC_ADDRMAP6_NEW  CH2_VAL_DDRC_ADDRMAP6_R0
+#endif
+
+#else
+#error unsupported rank bits
+#endif
+
+#if (CONFIG_DDR_CHANNEL_CNT == 2)
+#if (CONFIG_DDR_RANK_BITS == 0) && !defined(CH2_VAL_DDRC_ADDRMAP0_R0)
+#error unsupported options
+#endif
+#if (CONFIG_DDR_RANK_BITS == 1) && !defined(CH2_VAL_DDRC_ADDRMAP0_R1)
+#error unsupported options
+#endif
+#endif
diff --git a/board/mntre/imx8mq_reform2/spl.c b/board/mntre/imx8mq_reform2/spl.c
new file mode 100644
index 00..21fad4972a
--- /dev/null
+++ b/board/mntre/imx8mq_reform2/spl.c
@@ -0,0 +1,260 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2018 NXP
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+extern struct dram_timing_info dram_timing_ch2;
+
+static void spl_dram_init(void)
+{
+   ddr_init(&dram_timing_ch2);
+}
+
+#define I2C_PAD_CTRL   (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
+#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
+static struct i2c_pads_info i2c_pad_info1 = {
+   .scl = {
+   .i2c_mode = IMX8MQ_PAD_I2C1_SCL__I2C1_SCL | PC,
+   .gpio_mode = IMX8MQ_PAD_I2C1_SCL__GPIO5_IO14 | PC,
+   .gp = IMX_GPIO_NR(5, 14),
+   },
+   .sda = {
+   .i2c_mode = IMX8MQ_PAD_I2C1_SDA__I2C1_SDA | PC,
+   .gpio_mode = IMX8MQ_PAD_I2C1_SDA__GPIO5_IO15 | PC,
+   .gp = IMX_GPIO_NR(5, 15),
+   },
+};
+
+#define USDHC2_VSELIMX_GPIO_NR(1, 8)
+#define USDHC2_CD_GPIO IMX_GPIO_NR(2, 12)
+#define USDHC1_PWR_GPIO IMX_GPIO_NR(2, 10)
+
+int board_mmc_getcd(struct mmc *mmc)
+{
+ 

Pull request: u-boot-imx u-boot-imx-20230201

2023-02-01 Thread Stefano Babic

Hi Tom,

this is the main PR for i.MX for 2023.04. Still open for me is the 
series related to i.MX9 sent recently by Peng. Please pull from 
u-boot-imx, thanks !



The following changes since commit f147aa80f52989c7455022ca1ab959e8545feccc:

  Merge branch '2023-01-27-apple-soc-updates' (2023-01-27 14:48:22 -0500)

are available in the Git repository at:

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


for you to fetch changes up to f42c0726fd02e978a524ab35b060382d317ef438:

  arm: dts: imx8mn-u-boot: use versioned ddr4 firmware (2023-01-31 
19:44:23 +0100)



For 2023.04
---

- several conversion to DM_SERIAL and DM_I2C
- fixes for Toradex boards
- PSCI

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


Adam Ford (2):
  configs: imx8m: Prepare imx8m-beacon boards for HAB support
  configs: imx8mn_beacon_fspi: Add config for booting from QSPI

Andrejs Cainikovs (6):
  board: apalis-imx8: remove board_phy_config duplicate
  board: apalis-imx8: initialize snvs
  apalis-imx8: add emmc/mmc card pinctrl's for different speeds
  apalis-imx8: set bootaux memory base and size
  apalis-imx8: add M4 boot environment helpers
  board: apalis-imx8: add 2nd ethernet address

Arnaud Ferraris (1):
  imx8mq_pins: fix configuration for UART4 on ECSPI2 pads

Dario Binacchi (1):
  arm: dts: imx8mn-u-boot: fix DDR3 only support

Detlev Casanova (1):
  imx6q-sabrelite: Re-add mmc aliases

Fabio Estevam (8):
  imx6qdl-sabresd: Pass mmc alias
  mx7: clock: Use 60MHz for the I2C clocks
  imx8mm-phg: Add board support
  pico-imx7d: Add support for the 2GB variant
  mx53loco: Select CONFIG_CMD_EXT4
  pico-imx7d: Convert to CONFIG_DM_SERIAL
  pico-imx7d: Convert to DM_I2C and DM_PMIC
  imx: Suggest the NXP ATF github repo

Frieder Schrempf (2):
  arm64: dts: imx8mm-kontron: Add RTC aliases
  imx: imx6ul: kontron-sl-mx6ul: Disable 
CONFIG_FSL_QSPI_AHB_FULL_MAP to fix SPI NAND read access


Igor Opaniuk (1):
  apalis-imx8: provide proper config_sys_prompt

Loic Poulain (2):
  serial: mxc: Wait for TX completion before reset
  serial: mxc: Speed-up character transmission

Manoj Sai (1):
  configs: imx8mp_evk: revert to old ram settings

Marcel Ziswiler (11):
  apalis-imx8: implement pcb version and soc variant handling
  apalis-imx8: turn off lcd backlight before os handover
  apalis-imx8: display build info
  apalis-imx8: set bootdelay
  apalis-imx8: enable environment bootcount limit
  apalis-imx8: introduce setup setting setupargs
  apalis-imx8: remove obsolete sdhc related config defines
  apalis-imx8: remove obsolete net usb start
  apalis-imx8: drop obsolete environment variables
  apalis-imx8: update update_uboot confirmation message
  apalis-imx8: update env memory layout

Marek Vasut (21):
  ddr: imx: Handle both 3733 and 3732 MTps rates
  pmic: pca9450: Make warm reset on WDOG_B assertion
  ARM: imx: Remove PMIC reset configuration from board files
  ARM: imx: Reinstate decode ECSPI env location from i.MX8M ROMAPI 
tables

  ARM: imx: Enable LTO for Data Modul i.MX8M Mini eDM SBC
  ARM: imx: Drop board side icache enable on Data Modul i.MX8M Mini 
eDM SBC

  ARM: imx: Factor common code out of Data Modul i.MX8M Mini eDM SBC
  ARM: imx: bootaux: Fix macro misuse
  ARM: imx: bootaux: Fix LTO -Wlto-type-mismatch
  arm64: imx8mp: Disable Atheros PHY driver on i.MX8MP DHCOM
  arm64: imx8mp: Enable SMSC LAN87xx PHY driver on i.MX8MP DHCOM
  arm: psci: Add PSCI v1.1 macro
  arm: psci: Fix RESET2 hook
  arm: imx: Drop custom lowlevel_init
  arm: dts: imx8m: Require ATF BL31 blob only if not PSCI provider
  arm: imx: imx8m: Only use ROM pointers if not PSCI provider
  arm: imx: imx8m: Enable GICv3 support if PSCI provider
  arm: imx: imx8m: Map RAM as NS if PSCI provider
  arm: imx: imx8m: Define trampoline location if PSCI provider
  arm: imx: imx8m: Program CSU and TZASC if PSCI provider
  arm: imx: imx8m: Add basic PSCI provider implementation

Max Krummenacher (1):
  ARM: arm: colibri-imx6ull-emmc: fix emmc access

Michael Trimarchi (1):
  engicam: imx6: migrate to DM_SERIAL

Mikhail Ilin (3):
  tools: imximage: Fix check array index
  tools: imx8mimage: Fix handle leak
  tools: imx8image: Fix handle leak

Oleksandr Suvorov (3):
  apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
  apalis/colibri-imx8/8x: remove global variable script
  arm: dts: imx8mn-u-boot: use versioned ddr4 firmware

Peng Fan (12):
  imx: mx6ull_14x14_evk: select DM_SERIAL
  imx: mx6ulz: select DM_SERIAL
  imx: mx6ull/z_14x14_evk: clean up UART iomux
  imx: mx6sllevk: co

Re: Pull request: u-boot-imx u-boot-imx-20230201

2023-02-01 Thread Stefano Babic

On 01.02.23 11:17, Peter Robinson wrote:

Hi Stefano,

Any reason the following series updating the Udoo Neo wasn't pulled in?


Yes, they disappeared, see:

http://patchwork.ozlabs.org/project/uboot/list/?series=328175

I am not in the delegate, and the patches were not on my list then. I 
will put them for next PR.


Thanks,
Stefano



http://patchwork.ozlabs.org/project/uboot/list/?series=328175

On Wed, Feb 1, 2023 at 9:40 AM Stefano Babic  wrote:


Hi Tom,

this is the main PR for i.MX for 2023.04. Still open for me is the
series related to i.MX9 sent recently by Peng. Please pull from
u-boot-imx, thanks !


The following changes since commit f147aa80f52989c7455022ca1ab959e8545feccc:

Merge branch '2023-01-27-apple-soc-updates' (2023-01-27 14:48:22 -0500)

are available in the Git repository at:

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

for you to fetch changes up to f42c0726fd02e978a524ab35b060382d317ef438:

arm: dts: imx8mn-u-boot: use versioned ddr4 firmware (2023-01-31
19:44:23 +0100)


For 2023.04
---

- several conversion to DM_SERIAL and DM_I2C
- fixes for Toradex boards
- PSCI

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


Adam Ford (2):
configs: imx8m: Prepare imx8m-beacon boards for HAB support
configs: imx8mn_beacon_fspi: Add config for booting from QSPI

Andrejs Cainikovs (6):
board: apalis-imx8: remove board_phy_config duplicate
board: apalis-imx8: initialize snvs
apalis-imx8: add emmc/mmc card pinctrl's for different speeds
apalis-imx8: set bootaux memory base and size
apalis-imx8: add M4 boot environment helpers
board: apalis-imx8: add 2nd ethernet address

Arnaud Ferraris (1):
imx8mq_pins: fix configuration for UART4 on ECSPI2 pads

Dario Binacchi (1):
arm: dts: imx8mn-u-boot: fix DDR3 only support

Detlev Casanova (1):
imx6q-sabrelite: Re-add mmc aliases

Fabio Estevam (8):
imx6qdl-sabresd: Pass mmc alias
mx7: clock: Use 60MHz for the I2C clocks
imx8mm-phg: Add board support
pico-imx7d: Add support for the 2GB variant
mx53loco: Select CONFIG_CMD_EXT4
pico-imx7d: Convert to CONFIG_DM_SERIAL
pico-imx7d: Convert to DM_I2C and DM_PMIC
imx: Suggest the NXP ATF github repo

Frieder Schrempf (2):
arm64: dts: imx8mm-kontron: Add RTC aliases
imx: imx6ul: kontron-sl-mx6ul: Disable
CONFIG_FSL_QSPI_AHB_FULL_MAP to fix SPI NAND read access

Igor Opaniuk (1):
apalis-imx8: provide proper config_sys_prompt

Loic Poulain (2):
serial: mxc: Wait for TX completion before reset
serial: mxc: Speed-up character transmission

Manoj Sai (1):
configs: imx8mp_evk: revert to old ram settings

Marcel Ziswiler (11):
apalis-imx8: implement pcb version and soc variant handling
apalis-imx8: turn off lcd backlight before os handover
apalis-imx8: display build info
apalis-imx8: set bootdelay
apalis-imx8: enable environment bootcount limit
apalis-imx8: introduce setup setting setupargs
apalis-imx8: remove obsolete sdhc related config defines
apalis-imx8: remove obsolete net usb start
apalis-imx8: drop obsolete environment variables
apalis-imx8: update update_uboot confirmation message
apalis-imx8: update env memory layout

Marek Vasut (21):
ddr: imx: Handle both 3733 and 3732 MTps rates
pmic: pca9450: Make warm reset on WDOG_B assertion
ARM: imx: Remove PMIC reset configuration from board files
ARM: imx: Reinstate decode ECSPI env location from i.MX8M ROMAPI
tables
ARM: imx: Enable LTO for Data Modul i.MX8M Mini eDM SBC
ARM: imx: Drop board side icache enable on Data Modul i.MX8M Mini
eDM SBC
ARM: imx: Factor common code out of Data Modul i.MX8M Mini eDM SBC
ARM: imx: bootaux: Fix macro misuse
ARM: imx: bootaux: Fix LTO -Wlto-type-mismatch
arm64: imx8mp: Disable Atheros PHY driver on i.MX8MP DHCOM
arm64: imx8mp: Enable SMSC LAN87xx PHY driver on i.MX8MP DHCOM
arm: psci: Add PSCI v1.1 macro
arm: psci: Fix RESET2 hook
arm: imx: Drop custom lowlevel_init
arm: dts: imx8m: Require ATF BL31 blob only if not PSCI provider
arm: imx: imx8m: Only use ROM pointers if not PSCI provider
arm: imx: imx8m: Enable GICv3 support if PSCI provider
arm: imx: imx8m: Map RAM as NS if PSCI provider
arm: imx: imx8m: Define trampoline location if PSCI provider
arm: imx: imx8m: Program CSU and TZASC if PSCI provider
arm: imx: imx8m: Add basic PSCI provider implementation

Max Krummenacher (1):
ARM: arm: colibri-imx6ull-emmc: fix emmc access


Re: [PATCH 2/2] configs: imx: imx8mm_beacon: Add config option for QSPI booting

2023-02-01 Thread Stefano Babic

Hi Adam,

I haven't picked up these two patches in my PR due to a small thing (at 
least, what I could see). There are a couple of new CONFIG_ in header 
(CONFIG_SYS_UBOOT_BASE, CFG_ as now is okay), but new CONFIG_ should be 
managed only by Kbuild and are not allowed.


My pipeline failed, see here:

https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/566141

On 19.11.22 20:28, Adam Ford wrote:

The imx8mm_beacon SOM has a QSPI part attached to the FSPI controller.
Update the header and spl files to support booting from NOR flash and
add imx8mm_beacon_fspi_defconfig to support this configuration.

Signed-off-by: Adam Ford 

diff --git a/board/beacon/imx8mm/spl.c b/board/beacon/imx8mm/spl.c
index a5f337aa17..4beda0c62d 100644
--- a/board/beacon/imx8mm/spl.c
+++ b/board/beacon/imx8mm/spl.c
@@ -36,6 +36,8 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
return BOOT_DEVICE_MMC2;
case USB_BOOT:
return BOOT_DEVICE_BOARD;
+   case QSPI_BOOT:
+   return BOOT_DEVICE_NOR;
default:
return BOOT_DEVICE_NONE;
}
diff --git a/configs/imx8mm_beacon_fspi_defconfig 
b/configs/imx8mm_beacon_fspi_defconfig
new file mode 100644
index 00..805fd3f671
--- /dev/null
+++ b/configs/imx8mm_beacon_fspi_defconfig
@@ -0,0 +1,155 @@
+CONFIG_ARM=y
+CONFIG_ARCH_IMX8M=y
+CONFIG_TEXT_BASE=0x4020
+CONFIG_SYS_MALLOC_LEN=0x200
+CONFIG_SPL_GPIO=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_ENV_SIZE=0x2000
+CONFIG_ENV_OFFSET=0xDE00
+CONFIG_IMX_CONFIG="board/freescale/imx8mm_evk/imximage-8mm-lpddr4-fspi.cfg"
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="imx8mm-beacon-kit"
+CONFIG_SPL_TEXT_BASE=0x7E2000
+CONFIG_TARGET_IMX8MM_BEACON=y
+CONFIG_SYS_PROMPT="u-boot=> "
+CONFIG_SPL_SERIAL=y
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL=y
+CONFIG_SYS_LOAD_ADDR=0x4048
+CONFIG_LTO=y
+CONFIG_SYS_MONITOR_LEN=524288
+CONFIG_FIT=y
+CONFIG_FIT_EXTERNAL_OFFSET=0x3000
+CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
+CONFIG_OF_SYSTEM_SETUP=y
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; 
then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; 
fi;"
+CONFIG_DEFAULT_FDT_FILE="imx8mm-beacon-kit.dtb"
+CONFIG_SPL_MAX_SIZE=0x25000
+CONFIG_SPL_PAD_TO=0x0
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
+CONFIG_SPL_BSS_START_ADDR=0x91
+CONFIG_SPL_BSS_MAX_SIZE=0x2000
+CONFIG_SPL_BOARD_INIT=y
+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
+CONFIG_SPL_STACK=0x92
+CONFIG_SYS_SPL_MALLOC=y
+CONFIG_HAS_CUSTOM_SPL_MALLOC_START=y
+CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x4220
+CONFIG_SYS_SPL_MALLOC_SIZE=0x8
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300
+CONFIG_SPL_CRC32=y
+CONFIG_SPL_I2C=y
+CONFIG_SPL_NOR_SUPPORT=y
+CONFIG_SPL_POWER=y
+CONFIG_SPL_USB_HOST=y
+CONFIG_SPL_USB_GADGET=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_SPL_WATCHDOG=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_MAXARGS=64
+CONFIG_SYS_CBSIZE=2048
+CONFIG_SYS_PBSIZE=2074
+CONFIG_SYS_BOOTM_LEN=0x80
+# CONFIG_CMD_EXPORTENV is not set
+# CONFIG_CMD_IMPORTENV is not set
+# CONFIG_CMD_CRC32 is not set
+CONFIG_CMD_CLK=y
+CONFIG_CMD_FUSE=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_USB_SDP=y
+CONFIG_CMD_USB_MASS_STORAGE=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
+CONFIG_SYS_MMC_ENV_PART=2
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_USE_ETHPRIME=y
+CONFIG_ETHPRIME="FEC"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_CLK_COMPOSITE_CCF=y
+CONFIG_CLK_COMPOSITE_CCF=y
+CONFIG_SPL_CLK_IMX8MM=y
+CONFIG_CLK_IMX8MM=y
+CONFIG_MXC_GPIO=y
+CONFIG_DM_PCA953X=y
+CONFIG_DM_I2C=y
+CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_MMC_HS400_ES_SUPPORT=y
+CONFIG_MMC_HS400_SUPPORT=y
+CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SF_DEFAULT_MODE=0
+CONFIG_SF_DEFAULT_SPEED=4000
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_PHYLIB=y
+CONFIG_PHY_ATHEROS=y
+CONFIG_PHY_GIGE=y
+CONFIG_FEC_MXC=y
+CONFIG_MII=y
+CONFIG_SPL_PHY=y
+CONFIG_SPL_NOP_PHY=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_PINCTRL_IMX8M=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_IMX8M_POWER_DOMAIN=y
+CONFIG_DM_PMIC=y
+# CONFIG_SPL_PMIC_CHILDREN is not set
+CONFIG_DM_PMIC_BD71837=y
+CONFIG_SPL_DM_PMIC_BD71837=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_BD71837=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SERIAL=y
+CONFIG_MXC_UART=y
+CONFIG_SPI=y
+CONFIG_D

Re: [PATCH 2/2] configs: imx: imx8mm_beacon: Add config option for QSPI booting

2023-02-01 Thread Stefano Babic

On 01.02.23 14:44, Adam Ford wrote:

On Wed, Feb 1, 2023 at 7:06 AM Stefano Babic  wrote:


Hi Adam,

I haven't picked up these two patches in my PR due to a small thing (at
least, what I could see). There are a couple of new CONFIG_ in header
(CONFIG_SYS_UBOOT_BASE, CFG_ as now is okay), but new CONFIG_ should be
managed only by Kbuild and are not allowed.


The initial submission was back in November,


Yes, that the reason, patch was just in my queue...


and I know the Kconfig
has undergone some updates and migrations since then, so I'll rebase
and send a V2 later tonight.


Thanks again - I will then submit in a further PR for 2022.04, there are 
a few pacthes missing.


Stefano



thanks

adam


My pipeline failed, see here:

https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/566141

On 19.11.22 20:28, Adam Ford wrote:

The imx8mm_beacon SOM has a QSPI part attached to the FSPI controller.
Update the header and spl files to support booting from NOR flash and
add imx8mm_beacon_fspi_defconfig to support this configuration.

Signed-off-by: Adam Ford 

diff --git a/board/beacon/imx8mm/spl.c b/board/beacon/imx8mm/spl.c
index a5f337aa17..4beda0c62d 100644
--- a/board/beacon/imx8mm/spl.c
+++ b/board/beacon/imx8mm/spl.c
@@ -36,6 +36,8 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
   return BOOT_DEVICE_MMC2;
   case USB_BOOT:
   return BOOT_DEVICE_BOARD;
+ case QSPI_BOOT:
+ return BOOT_DEVICE_NOR;
   default:
   return BOOT_DEVICE_NONE;
   }
diff --git a/configs/imx8mm_beacon_fspi_defconfig 
b/configs/imx8mm_beacon_fspi_defconfig
new file mode 100644
index 00..805fd3f671
--- /dev/null
+++ b/configs/imx8mm_beacon_fspi_defconfig
@@ -0,0 +1,155 @@
+CONFIG_ARM=y
+CONFIG_ARCH_IMX8M=y
+CONFIG_TEXT_BASE=0x4020
+CONFIG_SYS_MALLOC_LEN=0x200
+CONFIG_SPL_GPIO=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_ENV_SIZE=0x2000
+CONFIG_ENV_OFFSET=0xDE00
+CONFIG_IMX_CONFIG="board/freescale/imx8mm_evk/imximage-8mm-lpddr4-fspi.cfg"
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="imx8mm-beacon-kit"
+CONFIG_SPL_TEXT_BASE=0x7E2000
+CONFIG_TARGET_IMX8MM_BEACON=y
+CONFIG_SYS_PROMPT="u-boot=> "
+CONFIG_SPL_SERIAL=y
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL=y
+CONFIG_SYS_LOAD_ADDR=0x4048
+CONFIG_LTO=y
+CONFIG_SYS_MONITOR_LEN=524288
+CONFIG_FIT=y
+CONFIG_FIT_EXTERNAL_OFFSET=0x3000
+CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
+CONFIG_OF_SYSTEM_SETUP=y
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; 
then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; 
fi;"
+CONFIG_DEFAULT_FDT_FILE="imx8mm-beacon-kit.dtb"
+CONFIG_SPL_MAX_SIZE=0x25000
+CONFIG_SPL_PAD_TO=0x0
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
+CONFIG_SPL_BSS_START_ADDR=0x91
+CONFIG_SPL_BSS_MAX_SIZE=0x2000
+CONFIG_SPL_BOARD_INIT=y
+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
+CONFIG_SPL_STACK=0x92
+CONFIG_SYS_SPL_MALLOC=y
+CONFIG_HAS_CUSTOM_SPL_MALLOC_START=y
+CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x4220
+CONFIG_SYS_SPL_MALLOC_SIZE=0x8
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300
+CONFIG_SPL_CRC32=y
+CONFIG_SPL_I2C=y
+CONFIG_SPL_NOR_SUPPORT=y
+CONFIG_SPL_POWER=y
+CONFIG_SPL_USB_HOST=y
+CONFIG_SPL_USB_GADGET=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_SPL_WATCHDOG=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_MAXARGS=64
+CONFIG_SYS_CBSIZE=2048
+CONFIG_SYS_PBSIZE=2074
+CONFIG_SYS_BOOTM_LEN=0x80
+# CONFIG_CMD_EXPORTENV is not set
+# CONFIG_CMD_IMPORTENV is not set
+# CONFIG_CMD_CRC32 is not set
+CONFIG_CMD_CLK=y
+CONFIG_CMD_FUSE=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_USB_SDP=y
+CONFIG_CMD_USB_MASS_STORAGE=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
+CONFIG_SYS_MMC_ENV_PART=2
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_USE_ETHPRIME=y
+CONFIG_ETHPRIME="FEC"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_CLK_COMPOSITE_CCF=y
+CONFIG_CLK_COMPOSITE_CCF=y
+CONFIG_SPL_CLK_IMX8MM=y
+CONFIG_CLK_IMX8MM=y
+CONFIG_MXC_GPIO=y
+CONFIG_DM_PCA953X=y
+CONFIG_DM_I2C=y
+CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_MMC_HS400_ES_SUPPORT=y
+CONFIG_MMC_HS400_SUPPORT=y
+CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SF_DEFAULT_MODE=0
+CONFIG_SF_DEFAULT_SPEED=4000
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_PHYLIB=y

Re: [PATCH] imx8m: Select BINMAN via SoC level

2023-02-03 Thread Stefano Babic

Hi Fabio,

On 25.10.22 16:32, Fabio Estevam wrote:

From: Fabio Estevam 

Since all imx8m boards have been converted to use binman, select
binman via SoC level rather than making the selection for each board.



Everything correct, but patch is now obsolete and should be reworked / 
rebased. I won't appply this, but of course I will apply if you think to 
rebase and repost it.


Best regards,
Stefano


Signed-off-by: Fabio Estevam 
---
  arch/arm/mach-imx/imx8m/Kconfig | 33 +
  1 file changed, 1 insertion(+), 32 deletions(-)

diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index 8cd7c7a8dd8b..c7a272ec18f5 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -2,6 +2,7 @@ if ARCH_IMX8M
  
  config IMX8M

bool
+   select BINMAN
select HAS_CAAM
select ROM_UNIFIED_SECTIONS
  
@@ -31,13 +32,11 @@ choice
  
  config TARGET_IMX8MQ_CM

bool "Ronetix iMX8MQ-CM SoM"
-   select BINMAN
select IMX8MQ
select IMX8M_LPDDR4
  
  config TARGET_IMX8MQ_EVK

bool "imx8mq_evk"
-   select BINMAN
select IMX8MQ
select IMX8M_LPDDR4
select FSL_CAAM
@@ -46,20 +45,17 @@ config TARGET_IMX8MQ_EVK
  
  config TARGET_IMX8MQ_PHANBELL

bool "imx8mq_phanbell"
-   select BINMAN
select IMX8MQ
select IMX8M_LPDDR4
  
  config TARGET_IMX8MM_DATA_MODUL_EDM_SBC

bool "Data Modul eDM SBC i.MX8M Mini"
-   select BINMAN
select IMX8MM
select IMX8M_LPDDR4
select SUPPORT_SPL
  
  config TARGET_IMX8MM_EVK

bool "imx8mm LPDDR4 EVK board"
-   select BINMAN
select IMX8MM
select SUPPORT_SPL
select IMX8M_LPDDR4
@@ -69,7 +65,6 @@ config TARGET_IMX8MM_EVK
  
  config TARGET_IMX8MM_ICORE_MX8MM

bool "Engicam i.Core MX8M Mini SOM"
-   select BINMAN
select IMX8MM
select SUPPORT_SPL
select IMX8M_LPDDR4
@@ -88,14 +83,12 @@ config TARGET_IMX8MM_ICORE_MX8MM
  
  config TARGET_IMX8MM_MX8MENLO

bool "Support i.MX8M Mini MX8Menlo board based on Toradex Verdin SoM"
-   select BINMAN
select IMX8MM
select SUPPORT_SPL
select IMX8M_LPDDR4
  
  config TARGET_IMX8MM_VENICE

bool "Support Gateworks Venice iMX8M Mini module"
-   select BINMAN
select IMX8MM
select SUPPORT_SPL
select IMX8M_LPDDR4
@@ -104,7 +97,6 @@ config TARGET_IMX8MM_VENICE
  
  config TARGET_KONTRON_MX8MM

bool "Kontron Electronics N80xx"
-   select BINMAN
select IMX8MM
select SUPPORT_SPL
select IMX8M_LPDDR4
@@ -114,21 +106,18 @@ config TARGET_KONTRON_MX8MM
  
  config TARGET_IMX8MN_BSH_SMM_S2

bool "imx8mn-bsh-smm-s2"
-   select BINMAN
select IMX8MN
select SUPPORT_SPL
select IMX8M_DDR3L
  
  config TARGET_IMX8MN_BSH_SMM_S2PRO

bool "imx8mn-bsh-smm-s2pro"
-   select BINMAN
select IMX8MN
select SUPPORT_SPL
select IMX8M_DDR3L
  
  config TARGET_IMX8MN_EVK

bool "imx8mn LPDDR4 EVK board"
-   select BINMAN
select IMX8MN
select SUPPORT_SPL
select IMX8M_LPDDR4
@@ -137,7 +126,6 @@ config TARGET_IMX8MN_EVK
  
  config TARGET_IMX8MN_DDR4_EVK

bool "imx8mn DDR4 EVK board"
-   select BINMAN
select IMX8MN
select SUPPORT_SPL
select IMX8M_DDR4
@@ -146,7 +134,6 @@ config TARGET_IMX8MN_DDR4_EVK
  
  config TARGET_IMX8MN_VENICE

bool "Support Gateworks Venice iMX8M Nano module"
-   select BINMAN
select IMX8MN
select SUPPORT_SPL
select IMX8M_LPDDR4
@@ -155,14 +142,12 @@ config TARGET_IMX8MN_VENICE
  
  config TARGET_IMX8MP_DH_DHCOM_PDK2

bool "DH electronics DHCOM Premium Developer Kit (2) i.MX8M Plus"
-   select BINMAN
select IMX8MP
select IMX8M_LPDDR4
select SUPPORT_SPL
  
  config TARGET_IMX8MP_ICORE_MX8MP

bool "Engicam i.Core MX8M Plus SOM"
-   select BINMAN
select IMX8MP
select IMX8M_LPDDR4
select SUPPORT_SPL
@@ -176,7 +161,6 @@ config TARGET_IMX8MP_ICORE_MX8MP
  
  config TARGET_IMX8MP_EVK

bool "imx8mp LPDDR4 EVK board"
-   select BINMAN
select IMX8MP
select SUPPORT_SPL
select IMX8M_LPDDR4
@@ -186,7 +170,6 @@ config TARGET_IMX8MP_EVK
  
  config TARGET_IMX8MP_VENICE

bool "Support Gateworks Venice iMX8M Plus module"
-   select BINMAN
select IMX8MP
select SUPPORT_SPL
select IMX8M_LPDDR4
@@ -195,68 +178,58 @@ config TARGET_IMX8MP_VENICE
  
  config TARGET_PICO_IMX8MQ

bool "Support Technexion Pico iMX8MQ"
-   select BINMAN
select IMX8MQ
select IMX8M_LPDDR4
  
  config TARGET_IMX8MN_VAR_SOM

bool "imx8mn_var_som"
-   select BINMAN
select IMX8MN
select SUPPORT_SPL
select IMX8M_DDR4
  
  config TARGET_KONTRON_PITX_I

Re: [PATCH] ARM: dts: imx: Add support for Data Modul i.MX8M Plus eDM SBC

2023-02-03 Thread Stefano Babic

Hi Marek,

On 18.12.22 05:35, Marek Vasut wrote:

Add support for Data Modul i.MX8M Plus eDM SBC board. This is an
evaluation board for various custom display units. Currently
supported are serial console, ethernet, eMMC, SD, SPI NOR, USB.



Some CONFIG_ were converted in Kbuild. They raise an error in CI because 
they are still in the header, see:


https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/569067

Can you rebase and repost ? Thanks !

Best regards,
Stefano


Signed-off-by: Marek Vasut 
---
Cc: Fabio Estevam 
Cc: Peng Fan 
Cc: Stefano Babic 
---
  arch/arm/dts/Makefile |1 +
  .../dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi |  130 ++
  arch/arm/dts/imx8mp-data-modul-edm-sbc.dts|  973 +
  arch/arm/mach-imx/imx8m/Kconfig   |8 +
  board/data_modul/imx8mp_edm_sbc/Kconfig   |   15 +
  board/data_modul/imx8mp_edm_sbc/MAINTAINERS   |8 +
  board/data_modul/imx8mp_edm_sbc/Makefile  |   13 +
  .../imx8mp_data_modul_edm_sbc.c   |   93 +
  board/data_modul/imx8mp_edm_sbc/imximage.cfg  |8 +
  .../data_modul/imx8mp_edm_sbc/lpddr4_timing.h |   11 +
  .../imx8mp_edm_sbc/lpddr4_timing_4G_32.c  | 1852 +
  board/data_modul/imx8mp_edm_sbc/spl.c |  124 ++
  configs/imx8mp_data_modul_edm_sbc_defconfig   |  267 +++
  include/configs/imx8mp_data_modul_edm_sbc.h   |   45 +
  14 files changed, 3548 insertions(+)
  create mode 100644 arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi
  create mode 100644 arch/arm/dts/imx8mp-data-modul-edm-sbc.dts
  create mode 100644 board/data_modul/imx8mp_edm_sbc/Kconfig
  create mode 100644 board/data_modul/imx8mp_edm_sbc/MAINTAINERS
  create mode 100644 board/data_modul/imx8mp_edm_sbc/Makefile
  create mode 100644 board/data_modul/imx8mp_edm_sbc/imx8mp_data_modul_edm_sbc.c
  create mode 100644 board/data_modul/imx8mp_edm_sbc/imximage.cfg
  create mode 100644 board/data_modul/imx8mp_edm_sbc/lpddr4_timing.h
  create mode 100644 board/data_modul/imx8mp_edm_sbc/lpddr4_timing_4G_32.c
  create mode 100644 board/data_modul/imx8mp_edm_sbc/spl.c
  create mode 100644 configs/imx8mp_data_modul_edm_sbc_defconfig
  create mode 100644 include/configs/imx8mp_data_modul_edm_sbc.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 43951a7731e..638c452c315 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -978,6 +978,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
imx8mn-beacon-kit.dtb \
imx8mq-mnt-reform2.dtb \
imx8mq-phanbell.dtb \
+   imx8mp-data-modul-edm-sbc.dtb \
imx8mp-dhcom-pdk2.dtb \
imx8mp-evk.dtb \
imx8mp-icore-mx8mp-edimm2.2.dtb \
diff --git a/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi 
b/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi
new file mode 100644
index 000..76eb6ef4d0c
--- /dev/null
+++ b/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi
@@ -0,0 +1,130 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2022 Marek Vasut 
+ */
+
+#include "imx8mp-u-boot.dtsi"
+
+/ {
+   aliases {
+   eeprom0 = &eeprom;
+   mmc0 = &usdhc3; /* eMMC */
+   mmc1 = &usdhc2; /* MicroSD */
+   spi0 = &ecspi1;
+   };
+
+   config {
+   dmo,ram-coding-gpios = <&gpio3 20 0>, <&gpio4 3 0>, <&gpio4 1 
0>;
+   };
+
+   wdt-reboot {
+   compatible = "wdt-reboot";
+   wdt = <&wdog1>;
+   u-boot,dm-spl;
+   };
+};
+
+&buck4 {
+   u-boot,dm-spl;
+};
+
+&buck5 {
+   u-boot,dm-spl;
+};
+
+&ecspi1 {
+   u-boot,dm-spl;
+   flash@0 {
+   u-boot,dm-spl;
+   };
+};
+
+&eqos {
+   /delete-property/ assigned-clocks;
+   /delete-property/ assigned-clock-parents;
+   /delete-property/ assigned-clock-rates;
+};
+
+&gpio1 {
+   u-boot,dm-spl;
+};
+
+&gpio2 {
+   u-boot,dm-spl;
+};
+
+&gpio3 {
+   u-boot,dm-spl;
+};
+
+&gpio4 {
+   u-boot,dm-spl;
+};
+
+&gpio5 {
+   u-boot,dm-spl;
+};
+
+&i2c3 {
+   u-boot,dm-spl;
+};
+
+&pinctrl_ecspi1 {
+   u-boot,dm-spl;
+};
+
+&pinctrl_hog_sbc {
+   u-boot,dm-spl;
+};
+
+&pinctrl_i2c3 {
+   u-boot,dm-spl;
+};
+
+&pinctrl_i2c3_gpio {
+   u-boot,dm-spl;
+};
+
+&pinctrl_pmic {
+   u-boot,dm-spl;
+};
+
+&pinctrl_uart3 {
+   u-boot,dm-spl;
+};
+
+&pinctrl_usdhc2 {
+   u-boot,dm-spl;
+};
+
+&pinctrl_usdhc3 {
+   u-boot,dm-spl;
+};
+
+&pmic {
+   u-boot,dm-spl;
+
+   regulators {
+   u-boot,dm-spl;
+   };
+};
+
+&uart3 {
+   u-boot,dm-spl;
+};
+
+&usdhc2 {
+   u-boot,dm-spl;
+   sd-uhs-sdr104;
+   sd-uhs-ddr50;
+};
+
+&usdhc3 {
+   u-boot,dm-spl;
+   mmc-hs400-1_8v;
+   mmc-hs400-enhanced-strobe;
+};
+
+&wdog1 {
+   u-boot,dm-spl;
+};
diff 

Pull request: u-boot-imx u-boot-imx-20230203

2023-02-03 Thread Stefano Babic

Hi Tom,

there are a few missing patches in last PR - please pull from 
u-boot-imx, thanks !


The following changes since commit 9918b25d21db243352fc482671cafa10260b7887:

  Merge commit 'refs/pipelines/15015' of 
https://source.denx.de/u-boot/custodians/u-boot-tegra (2023-02-02 
12:44:12 -0500)


are available in the Git repository at:

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


for you to fetch changes up to 01f372d8d62b885f4a20a45535c545e98aafa687:

  udoo_neo: Select DM_SERIAL and drop iomux board level init 
(2023-02-03 13:10:01 +0100)



For 2023.04
---

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

- Boards:
- UDoo
- MX53 Menlo


Marek Vasut (1):
  ARM: imx: mx5: Convert MX53 Menlo board to DM SERIAL

Peter Robinson (2):
  udoo_neo: Move to DM for REGULATOR/PMIC/I2C drivers
  udoo_neo: Select DM_SERIAL and drop iomux board level init

 board/udoo/neo/neo.c   | 165 
---

 configs/m53menlo_defconfig |   1 +
 configs/udoo_neo_defconfig |  12 +--
 include/configs/udoo_neo.h |   6 --
 4 files changed, 19 insertions(+), 165 deletions(-)

Best regards,
Stefano

--
=
DENX Software Engineering GmbH,Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=


Re: [U-Boot] Acccessing IRAM in MX53

2012-06-11 Thread Stefano Babic
On 11/06/2012 11:09, Teemu Keskinarkaus wrote:
> Hi,
> 

Hi,

> I need to access IRAM from U-boot in MX53 based HW. This is part of the data 
> transfer between kernel and U-boot. I've already done the kernel part and now 
> I need to do the U-boot part.
> 
> I tried this:
> 
> #define IRAM_ADDRESS IRAM_BASE_ADDR + IRAM_SIZE - SZ_4K
> 
> unsigned long *iram = (unsigned long*)IRAM_ADDRESS;
> unsigned long data;
> 
> data = *iram;
> 
> But with that code the U-boot just gets stuck when trying to access the IRAM. 
> I looked and it seems that IRAM is added to MMU definitions and virtual 
> address is the same as physical.

In u-boot, the MMU is not turned on. This was done by design to make
things simpler. I do not know what you are talking about.

> 
> So questions is. How should I access the IRAM if the method I'm using is not 
> correct or what's wrong in my method?

MX53LOCO U-Boot > md 0xF800
f800: 5f04dbd6 e0a62773 fa92b272 e85f7213..._s'..rr_.
f810: 946065a3 fbe525ce 0cedf27e d2f2e4df.e`..%..~...
f820: e7d76787 e8e97cfe 49927a97 d2b1a033.g...|...z.I3...
f830: e84ac878 ec76c015 4fde5c14 338d88c8x.J...v..\.O...3
f840: f797b909 fabf35ba 9dee0101 61b6c523.5..#..a
f850: 3a9057e3 dbea4c77 8347b4bd bcbce01a.W.:wLG.

iram is read flawlessy.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [u-boot-imx] Pull request for u-boot-imx tree

2012-06-11 Thread Stefano Babic
On 11/06/2012 16:31, Otavio Salvador wrote:
> Hello Stefano,
> 

Hello Otavio,

> I have prepared a branch with the patches I got acked on the mailing
> list while you were in VAC.
> 
> The following changes since commit baff308162c3980e7616b624e19889a4d757aae8:
> 
>   i.MX28: Avoid redefining serial_put[cs]() (2012-05-09 12:49:14 +0200)
> 
> are available in the git repository at:
> 
>   git://github.com/otavio/u-boot.git
> <http://github.com/otavio/u-boot.git> pending
> 
> for you to fetch changes up to e54fdc58c639a94e2c4805612a4d69613eaa9586:
> 

Thanks - I am starting to work all i.MX patches I received in the time I
was in vacation. It can take a while until I will come at the end of the
list ;-)

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/9] NET: fec_mxc.c: Add support for MII for MX5 SOCs

2012-06-12 Thread Stefano Babic
On 15/05/2012 14:39, Dirk Behme wrote:
> On 22.02.2012 11:24, Stefano Babic wrote:
>> Signed-off-by: Stefano Babic 
>> CC: Fabio Estevam 
>> ---

Hi Dirk,

>>  drivers/net/fec_mxc.c |5 +
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
>> index 1fdd071..201e5d2 100644
>> --- a/drivers/net/fec_mxc.c
>> +++ b/drivers/net/fec_mxc.c
>> @@ -419,8 +419,13 @@ static int fec_open(struct eth_device *edev)
>>  while (readw(&fec->eth->miigsk_enr) & MIIGSK_ENR_READY)
>>  udelay(2);
>>  
>> +#if !defined(CONFIG_MII)
>>  /* configure gasket for RMII, 50 MHz, no loopback, and no echo */
>>  writew(MIIGSK_CFGR_IF_MODE_RMII, &fec->eth->miigsk_cfgr);
>> +#else
>> +/* configure gasket for MII, no loopback, and no echo */
>> +writew(MIIGSK_CFGR_IF_MODE_MII, &fec->eth->miigsk_cfgr);
>> +#endif
>>  
>>  /* re-enable the gasket */
>>  writew(MIIGSK_ENR_EN, &fec->eth->miigsk_enr);
> 
> I have this patch on my list of pending patches.
> 
> What's the status of this?

This patch must be reworked. See also the discussion about Timo's patch
on http://patchwork.ozlabs.org/patch/153695/

There is some confusion about how to set the interface type. At the
beginning, CONFIG_MII or CONFIG_RMII was used, but after the
introduction of the MX28, CONFIG_FEC_XCV_TYPE is used. This should be
unified, and I tend to use CONFIG_FEC_XCV_TYPE for all i.MX

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] i.mx: i.mx6x: NO_MUX_I/NO_PAD_I not set correctly

2012-06-12 Thread Stefano Babic
On 11/04/2012 13:18, Jason Liu wrote:
> If one PAD does not have mux or pad config register, we need
> set the NO_MUX_I/NO_PAD_I to 0, the old value is not correct
> 
> Signed-off-by: Jason Liu 
> CC: Stefano Babic 
> ---
>  arch/arm/include/asm/arch-mx6/mx6x_pins.h |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/include/asm/arch-mx6/mx6x_pins.h 
> b/arch/arm/include/asm/arch-mx6/mx6x_pins.h
> index afaa068..9979651 100644
> --- a/arch/arm/include/asm/arch-mx6/mx6x_pins.h
> +++ b/arch/arm/include/asm/arch-mx6/mx6x_pins.h
> @@ -48,8 +48,8 @@
>  #define PAD_CTL_SRE_FAST (1 << 0)
>  #define PAD_CTL_SRE_SLOW (0 << 0)
>  
> -#define NO_MUX_I 0x3FF
> -#define NO_PAD_I 0x7FF
> +#define NO_MUX_I0
> +#define NO_PAD_I0
>  
>  enum {
>   MX6Q_PAD_SD2_DAT1__USDHC2_DAT1  = IOMUX_PAD(0x0360, 0x004C, 0, 
> 0x, 0, 0),

Applied to u-boot-imx, thanks. Sorry that it was not applied before ;-)

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] i.MX: fsl_esdhc: allow use with cache enabled.

2012-06-12 Thread Stefano Babic
On 15/05/2012 14:58, Dirk Behme wrote:
> On 09.05.2012 07:45, Stefano Babic wrote:
>> On 09/05/2012 01:31, Eric Nelson wrote:
>>> Thanks Andy,
>>>
>>> On 05/08/2012 03:59 PM, Andy Fleming wrote:
>>>>> --- a/drivers/mmc/fsl_esdhc.c
>>>>> +++ b/drivers/mmc/fsl_esdhc.c
>>>>> @@ -190,6 +190,10 @@ static int esdhc_setup_data(struct mmc *mmc,
>>>>> struct mmc_data *data)
>>>>> esdhc_clrsetbits32(®s->wml, WML_RD_WML_MASK,
>>>>> wml_value);
>>>>> esdhc_write32(®s->dsaddr, (u32)data->dest);
>>>>> } else {
>>>>> +   flush_dcache_range((ulong)data->src,
>>>>> +  (ulong)data->src+data->blocks
>>>>> +*data->blocksize);
>>>>> +
>>>>
>>>> This still won't work. I don't believe this is implemented at all on
>>>> the FSL PowerPC parts that use this controller.
>>>>
>>>> At the very least, it needs to be protected by an ifdef.
>>>>
>>> It seems more generally useful to implement a PowerPC cache layer
>>> than to instrument each driver that supports cache.
>>
>> Some PowerPC (MPC86xx,  arch/powerpc/cpu/mpc86xx/cache.S) have this
>> layer, some other not. This driver is used by MPC85xx and
>> flush_dcache_range is not implemented. The reason is that this SOC  uses
>> its internal snooping mechanism and does not need to explicitely flush
>> the buffers in the drivers.
>>
>> The problem with an #ifdef is that it is not very generic - we should
>> add some #if (defined(CONFIG_MX51) || defined(CONFIG_MX53) || ...
>> and update the driver for each new SOCs. I think also that maybe the
>> best way is to add an empty flush_dcache_range() to the MPC85xx, maybe
>> as weak function.
> 
> You might have noticed that I'm looking through my list of open patches.
> So: Any news regarding V3 of this patch? ;)

This is my turn to look back if there are some news. Has anyone taken a
look at it ?

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] mx53loco: Fix revision of Dialog boards

2012-06-12 Thread Stefano Babic
On 29/05/2012 17:54, Fabio Estevam wrote:
> Original code was assuming that the fuse revision version for all mx53loco 
> boards
> based on Dialog PMIC was the same, which is not the case.
> 
> Force the revision of all Dialog-based boards to 0.
> 
> This fixes a kernel crash when PMIC is accessed in the 2.6.35 kernel
> for Dialog rev E boards.
> 
> Signed-off-by: Fabio Estevam 
> ---
> Changes since v1:
> - Fix the PMIC detection. Let I2C probe to work earlier in board_init
> instead of board_late_init().
> 
>  board/freescale/mx53loco/mx53loco.c |   19 +++
>  include/configs/mx53loco.h  |1 -
>  2 files changed, 7 insertions(+), 13 deletions(-)
> 

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx53: Fix mask for SATA reference clock

2012-06-12 Thread Stefano Babic
On 29/05/2012 23:40, Fabio Estevam wrote:
> On Fri, May 11, 2012 at 9:39 PM, Fabio Estevam  wrote:
>> From: Fabio Estevam 
>>
>> SATA_ALT_REF_CLK field corresponds to bits 1 and 2 of offset 0x180c.
> 
> Just in case someone would like to check the mx53 fuse map, it is now
> available at:
> http://cache.freescale.com/files/dsp/doc/ref_manual/IMX53RMAD.pdf?fpsp=1&WT_TYPE=Reference%20Manuals&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
> 

Thanks, Fabio !

Regards,
Stefano


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx53: Fix mask for SATA reference clock

2012-06-12 Thread Stefano Babic
On 12/05/2012 02:39, Fabio Estevam wrote:
> From: Fabio Estevam 
> 
> SATA_ALT_REF_CLK field corresponds to bits 1 and 2 of offset 0x180c.
> 
> Fix the mask for these bits.
> 
> Signed-off-by: Fabio Estevam 
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/10] mx53loco: Remove unused SOBJS

2012-06-12 Thread Stefano Babic
On 29/05/2012 19:39, Fabio Estevam wrote:
> There is no .S file in this directory, so just remove SOBJS.
> 
> Cc: Jason Liu 
> Signed-off-by: Fabio Estevam 
> ---


Applied the whole series to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] tx25: Use generic gpio_* calls

2012-06-13 Thread Stefano Babic
On 12/06/2012 18:37, Vikram Narayanan wrote:
> Changes from v1:
> Used appropriate gpio_* lib calls.
> 
> ---
> Instead of manipulating gpio registers directly, use the calls
> from the gpio library.

Changelog must go after the "---" line and commit message before. They
are swapped. Apart of that..

> 
> Signed-off-by: Vikram Narayanan 
> Cc: Fabio Estevam 
> Cc: John Rigby 
> Cc: Stefano Babic 
> ---
>  board/karo/tx25/tx25.c |   25 +
>  1 files changed, 9 insertions(+), 16 deletions(-)
> 
> diff --git a/board/karo/tx25/tx25.c b/board/karo/tx25/tx25.c
> index 2a29943..ff2de38 100644
> --- a/board/karo/tx25/tx25.c
> +++ b/board/karo/tx25/tx25.c
> @@ -34,14 +34,13 @@
>  DECLARE_GLOBAL_DATA_PTR;
>  
>  #ifdef CONFIG_FEC_MXC
> +#define GPIO_FEC_RESET_B MXC_GPIO_PORT_TO_NUM(4, 7)
> +#define GPIO_FEC_ENABLE_BMXC_GPIO_PORT_TO_NUM(4, 9)
>  void tx25_fec_init(void)
>  {
>   struct iomuxc_mux_ctl *muxctl;
>   struct iomuxc_pad_ctl *padctl;
> - u32 val;
>   u32 gpio_mux_mode = MX25_PIN_MUX_MODE(5);
> - struct gpio_regs *gpio4 = (struct gpio_regs *)IMX_GPIO4_BASE;
> - struct gpio_regs *gpio3 = (struct gpio_regs *)IMX_GPIO3_BASE;
>   u32 saved_rdata0_mode, saved_rdata1_mode, saved_rx_dv_mode;
>  
>   debug("tx25_fec_init\n");
> @@ -66,18 +65,15 @@ void tx25_fec_init(void)
>   writel(0x0, &padctl->pad_d11);
>  
>   /* drop PHY power and assert reset (low) */
> - val = readl(&gpio4->gpio_dr) & ~((1 << 7) | (1 << 9));
> - writel(val, &gpio4->gpio_dr);
> - val = readl(&gpio4->gpio_dir) | (1 << 7) | (1 << 9);
> - writel(val, &gpio4->gpio_dir);
> + gpio_direction_output(GPIO_FEC_RESET_B, 0);
> + gpio_direction_output(GPIO_FEC_ENABLE_B, 0);
>  
>   mdelay(5);
>  
>   debug("resetting phy\n");
>  
>   /* turn on PHY power leaving reset asserted */
> - val = readl(&gpio4->gpio_dr) | 1 << 9;
> - writel(val, &gpio4->gpio_dr);
> + gpio_direction_output(GPIO_FEC_ENABLE_B, 1);
>  
>   mdelay(10);
>  
> @@ -107,19 +103,16 @@ void tx25_fec_init(void)
>   /*
>* set each to 1 and make each an output
>*/
> - val = readl(&gpio3->gpio_dr) | (1 << 10) | (1 << 11) | (1 << 12);
> - writel(val, &gpio3->gpio_dr);
> - val = readl(&gpio3->gpio_dir) | (1 << 10) | (1 << 11) | (1 << 12);
> - writel(val, &gpio3->gpio_dir);
> + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 10), 1);
> + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 11), 1);
> + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 12), 1);
>  
>   mdelay(22); /* this value came from RedBoot */
>  
>   /*
>* deassert PHY reset
>*/
> - val = readl(&gpio4->gpio_dr) | 1 << 7;
> - writel(val, &gpio4->gpio_dr);
> - writel(val, &gpio4->gpio_dr);
> + gpio_set_value(GPIO_FEC_RESET_B, 1);
>  
>   mdelay(5);
>  

Acked-by: Stefano Babic 

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/8] m28evk: use same notation to alloc the 128kB stack

2012-06-13 Thread Stefano Babic
On 13/05/2012 01:40, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador 
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/8] MX28: Fix a typo in mx28_reg_8 macro

2012-06-13 Thread Stefano Babic
On 11/05/2012 17:37, Otavio Salvador wrote:
> The macro mistakenly referred to 32bit struct instead of 8bit one.
> 
> Signed-off-by: Otavio Salvador 
> Cc: Fabio Estevam 
> Cc: Marek Vasut 
> ---


Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/8] mx28evk: ensure command definition is in alphabetic order

2012-06-13 Thread Stefano Babic
On 13/05/2012 01:40, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador 
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] m28evk: drop duplicated definition of CONFIG_OF_LIBFDT

2012-06-13 Thread Stefano Babic
On 15/05/2012 22:59, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador 
> Cc: Marek Vasut 
> Cc: Stefano Babic 
> Cc: Wolfgang Denk 
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/8] m28evk: fix board config include guardian macro name

2012-06-13 Thread Stefano Babic
On 13/05/2012 01:40, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador 
> ---
>  include/configs/m28evk.h |6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
> index ebf7e39..c1ae996 100644

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/8] mx28evk: fix board config include guardian macro name

2012-06-13 Thread Stefano Babic
On 13/05/2012 01:40, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador 
> ---


Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic
-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] mx53loco build fails with CONFIG_VIDEO disabled

2012-06-13 Thread Stefano Babic
On 13/06/2012 19:00, Vikram Narayanan wrote:
> Hello,
> 
> mx53loco build fails when CONFIG_VIDEO and its friends disabled.
> I can send a patch fixing this.
> 

But CONFIG_VIDEO is *not* set in mx53loco.h mainline. Do you mean you
are testing Fabio's patches ?

Fabio, can you give me an overview about your IPU patches ? I have seen
several patches during my vacation, but it is not clear to me the
status. In patchwork, most of them (but not all) are assigned to
Anatolji. Can you help me to sync myself with the current status ?

> I _really_ don't like ifdef -ing a lot of stuff.

Nobody likes it ;-)

> Instead I'd feel to
> have a separate file in the directory which does this LCD init and FB
> init call, and let the makefile handle the conditional compilation.

A way we use in the past to have different compilation of the same board
with different features is to use a separate entry into boards.cfg, for
example see imx31_phycore, or also magnesium and imx27lite, or...

Anyway, when patches for IPU flow into mainline, is there a good reason
to not enable CONFIG_VIDEO for mx53loco ?

Best regards,
Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/4] OMAP3: twister: add video support

2012-06-14 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 board/technexion/twister/twister.c |   49 
 include/configs/twister.h  |   10 
 2 files changed, 59 insertions(+)

diff --git a/board/technexion/twister/twister.c 
b/board/technexion/twister/twister.c
index b927586..c1281b9 100644
--- a/board/technexion/twister/twister.c
+++ b/board/technexion/twister/twister.c
@@ -25,12 +25,15 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #ifdef CONFIG_USB_EHCI
@@ -39,8 +42,23 @@
 #endif
 #include "twister.h"
 
+#define XRES   480
+#define YRES   272
+
 DECLARE_GLOBAL_DATA_PTR;
 
+static GraphicDevice panel;
+static const struct panel_config lcd_cfg = {
+   .timing_h   = 0x01101d1b, /* Horizontal timing */
+   .timing_v   = 0x01400b02, /* Vertical timing */
+   .pol_freq   = 0x00023000, /* Pol Freq */
+   .divisor= 0x0001000d, /* 33Mhz Pixel Clock */
+   .lcd_size   = ((YRES - 1) << 16 | (XRES - 1)),
+   .panel_type = 0x01, /* TFT */
+   .data_lines = 0x03, /* 24 Bit RGB */
+   .load_mode  = 0x02 /* Frame Mode */
+};
+
 /* Timing definitions for Ethernet Controller */
 static const u32 gpmc_smc911[] = {
NET_GPMC_CONFIG1,
@@ -135,6 +153,37 @@ int board_mmc_init(bd_t *bis)
 {
return omap_mmc_init(0);
 }
+
+void *video_hw_init(void)
+{
+
+   void *fb;
+   u32 size;
+
+   size = XRES * YRES * lcd_cfg.data_lines;
+   fb = malloc(size);
+   if (!fb) {
+   printf("Frame buffer not allocated\n");
+   return NULL;
+   }
+
+   panel.winSizeX = XRES;
+   panel.winSizeY = YRES;
+   panel.plnSizeX = XRES;
+   panel.plnSizeY = YRES;
+
+   panel.frameAdrs = (u32)fb;
+   panel.memSize = size;
+
+   panel.gdfBytesPP = 2;
+   panel.gdfIndex = GDF_16BIT_565RGB;
+
+   omap3_dss_panel_config(&lcd_cfg);
+   omap3_dss_enable();
+   omap3_dss_setfb(fb);
+
+   return (void *)&panel;
+}
 #endif
 
 #ifdef CONFIG_SPL_OS_BOOT
diff --git a/include/configs/twister.h b/include/configs/twister.h
index a852481..fb96f30 100644
--- a/include/configs/twister.h
+++ b/include/configs/twister.h
@@ -48,6 +48,16 @@
 #define CONFIG_SMC911X_BASE0x2C00
 #define CONFIG_SMC911X_NO_EEPROM
 
+#define CONFIG_VIDEO
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_SPLASH_SCREEN
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_VIDEO_BMP_RLE8
+#define CONFIG_CMD_BMP
+#define CONFIG_VIDEO_OMAP3 /* DSS Support  */
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+
 #defineCONFIG_EXTRA_ENV_SETTINGS   CONFIG_TAM3517_SETTINGS \
"bootcmd=run nandboot\0"
 
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/4] video: omap3_dss: add setup for LCD

2012-06-14 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 arch/arm/include/asm/arch-omap3/dss.h |   23 ---
 drivers/video/omap3_dss.c |   40 -
 2 files changed, 59 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/arch-omap3/dss.h 
b/arch/arm/include/asm/arch-omap3/dss.h
index 4c56e5e..911cc9a 100644
--- a/arch/arm/include/asm/arch-omap3/dss.h
+++ b/arch/arm/include/asm/arch-omap3/dss.h
@@ -60,6 +60,17 @@ struct dispc_regs {
u32 global_alpha;   /* 0x74 */
u32 size_dig;   /* 0x78 */
u32 size_lcd;   /* 0x7C */
+   u32 gfx_base[2];
+   u32 gfx_position;   /* 0x88 */
+   u32 gfx_size;   /* 0x8C */
+   u32 reserved_3[4];  /* 0x90 */
+   u32 gfx_attributes; /* 0xA0 */
+   u32 gfx_fifo_threshold; /* 0xA4 */
+   u32 gfx_fifo_size_status;   /* 0xA8 */
+   u32 gfx_row_inc;/* 0xAC */
+   u32 gfx_pixel_inc;  /* 0xB0 */
+   u32 gfx_window_skip;/* 0xB4 */
+   u32 gfx_table_ba;   /* 0xB8 */
 };
 
 /* VENC Registers */
@@ -120,6 +131,7 @@ struct venc_regs {
 
 /* Few Register Offsets */
 #define FRAME_MODE_SHIFT   1
+#define FUNC_GATED_SHIFT   9
 #define TFTSTN_SHIFT   3
 #define DATALINES_SHIFT8
 
@@ -132,13 +144,16 @@ struct venc_regs {
 #define GP_OUT1(1 << 16)
 
 #define DISPC_ENABLE   (LCD_ENABLE | \
-DIG_ENABLE | \
 GO_LCD | \
-GO_DIG | \
 GP_OUT0| \
 GP_OUT1)
 
-/* Configure VENC DSS Params */
+#define DISPC_PCK_FREE_ENABLE  (1 << 27)
+
+/* Register DSS_CONTROL */
+#define DISPC_CLK_SWITCH   (1 << 0)
+#define DSI_CLK_SWITCH (1 << 1)
+#define VENC_CLOCK_MODE(1 << 2)
 #define VENC_CLK_ENABLE(1 << 3)
 #define DAC_DEMEN  (1 << 4)
 #define DAC_POWERDN(1 << 5)
@@ -148,6 +163,7 @@ struct venc_regs {
 DAC_DEMEN | \
 DAC_POWERDN | \
 VENC_OUT_SEL)
+
 /*
  * Panel Configuration
  */
@@ -170,5 +186,6 @@ void omap3_dss_venc_config(const struct venc_regs *venc_cfg,
u32 height, u32 width);
 void omap3_dss_panel_config(const struct panel_config *panel_cfg);
 void omap3_dss_enable(void);
+void omap3_dss_setfb(void *addr);
 
 #endif /* DSS_H */
diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c
index b322cc3..6e5849a 100644
--- a/drivers/video/omap3_dss.c
+++ b/drivers/video/omap3_dss.c
@@ -28,6 +28,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 /*
  * Configure VENC for a given Mode (NTSC / PAL)
@@ -105,16 +107,43 @@ void omap3_dss_venc_config(const struct venc_regs 
*venc_cfg,
 void omap3_dss_panel_config(const struct panel_config *panel_cfg)
 {
struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE;
+   struct dss_regs *dss = (struct dss_regs *) OMAP3_DSS_BASE;
 
writel(panel_cfg->timing_h, &dispc->timing_h);
writel(panel_cfg->timing_v, &dispc->timing_v);
writel(panel_cfg->pol_freq, &dispc->pol_freq);
writel(panel_cfg->divisor, &dispc->divisor);
writel(panel_cfg->lcd_size, &dispc->size_lcd);
-   writel((panel_cfg->load_mode << FRAME_MODE_SHIFT), &dispc->config);
+   writel((panel_cfg->load_mode << FRAME_MODE_SHIFT) |
+   (1 << FUNC_GATED_SHIFT),
+   &dispc->config);
writel(((panel_cfg->panel_type << TFTSTN_SHIFT) |
(panel_cfg->data_lines << DATALINES_SHIFT)), &dispc->control);
writel(panel_cfg->panel_color, &dispc->default_color0);
+
+   writel(panel_cfg->lcd_size, &dispc->gfx_size);
+   writel(0x91, &dispc->gfx_attributes);
+   writel(0x01, &dispc->gfx_row_inc);
+   writel(0x01, &dispc->gfx_pixel_inc);
+   writel(0x00, &dispc->gfx_window_skip);
+
+   writel(VENC_CLK_ENABLE | DAC_DEMEN,
+   &dss->control);
+
+}
+
+void omap3_dss_clock_enable(int enable)
+{
+   struct prcm *prcm_base = (struct prcm *)PRCM_BA

[U-Boot] [PATCH 2/4] OMAP3: added clock definitions for OMAP3 DSS driver

2012-06-14 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 arch/arm/include/asm/arch-omap3/clocks.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-omap3/clocks.h 
b/arch/arm/include/asm/arch-omap3/clocks.h
index bed0002..ab7b703 100644
--- a/arch/arm/include/asm/arch-omap3/clocks.h
+++ b/arch/arm/include/asm/arch-omap3/clocks.h
@@ -36,7 +36,7 @@
 #define ICK_CORE2_ON   0x001f
 #define FCK_WKUP_ON0x00e9
 #define ICK_WKUP_ON0x003f
-#define FCK_DSS_ON 0x0005
+#define FCK_DSS_ON 0x0007
 #define ICK_DSS_ON 0x0001
 #define FCK_CAM_ON 0x0001
 #define ICK_CAM_ON 0x0001
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/4] OMAP3: mt_ventoux: add video/ splashscreen support

2012-06-14 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 board/teejet/mt_ventoux/mt_ventoux.c |   63 ++
 board/teejet/mt_ventoux/mt_ventoux.h |2 +-
 include/configs/mt_ventoux.h |   17 +
 3 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/board/teejet/mt_ventoux/mt_ventoux.c 
b/board/teejet/mt_ventoux/mt_ventoux.c
index c5eb42c..ecf91f7 100644
--- a/board/teejet/mt_ventoux/mt_ventoux.c
+++ b/board/teejet/mt_ventoux/mt_ventoux.c
@@ -21,13 +21,16 @@
 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -50,6 +53,28 @@ DECLARE_GLOBAL_DATA_PTR;
 #define FPGA_INIT  119
 #define FPGA_DONE  154
 
+#define LCD_PWR138
+#define LCD_PON_PIN139
+#define XRES   480
+#define YRES   272
+
+static const struct panel_config lcd_cfg = {
+
+   .timing_h   =  ((4 /* hpb */ - 1) << 20) |
+   ((8 /*hfp */- 1) << 8) |
+   (41 /* hsw */ - 1), /* Horizontal timing */
+   .timing_v   = (2 /*vbp */ << 24) |
+   (4 /* vfp */ << 8) |
+   (10 - 1), /* Vertical timing */
+   .pol_freq   = 0x, /* Pol Freq */
+   .divisor= 0x0001000d, /* 33Mhz Pixel Clock */
+   .lcd_size   = ((YRES - 1) << 16 | (XRES - 1)),
+   .panel_type = 0x01, /* TFT */
+   .data_lines = 0x03, /* 24 Bit RGB */
+   .load_mode  = 0x02, /* Frame Mode */
+   .panel_color= 0,
+};
+
 /* Timing definitions for FPGA */
 static const u32 gpmc_fpga[] = {
FPGA_GPMC_CONFIG1,
@@ -231,3 +256,41 @@ int board_mmc_init(bd_t *bis)
return omap_mmc_init(0);
 }
 #endif
+
+#if defined(CONFIG_VIDEO) && !defined(CONFIG_SPL_BUILD)
+static GraphicDevice panel;
+
+void *video_hw_init(void)
+{
+
+   void *fb;
+   u32 size;
+
+   panel.gdfBytesPP = 4;
+   panel.gdfIndex = GDF_32BIT_X888RGB;
+   size = XRES * YRES * panel.gdfBytesPP * 2 + 1024;
+
+   fb = (void *)0x8050;
+
+   printf("Frame buffer address 0x%p\n", fb);
+
+   gpio_request(LCD_PWR, "LCD Power");
+   gpio_request(LCD_PON_PIN, "LCD Pon");
+   gpio_direction_output(LCD_PWR, 0);
+   gpio_direction_output(LCD_PON_PIN, 1);
+
+   panel.winSizeX = XRES;
+   panel.winSizeY = YRES;
+   panel.plnSizeX = XRES;
+   panel.plnSizeY = YRES;
+
+   panel.frameAdrs = (u32)fb;
+   panel.memSize = size;
+
+   omap3_dss_panel_config(&lcd_cfg);
+   omap3_dss_setfb(fb);
+   omap3_dss_enable();
+
+   return (void *)&panel;
+}
+#endif
diff --git a/board/teejet/mt_ventoux/mt_ventoux.h 
b/board/teejet/mt_ventoux/mt_ventoux.h
index 9b2e43e..90331f4 100644
--- a/board/teejet/mt_ventoux/mt_ventoux.h
+++ b/board/teejet/mt_ventoux/mt_ventoux.h
@@ -221,7 +221,7 @@ const omap3_sysinfo sysinfo = {
MUX_VAL(CP(MMC2_DAT5),  (IDIS  | PTU | EN  | M4)) \
MUX_VAL(CP(MMC2_DAT6),  (IDIS  | PTU | EN  | M4)) \
/* GPIO_138: LCD_ENVD */\
-   MUX_VAL(CP(MMC2_DAT7),  (IDIS  | PTU | EN  | M4)) \
+   MUX_VAL(CP(MMC2_DAT7),  (IDIS  | PTD | EN  | M4)) \
/* GPIO_139: LCD_PON */\
/* McBSP */\
MUX_VAL(CP(MCBSP_CLKS), (IEN  | PTU | DIS | M0)) \
diff --git a/include/configs/mt_ventoux.h b/include/configs/mt_ventoux.h
index 5db6d57..8ea0dc2 100644
--- a/include/configs/mt_ventoux.h
+++ b/include/configs/mt_ventoux.h
@@ -2,6 +2,9 @@
  * Copyright (C) 2011
  * Stefano Babic, DENX Software Engineering, sba...@denx.de.
  *
+ *
+ * Configuration settings for the Teejet mt_ventoux board.
+ *
  * Copyright (C) 2009 TechNexion Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -24,6 +27,10 @@
 
 #include "tam3517-common.h"
 
+#undef CONFIG_SYS_MALLOC_LEN
+#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + (128 << 10) + \
+   6 * 1024 * 1024)
+
 #define MACH_TYPE_AM3517_MT_VENTOUX3832
 #define CONFIG_MACH_TYPE   MACH_TYPE_AM3517_MT_VENTOUX
 
@@ -62,6 +69,16 @@
 #define CONFIG_FPGA_DELAY() udelay(1)
 #define CONFIG_SYS_FPGA_PROG_FEEDBACK
 
+#define CONFIG_VIDEO
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_SPLASH_SCREEN
+/* #define CONFIG_VIDEO_LOGO */
+#define CONFIG_VIDEO_BMP_RLE8
+#define CONFIG_CMD_BMP
+#define CONFIG_VIDEO_OMAP3 /* DSS Support  */
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+
 #defineCONFIG_EXTRA_ENV_SETTINGS   CONFIG_TAM3517_SETTINGS \
"bootcmd=run net_nfs\0"
 
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/4] OMAP3: mcx: set pinmux for uart4

2012-06-14 Thread Stefano Babic
Signed-off-by: Stefano Babic 
CC: Tom Rini 
---
 board/htkw/mcx/mcx.h |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/board/htkw/mcx/mcx.h b/board/htkw/mcx/mcx.h
index d675a48..867cc9e 100644
--- a/board/htkw/mcx/mcx.h
+++ b/board/htkw/mcx/mcx.h
@@ -284,9 +284,14 @@ const omap3_sysinfo sysinfo = {
/* HSUSB2_dat3 */\
/* CCDC */\
MUX_VAL(CP(CCDC_PCLK),  (IEN  | PTD | EN  | M4)) \
-   MUX_VAL(CP(CCDC_FIELD), (IEN  | PTD | EN  | M4)) \
-   MUX_VAL(CP(CCDC_HD),(IEN  | PTD | EN  | M4)) \
-   MUX_VAL(CP(CCDC_VD),(IEN  | PTD | EN  | M4)) \
+   /* CCDC_FIELD: gpio_95, uP-TXD4 */ \
+   MUX_VAL(CP(CCDC_FIELD), (IDIS | PTD | DIS | M2)) \
+   /* CCDC_HD: gpio_96, uP-RTS4# */ \
+   MUX_VAL(CP(CCDC_HD),(IDIS | PTD | DIS | M2)) \
+   /* CCDC_VD: gpio_97, uP-CTS4# */ \
+   MUX_VAL(CP(CCDC_VD),(IEN  | PTD | EN  | M2)) \
+   /* CCDC_WEN: gpio_98, uP-RXD4 */ \
+   MUX_VAL(CP(CCDC_WEN),   (IEN  | PTD | DIS | M2)) \
MUX_VAL(CP(CCDC_WEN),   (IEN  | PTD | EN  | M4)) \
MUX_VAL(CP(CCDC_DATA0), (IEN  | PTD | EN  | M4)) \
MUX_VAL(CP(CCDC_DATA1), (IEN  | PTD | EN  | M4)) \
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/4] mcx: increased buffer for command line

2012-06-14 Thread Stefano Babic
Signed-off-by: Stefano Babic 
CC: Tom Rini 
---
 include/configs/mcx.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 1315c3c..6159268 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -230,7 +230,7 @@
 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
 #define CONFIG_SYS_PROMPT  V_PROMPT
-#define CONFIG_SYS_CBSIZE  512 /* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE  1024/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE  (CONFIG_SYS_CBSIZE + \
sizeof(CONFIG_SYS_PROMPT) + 16)
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/4] OMAP3: mcx: read hot-water-button after reset

2012-06-14 Thread Stefano Babic
Detect hot-water-button to start a differnt image.

Signed-off-by: Stefano Babic 
CC: Tom Rini 
---
 board/htkw/mcx/mcx.c  |   23 +++
 include/configs/mcx.h |2 ++
 2 files changed, 25 insertions(+)

diff --git a/board/htkw/mcx/mcx.c b/board/htkw/mcx/mcx.c
index e593b43..f7d92e8 100644
--- a/board/htkw/mcx/mcx.c
+++ b/board/htkw/mcx/mcx.c
@@ -37,6 +37,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#define HOT_WATER_BUTTON   38
+
 #ifdef CONFIG_USB_EHCI
 static struct omap_usbhs_board_data usbhs_bdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
@@ -79,6 +81,27 @@ int misc_init_r(void)
return 0;
 }
 
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+   if (gpio_request(HOT_WATER_BUTTON, "hot-water-button") < 0) {
+   puts("Failed to get hot-water-button pin\n");
+   return -ENODEV;
+   }
+   gpio_direction_input(HOT_WATER_BUTTON);
+
+   /*
+* if hot-water-button is pressed
+* change bootcmd
+*/
+   if (gpio_get_value(HOT_WATER_BUTTON))
+   return 0;
+
+   setenv("bootcmd", "run swupdate");
+   return 0;
+}
+#endif
+
 /*
  * Routine: set_muxconf_regs
  * Description: Setting up the configuration Mux registers specific to the
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index d9bd089..02e009d 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -30,6 +30,7 @@
 
 #define MACH_TYPE_MCX  3656
 #define CONFIG_MACH_TYPE   MACH_TYPE_MCX
+#define CONFIG_BOARD_LATE_INIT
 
 #define CONFIG_SYS_CACHELINE_SIZE  64
 
@@ -140,6 +141,7 @@
 #define CONFIG_MTD_PARTITIONS
 #define CONFIG_MTD_DEVICE
 #define CONFIG_CMD_MTDPARTS
+#define CONFIG_CMD_GPIO
 
 #undef CONFIG_CMD_FLASH/* flinfo, erase, protect   */
 #undef CONFIG_CMD_FPGA /* FPGA configuration Support   */
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/4] OMAP3: mcx: updated default environment

2012-06-14 Thread Stefano Babic
Patch drops also not used CFI setup in the
configuration file.

Signed-off-by: Stefano Babic 
CC: Tom Rini 
---
 include/configs/mcx.h |  128 +++--
 1 file changed, 91 insertions(+), 37 deletions(-)

diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 6159268..d9bd089 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -185,38 +185,95 @@
 
 #define CONFIG_BOOTFILE"uImage"
 
+#define xstr(s)str(s)
+#define str(s) #s
+
+/* Setup MTD for NAND on the SOM */
+#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
+#define MTDPARTS_DEFAULT   "mtdparts=omap2-nand.0:512k(MLO),"  \
+   "1m(u-boot),256k(env1),"\
+   "256k(env2),6m(kernel),6m(k_recovery)," \
+   "8m(fs_recovery),-(common_data)"
+
+#define CONFIG_HOSTNAME mcx
 #define CONFIG_EXTRA_ENV_SETTINGS \
-   "loadaddr=0x8200\0" \
-   "console=ttyO2,115200n8\0" \
-   "mmcargs=setenv bootargs console=${console} " \
-   "root=/dev/mmcblk0p2 rw " \
-   "rootfstype=ext3 rootwait\0" \
-   "nandargs=setenv bootargs console=${console} " \
-   "root=/dev/mtdblock4 rw " \
-   "rootfstype=jffs2\0" \
-   "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
-   "bootscript=echo Running bootscript from mmc ...; " \
-   "source ${loadaddr}\0" \
-   "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
-   "mmcboot=echo Booting from mmc ...; " \
-   "run mmcargs; " \
-   "bootm ${loadaddr}\0" \
-   "nandboot=echo Booting from nand ...; " \
-   "run nandargs; " \
-   "nand read ${loadaddr} 28 40; " \
-   "bootm ${loadaddr}\0" \
+   "adddbg=setenv bootargs ${bootargs} trace_buf_size=64M\0"   \
+   "adddebug=setenv bootargs ${bootargs} earlyprintk=serial\0" \
+   "addeth=setenv bootargs ${bootargs} ethaddr=${ethaddr}\0"   \
+   "addfb=setenv bootargs ${bootargs} vram=6M "\
+   "omapfb.vram=1:2M,2:2M,3:2M omapdss.def_disp=lcd\0" \
+   "addip_sta=setenv bootargs ${bootargs} "\
+   "ip=${ipaddr}:${serverip}:${gatewayip}:"\
+   "${netmask}:${hostname}:eth0:off\0" \
+   "addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0"   \
+   "addip=if test -n ${ipdyn};then run addip_dyn;" \
+   "else run addip_sta;fi\0"   \
+   "addmisc=setenv bootargs ${bootargs} ${misc}\0" \
+   "addtty=setenv bootargs ${bootargs} "   \
+   "console=${consoledev},${baudrate}\0"   \
+   "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"  \
+   "baudrate=115200\0" \
+   "consoledev=ttyO2\0"\
+   "hostname=" xstr(CONFIG_HOSTNAME) "\0"  \
+   "loadaddr=0x8200\0" \
+   "load=tftp ${loadaddr} ${u-boot}\0" \
+   "load_k=tftp ${loadaddr} ${bootfile}\0" \
+   "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
+   "loadmlo=tftp ${loadaddr} ${mlo}\0" \
+   "mlo=" xstr(CONFIG_HOSTNAME) "/MLO\0"   \
+   "mmcargs=root=/dev/mmcblk0p2 rw "   \
+   "rootfstype=ext3 rootwait\0"\
+   "mmcboot=echo Booting from mmc ...; "   \
+   "run mmcargs; " \
+   "run addip addtty addmtd addfb addeth addmisc;" \
+   "run loaduimage; "  \
+   "bootm ${loadaddr}\0"   \
+   "net_nfs=run load_k; "  \
+   "run nfsargs; " \
+   "run addip addtty addmtd addfb addeth addmisc;" \
+   "b

Re: [U-Boot] [PATCH] mx6: Avoid writing to read-only bits in imximage.cfg

2012-06-15 Thread Stefano Babic
On 12/06/2012 16:50, Vikram Narayanan wrote:
> If in case this is valid according to the latest datasheet, ignore this patch.
> 
> --
> According to REV C manual, the register IOMUXC_IOMUXC_GPR4 has
> bits 4 and 5 read-only and the value is always set as zero.
> So write '0' to these bits instead of writing '1'.
> 
> Signed-off-by: Vikram Narayanan 
> Cc: Jason Liu 
> Cc: Dirk Behme 
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] i.MX6 USDHC: Use the ESDHC clock

2012-06-15 Thread Stefano Babic
On 14/06/2012 15:44, Dirk Behme wrote:
> From: Michael Langer 
> 
> The commit "i.mx: fsl_esdhc: add the i.mx6q support" (4692708d) introduces
> support for the i.MX6Q MMC host controller USDHC.
> 
> MXC_IPG_PERCLK sets the clock to 66MHz. This seems to be the default clock
> of the ESDHC IP found in < i.MX6 silicon. However, the default clock for the 
> USDHC
> IP found in i.MX6 is 200MHz (MXC_ESDHC_CLK). This difference will cause a 3 
> times
> higher clock on SD_CLK than expected (see fsl_esdh.c -> set_sysctl()).
> 
> Signed-off-by: Michael Langer 
> CC: Stefano Babic 
> CC: Jason Liu 
> ---
>  arch/arm/cpu/armv7/imx-common/speed.c |4 
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/imx-common/speed.c 
> b/arch/arm/cpu/armv7/imx-common/speed.c
> index 2187e8e..80989c4 100644
> --- a/arch/arm/cpu/armv7/imx-common/speed.c
> +++ b/arch/arm/cpu/armv7/imx-common/speed.c
> @@ -35,7 +35,11 @@ DECLARE_GLOBAL_DATA_PTR;
>  int get_clocks(void)
>  {
>  #ifdef CONFIG_FSL_ESDHC
> +#ifdef CONFIG_FSL_USDHC
> + gd->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
> +#else
>   gd->sdhc_clk = mxc_get_clock(MXC_IPG_PERCLK);
>  #endif
> +#endif
>   return 0;
>  }

Acked-by: Stefano Babic 

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx53ard: Remove unused CONFIG_MII_GASKET

2012-06-15 Thread Stefano Babic
On 07/06/2012 20:05, Fabio Estevam wrote:
> From: Fabio Estevam 
> 
> CONFIG_MII_GASKET is not defined anywhere, so remove it.
> 
> Signed-off-by: Fabio Estevam 
> ---


Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/6] imx31_phycore: Remove CONFIG_SYS_I2C_SLAVE definition

2012-06-15 Thread Stefano Babic
On 03/06/2012 09:53, Fabio Estevam wrote:
> From: Fabio Estevam 
> 
> According to include/i2c.h:
> 
> "/*
>  * Many boards/controllers/drivers don't support an I2C slave interface so
>  * provide a default slave address for them for use in common code.  A real
>  * value for CONFIG_SYS_I2C_SLAVE should be defined for any board which does
>  * support a slave interface.
>  */
> #ifndef   CONFIG_SYS_I2C_SLAVE
> #define   CONFIG_SYS_I2C_SLAVE0xfe
> #endif

Whole series applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] imx25: Move MXC_GPIO_PORT_TO_NUM to imx-regs.h

2012-06-15 Thread Stefano Babic
On 13/06/2012 13:37, Fabio Estevam wrote:
> On Mon, Jun 11, 2012 at 12:02 PM, Vikram Narayanan  
> wrote:
> 
>>> Also, this macro is useful not only for mx25, and it would be nice to
>>> let it avaible for the other i.MX SoCs as well.
>>
>>
>> Agree. But I guess u-boot doesn't have a common folder where this can be put
>> up something like plat-mxc. So, I should think where to place this macro to
>> avoid duplicates in many header files. Any pointers?
> 
> Yes, a common folder would help indeed.
> 
> Copying Stefano, so that he could provide us some suggestion on this.

A general common folder helps - we have already an imx-common, whose
name was copied from omap-common we already head. At the moment, it
contains files common to i.MX5 and i.MX6. However, it is located under
armv7, and it is not accessible for other i.MX.

Really I am for a solution like in kernel, with a plat-mxc into
include/asm/, where we can put common things for all i.MX.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] imx: Use a clear identification of an unidentified CPU type

2012-06-17 Thread Stefano Babic
On 17/06/2012 14:58, Otavio Salvador wrote:
> In case an unidentified CPU type is detected it now returns
> i.MX, in a const char.
> 
> Signed-off-by: Otavio Salvador 
> Cc: Marek Vasut 
> Cc: Stefano Babic 
> Cc: Fabio Estevam 
> ---

Hi Otavio,


>  arch/arm/cpu/armv7/imx-common/cpu.c |4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/imx-common/cpu.c 
> b/arch/arm/cpu/armv7/imx-common/cpu.c
> index b3195dd..77aac7d 100644
> --- a/arch/arm/cpu/armv7/imx-common/cpu.c
> +++ b/arch/arm/cpu/armv7/imx-common/cpu.c
> @@ -66,7 +66,7 @@ char *get_reset_cause(void)
>  
>  #if defined(CONFIG_DISPLAY_CPUINFO)
>  
> -static char *get_imx_type(u32 imxtype)
> +static const char *get_imx_type(u32 imxtype)
>  {
>   switch (imxtype) {
>   case 0x63:
> @@ -80,7 +80,7 @@ static char *get_imx_type(u32 imxtype)
>   case 0x53:
>   return "53";
>   default:
> - return "unknown";
> + return "";

Taste ist taste... but why  is better that unknown ?

Stefano
-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] mxs: generalize code for print_cpuinfo()

2012-06-17 Thread Stefano Babic
On 17/06/2012 14:58, Otavio Salvador wrote:
> The information now is gathered from HW_DIGCTL_CHIPID register and
> includes the revision of the chip on the output.
> 
> Signed-off-by: Otavio Salvador 
> Cc: Marek Vasut 
> Cc: Stefano Babic 
> Cc: Fabio Estevam 
> ---

Hi Otavio,

>  arch/arm/cpu/arm926ejs/mx28/mx28.c |   29 +++--
>  1 file changed, 27 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c 
> b/arch/arm/cpu/arm926ejs/mx28/mx28.c
> index a82ff25..ac2f2e0 100644
> --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c
> +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c
> @@ -190,13 +190,38 @@ int arch_cpu_init(void)
>  #endif
>  
>  #if defined(CONFIG_DISPLAY_CPUINFO)
> +static const char *get_cpu_type(void)
> +{
> + struct mx28_digctl_regs *digctl_regs =
> + (struct mx28_digctl_regs *)MXS_DIGCTL_BASE;
> +
> + switch (readl(&digctl_regs->hw_digctl_chipid) >> 16) {
> + case 0x2800:
> + return "28";
> + case 0x3728:
> + return "23";
> + default:
> + return "";
> + }
> +}

I like that there will be support for i.MX23, too. But I dislike that
everything takes the name "MX28". As you suggest in your subject, maybe
it is time to rename directories, and use "mxs" (as in kernel) instead
of mx28.

> +
> +static u8 get_cpu_rev(void)
> +{
> + struct mx28_digctl_regs *digctl_regs =
> + (struct mx28_digctl_regs *)MXS_DIGCTL_BASE;
> +
> + return readl(&digctl_regs->hw_digctl_chipid) & 0xF;
> +}

Everywhere (i.MX, omap, ...) get_cpu_rev returns u32. The function is
currently exported, too.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] mxs: generalize code for print_cpuinfo()

2012-06-17 Thread Stefano Babic
On 17/06/2012 18:02, Marek Vasut wrote:

>> I like that there will be support for i.MX23, too. But I dislike that
>> everything takes the name "MX28". As you suggest in your subject, maybe
>> it is time to rename directories, and use "mxs" (as in kernel) instead
>> of mx28.
> 
> We can do that eventually, later ... it depends on the ordering of Otavio's 
> patches, I'm fine either way.

Fine with me - anyway, it is something must be done.

> 
>>> +
>>> +static u8 get_cpu_rev(void)
>>> +{
>>> +   struct mx28_digctl_regs *digctl_regs =
>>> +   (struct mx28_digctl_regs *)MXS_DIGCTL_BASE;
>>> +
>>> +   return readl(&digctl_regs->hw_digctl_chipid) & 0xF;
>>> +}
>>
>> Everywhere (i.MX, omap, ...) get_cpu_rev returns u32. The function is
>> currently exported, too.
> 
> Correct, but isn't the return value mangled somehow (like having major rev. 
> << 
> 16 and minor rev. << 0 )? Or that's only IMX?

Checking in current implementations for get_cpu_rev() (i.MX / OMAP24 /
OMAP3 / AM33, and even board/apollon/sys_info.c: I do not know why the
cpu detection is inseide this file), none of them requires strictly 32
bit. However, we should be coherent in all code - for this reason I
dislike if one of the i.MX is implemented differently as for other SOCs.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] imx: Use a clear identification of an unidentified CPU type

2012-06-17 Thread Stefano Babic
On 17/06/2012 19:50, Otavio Salvador wrote:
> On Sun, Jun 17, 2012 at 1:03 PM, Marek Vasut  wrote:
>>> But really, I don't mind it being included or not. I did it because
>>> Marek has comment about it when looking at my initial mx23 patches.
>>
>> And I like it more, it looks less like a typo.
> 
> Sorry; I didn't get what you meant ... should it go or not?

Hi Otavio,

I make also my point clearer for Marek: my point is that the behavior
for all i.MX must be consistent. If you change here, please change also
for i.MX31 (that returns "unknown in print_cpuinfo) and for other SOCs
that returns "unknown" in print_cpuinfo() - or let the code as now.

Best regards,
Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4] tx25: Use generic gpio_* calls

2012-06-18 Thread Stefano Babic
On 16/06/2012 19:16, Vikram Narayanan wrote:
> Instead of manipulating gpio registers directly, use the calls
> from the gpio library.
> 
> Signed-off-by: Vikram Narayanan 
> Acked-by: Stefano Babic 
> Cc: John Rigby 
> Cc: Fabio Estevam 
> ---
> Changes from v3:
> Use gpio_set_value instead of gpio_direction_output
> (Ahh. Missed it again!!. Very bad)
> 
> Changes from v2:
> Swap the place of the change log and commit message.
> 
> Changes from v1:
> Used appropriate gpio_* lib calls.
> 
>  board/karo/tx25/tx25.c |   25 +
>  1 files changed, 9 insertions(+), 16 deletions(-)
> 
> diff --git a/board/karo/tx25/tx25.c b/board/karo/tx25/tx25.c
> index 2a29943..07fd98d 100644
> --- a/board/karo/tx25/tx25.c
> +++ b/board/karo/tx25/tx25.c
> @@ -34,14 +34,13 @@
>  DECLARE_GLOBAL_DATA_PTR;
>  
>  #ifdef CONFIG_FEC_MXC
> +#define GPIO_FEC_RESET_B MXC_GPIO_PORT_TO_NUM(4, 7)
> +#define GPIO_FEC_ENABLE_BMXC_GPIO_PORT_TO_NUM(4, 9)
>  void tx25_fec_init(void)
>  {
>   struct iomuxc_mux_ctl *muxctl;
>   struct iomuxc_pad_ctl *padctl;
> - u32 val;
>   u32 gpio_mux_mode = MX25_PIN_MUX_MODE(5);
> - struct gpio_regs *gpio4 = (struct gpio_regs *)IMX_GPIO4_BASE;
> - struct gpio_regs *gpio3 = (struct gpio_regs *)IMX_GPIO3_BASE;
>   u32 saved_rdata0_mode, saved_rdata1_mode, saved_rx_dv_mode;
>  
>   debug("tx25_fec_init\n");
> @@ -66,18 +65,15 @@ void tx25_fec_init(void)
>   writel(0x0, &padctl->pad_d11);
>  
>   /* drop PHY power and assert reset (low) */
> - val = readl(&gpio4->gpio_dr) & ~((1 << 7) | (1 << 9));
> - writel(val, &gpio4->gpio_dr);
> - val = readl(&gpio4->gpio_dir) | (1 << 7) | (1 << 9);
> - writel(val, &gpio4->gpio_dir);
> + gpio_direction_output(GPIO_FEC_RESET_B, 0);
> + gpio_direction_output(GPIO_FEC_ENABLE_B, 0);
>  
>   mdelay(5);
>  
>   debug("resetting phy\n");
>  
>   /* turn on PHY power leaving reset asserted */
> - val = readl(&gpio4->gpio_dr) | 1 << 9;
> - writel(val, &gpio4->gpio_dr);
> + gpio_set_value(GPIO_FEC_ENABLE_B, 1);
>  
>   mdelay(10);
>  
> @@ -107,19 +103,16 @@ void tx25_fec_init(void)
>   /*
>* set each to 1 and make each an output
>*/
> - val = readl(&gpio3->gpio_dr) | (1 << 10) | (1 << 11) | (1 << 12);
> - writel(val, &gpio3->gpio_dr);
> - val = readl(&gpio3->gpio_dir) | (1 << 10) | (1 << 11) | (1 << 12);
> - writel(val, &gpio3->gpio_dir);
> + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 10), 1);
> + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 11), 1);
> +     gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 12), 1);
>  
>   mdelay(22); /* this value came from RedBoot */
>  
>   /*
>* deassert PHY reset
>*/
> - val = readl(&gpio4->gpio_dr) | 1 << 7;
> - writel(val, &gpio4->gpio_dr);
> - writel(val, &gpio4->gpio_dr);
> + gpio_set_value(GPIO_FEC_RESET_B, 1);
>  
>   mdelay(5);
>  

Acked-by: Stefano Babic 

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot-Users] Secure Bootloader patch

2012-06-18 Thread Stefano Babic
On 18/06/2012 11:43, Surendra Barku Dhobale wrote:
> Hi ,
>   While surfing , I got the Secure Bootloader patch. But this patch is 
> not integrated with any u-boot source code. Is any reason?
> Where I get the tarball of entire source code with this patch features.

Are you talking about a post that is 6 years old ?

http://lists.denx.de/pipermail/u-boot/2006-September/016960.html

Something so old is dead.

> 
> Surendra.
> 
>  CAUTION - Disclaimer *
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
> for the use of the addressee(s). If you are not the intended recipient, 
> please 
> notify the sender by e-mail and delete the original message. Further, you are 
> not 
> to copy, disclose, or distribute this e-mail or its contents to any other 
> person and 
> any such actions are unlawful. This e-mail may contain viruses. Infosys has 
> taken 
> every reasonable precaution to minimize this risk, but is not liable for any 
> damage 
> you may sustain as a result of any virus in this e-mail. You should carry out 
> your 
> own virus checks before opening the e-mail or attachment. Infosys reserves 
> the 
> right to monitor and review the content of all messages sent to or from this 
> e-mail 
> address. Messages sent to or from this e-mail address may be stored on the 
> Infosys e-mail system.
> ***INFOSYS End of Disclaimer ****INFOSYS***

Do *not* send some stuff to a public mailing list.

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] i.MX28: Add function to adjust memory parameters

2012-06-18 Thread Stefano Babic
On 18/06/2012 16:23, Marek Vasut wrote:
> Dear Fabio Estevam,
> 
>> Hi Marek,
>>
>> On Thu, May 31, 2012 at 3:45 PM, Marek Vasut  wrote:
>>> Call this or similar in your spl_boot.c to adjust the DRAM configuration.
>>> Actually I think even the following value should fix your problem:
>>>
>>> void mx28_adjust_memory_params(uint32_t *dram_vals)
>>> {
>>>dram_vals[0x74 >> 2] = 0x0f02010a;
>>> }
>>
>> I finally had a chance to try this and my mx28evk can boot again with
>> your patch + the code above.
>>
>> How do we handle this? Would you send a v2 with this additional code
>> or should I do it myself after your original patch in this thread gets
>> applied?
> 
> Stefano, can you please apply this? So Fabio can apply his on top of it?

I do it.
> 
>> Also, please explain to the mortal folks what 'dram_vals[0x74 >> 2] =
>> 0x0f02010a;' means.
> 
> Well, check that particular register (memory configuration register at +0x74 
> offset) in the datasheet. It's basically adjusting the number of enabled 
> address 
> row and columns.
> 
>> It is not something very trivial to figure out :-)
> 
> It actually is, see above ;-)

I see, but I will never apply a patch programmed in hexadecimal instead
of plain C ;-)

Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] i.MX28: Add function to adjust memory parameters

2012-06-18 Thread Stefano Babic
On 18/06/2012 17:43, Marek Vasut wrote:

>>
>> So ... what do you expect me to do? The register is called HW_DRAM_CTL29
>> (very descriptive) ... do you want me to create a file full of
>> HW_DRAM_CTLnn ?
> 
> Would adding such comment be enough to satisfy you? (In slightly more polite 
> manner I mean ... damn I'm loosing it, 2 days until exam :'-( ). Sorry for 
> being 
> rough, Stefano.

Do not worry, it is normal before exam ;-)

Yes, of course comments will help !

Best regards,
Stefano


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] i.MX28: Add function to adjust memory parameters

2012-06-19 Thread Stefano Babic
On 30/05/2012 07:43, Marek Vasut wrote:
> This function can be overridden at run-time and allows implementors
> of new boards based on the i.MX28 chip to fine-tune the memory params.
> It is possible to write into the dram_vals array because when the SPL
> runs, it is located SRAM. Therefore the location is writable. There is
> no possibility of these data to be read-only.
> 
> Signed-off-by: Marek Vasut 
> Cc: Wolfgang Denk 
> Cc: Detlev Zundel 
> Cc: Stefano Babic 
> Cc: Fabio Estevam 
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/2] hush.c: Move default CONFIG_SYS_PROMPT_HUSH_PS2 to hush.c

2012-06-20 Thread Stefano Babic
On 20/06/2012 00:54, Tom Rini wrote:
> Exactly one board has defined CONFIG_SYS_PROMPT_HUSH_PS2 to a value
> different than "> " which is vision2.  I have Cc'd the maintainer here
> as I strongly suspect this is a bug rather than intentional behavior.
> 
> Cc: Stefano Babic 
> Signed-off-by: Tom Rini 
> 
> ---
> Changes in v4:
> - Rebase to current master
> ---

Acked-by: Stefano Babic 

Best regards,
Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] OMAP3: twister: add video support

2012-06-21 Thread Stefano Babic
On 21/06/2012 03:15, Tom Rini wrote:
> On Thu, Jun 14, 2012 at 10:29:47AM +0200, Stefano Babic wrote:
> 

Hi Tom,

>> Signed-off-by: Stefano Babic 
> [snip]
>> +static GraphicDevice panel;
>> +static const struct panel_config lcd_cfg = {
>> +.timing_h   = 0x01101d1b, /* Horizontal timing */
>> +.timing_v   = 0x01400b02, /* Vertical timing */
>> +.pol_freq   = 0x00023000, /* Pol Freq */
>> +.divisor= 0x0001000d, /* 33Mhz Pixel Clock */
>> +.lcd_size   = ((YRES - 1) << 16 | (XRES - 1)),
>> +.panel_type = 0x01, /* TFT */
>> +.data_lines = 0x03, /* 24 Bit RGB */
>> +.load_mode  = 0x02 /* Frame Mode */
>> +};
> 
> You need #if defined(CONFIG_VIDEO) && !defined(CONFIG_SPL_BUILD)
> type testing here[1] that the mt_ventoux board patch has.  Shall I or
> will you v2?  And I'll sanity test this on omap3_beagle tomorrow, but I
> suspect it's fine :)

I discussed with Anatolji about the patches and they need to be rebased
and reworked - a v2 is necessary !

Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/24] mxc_i2c: fix i2c_imx_stop

2012-06-24 Thread Stefano Babic
On 22/06/2012 06:11, Troy Kisky wrote:
> Instead of clearing 2 bits, all the other
> bits were set because '|=' was used instead
> of '&='.
> 
> Signed-off-by: Troy Kisky 
> ---
>  drivers/i2c/mxc_i2c.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Note:
> 
> All patches in the series are based on the i2c/master branch
> even though only 1-18 will be applied there.
> 
> 
> diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
> index fc68062..c0c45fd 100644
> --- a/drivers/i2c/mxc_i2c.c
> +++ b/drivers/i2c/mxc_i2c.c
> @@ -264,7 +264,7 @@ void i2c_imx_stop(void)
>  
>   /* Stop I2C transaction */
>   temp = readb(&i2c_regs->i2cr);
> - temp |= ~(I2CR_MSTA | I2CR_MTX);
> + temp &= ~(I2CR_MSTA | I2CR_MTX);
>   writeb(temp, &i2c_regs->i2cr);
>  
>   i2c_imx_bus_busy(0);
> 

Good catch !

Acked-by: Stefano Babic 

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 06/24] mxc_i2c.c: code i2c_probe as a 0 length i2c_write

2012-06-24 Thread Stefano Babic
On 22/06/2012 06:12, Troy Kisky wrote:
> Signed-off-by: Troy Kisky 
> ---
>  drivers/i2c/mxc_i2c.c |   29 -
>  1 file changed, 8 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
> index 626960d..4f12b9e 100644
> --- a/drivers/i2c/mxc_i2c.c
> +++ b/drivers/i2c/mxc_i2c.c
> @@ -302,27 +302,6 @@ exit:
>  }
>  
>  /*
> - * Try if a chip add given address responds (probe the chip)
> - */
> -int i2c_probe(uchar chip)
> -{
> - struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE;
> - int ret;
> -
> - ret = i2c_imx_start();
> - if (ret)
> - return ret;
> -
> - ret = tx_byte(i2c_regs, chip << 1);
> - if (ret)
> - return ret;
> -
> - i2c_imx_stop();
> -
> - return ret;
> -}
> -
> -/*
>   * Read data from I2C device
>   */
>  int i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len)
> @@ -404,3 +383,11 @@ int i2c_write(uchar chip, uint addr, int alen, uchar 
> *buf, int len)
>  
>   return ret;
>  }
> +
> +/*
> + * Try if a chip add given address responds (probe the chip)
> + */
> +int i2c_probe(uchar chip)
> +{
> + return i2c_write(chip, 0, 0, NULL, 0);
> +}
> 

Acked-by: Stefano Babic 

Best regards,
Stefano Babic



-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 05/24] mxc_i2c: create i2c_init_transfer

2012-06-24 Thread Stefano Babic
On 22/06/2012 06:12, Troy Kisky wrote:
> Initial code of i2c_read and i2c_write
> is identical, move to subroutine.
> 
> Signed-off-by: Troy Kisky 
> ---

Acked-by: Stefano Babic 

Best regards,
Stefano Babic



-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx28evk: Fix boot by adjusting HW_DRAM_CTL29 register

2012-07-02 Thread Stefano Babic
On 19/06/2012 19:24, Fabio Estevam wrote:
> commit acc4959fc1 (Revert "i.MX28: Enable additional DRAM address bits")
> broke mx28evk boot.
> 
> Fix it by properly adjusting the HW_DRAM_CTL29 register value.
> 
> Suggested-by: Marek Vasut 
> Signed-off-by: Fabio Estevam 
> ---


Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic



-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] i.MX6 USDHC: Use the ESDHC clock

2012-07-02 Thread Stefano Babic
On 14/06/2012 15:44, Dirk Behme wrote:
> From: Michael Langer 
> 
> The commit "i.mx: fsl_esdhc: add the i.mx6q support" (4692708d) introduces
> support for the i.MX6Q MMC host controller USDHC.
> 
> MXC_IPG_PERCLK sets the clock to 66MHz. This seems to be the default clock
> of the ESDHC IP found in < i.MX6 silicon. However, the default clock for the 
> USDHC
> IP found in i.MX6 is 200MHz (MXC_ESDHC_CLK). This difference will cause a 3 
> times
> higher clock on SD_CLK than expected (see fsl_esdh.c -> set_sysctl()).
> 
> Signed-off-by: Michael Langer 
> CC: Stefano Babic 
> CC: Jason Liu 
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


  1   2   3   4   5   6   7   8   9   10   >