Re: [PATCH 0/7] Enable new drivers added for U-Boot 2021.10 in "stemmy" board

2021-08-07 Thread Linus Walleij
On Sat, Aug 7, 2021 at 3:07 PM Stephan Gerhold wrote: > This series finishes up the work done for ARM U8500 in the U-Boot > 2021.10 merge window. The new drivers are added to MAINTAINERS, > then enabled in Kconfig and finally the "stemmy" board is updated > to make use of them. > > > Stephan Gerh

RFC: Support for U-Boot phases in Kconfig

2021-08-07 Thread Simon Glass
Hi, U-Boot can be configured to build the source multiple times to product multiple 'phases'. The main phase is the full U-Boot, but an 'SPL' (Secondary Program Loader) build can produce a cut-down image only suitable for loading U-Boot proper. SPL does not want to use the same Kconfig options, s

Re: [PATCH] am335x_evm_defconfig: Disable CMD_BOOTEFI_BOOTMGR

2021-08-07 Thread Tom Rini
On Sat, Aug 07, 2021 at 08:20:54PM +0300, Matwey V. Kornilov wrote: > Previously, it was reported [1] that > > commit f3866909e350 ("distro_bootcmd: call EFI bootmgr even without > having /EFI/boot") > > introduced a regression for am335x_evm_defconfig (BeagleBone Black board). > Namely, an

[PATCH] am335x_evm_defconfig: Disable CMD_BOOTEFI_BOOTMGR

2021-08-07 Thread Matwey V. Kornilov
Previously, it was reported [1] that commit f3866909e350 ("distro_bootcmd: call EFI bootmgr even without having /EFI/boot") introduced a regression for am335x_evm_defconfig (BeagleBone Black board). Namely, an attempt to execute EFI binary from USB mass storage device has been ending up with

Re: [PATCH v1 1/5] lib/string: Add memset_simple()

2021-08-07 Thread Tom Rini
On Sat, Aug 07, 2021 at 05:18:48PM +0200, Wolfgang Denk wrote: > Dear Heinrich, > > In message you wrote: > > > > EFI binaries are freestanding. They cannot use any U-Boot library > > function except the UEFI API exposed via the system table. > > I fail to see why they cannot link standard libr

Re: [PATCH v1 1/5] lib/string: Add memset_simple()

2021-08-07 Thread Wolfgang Denk
Dear Heinrich, In message you wrote: > > EFI binaries are freestanding. They cannot use any U-Boot library > function except the UEFI API exposed via the system table. I fail to see why they cannot link standard library functions provided elsewhere in the U-Boot code. Why do you have to reimpl

Re: [PATCH v2 00/32] pci: Drop all pre-driver model code

2021-08-07 Thread Simon Glass
On Sat, 7 Aug 2021 at 08:32, Tom Rini wrote: > > On Sat, Aug 07, 2021 at 08:14:31AM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Sun, 1 Aug 2021 at 18:54, Simon Glass wrote: > > > > > > The hard work to actually enable DM_PCI everywhere was done recently. This > > > series attempts to drop mo

Re: [PATCH v2 00/32] pci: Drop all pre-driver model code

2021-08-07 Thread Tom Rini
On Sat, Aug 07, 2021 at 08:14:31AM -0600, Simon Glass wrote: > Hi Tom, > > On Sun, 1 Aug 2021 at 18:54, Simon Glass wrote: > > > > The hard work to actually enable DM_PCI everywhere was done recently. This > > series attempts to drop most of the code that it no-longer needed now that > > PCI has

Re: [PATCH v2 00/32] pci: Drop all pre-driver model code

2021-08-07 Thread Simon Glass
Hi Tom, On Sun, 1 Aug 2021 at 18:54, Simon Glass wrote: > > The hard work to actually enable DM_PCI everywhere was done recently. This > series attempts to drop most of the code that it no-longer needed now that > PCI has been converted to driver model. > > It also drops the UCP1020 board since i

Re: [PATCH] am33xx: Fix USB for am335x boards

