[PATCH] imx: ahab: Fix compiler warnings in printf

2020-12-08 Thread sbabic
> arch/arm/mach-imx/imx8/ahab.c:110:63: warning: format ‘%x’ expects
> argument of type ‘unsigned int’, but argument 2 has type ‘u64 {aka long
> long unsigned int}’ [-Wformat=]
> Fix those by using %llx
> Signed-off-by: Oliver Graute 
> Cc: Stefano Babic 
> Cc: uboot-imx 
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
=


[PATCH v1 6/7] apalis-imx8x: add implementation for board_mem_get_layout

2020-12-08 Thread sbabic
> From: Igor Opaniuk 
> Add implementation of board_mem_get_layout for overriding the memory
> layout.
> Signed-off-by: Igor Opaniuk 
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
=


[PATCH 9/9] board: ge: bx50v3: check b850v3 power management watchdog

2020-12-08 Thread sbabic
> From: Ian Ray 
> Set `bootcause' from b850v3 power management watchdog status.
> Boot cause "REVERT" is no longer used, remove it.
> Signed-off-by: Ian Ray 
> Signed-off-by: Sebastian Reichel 
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
=


[PATCH v2] mmc: fsl_esdhc_imx: add wait_dat0() support

2020-12-08 Thread sbabic
> From: Haibo Chen 
> Add wait_dat0() support, upper layer will use this callback.
> Signed-off-by: Haibo Chen 
> Reviewed-by: Jaehoon Chung 
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
=


[PATCH] imx: ahab: fix compiler warnings in debug

2020-12-08 Thread sbabic
> arch/arm/mach-imx/imx8/ahab.c: In function ‘authenticate_os_container’:
> arch/arm/mach-imx/imx8/ahab.c:96:9: warning: format ‘%x’ expects argument of 
> type
> ‘unsigned int’, but argument 9 has type ‘ulong {aka long unsigned int}’ 
> [-Wformat=]
>debug("img %d, dst 0x%x, src 0x%x, size 0x%x\n",
> Fix those by using "%lu" specified.
> Signed-off-by: Oliver Graute 
> Cc: Stefano Babic 
> Cc: uboot-imx 
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
=


[PATCH v1 7/9] verdin-imx8mm: spl: enable pca9450 i2c level translator

2020-12-08 Thread sbabic
> From: Max Krummenacher 
> Enable PCA9450 i2c level translator, as this is used for the
> on module ADC.
> Signed-off-by: Max Krummenacher 
> Acked-by: Marcel Ziswiler 
> Reviewed-by: Oleksandr Suvorov 
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
=


[PATCH v1 5/9] verdin-imx8mm: spl: switch to pca9450 pmic

2020-12-08 Thread sbabic
> From: Max Krummenacher 
> V1.1A HW switched the PMIC from BD71837 to PCA9450.
> - Disable combined DVS in PCA9450_BUCK123_DVS.
> - Increase DDR Voltage to 0.95V as we use a 1.5GHz RAM.
> - Configure WDOG_B behaviour.
> Signed-off-by: Max Krummenacher 
> Signed-off-by: Igor Opaniuk 
> Acked-by: Marcel Ziswiler 
> Reviewed-by: Oleksandr Suvorov 
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
=


[PATCH v1 5/7] apalis-imx8: add implementation for board_mem_get_layout

2020-12-08 Thread sbabic
> From: Igor Opaniuk 
> Add implementation of board_mem_get_layout for overriding the memory
> layout.
> Signed-off-by: Igor Opaniuk 
> Acked-by: Oleksandr Suvorov 
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
=


[PATCH] imx: ahab: fix implicit declaration warning

2020-12-08 Thread sbabic
> Fix the following warning:
> arch/arm/mach-imx/imx8/ahab.c:105:3: warning: implicit declaration of 
> function ‘flush_dcache_range’ [-Wimplicit-function-declaration]
>flush_dcache_range(s, e);
>^~
> Include cpu_func.h header which declares the flush_dcache_range()
> function.
> Signed-off-by: Oliver Graute 
> Cc: Stefano Babic 
> Cc: uboot-imx 
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
=


[PATCH v1 8/9] toradex: tdx-cfg-clock: fix i.mx 8m mini interactive

2020-12-08 Thread sbabic
> From: Marcel Ziswiler 
> Now with them first Verdin iMX8M Mini DualLite modules in for bring-up
> we got clarity how is_cpu_type() actually behaves.
> Signed-off-by: Marcel Ziswiler 
> Reviewed-by: Oleksandr Suvorov 
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
=


[PATCH v1 7/7] colibri-imx8x: add implementation for board_mem_get_layout

2020-12-08 Thread sbabic
> From: Igor Opaniuk 
> Add implementation of board_mem_get_layout for overriding the memory
> layout.
> Signed-off-by: Igor Opaniuk 
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
=


[PATCH v1 1/4] imx6: remove not longer supported aristainetos boards

2020-12-08 Thread sbabic
> Removed aristainetos2, 2b, 2b-csl. This boards have been
> recalled and destroyed.
> Adapt board code to remove stuff not needed anymore.
> Fix checkpatch warning, remove fdt_high and initrd_high
> from default environment.
> Signed-off-by: Heiko Schocher 
> zu remove
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
=


[PATCH v1 4/9] ARM: dts: imx8mm-verdin: follow changed pmic

2020-12-08 Thread sbabic
> From: Max Krummenacher 
> The used PMIC has been changed from RHOM BD71837 to NXP PCA9450A.
> Adjust the device tree accordingly.
> Remove the old ADC node as the ADC has been changed and has no longer
> a separate power rail.
> Signed-off-by: Max Krummenacher 
> Signed-off-by: Igor Opaniuk 
> Acked-by: Marcel Ziswiler 
> Reviewed-by: Oleksandr Suvorov 
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
=


[PATCH v1 1/7] ARM: dts: fsl-imx8qxp-apalis: add initial device tree

2020-12-08 Thread sbabic
> From: Igor Opaniuk 
> Introduce initial hierarchy of device trees for Apalis iMX8X
> System on Module.
> Signed-off-by: Igor Opaniuk 
> Acked-by: Oleksandr Suvorov 
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
=


[PATCH 7/9] board: ge: bx50v3: reduce magic numbers

2020-12-08 Thread sbabic
> Use VPD product ID instead of confidx, so that we can easily reuse the
> product ID defines and avoid some magic numbers.
> Signed-off-by: Sebastian Reichel 
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
=


[PATCH 8/9] board: ge: reduce VPD EEPROM partition size

2020-12-08 Thread sbabic
> From: Ian Ray 
> Reduce vital product data size to match the latest specification.
> Signed-off-by: Ian Ray 
> Signed-off-by: Sebastian Reichel 
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
=


[PATCH 6/9] board: ge: bx50v3: drop unused pinmux defines

2020-12-08 Thread sbabic
> Remove pinmux defines, that are no longer used after
> converting the code to devicetree.
> Signed-off-by: Sebastian Reichel 
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
=


[PATCH v1 4/7] imx8: allow overriding memory layout

2020-12-08 Thread sbabic
> From: Marcel Ziswiler 
> Introduce weak function board_mem_get_layout() which allows overriding
> the memory layout from board code in runtime, useful for handling
> different SKU versions.
> Signed-off-by: Marcel Ziswiler 
> Signed-off-by: Igor Opaniuk 
> Reviewed-by: Oleksandr Suvorov 
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
=


[PATCH v1 2/4] imx6: add support for aristainetos2c_cslb board variant

2020-12-08 Thread sbabic
> add support for aristainetos2c_cslb board variant.
> Signed-off-by: Heiko Schocher 
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
=


[PATCH] mmc: fsl_esdhc_imx: optimize the timing setting

2020-12-08 Thread sbabic
> From: Haibo Chen 
> For imx usdhc/esdhc, once set the DDR_EN, enable the DDR mode, the
> card clock will be divied by 2 automatically by the host. So need
> to first config the DDR_EN correctly, then update the card clock.
> This will make sure the actual card clock is as our expected.
> IC also suggest config the DDR_EN firstly, then config the clock
> divider.
> For HS400/HS400ES mode, need to config the strobe dll, this need
> to based on the correct target clock rate, so need to do this after
> clock rate is update.
> Signed-off-by: Haibo Chen 
> Reviewed-by: Jaehoon Chung 
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
=


[PATCH v1 3/4] arm: dts: aristainetos: sync with changes in linux

2020-12-08 Thread sbabic
> sync with comaptible changes in linux from
> Krzysztof Kozlowski.
> https://patchwork.kernel.org/project/linux-arm-kernel/patch/20200930190143.27032-12-k...@kernel.org/
> Signed-off-by: Heiko Schocher 
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
=


[PATCH 5/9] board: ge: bx50v3: correct CONFIG_CMD_NFS

2020-12-08 Thread sbabic
> From: Ian Ray 
> Fix typo in NFS command configuration check.
> Signed-off-by: Ian Ray 
> Signed-off-by: Sebastian Reichel 
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
=


[PATCH v1] doc: board: imx8qm-rom7720-a1.rst: convert readme to reST

2020-12-08 Thread sbabic
> Convert README to reStructuredText format.
> Signed-off-by: Oliver Graute 
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
=


[PATCH 4/9] board: ge: common: vpd: fix name

2020-12-08 Thread sbabic
> Commit f692b479f02d changed the VPD partition name from "vpd" to
> "vpd@0". Fix the VPD reader code to use the new name, so that
> the VPD code keeps working.
> Fixes: f692b479f02d ("i2c: eeprom: Use reg property instead of offset and 
> size")
> Signed-off-by: Sebastian Reichel 
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
=


[PATCH] imx8m: fix cache setup for dynamic sdram size

2020-12-08 Thread sbabic
> the mem_map structure containing the size of SDRAM is used in various
> cache functions in cache_v8.c thus we need to update it with the
> sdram size the board is configured with as well. Without this
> the cache functions do not get setup properly and can hang
> in the case where a board reports more SDRAM than defined in
> PHYS_SDRAM_SIZE.
> Signed-off-by: Tim Harvey 
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
=


[PATCH v1] imx: imx8qm_rom7720_a1: add missing DTS to the MAINTAINERS

2020-12-08 Thread sbabic
> add the dts file to the MAINTAINERS entry
> Signed-off-by: Oliver Graute 
> Cc: Stefano Babic 
> Cc: uboot-imx 
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
=


[PATCH v1 2/9] pca9450a: fix i2c address

2020-12-08 Thread sbabic
> From: Max Krummenacher 
> The I2C address is 0x25, not 0x35. This according to the datasheet and
> tests with a PCA9450A.
> Signed-off-by: Max Krummenacher 
> Reviewed-by: Jaehoon Chung 
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
=


[PATCH v1 1/9] toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus

2020-12-08 Thread sbabic
> From: Marcel Ziswiler 
> Add new i.MX 8M Mini/Plus SKUs to ConfigBlock handling:
> 0058: Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT
> 0059: Verdin iMX8M Mini Quad 2GB IT
> 0060: Verdin iMX8M Mini DualLite 1GB WB IT
> 0061: Verdin iMX8M Plus Quad 2GB
> Rename existing SKU (use correct one):
> Verdin iMX8M Nano SoloLite 1GB -> Verdin iMX8M Nano Quad 1GB Wi-Fi
> Signed-off-by: Igor Opaniuk 
> Signed-off-by: Marcel Ziswiler 
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
=


[GIT PULL] Pull request: u-boot-imx u-boot-imx-20201208

2020-12-08 Thread Stefano Babic
Hi Tom,

please pull from u-boot-imx, thanks !

Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/748076494

The following changes since commit ee1e04558ff8c8ed812b986939447f129bb0b0bb:

  Merge branch '2020-12-02-master-imports' (2020-12-03 09:43:47 -0500)

are available in the Git repository at:

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

for you to fetch changes up to 8c5ea5361c1728c162dd5ce796654c5aef77420e:

  configs: migrate CONFIG_IMX_THERMAL to defconfigs (2020-12-07 08:54:29
+0100)


Baruch Siach (1):
  imx8mp_evk: README instruction fixes

Haibo Chen (2):
  mmc: fsl_esdhc_imx: add wait_dat0() support
  mmc: fsl_esdhc_imx: optimize the timing setting

Heiko Schocher (4):
  imx6: remove not longer supported aristainetos boards
  imx6: add support for aristainetos2c_cslb board variant
  arm: dts: aristainetos: sync with changes in linux
  imx: aristainetos: enable U-Boot Environment variables protection

Ian Ray (3):
  board: ge: bx50v3: correct CONFIG_CMD_NFS
  board: ge: reduce VPD EEPROM partition size
  board: ge: bx50v3: check b850v3 power management watchdog

Igor Opaniuk (7):
  power: pmic: add SPL_DM_PMIC_PCA9450 symbol to Kconfig
  ARM: dts: fsl-imx8qxp-apalis: add initial device tree
  board: toradex: add apalis-imx8x 2gb wb it v1.1a module support
  doc: board: apalis-imx8x: add documentation
  apalis-imx8: add implementation for board_mem_get_layout
  apalis-imx8x: add implementation for board_mem_get_layout
  colibri-imx8x: add implementation for board_mem_get_layout

Marcel Ziswiler (4):
  toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus
  toradex: tdx-cfg-clock: fix i.mx 8m mini interactive
  verdin-imx8mm: automatic ram size detection
  imx8: allow overriding memory layout

Max Krummenacher (5):
  pca9450a: fix i2c address
  ARM: dts: imx8mm-verdin: follow changed pmic
  verdin-imx8mm: spl: switch to pca9450 pmic
  verdin-imx8mm: implement hardware version detection
  verdin-imx8mm: spl: enable pca9450 i2c level translator

Oliver Graute (6):
  imx: clk: added IPG Clock for I2C on imx8qm
  imx: ahab: Fix compiler warnings in printf
  imx: ahab: fix compiler warnings in debug
  imx: ahab: fix implicit declaration warning
  imx: imx8qm_rom7720_a1: add missing DTS to the MAINTAINERS
  doc: board: imx8qm-rom7720-a1.rst: convert readme to reST

Sebastian Reichel (3):
  board: ge: common: vpd: fix name
  board: ge: bx50v3: drop unused pinmux defines
  board: ge: bx50v3: reduce magic numbers

Tim Harvey (1):
  imx8m: fix cache setup for dynamic sdram size

Tom Rini (1):
  configs: migrate CONFIG_IMX_THERMAL to defconfigs

 arch/arm/dts/Makefile
  |   9 +
 arch/arm/dts/fsl-imx8qxp-apalis-u-boot.dtsi
  | 139
+++
 arch/arm/dts/fsl-imx8qxp-apalis.dts
  | 278
+
 arch/arm/dts/imx53-ppd-uboot.dtsi
  |   2 +-
 arch/arm/dts/imx6dl-aristainetos2_4-u-boot.dtsi
  |  13 --
 arch/arm/dts/imx6dl-aristainetos2_4.dts
  |  51 ---
 arch/arm/dts/imx6dl-aristainetos2_4.dtsi
  |  84 --
 arch/arm/dts/imx6dl-aristainetos2_7-u-boot.dtsi
  |  19 -
 arch/arm/dts/imx6dl-aristainetos2_7.dts
  |  16 
 arch/arm/dts/imx6dl-aristainetos2_7.dtsi
  |  11 +
 arch/arm/dts/imx6dl-aristainetos2b_4-u-boot.dtsi
  |  13 --
 arch/arm/dts/imx6dl-aristainetos2b_4.dts
  |  50 ---
 arch/arm/dts/imx6dl-aristainetos2b_7.dts
  |  16 
 arch/arm/dts/imx6dl-aristainetos2b_csl_4-u-boot.dtsi
  |  13 --
 arch/arm/dts/imx6dl-aristainetos2b_csl_4.dts
  |  50 ---
 arch/arm/dts/imx6dl-aristainetos2b_csl_7-u-boot.dtsi
  |  19 -
 arch/arm/dts/imx6dl-aristainetos2b_csl_7.dts
  |  16 
 arch/arm/dts/imx6dl-aristainetos2c_4-u-boot.dtsi
  |  13 --
 arch/arm/dts/imx6dl-aristainetos2c_4.dts
  |  50 ---
 arch/arm/dts/imx6dl-aristainetos2c_7.dts
  |   4 +-
 arch/arm/dts/{imx6dl-aristainetos2b_7-u-boot.dtsi =>
imx6dl-aristainetos2c_cslb_7-u-boot.dtsi}   |   2 +-
 arch/arm/dts/imx6dl-aristainetos2c_cslb_7.dts
  |  16 
 arch/arm/dts/imx6q-bx50v3-uboot.dtsi
 

[v2 00/33] gpio: layerscape: fix gpio bug and enable gpio

2020-12-08 Thread Biwen Li
From: Biwen Li 

Change in v2:
- fix warnings when check patches
- enable gpio command for boards ls1021atwr, ls1021aqds

Biwen Li (33):
  gpio: mpc8xxx_gpio: fix a bug on ls1046ardb
  arm: dts: ls1021a: add gpio node
  arm64: dts: ls1012a: add gpio node
  arm64: dts: ls1028a: add gpio node
  arm64: dts: ls1043a: add gpio node
  arm64: dts: ls1046a: add gpio node
  arm64: dts: ls1088a: add gpio node
  arm64: dts: ls208xa: add gpio node
  configs: ls1012a: enable CONFIG_MPC8XXX_GPIO
  configs: ls1043a: enable CONFIG_MPC8XXX_GPIO
  configs: ls1028a: enable CONFIG_MPC8XXX_GPIO
  configs: ls1088a: enable CONFIG_MPC8XXX_GPIO
  configs: ls208xa: enable CONFIG_MPC8XXX_GPIO
  configs: lx2160a: enable CONFIG_MPC8XXX_GPIO
  configs: ls1046a: enable MPC8XXX_GPIO
  configs: ls1021atwr: enable CONFIG_MPC8XXX_GPIO
  configs: ls1021aqds: enable CONFIG_MPC8XXX_GPIO
  configs: ls1012afrwy: enable CMD_GPIO
  configs: ls1012ardb: enable CMD_GPIO
  configs: ls1021aqds: enable CMD_GPIO
  configs: ls1021atwr: enable CMD_GPIO
  configs: ls1028aqds: enable CMD_GPIO
  configs: ls1028ardb: enable CMD_GPIO
  configs: ls1043aqds: enable CMD_GPIO
  configs: ls1043ardb: enable CMD_GPIO
  configs: ls1046ardb: enable CMD_GPIO
  configs: ls1046aqds: enable CMD_GPIO
  configs: ls2088ardb: enable DM_GPIO and CMD_GPIO
  configs: ls2088aqds: enable CMD_GPIO
  configs: ls1088aqds: enable DM_GPIO and CMD_GPIO
  configs: ls1088ardb: enable DM_GPIO and CMD_GPIO
  configs: lx2160ardb: enable CMD_GPIO
  configs: lx2160aqds: enable CMD_GPIO

 arch/arm/dts/fsl-ls1012a.dtsi | 20 
 arch/arm/dts/fsl-ls1028a.dtsi | 33 +
 arch/arm/dts/fsl-ls1043a.dtsi | 40 
 arch/arm/dts/fsl-ls1046a.dtsi | 40 
 arch/arm/dts/fsl-ls1088a.dtsi | 46 +++
 arch/arm/dts/fsl-ls2080a.dtsi | 45 ++
 arch/arm/dts/ls1021a.dtsi | 40 
 .../asm/arch-fsl-layerscape/immap_lsch3.h | 10 
 .../ls1012afrwy_qspi_SECURE_BOOT_defconfig|  1 +
 configs/ls1012afrwy_qspi_defconfig|  1 +
 configs/ls1012afrwy_tfa_SECURE_BOOT_defconfig |  1 +
 configs/ls1012afrwy_tfa_defconfig |  1 +
 configs/ls1012ardb_qspi_SECURE_BOOT_defconfig |  1 +
 configs/ls1012ardb_qspi_defconfig |  1 +
 configs/ls1012ardb_tfa_SECURE_BOOT_defconfig  |  1 +
 configs/ls1012ardb_tfa_defconfig  |  1 +
 configs/ls1021aqds_ddr4_nor_defconfig |  1 +
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig  |  1 +
 configs/ls1021aqds_nand_defconfig |  1 +
 configs/ls1021aqds_nor_SECURE_BOOT_defconfig  |  1 +
 configs/ls1021aqds_nor_defconfig  |  1 +
 configs/ls1021aqds_nor_lpuart_defconfig   |  1 +
 configs/ls1021aqds_qspi_defconfig |  1 +
 configs/ls1021aqds_sdcard_ifc_defconfig   |  1 +
 configs/ls1021aqds_sdcard_qspi_defconfig  |  1 +
 configs/ls1021atwr_nor_SECURE_BOOT_defconfig  |  1 +
 configs/ls1021atwr_nor_defconfig  |  1 +
 configs/ls1021atwr_nor_lpuart_defconfig   |  1 +
 configs/ls1021atwr_qspi_defconfig |  1 +
 ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig |  1 +
 configs/ls1021atwr_sdcard_ifc_defconfig   |  1 +
 configs/ls1021atwr_sdcard_qspi_defconfig  |  1 +
 configs/ls1028aqds_tfa_SECURE_BOOT_defconfig  |  1 +
 configs/ls1028aqds_tfa_defconfig  |  1 +
 configs/ls1028aqds_tfa_lpuart_defconfig   |  1 +
 configs/ls1028ardb_tfa_SECURE_BOOT_defconfig  |  1 +
 configs/ls1028ardb_tfa_defconfig  |  1 +
 configs/ls1043aqds_defconfig  |  1 +
 configs/ls1043aqds_lpuart_defconfig   |  1 +
 configs/ls1043aqds_nand_defconfig |  1 +
 configs/ls1043aqds_nor_ddr3_defconfig |  1 +
 configs/ls1043aqds_qspi_defconfig |  1 +
 configs/ls1043aqds_sdcard_ifc_defconfig   |  1 +
 configs/ls1043aqds_sdcard_qspi_defconfig  |  1 +
 configs/ls1043aqds_tfa_SECURE_BOOT_defconfig  |  1 +
 configs/ls1043aqds_tfa_defconfig  |  1 +
 configs/ls1043ardb_SECURE_BOOT_defconfig  |  1 +
 configs/ls1043ardb_defconfig  |  1 +
 configs/ls1043ardb_nand_SECURE_BOOT_defconfig |  1 +
 configs/ls1043ardb_nand_defconfig |  1 +
 .../ls1043ardb_sdcard_SECURE_BOOT_defconfig   |  1 +
 configs/ls1043ardb_sdcard_defconfig   |  1 +
 configs/ls1043ardb_tfa_SECURE_BOOT_defconfig  |  1 +
 configs/ls1043ardb_tfa_defconfig  |  1 +
 configs/ls1046aqds_SECURE_BOOT_defconfig  |  1 +
 configs/ls1046aqds_defconfig  |  1 +
 configs/ls1046aqds_lpuart_defconfig   |  1 +
 configs/ls1046aqds_nand_defconfig |  1 +
 configs/ls1046aqds_qspi_defconfig |  1 +
 configs/ls1046aqds_sdcard_ifc_defconfig   |  1 +
 configs/ls1046aqds_sdcard_qspi_defconfig  |  1 +
 configs/ls1046aqds_tfa_SECURE_BOOT_defconfig  |  1 +
 configs/

[v2 01/33] gpio: mpc8xxx_gpio: fix a bug on ls1046ardb

2020-12-08 Thread Biwen Li
From: Biwen Li 

Fix a bug as belows,
=> gpio status -a
"Synchronous Abort" handler, esr 0x9661
elr: 82047964 lr : 82047960 (reloc)
elr: fbd72964 lr : fbd72960
x0 :  x1 : 000a
x2 : 0020 x3 : 0001
x4 :  x5 : 0030
x6 : 0020 x7 : 0002
x8 : ffe0 x9 : 0008
x10: 0010 x11: 0006
x12: 0001869f x13: 0230
x14: fbc23e9c x15: 

Signed-off-by: Biwen Li 
---
 .../asm/arch-fsl-layerscape/immap_lsch3.h | 10 +
 drivers/gpio/mpc8xxx_gpio.c   | 45 +++
 2 files changed, 17 insertions(+), 38 deletions(-)

diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h 
b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
index 24a64b7575..85c894a598 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
@@ -589,5 +589,15 @@ struct ccsr_serdes {
u8 res5[0x19fc - 0xa00];
 };
 
+struct ccsr_gpio {
+   u32 gpdir;
+   u32 gpodr;
+   u32 gpdat;
+   u32 gpier;
+   u32 gpimr;
+   u32 gpicr;
+   u32 gpibe;
+};
+
 #endif /*__ASSEMBLY__ */
 #endif /* __ARCH_FSL_LSCH3_IMMAP_H_ */
diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c
index 27881a7322..d598d3e19c 100644
--- a/drivers/gpio/mpc8xxx_gpio.c
+++ b/drivers/gpio/mpc8xxx_gpio.c
@@ -16,16 +16,6 @@
 #include 
 #include 
 
-struct ccsr_gpio {
-   u32 gpdir;
-   u32 gpodr;
-   u32 gpdat;
-   u32 gpier;
-   u32 gpimr;
-   u32 gpicr;
-   u32 gpibe;
-};
-
 struct mpc8xxx_gpio_data {
/* The bank's register base in memory */
struct ccsr_gpio __iomem *base;
@@ -187,32 +177,11 @@ static int mpc8xxx_gpio_ofdata_to_platdata(struct udevice 
*dev)
 {
struct mpc8xxx_gpio_plat *plat = dev_get_platdata(dev);
struct mpc8xxx_gpio_data *data = dev_get_priv(dev);
-   fdt_addr_t addr;
-   u32 i;
-   u32 reg[4];
 
-   if (ofnode_read_bool(dev->node, "little-endian"))
+   if (dev_read_bool(dev, "little-endian"))
data->little_endian = true;
 
-   if (data->little_endian)
-   dev_read_u32_array(dev, "reg", reg, 4);
-   else
-   dev_read_u32_array(dev, "reg", reg, 2);
-
-   if (data->little_endian) {
-   for (i = 0; i < 2; i++)
-   reg[i] = be32_to_cpu(reg[i]);
-   }
-
-   addr = dev_translate_address(dev, reg);
-
-   plat->addr = addr;
-
-   if (data->little_endian)
-   plat->size = reg[3];
-   else
-   plat->size = reg[1];
-
+   plat->addr = (ulong)dev_read_addr_size_index(dev, 0, (fdt_size_t 
*)&plat->size);
plat->ngpios = dev_read_u32_default(dev, "ngpios", 32);
 
return 0;
@@ -257,11 +226,11 @@ static int mpc8xxx_gpio_probe(struct udevice *dev)
if (!str)
return -ENOMEM;
 
-   if (ofnode_device_is_compatible(dev->node, "fsl,qoriq-gpio")) {
-   unsigned long gpibe = data->addr + sizeof(struct ccsr_gpio)
-   - sizeof(u32);
-
-   out_be32((unsigned int *)gpibe, 0x);
+   if (device_is_compatible(dev, "fsl,qoriq-gpio")) {
+   if (data->little_endian)
+   out_le32(&data->base->gpibe, 0x);
+   else
+   out_be32(&data->base->gpibe, 0x);
}
 
uc_priv->bank_name = str;
-- 
2.17.1



[v2 03/33] arm64: dts: ls1012a: add gpio node

2020-12-08 Thread Biwen Li
From: Biwen Li 

Add gpio node for SoC LS1012A

Signed-off-by: Biwen Li 
---
 arch/arm/dts/fsl-ls1012a.dtsi | 20 
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/dts/fsl-ls1012a.dtsi b/arch/arm/dts/fsl-ls1012a.dtsi
index 2d70c82a72..b1a616ed84 100644
--- a/arch/arm/dts/fsl-ls1012a.dtsi
+++ b/arch/arm/dts/fsl-ls1012a.dtsi
@@ -70,6 +70,26 @@
bus-width = <4>;
};
 
+   gpio0: gpio@230 {
+   compatible = "fsl,qoriq-gpio";
+   reg = <0x0 0x230 0x0 0x1>;
+   interrupts = <0 66 0x4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio1: gpio@231 {
+   compatible = "fsl,qoriq-gpio";
+   reg = <0x0 0x231 0x0 0x1>;
+   interrupts = <0 67 0x4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
i2c0: i2c@218 {
compatible = "fsl,vf610-i2c";
#address-cells = <1>;
-- 
2.17.1



[v2 02/33] arm: dts: ls1021a: add gpio node

2020-12-08 Thread Biwen Li
From: Biwen Li 

Add gpio node for SoC LS1021A

Signed-off-by: Biwen Li 
---
 arch/arm/dts/ls1021a.dtsi | 40 +++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/dts/ls1021a.dtsi b/arch/arm/dts/ls1021a.dtsi
index 0eeec43ccc..7b99ce02b3 100644
--- a/arch/arm/dts/ls1021a.dtsi
+++ b/arch/arm/dts/ls1021a.dtsi
@@ -98,6 +98,46 @@
bus-width = <4>;
};
 
+   gpio0: gpio@230 {
+   compatible = "fsl,ls1021a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x230 0x0 0x1>;
+   interrupts = ;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio1: gpio@231 {
+   compatible = "fsl,ls1021a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x231 0x0 0x1>;
+   interrupts = ;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio2: gpio@232 {
+   compatible = "fsl,ls1021a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x232 0x0 0x1>;
+   interrupts = ;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio3: gpio@233 {
+   compatible = "fsl,ls1021a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x233 0x0 0x1>;
+   interrupts = ;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
scfg: scfg@157 {
compatible = "fsl,ls1021a-scfg", "syscon";
reg = <0x157 0x1>;
-- 
2.17.1



[v2 04/33] arm64: dts: ls1028a: add gpio node

2020-12-08 Thread Biwen Li
From: Biwen Li 

Add gpio node for SoC LS1028A

Signed-off-by: Biwen Li 
---
 arch/arm/dts/fsl-ls1028a.dtsi | 33 +
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/dts/fsl-ls1028a.dtsi b/arch/arm/dts/fsl-ls1028a.dtsi
index bf6373d5ec..64e75c637d 100644
--- a/arch/arm/dts/fsl-ls1028a.dtsi
+++ b/arch/arm/dts/fsl-ls1028a.dtsi
@@ -380,6 +380,39 @@
status = "disabled";
};
 
+   gpio0: gpio@230 {
+   compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
+   reg = <0x0 0x230 0x0 0x1>;
+   interrupts = ;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   little-endian;
+   };
+
+   gpio1: gpio@231 {
+   compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
+   reg = <0x0 0x231 0x0 0x1>;
+   interrupts = ;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   little-endian;
+   };
+
+   gpio2: gpio@232 {
+   compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
+   reg = <0x0 0x232 0x0 0x1>;
+   interrupts = ;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   little-endian;
+   };
+
sata: sata@320 {
compatible = "fsl,ls1028a-ahci";
reg = <0x0 0x320 0x0 0x1/* ccsr sata base */
-- 
2.17.1



[v2 05/33] arm64: dts: ls1043a: add gpio node

2020-12-08 Thread Biwen Li
From: Biwen Li 

Add gpio node for SoC LS1043A

Signed-off-by: Biwen Li 
---
 arch/arm/dts/fsl-ls1043a.dtsi | 40 +++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/dts/fsl-ls1043a.dtsi b/arch/arm/dts/fsl-ls1043a.dtsi
index f7db44c0fa..96286104f2 100644
--- a/arch/arm/dts/fsl-ls1043a.dtsi
+++ b/arch/arm/dts/fsl-ls1043a.dtsi
@@ -78,6 +78,46 @@
bus-width = <4>;
};
 
+   gpio0: gpio@230 {
+   compatible = "fsl,ls1043a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x230 0x0 0x1>;
+   interrupts = <0 66 0x4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio1: gpio@231 {
+   compatible = "fsl,ls1043a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x231 0x0 0x1>;
+   interrupts = <0 67 0x4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio2: gpio@232 {
+   compatible = "fsl,ls1043a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x232 0x0 0x1>;
+   interrupts = <0 68 0x4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio3: gpio@233 {
+   compatible = "fsl,ls1043a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x233 0x0 0x1>;
+   interrupts = <0 134 0x4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
ifc: ifc@153 {
compatible = "fsl,ifc", "simple-bus";
reg = <0x0 0x153 0x0 0x1>;
-- 
2.17.1



[v2 06/33] arm64: dts: ls1046a: add gpio node

2020-12-08 Thread Biwen Li
From: Biwen Li 

Add gpio node for SoC LS1046A

Signed-off-by: Biwen Li 
---
 arch/arm/dts/fsl-ls1046a.dtsi | 40 +++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/dts/fsl-ls1046a.dtsi b/arch/arm/dts/fsl-ls1046a.dtsi
index 3f11d6cd18..bffa6d1469 100644
--- a/arch/arm/dts/fsl-ls1046a.dtsi
+++ b/arch/arm/dts/fsl-ls1046a.dtsi
@@ -78,6 +78,46 @@
bus-width = <4>;
};
 
+   gpio0: gpio@230 {
+   compatible = "fsl,qoriq-gpio";
+   reg = <0x0 0x230 0x0 0x1>;
+   interrupts = <0 66 4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio1: gpio@231 {
+   compatible = "fsl,qoriq-gpio";
+   reg = <0x0 0x231 0x0 0x1>;
+   interrupts = <0 67 4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio2: gpio@232 {
+   compatible = "fsl,qoriq-gpio";
+   reg = <0x0 0x232 0x0 0x1>;
+   interrupts = <0 68 4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio3: gpio@233 {
+   compatible = "fsl,qoriq-gpio";
+   reg = <0x0 0x233 0x0 0x1>;
+   interrupts = <0 134 4>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
ifc: ifc@153 {
compatible = "fsl,ifc", "simple-bus";
reg = <0x0 0x153 0x0 0x1>;
-- 
2.17.1



[v2 07/33] arm64: dts: ls1088a: add gpio node

2020-12-08 Thread Biwen Li
From: Biwen Li 

Add gpio node for SoC LS1088A

Signed-off-by: Biwen Li 
---
 arch/arm/dts/fsl-ls1088a.dtsi | 46 +++
 1 file changed, 46 insertions(+)

diff --git a/arch/arm/dts/fsl-ls1088a.dtsi b/arch/arm/dts/fsl-ls1088a.dtsi
index 6653794d1c..3e5b310437 100644
--- a/arch/arm/dts/fsl-ls1088a.dtsi
+++ b/arch/arm/dts/fsl-ls1088a.dtsi
@@ -3,7 +3,9 @@
  * NXP ls1088a SOC common device tree source
  *
  * Copyright 2017 NXP
+ * Copyright 2020 NXP
  */
+#include 
 
 / {
compatible = "fsl,ls1088a";
@@ -115,6 +117,50 @@
bus-width = <4>;
};
 
+   gpio0: gpio@230 {
+   compatible = "fsl,ls1088a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x230 0x0 0x1>;
+   interrupts = ;
+   little-endian;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio1: gpio@231 {
+   compatible = "fsl,ls1088a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x231 0x0 0x1>;
+   interrupts = ;
+   little-endian;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio2: gpio@232 {
+   compatible = "fsl,ls1088a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x232 0x0 0x1>;
+   interrupts = ;
+   little-endian;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio3: gpio@233 {
+   compatible = "fsl,ls1088a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x233 0x0 0x1>;
+   interrupts = ;
+   little-endian;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
ifc: ifc@153 {
compatible = "fsl,ifc", "simple-bus";
reg = <0x0 0x224 0x0 0x2>;
-- 
2.17.1



[v2 09/33] configs: ls1012a: enable CONFIG_MPC8XXX_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CONFIG_MPC8XXX_GPIO for SoC LS1012A

Signed-off-by: Biwen Li 
---
 include/configs/ls1012a_common.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
index 6cf6a31d76..f6b5d47c25 100644
--- a/include/configs/ls1012a_common.h
+++ b/include/configs/ls1012a_common.h
@@ -62,6 +62,13 @@
 #define CONFIG_I2C_DEFAULT_BUS_NUMBER 0
 #endif
 
+/* GPIO */
+#ifdef CONFIG_DM_GPIO
+#ifndef CONFIG_MPC8XXX_GPIO
+#define CONFIG_MPC8XXX_GPIO
+#endif
+#endif
+
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE 1
 #define CONFIG_SYS_NS16550_CLK  (get_serial_clock())
-- 
2.17.1



[v2 08/33] arm64: dts: ls208xa: add gpio node

2020-12-08 Thread Biwen Li
From: Biwen Li 

Add gpio node for SoC LS208xA

Signed-off-by: Biwen Li 
---
 arch/arm/dts/fsl-ls2080a.dtsi | 45 +++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm/dts/fsl-ls2080a.dtsi b/arch/arm/dts/fsl-ls2080a.dtsi
index 6b7bf8eb16..155caf4721 100644
--- a/arch/arm/dts/fsl-ls2080a.dtsi
+++ b/arch/arm/dts/fsl-ls2080a.dtsi
@@ -3,6 +3,7 @@
  * Freescale ls2080a SOC common device tree source
  *
  * Copyright 2013-2015 Freescale Semiconductor, Inc.
+ * Copyright 2020 NXP
  */
 
 / {
@@ -119,6 +120,50 @@
bus-width = <4>;
};
 
+   gpio0: gpio@230 {
+   compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x230 0x0 0x1>;
+   interrupts = <0 36 0x4>; /* Level high type */
+   gpio-controller;
+   little-endian;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio1: gpio@231 {
+   compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x231 0x0 0x1>;
+   interrupts = <0 36 0x4>; /* Level high type */
+   gpio-controller;
+   little-endian;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio2: gpio@232 {
+   compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x232 0x0 0x1>;
+   interrupts = <0 37 0x4>; /* Level high type */
+   gpio-controller;
+   little-endian;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpio3: gpio@233 {
+   compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio";
+   reg = <0x0 0x233 0x0 0x1>;
+   interrupts = <0 37 0x4>; /* Level high type */
+   gpio-controller;
+   little-endian;
+   #gpio-cells = <2>;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
usb0: usb3@310 {
compatible = "fsl,layerscape-dwc3";
reg = <0x0 0x310 0x0 0x1>;
-- 
2.17.1



[v2 10/33] configs: ls1043a: enable CONFIG_MPC8XXX_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CONFIG_MPC8XXX_GPIO for SoC LS1043A

Signed-off-by: Biwen Li 
---
 include/configs/ls1043a_common.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index 96fdd6417e..74625cc0bb 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -119,6 +119,13 @@
 
 #endif
 
+/* GPIO */
+#ifdef CONFIG_DM_GPIO
+#ifndef CONFIG_MPC8XXX_GPIO
+#define CONFIG_MPC8XXX_GPIO
+#endif
+#endif
+
 /* IFC */
 #ifndef SPL_NO_IFC
 #if defined(CONFIG_TFABOOT) || \
-- 
2.17.1



[v2 11/33] configs: ls1028a: enable CONFIG_MPC8XXX_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CONFIG_MPC8XXX_GPIO for SoC LS1028A

Signed-off-by: Biwen Li 
---
 include/configs/ls1028a_common.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/ls1028a_common.h b/include/configs/ls1028a_common.h
index 8345cd7acf..1c4af7d176 100644
--- a/include/configs/ls1028a_common.h
+++ b/include/configs/ls1028a_common.h
@@ -36,6 +36,13 @@
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 2048 * 1024)
 
+/* GPIO */
+#ifdef CONFIG_DM_GPIO
+#ifndef CONFIG_MPC8XXX_GPIO
+#define CONFIG_MPC8XXX_GPIO
+#endif
+#endif
+
 /* I2C */
 #ifndef CONFIG_DM_I2C
 #define CONFIG_SYS_I2C
-- 
2.17.1



[v2 12/33] configs: ls1088a: enable CONFIG_MPC8XXX_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CONFIG_MPC8XXX_GPIO for LS1088A

Signed-off-by: Biwen Li 
---
 include/configs/ls1088a_common.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index f9e349871c..b9a956b90b 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -53,6 +53,13 @@
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 2048 * 1024)
 
+/* GPIO */
+#ifdef CONFIG_DM_GPIO
+#ifndef CONFIG_MPC8XXX_GPIO
+#define CONFIG_MPC8XXX_GPIO
+#endif
+#endif
+
 /* I2C */
 #ifndef CONFIG_DM_I2C
 #define CONFIG_SYS_I2C
-- 
2.17.1



[v2 14/33] configs: lx2160a: enable CONFIG_MPC8XXX_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CONFIG_MPC8XXX_GPIO for SoC LX2160A

Signed-off-by: Biwen Li 
---
 include/configs/lx2160a_common.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
index 0017ac5773..3b7516aace 100644
--- a/include/configs/lx2160a_common.h
+++ b/include/configs/lx2160a_common.h
@@ -158,6 +158,13 @@
 #define NXP_FSPI_FLASH_NUM 1
 #endif
 
+/* GPIO */
+#ifdef CONFIG_DM_GPIO
+#ifndef CONFIG_MPC8XXX_GPIO
+#define CONFIG_MPC8XXX_GPIO
+#endif
+#endif
+
 #ifndef __ASSEMBLY__
 unsigned long get_board_sys_clk(void);
 unsigned long get_board_ddr_clk(void);
-- 
2.17.1



[v2 15/33] configs: ls1046a: enable MPC8XXX_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable MPC8XXX_GPIO for SoC LS1046A

Signed-off-by: Biwen Li 
---
 include/configs/ls1046a_common.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index d44a7f105e..32658cf641 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -126,6 +126,13 @@
 #define CONFIG_SYS_MONITOR_LEN 0xa
 #endif
 
+/* GPIO */
+#ifdef CONFIG_DM_GPIO
+#ifndef CONFIG_MPC8XXX_GPIO
+#define CONFIG_MPC8XXX_GPIO
+#endif
+#endif
+
 /* I2C */
 #ifndef CONFIG_DM_I2C
 #define CONFIG_SYS_I2C
-- 
2.17.1



[v2 13/33] configs: ls208xa: enable CONFIG_MPC8XXX_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CONFIG_MPC8XXX_GPIO for LS208xA

Signed-off-by: Biwen Li 
---
 include/configs/ls2080a_common.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index 444bb8c3b5..1042555a8c 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -66,6 +66,13 @@
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 2048 * 1024)
 
+/* GPIO */
+#ifdef CONFIG_DM_GPIO
+#ifndef CONFIG_MPC8XXX_GPIO
+#define CONFIG_MPC8XXX_GPIO
+#endif
+#endif
+
 /* I2C */
 #ifndef CONFIG_DM_I2C
 #define CONFIG_SYS_I2C
-- 
2.17.1



[v2 16/33] configs: ls1021atwr: enable CONFIG_MPC8XXX_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CONFIG_MPC8XXX_GPIO for board ls1021atwr

Signed-off-by: Biwen Li 
---
 include/configs/ls1021atwr.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 3e85bb3850..dfb56437d9 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -219,6 +219,13 @@
 #define CONFIG_SYS_I2C_MXC_I2C2/* enable I2C bus 2 */
 #define CONFIG_SYS_I2C_MXC_I2C3/* enable I2C bus 3 */
 
+/* GPIO */
+#ifdef CONFIG_DM_GPIO
+#ifndef CONFIG_MPC8XXX_GPIO
+#define CONFIG_MPC8XXX_GPIO
+#endif
+#endif
+
 /* EEPROM */
 #define CONFIG_ID_EEPROM
 #define CONFIG_SYS_I2C_EEPROM_NXID
-- 
2.17.1



[v2 17/33] configs: ls1021aqds: enable CONFIG_MPC8XXX_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CONFIG_MPC8XXX_GPIO for board ls1021aqds

Signed-off-by: Biwen Li 
---
 include/configs/ls1021aqds.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index eb6f1c1e5b..b4c70333de 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -341,6 +341,13 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_I2C_MXC_I2C2/* enable I2C bus 2 */
 #define CONFIG_SYS_I2C_MXC_I2C3/* enable I2C bus 3 */
 
+/* GPIO */
+#ifdef CONFIG_DM_GPIO
+#ifndef CONFIG_MPC8XXX_GPIO
+#define CONFIG_MPC8XXX_GPIO
+#endif
+#endif
+
 /* EEPROM */
 #define CONFIG_ID_EEPROM
 #define CONFIG_SYS_I2C_EEPROM_NXID
-- 
2.17.1



[v2 18/33] configs: ls1012afrwy: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for ls1012afrwy

Signed-off-by: Biwen Li 
---
 configs/ls1012afrwy_qspi_SECURE_BOOT_defconfig | 1 +
 configs/ls1012afrwy_qspi_defconfig | 1 +
 configs/ls1012afrwy_tfa_SECURE_BOOT_defconfig  | 1 +
 configs/ls1012afrwy_tfa_defconfig  | 1 +
 4 files changed, 4 insertions(+)

diff --git a/configs/ls1012afrwy_qspi_SECURE_BOOT_defconfig 
b/configs/ls1012afrwy_qspi_SECURE_BOOT_defconfig
index a0217fdd85..2cc4cd3fb8 100644
--- a/configs/ls1012afrwy_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1012afrwy_qspi_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1012afrwy_qspi_defconfig 
b/configs/ls1012afrwy_qspi_defconfig
index 6b8212c76d..9def6655b5 100644
--- a/configs/ls1012afrwy_qspi_defconfig
+++ b/configs/ls1012afrwy_qspi_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1012afrwy_tfa_SECURE_BOOT_defconfig 
b/configs/ls1012afrwy_tfa_SECURE_BOOT_defconfig
index b85513115f..3d5407d928 100644
--- a/configs/ls1012afrwy_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1012afrwy_tfa_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1012afrwy_tfa_defconfig 
b/configs/ls1012afrwy_tfa_defconfig
index b773738a6b..30a7ed889d 100644
--- a/configs/ls1012afrwy_tfa_defconfig
+++ b/configs/ls1012afrwy_tfa_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
-- 
2.17.1



[v2 19/33] configs: ls1012ardb: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for ls1012ardb

Signed-off-by: Biwen Li 
---
 configs/ls1012ardb_qspi_SECURE_BOOT_defconfig | 1 +
 configs/ls1012ardb_qspi_defconfig | 1 +
 configs/ls1012ardb_tfa_SECURE_BOOT_defconfig  | 1 +
 configs/ls1012ardb_tfa_defconfig  | 1 +
 4 files changed, 4 insertions(+)

diff --git a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig 
b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
index be59d29dc2..ade297a0a1 100644
--- a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1012ardb_qspi_defconfig 
b/configs/ls1012ardb_qspi_defconfig
index e6742ecb21..2967877da3 100644
--- a/configs/ls1012ardb_qspi_defconfig
+++ b/configs/ls1012ardb_qspi_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1012ardb_tfa_SECURE_BOOT_defconfig 
b/configs/ls1012ardb_tfa_SECURE_BOOT_defconfig
index fdf4703d20..168d4f759f 100644
--- a/configs/ls1012ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1012ardb_tfa_SECURE_BOOT_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1012ardb_tfa_defconfig b/configs/ls1012ardb_tfa_defconfig
index 42bfa9b188..d38272d051 100644
--- a/configs/ls1012ardb_tfa_defconfig
+++ b/configs/ls1012ardb_tfa_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
-- 
2.17.1



[v2 20/33] configs: ls1021aqds: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board ls1021aqds

Signed-off-by: Biwen Li 
---
 configs/ls1021aqds_ddr4_nor_defconfig| 1 +
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig | 1 +
 configs/ls1021aqds_nand_defconfig| 1 +
 configs/ls1021aqds_nor_SECURE_BOOT_defconfig | 1 +
 configs/ls1021aqds_nor_defconfig | 1 +
 configs/ls1021aqds_nor_lpuart_defconfig  | 1 +
 configs/ls1021aqds_qspi_defconfig| 1 +
 configs/ls1021aqds_sdcard_ifc_defconfig  | 1 +
 configs/ls1021aqds_sdcard_qspi_defconfig | 1 +
 9 files changed, 9 insertions(+)

diff --git a/configs/ls1021aqds_ddr4_nor_defconfig 
b/configs/ls1021aqds_ddr4_nor_defconfig
index a581f9bdc0..4053a4e406 100644
--- a/configs/ls1021aqds_ddr4_nor_defconfig
+++ b/configs/ls1021aqds_ddr4_nor_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1021aqds_ddr4_nor_lpuart_defconfig 
b/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
index 1bba6f5250..095bc0e3f5 100644
--- a/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
+++ b/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1021aqds_nand_defconfig 
b/configs/ls1021aqds_nand_defconfig
index c32f5e1948..d8abdb917b 100644
--- a/configs/ls1021aqds_nand_defconfig
+++ b/configs/ls1021aqds_nand_defconfig
@@ -40,6 +40,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1021aqds_nor_SECURE_BOOT_defconfig 
b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
index ea490708cc..7e1ed5c591 100644
--- a/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
+++ b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1021aqds_nor_defconfig b/configs/ls1021aqds_nor_defconfig
index 7ba5d2d07c..216d0fc470 100644
--- a/configs/ls1021aqds_nor_defconfig
+++ b/configs/ls1021aqds_nor_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1021aqds_nor_lpuart_defconfig 
b/configs/ls1021aqds_nor_lpuart_defconfig
index 13ce8588d3..7bb003142d 100644
--- a/configs/ls1021aqds_nor_lpuart_defconfig
+++ b/configs/ls1021aqds_nor_lpuart_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1021aqds_qspi_defconfig 
b/configs/ls1021aqds_qspi_defconfig
index dcf0dbb4a6..a606e2ac7c 100644
--- a/configs/ls1021aqds_qspi_defconfig
+++ b/configs/ls1021aqds_qspi_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls1021aqds_sdcard_ifc_defconfig 
b/configs/ls1021aqds_sdcard_ifc_defconfig
index 5e6f531ee8..1b2d016901 100644
--- a/configs/ls1021aqds_sdcard_ifc_defconfig
+++ b/configs/ls1021aqds_sdcard_ifc_defconfig
@@ -38,6 +38,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1021aqds_sdcard_qspi_defconfig 
b/configs/ls1021aqds_sdcard_qspi_defconfig
index 5477d702b2..3f08c28034 100644
--- a/configs/ls1021aqds_sdcard_qspi_defconfig
+++ b/configs/ls1021aqds_sdcard_qspi_defconfig
@@ -37,6 +37,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
-- 
2.17.1



[v2 21/33] configs: ls1021atwr: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for ls1021atwr

Signed-off-by: Biwen Li 
---
 configs/ls1021atwr_nor_SECURE_BOOT_defconfig| 1 +
 configs/ls1021atwr_nor_defconfig| 1 +
 configs/ls1021atwr_nor_lpuart_defconfig | 1 +
 configs/ls1021atwr_qspi_defconfig   | 1 +
 configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig | 1 +
 configs/ls1021atwr_sdcard_ifc_defconfig | 1 +
 configs/ls1021atwr_sdcard_qspi_defconfig| 1 +
 7 files changed, 7 insertions(+)

diff --git a/configs/ls1021atwr_nor_SECURE_BOOT_defconfig 
b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
index f13428d4f0..59c537ad7a 100644
--- a/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
+++ b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls1021atwr_nor_defconfig b/configs/ls1021atwr_nor_defconfig
index a17b66ea4c..8108d160f7 100644
--- a/configs/ls1021atwr_nor_defconfig
+++ b/configs/ls1021atwr_nor_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls1021atwr_nor_lpuart_defconfig 
b/configs/ls1021atwr_nor_lpuart_defconfig
index 10ce045445..91767e0a9f 100644
--- a/configs/ls1021atwr_nor_lpuart_defconfig
+++ b/configs/ls1021atwr_nor_lpuart_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls1021atwr_qspi_defconfig 
b/configs/ls1021atwr_qspi_defconfig
index bd9dc934a0..e08f77f06f 100644
--- a/configs/ls1021atwr_qspi_defconfig
+++ b/configs/ls1021atwr_qspi_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig 
b/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig
index 41b16758f5..e51dab0788 100644
--- a/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig
+++ b/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig
@@ -41,6 +41,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls1021atwr_sdcard_ifc_defconfig 
b/configs/ls1021atwr_sdcard_ifc_defconfig
index 5a40bb213a..60e907a2b4 100644
--- a/configs/ls1021atwr_sdcard_ifc_defconfig
+++ b/configs/ls1021atwr_sdcard_ifc_defconfig
@@ -40,6 +40,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls1021atwr_sdcard_qspi_defconfig 
b/configs/ls1021atwr_sdcard_qspi_defconfig
index 957790288d..3365d7399c 100644
--- a/configs/ls1021atwr_sdcard_qspi_defconfig
+++ b/configs/ls1021atwr_sdcard_qspi_defconfig
@@ -39,6 +39,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
-- 
2.17.1



[v2 22/33] configs: ls1028aqds: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board ls1028aqds

Signed-off-by: Biwen Li 
---
 configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 1 +
 configs/ls1028aqds_tfa_defconfig | 1 +
 configs/ls1028aqds_tfa_lpuart_defconfig  | 1 +
 3 files changed, 3 insertions(+)

diff --git a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig 
b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig
index 14c49cd0d6..7e75a2f121 100644
--- a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1028aqds_tfa_defconfig b/configs/ls1028aqds_tfa_defconfig
index 09a6923708..886556b600 100644
--- a/configs/ls1028aqds_tfa_defconfig
+++ b/configs/ls1028aqds_tfa_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1028aqds_tfa_lpuart_defconfig 
b/configs/ls1028aqds_tfa_lpuart_defconfig
index a3749b5627..1ec187d260 100644
--- a/configs/ls1028aqds_tfa_lpuart_defconfig
+++ b/configs/ls1028aqds_tfa_lpuart_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
-- 
2.17.1



[v2 23/33] configs: ls1028ardb: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board ls1028ardb

Signed-off-by: Biwen Li 
---
 configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 1 +
 configs/ls1028ardb_tfa_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig 
b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig
index b034580aef..1f53f436df 100644
--- a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1028ardb_tfa_defconfig b/configs/ls1028ardb_tfa_defconfig
index 4bed352420..eb501be091 100644
--- a/configs/ls1028ardb_tfa_defconfig
+++ b/configs/ls1028ardb_tfa_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
-- 
2.17.1



[v2 24/33] configs: ls1043aqds: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board ls1043aqds

Signed-off-by: Biwen Li 
---
 configs/ls1043aqds_defconfig | 1 +
 configs/ls1043aqds_lpuart_defconfig  | 1 +
 configs/ls1043aqds_nand_defconfig| 1 +
 configs/ls1043aqds_nor_ddr3_defconfig| 1 +
 configs/ls1043aqds_qspi_defconfig| 1 +
 configs/ls1043aqds_sdcard_ifc_defconfig  | 1 +
 configs/ls1043aqds_sdcard_qspi_defconfig | 1 +
 configs/ls1043aqds_tfa_SECURE_BOOT_defconfig | 1 +
 configs/ls1043aqds_tfa_defconfig | 1 +
 9 files changed, 9 insertions(+)

diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig
index b24a316e49..b4e100dfa7 100644
--- a/configs/ls1043aqds_defconfig
+++ b/configs/ls1043aqds_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043aqds_lpuart_defconfig 
b/configs/ls1043aqds_lpuart_defconfig
index 805e69d8b2..647cf311fb 100644
--- a/configs/ls1043aqds_lpuart_defconfig
+++ b/configs/ls1043aqds_lpuart_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043aqds_nand_defconfig 
b/configs/ls1043aqds_nand_defconfig
index 6b8c77b614..a7aad4a19f 100644
--- a/configs/ls1043aqds_nand_defconfig
+++ b/configs/ls1043aqds_nand_defconfig
@@ -40,6 +40,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043aqds_nor_ddr3_defconfig 
b/configs/ls1043aqds_nor_ddr3_defconfig
index 5c07c912cd..6f303fbed4 100644
--- a/configs/ls1043aqds_nor_ddr3_defconfig
+++ b/configs/ls1043aqds_nor_ddr3_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043aqds_qspi_defconfig 
b/configs/ls1043aqds_qspi_defconfig
index 6188ac5e43..32e894760e 100644
--- a/configs/ls1043aqds_qspi_defconfig
+++ b/configs/ls1043aqds_qspi_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls1043aqds_sdcard_ifc_defconfig 
b/configs/ls1043aqds_sdcard_ifc_defconfig
index a6e77fc4f6..65aa811757 100644
--- a/configs/ls1043aqds_sdcard_ifc_defconfig
+++ b/configs/ls1043aqds_sdcard_ifc_defconfig
@@ -40,6 +40,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043aqds_sdcard_qspi_defconfig 
b/configs/ls1043aqds_sdcard_qspi_defconfig
index b426569aab..ddd6b1b1f6 100644
--- a/configs/ls1043aqds_sdcard_qspi_defconfig
+++ b/configs/ls1043aqds_sdcard_qspi_defconfig
@@ -39,6 +39,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig 
b/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig
index 1e3ac53070..faf0142eff 100644
--- a/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043aqds_tfa_defconfig b/configs/ls1043aqds_tfa_defconfig
index 43ac60e18b..ecb0b8daf0 100644
--- a/configs/ls1043aqds_tfa_defconfig
+++ b/configs/ls1043aqds_tfa_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
-- 
2.17.1



[v2 25/33] configs: ls1043ardb: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board ls1043ardb

Signed-off-by: Biwen Li 
---
 configs/ls1043ardb_SECURE_BOOT_defconfig| 1 +
 configs/ls1043ardb_defconfig| 1 +
 configs/ls1043ardb_nand_SECURE_BOOT_defconfig   | 1 +
 configs/ls1043ardb_nand_defconfig   | 1 +
 configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig | 1 +
 configs/ls1043ardb_sdcard_defconfig | 1 +
 configs/ls1043ardb_tfa_SECURE_BOOT_defconfig| 1 +
 configs/ls1043ardb_tfa_defconfig| 1 +
 8 files changed, 8 insertions(+)

diff --git a/configs/ls1043ardb_SECURE_BOOT_defconfig 
b/configs/ls1043ardb_SECURE_BOOT_defconfig
index 22277a8eb3..c1cede2c59 100644
--- a/configs/ls1043ardb_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_SECURE_BOOT_defconfig
@@ -17,6 +17,7 @@ CONFIG_MISC_INIT_R=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index f32573d98e..c45dc20d72 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -17,6 +17,7 @@ CONFIG_MISC_INIT_R=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig 
b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
index 84b2950bd6..cfa4ea161d 100644
--- a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
@@ -35,6 +35,7 @@ CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043ardb_nand_defconfig 
b/configs/ls1043ardb_nand_defconfig
index bb0e2bf419..0fab89c5f0 100644
--- a/configs/ls1043ardb_nand_defconfig
+++ b/configs/ls1043ardb_nand_defconfig
@@ -35,6 +35,7 @@ CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig 
b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
index 34cbd24d0b..849f0d7938 100644
--- a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
@@ -35,6 +35,7 @@ CONFIG_CMD_IMLS=y
 CONFIG_CMD_SPL=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043ardb_sdcard_defconfig 
b/configs/ls1043ardb_sdcard_defconfig
index ff2e669905..f500420338 100644
--- a/configs/ls1043ardb_sdcard_defconfig
+++ b/configs/ls1043ardb_sdcard_defconfig
@@ -34,6 +34,7 @@ CONFIG_CMD_IMLS=y
 CONFIG_CMD_SPL=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043ardb_tfa_SECURE_BOOT_defconfig 
b/configs/ls1043ardb_tfa_SECURE_BOOT_defconfig
index 93f9b9a981..e8976304c1 100644
--- a/configs/ls1043ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_tfa_SECURE_BOOT_defconfig
@@ -19,6 +19,7 @@ CONFIG_MISC_INIT_R=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1043ardb_tfa_defconfig b/configs/ls1043ardb_tfa_defconfig
index a74f124107..4b1f679acb 100644
--- a/configs/ls1043ardb_tfa_defconfig
+++ b/configs/ls1043ardb_tfa_defconfig
@@ -20,6 +20,7 @@ CONFIG_MISC_INIT_R=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
-- 
2.17.1



[v2 26/33] configs: ls1046ardb: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board ls1046ardb

Signed-off-by: Biwen Li 
---
 configs/ls1046ardb_emmc_defconfig   | 1 +
 configs/ls1046ardb_qspi_SECURE_BOOT_defconfig   | 1 +
 configs/ls1046ardb_qspi_defconfig   | 1 +
 configs/ls1046ardb_qspi_spl_defconfig   | 1 +
 configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig | 1 +
 configs/ls1046ardb_sdcard_defconfig | 1 +
 configs/ls1046ardb_tfa_SECURE_BOOT_defconfig| 1 +
 configs/ls1046ardb_tfa_defconfig| 1 +
 8 files changed, 8 insertions(+)

diff --git a/configs/ls1046ardb_emmc_defconfig 
b/configs/ls1046ardb_emmc_defconfig
index efb88d034f..49b26c1d26 100644
--- a/configs/ls1046ardb_emmc_defconfig
+++ b/configs/ls1046ardb_emmc_defconfig
@@ -35,6 +35,7 @@ CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig 
b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
index 50356dca88..8be734b8a4 100644
--- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
@@ -19,6 +19,7 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21
 CONFIG_MISC_INIT_R=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046ardb_qspi_defconfig 
b/configs/ls1046ardb_qspi_defconfig
index ac1d5abf36..d494c650af 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -20,6 +20,7 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21
 CONFIG_MISC_INIT_R=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046ardb_qspi_spl_defconfig 
b/configs/ls1046ardb_qspi_spl_defconfig
index b1ac6e0a89..91319c6f0d 100644
--- a/configs/ls1046ardb_qspi_spl_defconfig
+++ b/configs/ls1046ardb_qspi_spl_defconfig
@@ -38,6 +38,7 @@ CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_CMD_SPL=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig 
b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
index 525caa6881..0a2c71f919 100644
--- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
@@ -34,6 +34,7 @@ CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046ardb_sdcard_defconfig 
b/configs/ls1046ardb_sdcard_defconfig
index 069b2282b8..a10262e0b4 100644
--- a/configs/ls1046ardb_sdcard_defconfig
+++ b/configs/ls1046ardb_sdcard_defconfig
@@ -34,6 +34,7 @@ CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig 
b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig
index a4b67a5ca9..a7c68feca9 100644
--- a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig
@@ -20,6 +20,7 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21
 CONFIG_MISC_INIT_R=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046ardb_tfa_defconfig b/configs/ls1046ardb_tfa_defconfig
index 4ed3317018..f8572ccd79 100644
--- a/configs/ls1046ardb_tfa_defconfig
+++ b/configs/ls1046ardb_tfa_defconfig
@@ -21,6 +21,7 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21
 CONFIG_MISC_INIT_R=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
-- 
2.17.1



[v2 27/33] configs: ls1046aqds: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board ls1046aqds

Signed-off-by: Biwen Li 
---
 configs/ls1046aqds_SECURE_BOOT_defconfig | 1 +
 configs/ls1046aqds_defconfig | 1 +
 configs/ls1046aqds_lpuart_defconfig  | 1 +
 configs/ls1046aqds_nand_defconfig| 1 +
 configs/ls1046aqds_qspi_defconfig| 1 +
 configs/ls1046aqds_sdcard_ifc_defconfig  | 1 +
 configs/ls1046aqds_sdcard_qspi_defconfig | 1 +
 configs/ls1046aqds_tfa_SECURE_BOOT_defconfig | 1 +
 configs/ls1046aqds_tfa_defconfig | 1 +
 9 files changed, 9 insertions(+)

diff --git a/configs/ls1046aqds_SECURE_BOOT_defconfig 
b/configs/ls1046aqds_SECURE_BOOT_defconfig
index ff0f1ccfc4..da63214b55 100644
--- a/configs/ls1046aqds_SECURE_BOOT_defconfig
+++ b/configs/ls1046aqds_SECURE_BOOT_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046aqds_defconfig b/configs/ls1046aqds_defconfig
index 10a23af7b6..13310e5d3a 100644
--- a/configs/ls1046aqds_defconfig
+++ b/configs/ls1046aqds_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046aqds_lpuart_defconfig 
b/configs/ls1046aqds_lpuart_defconfig
index 6b07708cae..7ed38abd09 100644
--- a/configs/ls1046aqds_lpuart_defconfig
+++ b/configs/ls1046aqds_lpuart_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046aqds_nand_defconfig 
b/configs/ls1046aqds_nand_defconfig
index 03be431622..9e54ed0392 100644
--- a/configs/ls1046aqds_nand_defconfig
+++ b/configs/ls1046aqds_nand_defconfig
@@ -33,6 +33,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046aqds_qspi_defconfig 
b/configs/ls1046aqds_qspi_defconfig
index deb6ac19a7..1e77ac9d3c 100644
--- a/configs/ls1046aqds_qspi_defconfig
+++ b/configs/ls1046aqds_qspi_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1046aqds_sdcard_ifc_defconfig 
b/configs/ls1046aqds_sdcard_ifc_defconfig
index 4ea8142265..ffe3c6b314 100644
--- a/configs/ls1046aqds_sdcard_ifc_defconfig
+++ b/configs/ls1046aqds_sdcard_ifc_defconfig
@@ -41,6 +41,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046aqds_sdcard_qspi_defconfig 
b/configs/ls1046aqds_sdcard_qspi_defconfig
index b031fce4e1..808625197e 100644
--- a/configs/ls1046aqds_sdcard_qspi_defconfig
+++ b/configs/ls1046aqds_sdcard_qspi_defconfig
@@ -40,6 +40,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls1046aqds_tfa_SECURE_BOOT_defconfig 
b/configs/ls1046aqds_tfa_SECURE_BOOT_defconfig
index 49f9cb4b10..d1ce22aca2 100644
--- a/configs/ls1046aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1046aqds_tfa_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1046aqds_tfa_defconfig b/configs/ls1046aqds_tfa_defconfig
index 547848ffeb..95aabde52b 100644
--- a/configs/ls1046aqds_tfa_defconfig
+++ b/configs/ls1046aqds_tfa_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
-- 
2.17.1



[v2 28/33] configs: ls2088ardb: enable DM_GPIO and CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable DM_GPIO and CMD_GPIO for board ls2088ardb

Signed-off-by: Biwen Li 
---
 configs/ls2088ardb_qspi_SECURE_BOOT_defconfig | 2 ++
 configs/ls2088ardb_qspi_defconfig | 2 ++
 configs/ls2088ardb_tfa_SECURE_BOOT_defconfig  | 1 +
 configs/ls2088ardb_tfa_defconfig  | 1 +
 4 files changed, 6 insertions(+)

diff --git a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig 
b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
index 4dbdc1fcb1..7d7443e6f4 100644
--- a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
@@ -17,9 +17,11 @@ CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=10
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_MISC_INIT_R=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/ls2088ardb_qspi_defconfig 
b/configs/ls2088ardb_qspi_defconfig
index f81e2ae6de..58757f2db7 100644
--- a/configs/ls2088ardb_qspi_defconfig
+++ b/configs/ls2088ardb_qspi_defconfig
@@ -20,9 +20,11 @@ CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS1,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21c0600 ramdisk_size=0x200 default_hugepagesz=2m 
hugepagesz=2m hugepages=256"
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_MISC_INIT_R=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig 
b/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig
index ccf79c1e64..bd7b4dfdae 100644
--- a/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls2088ardb_tfa_defconfig b/configs/ls2088ardb_tfa_defconfig
index 4277f9cb72..2c60c85cba 100644
--- a/configs/ls2088ardb_tfa_defconfig
+++ b/configs/ls2088ardb_tfa_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
-- 
2.17.1



[v2 29/33] configs: ls2088aqds: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board ls2088aqds

Signed-off-by: Biwen Li 
---
 configs/ls2088aqds_tfa_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/ls2088aqds_tfa_defconfig b/configs/ls2088aqds_tfa_defconfig
index 9e6e9f63ad..f5e8cfbeb4 100644
--- a/configs/ls2088aqds_tfa_defconfig
+++ b/configs/ls2088aqds_tfa_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
-- 
2.17.1



[v2 30/33] configs: ls1088aqds: enable DM_GPIO and CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable DM_GPIO and CMD_GPIO for board ls1088aqds

Signed-off-by: Biwen Li 
---
 configs/ls1088aqds_defconfig  | 2 ++
 configs/ls1088aqds_qspi_SECURE_BOOT_defconfig | 2 ++
 configs/ls1088aqds_qspi_defconfig | 2 ++
 configs/ls1088aqds_sdcard_ifc_defconfig   | 2 ++
 configs/ls1088aqds_sdcard_qspi_defconfig  | 2 ++
 configs/ls1088aqds_tfa_defconfig  | 1 +
 6 files changed, 11 insertions(+)

diff --git a/configs/ls1088aqds_defconfig b/configs/ls1088aqds_defconfig
index e95e871445..f777fc64df 100644
--- a/configs/ls1088aqds_defconfig
+++ b/configs/ls1088aqds_defconfig
@@ -20,9 +20,11 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_HUSH_PARSER=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig 
b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
index a053ea86a7..bd6f364bd9 100644
--- a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
@@ -22,9 +22,11 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21
 # CONFIG_USE_BOOTCOMMAND is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1088aqds_qspi_defconfig 
b/configs/ls1088aqds_qspi_defconfig
index 2b0d21d208..c03a9648ec 100644
--- a/configs/ls1088aqds_qspi_defconfig
+++ b/configs/ls1088aqds_qspi_defconfig
@@ -23,9 +23,11 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21
 # CONFIG_USE_BOOTCOMMAND is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1088aqds_sdcard_ifc_defconfig 
b/configs/ls1088aqds_sdcard_ifc_defconfig
index 725f6bb0bb..e3ef9340a9 100644
--- a/configs/ls1088aqds_sdcard_ifc_defconfig
+++ b/configs/ls1088aqds_sdcard_ifc_defconfig
@@ -31,9 +31,11 @@ CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
 CONFIG_HUSH_PARSER=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1088aqds_sdcard_qspi_defconfig 
b/configs/ls1088aqds_sdcard_qspi_defconfig
index e775e490b1..549e8242a5 100644
--- a/configs/ls1088aqds_sdcard_qspi_defconfig
+++ b/configs/ls1088aqds_sdcard_qspi_defconfig
@@ -33,9 +33,11 @@ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x8b0
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ls1088aqds_tfa_defconfig b/configs/ls1088aqds_tfa_defconfig
index 019d8995ed..9c65c49f3b 100644
--- a/configs/ls1088aqds_tfa_defconfig
+++ b/configs/ls1088aqds_tfa_defconfig
@@ -29,6 +29,7 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
-- 
2.17.1



[v2 31/33] configs: ls1088ardb: enable DM_GPIO and CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable DM_GPIO and CMD_GPIO for board ls1088ardb

Signed-off-by: Biwen Li 
---
 configs/ls1088ardb_qspi_SECURE_BOOT_defconfig| 2 ++
 configs/ls1088ardb_qspi_defconfig| 2 ++
 configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig | 2 ++
 configs/ls1088ardb_sdcard_qspi_defconfig | 2 ++
 configs/ls1088ardb_tfa_SECURE_BOOT_defconfig | 1 +
 configs/ls1088ardb_tfa_defconfig | 1 +
 6 files changed, 10 insertions(+)

diff --git a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig 
b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
index b4fdc00aa5..2c461816bc 100644
--- a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
@@ -23,6 +23,7 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_MISC_INIT_R=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
@@ -39,6 +40,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_CMD_GPIO=y
 CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_DM_MMC=y
diff --git a/configs/ls1088ardb_qspi_defconfig 
b/configs/ls1088ardb_qspi_defconfig
index 40fe7c4520..f474119d59 100644
--- a/configs/ls1088ardb_qspi_defconfig
+++ b/configs/ls1088ardb_qspi_defconfig
@@ -24,6 +24,7 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_MISC_INIT_R=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
@@ -42,6 +43,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_ADDR=0x2030
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_CMD_GPIO=y
 CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_DM_MMC=y
diff --git a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig 
b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
index 9c7a85fe62..83b99e1236 100644
--- a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
@@ -35,6 +35,7 @@ CONFIG_SPL_HASH_SUPPORT=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
@@ -52,6 +53,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_CMD_GPIO=y
 CONFIG_SPL_DM=y
 CONFIG_SCSI_AHCI=y
 CONFIG_FSL_ESDHC=y
diff --git a/configs/ls1088ardb_sdcard_qspi_defconfig 
b/configs/ls1088ardb_sdcard_qspi_defconfig
index d409ef3f94..7f49253f53 100644
--- a/configs/ls1088ardb_sdcard_qspi_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_defconfig
@@ -34,6 +34,7 @@ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x8b0
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_DM_GPIO=y
 CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MEMTEST=y
@@ -52,6 +53,7 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_CMD_GPIO=y
 CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_DM_MMC=y
diff --git a/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig 
b/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig
index 6a07577015..095a85bb59 100644
--- a/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig
@@ -41,6 +41,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_CMD_GPIO=y
 CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_DM_I2C=y
diff --git a/configs/ls1088ardb_tfa_defconfig b/configs/ls1088ardb_tfa_defconfig
index d9b11eba71..49a49cd6d9 100644
--- a/configs/ls1088ardb_tfa_defconfig
+++ b/configs/ls1088ardb_tfa_defconfig
@@ -46,6 +46,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_ADDR=0x2050
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_CMD_GPIO=y
 CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_DM_I2C=y
-- 
2.17.1



[v2 32/33] configs: lx2160ardb: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board lx2160ardb

Signed-off-by: Biwen Li 
---
 configs/lx2160ardb_tfa_SECURE_BOOT_defconfig | 1 +
 configs/lx2160ardb_tfa_defconfig | 1 +
 configs/lx2160ardb_tfa_stmm_defconfig| 1 +
 3 files changed, 3 insertions(+)

diff --git a/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig 
b/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig
index b2912e418b..c277c7dcf3 100644
--- a/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/lx2160ardb_tfa_defconfig b/configs/lx2160ardb_tfa_defconfig
index 5a9e2e776e..bcb65fd3ab 100644
--- a/configs/lx2160ardb_tfa_defconfig
+++ b/configs/lx2160ardb_tfa_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_OPTEE_RPMB=y
diff --git a/configs/lx2160ardb_tfa_stmm_defconfig 
b/configs/lx2160ardb_tfa_stmm_defconfig
index 2d7b4af4b2..2a71e97a3c 100644
--- a/configs/lx2160ardb_tfa_stmm_defconfig
+++ b/configs/lx2160ardb_tfa_stmm_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_NVEDIT_EFI=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
-- 
2.17.1



[v2 33/33] configs: lx2160aqds: enable CMD_GPIO

2020-12-08 Thread Biwen Li
From: Biwen Li 

Enable CMD_GPIO for board lx2160aqds

Signed-off-by: Biwen Li 
---
 configs/lx2160aqds_tfa_SECURE_BOOT_defconfig | 1 +
 configs/lx2160aqds_tfa_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig 
b/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig
index a6a3feba93..7d6fc72269 100644
--- a/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
diff --git a/configs/lx2160aqds_tfa_defconfig b/configs/lx2160aqds_tfa_defconfig
index d96c3b129d..7c7d9d726b 100644
--- a/configs/lx2160aqds_tfa_defconfig
+++ b/configs/lx2160aqds_tfa_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DM=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
-- 
2.17.1



Re: [PATCH 01/14] qemu: arm: Use the generated DTB only when CONGIG_OF_BOARD is defined

2020-12-08 Thread Heinrich Schuchardt
On 08.12.20 06:28, Sughosh Ganu wrote:
>
> On Mon, 7 Dec 2020 at 23:28, Heinrich Schuchardt  > wrote:
>
> On 07.12.20 13:50, Heinrich Schuchardt wrote:
> > On 07.12.20 06:15, Sughosh Ganu wrote:
> >> hello Heinrich,
> >>
> >> On Sat, 5 Dec 2020 at 15:01, Heinrich Schuchardt
> mailto:xypron.g...@gmx.de>
> >> >> wrote:
> >>
> >>     On 11/26/20 7:40 PM, Sughosh Ganu wrote:
> >>     > The Qemu platform emulator generates a device tree blob and
> places it
> >>     > at the start of the dram, which is then used by u-boot. Use
> this dtb
> >>     > only if CONFIG_OF_BOARD is defined. This allows using a
> different
> >>     > device tree, using the CONFIG_OF_SEPARATE option. This dtb
> is attached
> >>     > to the u-boot binary as a u-boot-fdt.bin file
> >>
> >>     Dear Sughosh,
> >>
> >>     thank your for this series which will allow us to better
> demonstrate and
> >>     test capsule updates.
> >>
> >>     I am not sure if the approach that you take at device-trees
> here is the
> >>     right one.
> >>
> >>     On QEMU the device-tree is generated on the fly by the QEMU
> binary
> >>     depending on which devices the user has specified.
> >>
> >>     Your idea is to replace this device-tree completely to be
> able to add
> >>     extra elements (the EFI signature list, see patch 2/14). Thus a
> >>     device-tree might be loaded that does not match the user selected
> >>     devices.
> >>
> >>     An alternative approach would be to apply all additions to the
> >>     device-tree as an FDT overlay (or fixup). This would allow
> the dynamic
> >>     parts of the QEMU device-tree still to be passed through.
> >>
> >>
> >> I will take a look at storing the public key as part of the fdt
> overlay,
> >> with a runtime fixup. Although, I think the issue that you are
> pointing
> >> to would be specific to Qemu and not other platforms. But I do
> see the
> >> merit in having the public-key certificate stored as part of an
> overlay.
> >> If I hit any issues while implementing this, I will get back to
> you. Thanks.
> >>
> >> -sughosh
> >
> > OpenSBI can supply a device-tree to U-Boot. So this would be an
> > equivalent case.
> >
> > Best regards
> >
> > Heinrich
>
> : "I am unable to think of a simple and elegant way to generate
> the overlay dtb, since this would require creation of a corresponding
> dts file, compiling it into a dtb and then using this on the platform."
>
> Jean-Jacques' patch series introduced some of the necessary code:
>
> [PATCH PATCH v6 00/13] Add support for applications of overlays in SPL
> https://lists.denx.de/pipermail/u-boot/2019-October/387653.html
> 
> 
> https://patchwork.ozlabs.org/project/uboot/list/?series=137810&state=%2A&archive=both
> 
> 
>
> CONFIG_OF_OVERLAY_LIST is used to specify the overlays to be compiled.
> You will have to remove the CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY and
> CONFIG_SPL_LOAD_FIT dependency.
>
>
> What i meant was that the process to generate the fdt overlay on the
> host, embed it with the public-key certificate is more cumbersome than
> the current solution. So, for comparing the embedding the pub-key cert
> in the fdt overlay, as against the platform dtb
>
> Embedding the certificate in the overlay
> 1) Generate a skeleton overlay dts file
> 2) Convert it to a dtb
> 3) Run it through the mkeficapsule utility to embed the pub-key
> certificate in the overlay(dtb)
> 4) Store the overlay dtb on some nv storage on the platform(ESP partition?)
> 5) Load the overlay and apply it to the platform's dtb
> 6) Retrieve the certificate from the dtb at the time of capsule
> authentication
>
> Embedding the certificate in the platform's dtb
> 1) Run the platform's dtb through the mkeficapsule utility to embed
> the pub-key certificate
> 2) Boot the platform with the platform's dtb
> 3) Retrieve the certificate from the dtb at the time of capsule
> authentication
>
> You had mentioned OpenSBI passing the dtb to u-boot. Does the OpenSBI
> generate the device tree for the platform on the fly even for non-qemu
> platforms. If it does not, the dtb that OpenSBI uses can be run through
> the mkeficapsule utility to embed the certificate.

OpenSBI applies fix-ups before passing the device-tree. The prototype
device-tree can either be built into OpenSBI or can be passed from an
earlier firmware stage.

Best regards

Heinrich

>
> -sughosh



Re: FW: U-Boot: spl: partition error (stm32mp157)

2020-12-08 Thread Patrick DELAUNAY

Hi,

it seems that the GPT partitionning is not regonized in SPL in part.c;

see the trace:

## Unknown partition table type 0

But you have correclty activate the GPT support in SPL

    CONFIG_SPL_EFI_PARTITION=y

So I uspect read error in sdmmc driver

and no HW isue as ROM code load the SPL, but only 1 wire is used i this case

you can check the SPL device tree / try to reduce the SD card support to 
1 wire and 25MHz.


And activated trace in SDMMC driver / dump the data readen (for the GPT 
header)


regard

Patrick



-Original Message-
From: Patrice CHOTARD - foss 
Sent: mardi 8 décembre 2020 08:37
To: Jagan Teki ; Patrick DELAUNAY 

Cc: U-Boot-Denx 
Subject: Re: U-Boot: spl: partition error (stm32mp157)

Hi Jagan


On 12/7/20 6:46 PM, Jagan Teki wrote:

Hi Patrick,

Not sure, it's an issue with the current tree, or I may miss something.

Any suggestions?

U-Boot SPL 2021.01-rc2-00143-g345dd00160-dirty (Dec 07 2020 - 01:48:44 +0530)
Model: Engicam i.Core STM32MP1 EDIMM2.2 Starter Kit
RAM: DDR3-DDR3L 32bits 528000Khz
WDT:   Start## Unknown partition table type 0ed with servicing (60s timeout)
## Unknown partition table type 0
spl: partition error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Disk /dev/sda: 29.83 GiB, 32010928128 bytes, 62521344 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6524CDDB-929F-4A12-96B2-C04F07403931

Device Start  End  Sectors  Size Type
/dev/sda1 34  545  512  256K Linux filesystem
/dev/sda2546 1057  512  256K Linux filesystem
/dev/sda3   1058 5153 40962M Linux filesystem
/dev/sda4   5154 62521310 62516157 29.8G Linux filesystem

I am not sure that the 3 first partition are using the correct filesystem type.

Do you follow indications in ./doc/board/st/stm32mp1.rst and more precisely the 
"Prepare an SD card" chapter ?

Thanks



$ sudo dd if=u-boot-spl.stm32 of=/dev/sda1
$ sudo dd if=u-boot-spl.stm32 of=/dev/sda2
$ sudo dd if=u-boot.img of=/dev/sda3

.config:

#
# Automatically generated file; DO NOT EDIT.
# U-Boot 2021.01-rc2 Configuration
#

#
# Compiler: arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot
2020.08-849-gdcd4b75069-dirty) 9.3.0
#
CONFIG_CREATE_ARCH_SYMLINK=y
# CONFIG_ARC is not set
CONFIG_ARM=y
# CONFIG_M68K is not set
# CONFIG_MICROBLAZE is not set
# CONFIG_MIPS is not set
# CONFIG_NDS32 is not set
# CONFIG_NIOS2 is not set
# CONFIG_PPC is not set
# CONFIG_RISCV is not set
# CONFIG_SANDBOX is not set
# CONFIG_SH is not set
# CONFIG_X86 is not set
# CONFIG_XTENSA is not set
CONFIG_SYS_ARCH="arm"
CONFIG_SYS_CPU="armv7"
CONFIG_SYS_SOC="stm32mp"
CONFIG_SYS_VENDOR="engicam"
CONFIG_SYS_BOARD="stm32mp1"
CONFIG_SYS_CONFIG_NAME="stm32mp1"
# CONFIG_SYS_ICACHE_OFF is not set
# CONFIG_SPL_SYS_ICACHE_OFF is not set
# CONFIG_SYS_DCACHE_OFF is not set
# CONFIG_SPL_SYS_DCACHE_OFF is not set

#
# ARM architecture
#
# CONFIG_GIC_V3_ITS is not set
CONFIG_HAS_VBAR=y
CONFIG_HAS_THUMB2=y
CONFIG_ARM_ASM_UNIFIED=y
CONFIG_SYS_ARM_CACHE_CP15=y
CONFIG_SYS_ARM_MMU=y
# CONFIG_SYS_ARM_MPU is not set
CONFIG_CPU_V7A=y
CONFIG_SYS_ARM_ARCH=7
CONFIG_SYS_CACHE_SHIFT_6=y
CONFIG_SYS_CACHELINE_SIZE=64
CONFIG_SYS_ARM_CACHE_WRITEBACK=y
# CONFIG_SYS_ARM_CACHE_WRITETHROUGH is not set
# CONFIG_SYS_ARM_CACHE_WRITEALLOC is not set
# CONFIG_ARCH_CPU_INIT is not set
CONFIG_SYS_ARCH_TIMER=y
# CONFIG_ARM_SMCCC is not set
# CONFIG_SEMIHOSTING is not set
CONFIG_SYS_THUMB_BUILD=y
CONFIG_SPL_SYS_THUMB_BUILD=y
# CONFIG_SYS_L2CACHE_OFF is not set
# CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set
CONFIG_USE_ARCH_MEMCPY=y
CONFIG_SPL_USE_ARCH_MEMCPY=y
CONFIG_USE_ARCH_MEMSET=y
CONFIG_SPL_USE_ARCH_MEMSET=y
# CONFIG_ARCH_AT91 is not set
# CONFIG_TARGET_EDB93XX is not set
# CONFIG_TARGET_ASPENITE is not set
# CONFIG_TARGET_GPLUGD is not set
# CONFIG_ARCH_DAVINCI is not set
# CONFIG_ARCH_KIRKWOOD is not set
# CONFIG_ARCH_MVEBU is not set
# CONFIG_TARGET_APF27 is not set
# CONFIG_ARCH_ORION5X is not set
# CONFIG_TARGET_SPEAR300 is not set
# CONFIG_TARGET_SPEAR310 is not set
# CONFIG_TARGET_SPEAR320 is not set
# CONFIG_TARGET_SPEAR600 is not set
# CONFIG_TARGET_STV0991 is not set
# CONFIG_TARGET_X600 is not set
# CONFIG_TARGET_FLEA3 is not set
# CONFIG_TARGET_MX35PDK is not set
# CONFIG_ARCH_BCM283X is not set
# CONFIG_ARCH_BCM63158 is not set
# CONFIG_ARCH_BCM68360 is not set
# CONFIG_ARCH_BCM6858 is not set
# CONFIG_TARGET_VEXPRESS_CA15_TC2 is not set
# CONFIG_ARCH_BCMSTB is not set
# CONFIG_TARGET_VEXPRESS_CA5X2 is not set
# CONFIG_TARGET_VEXPRESS_CA9X4 is not set
# CONFIG_TARGET_BCM23550_W1D is not set
# CONFIG_TARGET_BCM28155_AP is not set
# CONFIG_TARGET_BCMCYGNUS is not set
# CONFIG_TARGET_BCMNSP is not set
# CONFIG_TARGET_BCMNS2 is not set
# CONFIG_TARGET_BCMNS3 is not set
# CONFIG_ARCH_EXYNOS is not set
# CONFIG_ARCH_S5PC1XX is not set
# CONFIG_ARCH_H

Re: FW: U-Boot: spl: partition error (stm32mp157)

2020-12-08 Thread Jagan Teki
On Tue, Dec 8, 2020 at 2:42 PM Patrick DELAUNAY
 wrote:
>
> Hi,
>
> it seems that the GPT partitionning is not regonized in SPL in part.c;
>
> see the trace:
>
> ## Unknown partition table type 0
>
> But you have correclty activate the GPT support in SPL
>
>  CONFIG_SPL_EFI_PARTITION=y
>
> So I uspect read error in sdmmc driver
>
> and no HW isue as ROM code load the SPL, but only 1 wire is used i this case
>
> you can check the SPL device tree / try to reduce the SD card support to
> 1 wire and 25MHz.
>
> And activated trace in SDMMC driver / dump the data readen (for the GPT
> header)

Yeah, I missed the u-boot,dm-pre-reloc in one of the pins in
sdmmc1_b4_pins_a.  Able to boot now.

Thanks for the response.

Jagan.


Re: [PATCH 01/14] qemu: arm: Use the generated DTB only when CONGIG_OF_BOARD is defined

2020-12-08 Thread Sughosh Ganu
On Tue, 8 Dec 2020 at 14:32, Heinrich Schuchardt  wrote:

> On 08.12.20 06:28, Sughosh Ganu wrote:
> >
> > On Mon, 7 Dec 2020 at 23:28, Heinrich Schuchardt  > > wrote:
> >
> > On 07.12.20 13:50, Heinrich Schuchardt wrote:
> > > On 07.12.20 06:15, Sughosh Ganu wrote:
> > >> hello Heinrich,
> > >>
> > >> On Sat, 5 Dec 2020 at 15:01, Heinrich Schuchardt
> > mailto:xypron.g...@gmx.de>
> > >> >> wrote:
> > >>
> > >> On 11/26/20 7:40 PM, Sughosh Ganu wrote:
> > >> > The Qemu platform emulator generates a device tree blob and
> > places it
> > >> > at the start of the dram, which is then used by u-boot. Use
> > this dtb
> > >> > only if CONFIG_OF_BOARD is defined. This allows using a
> > different
> > >> > device tree, using the CONFIG_OF_SEPARATE option. This dtb
> > is attached
> > >> > to the u-boot binary as a u-boot-fdt.bin file
> > >>
> > >> Dear Sughosh,
> > >>
> > >> thank your for this series which will allow us to better
> > demonstrate and
> > >> test capsule updates.
> > >>
> > >> I am not sure if the approach that you take at device-trees
> > here is the
> > >> right one.
> > >>
> > >> On QEMU the device-tree is generated on the fly by the QEMU
> > binary
> > >> depending on which devices the user has specified.
> > >>
> > >> Your idea is to replace this device-tree completely to be
> > able to add
> > >> extra elements (the EFI signature list, see patch 2/14). Thus
> a
> > >> device-tree might be loaded that does not match the user
> selected
> > >> devices.
> > >>
> > >> An alternative approach would be to apply all additions to the
> > >> device-tree as an FDT overlay (or fixup). This would allow
> > the dynamic
> > >> parts of the QEMU device-tree still to be passed through.
> > >>
> > >>
> > >> I will take a look at storing the public key as part of the fdt
> > overlay,
> > >> with a runtime fixup. Although, I think the issue that you are
> > pointing
> > >> to would be specific to Qemu and not other platforms. But I do
> > see the
> > >> merit in having the public-key certificate stored as part of an
> > overlay.
> > >> If I hit any issues while implementing this, I will get back to
> > you. Thanks.
> > >>
> > >> -sughosh
> > >
> > > OpenSBI can supply a device-tree to U-Boot. So this would be an
> > > equivalent case.
> > >
> > > Best regards
> > >
> > > Heinrich
> >
> > : "I am unable to think of a simple and elegant way to generate
> > the overlay dtb, since this would require creation of a corresponding
> > dts file, compiling it into a dtb and then using this on the
> platform."
> >
> > Jean-Jacques' patch series introduced some of the necessary code:
> >
> > [PATCH PATCH v6 00/13] Add support for applications of overlays in
> SPL
> > https://lists.denx.de/pipermail/u-boot/2019-October/387653.html
> > 
> >
> https://patchwork.ozlabs.org/project/uboot/list/?series=137810&state=%2A&archive=both
> > <
> https://patchwork.ozlabs.org/project/uboot/list/?series=137810&state=%2A&archive=both
> >
> >
> > CONFIG_OF_OVERLAY_LIST is used to specify the overlays to be
> compiled.
> > You will have to remove the CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY and
> > CONFIG_SPL_LOAD_FIT dependency.
> >
> >
> > What i meant was that the process to generate the fdt overlay on the
> > host, embed it with the public-key certificate is more cumbersome than
> > the current solution. So, for comparing the embedding the pub-key cert
> > in the fdt overlay, as against the platform dtb
> >
> > Embedding the certificate in the overlay
> > 1) Generate a skeleton overlay dts file
> > 2) Convert it to a dtb
> > 3) Run it through the mkeficapsule utility to embed the pub-key
> > certificate in the overlay(dtb)
> > 4) Store the overlay dtb on some nv storage on the platform(ESP
> partition?)
> > 5) Load the overlay and apply it to the platform's dtb
> > 6) Retrieve the certificate from the dtb at the time of capsule
> > authentication
> >
> > Embedding the certificate in the platform's dtb
> > 1) Run the platform's dtb through the mkeficapsule utility to embed
> > the pub-key certificate
> > 2) Boot the platform with the platform's dtb
> > 3) Retrieve the certificate from the dtb at the time of capsule
> > authentication
> >
> > You had mentioned OpenSBI passing the dtb to u-boot. Does the OpenSBI
> > generate the device tree for the platform on the fly even for non-qemu
> > platforms. If it does not, the dtb that OpenSBI uses can be run through
> > the mkeficapsule utility to embed the certificate.
>
> OpenSBI appl

Re: [PATCH 00/18] fs: fat: fix long name support

2020-12-08 Thread Marek Szyprowski
Hi

On 29.11.2020 03:01, Heinrich Schuchardt wrote:
> Since long name support was added to U-Boot's implementation of the
> FAT file system corruption of the directories was observed when running
> the UEFI Self Certifification Test.
>
> The following problems are addressed by this series.
>
> * short names were not unique
> * long names directory entries were not deleted when a file was deleted
> * directory entries released by file deletion were not reused
>
> The first four patches are just resent to indicate the import sequence.

I've noticed some of those FAT issues over a year ago, but I never had 
enough time to start fixing it. Thanks for doing it! Feel free to add:

Acked-by: Marek Szyprowski 

> The following problems need to be addressed in further patches:
>
> * When extending a file only available FAT entries after the last cluster
>of the file are considered. Available FAT entries before are ignored.
> * The case of no FAT entry found is not treated correctly.
> * The free FAT count is not updated on FAT32.
> * Some FAT related tests are not run on Gitlab CI.
> * Add tests to detect directory corruption.
>
> Heinrich Schuchardt (18):
>fs: fat: avoid NULL dereference when root dir is full
>fs: fat: directory entries starting with 0x05
>fs: fat: use ATTR_ARCH instead of anonymous 0x20
>fs: fat: correct first cluster for '..'
>fs: fat: export fat_next_cluster()
>fs: fat: create correct short names
>fs: fat: pass shortname to fill_dir_slot
>fs: fat: call set_name() only once
>fs: fat: generate unique short names
>fs: fat: dentry iterator for fill_dir_slot()
>fs: fat: set start cluster for root directory
>fs: fat: flush new directory cluster
>fs: fat: fat_find_empty_dentries()
>fs: fat: reuse deleted directory entries
>fs: fat: search file should not allocate cluster
>fs: fat: use constant DELETED_FLAG
>fs: fat: first dentry of long name in FAT iterator
>fs: fat: deletion of long file names
>
>   fs/fat/fat.c   | 133 
>   fs/fat/fat_write.c | 532 +
>   include/fat.h  |   7 +-
>   lib/Kconfig|   2 +-
>   4 files changed, 494 insertions(+), 180 deletions(-)
>
> --
> 2.29.2
>
>
Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland



A3720 - Disable slot when eMMC is not present

2020-12-08 Thread Pali Rohár
Hello! I looked at what is initialized and enabled for sd/emmc slots and
I found out that comphy mmc needs to be enabled if at least one slot is
used (e.g. SD card) and then remaining part is slot initialization in
xenon driver.

I wrote quick patch to disable slot when unregistering mmc device from
U-Boot and also unregister emmc on A3720 from U-Boot when it is not
present. But I have not tested it yet.

What do you think about it?

diff --git a/board/Marvell/mvebu_armada-37xx/board.c 
b/board/Marvell/mvebu_armada-37xx/board.c
index f67b04b78c..1b9e7520cc 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -5,6 +5,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -84,12 +85,10 @@ int board_init(void)
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {
+   struct udevice *dev;
struct mmc *mmc_dev;
bool ddr4, emmc;
 
-   if (env_get("fdtfile"))
-   return 0;
-
if (!of_machine_is_compatible("globalscale,espressobin"))
return 0;
 
@@ -101,6 +100,16 @@ int board_late_init(void)
mmc_dev = find_mmc_device(1);
emmc = (mmc_dev && mmc_init(mmc_dev) == 0);
 
+   /* if eMMC is not present then remove it from DM */
+   if (!emmc && mmc_dev) {
+   dev = mmc_dev->dev;
+   device_remove(dev, DM_REMOVE_NORMAL);
+   device_unbind(dev);
+   }
+
+   if (env_get("fdtfile"))
+   return 0;
+
if (ddr4 && emmc)
env_set("fdtfile", 
"marvell/armada-3720-espressobin-v7-emmc.dtb");
else if (ddr4)
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 6ce9d00d0a..da9882cbf6 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -350,6 +350,16 @@ static void xenon_mmc_enable_slot(struct sdhci_host *host, 
u8 slot)
sdhci_writel(host, var, SDHC_SYS_OP_CTRL);
 }
 
+/* Disable specific slot */
+static void xenon_mmc_disable_slot(struct sdhci_host *host, u8 slot)
+{
+   u32 var;
+
+   var = sdhci_readl(host, SDHC_SYS_OP_CTRL);
+   var &= ~(SLOT_MASK(slot) << SLOT_ENABLE_SHIFT);
+   sdhci_writel(host, var, SDHC_SYS_OP_CTRL);
+}
+
 /* Enable Parallel Transfer Mode */
 static void xenon_mmc_enable_parallel_tran(struct sdhci_host *host, u8 slot)
 {
@@ -515,6 +525,14 @@ static int xenon_sdhci_probe(struct udevice *dev)
return ret;
 }
 
+static int xenon_sdhci_remove(struct udevice *dev)
+{
+   struct sdhci_host *host = dev_get_priv(dev);
+
+   xenon_mmc_disable_slot(host, XENON_MMC_SLOT_ID_HYPERION);
+   return 0;
+}
+
 static int xenon_sdhci_ofdata_to_platdata(struct udevice *dev)
 {
struct sdhci_host *host = dev_get_priv(dev);
@@ -564,6 +582,7 @@ U_BOOT_DRIVER(xenon_sdhci_drv) = {
.ops= &sdhci_ops,
.bind   = xenon_sdhci_bind,
.probe  = xenon_sdhci_probe,
+   .remove = xenon_sdhci_remove,
.priv_auto_alloc_size = sizeof(struct xenon_sdhci_priv),
.platdata_auto_alloc_size = sizeof(struct xenon_sdhci_plat),
 };



Re: [PATCH 06/14] qemu: arm64: Set dfu_alt_info variable for the platform

2020-12-08 Thread Tom Rini
On Tue, Dec 08, 2020 at 10:48:57AM +0530, Sughosh Ganu wrote:
> On Tue, 8 Dec 2020 at 00:17, Tom Rini  wrote:
> 
> > On Sat, Dec 05, 2020 at 11:31:49AM +0100, Heinrich Schuchardt wrote:
> > > On 11/26/20 7:41 PM, Sughosh Ganu wrote:
> > > > The dfu framework uses the dfu_alt_info environment variable to get
> > > > information that is needed for performing the firmware update. Set the
> > > > dfu_alt_info for the platform to reflect the two mtd partitions
> > > > created for the u-boot env and the firmware image.
> > > >
> > > > Signed-off-by: Sughosh Ganu 
> > >
> > > I can't see anything QEMU specific in this patch. Why is the code under
> > > board/emulation/?
> > >
> > > Best regards
> > >
> > > Heinrich
> > >
> > > > ---
> > > >   board/emulation/qemu-arm/qemu-arm.c | 55
> > +
> > > >   include/configs/qemu-arm.h  |  1 +
> > > >   2 files changed, 56 insertions(+)
> > > >
> > > > diff --git a/board/emulation/qemu-arm/qemu-arm.c
> > b/board/emulation/qemu-arm/qemu-arm.c
> > > > index d5ed3eebaf..8cad54c76f 100644
> > > > --- a/board/emulation/qemu-arm/qemu-arm.c
> > > > +++ b/board/emulation/qemu-arm/qemu-arm.c
> > > > @@ -200,8 +200,63 @@ void flash_write32(u32 value, void *addr)
> > > >
> > > >   #if defined(CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT)
> > > >
> > > > +#include 
> > > >   #include 
> > > >
> > > > +#define MTDPARTS_LEN   256
> > > > +#define MTDIDS_LEN 128
> > > > +
> > > > +#define DFU_ALT_BUF_LENSZ_1K
> > > > +
> > > > +static void board_get_alt_info(struct mtd_info *mtd, char *buf)
> > > > +{
> > > > +   struct mtd_info *part;
> > > > +   bool first = true;
> > > > +   const char *name;
> > > > +   int len, partnum = 0;
> > > > +
> > > > +   name = mtd->name;
> > > > +   len = strlen(buf);
> > > > +
> > > > +   if (buf[0] != '\0')
> > > > +   len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, "&");
> > > > +   len += snprintf(buf + len, DFU_ALT_BUF_LEN - len,
> > > > +   "mtd %s=", name);
> > > > +
> > > > +   list_for_each_entry(part, &mtd->partitions, node) {
> > > > +   partnum++;
> > > > +   if (!first)
> > > > +   len += snprintf(buf + len, DFU_ALT_BUF_LEN - len,
> > ";");
> > > > +   first = false;
> > > > +
> > > > +   len += snprintf(buf + len, DFU_ALT_BUF_LEN - len,
> > > > +   "%s part %d",
> > > > +   part->name, partnum);
> > > > +   }
> > > > +}
> > > > +
> > > > +void set_dfu_alt_info(char *interface, char *devstr)
> > > > +{
> > > > +   struct mtd_info *mtd;
> > > > +
> > > > +   ALLOC_CACHE_ALIGN_BUFFER(char, buf, DFU_ALT_BUF_LEN);
> > > > +
> > > > +   if (env_get("dfu_alt_info"))
> > > > +   return;
> > > > +
> > > > +   memset(buf, 0, sizeof(buf));
> > > > +
> > > > +   /* probe all MTD devices */
> > > > +   mtd_probe_devices();
> > > > +
> > > > +   mtd = get_mtd_device_nm("nor0");
> > > > +   if (!IS_ERR_OR_NULL(mtd))
> > > > +   board_get_alt_info(mtd, buf);
> > > > +
> > > > +   env_set("dfu_alt_info", buf);
> > > > +   printf("dfu_alt_info set\n");
> > > > +}
> > > > +
> > > >   static void board_get_mtdparts(const char *dev, const char
> > *partition,
> > > >char *mtdids, char *mtdparts)
> > > >   {
> > > > diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h
> > > > index 69ff329434..726f985d35 100644
> > > > --- a/include/configs/qemu-arm.h
> > > > +++ b/include/configs/qemu-arm.h
> > > > @@ -33,6 +33,7 @@
> > > >   #include 
> > > >
> > > >   #if defined(CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT)
> > > > +#define CONFIG_SET_DFU_ALT_INFO
> > > >   #define CONFIG_SYS_MTDPARTS_RUNTIME
> >
> > First, CONFIG_SET_DFU_ALT_INFO is in Kconfig and needs to be enabled
> > that way.
> 
> 
> Will change in the next version.
> 
> 
> > Second, typically we just set the information in the
> > environment part of the header.  This is especially true if in both this
> > case and the previous patch to add mtdparts, we don't really have this
> > being dynamic?  Or are we really expecting / supporting arbitrary sized
> > flash as this is qemu?  Thanks.
> >
> 
> I am not sure I understand this. One thing that can be done is to move the
> setting of the mtd partitions to the Kconfig file, on similar lines to what
> is being done for the st platforms, e.g MTDPARTS_NOR0_TEE. I can move the
> mtd partition definitions to the Kconfig file if that is what you are
> asking for.

Environment manipulation via C code is possible, but discouraged.  What
can be set via Kconfig should be set that way, and what can be put in
the environment part of the header should be done that way.  Does that
help clarify?

-- 
Tom


signature.asc
Description: PGP signature


imx8mp_evk: boot error "alloc space exhausted"

2020-12-08 Thread ZHIZHIKIN Andrey
Hello Peng,

I've tried to boot the i.MX8M Plus EVK with U-Boot 2020.10 and faced the
error message during the boot process, which indicates that the allocation
space in early malloc area is exhausted.

Looking at the log, I was able to bisect it to the commit 28fff3fa1c ("imx:
imx8mp_evk: fix boot issue"), where the CONFIG_SYS_MALLOC_F_LEN has been
reduced from 0x1 to 0x8000 and CONFIG_SPL_SYS_MALLOC_SIMPLE was enabled.

Extract from the patch shows the following diff:
-CONFIG_SYS_MALLOC_F_LEN=0x1
+CONFIG_SYS_MALLOC_F_LEN=0x8000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y


If the CONFIG_SYS_MALLOC_F_LEN is returned to the original value - error
message disappears, and I can observe that the total occupation of early malloc
area (reported via bdinfo) contains following count:
-
u-boot=> bdinfo

Early malloc usage: a648 / 1
-

As it can be seen, the value 0xa648 overflows the imposed limit of 0x8000,
causing 2 allocations after ATF execution to fail.

According to the Patchwork [1], this has been already reported by Fabio but
there was no resolution provided to address this further. Neither the commit
message in 28fff3fa1c provides any additional hint on why those config options
were setup with those values.

V1 of this patch series did not have any config options in it, and the
changelog of v2 is also missing to advise why those options were added to the
series.

Can you please explain why CONFIG_SYS_MALLOC_F_LEN and 
CONFIG_SPL_SYS_MALLOC_SIMPLE
config options were added with that patch, and if it is safe to have them
reverted to the original values?

Another 


Thanks a lot!

Regards,
Andrey


Link: [1]: 
http://patchwork.ozlabs.org/project/uboot/patch/20200512093901.14831-2-peng@nxp.com/


Re: Boot problems imx8mp_evk

2020-12-08 Thread Adam Ford
On Wed, Sep 30, 2020 at 6:06 AM Peter Bergin  wrote:
>
> Hi,
>
> I'm following the README
> (https://gitlab.denx.de/u-boot/u-boot/-/tree/master/board/freescale/imx8mp_evk)
> to bring up u-boot on a imx8mp EVK board. My boot ends up in this on the
> console:
>
>  U-Boot SPL 2020.10-rc5-00049-gd44d46e9fa (Sep 30 2020 - 11:46:20 +0200)
>  Normal Boot
>  WDT:   Started with servicing (60s timeout)
>  Trying to boot from BOOTROM
>  image offset 0x8000, pagesize 0x200, ivt offset 0x0
>  Can't support legacy image
>  SPL: failed to boot from all boot devices
>  ### ERROR ### Please RESET the board ###
>
> Any ideas what is going wrong? How to debug further?
>

I am trying to port U-Boot to an i.MX8M Nano and I am getting the same result.

> Thanks,
> /Peter
>


RE: Boot problems imx8mp_evk

2020-12-08 Thread ZHIZHIKIN Andrey
Hello Adam/Peter,

> -Original Message-
> From: U-Boot  On Behalf Of Adam Ford
> Sent: Tuesday, December 8, 2020 2:48 PM
> To: Peter Bergin 
> Cc: U-Boot Mailing List ; NXP Linux Team  i...@nxp.com>
> Subject: Re: Boot problems imx8mp_evk
> 
> This email is not from Hexagon’s Office 365 instance. Please be careful while
> clicking links, opening attachments, or replying to this email.
> 
> 
> On Wed, Sep 30, 2020 at 6:06 AM Peter Bergin  wrote:
> >
> > Hi,
> >
> > I'm following the README
> > to bring up u-boot on a imx8mp EVK board. My
> > boot ends up in this on the
> > console:
> >
> >  U-Boot SPL 2020.10-rc5-00049-gd44d46e9fa (Sep 30 2020 - 11:46:20 +0200)
> >  Normal Boot
> >  WDT:   Started with servicing (60s timeout)
> >  Trying to boot from BOOTROM
> >  image offset 0x8000, pagesize 0x200, ivt offset 0x0
> >  Can't support legacy image
> >  SPL: failed to boot from all boot devices
> >  ### ERROR ### Please RESET the board ###
> >
> > Any ideas what is going wrong? How to debug further?
> >
> 
> I am trying to port U-Boot to an i.MX8M Nano and I am getting the same result.

This might not be related, but looking at the ATF branch [imx_5.4.3_2.0.0] - it 
appears to be too old, at least for i.MX8M Plus. I was able to run the U-Boot 
2020.10 with ATF built from [imx_5.4.47_2.2.0] on the i.MX8M Plus and it does 
boot successful.

Boot log show the following banner when BOOTROM finishes up the copy:
NOTICE:  BL31: v2.2(release):rel_imx_5.4.47_2.2.0-0-gc949a888e-dirty
NOTICE:  BL31: Built : 05:51:50, Sep  9 2020

Peter,
i.MX8M Plus support in NXP ATF fork appears to be added by commit 
https://source.codeaurora.org/external/imx/imx-atf/commit/?id=6b8249ff58cc8853396498a074535dcd7f81beaf,
 and that came in ATF revision far newer than indicated in 
doc/board/freescale/imx8mp_evk.rst

Try to rebase your ATF to [c949a888e909811db191500c51456391dff61284] and build 
according to the board doc file.

> 
> > Thanks,
> > /Peter
> >

-- Andrey


Re: FW: [PATCH 0/6] video: remove VIDCONSOLE_AS_LCD and VIDCONSOLE_AS_NAME

2020-12-08 Thread Patrick DELAUNAY

Hi Soeren,

From: Soeren Moch  Sent: dimanche 6 décembre 2020 20:59 
On 03.12.20 10:15, Patrick Delaunay wrote:


I propose this serie to remove the vidconsole work-around, activated 
with the 2 options VIDCONSOLE_AS_LCD and VIDCONSOLE_AS_NAME and 
cleanup the associated code in console.c (under #ifdef 
CONFIG_VIDCONSOLE_AS_LCD) This options are now obsolete and they was 
planned to be removed around the end of 2020. I propose this patchset 
for v2021.04 even if I don't test this serie on real boards.



I really would like to keep this code for now.

I propose to remove these options because they are indicated obsolete in 
the config description


in drivers/video/Kconfig (I see it during code review):

"This option will be removed around the end of 2020"

But I have no issue to kept it.

On the tbs2910 board this workaround was introduced in the last u-boot 
release (v2020.10), so there was almost no time for end users to 
notice the warning and to update there environment. Not every end user 
installs every new u-boot release, so we really should give more time 
for this change.


I agree that for your project, with migration to DM_VIDEO it is a really 
short notice.


    commit 645d39aea367064868dcdd30c411806f4403b67b

    board: tbs2910: Fix video output with existing environments

=> only integrated in v2020.10-rc2, sorry to miss it

This workaround is self-contained, small, easy to maintain, and 
strictly opt-in. So this workaround hurts nobody, but removing this 
will let users alone without any HDMI output. So on this board 
(without included serial console port), this will result in unhappy 
users, especially since without any console output there is no chance 
to get any idea what is going wrong.


Initially, I proposed this patch to cleanup the console.c code with 2 
other series:


1) http://patchwork.ozlabs.org/project/uboot/list/?series=218309

    "console: remove #ifdef CONFIG when it is possible"

2) http://patchwork.ozlabs.org/project/uboot/list/?series=218089

    "console: cosmetics: remove #if 0"


And I just want just to remove the remaining "#ifdef CONFIG_"  in 
console.c



But I agree that I need to change my proposal to remove this workaround code

(it is only use to help the DM VIDEO migration for existing board)

and change the release target.


I propose to :

- remove patch 1/6 of the serie for your board

- no more remove the options in 6/6 but add warning in Makefile when the 
option is activated


  and change target in config desciption


ifeq ($(CONFIG_VIDCONSOLE_AS_LCD),y)
    @echo >&2 "= WARNING =="
    @echo >&2 "This board does use CONFIG_VIDCONSOLE_AS_LCD workaround."
    @echo >&2 "Please update the existing user defined environments 
before "

    @echo >&2 "v2022.01 release."
    @echo >&2 "Failure to update by the deadline may result in video 
console"


@echo >&2 "issue when this woarkaround will be removed."
    @echo >&2 ""
endif

=> open point: which acceptable target to remove this feature ? v2022.01 ?

Anyway, if the the maintainers (video or console) think this code should 
be kept, I can also drop this serie.


Thanks.

Patrick




[PATCH] gpio: pca953x: add bus option to select the i2c bus.

2020-12-08 Thread Joseph Liu
From: Joseph Liu 

If DM_I2C is used, the command "i2c dev" will not reassign
gd->cur_i2c_bus.

Add this bus option to change the active I2C bus.

Signed-off-by: Joseph Liu 
---
 drivers/gpio/pca953x.c | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index 4ab8cee2d1..b64f6ddcea 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -20,6 +20,7 @@
 
 enum {
PCA953X_CMD_INFO,
+   PCA953X_CMD_BUS,
PCA953X_CMD_DEVICE,
PCA953X_CMD_OUTPUT,
PCA953X_CMD_INPUT,
@@ -194,6 +195,7 @@ static int pca953x_info(uint8_t chip)
 }
 
 static struct cmd_tbl cmd_pca953x[] = {
+   U_BOOT_CMD_MKENT(bus, 3, 0, (void *)PCA953X_CMD_BUS, "", ""),
U_BOOT_CMD_MKENT(device, 3, 0, (void *)PCA953X_CMD_DEVICE, "", ""),
U_BOOT_CMD_MKENT(output, 4, 0, (void *)PCA953X_CMD_OUTPUT, "", ""),
U_BOOT_CMD_MKENT(input, 3, 0, (void *)PCA953X_CMD_INPUT, "", ""),
@@ -205,6 +207,7 @@ static int do_pca953x(struct cmd_tbl *cmdtp, int flag, int 
argc,
  char *const argv[])
 {
static uint8_t chip = CONFIG_SYS_I2C_PCA953X_ADDR;
+   uint8_t bus = 0;
int ret = CMD_RET_USAGE, val;
ulong ul_arg2 = 0;
ulong ul_arg3 = 0;
@@ -214,7 +217,7 @@ static int do_pca953x(struct cmd_tbl *cmdtp, int flag, int 
argc,
 
/* All commands but "device" require 'maxargs' arguments */
if (!c || !((argc == (c->maxargs)) ||
-   (((long)c->cmd == PCA953X_CMD_DEVICE) &&
+   long)c->cmd == PCA953X_CMD_DEVICE) || ((long)c->cmd == 
PCA953X_CMD_BUS)) &&
 (argc == (c->maxargs - 1) {
return CMD_RET_USAGE;
}
@@ -233,7 +236,14 @@ static int do_pca953x(struct cmd_tbl *cmdtp, int flag, int 
argc,
if (ret)
ret = CMD_RET_FAILURE;
break;
+   case PCA953X_CMD_BUS:
+   if (argc == 3)
+   i2c_set_bus_num((uint8_t)ul_arg2);
 
+   bus = i2c_get_bus_num();
+   printf("Current i2c bus: 0x%x\n", bus);
+   ret = CMD_RET_SUCCESS;
+   break;
case PCA953X_CMD_DEVICE:
if (argc == 3)
chip = (uint8_t)ul_arg2;
@@ -280,6 +290,8 @@ static int do_pca953x(struct cmd_tbl *cmdtp, int flag, int 
argc,
 U_BOOT_CMD(
pca953x,5,  1,  do_pca953x,
"pca953x gpio access",
+   "bus [num]\n"
+   "   - show or set current i2c bus\n"
"device [dev]\n"
"   - show or set current device address\n"
"pca953x info\n"
-- 
2.17.1



Re: U-Boot: spl: partition error (stm32mp157)

2020-12-08 Thread Patrice CHOTARD
Hi Jagan

On 12/7/20 6:46 PM, Jagan Teki wrote:
> Hi Patrick,
>
> Not sure, it's an issue with the current tree, or I may miss something.
>
> Any suggestions?
>
> U-Boot SPL 2021.01-rc2-00143-g345dd00160-dirty (Dec 07 2020 - 01:48:44 +0530)
> Model: Engicam i.Core STM32MP1 EDIMM2.2 Starter Kit
> RAM: DDR3-DDR3L 32bits 528000Khz
> WDT:   Started with servicing (60s timeout)
> ## Unknown partition table type 0
> spl: partition error
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###
>
> Disk /dev/sda: 29.83 GiB, 32010928128 bytes, 62521344 sectors
> Disk model: Storage Device
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: gpt
> Disk identifier: 6524CDDB-929F-4A12-96B2-C04F07403931
>
> Device Start  End  Sectors  Size Type
> /dev/sda1 34  545  512  256K Linux filesystem
> /dev/sda2546 1057  512  256K Linux filesystem
> /dev/sda3   1058 5153 40962M Linux filesystem
> /dev/sda4   5154 62521310 62516157 29.8G Linux filesystem


I am not sure that the 3 first partition are using the correct filesystem type.

Do you follow indications in ./doc/board/st/stm32mp1.rst and more precisely the 
"Prepare an SD card" chapter ?

Thanks


>
> $ sudo dd if=u-boot-spl.stm32 of=/dev/sda1
> $ sudo dd if=u-boot-spl.stm32 of=/dev/sda2
> $ sudo dd if=u-boot.img of=/dev/sda3
>
> .config:
>
> #
> # Automatically generated file; DO NOT EDIT.
> # U-Boot 2021.01-rc2 Configuration
> #
>
> #
> # Compiler: arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot
> 2020.08-849-gdcd4b75069-dirty) 9.3.0
> #
> CONFIG_CREATE_ARCH_SYMLINK=y
> # CONFIG_ARC is not set
> CONFIG_ARM=y
> # CONFIG_M68K is not set
> # CONFIG_MICROBLAZE is not set
> # CONFIG_MIPS is not set
> # CONFIG_NDS32 is not set
> # CONFIG_NIOS2 is not set
> # CONFIG_PPC is not set
> # CONFIG_RISCV is not set
> # CONFIG_SANDBOX is not set
> # CONFIG_SH is not set
> # CONFIG_X86 is not set
> # CONFIG_XTENSA is not set
> CONFIG_SYS_ARCH="arm"
> CONFIG_SYS_CPU="armv7"
> CONFIG_SYS_SOC="stm32mp"
> CONFIG_SYS_VENDOR="engicam"
> CONFIG_SYS_BOARD="stm32mp1"
> CONFIG_SYS_CONFIG_NAME="stm32mp1"
> # CONFIG_SYS_ICACHE_OFF is not set
> # CONFIG_SPL_SYS_ICACHE_OFF is not set
> # CONFIG_SYS_DCACHE_OFF is not set
> # CONFIG_SPL_SYS_DCACHE_OFF is not set
>
> #
> # ARM architecture
> #
> # CONFIG_GIC_V3_ITS is not set
> CONFIG_HAS_VBAR=y
> CONFIG_HAS_THUMB2=y
> CONFIG_ARM_ASM_UNIFIED=y
> CONFIG_SYS_ARM_CACHE_CP15=y
> CONFIG_SYS_ARM_MMU=y
> # CONFIG_SYS_ARM_MPU is not set
> CONFIG_CPU_V7A=y
> CONFIG_SYS_ARM_ARCH=7
> CONFIG_SYS_CACHE_SHIFT_6=y
> CONFIG_SYS_CACHELINE_SIZE=64
> CONFIG_SYS_ARM_CACHE_WRITEBACK=y
> # CONFIG_SYS_ARM_CACHE_WRITETHROUGH is not set
> # CONFIG_SYS_ARM_CACHE_WRITEALLOC is not set
> # CONFIG_ARCH_CPU_INIT is not set
> CONFIG_SYS_ARCH_TIMER=y
> # CONFIG_ARM_SMCCC is not set
> # CONFIG_SEMIHOSTING is not set
> CONFIG_SYS_THUMB_BUILD=y
> CONFIG_SPL_SYS_THUMB_BUILD=y
> # CONFIG_SYS_L2CACHE_OFF is not set
> # CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set
> CONFIG_USE_ARCH_MEMCPY=y
> CONFIG_SPL_USE_ARCH_MEMCPY=y
> CONFIG_USE_ARCH_MEMSET=y
> CONFIG_SPL_USE_ARCH_MEMSET=y
> # CONFIG_ARCH_AT91 is not set
> # CONFIG_TARGET_EDB93XX is not set
> # CONFIG_TARGET_ASPENITE is not set
> # CONFIG_TARGET_GPLUGD is not set
> # CONFIG_ARCH_DAVINCI is not set
> # CONFIG_ARCH_KIRKWOOD is not set
> # CONFIG_ARCH_MVEBU is not set
> # CONFIG_TARGET_APF27 is not set
> # CONFIG_ARCH_ORION5X is not set
> # CONFIG_TARGET_SPEAR300 is not set
> # CONFIG_TARGET_SPEAR310 is not set
> # CONFIG_TARGET_SPEAR320 is not set
> # CONFIG_TARGET_SPEAR600 is not set
> # CONFIG_TARGET_STV0991 is not set
> # CONFIG_TARGET_X600 is not set
> # CONFIG_TARGET_FLEA3 is not set
> # CONFIG_TARGET_MX35PDK is not set
> # CONFIG_ARCH_BCM283X is not set
> # CONFIG_ARCH_BCM63158 is not set
> # CONFIG_ARCH_BCM68360 is not set
> # CONFIG_ARCH_BCM6858 is not set
> # CONFIG_TARGET_VEXPRESS_CA15_TC2 is not set
> # CONFIG_ARCH_BCMSTB is not set
> # CONFIG_TARGET_VEXPRESS_CA5X2 is not set
> # CONFIG_TARGET_VEXPRESS_CA9X4 is not set
> # CONFIG_TARGET_BCM23550_W1D is not set
> # CONFIG_TARGET_BCM28155_AP is not set
> # CONFIG_TARGET_BCMCYGNUS is not set
> # CONFIG_TARGET_BCMNSP is not set
> # CONFIG_TARGET_BCMNS2 is not set
> # CONFIG_TARGET_BCMNS3 is not set
> # CONFIG_ARCH_EXYNOS is not set
> # CONFIG_ARCH_S5PC1XX is not set
> # CONFIG_ARCH_HIGHBANK is not set
> # CONFIG_ARCH_INTEGRATOR is not set
> # CONFIG_ARCH_IPQ40XX is not set
> # CONFIG_ARCH_KEYSTONE is not set
> # CONFIG_ARCH_K3 is not set
> # CONFIG_ARCH_OMAP2PLUS is not set
> # CONFIG_ARCH_MESON is not set
> # CONFIG_ARCH_MEDIATEK is not set
> # CONFIG_ARCH_LPC32XX is not set
> # CONFIG_ARCH_IMX8 is not set
> # CONFIG_ARCH_IMX8M is not set
> # CONFIG_ARCH_IMXRT is not set
> # CONFIG_ARCH_MX23 is not set
> # CONFIG_ARCH_MX25 is not set
> # CONFIG_ARCH_MX28 is not set
> # CONFIG_ARCH_MX31 is no

Re: [PATCH] spl: fit: Prefer a malloc()'d buffer for loading images

2020-12-08 Thread Tom Rini
On Wed, Oct 21, 2020 at 06:32:58PM -0500, Alexandru Gagniuc wrote:

> Fit images were loaded to a buffer provided by spl_get_load_buffer().
> This may work when the FIT image is small and fits between the start
> of DRAM and SYS_TEXT_BASE.
> 
> One problem with this approach is that the location of the buffer may
> be manipulated by changing the 'size' field of the FIT. A maliciously
> crafted FIT image could place the buffer over executable code and be
> able to take control of SPL. This is unacceptable for secure boot of
> signed FIT images.
> 
> Another problem is with larger FIT images, usually containing one or
> more linux kernels. In such cases the buffer be be large enough so as
> to start before DRAM (Figure I). Trying to load an image in this case
> has undefined behavior.
> For example, on stm32mp1, the MMC controller hits a RX overrun error,
> and aborts loading.
> _
>|FIT Image|
>| |
>   /===\/=\
>   ||  DRAM   |||DRAM |
>   || ||| |
>   ||_||  SYS_TEXT_BASE | ___ |
>   |   ||| FIT Image ||
>   |   |||   ||
>   | _ |  SYS_SPL_MALLOC_START  || _ ||
>   ||  malloc() data  |||||  malloc() data  |||
>   ||_|||||_|||
>   |   |||___||
>   |   || |
> 
> Figure I   Figure II
> 
> One possibility that was analyzed was to remove the negative offset,
> such that the buffer starts at SYS_TEXT_BASE. This is not a proper
> solution because on a number of platforms, the malloc buffer() is
> placed at a fixed address, usually after SYS_TEXT_BASE. A large
> enough FIT image could cause the malloc()'d data to be overwritten
> (Figure II) when loading.
> 
>   /==\
>   |DRAM  |
>   |  |
>   |  |   CONFIG_SYS_TEXT_BASE
>   |  |
>   |  |
>   |  |   CONFIG_SYS_SPL_MALLOC_START
>   ||   malloc() data||
>   ||||
>   || __ ||
>   |||FIT Image |||
>   |||  |||
>   |||  |||
> 
>  Figure III
> 
> The solution proposed here is to replace the ad-hoc heuristics of
> spl_get_load_buffer() with malloc(). This provides two advantages:
> * Bounds checking of the buffer region
> * Guarantees the buffer does not conflict with other memory
> 
> The first problem is solved by constraining the buffer such that it
> will not overlap currently executing code. This eliminates the chance
> of a malicious FIT being able to replace the executing SPL code prior
> to signature checking.
> 
> The second problem is solved in conjunction with increasing
> CONFIG_SYS_SPL_MALLOC_SIZE. Since the SPL malloc() region is
> carefully crafted on a per-platform basis, the chances of memory
> conflicts are virtually eliminated.
> 
> Signed-off-by: Alexandru Gagniuc 

This seems like a good idea to me.

Applied to u-boot/next, thanks!

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v2 1/4] tools/Makefile: FIT_CIPHER requires libssl

2020-12-08 Thread Philippe REYNES

Hi Joel,


Le 08/12/2020 à 05:12, Joel Stanley a écrit :

If CONFIG_FIT_CIPHER is enabled without CONFIG_FIT_SIGNATURE then
mkimage/dumpimage will fail to link:

  /usr/bin/ld: tools/common/image-cipher.o: in function 
`fit_image_decrypt_data':
  image-cipher.c:(.text+0x9a): undefined reference to `image_get_host_blob'
  /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x10): undefined 
reference to `EVP_aes_128_cbc'
  /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x40): undefined 
