[PATCH] imx8mq_evk: enlarge SYS_MALLOC_F_LEN

2022-09-13 Thread Peng Fan (OSS)
From: Peng Fan There is "alloc space exhausted" with DEBUG_UART enabled with the options enabled. CONFIG_DEBUG_UART_BASE=0x3086 # for uart1 CONFIG_DEBUG_UART_CLOCK=2400 It is because CONFIG_SYS_MALLOC_F_LEN is too small, enlarge it. And set CONFIG_SPL_STACK to 0x188000 to not waste

[PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN

2022-09-14 Thread Peng Fan (OSS)
From: Peng Fan "alloc space exhausted" happens in very early stage, which could be seen with DEBUG_UART options enabled and leeds to an non-functional board. kontron_pitx_imx8m: CONFIG_DEBUG_UART_BASE=0x3088 # for serial3 CONFIG_DEBUG_UART_CLOCK=2400 imx8mqevk: CONFIG_DEBUG_UART_BASE=

[GIT PULL] please pull fsl-qoriq-2022-8-17

2022-08-16 Thread Peng Fan (OSS)
Hi Tom, Please pull fsl-qoriq-2022-8-17 CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/13155 Enable SPL authentication for ls1021atwr Fdt fixups for ls1043ardb v7.0 board Thanks, Peng. T

[PATCH 1/3] firmware: psci: enable DM_FLAG_PRE_RELOC

2023-04-06 Thread Peng Fan (OSS)
From: Peng Fan It is possible that cpu core may reset before relocation with PSCI reset Signed-off-by: Peng Fan --- drivers/firmware/psci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index ef3e9836461..c6b9efab41c 100644 --- a/drivers/

[PATCH 2/3] sysreset: psci: enable DM_FLAG_PRE_RELOC

2023-04-06 Thread Peng Fan (OSS)
From: Peng Fan It is possible that cpu core may reset before relocation with PSCI reset Signed-off-by: Peng Fan --- drivers/sysreset/sysreset_psci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/sysreset/sysreset_psci.c b/drivers/sysreset/sysreset_psci.c index 83ecbcb9d2c..30c4b9

[PATCH 3/3] sysreset: psci: add psci_sysreset_get_status

2023-04-06 Thread Peng Fan (OSS)
From: Peng Fan Add weak function psci_sysreset_get_status for platform to define their own reset status with CONFIG_SYSRESET enabled. Signed-off-by: Peng Fan --- drivers/sysreset/sysreset_psci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/sysreset/sysreset_psci.c b/driver

[PATCH] watchdog: ulp_wdog: guard reset_cpu with condition check

2023-04-06 Thread Peng Fan (OSS)
From: Peng Fan There will be build error if CONFIG_SYSRESET is enabled, so guard the reset_cpu with condition check here Signed-off-by: Peng Fan --- drivers/watchdog/ulp_wdog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c index

[PATCH] i2c: imx_lpi2c: Fix misuse the IS_ENABLED for DM clock

2023-04-06 Thread Peng Fan (OSS)
From: Ye Li The IS_ENABLED, which does not consider SPL build, should be replaced by CONFIG_IS_ENABLED. For the case that we only enable DM CLK for u-boot but not in SPL, the IS_ENABLED(CONFIG_CLK) still returns true, then cause clock failure. Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-

[PATCH 01/42] imx8ulp: build ahab

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan The ahab was missed to be compiled, so add it back. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8ulp/Kconfig | 5 + arch/arm/mach-imx/imx8ulp/Makefile | 1 + 2 files changed, 6 insertions(+) diff --git a/arch/arm/mach-imx/imx8ulp/Kconfig b/arch/arm/mach-imx/imx8ulp/K

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

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan This patchset includes updates mainly for i.MX9, such as Clock, Memory, Parts, Low drive mode, DDR, cpu driver, Variants The first patch is not about i.MX9, just include it here since it is a simple one for i.MX8ULP. For the watchdog reset_cpu, I will move it out from watchdog dr

[PATCH 02/42] thermal: imx_tmu: Update TMU driver to support iMX93

2023-04-27 Thread Peng Fan (OSS)
From: Ye Li The TMU used on iMX93 is IP revision 2.1 which is different with previous revision used on iMX8MQ. So add a new FLAG V4 for this revision to distinguish the operations. Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/thermal/Kconfig | 6 +-- dri

[PATCH 03/42] imx: spl_imx_romapi: typo fix

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Unknow->Unknown Signed-off-by: Peng Fan --- arch/arm/mach-imx/spl_imx_romapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c index 830d5d12c25..9164045115f 100644 --- a/arch/arm/mach-i

[PATCH 04/42] imx: move imx8 sci header file to include/firmware/imx

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Move imx8 sci header file to include/firmware/imx, then we could use build macro to reuse some i.MX8 drivers for i.MX9, such as drivers/cpu/imx8_cpu.c. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8/power-domain.h | 2 +- arch/arm/include/asm/arch-imx8/sys_proto.h

[PATCH 05/42] imx: firmware: sci: add inline functions when IMX8 not enabled

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Since we might reuse some drivers for other platforms, while the drivers have sci firmware api, so to avoid build failure add inline functions Signed-off-by: Peng Fan --- include/firmware/imx/sci/sci.h | 241 + 1 file changed, 241 insertions(+) d

[PATCH 06/42] imx: imx8_cpu: use static for local functions

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan For local functions, use static for function. Signed-off-by: Peng Fan --- drivers/cpu/imx8_cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index dc060513b38..e7f45e60dbd 100644 --- a/drivers/cpu/imx8

[PATCH 09/42] imx: imx8_cpu: print cpu grade temperature

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Support print out cpu grade temperature Signed-off-by: Peng Fan --- drivers/cpu/imx8_cpu.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index 4da7a99bf30..304d5e59013 100644 --- a/drivers/cpu/i

[PATCH 07/42] imx: imx8_cpu: support i.MX9

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Add CPU_IMX Kconfig Support imx8_cpu driver for i.MX9 Signed-off-by: Peng Fan --- drivers/cpu/Kconfig| 6 +++ drivers/cpu/Makefile | 1 + drivers/cpu/imx8_cpu.c | 83 -- 3 files changed, 62 insertions(+), 28 deletions(-) diff --gi

[PATCH 10/42] imx9: configure M33 systick to 24M

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan The M33 systick should be 24M per reference mannual, so correct it. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c index 04f3116fd1

[PATCH 08/42] imx: imx8_cpu: support get temperature for i.MX9

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Use CONFIG_DM_THERMAL to make the temperature function could be reused by i.MX8 and i.MX9 Signed-off-by: Peng Fan --- drivers/cpu/imx8_cpu.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index 2d3

[PATCH 12/42] imx9: use parameter freq when set_arm_clk

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan The freq parameter was ignored, should use it when configuring ARM PLL Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c index 7d3a4c01333

[PATCH 11/42] imx9: add more PLL settings

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Add more PLL settings for A55 and Display Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/clock.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c index 51aa259aa05..7d3a4c01333 100644 --- a/arch/arm/mach-

[PATCH 13/42] imx9: correct getting LPI2C clk

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan LPI2C_CLK_ROOT should be used instead of LPUART_CLK_ROOT for i2c Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c index f6021502b3d..a0ef

[PATCH 17/42] imx9: imx93_evk: enable CPU_IMX

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan select CONFIG_CPU_IMX to display cpu info Signed-off-by: Peng Fan --- configs/imx93_11x11_evk_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig index 4f8777161e4..f116d52a655 100644 --- a/config

[PATCH 20/42] imx9: imx93_evk: enable CONFIG_WDT

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Without this config, there is boot error: Error binding ulp_wdt driver Signed-off-by: Peng Fan --- configs/imx93_11x11_evk_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig index 9f376d39c03..c270

[PATCH 19/42] imx9: imx93_evk: select IMX_TMU

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Select thermal config to print current temperature Signed-off-by: Peng Fan --- configs/imx93_11x11_evk_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig index f116d52a655..9f376d39c03 100644 ---

[PATCH 21/42] watchdog: ulp_wdog: guard reset_cpu with condition check

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan There will be build error if CONFIG_SYSRESET is enabled, so guard the reset_cpu with condition check here Signed-off-by: Peng Fan --- drivers/watchdog/ulp_wdog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c index

[PATCH 18/42] imx9: imx93_evk: drop unused macro

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Drop unused macro Signed-off-by: Peng Fan --- include/configs/imx93_evk.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/imx93_evk.h b/include/configs/imx93_evk.h index 7b7bef3ca75..2705587a015 100644 --- a/include/configs/imx93_evk.h +++ b/include/configs/

[PATCH 16/42] imx9: Change hard coded MAC to read from fuse

2023-04-27 Thread Peng Fan (OSS)
From: Ye Li The MAC addresses are hard coded for bring up. Change it to support reading from fuse. Reviewed-by: Jacky Bai Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/soc.c | 49 +++- 1 file changed, 43 insertions(+), 6 deletions(-)

[PATCH 15/42] imx9: cut off OPTEE memory region from U-Boot

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan OPTEE memory region is set secure access only in ATF with configuration to TRDC, and need to remove it from U-Boot, otherwise U-Boot and Kernel may crash when accessing the memory Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/soc.c | 149 ++-

[PATCH 22/42] imx9: soc: support reset cause

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Support print reset cause. Since SRSR is not accessible from non-secure world, so first save it to grp0, then read it in non-secure world. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/soc.c | 59 1 file changed, 59 insertions(+) diff -

[PATCH 23/42] imx9: Get market segment and speed grading

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Get the chip's market segment and speed grading from fuse and print them in boot log as other i.MX series. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx9/imx-regs.h | 3 + arch/arm/mach-imx/imx9/soc.c | 81 ++- 2 files changed, 83 in

[PATCH 24/42] imx9: clock: clear HW_CTRL_SEL

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan The HW_CTRL_SEL should be cleared when configuring PLL to avoid potential glitch Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/clock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c

[PATCH 25/42] imx9: clock: add CONFIG_IMX9_LOW_DRIVE_MODE support

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Add CONFIG_IMX9_LOW_DRIVE_MODE in imx9 clk, later we will add board support Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/Kconfig | 5 arch/arm/mach-imx/imx9/clock.c | 55 +++--- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git

[PATCH 26/42] imx9: clock: config arm alt root to 500mhz

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Config the A55 alt root clock to 500MHz(LD mode frequency) by default. Normally, this clock root is only used as an intermediate clock soure for A55 core/dsu when change the ARM PLL frequency. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/clock.c | 6 ++ 1 file changed,

[PATCH 28/42] imx9: correct coding style

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan The end brace should be in a new line Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/soc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c index 074df1e73cf..f91f838e41a 100644 --- a/arch/arm/m

[PATCH 29/42] imx9: use i.MX generic rom api function

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan There is no need to save gd with using the generic rom api function, so simplify code. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/soc.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c ind

[PATCH 27/42] imx9: add i.MX93 variants support

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan According to datasheet, iMX93 has fused parts with CORE1 or NPU or both disabled. So update code to support it, the kernel device tree runtime update will be added in future patches. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx/cpu.h | 7 +++ arch/arm/inc

[PATCH 33/42] arm: dts: imx93: add tmu

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Add tmu nodes and thermal zone Signed-off-by: Peng Fan --- arch/arm/dts/imx93.dtsi | 48 + 1 file changed, 48 insertions(+) diff --git a/arch/arm/dts/imx93.dtsi b/arch/arm/dts/imx93.dtsi index 73ecd953ec8..13cf32d4b27 100644 --- a/arch/ar

[PATCH 34/42] ddr: imx9: Add workaround for DDRPHY rank-to-rank errata

2023-04-27 Thread Peng Fan (OSS)
From: Ye Li According to DDRPHY errata, the Rank-to-Rank Spacing and tphy_rdcsgap specification does not include the Critical Delay Difference (CDD) to properly define the required rank-to-rank read command spacing after executing PHY training firmware. Following the errata workaround, at the en

[PATCH 36/42] ddr: imx9: Change the saved ddr data base to 0x2051c000

2023-04-27 Thread Peng Fan (OSS)
From: Jacky Bai change the ddr saved info to the last 16KB of the OCRAM. Signed-off-by: Jacky Bai Reviewed-by: Peng Fan Reviewed-by: Ye Li Signed-off-by: Peng Fan --- drivers/ddr/imx/imx9/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ddr/imx/imx9/Kconfi

[PATCH 32/42] arm: dts: imx93: sync device tree with Linux

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Sync device tree with next-20230426 Signed-off-by: Peng Fan --- arch/arm/dts/imx93-11x11-evk-u-boot.dtsi| 29 - arch/arm/dts/imx93-11x11-evk.dts| 385 +++-- arch/arm/dts/imx93-pinfunc.h| 194 --- arch/arm/dts/imx93.dtsi

[PATCH 38/42] ddr: imx93: update the ddr init to support mult setpoints

2023-04-27 Thread Peng Fan (OSS)
From: Jacky Bai Update the DDR init flow for multi-setpoint support on i.MX93. A new fsp_cfg struct need to be added in the timing file to store the diff part of the DDRC and DRAM MR register for each setpoint. Signed-off-by: Jacky Bai Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/

[PATCH 37/42] ddr: imx93: Add 625M bypass clock support

2023-04-27 Thread Peng Fan (OSS)
From: Jacky Bai Add 625M bypass clock that may be used DRAM 625M bypass mode support. Signed-off-by: Jacky Bai Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/clock.c | 3 +++ drivers/ddr/imx/phy/ddrphy_utils.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a

[PATCH 40/42] imx9: Calculate DDR size from DDRC setting

2023-04-27 Thread Peng Fan (OSS)
From: Ye Li To avoid using static setting for ECC enabled DDR size, switch to calculate DDR size from DDRC setting Signed-off-by: Ye Li Reviewed-by: Peng Fan Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/soc.c | 21 + 1 file changed, 17 insert

[PATCH 39/42] ddr: imx9: update the rank setting for multi fsp support

2023-04-27 Thread Peng Fan (OSS)
From: Jacky Bai The rank setting flow should be updated to support multi fsp config. Signed-off-by: Jacky Bai Reviewed-by: Ye Li Signed-off-by: Peng Fan --- drivers/ddr/imx/imx9/ddr_init.c | 178 +--- 1 file changed, 116 insertions(+), 62 deletions(-) diff --git

[PATCH 42/42] imx9: imx93_evk: enable sysreset

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Enable sysreset for i.MX93 EVK. Signed-off-by: Peng Fan --- configs/imx93_11x11_evk_defconfig| 3 +++ configs/imx93_11x11_evk_ld_defconfig | 3 +++ 2 files changed, 6 insertions(+) diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig index cf2

[PATCH 30/42] imx9: imx93_evk: add low drive mode support on 11x11 EVK

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Add a static u-boot config for i.MX93 low drive mode support. When low drive mode is enabled, VDD_SOC is set to 0.75V. Bus clocks, A55 core clock (900Mhz), DDR clock (1866MTS), and some peripherals clocks (USDHC/FLEXSPI/PDM/DISP_PIX/CAM_PIX) must decrease to meet max frequencies in

[PATCH 31/42] imx9: allow to bootaux Mcore with input address

2023-04-27 Thread Peng Fan (OSS)
From: Ye Li Currently bootaux only supports to boot M33 core from TCM. Since ATF has changed to use x2 parameter for M33 image address, update the bootaux command to use input address, so we can support boot from any possilbe address like TCM, DDR, Flexspi NOR. Reviewed-by: Peng Fan Signed-off-

[PATCH 35/42] imx9: imx93_evk: Update spl stack & bss base address

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan As the ddr timing info will be saved at the last 16KB of the OCRAM, spl stack & bss base should be updated to avoid conflict. Signed-off-by: Peng Fan --- configs/imx93_11x11_evk_defconfig| 4 ++-- configs/imx93_11x11_evk_ld_defconfig | 4 ++-- 2 files changed, 4 insertions(+

[PATCH 41/42] imx9: imx93_evk: update ddr timing file

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Update DDR timing file generated by DDR Config Tool 1. Dynamic refresh rate is set by default 2. The 3rd freq will be 625MTS based on power and performance better than 100MTS. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- board/freescale/imx93_evk/lpddr4x_timing.c | 3361 ++

[PATCH 14/42] imx9: simplify clk settings

2023-04-27 Thread Peng Fan (OSS)
From: Peng Fan Simplify the clk root settings with an array Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx9/clock.h | 6 arch/arm/mach-imx/imx9/clock.c | 38 +++--- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/arch/arm/include/as

[PATCH] imx: cmd: use struct cmd_tbl

2021-04-12 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 +- cmd/cmd_fsl_caam.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/cmd_

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

2021-04-12 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 | 10 ++ arch/arm/mach-imx/imx8ulp/Kconfig | 16 2 files changed, 26 insertions(+) create mode 100644 arch/arm/mach-imx/im

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

2021-04-12 Thread Peng Fan (OSS)
From: Peng Fan The i.MX 8ULP crossover applications processor family brings ultra-low power processing and advanced integrated security with EdgeLockTM secure enclave to the intelligent edge. This patchset is to add initial support for i.MX8ULP, with core soc functions, clock, dtsi, and evk boar

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

2021-04-12 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 | 2 ++ 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 04/37] arm: imx8ulp: support print cpu info

2021-04-12 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 03/37] arm: imx: sys_proto: move boot mode define to common header