2021-08-07 Thread Paul Barker
On Sat, 7 Aug 2021 14:17:38 +0300 "Matwey V. Kornilov" wrote: > USB nodes were mistakenly disabled in > > commit 942853dd96df ("arm: dts: Resync BeagleBone device trees") > > This commit is to fix the following issue: > > starting USB... > No working controllers found > USB is

[PATCH V5 43/44] arm: dts: add i.MX8ULP dtsi

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add i.MX8ULP dtsi Signed-off-by: Peng Fan --- arch/arm/dts/imx8ulp-pinfunc.h| 978 ++ arch/arm/dts/imx8ulp.dtsi | 728 include/dt-bindings/clock/imx8ulp-clock.h | 247 ++ 3 files changed, 1953 insertions(+) cr

[PATCH 11/12] irq: Tidy up of-platdata irq support

2021-08-07 Thread Simon Glass
This function is available but not exported. More generally it does not really work as intended. Reimplement it and add a sandbox test too. Signed-off-by: Simon Glass --- arch/sandbox/dts/sandbox.dtsi | 13 + arch/sandbox/include/asm/irq.h | 20 drivers/misc

[PATCH 12/12] dm: gpio: Add of-platdata support

2021-08-07 Thread Simon Glass
Add support for accessing GPIOs using of-plata. This uses the same mechanism as for clocks, but allows use of the xlate() method so that the driver can interpret the parameters. Update the condition for GPIO_HOG so that it is not built into SPL, since it needs SPL_OF_REAL which is not enabled in s

[PATCH 09/12] clk: Rename clk_get_by_driver_info()

2021-08-07 Thread Simon Glass
This is actually a misnomer now, since the phandle info may contain a driver_info index or a udevice index. Rename it to use the word 'phandle', which seems more accurate. Add a comment while we are here. Also add a test for this function. Signed-off-by: Simon Glass --- drivers/clk/clk-uclass.

[PATCH 07/12] fdt: Update Makefile rules with the new OF_REAL Kconfig

2021-08-07 Thread Simon Glass
Simplify some of the Makefile rules using this Kconfig. Signed-off-by: Simon Glass --- Makefile | 7 ++- lib/Makefile | 5 + scripts/Makefile.spl | 9 +++-- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 269e353a28a..378

[PATCH 10/12] dm: doc: Add a note about of-platdata header files

2021-08-07 Thread Simon Glass
This error can be confusing so mention it specifically in the documentation. Signed-off-by: Simon Glass --- doc/develop/driver-model/of-plat.rst | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/develop/driver-model/of-plat.rst b/doc/develop/dri

[PATCH 08/12] dm: Add comments to dt-structs contents

2021-08-07 Thread Simon Glass
These structs do not have comments at present. Add them. Signed-off-by: Simon Glass --- include/dt-structs.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/include/dt-structs.h b/include/dt-structs.h index f9ccaf56a46..fa1622cb1dc 100644 --- a/include/dt-struct

[PATCH 06/12] treewide: Try to avoid the preprocessor with OF_REAL

2021-08-07 Thread Simon Glass
Convert some of these occurences to C code, where it is easy to do. This should help encourage this approach to be used in new code. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/p2sb.c | 20 doc/develop/driver-model/of-plat.rst | 6 +-- drivers/clk/clk_fixed_factor.c

[PATCH 04/12] treewide: Use OF_REAL instead of !OF_PLATDATA

2021-08-07 Thread Simon Glass
Now that we have a 'positive' Kconfig option, use this instead of the negative one, which is harder to understand. Signed-off-by: Simon Glass --- arch/arm/mach-rockchip/rk3399/syscon_rk3399.c | 2 +- arch/arm/mach-rockchip/rk3568/syscon_rk3568.c | 2 +- arch/x86/cpu/apollolake/hostbridge.c

[PATCH 05/12] mmc: nds32: ftsdc010: Convert to livetree

2021-08-07 Thread Simon Glass
Use the livetree API for this driver. Signed-off-by: Simon Glass --- drivers/mmc/ftsdc010_mci.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c index 221fba313d3..b30da5b72a4 100644 --- a/drivers

[PATCH 03/12] treewide: Simply conditions with the new OF_REAL

