[PATCH v5 4/5] clk: imx93: fix anatop base

2024-04-10 Thread Peng Fan (OSS)
From: Peng Fan The PLL clk needs use anatop base, otherwise wrong PLL address will be used. Fixes: 9c153e46661b ("clk: imx: add i.MX93 CCF driver") Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-im

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

2024-04-10 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 v6 0/5] imx93: Conver to OF_UPSTREAM

2024-04-12 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 v6 1/5] gpio: imx_rgpio2p: support one address

2024-04-12 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 v6 2/5] serial: lpuart: use ipg clk for i.MX7ULP

2024-04-12 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 | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/driv

[PATCH v6 3/5] cpu: drop imx9_cpu

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

[PATCH v6 4/5] clk: imx93: fix anatop base

2024-04-12 Thread Peng Fan (OSS)
From: Peng Fan The PLL clk needs use anatop base, otherwise wrong PLL address will be used. Fixes: 9c153e46661b ("clk: imx: add i.MX93 CCF driver") Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-im

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

2024-04-12 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 0/2] imx93-11x11-evk: Convert to OF_UPSTREAM

2024-04-24 Thread Peng Fan (OSS)
From: Peng Fan patch 1 is to avoid build break when using upstream dts Patch 2 is moving to OF_UPSTREAM This is a resend of V3 imx93: Conver to OF_UPSTREAM patch 5,6 Peng Fan (2): dt-bindings: imx93: sync clock header imx: imx93-11x11-evk: convert to OF_UPSTREAM arch/arm/dts/Makefile

[PATCH 1/2] dt-bindings: imx93: sync clock header

2024-04-24 Thread Peng Fan (OSS)
From: Peng Fan Sync clock header with kernel 6.8 Signed-off-by: Peng Fan --- include/dt-bindings/clock/imx93-clock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/dt-bindings/clock/imx93-clock.h b/include/dt-bindings/clock/imx93-clock.h index 35a1f62053a..787c9

[PATCH 2/2] imx: imx93-11x11-evk: convert to OF_UPSTREAM

2024-04-24 Thread Peng Fan (OSS)
From: Peng Fan Convert to OF_UPSTREAM for i.MX93 11x11 EVK. Signed-off-by: Peng Fan --- arch/arm/dts/Makefile| 1 - arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 118 + arch/arm/dts/imx93-11x11-evk.dts | 322 --- arch/arm/dts/imx93-u-boot.

[PATCH 1/3] common: Makefile: drop duplicated line

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan obj-$(CONFIG_$(SPL_TPL_)YMODEM_SUPPORT) += xyzModem.o is there, no need obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o Signed-off-by: Peng Fan --- common/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/common/Makefile b/common/Makefile index bcf352d016..daeea67cf2 10

[PATCH 2/3] cmd: Makefile: build nvedit.c when needed

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan No need to build nvedit.c when CONFIG_$(SPL_)ENV_SUPPORT is n Signed-off-by: Peng Fan --- cmd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/Makefile b/cmd/Makefile index dd86675bf2..2b2a0c26a6 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -20

[PATCH 3/3] armv8: Makefile: build cache files when needed

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan If no need cache support, not build the cache files, such as in SPL. Signed-off-by: Peng Fan --- arch/arm/cpu/armv8/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile index 93d26f9856..0f49969

[PATCH] net: eqos: Reduce the MDIO wait time

2020-12-28 Thread Peng Fan (OSS)
From: Ye Li Current MDIO wait time is too long, which introduce long delay when PHY negotiation register checking. Reduce it to 10us Signed-off-by: Ye Li Reviewed-by: Fugang Duan Signed-off-by: Peng Fan --- drivers/net/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 01/13] imx: imx8mp_evk: enable eth support

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan Add board code to configure the network interface Add net defconfig Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8m/imx-regs.h | 2 + board/freescale/imx8mp_evk/imx8mp_evk.c| 81 ++ configs/imx8mp_evk_defconfig | 11 +++ include

[PATCH 02/13] imx: imx8mn_ddr4_evk: Use CONFIG_TARGET_IMX8MN_DDR4_EVK for DDR4 EVK board

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan use CONFIG_TARGET_IMX8MN_DDR4_EVK for DDR4 EVK board, we will use CONFIG_TARGET_IMX8MN_EVK for LPDDR4 EVK board. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/Kconfig| 2 +- board/freescale/imx8mn_evk/Kconfig | 2 +- configs/imx8mn_ddr4_evk_defconfig | 2 +- 3 files c