2021-04-12 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 05/37] imx: imx8ulp: add get reset cause

2021-04-12 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 06/37] arm: imx: basic i.MX8ULP support

2021-04-12 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 08/37] arm: imx8: Move container image header file to mach-imx

2021-04-12 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 07/37] arm: imx8: Move container parser and image to mach-imx common folder

2021-04-12 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 09/37] arm: imx: parse-container: guard included header files

2021-04-12 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 11/37] arm: imx: move container Kconfig under mach-imx

2021-04-12 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 10/37] arm: imx8ulp: add container support

2021-04-12 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 18/37] arm: imx8ulp: soc: Change to use CMC1 to get bootcfg

2021-04-12 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 5d291f6b3a..8f34eccfc2 100644 --- a/arch/arm/

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

2021-04-12 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 20/37] arm: imx8ulp: disable wdog3

2021-04-12 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 be7d

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

2021-04-12 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 24/37] drivers: misc: imx8ulp: Update S400 API for release RDC

2021-04-12 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 25/37] drivers: misc: s400_api: Update API for fuse read and write

2021-04-12 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 27/37] arm: imx8ulp: add xrdc support

2021-04-12 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 26/37] arm: imx8ulp: release and configure XRDC at early phase

2021-04-12 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 29/37] arm: imx8ulp: release trdc and assign lpav from RTD to APD