reference to `EVP_aes_192_cbc'
  /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x70): undefined 
reference to `EVP_aes_256_cbc'
  /usr/bin/ld: tools/lib/aes/aes-encrypt.o: in function `image_aes_encrypt':
  aes-encrypt.c:(.text+0x22): undefined reference to `EVP_CIPHER_CTX_new'
  /usr/bin/ld: aes-encrypt.c:(.text+0x6f): undefined reference to 
`EVP_EncryptInit_ex'
  /usr/bin/ld: aes-encrypt.c:(.text+0x8d): undefined reference to 
`EVP_EncryptUpdate'
  /usr/bin/ld: aes-encrypt.c:(.text+0xac): undefined reference to 
`EVP_CIPHER_CTX_free'
  /usr/bin/ld: aes-encrypt.c:(.text+0xf2): undefined reference to 
`EVP_EncryptFinal_ex'
  collect2: error: ld returned 1 exit status

Signed-off-by: Joel Stanley 

    Reviewed-by: Philippe Reynes 


---
  tools/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/Makefile b/tools/Makefile
index 253a6b97065b..99a931312cd8 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -154,7 +154,7 @@ HOSTCFLAGS_kwbimage.o += -DCONFIG_KWB_SECURE
  endif
  
  # MXSImage needs LibSSL

