[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 ---

[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

[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 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 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

[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

[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

[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 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:

[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 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

[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

[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

[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 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:

[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 v4 4/5] clk: imx93: fix anatop base

2024-03-27 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

[PATCH v4 3/5] cpu: drop imx9_cpu

2024-03-27 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

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

2024-03-27 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 | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/serial/serial_lpuart.c

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

2024-03-27 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 v4 0/5] imx93: Conver to OF_UPSTREAM

2024-03-27 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:

[PATCH v2 4/4] imx: imx8mp_evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan Convert to OF_UPSTREAM for i.MX8MP EVK Signed-off-by: Peng Fan --- arch/arm/dts/Makefile | 1 - arch/arm/dts/imx8mp-evk.dts | 684 arch/arm/mach-imx/imx8m/Kconfig | 1 + configs/imx8mp_evk_defconfig| 2 +- 4 files

[PATCH v2 3/4] imx: imx8mn-evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan Convert i.MX8MN-EVK and i.MX8MN-DDR4-EVK to OF_UPSTREAM Signed-off-by: Peng Fan --- arch/arm/dts/Makefile | 2 - arch/arm/dts/imx8mn-ddr4-evk.dts | 160 -- arch/arm/dts/imx8mn-evk.dts | 128 --

[PATCH v2 2/4] imx: imx8mm_evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan Convert i.MX8MM EVK to OF_UPSTREAM Signed-off-by: Peng Fan --- arch/arm/dts/Makefile | 1 - arch/arm/dts/imx8mm-evk.dts | 128 arch/arm/dts/imx8mm-evk.dtsi | 615 -- arch/arm/mach-imx/imx8m/Kconfig | 1 +

[PATCH v2 1/4] imx: imx8mq_evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan Convert i.MX8MQ EVK to OF_UPSTREAM Signed-off-by: Peng Fan --- arch/arm/dts/Makefile | 1 - arch/arm/dts/imx8mq-evk.dts | 712 arch/arm/mach-imx/imx8m/Kconfig | 1 + configs/imx8mq_evk_defconfig| 2 +- 4 files

[PATCH v2 0/4] imx8m: convert i.MX8MM/Q/N/P-EVK to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
This patchset is to convert NXP i.MX8M[Q,M,N,P] EVK boards to OF_UPSTREAM Signed-off-by: Peng Fan --- Changes in v2: - Sorry for the quick respin. - Drop the dtb build in arch/arm/dts/Makefile - Link to v1: https://lore.kernel.org/r/20240328-imx8m-v1-0-2be5e6657...@nxp.com --- Peng Fan (4):

[PATCH 4/4] imx: imx8mp_evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan Convert to OF_UPSTREAM for i.MX8MP EVK Signed-off-by: Peng Fan --- arch/arm/dts/Makefile | 1 - arch/arm/dts/imx8mp-evk.dts | 684 arch/arm/mach-imx/imx8m/Kconfig | 1 + configs/imx8mp_evk_defconfig| 2 +- 4 files

[PATCH 3/4] imx: imx8mn-evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan Convert i.MX8MN-EVK and i.MX8MN-DDR4-EVK to OF_UPSTREAM Signed-off-by: Peng Fan --- arch/arm/dts/imx8mn-ddr4-evk.dts | 160 -- arch/arm/dts/imx8mn-evk.dts | 128 -- arch/arm/mach-imx/imx8m/Kconfig | 2 +

[PATCH 2/4] imx: imx8mm_evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan Convert i.MX8MM EVK to OF_UPSTREAM Signed-off-by: Peng Fan --- arch/arm/dts/imx8mm-evk.dts | 128 arch/arm/dts/imx8mm-evk.dtsi | 615 -- arch/arm/mach-imx/imx8m/Kconfig | 1 + configs/imx8mm_evk_defconfig | 2 +-

[PATCH 1/4] imx: imx8mq_evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan Convert i.MX8MQ EVK to OF_UPSTREAM Signed-off-by: Peng Fan --- arch/arm/dts/imx8mq-evk.dts | 712 arch/arm/mach-imx/imx8m/Kconfig | 1 + configs/imx8mq_evk_defconfig| 2 +- 3 files changed, 2 insertions(+), 713 deletions(-)

[PATCH 0/4] imx8m: convert i.MX8MM/Q/N/P-EVK to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
This patchset is to convert NXP i.MX8M[Q,M,N,P] EVK boards to OF_UPSTREAM Signed-off-by: Peng Fan --- Peng Fan (4): imx: imx8mq_evk: convert to OF_UPSTREAM imx: imx8mm_evk: convert to OF_UPSTREAM imx: imx8mn-evk: convert to OF_UPSTREAM imx: imx8mp_evk: convert to

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

2024-03-27 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 ---

[PATCH v3 5/6] dt-bindings: imx93: sync clock header

2024-03-27 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

[PATCH v3 4/6] clk: imx93: fix anatop base

2024-03-27 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

[PATCH v3 3/6] cpu: drop imx9_cpu

2024-03-27 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

[PATCH v3 2/6] serial: lpuart: use ipg clk for i.MX7ULP

2024-03-27 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 | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/serial/serial_lpuart.c

[PATCH v3 1/6] gpio: imx_rgpio2p: support one address

2024-03-27 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 v3 0/6] imx93-11x11-evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
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. Add the pmic nodes to x-u-boot.dtsi, since upstream still not has it. imx93.dtsi still kept because other boards still use it as of now.

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

2024-03-27 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 ---

[PATCH v2 5/6] dt-bindings: imx93: sync clock header

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan Sync clock header with kernel 6.8 Signed-off-by: Peng Fan --- arch/arm/dts/imx8mp-evk.dts | 684 include/dt-bindings/clock/imx93-clock.h | 3 +- 2 files changed, 2 insertions(+), 685 deletions(-) diff --git

[PATCH v2 4/6] clk: imx93: fix anatop base

2024-03-27 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

[PATCH v2 3/6] cpu: drop imx9_cpu

2024-03-27 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

[PATCH v2 2/6] serial: lpuart: use ipg clk for i.MX7ULP

2024-03-27 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 | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/serial/serial_lpuart.c

[PATCH v2 1/6] gpio: imx_rgpio2p: support one address

2024-03-27 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 v2 0/6] imx93-11x11-evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
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. Add the pmic nodes to x-u-boot.dtsi, since upstream still not has it. imx93.dtsi still kept because other boards still use it as of now.

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

2024-03-27 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 ---

[PATCH 5/6] Makefile: tune the include order

2024-03-27 Thread Peng Fan (OSS)
From: Peng Fan For OF_UPSTREAM support, the U-Boot headers under dt-bindings/ maybe different with OF_UPSTREAM headers. So let OF_UPSTREAM headers be included first when migrating to OF_UPSTREAM. Signed-off-by: Peng Fan --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 4/6] clk: imx93: fix anatop base

2024-03-27 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

[PATCH 3/6] cpu: drop imx9_cpu

2024-03-27 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

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

2024-03-27 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 | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/serial/serial_lpuart.c

[PATCH 1/6] gpio: imx_rgpio2p: support one address

2024-03-27 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 0/6] imx93-11x11-evk: convert to OF_UPSTREAM

2024-03-27 Thread Peng Fan (OSS)
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. Add the pmic nodes to x-u-boot.dtsi, since upstream still not has it. imx93.dtsi still kept because other boards still use it as of now.

[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 V2 12/30] imx: ele_api: add DEK Blob generation

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan - Add crc computation. - Add ele_generate_dek_blob API for encrypted boot support. Signed-off-by: Clement Faure Signed-off-by: Peng Fan --- arch/arm/include/asm/mach-imx/ele_api.h | 2 +- drivers/misc/imx_ele/ele_api.c | 44 + 2 files changed,

[PATCH V2 30/30] imx: fsl_sec: preprocessor casting issue with addresses involving math

2023-06-15 Thread Peng Fan (OSS)
From: Utkarsh Gupta The sec_in32 preprocessor is defined as follows in include/fsl_sec.h file: When address "a" is calculated using math for ex: addition of base address and an offset, then casting is applied only to the first address which in this example is base address. caam_ccbvid_reg =

[PATCH V2 29/30] imx: priblob: Update to use structure

2023-06-15 Thread Peng Fan (OSS)
From: Maximus Sun Use structure to avoid define CAAM_SCFGR for each platform Signed-off-by: Maximus Sun Signed-off-by: Peng Fan --- arch/arm/mach-imx/priblob.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/priblob.c

[PATCH V2 28/30] imx: imx8m: add CAAM_BASE_ADDR

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan Add CAAM_BASE_ADDR which will be used by priblob.c Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8m/imx-regs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h b/arch/arm/include/asm/arch-imx8m/imx-regs.h index

[PATCH V2 26/30] imx: ahab: Update AHAB for iMX8 and iMX8ULP

2023-06-15 Thread Peng Fan (OSS)
From: Ye Li Abstract common interfaces for AHAB authentication operations. Then share some common codes for AHAB and SPL container authentication Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/include/asm/mach-imx/ahab.h | 15 arch/arm/mach-imx/imx8/ahab.c| 129

[PATCH V2 27/30] imx: imx8: ahab: sha256: enable image verification using ARMv8 crypto extension

2023-06-15 Thread Peng Fan (OSS)
From: Gaurav Jain add support for SHA-256 secure hash algorithm using the ARM v8 SHA-256 instructions for verifying image hash. Signed-off-by: Gaurav Jain Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8/ahab.c | 28 1 file changed, 24 insertions(+), 4

[PATCH V2 25/30] imx: parse-container: Use malloc for container processing

2023-06-15 Thread Peng Fan (OSS)
From: Nitin Garg If the container has image which conflicts with spl_get_load_buffer address, there are processing failures. Use malloc instead of spl_get_load_buffer. Reviewed-by: Ye Li Signed-off-by: Nitin Garg Signed-off-by: Peng Fan --- arch/arm/mach-imx/parse-container.c | 38

[PATCH V2 24/30] imx: imx8m: clock: not configure reserved SRC register

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan i.MX8M[M,N,P] SRC not has 0x1004 offset register, so drop it. Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/clock_imx8mm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c

[PATCH V2 23/30] imx: imx8: bootaux: Add i.MX8 M4 boot support

2023-06-15 Thread Peng Fan (OSS)
From: Ye Li 1. Implement bootaux for the M4 boot on i.MX8QM and QXP. Users need to download M4 image to any DDR address first. Then use the "bootaux [M4 core id]" to boot CM4_0 or CM4_1, the default core id is 0 for CM4_0. Since current M4 only supports running in TCM. The bootaux

[PATCH V2 22/30] imx: bootaux: Fix bootaux issue when running on ARM64

2023-06-15 Thread Peng Fan (OSS)
From: Ye Li The bootaux uses ulong to read private data and write to M4 TCM, this cause problem on ARM64 platform where the ulong is 8bytes. Fix it by using u32 to replace ulong. Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx_bootaux.c | 6

[PATCH V2 21/30] imx: bootaux: change names of MACROs used to boot MCU on iMX devices

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan The current bootaux supports i.MX8M and i.MX93, but the name "_M4_" implies that the SoCs have Cortex-M4. Actually i.MX8MM/Q use Cortex-M4, i.MX8MN/P use Cortex-M7, i.MX93 use Cortex-M33, so use "_MCU_" in place of "_M4_" to simplify the naming. Signed-off-by: faqiang.zhu

[PATCH V2 20/30] imx: iamge-container: support secondary container

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan Add the support for loading image from secondary container set on iMX8QM B0, iMX8QXP C0. Using the SCFW API to get container set index, if it is the secondary boot, get the offset from fuse and apply to offset of current container set beginning for loading. Also override the

[PATCH V2 19/30] imx: image-container: Fix container header checking

2023-06-15 Thread Peng Fan (OSS)
From: Ye Li Checking container header tag and version is wrong, it causes to fail to bypass invalid container Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/image-container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH V2 18/30] imx: hab: Fix coverity issue in HAB event decoding

2023-06-15 Thread Peng Fan (OSS)
From: Ye Li Fix below coverity issues caused by get_idx function where "-1" is compared with uint8_t "element" 343336 Unsigned compared with neg 343337 Operands don't affect result Additional, this function returns "-1" will cause overflow to event string array. Reviewed-by: Peng Fan

[PATCH V2 17/30] imx: imx8ulp: start the ELE RNG at boot

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan On the imx8ulp A1 SoC, the ELE RNG needs to be manually started. Signed-off-by: Clement Faure Signed-off-by: Peng Fan --- arch/arm/include/asm/mach-imx/ele_api.h | 1 + board/freescale/imx8ulp_evk/spl.c | 10 ++ drivers/misc/imx_ele/ele_api.c | 25

[PATCH V2 16/30] imx: misc: ele_mu: Update ELE MU driver

2023-06-15 Thread Peng Fan (OSS)
From: Ye Li Extend the RX timeout value to 10s, because when authentication is failed the ELE needs long time (>2s for 28M image) to return the result. Print rx wait info per 1s. Also correct TX and RX status registers in debug. Signed-off-by: Ye Li Signed-off-by: Peng Fan ---

[PATCH V2 14/30] imx: cmd_dek: add ELE DEK Blob generation support

2023-06-15 Thread Peng Fan (OSS)
From: Clement Faure Add ELE DEK Blob generation for the cmd_dek command. Signed-off-by: Clement Faure Signed-off-by: Peng Fan --- arch/arm/mach-imx/Kconfig | 7 arch/arm/mach-imx/cmd_dek.c | 84 + 2 files changed, 91 insertions(+) diff --git

[PATCH V2 15/30] imx: misc: ele_mu: Update MU TR registers count

2023-06-15 Thread Peng Fan (OSS)
From: Ye Li According to SRM, the Sentinel MU has 8 TR and 4 RR registers. All of them are used for ELE message. So update TR count to 8 and fix a typo in receive msg Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/misc/imx_ele/ele_mu.c | 4 ++-- 1 file

[PATCH V2 13/30] imx: cmd_dek: Fix Uninitialized pointer read

2023-06-15 Thread Peng Fan (OSS)
From: Ye Li Fix Coverity (CID 21143558). When tee_shm_register returns failure, the shm_input pointer is invalid, should not free it. Same issue also exists on registering shm_output. Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_dek.c | 3 ++-

[PATCH V2 08/30] imx: use generic name ele(EdgeLockSecure Enclave)

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave code including comment, folder and API name to ELE to align. Signed-off-by: Peng Fan --- arch/arm/Kconfig | 4 +- arch/arm/include/asm/arch-imx9/ccm_regs.h | 2 +-

[PATCH V2 11/30] imx: ele_api: support program secure fuse and return lifecycle

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog Signed-off-by: Peng Fan --- arch/arm/include/asm/mach-imx/ele_api.h | 2 + arch/arm/mach-imx/ele_ahab.c| 74 +

[PATCH V2 10/30] imx: ele_ahab: use hextoul

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan Use hextoul which looks a bit simpler. Signed-off-by: Peng Fan --- arch/arm/mach-imx/ele_ahab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/ele_ahab.c b/arch/arm/mach-imx/ele_ahab.c index 9bb37919638..5f23486304c 100644 ---

[PATCH V2 09/30] imx: parse-container: fix build warning

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan Fix build warning: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘u64’ {aka ‘long long unsigned int’} [-Wformat=] printf("can't find memreg for image %d load address 0x%x, error %d\n", warning: format ‘%lx’ expects argument of type

[PATCH V2 07/30] imx: scu_api: update to version 1.16 and add more APIs

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan Upgrade SCFW API to 1.16 Add more APIs: sc_misc_get_button_status sc_pm_reboot sc_seco_v2x_build_info Signed-off-by: Peng Fan --- drivers/misc/imx8/scu_api.c | 78 include/firmware/imx/sci/rpc.h | 27 ---

[PATCH V2 06/30] imx: congatec/cgtqmx8: correct SCU API usage

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan The return value is int type, not sc_err_t(u8), correct the usage. Signed-off-by: Peng Fan Tested-by: Oliver Graute Reviewed-by: Oliver Graute --- board/congatec/cgtqmx8/cgtqmx8.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH V2 05/30] imx: advantech: correct SCU API usage

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan The return value is int type, not sc_err_t(u8), correct the usage. Signed-off-by: Peng Fan Tested-by: Oliver Graute Reviewed-by: Oliver Graute --- board/advantech/imx8qm_dmsse20_a1/spl.c | 6 +++--- board/advantech/imx8qm_rom7720_a1/spl.c | 6 +++--- 2 files changed, 6

[PATCH V2 04/30] imx: siemens/capricorn: correct SCU API usage

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan The return value is int type, not sc_err_t(u8), correct the usage. Signed-off-by: Peng Fan --- board/siemens/capricorn/board.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c

[PATCH V2 03/30] imx: toradex/colibri-imx8x: correct SCU API usage

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan The return value is int type, not sc_err_t(u8), correct the usage. Signed-off-by: Peng Fan --- board/toradex/colibri-imx8x/colibri-imx8x.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c

[PATCH V2 01/30] imx: mach: correct SCU API usage

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan The return value is int type, not sc_err_t(u8), correct the usage. Signed-off-by: Peng Fan --- arch/arm/mach-imx/cmd_dek.c | 2 +- arch/arm/mach-imx/imx8/ahab.c | 10 +- arch/arm/mach-imx/imx8/cpu.c | 6 +-

[PATCH V2 02/30] imx: toradex/apalis-imx8: correct SCU API usage

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan The return value is int type, not sc_err_t(u8), correct the usage. Signed-off-by: Peng Fan --- board/toradex/apalis-imx8/apalis-imx8.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/board/toradex/apalis-imx8/apalis-imx8.c

[PATCH V2 00/30] imx: misc update and fix

2023-06-15 Thread Peng Fan (OSS)
From: Peng Fan V2: Update commit log for patch 21 Per Marek This patchset includes some misc update and fix from NXP downstream - i.MX8 SCU API usage correction - Use ELE(EdgeLockSecure Enclave) public from NXP to replace S400 or Sentinel - Secondary container support and header checking

[PATCH 30/30] imx: fsl_sec: preprocessor casting issue with addresses involving math

2023-06-02 Thread Peng Fan (OSS)
From: Utkarsh Gupta The sec_in32 preprocessor is defined as follows in include/fsl_sec.h file: When address "a" is calculated using math for ex: addition of base address and an offset, then casting is applied only to the first address which in this example is base address. caam_ccbvid_reg =

[PATCH 29/30] imx: priblob: Update to use structure

2023-06-02 Thread Peng Fan (OSS)
From: Maximus Sun Use structure to avoid define CAAM_SCFGR for each platform Signed-off-by: Maximus Sun Signed-off-by: Peng Fan --- arch/arm/mach-imx/priblob.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/priblob.c

[PATCH 27/30] imx: imx8: ahab: sha256: enable image verification using ARMv8 crypto extension

2023-06-02 Thread Peng Fan (OSS)
From: Gaurav Jain add support for SHA-256 secure hash algorithm using the ARM v8 SHA-256 instructions for verifying image hash. Signed-off-by: Gaurav Jain Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8/ahab.c | 28 1 file changed, 24 insertions(+), 4

[PATCH 28/30] imx: imx8m: add CAAM_BASE_ADDR

2023-06-02 Thread Peng Fan (OSS)
From: Peng Fan Add CAAM_BASE_ADDR which will be used by priblob.c Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8m/imx-regs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h b/arch/arm/include/asm/arch-imx8m/imx-regs.h index

[PATCH 26/30] imx: ahab: Update AHAB for iMX8 and iMX8ULP

2023-06-02 Thread Peng Fan (OSS)
From: Ye Li Abstract common interfaces for AHAB authentication operations. Then share some common codes for AHAB and SPL container authentication Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/include/asm/mach-imx/ahab.h | 15 arch/arm/mach-imx/imx8/ahab.c| 129

[PATCH 25/30] imx: parse-container: Use malloc for container processing

2023-06-02 Thread Peng Fan (OSS)
From: Nitin Garg If the container has image which conflicts with spl_get_load_buffer address, there are processing failures. Use malloc instead of spl_get_load_buffer. Reviewed-by: Ye Li Signed-off-by: Nitin Garg Signed-off-by: Peng Fan --- arch/arm/mach-imx/parse-container.c | 38

[PATCH 24/30] imx: imx8m: clock: not configure reserved SRC register

2023-06-02 Thread Peng Fan (OSS)
From: Peng Fan i.MX8M[M,N,P] SRC not has 0x1004 offset register, so drop it. Reviewed-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/clock_imx8mm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c

[PATCH 23/30] imx: imx8: bootaux: Add i.MX8 M4 boot support

2023-06-01 Thread Peng Fan (OSS)
From: Ye Li 1. Implement bootaux for the M4 boot on i.MX8QM and QXP. Users need to download M4 image to any DDR address first. Then use the "bootaux [M4 core id]" to boot CM4_0 or CM4_1, the default core id is 0 for CM4_0. Since current M4 only supports running in TCM. The bootaux

[PATCH 22/30] imx: bootaux: Fix bootaux issue when running on ARM64

2023-06-01 Thread Peng Fan (OSS)
From: Ye Li The bootaux uses ulong to read private data and write to M4 TCM, this cause problem on ARM64 platform where the ulong is 8bytes. Fix it by using u32 to replace ulong. Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx_bootaux.c | 6

[PATCH 21/30] imx: bootaux: change names of MACROs used to boot MCU on iMX devices

2023-06-01 Thread Peng Fan (OSS)
From: Peng Fan i.MX8MN/P has Cortex-M7, i.MX93 has Cortex-M33, so use "M4" is a bit misleading, so update the name of the macro Signed-off-by: faqiang.zhu Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8m/imx-regs.h | 2 +- arch/arm/include/asm/arch-mx6/imx-regs.h | 2 +-

[PATCH 20/30] imx: iamge-container: support secondary container

2023-06-01 Thread Peng Fan (OSS)
From: Peng Fan Add the support for loading image from secondary container set on iMX8QM B0, iMX8QXP C0. Using the SCFW API to get container set index, if it is the secondary boot, get the offset from fuse and apply to offset of current container set beginning for loading. Also override the

[PATCH 19/30] imx: image-container: Fix container header checking

2023-06-01 Thread Peng Fan (OSS)
From: Ye Li Checking container header tag and version is wrong, it causes to fail to bypass invalid container Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/mach-imx/image-container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 18/30] imx: hab: Fix coverity issue in HAB event decoding

2023-06-01 Thread Peng Fan (OSS)
From: Ye Li Fix below coverity issues caused by get_idx function where "-1" is compared with uint8_t "element" 343336 Unsigned compared with neg 343337 Operands don't affect result Additional, this function returns "-1" will cause overflow to event string array. Reviewed-by: Peng Fan

[PATCH 17/30] imx: imx8ulp: start the ELE RNG at boot

2023-06-01 Thread Peng Fan (OSS)
From: Peng Fan On the imx8ulp A1 SoC, the ELE RNG needs to be manually started. Signed-off-by: Clement Faure Signed-off-by: Peng Fan --- arch/arm/include/asm/mach-imx/ele_api.h | 1 + board/freescale/imx8ulp_evk/spl.c | 10 ++ drivers/misc/imx_ele/ele_api.c | 25

[PATCH 16/30] imx: misc: ele_mu: Update ELE MU driver

2023-06-01 Thread Peng Fan (OSS)
From: Ye Li Extend the RX timeout value to 10s, because when authentication is failed the ELE needs long time (>2s for 28M image) to return the result. Print rx wait info per 1s. Also correct TX and RX status registers in debug. Signed-off-by: Ye Li Signed-off-by: Peng Fan ---

[PATCH 15/30] imx: misc: ele_mu: Update MU TR registers count

2023-06-01 Thread Peng Fan (OSS)
From: Ye Li According to SRM, the Sentinel MU has 8 TR and 4 RR registers. All of them are used for ELE message. So update TR count to 8 and fix a typo in receive msg Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/misc/imx_ele/ele_mu.c | 4 ++-- 1 file

  1   2   3   4   5   6   7   8   9   10   >