2021-04-12 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 30/37] arm: imx8ulp: Probe the S400 MU device in arch init

2021-04-12 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 35/37] driver: misc: imx8ulp: Add fuse driver for imx8ulp

2021-04-12 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 32/37] arm: imx8ulp: Allocate DCNANO and MIPI_DSI to AD domain

2021-04-12 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 3fd49

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

2021-04-12 Thread Peng Fan (OSS)
From: Peng Fan Add i.MX8ULP EVK basic support, support SD/I2C/ENET/LPUART Note: upower API currently not included. Signed-off-by: Peng Fan --- arch/arm/dts/imx8ulp-emulator-u-boot.dtsi | 32 + arch/arm/dts/imx8ulp-emulator.dts | 93 + arch/arm/dts/imx8ulp-evk-u-boot.dtsi

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

2021-04-12 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 28/37] arm: imx8ulp: add trdc release request

2021-04-12 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 14/37] pinctrl: Add pinctrl driver for imx8ulp

2021-04-12 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 17/37] drivers: mmc: fsl_esdhc_imx: support i.MX8ULP

2021-04-12 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 13/37] net: fec_mxc: support i.MX8ULP

2021-04-12 Thread Peng Fan (OSS)
From: Peng Fan Support i.MX8ULP in fec_mxc Signed-off-by: Peng Fan --- 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 cf062fad4d..a443b499ba 100644 --- a/drivers/net/Kcon

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