-ifneq 
($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X)$(CONFIG_FIT_SIGNATURE),)
+ifneq 
($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X)$(CONFIG_FIT_SIGNATURE)$(CONFIG_FIT_CIPHER),)
  HOSTCFLAGS_kwbimage.o += \
$(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "")
  HOSTLDLIBS_mkimage += \


Regards,

Philippe



Re: [PATCH v2 2/4] image-fit: Fix FIT_CIPHER linking

2020-12-08 Thread Philippe REYNES

Hi Joel


Le 08/12/2020 à 05:12, Joel Stanley a écrit :

When CONFIG_FIT_CIPHER=y and CONFIG_FIT_SIGNATURE=n is there is no
implementation of image_get_host_blob for mkimage/dumpimage:

  /usr/bin/ld: tools/common/image-cipher.o: in function 
`fit_image_decrypt_data':
  image-cipher.c:(.text+0x9a): undefined reference to `image_get_host_blob'

Move the implementation to a common file so it can be shaed between
image-cipher.c and image-fit-sig.c.

Signed-off-by: Joel Stanley 

    Reviewed-by: Philippe Reynes 


---
v2: Fix compilation when signature and ciphering are both enabled
---
  common/image-fit-sig.c | 14 --
  common/image-fit.c | 15 +++
  2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c