2021-08-07 Thread Simon Glass
Use this new Kconfig to simplify the compilation conditions where appropriate. Signed-off-by: Simon Glass --- arch/x86/lib/lpc-uclass.c | 2 +- common/spl/spl.c | 2 +- common/spl/spl_spi.c | 8 drivers/clk/clk-uclass.

[PATCH 02/12] fdt: Create a new OF_REAL Kconfig

2021-08-07 Thread Simon Glass
The condition to indicate whether there is a runtime devicetree available is OF_CONTROL && !OF_PLATDATA. This is a bit unweidly and is repeated in a lot of places. Add a new OF_REAL Kconfig which provides this information directly. Note: This is similar in effect to LIBFDT. We might consider drop

[PATCH 01/12] treewide: fdt: Move fdt_get_config_... to ofnode_conf_read...

2021-08-07 Thread Simon Glass
The current API is outdated as it requires a devicetree pointer. Move these functions to use the ofnode API and update this globally. Add some tests while we are here. Correct the call in exynos_dsim_config_parse_dt() which is obviously wrong. Signed-off-by: Simon Glass --- arch/arm/mach-rock

[PATCH 00/12] dm: Expand of-platdata support to GPIOs and clean up

2021-08-07 Thread Simon Glass
The of-platdata feature allows driver model to be used in SPL without the overhead of a devicetree. The relevant parts of the devicetree are converted to C by the dtoc tool. So far of-platdata supports various drivers but not enough to support the am335x boards. This series adds GPIO support to o

[PATCH 4/7] arm: dts: u8500: u-boot: Add fixed clock for eMMC

2021-08-07 Thread Stephan Gerhold
So far there is no need for a clock driver in U-Boot because the previous boot stage leaves all the necessary clocks on. However, some drivers in U-Boot (e.g. arm_pl180_mmci) depend on having a clock driver to obtain the clock frequency. Setting up the clock drivers properly is a bit tricky on U85

[PATCH 7/7] arm: u8500: Prefer building in thumb mode by default

2021-08-07 Thread Stephan Gerhold
Enabling CONFIG_SYS_THUMB_BUILD produces a significantly smaller U-Boot binary (250 KiB vs 320 KiB) that still seems to be fully functional. Make use of that by default but keep it as "imply" so it can be disabled for testing in case this causes trouble for someone. Signed-off-by: Stephan Gerhold

[PATCH 6/7] board: stemmy: Update documentation

2021-08-07 Thread Stephan Gerhold
Over the time, the "stemmy" U-Boot board was tested on several other Samsung smartphones based on ST-Ericsson NovaThor Ux500. Convert the documentation to reStructuredText at doc/board/ste/stemmy.rst and make the device list complete. Also note that the board now boots into USB Fastboot instead of

[PATCH 3/7] arm: dts: u8500: Update from Linux ux500-dts-for-v5.15

2021-08-07 Thread Stephan Gerhold
Update ste-dbx5x0.dtsi, ste-ab8500.dtsi and ste-ab8505.dtsi with the changes made in upstream Linux. They are taken from https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/ branch "ux500-dts-for-v5.15" (pending merge for Linux 5.15). The only relevant change for U-Boot here i

[PATCH 5/7] board: stemmy: Add basic Fastboot support

2021-08-07 Thread Stephan Gerhold
Make use of the new drivers for ARM U8500 introduced in the U-Boot 2021.10 merge window by adding basic support for USB Fastboot with the "stemmy" board. As a first step this will always boot directly into USB Fastboot for now with the console displayed on the screen to make that obvious. Samsung

[PATCH 2/7] arm: u8500: Imply options for new drivers

2021-08-07 Thread Stephan Gerhold
Imply the options for new drivers added for ARM U8500 during the U-Boot 2021.10 merge window. Adding these as "imply" in the Kconfig avoids having to add them to all the board defconfigs but still allows disabling them if wanted. Also select DM_USB_GADGET if DM_USB is selected because otherwise th

[PATCH 0/7] Enable new drivers added for U-Boot 2021.10 in "stemmy" board