[PATCH 03/13] imx: ddr: imx8m: add print for DRAM rate

2020-12-28 Thread Peng Fan (OSS)
From: Ye Li Enable print to show the DRAM rate of current setting and training result. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- drivers/ddr/imx/imx8m/ddr_init.c | 7 --- drivers/ddr/imx/imx8m/ddrphy_utils.c | 2 +- 2 files changed, 5 insertions(+), 4 del

[PATCH 04/13] imx: ddr: imx8m: Move selfref_en after DDR scrub

2020-12-28 Thread Peng Fan (OSS)
From: Ye Li When doing DDR scrub, the DDR may enter into self refresh if the selfref_en is enabled before DDR scrub. This will cause scrub can't complete that SBRSTAT.scrub_done won't be set. Since the selfref_en can be programmed during the course of normal operation, move it after DDR scrub S

[PATCH 05/13] imx: imx8mn_evk: correct stack/malloc adress

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan Move SP to end of OCRAM space. Drop MALLOC_F to make it alloc from stack space. Signed-off-by: Peng Fan --- drivers/power/power_i2c.c| 8 include/configs/imx8mn_evk.h | 9 +++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/power/power_

[PATCH 08/13] imx8m: clock: add type of set_clk_eqos

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan Add type of set_clk_eqos to make it could be used by other files. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8m/clock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/arch-imx8m/clock.h b/arch/arm/include/asm/arch-imx8m/clock.h index 87cc

[PATCH 07/13] imx: imx8mn: add i.MX8MN LPDDR4 EVK support

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan i.MX8MN LPDDR4 EVK reuses most code of i.MX8MN DDR4 EVK code, with adding a new ddr script. Signed-off-by: Peng Fan --- arch/arm/dts/Makefile |1 + arch/arm/dts/imx8mn-evk-u-boot.dtsi |6 + arch/arm/dts/imx8mn-evk.dts |

[PATCH 10/13] arm: dts: imx8mm: sync dts from Linux Kernel

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan --- arch/arm/dts/imx8mm-evk.dts | 534 --- arch/arm/dts/imx8mm-evk.dtsi | 489 + ar

[PATCH 12/13] imx8m: lowlevel_init: tune alignment

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan The minimum alignment is 16 bytes, so use align 4 is enough. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/lowlevel_init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8m/lowlevel_init.S b/arch/arm/mach-imx/imx8m/lowlevel_init.S

[PATCH 13/13] imx: imx8m: move CONFIG_SPL_SYS_[I, D]CACHE_OFF to defconfig

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan move CONFIG_SPL_SYS_[I,D]CACHE_OFF to defconfig Signed-off-by: Peng Fan --- configs/imx8mn_ddr4_evk_defconfig | 2 ++ configs/imx8mn_evk_defconfig | 2 ++ configs/imx8mp_evk_defconfig | 2 ++ include/configs/imx8mn_evk.h | 2 -- include/configs/imx8mp_evk.h |

[PATCH 09/13] arm: dts: imx8mp: sync dts from Linux Kernel

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan --- arch/arm/dts/imx8mp-evk.dts | 117 +++- arch/arm/dts/imx8mp-pinfunc.h| 360 +++ arch/arm/dts/im

[PATCH 11/13] arm: dts: imx8mq: sync dts from Linux Kernel

2020-12-28 Thread Peng Fan (OSS)
From: Peng Fan Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan --- arch/arm/dts/imx8mq-evk.dts | 186 +-- arch/arm/dts/imx8mq-pinfunc.h| 623 +++ arch/arm/dts/imx

[PATCH V2 01/12] imx: imx8mp_evk: enable eth support

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan Add board code to configure the network interface Add net defconfig Signed-off-by: Peng Fan --- V2: Use phy-reset-gpios Use void for setup_fec Drop empty lines arch/arm/dts/imx8mp-evk-u-boot.dtsi| 4 ++ arch/arm/include/asm/arch-imx8m/imx-regs.h | 2 + board/frees

[PATCH V2 02/12] imx: imx8mn_ddr4_evk: Use CONFIG_TARGET_IMX8MN_DDR4_EVK for DDR4 EVK board

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan use CONFIG_TARGET_IMX8MN_DDR4_EVK for DDR4 EVK board, we will use CONFIG_TARGET_IMX8MN_EVK for LPDDR4 EVK board. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/Kconfig| 2 +- board/freescale/imx8mn_evk/Kconfig | 2 +- configs/imx8mn_ddr4_evk_defconfig | 2 +- 3 files c