index 5401d9411b98..d39741e9058f 100644
--- a/common/image-fit-sig.c
+++ b/common/image-fit-sig.c
@@ -19,20 +19,6 @@ DECLARE_GLOBAL_DATA_PTR;
  
  #define IMAGE_MAX_HASHED_NODES		100
  
-#ifdef USE_HOSTCC

-void *host_blob;
-
-void image_set_host_blob(void *blob)
-{
-   host_blob = blob;
-}
-
-void *image_get_host_blob(void)
-{
-   return host_blob;
-}
-#endif
-
  /**
   * fit_region_make_list() - Make a list of image regions
   *
diff --git a/common/image-fit.c b/common/image-fit.c
index c82d4d8015f0..664a0d6c 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -112,6 +112,21 @@ int fit_parse_subimage(const char *spec, ulong addr_curr,
  }
  #endif /* !USE_HOSTCC */
  
+#ifdef USE_HOSTCC

+/* Host tools use these implementations for Cipher and Signature support */
+static void *host_blob;
+
+void image_set_host_blob(void *blob)
+{
+   host_blob = blob;
+}
+
+void *image_get_host_blob(void)
+{
+   return host_blob;
+}
+#endif /* USE_HOSTCC */
+
  static void fit_get_debug(const void *fit, int noffset,
char *prop_name, int err)
  {

Regards,
Philippe


Re: [PATCH v2 3/4] mkimage: Move padding commands outside of FIT_SIGNATURE

2020-12-08 Thread Philippe REYNES

Hi Joel


Le 08/12/2020 à 05:12, Joel Stanley a écrit :

These commands were disabled when CONFIG_FIT_SIGNATURE is disabled, but
they do not depend on crypto support so they can be unconditionally
enabled.

Signed-off-by: Joel Stanley 
--
v2: New patch
---
  tools/mkimage.c | 11 ++-
  1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tools/mkimage.c b/tools/mkimage.c
index e78608293e72..68d5206cb4fd 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -94,18 +94,18 @@ static void usage(const char *msg)
"  -x ==> set XIP (execute in place)\n",
params.cmdname);
fprintf(stderr,
-   "   %s [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b  [-b 
]] [-i ] fit-image\n"
+   "   %s [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b  [-b 
]] [-E] [-B size] [-i ] fit-image\n"
"file is used with -f auto, it may occur multiple 
times.\n",
params.cmdname);
fprintf(stderr,
"  -D => set all options for device tree compiler\n"
"  -f => input filename for FIT source\n"
-   "  -i => input filename for ramdisk file\n");
+   "  -i => input filename for ramdisk file\n"
+   "  -E => place data outside of the FIT structure\n"
+   "  -B => align size in hex for FIT structure and 
header\n");
  #ifdef CONFIG_FIT_SIGNATURE