2021-08-07 Thread Stephan Gerhold
This series finishes up the work done for ARM U8500 in the U-Boot 2021.10 merge window. The new drivers are added to MAINTAINERS, then enabled in Kconfig and finally the "stemmy" board is updated to make use of them. Stephan Gerhold (7): MAINTAINERS: Add new drivers for ARM U8500 arm: u8500:

[PATCH 1/7] MAINTAINERS: Add new drivers for ARM U8500

2021-08-07 Thread Stephan Gerhold
Update MAINTAINERS with various drivers for ARM U8500 that were added during the U-Boot 2021.10 merge window. Signed-off-by: Stephan Gerhold --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 776ff703b9..d64dcfacad 100644 --- a/MAINTAINERS +

[PATCH] am33xx: Fix USB for am335x boards

2021-08-07 Thread Matwey V. Kornilov
USB nodes were mistakenly disabled in commit 942853dd96df ("arm: dts: Resync BeagleBone device trees") This commit is to fix the following issue: starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working contro

[PATCH] imx: cmd: use struct cmd_tbl

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan cmd_tbl_t is removed, need use struct cmd_tbl Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_mfgprot.c | 2 +- arch/arm/mach-imx/priblob.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/cmd_mfgprot.c b/arch/arm/mach-imx/cmd_mfgpro

RE: [PATCH V4 00/44] imx: add i.MX8ULP support

2021-08-07 Thread Peng Fan (OSS)
Hi Stefano, > Subject: Re: [PATCH V4 00/44] imx: add i.MX8ULP support > > Hi Peng, > > On 02.08.21 13:01, Peng Fan (OSS) wrote: > >> Subject: Re: [PATCH V4 00/44] imx: add i.MX8ULP support > >> > >> On 02.08.21 11:45, Peng Fan (OSS) wrote: > >>> Hi Stefano, > >>> > >>> Do you have time to re-pic

[PATCH V5 41/44] imx8ulp: add upower api support

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add upower api support, this is modified from upower firmware exported package. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/upower.h| 15 + arch/arm/mach-imx/imx8ulp/Makefile| 4 + arch/arm/mach-imx/imx8ulp/upower/Makefile | 6 + arch/a

[PATCH V5 29/44] arm: imx8ulp: release trdc and assign lpav from RTD to APD

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Rlease LPAV from RTD to APD Release gpu2D/3D to APD Set TRDC MBC2 MEM1 for iomuxc0 access Since upower depends AP/M33 SW to configure IOMUX for its PMIC i2c and MODE pins. we have to open iomuxc0 access for A35 core (domain 7) in single boot. Signed-off-by: Peng Fan Signed-off-by

[PATCH V5 42/44] ddr: Add DDR driver for iMX8ULP

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Add iMX8ULP DDR initialization driver which loads the DDR timing parameters and executes the training procedure. When enabling IMX8ULP_DRAM_PHY_PLL_BYPASS, using PHY PLL bypass mode to do DDR init Signed-off-by: Ye Li --- drivers/Makefile | 1 + drivers/ddr/imx

[PATCH V5 33/44] arm: imx8ulp: Allocate DCNANO and MIPI_DSI to AD domain

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Configure DCNANO and MIPI_DSI to be controlled by AD for single boot Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8ulp/soc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c index add46

[PATCH V5 30/44] imx8ulp: unify rdc functions

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Unify rdc function to rdc.c Update soc.c to use new rdc function Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/rdc.h | 27 +++ arch/arm/mach-imx/imx8ulp/rdc.c | 283 +++- arch/arm/mach-imx/imx8ulp/soc.c | 180 ++-

[PATCH V5 44/44] arm: imx: add i.MX8ULP EVK support

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add i.MX8ULP EVK basic support, support SD/I2C/ENET/LPUART Log as below: I would keep some debug info for now, and after we move to be stable and production launch, we could drop that. U-Boot SPL 2021.07-rc4-00164-gb800e19a6b (Jun 29 2021 - 10:23:30 +0800) Normal Boot upower_init

[PATCH V5 40/44] imx8ulp: move struct mu_type to common header

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Move struct mu_type to common header to make it reusable by upower and S400 Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/imx-regs.h | 25 drivers/misc/imx8ulp/imx8ulp_mu.c| 19 +-- 2 files changed, 26 insertions(+), 1