[PATCH V2 03/12] imx: ddr: imx8m: Move selfref_en after DDR scrub

2021-01-03 Thread Peng Fan (OSS)
From: Ye Li When doing DDR scrub, the DDR may enter into self refresh if the selfref_en is enabled before DDR scrub. This will cause scrub can't complete that SBRSTAT.scrub_done won't be set. Since the selfref_en can be programmed during the course of normal operation, move it after DDR scrub S

[PATCH V2 04/12] imx: imx8mn_evk: correct stack/malloc adress

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan Move SP to end of OCRAM space. Drop MALLOC_F to make it alloc from stack space. Signed-off-by: Peng Fan --- V2: Typo fixes drivers/power/power_i2c.c| 8 include/configs/imx8mn_evk.h | 7 ++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drive

[PATCH V2 07/12] imx8m: clock: add type of set_clk_eqos

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan Add type of set_clk_eqos to make it could be used by other files. Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8m/clock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/arch-imx8m/clock.h b/arch/arm/include/asm/arch-imx8m/clock.h index 87cc

[PATCH V2 06/12] imx: imx8mn: add i.MX8MN LPDDR4 EVK support

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan i.MX8MN LPDDR4 EVK reuses most code of i.MX8MN DDR4 EVK code, with adding a new ddr script. Signed-off-by: Peng Fan --- V2: Update doc arch/arm/dts/Makefile |1 + arch/arm/dts/imx8mn-evk-u-boot.dtsi |6 + arch/arm/dts/imx8mn-evk.dts

[PATCH V2 09/12] arm: dts: imx8mm: sync dts from Linux Kernel

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan --- arch/arm/dts/imx8mm-evk.dts | 534 --- arch/arm/dts/imx8mm-evk.dtsi | 489 + ar

[PATCH V2 11/12] imx8m: lowlevel_init: tune alignment

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan The minimum alignment is 16 bytes, so use align 4 is enough. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/lowlevel_init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8m/lowlevel_init.S b/arch/arm/mach-imx/imx8m/lowlevel_init.S

[PATCH V2 12/12] imx: imx8m: move CONFIG_SPL_SYS_[I, D]CACHE_OFF to defconfig

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan move CONFIG_SPL_SYS_[I,D]CACHE_OFF to defconfig Signed-off-by: Peng Fan --- configs/imx8mn_ddr4_evk_defconfig | 2 ++ configs/imx8mn_evk_defconfig | 2 ++ configs/imx8mp_evk_defconfig | 2 ++ include/configs/imx8mn_evk.h | 2 -- include/configs/imx8mp_evk.h |

[PATCH V2 10/12] arm: dts: imx8mq: sync dts from Linux Kernel

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan --- arch/arm/dts/imx8mq-evk.dts | 186 +-- arch/arm/dts/imx8mq-pinfunc.h| 623 +++ arch/arm/dts/imx

[PATCH V2 08/12] arm: dts: imx8mp: sync dts from Linux Kernel

2021-01-03 Thread Peng Fan (OSS)
From: Peng Fan Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan --- arch/arm/dts/imx8mp-evk.dts | 117 +++- arch/arm/dts/imx8mp-pinfunc.h| 360 +++ arch/arm/dts/im

[PATCH] imx: imx8mn/p: drop CONFIG_SYS_[I,D]CACHE_OFF in SPL stage

2021-01-13 Thread Peng Fan (OSS)
From: Peng Fan Drop CONFIG_SYS_[I,D]CACHE_OFF in SPL stage Signed-off-by: Peng Fan --- This is to replace https://patchwork.ozlabs.org/project/uboot/patch/20210103101144.4375-12-peng@oss.nxp.com/ include/configs/imx8mn_evk.h | 2 -- include/configs/imx8mp_evk.h | 2 -- 2 files changed, 4

[PATCH V2] imx: imx8mn/p: drop CONFIG_SYS_[I,D]CACHE_OFF

2021-01-13 Thread Peng Fan (OSS)
From: Peng Fan Drop CONFIG_SYS_[I,D]CACHE_OFF, it is safe to run with caches enabled on these platforms. Signed-off-by: Peng Fan --- V2: Update subject/commit Per Fabio's comments include/configs/imx8mn_evk.h | 2 -- include/configs/imx8mp_evk.h | 2 -- 2 files changed, 4 deletions(-) diff

[PATCH 01/13] imx: lowlevel: implement armv8_el2_to_aarch32