fprintf(stderr,
-   "Signing / verified boot options: [-E] [-B size] [-k keydir] [-K dtb] [ -c 
] [-p addr] [-r] [-N engine]\n"
-   "  -E => place data outside of the FIT structure\n"
-   "  -B => align size in hex for FIT structure and 
header\n"
+   "Signing / verified boot options: [-k keydir] [-K dtb] [ -c 
] [-p addr] [-r] [-N engine]\n"
"  -k => set directory containing private keys\n"
"  -K => write public keys to this .dtb file\n"
"  -c => add comment in signature node\n"
Option -p is a generic option, not a signing option. it defines the 
offset of the padding.

So it should be moved above.

Option -k, -K are also used for ciphering. So it signature is disabled 
and ciphering is enabled, the help won't display those options.
I think it could be acceptable to  use #if 
CONFIG_IS_ENABLED(FIT_SIGNATURE) || CONFIG_IS_ENABLED(FIT_CIPHER)

and also change a bit the text "Signing / verified option ..."


@@ -142,6 +142,7 @@ static int add_content(int type, const char 
*fname) return 0; } +#define OPT_STRING 
"a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qstT:vVx"


I think that OPT_STRING should be defined in the next patch.


  static void process_args(int argc, char **argv)
  {
char *ptr;

Regards,
Philippe


Re: [PATCH v2 4/4] mkimge: Reject signing-related flags without FIT_SIGNATURE

2020-12-08 Thread Philippe REYNES

Hi Joel


Le 08/12/2020 à 05:12, Joel Stanley a écrit :

When CONFIG_FIT_SIGNATURE=n the signing options are not available. If a
user is careful they will notice this when looking at the help output.

If they are not careful they will waste several hours wondering why
their FIT doesn't contain a /signature node, as mkimage will silently
ingore the signing related options.

Make it obvious that the commands don't work by removing them from the
getopt opt_string.

  $ mkimage -f machine.its -k keys -K u-boot-pubkey.dtb -r image.fit
  mkimage: invalid option -- 'k'
  Error: Invalid option

Signed-off-by: Joel Stanley 
--
v2: Leave padding related options in the CONFIG_FIT_SIGNATURE=y optargs
---
  tools/mkimage.c | 7 +--
  1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/mkimage.c b/tools/mkimage.c
index 68d5206cb4fd..f7d3ac40e681 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -142,7 +142,11 @@ static int add_content(int type, const char *fname)
return 0;
  }
  