[PATCH V5 39/44] imx8ulp: Add workaround for eMMC boot

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li When booting from boot part1/2, the image offset should be 0, but ROM has a bug to return 0x8000. Has to workaround the issue before ROM fix it. Use a ROM function to know boot from emmc boot part or user part So we can set the image offset accordingly. Signed-off-by: Ye Li --- ar

[PATCH V5 38/44] imx8ulp: Use DGO_GP5 to get boot config

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Since CMC1 MR0 only reflects high 16 bits boot cfg used for AP domian, it does not connect to low 16 bits for RTD. So we can't get the correct boot mode. Change to use DGO_GP5 of SEC_SIM which is set by ROM. Signed-off-by: Ye Li --- arch/arm/mach-imx/imx8ulp/soc.c | 2 +- 1 file ch

[PATCH V5 37/44] imx8ulp: soc: correct reset cause

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan The CMC1 SRS reflects the current reset cause, not SSRS. Then you could get "Reset cause: WARM-WDG" when issue reset in U-Boot. Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8ulp/soc.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff

[PATCH V5 32/44] arm: iMX8ULP: Add boot device relevant functions

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Read from ROM API to get current boot device. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/sys_proto.h | 1 + arch/arm/mach-imx/imx8ulp/soc.c | 84 +++ 2 files changed, 85 insertions(+) diff --git a/arch/arm/inc

[PATCH V5 36/44] driver: misc: imx8ulp: Add fuse driver for imx8ulp

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li This driver uses FSB to read some fuses, but not support program fuse. It only works in SPL (secure mode), u-boot needs traps to ATF to read them. Some fuses can read from S400 API and others are from FSB. Also support program some fuses via S400 API Signed-off-by: Ye Li --- drive

[PATCH V5 35/44] arm: imx8ulp: add iomuxc support

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add i.MX8ULP iomuxc support Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/iomux.h | 82 +++ arch/arm/mach-imx/imx8ulp/iomux.c | 56 +++- 2 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 arch/arm/include

[PATCH V5 31/44] arm: imx8ulp: Probe the S400 MU device in arch init

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Need probe the S400 MU device in arch_cpu_init_dm, so we can use S400 API in u-boot Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8ulp/soc.c | 35 - 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-

[PATCH V5 34/44] arm: imx8ulp: add dummy imx_get_mac_from_fuse

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add imx_get_mac_from_fuse for enet build pass Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8ulp/soc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c index e5985c4cf1..0728cb9847 100644 --- a/arch/arm

[PATCH V5 28/44] arm: imx8ulp: add trdc release request

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add TRDC release request, then we could configure resources to be accessible by A35 Domain. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8ulp/soc.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-imx/imx8ulp/soc.c

[PATCH V5 26/44] arm: imx8ulp: release and configure XRDC at early phase

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Since S400 will set the memory of SPL image to R/X. We can't write to any data in SPL image. 1. Set the parameters save/restore only for u-boot, not for SPL. to avoid write data. 2. Not use MU DM driver but directly call MU API to send release XRDC to S400 at early phase. 3. Co

[PATCH V5 27/44] arm: imx8ulp: add rdc support

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan There is xrdc inside i.MX8ULP, we need to configure permission to make sure AP non-secure world could access the resources. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/sys_proto.h | 2 + arch/arm/mach-imx/imx8ulp/Makefile| 2 +- arch/arm/mach-im

[PATCH V5 25/44] drivers: misc: s400_api: Update API for fuse read and write

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Add API to support fuse read and write Signed-off-by: Ye Li --- arch/arm/include/asm/arch-imx8ulp/s400_api.h | 7 +- drivers/misc/imx8ulp/s400_api.c | 81 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-imx

[PATCH V5 24/44] drivers: misc: imx8ulp: Update S400 API for release RDC

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li The RDC API is updated to add a field for XRDC or TRDC Signed-off-by: Ye Li --- arch/arm/include/asm/arch-imx8ulp/s400_api.h | 2 +- drivers/misc/imx8ulp/s400_api.c | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-im