2021-01-14 Thread Peng Fan (OSS)
From: Peng Fan Implement armv8_el2_to_aarch32 for aarch64 U-Boot booting aarch32 SMP linux. It will trap to ATF to let ATF handle the mode switching. Signed-off-by: Peng Fan --- arch/arm/mach-imx/lowlevel.S | 23 +++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/m

[PATCH 03/13] imx: nandbcb: Fix resource leak

2021-01-14 Thread Peng Fan (OSS)
From: Ye Li Fix Coverity Issue 9006655. In write_fcb, leak of memory to resource "fcb_raw_page". Since we have initialized the "ret" to 0, should return the value of ret. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_nandbcb.c | 2 -- 1 file cha

[PATCH 02/13] nandbcb: Fix uninitialized variable

2021-01-14 Thread Peng Fan (OSS)
From: Ye Li Fix Coverity Issue 9006654. In write_fcb, use of an uninitialized variable "ret". Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_nandbcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/cmd_nandb

[PATCH 04/13] imx: nandbcb: Fix resource leak in read_fcb

2021-01-14 Thread Peng Fan (OSS)
From: Ye Li Fix Coverity Issue 9006657. In read_fcb, leak of memory to system resource "fcb_raw_page". Adjust the sequence to check the mtd bad block prior than allocation of "fcb_raw_page", also check the NULL return of allocation. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Pen

[PATCH 05/13] imx: nandbcb: Fix potential overflow in fill_dbbt_data

2021-01-14 Thread Peng Fan (OSS)
From: Ye Li Fix Coverity Issue 9006658. In fill_dbbt_data, an integer overflow occurs, with the result converted to a wider integer type Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_nandbcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH 06/13] imx: nandbcb: Fix potential overflow in nandbcb_set_boot_config

2021-01-14 Thread Peng Fan (OSS)
From: Ye Li Fix Coverity Issue 9006656. In nandbcb_set_boot_config, an integer overflow occurs, with the result converted to a wider integer type. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_nandbcb.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH 07/13] nandbcb: nand support for i.MX8MP

2021-01-14 Thread Peng Fan (OSS)
From: Han Xu Add NAND boot support for i.MX8MP by adding i.MX8MP in nandbcb support list, reading boot_search_count from fuse. i.MX8MN NAND boot is same as i.MX8MP, fix some issues as well. Signed-off-by: Han Xu Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_nandbcb.c

[PATCH 08/13] imx: Fix market segment fuse offset on iMX8MP

2021-01-14 Thread Peng Fan (OSS)
From: Ye Li iMX8MP has shifted market segment fuse one bit from 0x440 [7:6] to [6:5], correct it in imx common codes. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- arch/arm/mach-imx/cpu.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH 09/13] imx6: Remove AHCI device before boot OS

2021-01-14 Thread Peng Fan (OSS)
From: Ye Li Since we remove SATA device before boot OS, when AHCI is enabled, update the codes to remove AHCI device. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/cpu.c | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-imx/cpu.c b/arch/a

[PATCH 10/13] imx8m: add QSPI boot dev

2021-01-14 Thread Peng Fan (OSS)
From: Peng Fan When boot type could not be detected from rom sw info, read sbmr1 to detect, here we only use it to detect FLEXSPI boot, because ROM not update it in rom sw info. Signed-off-by: Peng Fan --- arch/arm/mach-imx/cpu.c | 6 -- arch/arm/mach-imx/spl.c | 2 ++ 2 files changed, 6 i

[PATCH 11/13] imx: Update runtime SD/MMC boot env device and env variables

2021-01-14 Thread Peng Fan (OSS)
From: Ye Li Since we enabled MMC alias, the USDHC index in u-boot is the usdhc port. So we don't need to convert them for kernel and u-boot env device. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8/cpu.c| 2 +- arch/arm/mach-imx/mmc_env.c

[PATCH 12/13] imx: support choose emmc device by uuu

2021-01-14 Thread Peng Fan (OSS)
From: Frank Li uuu can change emmc device number for fastboot Signed-off-by: Frank Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/mmc_env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mmc_env.c b/arch/arm/mach-imx/mmc_env.c index 9c1d3cdfcb..22d8daa

[PATCH 13/13] imx: timer: Modify GPT timer driver for mx7

2021-01-14 Thread Peng Fan (OSS)
From: Ye Li Modify the GPT common platform driver for mx7 which only use 24Mhz OSC as clock source. Note: at default, the mx7d will use system counter as timer. The GPT is disabled. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/timer.c | 16 +--- 1 file chang