2021-04-12 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 34/37] arm: imx8ulp: add iomuxc support

2021-04-12 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 | 63 - 2 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 arch/arm/includ

[PATCH 33/37] arm: imx8ulp: add dummy imx_get_mac_from_fuse

2021-04-12 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 733654f7ba..e999cbca73 100644 --- a/arch/arm

[PATCH 16/37] arm: imx8ulp: add clock support

2021-04-12 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 36/37] arm: dts: add i.MX8ULP dtsi

2021-04-12 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 | 706 include/dt-bindings/clock/imx8ulp-clock.h | 247 ++ 3 files changed, 1931 insertions(+) cr

[PATCH 31/37] arm: iMX8ULP: Add boot device relevant functions

2021-04-12 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 | 83 +++ 2 files changed, 84 insertions(+) diff --git a/arch/arm/inc

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

2021-04-12 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 22/37] drivers: misc: s400_api: Update S400_SUCCESS_IND to 0xd6

2021-04-12 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

Re: [NXP-IMX] Please pull nxp-imx-4-23-2021

2021-04-24 Thread Peng Fan (OSS)
On 2021/4/24 0:59, Fabio Estevam wrote: Hi Peng, On Fri, Apr 23, 2021 at 1:27 PM Peng Fan wrote: Hi Stefano, Please pull nxp-imx-4-23-2021, This PR is based on Tom's master branch. CI: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsource.denx.de%2Fu-boot%2Fcustodians%2