+#ifdef CONFIG_FIT_SIGNATURE

  #define OPT_STRING "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qstT:vVx"
Option -k and -K is also needed for ciphering. So we should also check 
FIT_CIPHER.

Option -p is "generic", it is used to define the size of the padding.

+#else
+#define OPT_STRING "a:A:b:B:C:d:D:e:Ef:i:ln:O:R:qstT:vVx"
+#endif
  static void process_args(int argc, char **argv)
  {
char *ptr;
@@ -150,8 +154,7 @@ static void process_args(int argc, char **argv)
char *datafile = NULL;
int opt;
  
-	while ((opt = getopt(argc, argv,

-  "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) {
+   while ((opt = getopt(argc, argv, OPT_STRING)) != -1) {
switch (opt) {
case 'a':
params.addr = strtoull(optarg, &ptr, 16);

Regards,
Philippe




[PATCH v1] sunxi: board: Move USB ethernet initialization to board_late_init()

2020-12-08 Thread Andy Shevchenko
For the sake of consistency (*) and order of initialization, i.e.
after we have got the ethernet address, interrupt and timer initialized,
try to initialize USB ethernet gadget.

*) for example, zynqmp uses same order.

Signed-off-by: Andy Shevchenko 
---
 arch/arm/Kconfig| 1 +
 board/sunxi/board.c | 5 +
 2 files changed, 6 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5903c093705a..3d9be8a7507e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1045,6 +1045,7 @@ config ARCH_SUNXI
select SPL_USE_TINY_PRINTF
select USE_PREBOOT
select SYS_RELOC_GD_ENV_ADDR
+   imply BOARD_LATE_INIT
imply CMD_DM
imply CMD_GPT
imply CMD_UBI if MTD_RAW_NAND
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 708a27ed78e9..77e464718846 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -890,6 +890,11 @@ int misc_init_r(void)
 
setup_environment(gd->fdt_blob);
 
+   return 0;
+}
+
+int board_late_init(void)
+{
 #ifdef CONFIG_USB_ETHER
usb_ether_init();
 #endif
-- 
2.29.2



Re: [PATCH] ARM: dts: stm32: Switch to MCO2 for PHY 50 MHz clock

2020-12-08 Thread Patrick DELAUNAY

Hi Marek,


From: Marek Vasut 
Sent: mardi 1 décembre 2020 11:35

The LAN8710i PHY currently uses 50 MHz clock direct from PLL4P.
To permit PLL4P to run at faster frequency, use MCO2 as a divider.
The PLL4P runs at 100 MHz, supplies MCO2 which divides it by 2 to 50MHz, and 
supplies the PHY with 50 MHz via pin PG2. The feedback clock are fed back in 
via pin PA1.

Signed-off-by: Marek Vasut 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
---
NOTE: This is for next
---
   arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 25 +-
   arch/arm/dts/stm32mp15xx-dhcom.dtsi|  3 +--
   2 files changed, 21 insertions(+), 7 deletions(-)


Reviewed-by: Patrick Delaunay 

Thanks Patrick



Re: [PATCH] string: Use memcpy() within memmove() when we can

2020-12-08 Thread Tom Rini
On Wed, Nov 25, 2020 at 01:07:43PM +0100, Rasmus Villemoes wrote:
> On 25/11/2020 12.26, Patrick Delaunay wrote:
> > A common use of memmove() can be handled by memcpy(). Also memcpy()
> > includes an optimization for large sizes: it copies a word at a time. So
> > we can get a speed-up by calling memcpy() to handle our move in this case.
> > 
> > Update memmove() to call also memcpy() if the source don't overlap
> > the destination (src + count <= dest).
> > 
> > Signed-off-by: Patrick Delaunay 
> > ---
> > This patch allows to save 38ms for Kernel Image extraction (7327624 Bytes)
> > from FIT loaded at 0xC200 for ARMV7 board STM32MP157C-EV1,
> > and with kernel destination = Load Address: 0xc400,
> > located after the FIT without overlap, compared with
> > destination = Load Address: 0xc0008000.
> > 
> > -> 14,332 us vs 52,239 in bootstage report
> > 
> > In this case the memmove funtion is called in common/image.c::memmove_wd()
> > to handle overlap.
> > 
> > 
> >  lib/string.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/string.c b/lib/string.c
> > index ae7835f600..ef8ead976c 100644
> > --- a/lib/string.c
> > +++ b/lib/string.c
> > @@ -567,7 +567,7 @@ void * memmove(void * dest,const void *src,size_t count)
> >  {
> > char *tmp, *s;
> >  
> > -   if (dest <= src) {
> > +   if (dest <= src || (src + count) <= dest) {
> > memcpy(dest, src, count);
> 
> Hm. So the condition you add (src + count <= dest) implies no overlap at
> all, so that's ok. So this doesn't really have anything to do with your
> patch per se.
> 
> The existing condition relies on memcpy doing forward-copying. That's
> the case if the implementation from lib/string.c is in use, i.e. if
> __HAVE_ARCH_MEMCPY is not defined. And if an arch defines
> __HAVE_ARCH_MEMMOVE, this memmove() is not used.
> 
> But AFAICT, there's a potential problem for the case where
> __HAVE_ARCH_MEMCPY is defined but __HAVE_ARCH_MEMMOVE is not, and e.g.
> arch/arm/include/asm/string.h does
> 
> #if CONFIG_IS_ENABLED(USE_ARCH_MEMCPY)
> #define __HAVE_ARCH_MEMCPY
> #endif
> #undef __HAVE_ARCH_MEMMOVE
> 
> Of course, the arch-specific implementation _may_ also do
> forward-copying (I haven't tried to decipher it), but that seems to be a
> rather fragile assumption. At the very least, some comments would be in
> order.

Looking at this deeper, today, ARM (non-64bit) can and usually but not
always does use the asm optimized memcpy / memset.  No other optimized
functions were copied from Linux, and no other arches seem to use them
today either.  I think in sum then, Patrick can you please do a v2 that
adds a comment here, in case we get more optimizations in the future?
And thanks for the review here Rasmus!

-- 
Tom


signature.asc
Description: PGP signature


Re: FW: [PATCH 0/6] video: remove VIDCONSOLE_AS_LCD and VIDCONSOLE_AS_NAME

2020-12-08 Thread Tom Rini
On Tue, Dec 08, 2020 at 03:30:43PM +0100, Patrick DELAUNAY wrote:
> Hi Soeren,
> 
> > From: Soeren Moch  Sent: dimanche 6 décembre 2020 20:59 On
> > 03.12.20 10:15, Patrick Delaunay wrote:
> > 
> > > I propose this serie to remove the vidconsole work-around, activated
> > > with the 2 options VIDCONSOLE_AS_LCD and VIDCONSOLE_AS_NAME and
> > > cleanup the associated code in console.c (under #ifdef
> > > CONFIG_VIDCONSOLE_AS_LCD) This options are now obsolete and they was
> > > planned to be removed around the end of 2020. I propose this
> > > patchset for v2021.04 even if I don't test this serie on real
> > > boards.
> > > 
> > I really would like to keep this code for now.
> > 
> I propose to remove these options because they are indicated obsolete in the
> config description
> 
> in drivers/video/Kconfig (I see it during code review):
> 
> "This option will be removed around the end of 2020"
> 
> But I have no issue to kept it.
> 
> > On the tbs2910 board this workaround was introduced in the last u-boot
> > release (v2020.10), so there was almost no time for end users to notice
> > the warning and to update there environment. Not every end user installs
> > every new u-boot release, so we really should give more time for this
> > change.
> > 
> I agree that for your project, with migration to DM_VIDEO it is a really
> short notice.
> 
>     commit 645d39aea367064868dcdd30c411806f4403b67b
> 
>     board: tbs2910: Fix video output with existing environments
> 
> => only integrated in v2020.10-rc2, sorry to miss it
> 
> > This workaround is self-contained, small, easy to maintain, and strictly
> > opt-in. So this workaround hurts nobody, but removing this will let
> > users alone without any HDMI output. So on this board (without included
> > serial console port), this will result in unhappy users, especially
> > since without any console output there is no chance to get any idea what
> > is going wrong.
> > 
> Initially, I proposed this patch to cleanup the console.c code with 2 other
> series:
> 
> 1) http://patchwork.ozlabs.org/project/uboot/list/?series=218309
> 
>     "console: remove #ifdef CONFIG when it is possible"
> 
> 2) http://patchwork.ozlabs.org/project/uboot/list/?series=218089
> 
>     "console: cosmetics: remove #if 0"
> 
> 
> And I just want just to remove the remaining "#ifdef CONFIG_"  in
> console.c
> 
> 
> But I agree that I need to change my proposal to remove this workaround code
> 
> (it is only use to help the DM VIDEO migration for existing board)
> 
> and change the release target.
> 
> 
> I propose to :
> 
> - remove patch 1/6 of the serie for your board
> 
> - no more remove the options in 6/6 but add warning in Makefile when the
> option is activated
> 
>   and change target in config desciption
> 
> 
> ifeq ($(CONFIG_VIDCONSOLE_AS_LCD),y)
>     @echo >&2 "= WARNING =="
>     @echo >&2 "This board does use CONFIG_VIDCONSOLE_AS_LCD workaround."
>     @echo >&2 "Please update the existing user defined environments before "
>     @echo >&2 "v2022.01 release."
>     @echo >&2 "Failure to update by the deadline may result in video
> console"
> 
> @echo >&2 "issue when this woarkaround will be removed."
>     @echo >&2 ""
> endif
> 
> => open point: which acceptable target to remove this feature ? v2022.01 ?

This sounds like a good plan and reasonable date to me.  Anatolij?
Thanks!

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH 06/14] qemu: arm64: Set dfu_alt_info variable for the platform

2020-12-08 Thread Sughosh Ganu
On Tue, 8 Dec 2020 at 17:50, Tom Rini  wrote:

> On Tue, Dec 08, 2020 at 10:48:57AM +0530, Sughosh Ganu wrote:
> > On Tue, 8 Dec 2020 at 00:17, Tom Rini  wrote:
> >
> > > On Sat, Dec 05, 2020 at 11:31:49AM +0100, Heinrich Schuchardt wrote:
> > > > On 11/26/20 7:41 PM, Sughosh Ganu wrote:
> > > > > The dfu framework uses the dfu_alt_info environment variable to get
> > > > > information that is needed for performing the firmware update. Set
> the
> > > > > dfu_alt_info for the platform to reflect the two mtd partitions
> > > > > created for the u-boot env and the firmware image.
> > > > >
> > > > > Signed-off-by: Sughosh Ganu 
> > > >
> > > > I can't see anything QEMU specific in this patch. Why is the code
> under
> > > > board/emulation/?
> > > >
> > > > Best regards
> > > >
> > > > Heinrich
> > > >
> > > > > ---
> > > > >   board/emulation/qemu-arm/qemu-arm.c | 55
> > > +
> > > > >   include/configs/qemu-arm.h  |  1 +
> > > > >   2 files changed, 56 insertions(+)
> > > > >
> > > > > diff --git a/board/emulation/qemu-arm/qemu-arm.c
> > > b/board/emulation/qemu-arm/qemu-arm.c
> > > > > index d5ed3eebaf..8cad54c76f 100644
> > > > > --- a/board/emulation/qemu-arm/qemu-arm.c
> > > > > +++ b/board/emulation/qemu-arm/qemu-arm.c
> > > > > @@ -200,8 +200,63 @@ void flash_write32(u32 value, void *addr)
> > > > >
> > > > >   #if defined(CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT)
> > > > >
> > > > > +#include 
> > > > >   #include 
> > > > >
> > > > > +#define MTDPARTS_LEN   256
> > > > > +#define MTDIDS_LEN 128
> > > > > +
> > > > > +#define DFU_ALT_BUF_LENSZ_1K
> > > > > +
> > > > > +static void board_get_alt_info(struct mtd_info *mtd, char *buf)
> > > > > +{
> > > > > +   struct mtd_info *part;
> > > > > +   bool first = true;
> > > > > +   const char *name;
> > > > > +   int len, partnum = 0;
> > > > > +
> > > > > +   name = mtd->name;
> > > > > +   len = strlen(buf);
> > > > > +
> > > > > +   if (buf[0] != '\0')
> > > > > +   len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, "&");
> > > > > +   len += snprintf(buf + len, DFU_ALT_BUF_LEN - len,
> > > > > +   "mtd %s=", name);
> > > > > +
> > > > > +   list_for_each_entry(part, &mtd->partitions, node) {
> > > > > +   partnum++;
> > > > > +   if (!first)
> > > > > +   len += snprintf(buf + len, DFU_ALT_BUF_LEN -
> len,
> > > ";");
> > > > > +   first = false;
> > > > > +
> > > > > +   len += snprintf(buf + len, DFU_ALT_BUF_LEN - len,
> > > > > +   "%s part %d",
> > > > > +   part->name, partnum);
> > > > > +   }
> > > > > +}
> > > > > +
> > > > > +void set_dfu_alt_info(char *interface, char *devstr)
> > > > > +{
> > > > > +   struct mtd_info *mtd;
> > > > > +
> > > > > +   ALLOC_CACHE_ALIGN_BUFFER(char, buf, DFU_ALT_BUF_LEN);
> > > > > +
> > > > > +   if (env_get("dfu_alt_info"))
> > > > > +   return;
> > > > > +
> > > > > +   memset(buf, 0, sizeof(buf));
> > > > > +
> > > > > +   /* probe all MTD devices */
> > > > > +   mtd_probe_devices();
> > > > > +
> > > > > +   mtd = get_mtd_device_nm("nor0");
> > > > > +   if (!IS_ERR_OR_NULL(mtd))
> > > > > +   board_get_alt_info(mtd, buf);
> > > > > +
> > > > > +   env_set("dfu_alt_info", buf);
> > > > > +   printf("dfu_alt_info set\n");
> > > > > +}
> > > > > +
> > > > >   static void board_get_mtdparts(const char *dev, const char
> > > *partition,
> > > > >char *mtdids, char *mtdparts)
> > > > >   {
> > > > > diff --git a/include/configs/qemu-arm.h
> b/include/configs/qemu-arm.h
> > > > > index 69ff329434..726f985d35 100644
> > > > > --- a/include/configs/qemu-arm.h
> > > > > +++ b/include/configs/qemu-arm.h
> > > > > @@ -33,6 +33,7 @@
> > > > >   #include 
> > > > >
> > > > >   #if defined(CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT)
> > > > > +#define CONFIG_SET_DFU_ALT_INFO
> > > > >   #define CONFIG_SYS_MTDPARTS_RUNTIME
> > >
> > > First, CONFIG_SET_DFU_ALT_INFO is in Kconfig and needs to be enabled
> > > that way.
> >
> >
> > Will change in the next version.
> >
> >
> > > Second, typically we just set the information in the
> > > environment part of the header.  This is especially true if in both
> this
> > > case and the previous patch to add mtdparts, we don't really have this
> > > being dynamic?  Or are we really expecting / supporting arbitrary sized
> > > flash as this is qemu?  Thanks.
> > >
> >
> > I am not sure I understand this. One thing that can be done is to move
> the
> > setting of the mtd partitions to the Kconfig file, on similar lines to
> what
> > is being done for the st platforms, e.g MTDPARTS_NOR0_TEE. I can move the
> > mtd partition definitions to the Kconfig file if that is what you are
> > asking for.
>
> Environment manipulation via C code is possible, but discouraged.  What
> can be set via Kconfig should be set that way, and what can be put in
> the environment part

Re: [PATCH v1] sunxi: board: Move USB ethernet initialization to board_late_init()

2020-12-08 Thread André Przywara
On 08/12/2020 15:45, Andy Shevchenko wrote:
> For the sake of consistency (*) and order of initialization, i.e.
> after we have got the ethernet address, interrupt and timer initialized,
> try to initialize USB ethernet gadget.
> 
> *) for example, zynqmp uses same order.

Looks alright, but we need some testing, to check for possible side
effects. (It's those seemingly innocent changes that tend to break things).
Will get back to you later.

Cheers,
Andre

> 
> Signed-off-by: Andy Shevchenko 
> ---
>  arch/arm/Kconfig| 1 +
>  board/sunxi/board.c | 5 +
>  2 files changed, 6 insertions(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 5903c093705a..3d9be8a7507e 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1045,6 +1045,7 @@ config ARCH_SUNXI
>   select SPL_USE_TINY_PRINTF
>   select USE_PREBOOT
>   select SYS_RELOC_GD_ENV_ADDR
> + imply BOARD_LATE_INIT
>   imply CMD_DM
>   imply CMD_GPT
>   imply CMD_UBI if MTD_RAW_NAND
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index 708a27ed78e9..77e464718846 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -890,6 +890,11 @@ int misc_init_r(void)
>  
>   setup_environment(gd->fdt_blob);
>  
> + return 0;
> +}
> +
> +int board_late_init(void)
> +{
>  #ifdef CONFIG_USB_ETHER
>   usb_ether_init();
>  #endif
> 



Re: [PATCH 4/4] ARM: dts: stm32: Add USB OTG ID pin on DH AV96

2020-12-08 Thread Patrick DELAUNAY

Hi Marek,


From: Marek Vasut 
Sent: mardi 1 décembre 2020 11:29

Add USB OTG ID pin mux and switch the USB OTG port from peripheral to OTG mode.

Signed-off-by: Marek Vasut 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
---
  arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts 
b/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts
index 88f25d89b2..9b5dda318e 100644
--- a/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts
+++ b/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts
@@ -192,7 +192,8 @@
  };
  
  &usbotg_hs {

-   dr_mode = "peripheral";
+   pinctrl-0 = <&usbotg_hs_pins_a>;
+   pinctrl-names = "default";
phys = <&usbphyc_port1 0>;
phy-names = "usb2-phy";
status = "okay";
--
2.29.2



Reviewed-by: Patrick Delaunay 

Thanks

Patrick




Re: FW: [PATCH 1/4] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM

2020-12-08 Thread Patrick DELAUNAY

Hi Marek,

From: Marek Vasut 

Sent: mardi 1 décembre 2020 11:29

The default state of SD bus and clock line is logical HI. SD card IO is 
open-drain and pulls the bus lines LO. Always enable the SD bus pull ups to 
guarantee this behavior on DHCOM SoM. Note that on SoMs with SD bus voltage 
level shifter, the pull ups are built into the level shifter, however that has 
no negative impact.

Signed-off-by: Marek Vasut 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
---
  arch/arm/dts/stm32mp15xx-dhcom.dtsi | 14 ++
  1 file changed, 14 insertions(+)

diff --git a/arch/arm/dts/stm32mp15xx-dhcom.dtsi 
b/arch/arm/dts/stm32mp15xx-dhcom.dtsi
index f022d8395c..9049245c5b 100644
--- a/arch/arm/dts/stm32mp15xx-dhcom.dtsi
+++ b/arch/arm/dts/stm32mp15xx-dhcom.dtsi
@@ -339,6 +339,20 @@
status = "okay";
  };
  
+&sdmmc1_b4_pins_a {

+   /*
+* SD bus pull-up resistors:
+* - optional on SoMs with SD voltage translator
+* - mandatory on SoMs without SD voltage translator
+*/
+   pins1 {
+   bias-pull-up;
+   };
+   pins2 {
+   bias-pull-up;
+   };
+};
+
  &sdmmc2 {
pinctrl-names = "default";
pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
--
2.29.2


Reviewed-by: Patrick Delaunay 

For the serie:  the target is next or it is a bugfix for master / v2021.01 ?

Thanks

Patrick




Re: [PATCH v1] sunxi: board: Move USB ethernet initialization to board_late_init()

2020-12-08 Thread Andy Shevchenko
On Tue, Dec 8, 2020 at 7:14 PM André Przywara  wrote:
> On 08/12/2020 15:45, Andy Shevchenko wrote:
> > For the sake of consistency (*) and order of initialization, i.e.
> > after we have got the ethernet address, interrupt and timer initialized,
> > try to initialize USB ethernet gadget.
> >
> > *) for example, zynqmp uses same order.
>
> Looks alright, but we need some testing, to check for possible side
> effects. (It's those seemingly innocent changes that tend to break things).

Right. I made a patch purely based on reading the U-Boot initialization code.

> Will get back to you later.

Take your time and thanks!

-- 
With Best Regards,
Andy Shevchenko


Re: [PATCH 2/4] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock

2020-12-08 Thread Patrick DELAUNAY

Hi Marek,


From: Marek Vasut 
Sent: mardi 1 décembre 2020 11:29

The STM32MP1 DHCOM SoM can be built with either bus voltage level shifter or 
without one on the SDMMC1 interface. Because the SDMMC1 interface is limited to 
50 MHz and hence SD high-speed anyway, disable the SD feedback clock to permit 
operation of the same U-Boot image on both SoM with and without voltage level 
shifter.

Signed-off-by: Marek Vasut 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
---
  arch/arm/dts/stm32mp15xx-dhcom.dtsi | 1 -
  1 file changed, 1 deletion(-)

diff --git a/arch/arm/dts/stm32mp15xx-dhcom.dtsi 
b/arch/arm/dts/stm32mp15xx-dhcom.dtsi
index 9049245c5b..dafcce4323 100644
--- a/arch/arm/dts/stm32mp15xx-dhcom.dtsi
+++ b/arch/arm/dts/stm32mp15xx-dhcom.dtsi
@@ -333,7 +333,6 @@
disable-wp;
st,sig-dir;
st,neg-edge;
-   st,use-ckin;
bus-width = <4>;
vmmc-supply = <&vdd_sd>;
status = "okay";
--
2.29.2


Reviewed-by: Patrick Delaunay 

Thanks

Patrick



Re: [PATCH 3/4] ARM: dts: stm32: Enable SDMMC3 on DH DRC02

2020-12-08 Thread Patrick DELAUNAY

Hi Marek,

From: Marek Vasut 
Sent: mardi 1 décembre 2020 11:29

The DH DRC02 board has an on-board microSD slot, add DT properties to enable 
the slot.

Signed-off-by: Marek Vasut 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
---
NOTE: Large part of this should be in the DHCOM SoM DT, however
   a DT sync should only happen after Linux 5.10.y and U-Boot
   2021.01 are out.
---
  arch/arm/dts/stm32mp15xx-dhcom-drc02.dts | 13 +++--
  1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/stm32mp15xx-dhcom-drc02.dts 
b/arch/arm/dts/stm32mp15xx-dhcom-drc02.dts
index 5a237a3b7b..e8508aa4d5 100644
--- a/arch/arm/dts/stm32mp15xx-dhcom-drc02.dts
+++ b/arch/arm/dts/stm32mp15xx-dhcom-drc02.dts
@@ -105,9 +105,18 @@
 * On DRC02, the SoM does not have SDIO WiFi. The pins
 * are used for on-board microSD slot instead.
 */
-   /delete-property/broken-cd;
-   cd-gpios = <&gpioi 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+   pinctrl-names = "default", "opendrain", "sleep";
+   pinctrl-0 = <&sdmmc3_b4_pins_a>;
+   pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
+   pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
+   cd-gpios = <&gpioi 10 GPIO_ACTIVE_HIGH>;
disable-wp;
+   st,neg-edge;
+   bus-width = <4>;To: u-boot@lists.denx.de
Cc: Marek Vasut ; Patrice CHOTARD ; Patrick 
DELAUNAY 
Subject: [PATCH 2/4] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock
Importance: High


+   vmmc-supply = <&v3v3>;
+   vqmmc-supply = <&v3v3>;
+   mmc-ddr-3_3v;
+   status = "okay";
  };
  
  &spi1 {

--
2.29.2


Reviewed-by: Patrick Delaunay 

Thanks

Patrick


Re: FW: [PATCH 1/4] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM

2020-12-08 Thread Marek Vasut

On 12/8/20 6:20 PM, Patrick DELAUNAY wrote:

Hi Marek,


Hi,

[...]

For the serie:  the target is next or it is a bugfix for master / 
v2021.01 ?


This is for 2021.01 , it corrects a couple of random things here and there.


[PATCH 1/3] image: support board_fit_config_name_match

2020-12-08 Thread Sebastian Reichel
Support reusing board_fit_config_name_match() to automatically
select a sensible default configuration for booting fitImages
using 'bootm'.

Signed-off-by: Sebastian Reichel 
---
 common/image-fit.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/common/image-fit.c b/common/image-fit.c
index c82d4d8015f0..52c194222735 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1741,6 +1741,12 @@ int fit_conf_get_node(const void *fit, const char 
*conf_uname)
if (conf_uname == NULL) {
/* get configuration unit name from the default property */
debug("No configuration specified, trying default...\n");
+#if !defined(USE_HOSTCC) && defined(CONFIG_MULTI_DTB_FIT)
+   noffset = fit_find_config_node(fit);
+   if (noffset < 0)
+   return noffset;
+   conf_uname = fdt_get_name(fit, noffset, NULL);
+#else
conf_uname = (char *)fdt_getprop(fit, confs_noffset,
 FIT_DEFAULT_PROP, &len);
if (conf_uname == NULL) {
@@ -1748,6 +1754,7 @@ int fit_conf_get_node(const void *fit, const char 
*conf_uname)
  len);
return len;
}
+#endif
debug("Found default configuration: '%s'\n", conf_uname);
}
 
-- 
2.29.2



[PATCH 2/3] board: ge: bx50v3: remove confidx magic numbers

2020-12-08 Thread Sebastian Reichel
Instead of hardcoding index magic numbers in the board code,
also rely on board_fit_config_name_match choosing the right
config for the fitImage containing the kernel.

Signed-off-by: Sebastian Reichel 
---
 board/ge/bx50v3/bx50v3.c| 16 ++--
 include/configs/ge_bx50v3.h |  4 ++--
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 4754647fb4ad..a3ae037a82ef 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -356,15 +356,12 @@ static void process_vpd(struct vpd_cache *vpd)
 
switch (vpd->product_id) {
case VPD_PRODUCT_B450:
-   env_set("confidx", "1");
i210_index = 1;
break;
case VPD_PRODUCT_B650:
-   env_set("confidx", "2");
i210_index = 1;
break;
case VPD_PRODUCT_B850:
-   env_set("confidx", "3");
i210_index = 2;
break;
}
@@ -554,16 +551,23 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 
 int board_fit_config_name_match(const char *name)
 {
+   const char *machine = name;
+
if (!vpd.is_read)
return strcmp(name, "imx6q-bx50v3");
 
+   if (!strncmp(machine, "Boot ", 5))
+   machine += 5;
+   if (!strncmp(machine, "imx6q-", 6))
+   machine += 6;
+
switch (vpd.product_id) {
case VPD_PRODUCT_B450:
-   return strcmp(name, "imx6q-b450v3");
+   return strcasecmp(machine, "b450v3");
case VPD_PRODUCT_B650:
-   return strcmp(name, "imx6q-b650v3");
+   return strcasecmp(machine, "b650v3");
case VPD_PRODUCT_B850:
-   return strcmp(name, "imx6q-b850v3");
+   return strcasecmp(machine, "b850v3");
default:
return -1;
}
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index e5c580b3f910..2d854af9a06d 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -62,7 +62,7 @@
 "networkboot=" \
 "run setnetworkboot; " \
 "nfs ${loadaddr} /srv/nfs/fitImage; " \
-"bootm ${loadaddr}#conf@${confidx}\0" \
+"bootm ${loadaddr}\0" \
 
 #define CONFIG_NETWORKBOOTCOMMAND \
"run networkboot; " \
@@ -111,7 +111,7 @@
"doboot=" \
"echo Booting from ${dev}:${devnum}:${partnum} ...; " \
"run setargs; " \
-   "bootm ${loadaddr}#conf@${confidx}\0" \
+   "bootm ${loadaddr}\0" \
"tryboot=" \
"setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
"run loadimage || run swappartitions && run loadimage || " \
-- 
2.29.2



[PATCH 0/3] GE Bx50v3 cleanups

2020-12-08 Thread Sebastian Reichel
Here are some more cleanups for the GE Bx50v3 board(s):

PATCH 1+2: replace magic numbers by analyzing name string from
   the fitImage config node

PATCH 3: rely on PHY driver as much as possible

-- Sebastian

Sebastian Reichel (3):
  image: support board_fit_config_name_match
  board: ge: bx50v3: remove confidx magic numbers
  board: ge: bx50v3: cleanup phy config

 arch/arm/dts/imx6q-ba16.dtsi | 11 
 board/ge/bx50v3/bx50v3.c | 51 
 common/image-fit.c   |  7 +
 include/configs/ge_bx50v3.h  |  4 +--
 4 files changed, 42 insertions(+), 31 deletions(-)

-- 
2.29.2



[PATCH 3/3] board: ge: bx50v3: cleanup phy config

2020-12-08 Thread Sebastian Reichel
The current PHY rework does the following things:

1. Configure 125MHz clock
2. Setup the TX clock delay (RX is enabled by default),
3. Setup reserved bits to avoid voltage peak

The clock delays are nowadays already configured by the
PHY driver (in ar803x_delay_config). The code for that
can simply be dropped. The clock speed can also be
configured by the PHY driver by adding the device tree
property "qca,clk-out-frequency".

What is left is setting up the undocumented reserved bits
to avoid the voltage peak problem. I slightly improved its
documentation while updating the board's PHY rework code.

Signed-off-by: Sebastian Reichel 
---
 arch/arm/dts/imx6q-ba16.dtsi | 11 +++
 board/ge/bx50v3/bx50v3.c | 35 ---
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/arch/arm/dts/imx6q-ba16.dtsi b/arch/arm/dts/imx6q-ba16.dtsi
index 7d8f61f2fd79..9da2bb6e869e 100644
--- a/arch/arm/dts/imx6q-ba16.dtsi
+++ b/arch/arm/dts/imx6q-ba16.dtsi
@@ -174,6 +174,17 @@
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii-id";
status = "okay";
+   phy-handle = <&phy0>;
+
+   mdio {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   phy0: ethernet-phy@4 {
+   reg = <4>;
+   qca,clk-out-frequency = <12500>;
+   };
+   };
 };
 
 &hdmi {
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index a3ae037a82ef..3ea9425fd1ea 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -47,6 +47,10 @@ DECLARE_GLOBAL_DATA_PTR;
 #define VPD_PRODUCT_B650 2
 #define VPD_PRODUCT_B450 3
 
+#define AR8033_DBG_REG_ADDR0x1d
+#define AR8033_DBG_REG_DATA0x1e
+#define AR8033_SERDES_REG  0x5
+
 static int productid;  /* Default to generic. */
 static struct vpd_cache vpd;
 
@@ -61,31 +65,16 @@ int dram_init(void)
return 0;
 }
 
-static int mx6_rgmii_rework(struct phy_device *phydev)
-{
-   /* Configure AR8033 to ouput a 125MHz clk from CLK_25M */
-   /* set device address 0x7 */
-   phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x7);
-   /* offset 0x8016: CLK_25M Clock Select */
-   phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x8016);
-   /* enable register write, no post increment, address 0x7 */
-   phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x4007);
-   /* set to 125 MHz from local PLL source */
-   phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x18);
-
-   /* rgmii tx clock delay enable */
-   /* set debug port address: SerDes Test and System Mode Control */
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05);
-   /* enable rgmii tx clock delay */
-   /* set the reserved bits to avoid board specific voltage peak issue*/
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x3D47);
-
-   return 0;
-}
-
 int board_phy_config(struct phy_device *phydev)
 {
-   mx6_rgmii_rework(phydev);
+   /*
+* Set reserved bits to avoid board specific voltage peak issue. The
+* value is a magic number provided directly by Qualcomm. Note, that
+* PHY driver will take control of BIT(8) in this register to control
+* TX clock delay, so we do not initialize that bit here.
+*/
+   phy_write(phydev, MDIO_DEVAD_NONE, AR8033_DBG_REG_ADDR, 
AR8033_SERDES_REG);
+   phy_write(phydev, MDIO_DEVAD_NONE, AR8033_DBG_REG_DATA, 0x3c47);
 
if (phydev->drv->config)
phydev->drv->config(phydev);
-- 
2.29.2



[PATCH 2/7] efi_loader: move EFI_LOAD_FILE2_PROTOCOL_GUID

2020-12-08 Thread Heinrich Schuchardt
The EFI_LOAD_FILE_PROTOCOL_GUID and EFI_LOAD_FILE2_PROTOCOL_GUID are needed
to complement the implementation of the LoadFile() boot service.

Remove a duplicate declaration of a variable for the
EFI_LOAD_FILE2_PROTOCOL_GUID.
Move the remaining declaration to efi_boottime.c.
Add a variable for the EFI_LOAD_FILE_PROTOCOL_GUID.

Signed-off-by: Heinrich Schuchardt 
---
 include/efi_loader.h| 3 +++
 lib/efi_loader/efi_boottime.c   | 3 +++
 lib/efi_loader/efi_load_initrd.c| 3 ---
 lib/efi_selftest/efi_selftest_load_initrd.c | 7 ---
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/include/efi_loader.h b/include/efi_loader.h
index 76cd2b36f2..4c6eb8616d 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -195,6 +195,9 @@ extern const efi_guid_t efi_file_system_info_guid;
 extern const efi_guid_t efi_guid_device_path_utilities_protocol;
 /* GUID of the deprecated Unicode collation protocol */
 extern const efi_guid_t efi_guid_unicode_collation_protocol;
+/* GUIDs of the Load File and Load File2 protocol */
+extern const efi_guid_t efi_guid_load_file_protocol;
+extern const efi_guid_t efi_guid_load_file2_protocol;
 /* GUID of the Unicode collation protocol */
 extern const efi_guid_t efi_guid_unicode_collation_protocol2;
 extern const efi_guid_t efi_guid_hii_config_routing_protocol;
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 4f7479d4df..afe8adb91e 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -81,6 +81,9 @@ const efi_guid_t efi_guid_event_group_ready_to_boot =
 /* event group ResetSystem() invoked (before ExitBootServices) */
 const efi_guid_t efi_guid_event_group_reset_system =
EFI_EVENT_GROUP_RESET_SYSTEM;
+/* GUIDs of the Load File and Load File2 protocols */
+const efi_guid_t efi_guid_load_file_protocol = EFI_LOAD_FILE_PROTOCOL_GUID;
+const efi_guid_t efi_guid_load_file2_protocol = EFI_LOAD_FILE2_PROTOCOL_GUID;

 static efi_status_t EFIAPI efi_disconnect_controller(
efi_handle_t controller_handle,
diff --git a/lib/efi_loader/efi_load_initrd.c b/lib/efi_loader/efi_load_initrd.c
index d517d686c3..4bf3b5ef68 100644
--- a/lib/efi_loader/efi_load_initrd.c
+++ b/lib/efi_loader/efi_load_initrd.c
@@ -12,9 +12,6 @@
 #include 
 #include 

-static const efi_guid_t efi_guid_load_file2_protocol =
-   EFI_LOAD_FILE2_PROTOCOL_GUID;
-
 static efi_status_t EFIAPI
 efi_load_file2_initrd(struct efi_load_file_protocol *this,
  struct efi_device_path *file_path, bool boot_policy,
diff --git a/lib/efi_selftest/efi_selftest_load_initrd.c 
b/lib/efi_selftest/efi_selftest_load_initrd.c
index fe060a6644..f591dcd211 100644
--- a/lib/efi_selftest/efi_selftest_load_initrd.c
+++ b/lib/efi_selftest/efi_selftest_load_initrd.c
@@ -86,7 +86,6 @@ static int setup(const efi_handle_t handle,

 static int execute(void)
 {
-   efi_guid_t lf2_proto_guid = EFI_LOAD_FILE2_PROTOCOL_GUID;
struct efi_load_file_protocol *lf2;
struct efi_device_path *dp2, *dp2_invalid;
efi_status_t status;
@@ -99,13 +98,15 @@ static int execute(void)
memset(buffer, 0, sizeof(buffer));

dp2 = (struct efi_device_path *)&dp;
-   status = boottime->locate_device_path(&lf2_proto_guid, &dp2, &handle);
+   status = boottime->locate_device_path(&efi_guid_load_file2_protocol,
+ &dp2, &handle);
if (status != EFI_SUCCESS) {
efi_st_error("Unable to locate device path\n");
return EFI_ST_FAILURE;
}

-   status = boottime->handle_protocol(handle, &lf2_proto_guid,
+   status = boottime->handle_protocol(handle,
+  &efi_guid_load_file2_protocol,
   (void **)&lf2);
if (status != EFI_SUCCESS) {
efi_st_error("Unable to locate protocol\n");
--
2.29.2



[PATCH 5/7] efi_loader: support EFI_LOAD_FILE_PROTOCOL

2020-12-08 Thread Heinrich Schuchardt
Support loading images via the EFI_LOAD_FILE_PROTOCOL and
EFI_LOAD_FILE2_PROTOCOL.

Signed-off-by: Heinrich Schuchardt 
---
 lib/efi_loader/efi_boottime.c | 49 ++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 1983ca3f6b..9bd63b6e52 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1942,6 +1942,10 @@ efi_status_t efi_load_image_from_path(bool boot_policy,
efi_handle_t device;
efi_status_t ret;
struct efi_device_path *dp;
+   struct efi_load_file_protocol *load_file_protocol = NULL;
+   efi_uintn_t buffer_size;
+   uint64_t addr, pages;
+   const efi_guid_t *guid;

/* In case of failure nothing is returned */
*buffer = NULL;
@@ -1952,7 +1956,50 @@ efi_status_t efi_load_image_from_path(bool boot_policy,
   &efi_simple_file_system_protocol_guid, &dp, &device));
if (ret == EFI_SUCCESS)
return efi_load_image_from_file(file_path, buffer, size);
-   return EFI_NOT_FOUND;
+
+   ret = EFI_CALL(efi_locate_device_path(
+  &efi_guid_load_file_protocol, &dp, &device));
+   if (ret == EFI_SUCCESS) {
+   guid = &efi_guid_load_file_protocol;
+   } else if (!boot_policy) {
+   guid = &efi_guid_load_file2_protocol;
+   ret = EFI_CALL(efi_locate_device_path(guid, &dp, &device));
+   }
+   if (ret != EFI_SUCCESS)
+   return EFI_NOT_FOUND;
+   ret = EFI_CALL(efi_handle_protocol(device, guid,
+  (void **)&load_file_protocol));
+   if (ret != EFI_SUCCESS)
+   return EFI_NOT_FOUND;
+   buffer_size = 0;
+   ret = load_file_protocol->load_file(load_file_protocol, dp,
+   boot_policy, &buffer_size,
+   NULL);
+   if (ret != EFI_BUFFER_TOO_SMALL)
+   goto out;
+   pages = efi_size_in_pages(buffer_size);
+   ret = efi_allocate_pages(EFI_ALLOCATE_ANY_PAGES, EFI_BOOT_SERVICES_DATA,
+pages, &addr);
+   if (ret != EFI_SUCCESS) {
+   ret = EFI_OUT_OF_RESOURCES;
+   goto out;
+   }
+   ret = EFI_CALL(load_file_protocol->load_file(
+   load_file_protocol, dp, boot_policy,
+   &buffer_size, (void *)(uintptr_t)addr));
+   if (ret != EFI_SUCCESS)
+   efi_free_pages(addr, pages);
+out:
+   if (load_file_protocol)
+   EFI_CALL(efi_close_protocol(device,
+   &efi_guid_load_file2_protocol,
+   efi_root, NULL));
+   if (ret == EFI_SUCCESS) {
+   *buffer = (void *)(uintptr_t)addr;
+   *size = buffer_size;
+   }
+
+   return ret;
 }

 /**
--
2.29.2



[PATCH 0/7] efi_loader: support EFI_LOAD_FILE_PROTOCOL

2020-12-08 Thread Heinrich Schuchardt
According to the UEFI specification the LoadImage() boot service must
support loading images via the EFI_LOAD_FILE_PROTOCOL and
EFI_LOAD_FILE2_PROTOCOL.

This series implements the support and adds a unit test.

Heinrich Schuchardt (7):
  efi_loader: resequence functions in efi_boottime.c
  efi_loader: move EFI_LOAD_FILE2_PROTOCOL_GUID
  efi_loader: pass boot_policy to efi_load_image_from_path
  efi_loader: carve out efi_load_image_from_file()
  efi_loader: support EFI_LOAD_FILE_PROTOCOL
  efi_selftest: clean up Makefile
  efi_selftest: test EFI_LOAD_FILE_PROTOCOL

 include/efi_loader.h|   3 +
 lib/efi_loader/efi_boottime.c   | 269 +++
 lib/efi_loader/efi_load_initrd.c|   3 -
 lib/efi_selftest/Makefile   |  17 +-
 lib/efi_selftest/efi_selftest_load_file.c   | 475 
 lib/efi_selftest/efi_selftest_load_initrd.c |   7 +-
 6 files changed, 665 insertions(+), 109 deletions(-)
 create mode 100644 lib/efi_selftest/efi_selftest_load_file.c

--
2.29.2



  1   2   >