[PATCH V5 23/44] drivers: misc: imx8ulp: Add S400 API for image authentication

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Add S400 API for image authentication Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/s400_api.h | 8 +- drivers/misc/imx8ulp/s400_api.c | 121 ++- 2 files changed, 127 insertions(+), 2 deletions(-) diff --git a/ar

[PATCH V5 22/44] drivers: misc: s400_api: Update S400_SUCCESS_IND to 0xd6

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li According to latest S400 API doc, the the success indicate value is changed to 0xd6. So update the driver codes. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/misc/imx8ulp/imx8ulp_mu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/imx8

[PATCH V5 21/44] arm: imx8ulp: Update the reset vector in u-boot

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Because we have set reset vector to ATF in SPL, have to set it back to ROM for any reset in u-boot Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8ulp/soc.c | 35 + 1 file changed, 22 insertions(+), 13 deletions(-) diff --git

[PATCH V5 20/44] arm: imx8ulp: disable wdog3

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Disable wdog3 which is configured by ROM Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8ulp/soc.c | 36 - 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c index 33ae

[PATCH V5 19/44] arm: imx8ulp: Enable full L2 cache in SPL

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li SRAM2 is half L2 cache and default to SRAM after system boot. To enable the full l2 cache (512KB), it needs to reset A35 to make the change happen. So re-implement the jump entry function in SPL: 1. configure the core0 reset vector to entry (ATF) 2. enable the L2 full cache 3. reset

[PATCH V5 18/44] arm: imx8ulp: soc: Change to use CMC1 to get bootcfg

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li CMC1 also has a MR register for bootcfg Signed-off-by: Ye Li --- arch/arm/mach-imx/imx8ulp/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c index 6f4b506386..cddcdc2d20 100644 --- a/arch/arm/

[PATCH V5 16/44] arm: imx8ulp: add clock support

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add i.MX8ULP clock support Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/cgc.h | 130 ++ arch/arm/include/asm/arch-imx8ulp/clock.h| 9 +- arch/arm/include/asm/arch-imx8ulp/imx-regs.h | 1 + arch/arm/include/asm/arch-imx8ulp/pcc.h | 139 +

[PATCH V5 17/44] drivers: mmc: fsl_esdhc_imx: support i.MX8ULP

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan i.MX8ULP reuse same SDHC IP as i.MX8M, so follow i.MX8M code logic. Signed-off-by: Peng Fan --- drivers/mmc/Kconfig | 2 +- drivers/mmc/fsl_esdhc_imx.c | 12 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kc

[PATCH V5 15/44] driver: serial: fsl_lpuart: support i.MX8ULP

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan i.MX8ULP lpuart has same register layout as i.MX7ULP and i.MX8 Signed-off-by: Peng Fan --- include/fsl_lpuart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fsl_lpuart.h b/include/fsl_lpuart.h index 511fb84367..18e5cc15d6 100644 --- a/include/fsl_l

[PATCH V5 14/44] pinctrl: Add pinctrl driver for imx8ulp

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Add pinctrl driver for i.MX8ULP Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/pinctrl/nxp/Kconfig | 14 + drivers/pinctrl/nxp/Makefile | 1 + drivers/pinctrl/nxp/pinctrl-imx8ulp.c | 44 +++ 3 files changed, 59 insertio

[PATCH V5 12/44] driver: misc: Add MU and S400 API to communicate with Sentinel

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Add MU driver and S400 API. Need enable MISC driver to work Signed-off-by: Ye Li --- arch/arm/include/asm/arch-imx8ulp/s400_api.h | 30 +++ arch/arm/include/asm/global_data.h | 5 + drivers/misc/Makefile| 1 + drivers/misc/imx8ulp/Makefile

[PATCH V5 13/44] net: fec_mxc: support i.MX8ULP

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Support i.MX8ULP in fec_mxc Signed-off-by: Peng Fan Reviewed-by: Ramon Fried --- drivers/net/Kconfig | 2 +- drivers/net/fec_mxc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 8b10148579..32f2708dc3 100