[PATCH 00/26] imx: update for i.MX8M

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan This patchset is to upstream NXP downstream patches targeting next release: 2021.07. - Enviorment cleanup - ddr script update for ddr4/lpddr4 boards - update fuse path - Support i.MX8MQ B2 - Add i.MX8MN 11*11 variant - Change pca9450 API accepting address Jacky Bai (1): i

[PATCH 01/26] tools: imx image: fix write warning

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan Fix the warning by set the variable zero to uint64_t "warning: ‘write’ reading 5 bytes from a region of size 4" Signed-off-by: Peng Fan --- tools/imx8image.c | 2 +- tools/imx8mimage.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/imx8image.c b/to

[PATCH 02/26] imx8mm_evk: Update to latest LPDDR4 script

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li Update LPDDR4 script to sync with v2020.04 u-boot Signed-off-by: Ye Li --- board/freescale/imx8mm_evk/lpddr4_timing.c | 692 + 1 file changed, 280 insertions(+), 412 deletions(-) diff --git a/board/freescale/imx8mm_evk/lpddr4_timing.c b/board/freescale/imx8mm_

[PATCH 03/26] imx8mm_evk: Switch to new imx8mm evk board

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li Update PMIC to use PCA9540, the legacy board not supported by NXP Signed-off-by: Ye Li --- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 4 +- arch/arm/dts/imx8mm-evk.dtsi| 127 +++- board/freescale/imx8mm_evk/spl.c| 33 configs/imx8mm_evk_de

[PATCH 04/26] imx8mm/p: remove boot.cmd

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan These files should not be in U-Boot repo Signed-off-by: Peng Fan --- board/freescale/imx8mm_evk/boot.cmd | 35 - board/freescale/imx8mp_evk/boot.cmd | 25 - 2 files changed, 60 deletions(-) delete mode 100644 board/freescale/imx8m

[PATCH 05/26] imx8mm_evk: add/cleanup variable for distro

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan Add fdt_addr_r fdtfile which used by distro boot Clean up environment Signed-off-by: Peng Fan --- include/configs/imx8mm_evk.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index fd9a6cbb8c

[PATCH 06/26] imx8mp_evk: add/cleanup variable for distro

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan Add fdt_addr_r fdtfile which used by distro boot Clean up environment Signed-off-by: Peng Fan --- include/configs/imx8mp_evk.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h index 61a5c6fb79

[PATCH 08/26] imx8mp_evk: Update LPDDR4 timing for new FW 202006

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li After switching to new LPDDR4 firmware 202006 version, have to update the LPDDR4 timing accordingly from RPA tool. Signed-off-by: Ye Li Tested-by: Sherry Sun Tested-by: Jacky Bai Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- board/freescale/imx8mp_evk/lpddr4_timing.c | 189

[PATCH 07/26] imx8mp: ddr: Add inline ECC feature support

2021-03-19 Thread Peng Fan (OSS)
From: Sherry Sun Add inline ECC support for lpddr4 on imx8mp-evk. And add a config which can enable/disable inline ECC feature for lpddr4 on imx8mp-evk board. Signed-off-by: Sherry Sun Signed-off-by: Peng Fan --- board/freescale/imx8mp_evk/lpddr4_timing.c | 27 ++ 1 file c