Re: [PATCH 37/37] arm: imx: add i.MX8ULP EVK support

2021-04-24 Thread Peng Fan (OSS)
On 2021/4/24 1:18, Fabio Estevam wrote: Hi Peng, On Fri, Apr 23, 2021 at 1:57 PM Fabio Estevam wrote: Hi Peng, Thanks for submitting this series. On Mon, Apr 12, 2021 at 8:43 AM Peng Fan (OSS) wrote: From: Peng Fan Add i.MX8ULP EVK basic support, support SD/I2C/ENET/LPUART Note

[PATCH] efi_loader: loosen buffer parameter check in efi_file_read_int

2021-04-28 Thread Peng Fan (OSS)
From: Peng Fan This is same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1733817, but that fix was wrongly partial reverted. To Fedora shim loader, when buffer is NULL, a use-case is to call efi_file_read with *buffer_size=0 and buffer=NULL to obtain the needed size before doing the actu

[PATCH V2] efi_loader: loosen buffer parameter check in efi_file_read_int

2021-04-28 Thread Peng Fan (OSS)
From: Peng Fan This is same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1733817, but that fix was wrongly partial reverted. When reading a directory, EFI_BUFFER_TOO_SMALL should be returned when the supplied buffer is too small, so a use-case is to call EFI_FILE_PROTOCOL.Read() with *bu