[PATCH V5 10/44] arm: imx8ulp: add container support

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li i.MX8ULP support using ROM API to load container image, it use same ROM API as i.MX8MN/MP, and use same container format as i.MX8QM/QXP. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/sys_proto.h | 2 + arch/arm/include/asm/mach-imx/image.h

[PATCH V5 11/44] arm: imx: move container Kconfig under mach-imx

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Since i.MX8 and i.MX8ULP reuse common container, so move the Kconfig public to both. Signed-off-by: Peng Fan --- arch/arm/mach-imx/Kconfig | 13 + arch/arm/mach-imx/imx8/Kconfig | 13 - 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a

[PATCH V5 09/44] arm: imx: parse-container: guard included header files

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Guard included sci.h with CONFIG_AHAB_BOOT to avoid build failure for i.MX8ULP Signed-off-by: Peng Fan --- arch/arm/mach-imx/parse-container.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/parse-container.c b/arch/arm/mach-imx/parse-container.c index e

[PATCH V5 08/44] arm: imx8: Move container image header file to mach-imx

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Since the container is shared among i.MX platforms, move its header file to mach-imx Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/include/asm/{arch-imx8 => mach-imx}/image.h | 0 arch/arm/mach-imx/cmd_dek.c | 2 +- arch/arm/mach-imx/image-cont

[PATCH V5 06/44] arm: imx: basic i.MX8ULP support

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add basic i.MX8ULP support For the MMU part, Using a simple way the calculate the MMU size to avoid default heavy calcaulation. And align address and size in the table settings to 2MB or 4GB as much as possible. So we can reduce the 4K page allocations in MMU table which will spen

[PATCH V5 07/44] arm: imx8: Move container parser and image to mach-imx common folder

2021-08-07 Thread Peng Fan (OSS)
From: Ye Li Since we will re-use the container parser on imx8ulp, move the codes to mach-imx Signed-off-by: Ye Li --- arch/arm/mach-imx/Makefile| 4 arch/arm/mach-imx/{imx8/image.c => image-container.c} | 0 arch/arm/mach-imx/imx8/Makefile

[PATCH V5 05/44] imx: imx8ulp: add get reset cause

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add get reset cause function to show what triggerred reset. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8ulp/soc.c | 69 + 1 file changed, 69 insertions(+) diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c index

[PATCH V5 03/44] arm: imx: sys_proto: move boot mode define to common header

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan These defines could be reused by i.MX8ULP, so move them to common header. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-mx7ulp/sys_proto.h | 9 - arch/arm/include/asm/mach-imx/sys_proto.h| 10 ++ 2 files changed, 10 insertions(+), 9 deletions(-) dif

[PATCH V5 04/44] arm: imx8ulp: support print cpu info

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Support print cpu info. the clock function has not been added, it will be added in following patches. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/sys_proto.h | 3 + arch/arm/mach-imx/imx8ulp/soc.c | 59 +++ 2 files changed, 62 ins

[PATCH V5 02/44] arm: imx: add i.MX8ULP cpu type and helper

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add i.MX8ULP cpu type and helpers. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx/cpu.h | 4 arch/arm/include/asm/arch-imx8ulp/sys_proto.h | 11 +++ arch/arm/include/asm/mach-imx/sys_proto.h | 1 + arch/arm/mach-imx/imx8ulp/soc.c

[PATCH V5 01/44] arm: imx: add i.MX8ULP basic Kconfig option

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan Add i.MX8ULP related basic Kconfig option, which will be used later. Signed-off-by: Peng Fan --- arch/arm/Kconfig | 11 +++ arch/arm/mach-imx/imx8ulp/Kconfig | 16 2 files changed, 27 insertions(+) create mode 100644 arch/arm/mach-imx/i

[PATCH V5 00/44] imx: add i.MX8ULP support

2021-08-07 Thread Peng Fan (OSS)
From: Peng Fan V5: Rebased on latest master. The build break was introduced by Simon's SPL config change that drop the "_SUPPORT". So this patchset use new SPL config name in patch 44. V4: Fix checkpatch errors Fix some checkpatch warnings, there are still warnings such as pin header and d