[PATCH 09/26] imx8mp_evk: Update LPDDR4 refresh time

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li Use more safer refresh time value for 6GB LPDDR4 on this EVK board. Update the parameters for every frequency point. Signed-off-by: Ye Li Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- board/freescale/imx8mp_evk/lpddr4_timing.c | 12 ++-- 1 file changed, 6 insertions(

[PATCH 12/26] imx8mp_evk: Increase VDD_ARM to 0.95v Overdrive voltage

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan There is a frequency/timing limitation for SOC and ARM, if SOC is OD voltage/OD freq, then ARM can't run at ND voltage/1.2Ghz, it may have timing risk from SOC to ARM. Current VDD_SOC is set to 0.95v OD voltage in SPL, and kernel will increase bus clocks to OD frequency before it

[PATCH 11/26] imx8mp_evk: spl: clean up including headers

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan Clean up the including headers Signed-off-by: Peng Fan --- board/freescale/imx8mp_evk/spl.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index 3f043c2b2e..ef14cfc227 100

[PATCH 10/26] imx8mp: refine power on imx8mp board

2021-03-19 Thread Peng Fan (OSS)
From: "haidong.zheng" VDD SOC normal run changed to 0.85V LPDDR4 freq0 change from 4000MTS to 2400MTS Signed-off-by: haidong.zheng Signed-off-by: Peng Fan --- board/freescale/imx8mp_evk/lpddr4_timing.c | 166 + board/freescale/imx8mp_evk/spl.c | 5 + drivers/dd

[PATCH 14/26] power: pca9450: add a new parameter for power_pca9450_init

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan Currently PCA9450 might have address 0x25 or 0x35, so let user choose the address. Signed-off-by: Peng Fan --- board/freescale/imx8mp_evk/spl.c | 2 +- board/phytec/phycore_imx8mp/spl.c | 2 +- drivers/power/pmic/pmic_pca9450.c | 4 ++-- include/power/pca9450.h | 2 +-

[PATCH 15/26] imx8mn_evk: drop duplicated code

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan uart clk has been enabled, no need enable again. Signed-off-by: Peng Fan --- board/freescale/imx8mn_evk/spl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c index 6d5c7a5b46..80f79ce888 100644 --- a/board/

[PATCH 13/26] imx8mn: Update the DDR4 timing script on imx8mn ddr4 evk

2021-03-19 Thread Peng Fan (OSS)
From: Jacky Bai On i.MX8MN, we can only support DLL-ON mode only, so update the timing to support 2400mts & 1066mts setpoint. Signed-off-by: Jacky Bai Reviewed-by: Ye Li Signed-off-by: Peng Fan --- board/freescale/imx8mn_evk/ddr4_timing.c | 1057 +- 1 file changed, 449 in

[PATCH 16/26] imx8mn: Add LPDDR4 EVK board support

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan Add support for iMX8MN LPDDR4 EVK board which uses 2GB LPDDR4 and PCA9450B PMIC. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/dts/Makefile |1 + arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi |3 + arch/arm/dts/imx8mn-evk-u-boot.dtsi

[PATCH 18/26] imx: logos: use NXP logo

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan Use NXP logo. The vendor and board dir not changed, only replace the content of freescale.bmp. Signed-off-by: Peng Fan --- tools/logos/freescale.bmp | Bin 46738 -> 47670 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tools/logos/freescale.bmp b/tools/logos/

[PATCH 19/26] imx8mn: Add support for 11x11 UltraLite part number

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li There are 3 part numbers for 11x11 i.MX8MNano with different core number configuration: UltraLite Quad/Dual/Solo Comparing with i.MX8MN Lite parts, they have MIPI DSI disabled. So checking the MIPI DSI disable fuse to recognize these parts. Signed-off-by: Ye Li Reviewed-by: Peng Fa

[PATCH 20/26] imx8m: Update thermal and PMU kernel nodes for dual/single cores

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li For dual core and single core iMX8M parts, the thermal node and PMU node in kernel DTB also needs update to remove the refers to deleted core nodes. Otherwise both driver will fail to work. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- arch/arm/mach-imx/i

[PATCH 21/26] imx8m: soc: update fuse path

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan Update fuse path to disable modules correctly. Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/soc.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 6

[PATCH 17/26] imx8mn: Add low drive mode support for DDR4/LPDDR4 EVK

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li Add dedicated defconfigs for iMX8MN low drive mode which set the VDD_SOC and VDD_DRAM to 0.8v, DDR at 1600MTS (800Mhz clock) and GPU at 200Mhz. Signed-off-by: Ye Li Acked-by: Peng Fan Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/soc.c | 45 + board/freesc

[PATCH 22/26] imx8m: ddr: Disable CA VREF Training for LPDDR4

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li Users reported LPDDR4 MR12 value is set to 0 during PHY training, not the value from FSP timing structure, which cause compliance test failed. The root cause is the CATrainOpt[0] is set to 1 in 2D FSP timing but not set in 1D. According to PHY training application node, to enable the

[PATCH 24/26] iMX8MQ: Recognize the B2 revision

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li i.MX8MQ B2 is using same value in OCOTP_READ_FUSE_DATA like B1, so we have to check the ROM verision to distinguish the revision. As we have checked the B1 rev for sticky bits work around in secure boot. So it won't apply on B2. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-of

[PATCH 23/26] arch: mach-imx: imx8m: fix unique_id read error for imx8mp

2021-03-19 Thread Peng Fan (OSS)
From: Peng Fan The value of Unique ID in uboot and kernel is different for iMX8MP: serial#=02e1444a0002aaff root@imx8mpevk:/sys/devices/soc0# cat soc_uid D69932E1444A The reason is that Fuse Addresses of Unique ID of iMX8MP are 0x420 and 0x430. Reviewed-by: Ye Li Signed-off-by: Alice Guo

[PATCH 26/26] imx8mq_evk: Applying default LPDDR4 script for B2

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li Both i.MX8MQ B1 and B2 should use default LPDDR4 script, while B0 has another dedicated script. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- board/freescale/imx8mq_evk/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freesc

[PATCH 25/26] misc: ocotp: Update OCOTP driver for iMX8MQ B2

2021-03-19 Thread Peng Fan (OSS)
From: Ye Li i.MX8MQ B2 also has fixed value in OCOTP_READ_FUSE_DATA register, so it does not support "fuse sense" command like B1. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- drivers/misc/mxc_ocotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

RE: [PATCH 02/26] imx8mm_evk: Update to latest LPDDR4 script

2021-03-24 Thread Peng Fan (OSS)
> Subject: Re: [PATCH 02/26] imx8mm_evk: Update to latest LPDDR4 script > > On Fri, Mar 19, 2021 at 12:26 AM Peng Fan (OSS) > wrote: > > > > From: Ye Li > > > > Update LPDDR4 script to sync with v2020.04 u-boot > > > > Signed-off-by: Ye Li >

Re: [PATCH 22/26] imx8m: ddr: Disable CA VREF Training for LPDDR4

2021-03-25 Thread Peng Fan (OSS)
On 2021/3/25 16:14, Stefano Babic wrote: Hi Tim, On 24.03.21 22:25, Tim Harvey wrote: On Fri, Mar 19, 2021 at 12:31 AM Peng Fan (OSS) wrote: From: Ye Li Users reported LPDDR4 MR12 value is set to 0 during PHY training, not the value from FSP timing structure, which cause compliance

[PATCH 00/37] imx: hab/caam new feature and update

2021-03-25 Thread Peng Fan (OSS)
From: Peng This patchset is to upstream NXP downstream caam, hab features One more patch is to update maintainer for imx8mn_evk board. Aymen Sghaier (6): crypto: caam: Add CAAM support to i.MX8M platforms crypto: caam: Fix build warnings pointer casting crypto: Add blob command support for

[PATCH 01/37] imx8mn: evk: update MAINTAINERS

2021-03-25 Thread Peng Fan (OSS)
From: Peng Add imx8mn_evk_defconfig to be maintained Typo fix Signed-off-by: Peng --- board/freescale/imx8mn_evk/MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/freescale/imx8mn_evk/MAINTAINERS b/board/freescale/imx8mn_evk/MAINTAINERS index 3b0653d3c8..

[PATCH 02/37] imx8m: add regs used by CAAM

2021-03-25 Thread Peng Fan (OSS)
From: Peng Fan Add regs used by CAAM Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8m/imx-regs.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h b/arch/arm/include/asm/arch-imx8m/imx-regs.h index 49bac8c1fa..b800da13a1 1006

[PATCH 04/37] imx: Avoid hardcoded output ring size register offset (ORSR)

2021-03-25 Thread Peng Fan (OSS)
From: Breno Lima The CAAM output ring size register offset is currently defined in fsl_sec.h as FSL_CAAM_ORSR_JRa_OFFSET, use this definition to avoid hardcoded value in i.MX common code. Signed-off-by: Breno Lima Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_dek.c

[PATCH 03/37] imx: imx7 Support for Manufacturing Protection

2021-03-25 Thread Peng Fan (OSS)
From: Breno Lima This code was originally developed by Raul Cardenas and modified to be applied in U-Boot imx_v2017.03. More information about the initial submission can be seen in the link below: https://lists.denx.de/pipermail/u-boot/2016-February/245273.html i.MX7D has an a protection featu

[PATCH 07/37] imx: hab: Add function to authenticate kernel image

2021-03-25 Thread Peng Fan (OSS)
From: Ye Li When loading kernel image, the image size is parsed from header, so it does not include the CSF and IVT. Add back the authenticate_image function to wrap the imx_hab_authenticate_image with calculating IVT offset and full image size. Signed-off-by: Ye Li Signed-off-by: Peng Fan --

[PATCH 06/37] imx: Avoid hardcoded Job Ring Max size

2021-03-25 Thread Peng Fan (OSS)
From: Breno Lima Prior instantiating RNG we have to ensure if the CAAM job rings are available. Avoid hardcoded job ring max size and use the definition at fsl_sec.h Signed-off-by: Breno Lima Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_dek.c | 3 +-- arch/arm/mac

[PATCH 05/37] imx: Ensure CAAM clock is enabled prior getting out_jr_size

2021-03-25 Thread Peng Fan (OSS)
From: Breno Lima Prior calling sec_in32() we have to ensure CAAM clock is enabled, the function sec_in32() is reading CAAM registers and if CAAM clock is disabled the system will hang. Signed-off-by: Breno Lima Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_dek.c |

[PATCH 08/37] imx: HAB: Update hab codes to support ARM64 and i.MX8M

2021-03-25 Thread Peng Fan (OSS)
From: Peng Fan There are some changes to support ARM64 i.MX8M platform in this patches: 1. The hab_rvt base and function vectors are different as i.MX6/7 2. Need to bypass an workaround for i.MX6 to fix problem in MMU. 3. The x18 register needed save & restore before calling any HAB API. Accord

[PATCH 10/37] hab: Change calling to ROM API failsafe

2021-03-25 Thread Peng Fan (OSS)
From: Ye Li Modify to use hab_rvt_failsafe function for failsafe ROM API, not directly call its ROM address. This function will wrap the sip call for iMX8M platforms. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/hab.c | 3 --- 1 file changed, 3 deletions(-) diff --git a

[PATCH 09/37] imx: HAB: Validate IVT before authenticating image

2021-03-25 Thread Peng Fan (OSS)
From: Utkarsh Gupta Calling csf_is_valid() with an un-signed image may lead to data abort as the CSF pointer could be pointing to a garbage address when accessed in HAB_HDR_LEN(*(const struct hab_hdr *)(ulong)ivt_initial->csf). Authenticate image from DDR location 0x8080... Check CSF for Wri

[PATCH 11/37] imx: hab: Enable hab.c to authenticate additional images in open configuration

2021-03-25 Thread Peng Fan (OSS)
From: Breno Lima Currently it's not possible to authenticate additional boot images in HAB open configuration. The hab.c code is checking if the SEC_CONFIG[1] fuse is programmed prior to calling the hab_authenticate_image() API function. Users cannot check if their additional boot images has bee

[PATCH 12/37] imx: hab: Display All HAB events via hab_status command

2021-03-25 Thread Peng Fan (OSS)
From: Utkarsh Gupta Add ability for hab_status command to show All HAB events and not just HAB failure events Signed-off-by: Utkarsh Gupta Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/hab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/m

[PATCH 16/37] imx: HAB: Add support for iMX8MM

2021-03-25 Thread Peng Fan (OSS)
From: Ye Li The imx8mm has changed the address of rvt_hab, use new address for imx8mm. The authentication procedure is same as imx8mq. In u-boot, the authentication uses SIP call to trap ATF to run HAB authenticate. Users need to add CONFIG_SECURE_BOOT=y to defconfig to enable the feature. Sig

[PATCH 13/37] imx: hab: Check if IVT header is HABv4

2021-03-25 Thread Peng Fan (OSS)
From: Breno Lima The HABv4 implementation in ROM checks if HAB major version in IVT header is 4.x. The current implementation in hab.c code is only validating HAB v4.0 and HAB v4.1 and may be incompatible with newer HABv4 versions. Modify verify_ivt_header() function to align with HABv4 impleme

[PATCH 15/37] imx: hab: Fix build warnings in 32-bit targets

2021-03-25 Thread Peng Fan (OSS)
From: Breno Lima When building 32-bit targets with CONFIG_SECURE_BOOT and DEBUG enabled the following warnings are displayed: arch/arm/mach-imx/hab.c:840:41: warning: format '%lx' expects argument \ of type 'long unsigned int', but argument 3 has type 'uint32_t \ {aka unsigned int}' [-Wformat=]

[PATCH 14/37] mx7ulp: hab: Add hab_status command for HABv4 M4 boot

2021-03-25 Thread Peng Fan (OSS)
From: Breno Lima When booting in low power or dual boot modes the M4 binary is authenticated by the M4 ROM code. Add an option in hab_status command so users can retrieve M4 HAB failure and warning events. => hab_status m4 Secure boot disabled HAB Configuration: 0xf0, HAB State: 0x66

[PATCH 17/37] crypto: fsl: blob: Flush dcache range for destination address

2021-03-25 Thread Peng Fan (OSS)
From: Breno Lima The blob command is not working on i.MX7D, i.MX8MQ and i.MX8MM devices. Due to different cache management it's necessary to flush dcache range for destination address so data can be available in memory. Add necessary operations in blob_encap() and blob_decap() functions. Signe

<    1   2   3   4   5   6   7   8   9   10   >