[PATCH] xen: xenguest_arm64: map all VIRTIO MMIO region

2024-01-26 Thread Peng Fan (OSS)
From: Peng Fan When run `virtio scan` on i.MX95, there is abort when accessing virtio mmio region. The issue is the mmio region is not mapped. So let's map all virtio mmio regions. Signed-off-by: Peng Fan --- board/xen/xenguest_arm64/xenguest_arm64.c | 17 + 1 file changed, 17

[PATCH v4 5/5] imx93: convert to OF_UPSTREAM

2024-03-28 Thread Peng Fan (OSS)
From: Peng Fan Convert all i.MX93 boards to OF_UPSTREAM. Add lpi2c2 nodes for imx93-11x11-evk-u-boot.dtsi. Add usbotg1 nodes in imx93-u-boot.dtsi and board u-boot.dtsi. The nodes could be removed after upstream linux supports them. Signed-off-by: Peng Fan --- arch/arm/dts/Makefile

[PATCH v5 0/5] imx93: Conver to OF_UPSTREAM

2024-04-10 Thread Peng Fan (OSS)
A few nodes were added to soc and board u-boot.dtsi(lpi2c, usbotg), those nodes could be dropped after upstream linux supports them. To support OF_UPSTREAM, a few driver changes are included. For TMU, still use U-Boot node, I will prepare a kernel update, then back to U-Boot support. Mathieu: pl

[PATCH v5 1/5] gpio: imx_rgpio2p: support one address

2024-04-10 Thread Peng Fan (OSS)
From: Peng Fan The i.MX8ULP/93 gpio dt-schema have been updated to only have one address entry, update the driver to support it. Signed-off-by: Peng Fan --- drivers/gpio/imx_rgpio2p.c | 42 ++ 1 file changed, 38 insertions(+), 4 deletions(-) diff --git

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

2024-04-10 Thread Peng Fan (OSS)
From: Peng Fan To i.MX7ULP compatible lpuart, there is only ipg clk, no per clk. So add a devtype check for i.MX7ULP. Signed-off-by: Peng Fan --- drivers/serial/serial_lpuart.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/serial/seri

[PATCH v5 3/5] cpu: drop imx9_cpu

2024-04-10 Thread Peng Fan (OSS)
From: Peng Fan This was wrongly committed, no user, remove it. Signed-off-by: Peng Fan --- drivers/cpu/imx9_cpu.c | 224 - 1 file changed, 224 deletions(-) diff --git a/drivers/cpu/imx9_cpu.c b/drivers/cpu/imx9_cpu.c deleted file mode 100644 ind

  1   2   3   4   5   6   7   8   9   10   >