NXP-IMX pending patches
Subsystems (14)
v2 cover NXP-IMX pending patches
From: Peng Fan <[email protected]>
V2:
Rebased on Stefano's imx/master
Resolve conflicts.
CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/12881
V1:
This is to resend the pending patches [1,2,3] for Stefano to pick
Patchset base:fc97ff2695d6d7fbea7d5fda7b080f405d6ee744
(origin/master, origin/HEAD, imx/master) Merge https://source.denx.de/u-boot/custodians/u-boot-sunxi
Rebased patches to avoid buid break.
1. https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
2. https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
3. https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/12806
THere is one error is arm32 build exceed 1 hour fail, which i think not because of this patchset.
Alice Guo (3):
misc: imx8ulp: move fuse.c from imx8ulp to sentinel
misc: fuse: support to access fuse on i.MX93
misc: fuse: update the code for accessing fuse of i.MX93
Jian Li (1):
imx: imx9: Add function to initialize timer
Peng Fan (35):
spl: imx8mm: enlarge SPL_MAX_SIZE
arm: makefile: cleanup mach-imx usage
imx: simplify dependency with SPL_BOOTROM_SUPPORT
imx: move get_boot_device to common header
imx: move get_boot_device to common file
imx: add USB2_BOOT type
imx: add basic i.MX9 support
fsl_lpuart: add i.MX9 support
gpio: pca953x: support pcal6524
imx: pinctrl: add pinctrl and pinfunc file for i.MX93
imx: imx9: Add CCM and clock API support
mmc: fsl_esdhc_imx: Support i.MX9
spl: Use SPL_FIT_IMAGE_TINY for iMX9
imx: imx9: support romapi
misc: s4mu: Support iMX93 with Sentinel MU
misc: S400_API: New API for FW status and chip info
misc: s400_api: introduce ahab_release_m33_trout
imx: imx9: Get the chip revision through S400 API
imx: imx9: Add MIX power init
imx: imx9: Add M33 release prepare function
imx: imx9: Support booting m33 from Acore
arm: dts: Add i.MX93 SoC DTSi file
imx: imx93_evk: Add basic board support
imx: imx93_evk: Set ARM clock to 1.7Ghz
net: fec_mxc: support i.MX93
net: dwc_eth_qos: fix build break when CLK not enabled
net: dwc_eth_qos: public some functions
net: dwc_eth_qos: move i.MX code out
net: dwc_eth_qos: introduce eqos hook eqos_get_enetaddr
board: freescale: imx93_evk: support ethernet
tools: image: support i.MX93
arm: dts: imx8m: update binman ddr firmware node name
ddr: imx8m: helper: load ddr firmware according to binman symbols
arm: dts: imx8m: shrink ddr firmware size to actual file size
imx: imx8mm-icore: migrate to use BINMAN
Ye Li (14):
imx: Change USB boot device type
imx: spl: Allow iMX7/8/8M to overwrite spl_board_boot_device
imx: imx9: disable watchdog
misc: imx: S400_API: Move S400 MU and API to a common place
misc: S400_API: Update release RDC API
imx: imx9: Add TRDC driver for TRDC init
imx: imx9: Add AHAB boot support
misc: S400_API: Rename imx8ulp_s400_msg to sentinel_msg
imx: imx9: Add gpio registers structure
imx: imx9: Support multiple env storages at runtime
imx: imx9: clock: Add DDR clock support
ddr: imx: Add i.MX9 DDR controller driver
ddr: imx9: enable Performance monitor counter
net: eqos: add function to get phy node and address
arch/arm/Kconfig | 16 +
arch/arm/Makefile | 12 +-
arch/arm/dts/Makefile | 3 +
arch/arm/dts/imx8mm-u-boot.dtsi | 16 +-
arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi | 20 +-
.../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi | 8 +-
arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 20 +-
arch/arm/dts/imx8mn-evk-u-boot.dtsi | 20 +-
.../dts/imx8mn-var-som-symphony-u-boot.dtsi | 16 +-
arch/arm/dts/imx8mn-venice-u-boot.dtsi | 16 +-
arch/arm/dts/imx8mp-u-boot.dtsi | 20 +-
arch/arm/dts/imx8mq-cm-u-boot.dtsi | 20 +-
arch/arm/dts/imx8mq-u-boot.dtsi | 16 +-
arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 157 ++
arch/arm/dts/imx93-11x11-evk.dts | 527 ++++++
arch/arm/dts/imx93-pinfunc.h | 625 +++++++
arch/arm/dts/imx93.dtsi | 688 ++++++++
arch/arm/include/asm/arch-imx/cpu.h | 2 +
arch/arm/include/asm/arch-imx8/sys_proto.h | 1 -
arch/arm/include/asm/arch-imx8m/ddr.h | 6 +-
arch/arm/include/asm/arch-imx8m/sys_proto.h | 2 +-
arch/arm/include/asm/arch-imx8ulp/sys_proto.h | 5 -
arch/arm/include/asm/arch-imx9/ccm_regs.h | 266 +++
arch/arm/include/asm/arch-imx9/clock.h | 244 +++
arch/arm/include/asm/arch-imx9/ddr.h | 126 ++
arch/arm/include/asm/arch-imx9/gpio.h | 20 +
arch/arm/include/asm/arch-imx9/imx-regs.h | 234 +++
arch/arm/include/asm/arch-imx9/imx93_pins.h | 729 ++++++++
arch/arm/include/asm/arch-imx9/sys_proto.h | 14 +
arch/arm/include/asm/arch-imx9/trdc.h | 19 +
arch/arm/include/asm/arch-mx7/sys_proto.h | 1 -
arch/arm/include/asm/arch-mx7ulp/sys_proto.h | 1 -
arch/arm/include/asm/global_data.h | 5 +-
arch/arm/include/asm/mach-imx/boot_mode.h | 1 +
arch/arm/include/asm/mach-imx/iomux-v3.h | 11 +-
.../asm/{arch-imx8ulp => mach-imx}/mu_hal.h | 4 +-
.../asm/{arch-imx8ulp => mach-imx}/s400_api.h | 18 +-
arch/arm/include/asm/mach-imx/sys_proto.h | 12 +-
arch/arm/mach-imx/Kconfig | 5 +-
arch/arm/mach-imx/Makefile | 9 +-
arch/arm/mach-imx/imx8m/Kconfig | 1 +
.../mach-imx/imx8m/imximage-8mm-lpddr4.cfg | 10 +-
arch/arm/mach-imx/imx8m/soc.c | 44 -
arch/arm/mach-imx/imx8ulp/ahab.c | 345 ++++
arch/arm/mach-imx/imx8ulp/rdc.c | 6 +-
arch/arm/mach-imx/imx8ulp/soc.c | 45 +-
arch/arm/mach-imx/imx9/Kconfig | 34 +
arch/arm/mach-imx/imx9/Makefile | 11 +
arch/arm/mach-imx/imx9/ahab.c | 346 ++++
arch/arm/mach-imx/imx9/clock.c | 844 ++++++++++
arch/arm/mach-imx/imx9/clock_root.c | 438 +++++
arch/arm/mach-imx/imx9/imx_bootaux.c | 133 ++
arch/arm/mach-imx/imx9/lowlevel_init.S | 26 +
arch/arm/mach-imx/imx9/soc.c | 473 ++++++
arch/arm/mach-imx/imx9/trdc.c | 581 +++++++
arch/arm/mach-imx/romapi.c | 47 +
arch/arm/mach-imx/spl.c | 82 +-
board/freescale/common/Makefile | 2 +-
board/freescale/imx8ulp_evk/spl.c | 2 +-
board/freescale/imx93_evk/Kconfig | 19 +
board/freescale/imx93_evk/MAINTAINERS | 6 +
board/freescale/imx93_evk/Makefile | 12 +
board/freescale/imx93_evk/imx93_evk.c | 90 +
board/freescale/imx93_evk/lpddr4x_timing.c | 1486 +++++++++++++++++
board/freescale/imx93_evk/spl.c | 129 ++
common/spl/Kconfig | 3 +-
configs/imx8mm-cl-iot-gate-optee_defconfig | 1 -
configs/imx8mm-cl-iot-gate_defconfig | 1 -
configs/imx8mm-icore-mx8mm-ctouch2_defconfig | 3 +-
configs/imx8mm-icore-mx8mm-edimm2.2_defconfig | 3 +-
configs/imx8mm-mx8menlo_defconfig | 1 -
configs/imx8mm_beacon_defconfig | 1 -
configs/imx8mm_data_modul_edm_sbc_defconfig | 1 -
configs/imx8mm_evk_defconfig | 1 -
configs/imx8mm_venice_defconfig | 1 -
configs/imx93_11x11_evk_defconfig | 117 ++
configs/kontron-sl-mx8mm_defconfig | 1 -
configs/phycore-imx8mm_defconfig | 1 -
configs/verdin-imx8mm_defconfig | 1 -
drivers/Makefile | 1 +
drivers/ddr/imx/Kconfig | 2 +
drivers/ddr/imx/imx8m/Kconfig | 1 +
drivers/ddr/imx/imx8m/Makefile | 3 +-
drivers/ddr/imx/imx8m/ddr_init.c | 219 +++
drivers/ddr/imx/imx9/Kconfig | 27 +
drivers/ddr/imx/imx9/Makefile | 10 +
drivers/ddr/imx/imx9/ddr_init.c | 489 ++++++
drivers/ddr/imx/phy/Kconfig | 4 +
drivers/ddr/imx/phy/Makefile | 9 +
drivers/ddr/imx/{imx8m => phy}/ddrphy_csr.c | 0
drivers/ddr/imx/{imx8m => phy}/ddrphy_train.c | 1 -
drivers/ddr/imx/phy/ddrphy_utils.c | 169 ++
drivers/ddr/imx/{imx8m => phy}/helper.c | 92 +-
drivers/gpio/pca953x_gpio.c | 4 +
drivers/misc/Kconfig | 7 +
drivers/misc/Makefile | 2 +-
drivers/misc/{imx8ulp => sentinel}/Makefile | 2 +-
drivers/misc/{imx8ulp => sentinel}/fuse.c | 96 +-
drivers/misc/{imx8ulp => sentinel}/s400_api.c | 149 +-
.../{imx8ulp/imx8ulp_mu.c => sentinel/s4mu.c} | 11 +-
drivers/mmc/Kconfig | 2 +-
drivers/net/Kconfig | 2 +-
drivers/net/Makefile | 1 +
drivers/net/dwc_eth_qos.c | 406 +----
drivers/net/dwc_eth_qos.h | 284 ++++
drivers/net/dwc_eth_qos_imx.c | 131 ++
drivers/net/fec_mxc.c | 4 +-
drivers/pinctrl/nxp/Kconfig | 13 +
drivers/pinctrl/nxp/Makefile | 1 +
drivers/pinctrl/nxp/pinctrl-imx93.c | 37 +
include/configs/imx93_evk.h | 145 ++
include/dt-bindings/clock/imx93-clock.h | 203 +++
include/dt-bindings/power/imx93-power.h | 12 +
include/fsl_lpuart.h | 2 +-
include/imx8image.h | 15 +-
include/imx_sip.h | 1 +
tools/imx8image.c | 79 +-
117 files changed, 11194 insertions(+), 725 deletions(-)
create mode 100644 arch/arm/dts/imx93-11x11-evk-u-boot.dtsi
create mode 100644 arch/arm/dts/imx93-11x11-evk.dts
create mode 100644 arch/arm/dts/imx93-pinfunc.h
create mode 100644 arch/arm/dts/imx93.dtsi
create mode 100644 arch/arm/include/asm/arch-imx9/ccm_regs.h
create mode 100644 arch/arm/include/asm/arch-imx9/clock.h
create mode 100644 arch/arm/include/asm/arch-imx9/ddr.h
create mode 100644 arch/arm/include/asm/arch-imx9/gpio.h
create mode 100644 arch/arm/include/asm/arch-imx9/imx-regs.h
create mode 100644 arch/arm/include/asm/arch-imx9/imx93_pins.h
create mode 100644 arch/arm/include/asm/arch-imx9/sys_proto.h
create mode 100644 arch/arm/include/asm/arch-imx9/trdc.h
rename arch/arm/include/asm/{arch-imx8ulp => mach-imx}/mu_hal.h (79%)
rename arch/arm/include/asm/{arch-imx8ulp => mach-imx}/s400_api.h (75%)
create mode 100644 arch/arm/mach-imx/imx8ulp/ahab.c
create mode 100644 arch/arm/mach-imx/imx9/Kconfig
create mode 100644 arch/arm/mach-imx/imx9/Makefile
create mode 100644 arch/arm/mach-imx/imx9/ahab.c
create mode 100644 arch/arm/mach-imx/imx9/clock.c
create mode 100644 arch/arm/mach-imx/imx9/clock_root.c
create mode 100644 arch/arm/mach-imx/imx9/imx_bootaux.c
create mode 100644 arch/arm/mach-imx/imx9/lowlevel_init.S
create mode 100644 arch/arm/mach-imx/imx9/soc.c
create mode 100644 arch/arm/mach-imx/imx9/trdc.c
create mode 100644 board/freescale/imx93_evk/Kconfig
create mode 100644 board/freescale/imx93_evk/MAINTAINERS
create mode 100644 board/freescale/imx93_evk/Makefile
create mode 100644 board/freescale/imx93_evk/imx93_evk.c
create mode 100644 board/freescale/imx93_evk/lpddr4x_timing.c
create mode 100644 board/freescale/imx93_evk/spl.c
create mode 100644 configs/imx93_11x11_evk_defconfig
create mode 100644 drivers/ddr/imx/imx9/Kconfig
create mode 100644 drivers/ddr/imx/imx9/Makefile
create mode 100644 drivers/ddr/imx/imx9/ddr_init.c
create mode 100644 drivers/ddr/imx/phy/Kconfig
create mode 100644 drivers/ddr/imx/phy/Makefile
rename drivers/ddr/imx/{imx8m => phy}/ddrphy_csr.c (100%)
rename drivers/ddr/imx/{imx8m => phy}/ddrphy_train.c (98%)
create mode 100644 drivers/ddr/imx/phy/ddrphy_utils.c
rename drivers/ddr/imx/{imx8m => phy}/helper.c (61%)
rename drivers/misc/{imx8ulp => sentinel}/Makefile (67%)
rename drivers/misc/{imx8ulp => sentinel}/fuse.c (69%)
rename drivers/misc/{imx8ulp => sentinel}/s400_api.c (69%)
rename drivers/misc/{imx8ulp/imx8ulp_mu.c => sentinel/s4mu.c} (94%)
create mode 100644 drivers/net/dwc_eth_qos.h
create mode 100644 drivers/net/dwc_eth_qos_imx.c
create mode 100644 drivers/pinctrl/nxp/pinctrl-imx93.c
create mode 100644 include/configs/imx93_evk.h
create mode 100644 include/dt-bindings/clock/imx93-clock.h
create mode 100644 include/dt-bindings/power/imx93-power.hSignature · 1 line
2.36.0
PATCH v2 1/53 spl: imx8mm: enlarge SPL_MAX_SIZE
From: Peng Fan <[email protected]>
The CONFIG_SPL_MAX_SIZE could be 0x27000 for i.MX8MM when SPL_TEXT_BASE set to 0x7E1000.
The DDR firmware max uses 96KB, there is a 4KB padding header before SPL_TEXT_BASE, so the SPL MAX SIZE is 256KB - 96KB - 4KB.
--- common/spl/Kconfig | 1 + configs/imx8mm-cl-iot-gate-optee_defconfig | 1 - configs/imx8mm-cl-iot-gate_defconfig | 1 - configs/imx8mm-icore-mx8mm-ctouch2_defconfig | 1 - configs/imx8mm-icore-mx8mm-edimm2.2_defconfig | 1 - configs/imx8mm-mx8menlo_defconfig | 1 - configs/imx8mm_beacon_defconfig | 1 - configs/imx8mm_data_modul_edm_sbc_defconfig | 1 - configs/imx8mm_evk_defconfig | 1 - configs/imx8mm_venice_defconfig | 1 - configs/kontron-sl-mx8mm_defconfig | 1 - configs/phycore-imx8mm_defconfig | 1 - configs/verdin-imx8mm_defconfig | 1 - 13 files changed, 1 insertion(+), 12 deletions(-)
common/spl/Kconfig +1 -0
@@ -83,6 +83,7 @@ config SPL_MAX_SIZE default 0x7000 if RCAR_GEN3 default 0x5fa0 if SUNXI_SRAM_ADDRESS = 0x0 default 0x10000 if ASPEED_AST2600 + default 0x27000 if IMX8MM && SPL_TEXT_BASE = 0x7E1000 default 0x0 help Maximum size of the SPL image (text, data, rodata, and linker lists
configs/imx8mm-cl-iot-gate-optee_defconfig +0 -1
@@ -23,7 +23,6 @@ CONFIG_SPL_LOAD_FIT=y # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOARD_LATE_INIT=y -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/imx8mm-cl-iot-gate_defconfig +0 -1
@@ -25,7 +25,6 @@ CONFIG_SPL_LOAD_FIT=y # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOARD_LATE_INIT=y -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/imx8mm-icore-mx8mm-ctouch2_defconfig +0 -1
@@ -23,7 +23,6 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" CONFIG_OF_SYSTEM_SETUP=y CONFIG_DEFAULT_FDT_FILE="imx8mm-icore-mx8mm-ctouch2.dtb" -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/imx8mm-icore-mx8mm-edimm2.2_defconfig +0 -1
@@ -23,7 +23,6 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" CONFIG_OF_SYSTEM_SETUP=y CONFIG_DEFAULT_FDT_FILE="imx8mm-icore-mx8mm-edimm2.2.dtb" -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/imx8mm-mx8menlo_defconfig +0 -1
@@ -34,7 +34,6 @@ CONFIG_LOG=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOARD_LATE_INIT=y -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/imx8mm_beacon_defconfig +0 -1
@@ -25,7 +25,6 @@ CONFIG_OF_SYSTEM_SETUP=y CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; fi;" CONFIG_DEFAULT_FDT_FILE="imx8mm-beacon-kit.dtb" -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/imx8mm_data_modul_edm_sbc_defconfig +0 -1
@@ -41,7 +41,6 @@ CONFIG_CONSOLE_MUX=y CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_LATE_INIT=y -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/imx8mm_evk_defconfig +0 -1
@@ -23,7 +23,6 @@ CONFIG_SPL_LOAD_FIT=y # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOARD_LATE_INIT=y -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/imx8mm_venice_defconfig +0 -1
@@ -31,7 +31,6 @@ CONFIG_OF_SYSTEM_SETUP=y CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="gsc wd-disable" CONFIG_BOARD_LATE_INIT=y -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/kontron-sl-mx8mm_defconfig +0 -1
@@ -27,7 +27,6 @@ CONFIG_SPL_LOAD_FIT=y # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_BOARD_SETUP=y CONFIG_BOARD_TYPES=y -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/phycore-imx8mm_defconfig +0 -1
@@ -26,7 +26,6 @@ CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadimage; then run mmcboot; else run netboot; fi; fi;" CONFIG_DEFAULT_FDT_FILE="oftree" CONFIG_BOARD_LATE_INIT=y -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
configs/verdin-imx8mm_defconfig +0 -1
@@ -32,7 +32,6 @@ CONFIG_LOG=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOARD_LATE_INIT=y -CONFIG_SPL_MAX_SIZE=0x25000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000
Signature · 1 line
2.36.0
PATCH v2 1/53 spl: imx8mm: enlarge SPL_MAX_SIZE
Quoted 7 lines
From: Peng Fan <[email protected]>
TheCONFIG_SPL_MAX_SIZEcould be0x27000for i.MX8MM whenSPL_TEXT_BASEset to0x7E1000.
The DDR firmware max uses 96KB, there is a 4KB padding header beforeSPL_TEXT_BASE, so the SPL MAX SIZE is256KB - 96KB - 4KB.Signed-off-by Peng Fan <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
Re: [PATCH V2 01/53] spl: imx8mm: enlarge SPL_MAX_SIZE
In reply to Peng Fan (OSS)Hi,
Quoted 7 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
The
CONFIG_SPL_MAX_SIZEcould be0x27000for i.MX8MM whenSPL_TEXT_BASEset to0x7E1000.The DDR firmware max uses 96KB, there is a 4KB padding header before
SPL_TEXT_BASE, so the SPL MAX SIZE is256KB - 96KB - 4KB.
Am I right to assume that setting CONFIG_SPL_MAX_SIZE to 0x27000 is more restricting nowadays than it would need to be?
If I understand correctly nowadays the DDR firmware doesn't need a fixed 96 KiB area with padding anymore, but rather takes up only the space it needs (~ 57 KiB) due to "binman magic".
If this is correct, is it safe to increase CONFIG_SPL_MAX_SIZE? Is there a sane default that we could use instead of 0x27000?
Thanks
Frieder
Re: [PATCH V2 01/53] spl: imx8mm: enlarge SPL_MAX_SIZE
Quoted 14 lines · Frieder Schrempf
Hi,
Quoted 7 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
The
CONFIG_SPL_MAX_SIZEcould be0x27000for i.MX8MM whenSPL_TEXT_BASEset to0x7E1000.The DDR firmware max uses 96KB, there is a 4KB padding header before
SPL_TEXT_BASE, so the SPL MAX SIZE is256KB - 96KB - 4KB.Am I right to assume that setting
CONFIG_SPL_MAX_SIZEto0x27000is more restricting nowadays than it would need to be?
Quoted 6 lines
If I understand correctly nowadays the DDR firmware doesn't need a fixed 96 KiB area with padding anymore, but rather takes up only the space it needs (~ 57 KiB) due to "binman magic".
If this is correct, is it safe to increase
CONFIG_SPL_MAX_SIZE? Is there a sane default that we could use instead of0x27000?
With binman to pack images, it is true that the ddr firmware is not that large. The CONFIG_SPL_MAX_SIZE could be enlarged.
I am not sure what default value could be used.
Regards,
Peng.
Quoted 3 lines
Thanks
Frieder
PATCH v2 2/53 arm: makefile: cleanup mach-imx usage
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
All the SoCs use mach-imx has CONFIG_MACH_IMX selected, so the macro could be the gate to build arch/arm/mach-imx to simplify the rules.
--- arch/arm/Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
arch/arm/Makefile +2 -10
@@ -92,6 +92,8 @@ machine-$(CONFIG_ARCH_ZYNQ) += zynq machine-$(CONFIG_ARCH_ZYNQMP) += zynqmp machine-$(CONFIG_ARCH_ZYNQMP_R5) += zynqmp-r5 +machine-$(CONFIG_MACH_IMX) += imx + machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
@@ -110,16 +112,6 @@ libs-y += arch/arm/cpu/$(CPU)/ libs-y += arch/arm/cpu/ libs-y += arch/arm/lib/ -ifeq ($(CONFIG_SPL_BUILD),y) -ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(filter $(SOC), mx25 mx5 mx6 mx7 mx35 imx8m imx8 imx8ulp imxrt)) -libs-y += arch/arm/mach-imx/ -endif -else -ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx7ulp mx31 mx35 mxs imx8m imx8 imx8ulp imxrt vf610)) -libs-y += arch/arm/mach-imx/ -endif -endif - ifneq (,$(filter $(SOC), kirkwood)) libs-y += arch/arm/mach-mvebu/ endif
Signature · 1 line
2.36.0
PATCH v2 2/53 arm: makefile: cleanup mach-imx usage
Quoted 5 lines
From: Peng Fan <[email protected]>
All the SoCs use mach-imx hasCONFIG_MACH_IMXselected, so the macro could be the gate to buildarch/arm/mach-imxto simplify the rules.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 3/53 imx: Change USB boot device type
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
The SPL SDP is configured as BOOT_DEVICE_BOARD, so when booting from USB, change its type to BOOT_DEVICE_BOARD, so we can use SDP.
--- arch/arm/mach-imx/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/spl.c +1 -1
@@ -177,7 +177,7 @@ u32 spl_boot_device(void)case QSPI_BOOT :return BOOT_DEVICE_NOR ;case USB_BOOT : -return BOOT_DEVICE_USB ; +return BOOT_DEVICE_BOARD ;default :return BOOT_DEVICE_NONE ; }
Signature · 1 line
2.36.0
PATCH v2 3/53 imx: Change USB boot device type
Quoted 5 lines
From: Ye Li <[email protected]>
The SPL SDP is configured asBOOT_DEVICE_BOARD, so when booting from USB, change its type toBOOT_DEVICE_BOARD, so we can use SDP.Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 4/53 imx: spl: Allow iMX7/8/8M to overwrite spl_board_boot_device
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Move the default mapping of spl_boot_device to weak function of spl_board_boot_device. So that every board of iMX7/8/8M can overwrite this function to implement specific mapping.
--- arch/arm/mach-imx/spl.c | 80 ++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 42 deletions(-)
arch/arm/mach-imx/spl.c +38 -42
@@ -25,7 +25,43 @@ DECLARE_GLOBAL_DATA_PTR;__weak int spl_board_boot_device (enum boot_device boot_dev_spl) { -return 0 ; +switch (boot_dev_spl) { +#if defined(CONFIG_MX7 ) +case SD1_BOOT : +case MMC1_BOOT : +case SD2_BOOT : +case MMC2_BOOT : +case SD3_BOOT : +case MMC3_BOOT : +return BOOT_DEVICE_MMC1 ; +#elif defined(CONFIG_IMX8 ) +case MMC1_BOOT : +return BOOT_DEVICE_MMC1 ; +case SD2_BOOT : +return BOOT_DEVICE_MMC2_2 ; +case SD3_BOOT : +return BOOT_DEVICE_MMC1 ; +case FLEXSPI_BOOT : +return BOOT_DEVICE_SPI ; +#elif defined(CONFIG_IMX8M ) +case SD1_BOOT : +case MMC1_BOOT : +return BOOT_DEVICE_MMC1 ; +case SD2_BOOT : +case MMC2_BOOT : +return BOOT_DEVICE_MMC2 ; +#endif +case NAND_BOOT : +return BOOT_DEVICE_NAND ; +case SPI_NOR_BOOT : +return BOOT_DEVICE_SPI ; +case QSPI_BOOT : +return BOOT_DEVICE_NOR ; +case USB_BOOT : +return BOOT_DEVICE_BOARD ; +default : +return BOOT_DEVICE_NONE ; + } }#if defined(CONFIG_MX6 )
@@ -140,47 +176,7 @@ u32 spl_boot_device(void)enum boot_device boot_device_spl =get_boot_device (); -if (IS_ENABLED (CONFIG_IMX8MM ) ||IS_ENABLED (CONFIG_IMX8MN ) || -IS_ENABLED (CONFIG_IMX8MP )) -return spl_board_boot_device (boot_device_spl); - -switch (boot_device_spl) { -#if defined(CONFIG_MX7 ) -case SD1_BOOT : -case MMC1_BOOT : -case SD2_BOOT : -case MMC2_BOOT : -case SD3_BOOT : -case MMC3_BOOT : -return BOOT_DEVICE_MMC1 ; -#elif defined(CONFIG_IMX8 ) -case MMC1_BOOT : -return BOOT_DEVICE_MMC1 ; -case SD2_BOOT : -return BOOT_DEVICE_MMC2_2 ; -case SD3_BOOT : -return BOOT_DEVICE_MMC1 ; -case FLEXSPI_BOOT : -return BOOT_DEVICE_SPI ; -#elif defined(CONFIG_IMX8M ) -case SD1_BOOT : -case MMC1_BOOT : -return BOOT_DEVICE_MMC1 ; -case SD2_BOOT : -case MMC2_BOOT : -return BOOT_DEVICE_MMC2 ; -#endif -case NAND_BOOT : -return BOOT_DEVICE_NAND ; -case SPI_NOR_BOOT : -return BOOT_DEVICE_SPI ; -case QSPI_BOOT : -return BOOT_DEVICE_NOR ; -case USB_BOOT : -return BOOT_DEVICE_BOARD ; -default : -return BOOT_DEVICE_NONE ; - } + return spl_board_boot_device(boot_device_spl); }#endif /* CONFIG_MX7 || CONFIG_IMX8M || CONFIG_IMX8 */
Signature · 1 line
2.36.0
PATCH v2 4/53 imx: spl: Allow iMX7/8/8M to overwrite spl_board_boot_device
Quoted 7 lines
From: Ye Li <[email protected]>
Move the default mapping ofspl_boot_deviceto weak function ofspl_board_boot_device. So that every board of iMX7/8/8M can overwrite this function to implement specific mapping.Reviewed-by Peng Fan <[email protected]>Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 5/53 imx: simplify dependency with SPL_BOOTROM_SUPPORT
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
For SoCs support ROM API, CONFIG_SPL_BOOTROM_SUPPORT is needed, so use this macro to guard the code to avoid extend the list.
And drop the guard with structure definition, there is no need.
--- arch/arm/include/asm/mach-imx/sys_proto.h | 3 --- arch/arm/mach-imx/Kconfig | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-)
arch/arm/include/asm/mach-imx/sys_proto.h +0 -3
@@ -146,7 +146,6 @@ struct rproc_att {u32 size;/* size of reg range */ }; -#if defined(CONFIG_IMX8_ROMAPI)struct rom_api {u16 ver;u16 tag;
@@ -182,8 +181,6 @@ extern struct rom_api *g_rom_api;u32 rom_api_download_image (u8 *dest,u32 offset,u32 size);u32 rom_api_query_boot_infor (u32 info_type,u32 *info); -#endif -/* For i.MX ULP */ #define BT0CFG_LPBOOT_MASK 0x1#define BT0CFG_DUALBOOT_MASK 0x2
arch/arm/mach-imx/Kconfig +2 -1
@@ -170,7 +170,8 @@ config IMX8_ROMAPI config SPL_IMX_ROMAPI_LOADADDR hex "Default load address to load image through ROM API" - depends on IMX8_ROMAPI + depends on IMX8_ROMAPI || SPL_BOOTROM_SUPPORT + default 0 config IMX_DCD_ADDR hex "DCD Blocks location on the image"
Signature · 1 line
2.36.0
PATCH v2 5/53 imx: simplify dependency with SPL_BOOTROM_SUPPORT
Quoted 5 lines
From: Peng Fan <[email protected]>
For SoCs support ROM API,CONFIG_SPL_BOOTROM_SUPPORTis needed, so use this macro to guard the code to avoid extend the list. And drop the guard with structure definition, there is no need.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 6/53 imx: move get_boot_device to common header
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Most i.MX implements get_boot_device, move it to common header to simplify code
--- arch/arm/include/asm/arch-imx8/sys_proto.h | 1 - arch/arm/include/asm/arch-imx8m/sys_proto.h | 1 - arch/arm/include/asm/arch-imx8ulp/sys_proto.h | 1 - arch/arm/include/asm/arch-mx7/sys_proto.h | 1 - arch/arm/include/asm/arch-mx7ulp/sys_proto.h | 1 - arch/arm/include/asm/mach-imx/sys_proto.h | 2 ++ 6 files changed, 2 insertions(+), 5 deletions(-)
arch/arm/include/asm/arch-imx8/sys_proto.h +0 -1
@@ -23,7 +23,6 @@ struct pass_over_info_t {extern unsigned long boot_pointer[];void build_info (void ); -enum boot_device get_boot_device (void );int print_bootinfo (void );int sc_pm_setup_uart (sc_rsrc_t uart_rsrc,sc_pm_clock_rate_t clk_rate); int imx8_power_domain_lookup_name(const char *name,
arch/arm/include/asm/arch-imx8m/sys_proto.h +0 -1
@@ -12,6 +12,5 @@ void set_wdog_reset(struct wdog_regs *wdog);void enable_tzc380 (void );void restore_boot_params (void );extern unsigned long rom_pointer[]; -enum boot_device get_boot_device (void );bool is_usb_boot (void );#endif
arch/arm/include/asm/arch-imx8ulp/sys_proto.h +0 -1
@@ -15,7 +15,6 @@ ulong spl_romapi_get_uboot_base(u32 image_offset, u32 rom_bt_dev);enum bt_mode get_boot_mode (void );int xrdc_config_pdac (u32 bridge,u32 index,u32 dom,u32 perm);int xrdc_config_pdac_openacc (u32 bridge,u32 index); -enum boot_device get_boot_device (void );void set_lpav_qos (void );void load_lposc_fuse (void );bool m33_image_booted (void );
arch/arm/include/asm/arch-mx7/sys_proto.h +0 -1
@@ -8,6 +8,5 @@#include <asm/mach-imx/sys_proto.h> void set_wdog_reset (struct wdog_regs *wdog); -enum boot_device get_boot_device (void );#endif /* __SYS_PROTO_IMX7_ */
arch/arm/include/asm/arch-mx7ulp/sys_proto.h +0 -1
@@ -8,5 +8,4 @@#include <asm/mach-imx/sys_proto.h> -enum boot_device get_boot_device (void );#endif
arch/arm/include/asm/mach-imx/sys_proto.h +2 -0
@@ -246,4 +246,6 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);void enable_ca7_smp (void );#endif +enum boot_device get_boot_device (void ); +#endif
Signature · 1 line
2.36.0
PATCH v2 6/53 imx: move get_boot_device to common header
Quoted 4 lines
From: Peng Fan <[email protected]>
Most i.MX implementsget_boot_device, move it to common header to simplify codeSigned-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 7/53 imx: move get_boot_device to common file
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
i.MX8MN/P/ULP supports ROM API, they have almost same get_boot_device implementation, so move to a common file. And when support i.MX9, no need to include the other function copy.
Since sys_proto.h is included in imx_romapi.c, there will be build warning for i.MX8M because wdog_regs not defined, so include imx-regs.h in i.MX8M sys_proro.h
--- arch/arm/include/asm/arch-imx8m/sys_proto.h | 1 + arch/arm/mach-imx/Makefile | 1 + arch/arm/mach-imx/imx8m/soc.c | 44 ------------------- arch/arm/mach-imx/imx8ulp/soc.c | 41 ------------------ arch/arm/mach-imx/romapi.c | 47 +++++++++++++++++++++ 5 files changed, 49 insertions(+), 85 deletions(-)
arch/arm/include/asm/arch-imx8m/sys_proto.h +1 -0
@@ -7,6 +7,7 @@#define __ARCH_NMX8M_SYS_PROTO_H#include <asm/mach-imx/sys_proto.h> +#include <asm/arch/imx-regs.h> void set_wdog_reset (struct wdog_regs *wdog);void enable_tzc380 (void );
arch/arm/mach-imx/Makefile +1 -0
@@ -242,5 +242,6 @@ obj-$(CONFIG_IMX8M) += imx8m/ obj-$(CONFIG_ARCH_IMX8) += imx8/ obj-$(CONFIG_ARCH_IMXRT) += imxrt/ +obj-$(CONFIG_IMX8MN)$(CONFIG_IMX8MP)$(CONFIG_IMX8ULP) += imx_romapi.o obj-$(CONFIG_SPL_BOOTROM_SUPPORT) += spl_imx_romapi.o obj-$(CONFIG_IMX8_ROMAPI) += romapi.o
arch/arm/mach-imx/imx8m/soc.c +0 -44
50 lines not on this page · raw message
arch/arm/mach-imx/imx8ulp/soc.c +0 -41
47 lines not on this page · raw message
arch/arm/mach-imx/romapi.c +47 -0
56 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 7/53 imx: move get_boot_device to common file
Quoted 8 lines
From: Peng Fan <[email protected]>
i.MX8MN/P/ULP supports ROM API, they have almost sameget_boot_deviceimplementation, so move to a common file. And when support i.MX9, no need to include the other function copy.
Sincesys_proto.his included inimx_romapi.c, there will be build warning for i.MX8M becausewdog_regsnot defined, so includeimx-regs.hin i.MX8Msys_proro.hSigned-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 8/53 imx: add USB2_BOOT type
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add USB2_BOOT type for i.MX8ULP and i.MX9
--- arch/arm/include/asm/mach-imx/boot_mode.h | 1 + arch/arm/mach-imx/romapi.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/include/asm/mach-imx/boot_mode.h +1 -0
@@ -29,6 +29,7 @@ enum boot_device {QSPI_BOOT ,FLEXSPI_BOOT ,USB_BOOT , +USB2_BOOT ,UNKNOWN_BOOT , BOOT_DEV_NUM = UNKNOWN_BOOT, };
arch/arm/mach-imx/romapi.c +1 -1
@@ -67,7 +67,7 @@ enum boot_device get_boot_device(void) boot_dev =QSPI_BOOT ;break ;case BT_DEV_TYPE_USB : - boot_dev =USB_BOOT ; + boot_dev = boot_instance +USB_BOOT ;break ;default :break ;
Signature · 1 line
2.36.0
PATCH v2 8/53 imx: add USB2_BOOT type
Quoted 3 lines
From: Peng Fan <[email protected]>
AddUSB2_BOOTtype for i.MX8ULP and i.MX9Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 9/53 imx: add basic i.MX9 support
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add i.MX9 Kconfig and basic files for the new SoC
--- arch/arm/Kconfig | 11 + arch/arm/include/asm/arch-imx/cpu.h | 2 + arch/arm/include/asm/arch-imx9/clock.h | 0 arch/arm/include/asm/arch-imx9/gpio.h | 0 arch/arm/include/asm/arch-imx9/imx-regs.h | 13 + arch/arm/include/asm/arch-imx9/imx93_pins.h | 729 ++++++++++++++++++++ arch/arm/include/asm/arch-imx9/sys_proto.h | 11 + arch/arm/include/asm/mach-imx/iomux-v3.h | 11 +- arch/arm/include/asm/mach-imx/sys_proto.h | 3 + arch/arm/mach-imx/Kconfig | 2 +- arch/arm/mach-imx/Makefile | 10 +- arch/arm/mach-imx/imx9/Kconfig | 17 + arch/arm/mach-imx/imx9/Makefile | 6 + arch/arm/mach-imx/imx9/clock.c | 27 + arch/arm/mach-imx/imx9/lowlevel_init.S | 26 + arch/arm/mach-imx/imx9/soc.c | 127 ++++ arch/arm/mach-imx/spl.c | 2 +- 17 files changed, 991 insertions(+), 6 deletions(-) create mode 100644 arch/arm/include/asm/arch-imx9/clock.h create mode 100644 arch/arm/include/asm/arch-imx9/gpio.h create mode 100644 arch/arm/include/asm/arch-imx9/imx-regs.h create mode 100644 arch/arm/include/asm/arch-imx9/imx93_pins.h create mode 100644 arch/arm/include/asm/arch-imx9/sys_proto.h create mode 100644 arch/arm/mach-imx/imx9/Kconfig create mode 100644 arch/arm/mach-imx/imx9/Makefile create mode 100644 arch/arm/mach-imx/imx9/clock.c create mode 100644 arch/arm/mach-imx/imx9/lowlevel_init.S create mode 100644 arch/arm/mach-imx/imx9/soc.c
arch/arm/Kconfig +11 -0
@@ -908,6 +908,15 @@ config ARCH_IMX8ULP imply CMD_DM imply DM_EVENT +config ARCH_IMX9 + bool "NXP i.MX9 platform" + select ARM64 + select DM + select MACH_IMX + select SUPPORT_SPL + imply CMD_DM + imply DM_EVENT + config ARCH_IMXRT bool "NXP i.MXRT platform" select CPU_V7M
@@ -2228,6 +2237,8 @@ source "arch/arm/mach-imx/imx8m/Kconfig" source "arch/arm/mach-imx/imx8ulp/Kconfig" +source "arch/arm/mach-imx/imx9/Kconfig" + source "arch/arm/mach-imx/imxrt/Kconfig" source "arch/arm/mach-imx/mxs/Kconfig"
arch/arm/include/asm/arch-imx/cpu.h +2 -0
@@ -59,6 +59,7 @@#define MXC_CPU_MX7ULP 0xE1/* Temporally hard code */ #define MXC_CPU_VF610 0xF6/* dummy ID */ +#define MXC_CPU_IMX93 0xC1/* dummy ID */ #define MXC_SOC_MX6 0x60#define MXC_SOC_MX7 0x70
@@ -66,6 +67,7 @@#define MXC_SOC_IMX8 0x90/* dummy */ #define MXC_SOC_IMXRT 0xB0/* dummy */ #define MXC_SOC_MX7ULP 0xE0/* dummy */ +#define MXC_SOC_IMX9 0xC0/* dummy */ #define CHIP_REV_1_0 0x10#define CHIP_REV_1_1 0x11
arch/arm/include/asm/arch-imx9/clock.h new file +0 -0
arch/arm/include/asm/arch-imx9/gpio.h new file +0 -0
arch/arm/include/asm/arch-imx9/imx-regs.h new file +13 -0
@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2022 NXP +*/ + +#ifndef __ASM_ARCH_IMX9_REGS_H__ +#define __ASM_ARCH_IMX9_REGS_H__ + +#define ARCH_MXC + +#define IOMUXC_BASE_ADDR 0x443C0000UL + +#endif
arch/arm/include/asm/arch-imx9/imx93_pins.h new file +729 -0
729 lines not on this page · raw message
arch/arm/include/asm/arch-imx9/sys_proto.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2022 NXP +*/ + +#ifndef __ARCH_IMX9_SYS_PROTO_H +#define __ARCH_NMX9_SYS_PROTO_H + +#include <asm/mach-imx/sys_proto.h> + +#endif
arch/arm/include/asm/mach-imx/iomux-v3.h +10 -1
@@ -86,7 +86,16 @@ typedef u64 iomux_v3_cfg_t;#define IOMUX_CONFIG_LPSR 0x20#define MUX_MODE_LPSR ((iomux_v3_cfg_t)IOMUX_CONFIG_LPSR << \ MUX_MODE_SHIFT) -#ifdef CONFIG_IMX8M +#ifdef CONFIG_IMX93 +#define PAD_CTL_FSEL2 (0x2 << 7) +#define PAD_CTL_FSEL3 (0x3 << 7) +#define PAD_CTL_PUE (0x1 << 9) +#define PAD_CTL_PDE (0x1 << 10) +#define PAD_CTL_ODE (0x1 << 11) +#define PAD_CTL_HYS (0x1 << 12) +#define PAD_CTL_DSE (x) (((x) << 1) & 0x7f) + +#elif defined(CONFIG_IMX8M )#define PAD_CTL_FSEL0 (0x0 << 3)#define PAD_CTL_FSEL1 (0x1 << 3)#define PAD_CTL_FSEL2 (0x2 << 3)
arch/arm/include/asm/mach-imx/sys_proto.h +3 -0
@@ -31,6 +31,7 @@ struct bd_info;#define is_mx7 () (is_soc_type(MXC_SOC_MX7))#define is_imx8m () (is_soc_type(MXC_SOC_IMX8M))#define is_imx8 () (is_soc_type(MXC_SOC_IMX8)) +#define is_imx9 () (is_soc_type(MXC_SOC_IMX9))#define is_imxrt () (is_soc_type(MXC_SOC_IMXRT))#define is_mx6dqp () (is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP))
@@ -81,6 +82,8 @@ struct bd_info;#define is_imx8qxp () (is_cpu_type(MXC_CPU_IMX8QXP)) +#define is_imx93 () (is_cpu_type(MXC_CPU_IMX93)) +#define is_imxrt1020 () (is_cpu_type(MXC_CPU_IMXRT1020))#define is_imxrt1050 () (is_cpu_type(MXC_CPU_IMXRT1050))
arch/arm/mach-imx/Kconfig +1 -1
@@ -166,7 +166,7 @@ config DDRMC_VF610_CALIBRATION config IMX8_ROMAPI def_bool y - depends on IMX8MN || IMX8MP || IMX8ULP + depends on IMX8MN || IMX8MP || IMX8ULP || IMX9 config SPL_IMX_ROMAPI_LOADADDR hex "Default load address to load image through ROM API"
arch/arm/mach-imx/Makefile +7 -3
@@ -5,7 +5,7 @@ # # (C) Copyright 2011 Freescale Semiconductor, Inc. -ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 mx7 imx8m vf610)) +ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 mx7 imx8m imx9 vf610)) obj-y = iomux-v3.o endif
@@ -29,7 +29,7 @@ endif obj-$(CONFIG_GPT_TIMER) += timer.o obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o endif -ifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs imx8m imx8 imxrt)) +ifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs imx8m imx8 imx9 imxrt)) obj-y += misc.o obj-$(CONFIG_CMD_PRIBLOB) += priblob.o obj-$(CONFIG_SPL_BUILD) += spl.o
@@ -195,6 +195,10 @@ flash.bin: spl/u-boot-spl.bin FORCE endif endif +ifeq ($(CONFIG_ARCH_IMX9), y) +SPL: +endif + else MKIMAGEFLAGS_SPL = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \ -T $(IMAGE_TYPE) -e $(CONFIG_SPL_TEXT_BASE)
@@ -240,8 +244,8 @@ obj-$(CONFIG_ARCH_MX7ULP) += mx7ulp/ obj-$(CONFIG_ARCH_IMX8ULP) += imx8ulp/ obj-$(CONFIG_IMX8M) += imx8m/ obj-$(CONFIG_ARCH_IMX8) += imx8/ +obj-$(CONFIG_ARCH_IMX9) += imx9/ obj-$(CONFIG_ARCH_IMXRT) += imxrt/ -obj-$(CONFIG_IMX8MN)$(CONFIG_IMX8MP)$(CONFIG_IMX8ULP) += imx_romapi.o obj-$(CONFIG_SPL_BOOTROM_SUPPORT) += spl_imx_romapi.o obj-$(CONFIG_IMX8_ROMAPI) += romapi.o
arch/arm/mach-imx/imx9/Kconfig new file +17 -0
@@ -0,0 +1,17 @@ +if ARCH_IMX9 + +config IMX9 + bool + select HAS_CAAM + select ROM_UNIFIED_SECTIONS + +config IMX93 + bool + select IMX9 + select ARMV8_SPL_EXCEPTION_VECTORS + +config SYS_SOC + default "imx9" + +endif +
arch/arm/mach-imx/imx9/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright 2022 NXP + +obj-y += lowlevel_init.o +obj-y += soc.o clock.o
arch/arm/mach-imx/imx9/clock.c new file +27 -0
@@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2022 NXP +* +* Peng Fan <[email protected]> +*/ + +#include <common.h> +#include <command.h> +#include <asm/arch/clock.h> +#include <asm/arch/imx-regs.h> +#include <asm/arch/sys_proto.h> +#include <asm/global_data.h> +#include <asm/io.h> +#include <div64.h> +#include <errno.h> +#include <linux/bitops.h> +#include <linux/delay.h> +#include <log.h> + +DECLARE_GLOBAL_DATA_PTR ; + +u32 get_lpuart_clk (void ) +{ +return 24000000 ; +} +
arch/arm/mach-imx/imx9/lowlevel_init.S new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2022 NXP + */ + +#include <config.h> + +.align 8 +.global rom_pointer +rom_pointer: + .space 256 + +/* + * Routine: save_boot_params (called after reset from start.S) + */ + +.global save_boot_params +save_boot_params: +#ifndef CONFIG_SPL_BUILD + /* The firmware provided ATAG/FDT address can be found in r2/x0 */ + adr x0, rom_pointer + stp x1, x2, [x0], #16 + stp x3, x4, [x0], #16 +#endif + /* Returns */ + b save_boot_params_ret
arch/arm/mach-imx/imx9/soc.c new file +127 -0
127 lines not on this page · raw message
arch/arm/mach-imx/spl.c +1 -1
@@ -147,7 +147,7 @@ u32 spl_boot_device(void) return BOOT_DEVICE_NONE; } -#elif defined(CONFIG_MX7) || defined(CONFIG_IMX8M) || defined(CONFIG_IMX8) +#elif defined(CONFIG_MX7) || defined(CONFIG_IMX8M) || defined(CONFIG_IMX8) || defined(CONFIG_IMX9)/* Translate iMX7/i.MX8M boot device to the SPL boot device enumeration */ u32 spl_boot_device (void ) {
Signature · 1 line
2.36.0
PATCH v2 9/53 imx: add basic i.MX9 support
Quoted 3 lines
From: Peng Fan <[email protected]>
Add i.MX9Kconfigand basic files for the new SoCSigned-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 10/53 fsl_lpuart: add i.MX9 support
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
i.MX9 shares same register layout as i.MX7ULP, so
add the i.MX9 define here.
--- include/fsl_lpuart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/fsl_lpuart.h +1 -1
@@ -5,7 +5,7 @@*/ #if defined(CONFIG_ARCH_MX7ULP) || defined(CONFIG_ARCH_IMX8) || \ - defined(CONFIG_ARCH_IMXRT) || defined(CONFIG_ARCH_IMX8ULP) + defined(CONFIG_ARCH_IMXRT) || defined(CONFIG_ARCH_IMX8ULP) || defined(CONFIG_ARCH_IMX9) struct lpuart_fsl_reg32 { u32 verid; u32 param;
Signature · 1 line
2.36.0
PATCH v2 10/53 fsl_lpuart: add i.MX9 support
Quoted 4 lines
From: Peng Fan <[email protected]>
i.MX9 shares same register layout as i.MX7ULP, so
add the i.MX9 define here.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 11/53 gpio: pca953x: support pcal6524
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Support pcal6524 IO expander driver
--- drivers/gpio/pca953x_gpio.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpio/pca953x_gpio.c +4 -0
@@ -43,6 +43,8 @@#define PCA_GPIO_MASK 0x00FF#define PCA_INT 0x0100 +#define PCA_PCAL BIT(9) +#define PCA_LATCH_INT (PCA_PCAL | PCA_INT)#define PCA953X_TYPE 0x1000#define PCA957X_TYPE 0x2000#define PCA_TYPE_MASK 0xF000
@@ -393,6 +395,8 @@ static const struct udevice_id pca953x_ids[] = { { .compatible = "nxp,pca9575", .data = OF_957X(16, PCA_INT), }, { .compatible = "nxp,pca9698", .data = OF_953X(40, 0), }, + { .compatible = "nxp,pcal6524", .data = OF_953X(24, PCA_LATCH_INT), }, + { .compatible = "maxim,max7310", .data = OF_953X(8, 0), }, { .compatible = "maxim,max7312", .data = OF_953X(16, PCA_INT), }, { .compatible = "maxim,max7313", .data = OF_953X(16, PCA_INT), },
Signature · 1 line
2.36.0
PATCH v2 11/53 gpio: pca953x: support pcal6524
Quoted 3 lines
From: Peng Fan <[email protected]>
Support pcal6524 IO expander driverSigned-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 12/53 imx: pinctrl: add pinctrl and pinfunc file for i.MX93
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add the pinctrl driver and pinfunc header file to support iMX93
--- arch/arm/dts/imx93-pinfunc.h | 625 ++++++++++++++++++++++++++++ drivers/pinctrl/nxp/Kconfig | 13 + drivers/pinctrl/nxp/Makefile | 1 + drivers/pinctrl/nxp/pinctrl-imx93.c | 37 ++ 4 files changed, 676 insertions(+) create mode 100644 arch/arm/dts/imx93-pinfunc.h create mode 100644 drivers/pinctrl/nxp/pinctrl-imx93.c
arch/arm/dts/imx93-pinfunc.h new file +625 -0
@@ -0,0 +1,625 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2022 NXP +*/ + +#ifndef __DTS_IMX93_PINFUNC_H +#define __DTS_IMX93_PINFUNC_H + +/* +* The pin function ID is a tuple of +* <mux_reg conf_reg input_reg mux_mode input_val> +*/ +#define MX93_PAD_DAP_TDI__JTAG_MUX_TDI 0x0000 0x01B0 0x03E0 0x0 0x0 +#define MX93_PAD_DAP_TDI__MQS2_LEFT 0x0000 0x01B0 0x0000 0x1 0x0 +#define MX93_PAD_DAP_TDI__CAN2_TX 0x0000 0x01B0 0x0000 0x3 0x0 +#define MX93_PAD_DAP_TDI__FLEXIO2_FLEXIO30 0x0000 0x01B0 0x0000 0x4 0x0 +#define MX93_PAD_DAP_TDI__GPIO3_IO28 0x0000 0x01B0 0x03CC 0x5 0x0 +#define MX93_PAD_DAP_TDI__LPUART5_RX 0x0000 0x01B0 0x0438 0x6 0x0 +#define MX93_PAD_DAP_TMS_SWDIO__JTAG_MUX_TMS 0x0004 0x01B4 0x03E4 0x0 0x0 +#define MX93_PAD_DAP_TMS_SWDIO__FLEXIO2_FLEXIO31 0x0004 0x01B4 0x0000 0x4 0x0 +#define MX93_PAD_DAP_TMS_SWDIO__GPIO3_IO29 0x0004 0x01B4 0x03D0 0x5 0x0 +#define MX93_PAD_DAP_TMS_SWDIO__LPUART5_RTS_B 0x0004 0x01B4 0x0000 0x6 0x0 +#define MX93_PAD_DAP_TCLK_SWCLK__JTAG_MUX_TCK 0x0008 0x01B8 0x03DC 0x0 0x0 +#define MX93_PAD_DAP_TCLK_SWCLK__FLEXIO1_FLEXIO30 0x0008 0x01B8 0x0000 0x4 0x0 +#define MX93_PAD_DAP_TCLK_SWCLK__GPIO3_IO30 0x0008 0x01B8 0x0000 0x5 0x0 +#define MX93_PAD_DAP_TCLK_SWCLK__LPUART5_CTS_B 0x0008 0x01B8 0x0434 0x6 0x0 +#define MX93_PAD_DAP_TDO_TRACESWO__JTAG_MUX_TDO 0x000C 0x01BC 0x0000 0x0 0x0 +#define MX93_PAD_DAP_TDO_TRACESWO__MQS2_RIGHT 0x000C 0x01BC 0x0000 0x1 0x0 +#define MX93_PAD_DAP_TDO_TRACESWO__CAN2_RX 0x000C 0x01BC 0x0364 0x3 0x0 +#define MX93_PAD_DAP_TDO_TRACESWO__FLEXIO1_FLEXIO31 0x000C 0x01BC 0x0000 0x4 0x0 +#define MX93_PAD_DAP_TDO_TRACESWO__GPIO3_IO31 0x000C 0x01BC 0x0000 0x5 0x0 +#define MX93_PAD_DAP_TDO_TRACESWO__LPUART5_TX 0x000C 0x01BC 0x043C 0x6 0x0 +#define MX93_PAD_GPIO_IO00__GPIO2_IO00 0x0010 0x01C0 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO00__LPI2C3_SDA 0x0010 0x01C0 0x03EC 0x1 0x0 +#define MX93_PAD_GPIO_IO00__MEDIAMIX_CAM_CLK 0x0010 0x01C0 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO00__MEDIAMIX_DISP_CLK 0x0010 0x01C0 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO00__LPSPI6_PCS0 0x0010 0x01C0 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO00__LPUART5_TX 0x0010 0x01C0 0x043C 0x5 0x1 +#define MX93_PAD_GPIO_IO00__LPI2C5_SDA 0x0010 0x01C0 0x03F4 0x6 0x0 +#define MX93_PAD_GPIO_IO00__FLEXIO1_FLEXIO00 0x0010 0x01C0 0x036C 0x7 0x0 +#define MX93_PAD_GPIO_IO01__GPIO2_IO01 0x0014 0x01C4 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO01__LPI2C3_SCL 0x0014 0x01C4 0x03E8 0x1 0x0 +#define MX93_PAD_GPIO_IO01__MEDIAMIX_CAM_DATA00 0x0014 0x01C4 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO01__MEDIAMIX_DISP_DE 0x0014 0x01C4 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO01__LPSPI6_SIN 0x0014 0x01C4 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO01__LPUART5_RX 0x0014 0x01C4 0x0438 0x5 0x1 +#define MX93_PAD_GPIO_IO01__LPI2C5_SCL 0x0014 0x01C4 0x03F0 0x6 0x0 +#define MX93_PAD_GPIO_IO01__FLEXIO1_FLEXIO01 0x0014 0x01C4 0x0370 0x7 0x0 +#define MX93_PAD_GPIO_IO02__GPIO2_IO02 0x0018 0x01C8 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO02__LPI2C4_SDA 0x0018 0x01C8 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO02__MEDIAMIX_CAM_VSYNC 0x0018 0x01C8 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO02__MEDIAMIX_DISP_VSYNC 0x0018 0x01C8 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO02__LPSPI6_SOUT 0x0018 0x01C8 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO02__LPUART5_CTS_B 0x0018 0x01C8 0x0434 0x5 0x1 +#define MX93_PAD_GPIO_IO02__LPI2C6_SDA 0x0018 0x01C8 0x03FC 0x6 0x0 +#define MX93_PAD_GPIO_IO02__FLEXIO1_FLEXIO02 0x0018 0x01C8 0x0374 0x7 0x0 +#define MX93_PAD_GPIO_IO03__GPIO2_IO03 0x001C 0x01CC 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO03__LPI2C4_SCL 0x001C 0x01CC 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO03__MEDIAMIX_CAM_HSYNC 0x001C 0x01CC 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO03__MEDIAMIX_DISP_HSYNC 0x001C 0x01CC 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO03__LPSPI6_SCK 0x001C 0x01CC 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO03__LPUART5_RTS_B 0x001C 0x01CC 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO03__LPI2C6_SCL 0x001C 0x01CC 0x03F8 0x6 0x0 +#define MX93_PAD_GPIO_IO03__FLEXIO1_FLEXIO03 0x001C 0x01CC 0x0378 0x7 0x0 +#define MX93_PAD_GPIO_IO04__GPIO2_IO04 0x0020 0x01D0 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO04__TPM3_CH0 0x0020 0x01D0 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO04__PDM_CLK 0x0020 0x01D0 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO04__MEDIAMIX_DISP_DATA00 0x0020 0x01D0 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO04__LPSPI7_PCS0 0x0020 0x01D0 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO04__LPUART6_TX 0x0020 0x01D0 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO04__LPI2C6_SDA 0x0020 0x01D0 0x03FC 0x6 0x1 +#define MX93_PAD_GPIO_IO04__FLEXIO1_FLEXIO04 0x0020 0x01D0 0x037C 0x7 0x0 +#define MX93_PAD_GPIO_IO05__GPIO2_IO05 0x0024 0x01D4 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO05__TPM4_CH0 0x0024 0x01D4 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO05__PDM_BIT_STREAM00 0x0024 0x01D4 0x0440 0x2 0x0 +#define MX93_PAD_GPIO_IO05__MEDIAMIX_DISP_DATA01 0x0024 0x01D4 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO05__LPSPI7_SIN 0x0024 0x01D4 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO05__LPUART6_RX 0x0024 0x01D4 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO05__LPI2C6_SCL 0x0024 0x01D4 0x03F8 0x6 0x1 +#define MX93_PAD_GPIO_IO05__FLEXIO1_FLEXIO05 0x0024 0x01D4 0x0380 0x7 0x0 +#define MX93_PAD_GPIO_IO06__GPIO2_IO06 0x0028 0x01D8 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO06__TPM5_CH0 0x0028 0x01D8 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO06__PDM_BIT_STREAM01 0x0028 0x01D8 0x0444 0x2 0x0 +#define MX93_PAD_GPIO_IO06__MEDIAMIX_DISP_DATA02 0x0028 0x01D8 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO06__LPSPI7_SOUT 0x0028 0x01D8 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO06__LPUART6_CTS_B 0x0028 0x01D8 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO06__LPI2C7_SDA 0x0028 0x01D8 0x0404 0x6 0x0 +#define MX93_PAD_GPIO_IO06__FLEXIO1_FLEXIO06 0x0028 0x01D8 0x0384 0x7 0x0 +#define MX93_PAD_GPIO_IO07__GPIO2_IO07 0x002C 0x01DC 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO07__LPSPI3_PCS1 0x002C 0x01DC 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO07__MEDIAMIX_CAM_DATA01 0x002C 0x01DC 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO07__MEDIAMIX_DISP_DATA03 0x002C 0x01DC 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO07__LPSPI7_SCK 0x002C 0x01DC 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO07__LPUART6_RTS_B 0x002C 0x01DC 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO07__LPI2C7_SCL 0x002C 0x01DC 0x0400 0x6 0x0 +#define MX93_PAD_GPIO_IO07__FLEXIO1_FLEXIO07 0x002C 0x01DC 0x0388 0x7 0x0 +#define MX93_PAD_GPIO_IO08__GPIO2_IO08 0x0030 0x01E0 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO08__LPSPI3_PCS0 0x0030 0x01E0 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO08__MEDIAMIX_CAM_DATA02 0x0030 0x01E0 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO08__MEDIAMIX_DISP_DATA04 0x0030 0x01E0 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO08__TPM6_CH0 0x0030 0x01E0 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO08__LPUART7_TX 0x0030 0x01E0 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO08__LPI2C7_SDA 0x0030 0x01E0 0x0404 0x6 0x1 +#define MX93_PAD_GPIO_IO08__FLEXIO1_FLEXIO08 0x0030 0x01E0 0x038C 0x7 0x0 +#define MX93_PAD_GPIO_IO09__GPIO2_IO09 0x0034 0x01E4 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO09__LPSPI3_SIN 0x0034 0x01E4 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO09__MEDIAMIX_CAM_DATA03 0x0034 0x01E4 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO09__MEDIAMIX_DISP_DATA05 0x0034 0x01E4 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO09__TPM3_EXTCLK 0x0034 0x01E4 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO09__LPUART7_RX 0x0034 0x01E4 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO09__LPI2C7_SCL 0x0034 0x01E4 0x0400 0x6 0x1 +#define MX93_PAD_GPIO_IO09__FLEXIO1_FLEXIO09 0x0034 0x01E4 0x0390 0x7 0x0 +#define MX93_PAD_GPIO_IO10__GPIO2_IO10 0x0038 0x01E8 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO10__LPSPI3_SOUT 0x0038 0x01E8 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO10__MEDIAMIX_CAM_DATA04 0x0038 0x01E8 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO10__MEDIAMIX_DISP_DATA06 0x0038 0x01E8 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO10__TPM4_EXTCLK 0x0038 0x01E8 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO10__LPUART7_CTS_B 0x0038 0x01E8 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO10__LPI2C8_SDA 0x0038 0x01E8 0x040C 0x6 0x0 +#define MX93_PAD_GPIO_IO10__FLEXIO1_FLEXIO10 0x0038 0x01E8 0x0394 0x7 0x0 +#define MX93_PAD_GPIO_IO11__GPIO2_IO11 0x003C 0x01EC 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO11__LPSPI3_SCK 0x003C 0x01EC 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO11__MEDIAMIX_CAM_DATA05 0x003C 0x01EC 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO11__MEDIAMIX_DISP_DATA07 0x003C 0x01EC 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO11__TPM5_EXTCLK 0x003C 0x01EC 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO11__LPUART7_RTS_B 0x003C 0x01EC 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO11__LPI2C8_SCL 0x003C 0x01EC 0x0408 0x6 0x0 +#define MX93_PAD_GPIO_IO11__FLEXIO1_FLEXIO11 0x003C 0x01EC 0x0398 0x7 0x0 +#define MX93_PAD_GPIO_IO12__GPIO2_IO12 0x0040 0x01F0 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO12__TPM3_CH2 0x0040 0x01F0 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO12__PDM_BIT_STREAM02 0x0040 0x01F0 0x0448 0x2 0x0 +#define MX93_PAD_GPIO_IO12__MEDIAMIX_DISP_DATA08 0x0040 0x01F0 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO12__LPSPI8_PCS0 0x0040 0x01F0 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO12__LPUART8_TX 0x0040 0x01F0 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO12__LPI2C8_SDA 0x0040 0x01F0 0x040C 0x6 0x1 +#define MX93_PAD_GPIO_IO12__SAI3_RX_SYNC 0x0040 0x01F0 0x0458 0x7 0x0 +#define MX93_PAD_GPIO_IO13__GPIO2_IO13 0x0044 0x01F4 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO13__TPM4_CH2 0x0044 0x01F4 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO13__PDM_BIT_STREAM03 0x0044 0x01F4 0x044C 0x2 0x0 +#define MX93_PAD_GPIO_IO13__MEDIAMIX_DISP_DATA09 0x0044 0x01F4 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO13__LPSPI8_SIN 0x0044 0x01F4 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO13__LPUART8_RX 0x0044 0x01F4 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO13__LPI2C8_SCL 0x0044 0x01F4 0x0408 0x6 0x1 +#define MX93_PAD_GPIO_IO13__FLEXIO1_FLEXIO13 0x0044 0x01F4 0x039C 0x7 0x0 +#define MX93_PAD_GPIO_IO14__GPIO2_IO14 0x0048 0x01F8 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO14__LPUART3_TX 0x0048 0x01F8 0x0424 0x1 0x0 +#define MX93_PAD_GPIO_IO14__MEDIAMIX_CAM_DATA06 0x0048 0x01F8 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO14__MEDIAMIX_DISP_DATA10 0x0048 0x01F8 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO14__LPSPI8_SOUT 0x0048 0x01F8 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO14__LPUART8_CTS_B 0x0048 0x01F8 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO14__LPUART4_TX 0x0048 0x01F8 0x0430 0x6 0x0 +#define MX93_PAD_GPIO_IO14__FLEXIO1_FLEXIO14 0x0048 0x01F8 0x03A0 0x7 0x0 +#define MX93_PAD_GPIO_IO15__GPIO2_IO15 0x004C 0x01FC 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO15__LPUART3_RX 0x004C 0x01FC 0x0420 0x1 0x0 +#define MX93_PAD_GPIO_IO15__MEDIAMIX_CAM_DATA07 0x004C 0x01FC 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO15__MEDIAMIX_DISP_DATA11 0x004C 0x01FC 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO15__LPSPI8_SCK 0x004C 0x01FC 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO15__LPUART8_RTS_B 0x004C 0x01FC 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO15__LPUART4_RX 0x004C 0x01FC 0x042C 0x6 0x0 +#define MX93_PAD_GPIO_IO15__FLEXIO1_FLEXIO15 0x004C 0x01FC 0x03A4 0x7 0x0 +#define MX93_PAD_GPIO_IO16__GPIO2_IO16 0x0050 0x0200 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO16__SAI3_TX_BCLK 0x0050 0x0200 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO16__PDM_BIT_STREAM02 0x0050 0x0200 0x0448 0x2 0x1 +#define MX93_PAD_GPIO_IO16__MEDIAMIX_DISP_DATA12 0x0050 0x0200 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO16__LPUART3_CTS_B 0x0050 0x0200 0x041C 0x4 0x0 +#define MX93_PAD_GPIO_IO16__LPSPI4_PCS2 0x0050 0x0200 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO16__LPUART4_CTS_B 0x0050 0x0200 0x0428 0x6 0x0 +#define MX93_PAD_GPIO_IO16__FLEXIO1_FLEXIO16 0x0050 0x0200 0x03A8 0x7 0x0 +#define MX93_PAD_GPIO_IO17__GPIO2_IO17 0x0054 0x0204 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO17__SAI3_MCLK 0x0054 0x0204 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO17__MEDIAMIX_CAM_DATA08 0x0054 0x0204 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO17__MEDIAMIX_DISP_DATA13 0x0054 0x0204 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO17__LPUART3_RTS_B 0x0054 0x0204 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO17__LPSPI4_PCS1 0x0054 0x0204 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO17__LPUART4_RTS_B 0x0054 0x0204 0x0000 0x6 0x0 +#define MX93_PAD_GPIO_IO17__FLEXIO1_FLEXIO17 0x0054 0x0204 0x03AC 0x7 0x0 +#define MX93_PAD_GPIO_IO18__GPIO2_IO18 0x0058 0x0208 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO18__SAI3_RX_BCLK 0x0058 0x0208 0x0454 0x1 0x0 +#define MX93_PAD_GPIO_IO18__MEDIAMIX_CAM_DATA09 0x0058 0x0208 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO18__MEDIAMIX_DISP_DATA14 0x0058 0x0208 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO18__LPSPI5_PCS0 0x0058 0x0208 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO18__LPSPI4_PCS0 0x0058 0x0208 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO18__TPM5_CH2 0x0058 0x0208 0x0000 0x6 0x0 +#define MX93_PAD_GPIO_IO18__FLEXIO1_FLEXIO18 0x0058 0x0208 0x03B0 0x7 0x0 +#define MX93_PAD_GPIO_IO19__GPIO2_IO19 0x005C 0x020C 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO19__SAI3_RX_SYNC 0x005C 0x020C 0x0458 0x1 0x1 +#define MX93_PAD_GPIO_IO19__PDM_BIT_STREAM03 0x005C 0x020C 0x044C 0x2 0x1 +#define MX93_PAD_GPIO_IO19__MEDIAMIX_DISP_DATA15 0x005C 0x020C 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO19__LPSPI5_SIN 0x005C 0x020C 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO19__LPSPI4_SIN 0x005C 0x020C 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO19__TPM6_CH2 0x005C 0x020C 0x0000 0x6 0x0 +#define MX93_PAD_GPIO_IO19__SAI3_TX_DATA00 0x005C 0x020C 0x0000 0x7 0x0 +#define MX93_PAD_GPIO_IO20__GPIO2_IO20 0x0060 0x0210 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO20__SAI3_RX_DATA00 0x0060 0x0210 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO20__PDM_BIT_STREAM00 0x0060 0x0210 0x0440 0x2 0x1 +#define MX93_PAD_GPIO_IO20__MEDIAMIX_DISP_DATA16 0x0060 0x0210 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO20__LPSPI5_SOUT 0x0060 0x0210 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO20__LPSPI4_SOUT 0x0060 0x0210 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO20__TPM3_CH1 0x0060 0x0210 0x0000 0x6 0x0 +#define MX93_PAD_GPIO_IO20__FLEXIO1_FLEXIO20 0x0060 0x0210 0x03B4 0x7 0x0 +#define MX93_PAD_GPIO_IO21__GPIO2_IO21 0x0064 0x0214 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO21__SAI3_TX_DATA00 0x0064 0x0214 0x0000 0x1 0x0 +#define MX93_PAD_GPIO_IO21__PDM_CLK 0x0064 0x0214 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO21__MEDIAMIX_DISP_DATA17 0x0064 0x0214 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO21__LPSPI5_SCK 0x0064 0x0214 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO21__LPSPI4_SCK 0x0064 0x0214 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO21__TPM4_CH1 0x0064 0x0214 0x0000 0x6 0x0 +#define MX93_PAD_GPIO_IO21__SAI3_RX_BCLK 0x0064 0x0214 0x0454 0x7 0x1 +#define MX93_PAD_GPIO_IO22__GPIO2_IO22 0x0068 0x0218 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO22__USDHC3_CLK 0x0068 0x0218 0x0460 0x1 0x0 +#define MX93_PAD_GPIO_IO22__SPDIF_IN 0x0068 0x0218 0x045C 0x2 0x0 +#define MX93_PAD_GPIO_IO22__MEDIAMIX_DISP_DATA18 0x0068 0x0218 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO22__TPM5_CH1 0x0068 0x0218 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO22__TPM6_EXTCLK 0x0068 0x0218 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO22__LPI2C5_SDA 0x0068 0x0218 0x03F4 0x6 0x1 +#define MX93_PAD_GPIO_IO22__FLEXIO1_FLEXIO22 0x0068 0x0218 0x03B8 0x7 0x0 +#define MX93_PAD_GPIO_IO23__GPIO2_IO23 0x006C 0x021C 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO23__USDHC3_CMD 0x006C 0x021C 0x0464 0x1 0x0 +#define MX93_PAD_GPIO_IO23__SPDIF_OUT 0x006C 0x021C 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO23__MEDIAMIX_DISP_DATA19 0x006C 0x021C 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO23__TPM6_CH1 0x006C 0x021C 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO23__LPI2C5_SCL 0x006C 0x021C 0x03F0 0x6 0x1 +#define MX93_PAD_GPIO_IO23__FLEXIO1_FLEXIO23 0x006C 0x021C 0x03BC 0x7 0x0 +#define MX93_PAD_GPIO_IO24__GPIO2_IO24 0x0070 0x0220 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO24__USDHC3_DATA0 0x0070 0x0220 0x0468 0x1 0x0 +#define MX93_PAD_GPIO_IO24__MEDIAMIX_DISP_DATA20 0x0070 0x0220 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO24__TPM3_CH3 0x0070 0x0220 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO24__JTAG_MUX_TDO 0x0070 0x0220 0x0000 0x5 0x0 +#define MX93_PAD_GPIO_IO24__LPSPI6_PCS1 0x0070 0x0220 0x0000 0x6 0x0 +#define MX93_PAD_GPIO_IO24__FLEXIO1_FLEXIO24 0x0070 0x0220 0x03C0 0x7 0x0 +#define MX93_PAD_GPIO_IO25__GPIO2_IO25 0x0074 0x0224 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO25__USDHC3_DATA1 0x0074 0x0224 0x046C 0x1 0x0 +#define MX93_PAD_GPIO_IO25__CAN2_TX 0x0074 0x0224 0x0000 0x2 0x0 +#define MX93_PAD_GPIO_IO25__MEDIAMIX_DISP_DATA21 0x0074 0x0224 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO25__TPM4_CH3 0x0074 0x0224 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO25__JTAG_MUX_TCK 0x0074 0x0224 0x03DC 0x5 0x1 +#define MX93_PAD_GPIO_IO25__LPSPI7_PCS1 0x0074 0x0224 0x0000 0x6 0x0 +#define MX93_PAD_GPIO_IO25__FLEXIO1_FLEXIO25 0x0074 0x0224 0x03C4 0x7 0x0 +#define MX93_PAD_GPIO_IO26__GPIO2_IO26 0x0078 0x0228 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO26__USDHC3_DATA2 0x0078 0x0228 0x0470 0x1 0x0 +#define MX93_PAD_GPIO_IO26__PDM_BIT_STREAM01 0x0078 0x0228 0x0444 0x2 0x1 +#define MX93_PAD_GPIO_IO26__MEDIAMIX_DISP_DATA22 0x0078 0x0228 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO26__TPM5_CH3 0x0078 0x0228 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO26__JTAG_MUX_TDI 0x0078 0x0228 0x03E0 0x5 0x1 +#define MX93_PAD_GPIO_IO26__LPSPI8_PCS1 0x0078 0x0228 0x0000 0x6 0x0 +#define MX93_PAD_GPIO_IO26__SAI3_TX_SYNC 0x0078 0x0228 0x0000 0x7 0x0 +#define MX93_PAD_GPIO_IO27__GPIO2_IO27 0x007C 0x022C 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO27__USDHC3_DATA3 0x007C 0x022C 0x0474 0x1 0x0 +#define MX93_PAD_GPIO_IO27__CAN2_RX 0x007C 0x022C 0x0364 0x2 0x1 +#define MX93_PAD_GPIO_IO27__MEDIAMIX_DISP_DATA23 0x007C 0x022C 0x0000 0x3 0x0 +#define MX93_PAD_GPIO_IO27__TPM6_CH3 0x007C 0x022C 0x0000 0x4 0x0 +#define MX93_PAD_GPIO_IO27__JTAG_MUX_TMS 0x007C 0x022C 0x03E4 0x5 0x1 +#define MX93_PAD_GPIO_IO27__LPSPI5_PCS1 0x007C 0x022C 0x0000 0x6 0x0 +#define MX93_PAD_GPIO_IO27__FLEXIO1_FLEXIO27 0x007C 0x022C 0x03C8 0x7 0x0 +#define MX93_PAD_GPIO_IO28__GPIO2_IO28 0x0080 0x0230 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO28__LPI2C3_SDA 0x0080 0x0230 0x03EC 0x1 0x1 +#define MX93_PAD_GPIO_IO28__FLEXIO1_FLEXIO28 0x0080 0x0230 0x0000 0x7 0x0 +#define MX93_PAD_GPIO_IO29__GPIO2_IO29 0x0084 0x0234 0x0000 0x0 0x0 +#define MX93_PAD_GPIO_IO29__LPI2C3_SCL 0x0084 0x0234 0x03E8 0x1 0x1 +#define MX93_PAD_GPIO_IO29__FLEXIO1_FLEXIO29 0x0084 0x0234 0x0000 0x7 0x0 +#define MX93_PAD_CCM_CLKO1__CCMSRCGPCMIX_CLKO1 0x0088 0x0238 0x0000 0x0 0x0 +#define MX93_PAD_CCM_CLKO1__FLEXIO1_FLEXIO26 0x0088 0x0238 0x0000 0x4 0x0 +#define MX93_PAD_CCM_CLKO1__GPIO3_IO26 0x0088 0x0238 0x0000 0x5 0x0 +#define MX93_PAD_CCM_CLKO2__GPIO3_IO27 0x008C 0x023C 0x0000 0x5 0x0 +#define MX93_PAD_CCM_CLKO2__CCMSRCGPCMIX_CLKO2 0x008C 0x023C 0x0000 0x0 0x0 +#define MX93_PAD_CCM_CLKO2__FLEXIO1_FLEXIO27 0x008C 0x023C 0x03C8 0x4 0x1 +#define MX93_PAD_CCM_CLKO3__CCMSRCGPCMIX_CLKO3 0x0090 0x0240 0x0000 0x0 0x0 +#define MX93_PAD_CCM_CLKO3__FLEXIO2_FLEXIO28 0x0090 0x0240 0x0000 0x4 0x0 +#define MX93_PAD_CCM_CLKO3__GPIO3_IO28 0x0090 0x0240 0x03CC 0x5 0x1 +#define MX93_PAD_CCM_CLKO4__CCMSRCGPCMIX_CLKO4 0x0094 0x0244 0x0000 0x0 0x0 +#define MX93_PAD_CCM_CLKO4__FLEXIO2_FLEXIO29 0x0094 0x0244 0x0000 0x4 0x0 +#define MX93_PAD_CCM_CLKO4__GPIO3_IO29 0x0094 0x0244 0x03D0 0x5 0x1 +#define MX93_PAD_ENET1_MDC__ENET_QOS_MDC 0x0098 0x0248 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_MDC__LPUART3_DCB_B 0x0098 0x0248 0x0000 0x1 0x0 +#define MX93_PAD_ENET1_MDC__I3C2_SCL 0x0098 0x0248 0x03D4 0x2 0x0 +#define MX93_PAD_ENET1_MDC__HSIOMIX_OTG_ID1 0x0098 0x0248 0x0000 0x3 0x0 +#define MX93_PAD_ENET1_MDC__FLEXIO2_FLEXIO00 0x0098 0x0248 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_MDC__GPIO4_IO00 0x0098 0x0248 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_MDC__LPUART5_RTS_B 0x0098 0x0248 0x0000 0x6 0x0 +#define MX93_PAD_ENET1_MDIO__ENET_QOS_MDIO 0x009C 0x024C 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_MDIO__LPUART3_RIN_B 0x009C 0x024C 0x0000 0x1 0x0 +#define MX93_PAD_ENET1_MDIO__I3C2_SDA 0x009C 0x024C 0x03D8 0x2 0x0 +#define MX93_PAD_ENET1_MDIO__HSIOMIX_OTG_PWR1 0x009C 0x024C 0x0000 0x3 0x0 +#define MX93_PAD_ENET1_MDIO__FLEXIO2_FLEXIO01 0x009C 0x024C 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_MDIO__GPIO4_IO01 0x009C 0x024C 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_TD3__ENET_QOS_RGMII_TD3 0x00A0 0x0250 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_TD3__CAN2_TX 0x00A0 0x0250 0x0000 0x2 0x0 +#define MX93_PAD_ENET1_TD3__HSIOMIX_OTG_ID2 0x00A0 0x0250 0x0000 0x3 0x0 +#define MX93_PAD_ENET1_TD3__FLEXIO2_FLEXIO02 0x00A0 0x0250 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_TD3__GPIO4_IO02 0x00A0 0x0250 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_TD2__ENET_QOS_RGMII_TD2 0x00A4 0x0254 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_TD2__CCM_ENET_QOS_CLOCK_GENERATE_REF_CLK 0x00A4 0x0254 0x0000 0x1 0x0 +#define MX93_PAD_ENET1_TD2__CAN2_RX 0x00A4 0x0254 0x0364 0x2 0x2 +#define MX93_PAD_ENET1_TD2__HSIOMIX_OTG_OC2 0x00A4 0x0254 0x0000 0x3 0x0 +#define MX93_PAD_ENET1_TD2__FLEXIO2_FLEXIO03 0x00A4 0x0254 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_TD2__GPIO4_IO03 0x00A4 0x0254 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_TD1__ENET_QOS_RGMII_TD1 0x00A8 0x0258 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_TD1__LPUART3_RTS_B 0x00A8 0x0258 0x0000 0x1 0x0 +#define MX93_PAD_ENET1_TD1__I3C2_PUR 0x00A8 0x0258 0x0000 0x2 0x0 +#define MX93_PAD_ENET1_TD1__HSIOMIX_OTG_OC1 0x00A8 0x0258 0x0000 0x3 0x0 +#define MX93_PAD_ENET1_TD1__FLEXIO2_FLEXIO04 0x00A8 0x0258 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_TD1__GPIO4_IO04 0x00A8 0x0258 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_TD1__I3C2_PUR_B 0x00A8 0x0258 0x0000 0x6 0x0 +#define MX93_PAD_ENET1_TD0__ENET_QOS_RGMII_TD0 0x00AC 0x025C 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_TD0__LPUART3_TX 0x00AC 0x025C 0x0424 0x1 0x1 +#define MX93_PAD_ENET1_TD0__FLEXIO2_FLEXIO05 0x00AC 0x025C 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_TD0__GPIO4_IO05 0x00AC 0x025C 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x00B0 0x0260 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_TX_CTL__LPUART3_DTR_B 0x00B0 0x0260 0x0000 0x1 0x0 +#define MX93_PAD_ENET1_TX_CTL__FLEXIO2_FLEXIO06 0x00B0 0x0260 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_TX_CTL__GPIO4_IO06 0x00B0 0x0260 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x00B4 0x0264 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_TXC__ENET_QOS_TX_ER 0x00B4 0x0264 0x0000 0x1 0x0 +#define MX93_PAD_ENET1_TXC__FLEXIO2_FLEXIO07 0x00B4 0x0264 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_TXC__GPIO4_IO07 0x00B4 0x0264 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x00B8 0x0268 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_RX_CTL__LPUART3_DSR_B 0x00B8 0x0268 0x0000 0x1 0x0 +#define MX93_PAD_ENET1_RX_CTL__HSIOMIX_OTG_PWR2 0x00B8 0x0268 0x0000 0x3 0x0 +#define MX93_PAD_ENET1_RX_CTL__FLEXIO2_FLEXIO08 0x00B8 0x0268 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_RX_CTL__GPIO4_IO08 0x00B8 0x0268 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x00BC 0x026C 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_RXC__ENET_QOS_RX_ER 0x00BC 0x026C 0x0000 0x1 0x0 +#define MX93_PAD_ENET1_RXC__FLEXIO2_FLEXIO09 0x00BC 0x026C 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_RXC__GPIO4_IO09 0x00BC 0x026C 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_RD0__ENET_QOS_RGMII_RD0 0x00C0 0x0270 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_RD0__LPUART3_RX 0x00C0 0x0270 0x0420 0x1 0x1 +#define MX93_PAD_ENET1_RD0__FLEXIO2_FLEXIO10 0x00C0 0x0270 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_RD0__GPIO4_IO10 0x00C0 0x0270 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_RD1__ENET_QOS_RGMII_RD1 0x00C4 0x0274 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_RD1__LPUART3_CTS_B 0x00C4 0x0274 0x041C 0x1 0x1 +#define MX93_PAD_ENET1_RD1__LPTMR2_ALT1 0x00C4 0x0274 0x0410 0x3 0x0 +#define MX93_PAD_ENET1_RD1__FLEXIO2_FLEXIO11 0x00C4 0x0274 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_RD1__GPIO4_IO11 0x00C4 0x0274 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_RD2__ENET_QOS_RGMII_RD2 0x00C8 0x0278 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_RD2__LPTMR2_ALT2 0x00C8 0x0278 0x0414 0x3 0x0 +#define MX93_PAD_ENET1_RD2__FLEXIO2_FLEXIO12 0x00C8 0x0278 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_RD2__GPIO4_IO12 0x00C8 0x0278 0x0000 0x5 0x0 +#define MX93_PAD_ENET1_RD3__ENET_QOS_RGMII_RD3 0x00CC 0x027C 0x0000 0x0 0x0 +#define MX93_PAD_ENET1_RD3__FLEXSPI1_TESTER_TRIGGER 0x00CC 0x027C 0x0000 0x2 0x0 +#define MX93_PAD_ENET1_RD3__LPTMR2_ALT3 0x00CC 0x027C 0x0418 0x3 0x0 +#define MX93_PAD_ENET1_RD3__FLEXIO2_FLEXIO13 0x00CC 0x027C 0x0000 0x4 0x0 +#define MX93_PAD_ENET1_RD3__GPIO4_IO13 0x00CC 0x027C 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_MDC__ENET1_MDC 0x00D0 0x0280 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_MDC__LPUART4_DCB_B 0x00D0 0x0280 0x0000 0x1 0x0 +#define MX93_PAD_ENET2_MDC__SAI2_RX_SYNC 0x00D0 0x0280 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_MDC__FLEXIO2_FLEXIO14 0x00D0 0x0280 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_MDC__GPIO4_IO14 0x00D0 0x0280 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_MDIO__ENET1_MDIO 0x00D4 0x0284 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_MDIO__LPUART4_RIN_B 0x00D4 0x0284 0x0000 0x1 0x0 +#define MX93_PAD_ENET2_MDIO__SAI2_RX_BCLK 0x00D4 0x0284 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_MDIO__FLEXIO2_FLEXIO15 0x00D4 0x0284 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_MDIO__GPIO4_IO15 0x00D4 0x0284 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_TD3__SAI2_RX_DATA00 0x00D8 0x0288 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_TD3__FLEXIO2_FLEXIO16 0x00D8 0x0288 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_TD3__GPIO4_IO16 0x00D8 0x0288 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_TD3__ENET1_RGMII_TD3 0x00D8 0x0288 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_TD2__ENET1_RGMII_TD2 0x00DC 0x028C 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_TD2__ENET1_TX_CLK 0x00DC 0x028C 0x0000 0x1 0x0 +#define MX93_PAD_ENET2_TD2__SAI2_RX_DATA01 0x00DC 0x028C 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_TD2__FLEXIO2_FLEXIO17 0x00DC 0x028C 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_TD2__GPIO4_IO17 0x00DC 0x028C 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_TD1__ENET1_RGMII_TD1 0x00E0 0x0290 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_TD1__LPUART4_RTS_B 0x00E0 0x0290 0x0000 0x1 0x0 +#define MX93_PAD_ENET2_TD1__SAI2_RX_DATA02 0x00E0 0x0290 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_TD1__FLEXIO2_FLEXIO18 0x00E0 0x0290 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_TD1__GPIO4_IO18 0x00E0 0x0290 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_TD0__ENET1_RGMII_TD0 0x00E4 0x0294 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_TD0__LPUART4_TX 0x00E4 0x0294 0x0430 0x1 0x1 +#define MX93_PAD_ENET2_TD0__SAI2_RX_DATA03 0x00E4 0x0294 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_TD0__FLEXIO2_FLEXIO19 0x00E4 0x0294 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_TD0__GPIO4_IO19 0x00E4 0x0294 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_TX_CTL__ENET1_RGMII_TX_CTL 0x00E8 0x0298 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_TX_CTL__LPUART4_DTR_B 0x00E8 0x0298 0x0000 0x1 0x0 +#define MX93_PAD_ENET2_TX_CTL__SAI2_TX_SYNC 0x00E8 0x0298 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_TX_CTL__FLEXIO2_FLEXIO20 0x00E8 0x0298 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_TX_CTL__GPIO4_IO20 0x00E8 0x0298 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_TXC__ENET1_RGMII_TXC 0x00EC 0x029C 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_TXC__ENET1_TX_ER 0x00EC 0x029C 0x0000 0x1 0x0 +#define MX93_PAD_ENET2_TXC__SAI2_TX_BCLK 0x00EC 0x029C 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_TXC__FLEXIO2_FLEXIO21 0x00EC 0x029C 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_TXC__GPIO4_IO21 0x00EC 0x029C 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_RX_CTL__ENET1_RGMII_RX_CTL 0x00F0 0x02A0 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_RX_CTL__LPUART4_DSR_B 0x00F0 0x02A0 0x0000 0x1 0x0 +#define MX93_PAD_ENET2_RX_CTL__SAI2_TX_DATA00 0x00F0 0x02A0 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_RX_CTL__FLEXIO2_FLEXIO22 0x00F0 0x02A0 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_RX_CTL__GPIO4_IO22 0x00F0 0x02A0 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_RXC__ENET1_RGMII_RXC 0x00F4 0x02A4 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_RXC__ENET1_RX_ER 0x00F4 0x02A4 0x0000 0x1 0x0 +#define MX93_PAD_ENET2_RXC__SAI2_TX_DATA01 0x00F4 0x02A4 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_RXC__FLEXIO2_FLEXIO23 0x00F4 0x02A4 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_RXC__GPIO4_IO23 0x00F4 0x02A4 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_RD0__ENET1_RGMII_RD0 0x00F8 0x02A8 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_RD0__LPUART4_RX 0x00F8 0x02A8 0x042C 0x1 0x1 +#define MX93_PAD_ENET2_RD0__SAI2_TX_DATA02 0x00F8 0x02A8 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_RD0__FLEXIO2_FLEXIO24 0x00F8 0x02A8 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_RD0__GPIO4_IO24 0x00F8 0x02A8 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_RD1__ENET1_RGMII_RD1 0x00FC 0x02AC 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_RD1__SPDIF_IN 0x00FC 0x02AC 0x045C 0x1 0x1 +#define MX93_PAD_ENET2_RD1__SAI2_TX_DATA03 0x00FC 0x02AC 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_RD1__FLEXIO2_FLEXIO25 0x00FC 0x02AC 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_RD1__GPIO4_IO25 0x00FC 0x02AC 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_RD2__ENET1_RGMII_RD2 0x0100 0x02B0 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_RD2__LPUART4_CTS_B 0x0100 0x02B0 0x0428 0x1 0x1 +#define MX93_PAD_ENET2_RD2__SAI2_MCLK 0x0100 0x02B0 0x0000 0x2 0x0 +#define MX93_PAD_ENET2_RD2__MQS2_RIGHT 0x0100 0x02B0 0x0000 0x3 0x0 +#define MX93_PAD_ENET2_RD2__FLEXIO2_FLEXIO26 0x0100 0x02B0 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_RD2__GPIO4_IO26 0x0100 0x02B0 0x0000 0x5 0x0 +#define MX93_PAD_ENET2_RD3__ENET1_RGMII_RD3 0x0104 0x02B4 0x0000 0x0 0x0 +#define MX93_PAD_ENET2_RD3__SPDIF_OUT 0x0104 0x02B4 0x0000 0x1 0x0 +#define MX93_PAD_ENET2_RD3__SPDIF_IN 0x0104 0x02B4 0x045C 0x2 0x2 +#define MX93_PAD_ENET2_RD3__MQS2_LEFT 0x0104 0x02B4 0x0000 0x3 0x0 +#define MX93_PAD_ENET2_RD3__FLEXIO2_FLEXIO27 0x0104 0x02B4 0x0000 0x4 0x0 +#define MX93_PAD_ENET2_RD3__GPIO4_IO27 0x0104 0x02B4 0x0000 0x5 0x0 +#define MX93_PAD_SD1_CLK__FLEXIO1_FLEXIO08 0x0108 0x02B8 0x038C 0x4 0x1 +#define MX93_PAD_SD1_CLK__GPIO3_IO08 0x0108 0x02B8 0x0000 0x5 0x0 +#define MX93_PAD_SD1_CLK__USDHC1_CLK 0x0108 0x02B8 0x0000 0x0 0x0 +#define MX93_PAD_SD1_CMD__USDHC1_CMD 0x010C 0x02BC 0x0000 0x0 0x0 +#define MX93_PAD_SD1_CMD__FLEXIO1_FLEXIO09 0x010C 0x02BC 0x0390 0x4 0x1 +#define MX93_PAD_SD1_CMD__GPIO3_IO09 0x010C 0x02BC 0x0000 0x5 0x0 +#define MX93_PAD_SD1_DATA0__USDHC1_DATA0 0x0110 0x02C0 0x0000 0x0 0x0 +#define MX93_PAD_SD1_DATA0__FLEXIO1_FLEXIO10 0x0110 0x02C0 0x0394 0x4 0x1 +#define MX93_PAD_SD1_DATA0__GPIO3_IO10 0x0110 0x02C0 0x0000 0x5 0x0 +#define MX93_PAD_SD1_DATA1__USDHC1_DATA1 0x0114 0x02C4 0x0000 0x0 0x0 +#define MX93_PAD_SD1_DATA1__FLEXIO1_FLEXIO11 0x0114 0x02C4 0x0398 0x4 0x1 +#define MX93_PAD_SD1_DATA1__GPIO3_IO11 0x0114 0x02C4 0x0000 0x5 0x0 +#define MX93_PAD_SD1_DATA1__CCMSRCGPCMIX_INT_BOOT 0x0114 0x02C4 0x0000 0x6 0x0 +#define MX93_PAD_SD1_DATA2__USDHC1_DATA2 0x0118 0x02C8 0x0000 0x0 0x0 +#define MX93_PAD_SD1_DATA2__FLEXIO1_FLEXIO12 0x0118 0x02C8 0x0000 0x4 0x0 +#define MX93_PAD_SD1_DATA2__GPIO3_IO12 0x0118 0x02C8 0x0000 0x5 0x0 +#define MX93_PAD_SD1_DATA2__CCMSRCGPCMIX_PMIC_READY 0x0118 0x02C8 0x0000 0x6 0x0 +#define MX93_PAD_SD1_DATA3__USDHC1_DATA3 0x011C 0x02CC 0x0000 0x0 0x0 +#define MX93_PAD_SD1_DATA3__FLEXSPI1_A_SS1_B 0x011C 0x02CC 0x0000 0x1 0x0 +#define MX93_PAD_SD1_DATA3__FLEXIO1_FLEXIO13 0x011C 0x02CC 0x039C 0x4 0x1 +#define MX93_PAD_SD1_DATA3__GPIO3_IO13 0x011C 0x02CC 0x0000 0x5 0x0 +#define MX93_PAD_SD1_DATA4__USDHC1_DATA4 0x0120 0x02D0 0x0000 0x0 0x0 +#define MX93_PAD_SD1_DATA4__FLEXSPI1_A_DATA04 0x0120 0x02D0 0x0000 0x1 0x0 +#define MX93_PAD_SD1_DATA4__FLEXIO1_FLEXIO14 0x0120 0x02D0 0x03A0 0x4 0x1 +#define MX93_PAD_SD1_DATA4__GPIO3_IO14 0x0120 0x02D0 0x0000 0x5 0x0 +#define MX93_PAD_SD1_DATA5__USDHC1_DATA5 0x0124 0x02D4 0x0000 0x0 0x0 +#define MX93_PAD_SD1_DATA5__FLEXSPI1_A_DATA05 0x0124 0x02D4 0x0000 0x1 0x0 +#define MX93_PAD_SD1_DATA5__USDHC1_RESET_B 0x0124 0x02D4 0x0000 0x2 0x0 +#define MX93_PAD_SD1_DATA5__FLEXIO1_FLEXIO15 0x0124 0x02D4 0x03A4 0x4 0x1 +#define MX93_PAD_SD1_DATA5__GPIO3_IO15 0x0124 0x02D4 0x0000 0x5 0x0 +#define MX93_PAD_SD1_DATA6__USDHC1_DATA6 0x0128 0x02D8 0x0000 0x0 0x0 +#define MX93_PAD_SD1_DATA6__FLEXSPI1_A_DATA06 0x0128 0x02D8 0x0000 0x1 0x0 +#define MX93_PAD_SD1_DATA6__USDHC1_CD_B 0x0128 0x02D8 0x0000 0x2 0x0 +#define MX93_PAD_SD1_DATA6__FLEXIO1_FLEXIO16 0x0128 0x02D8 0x03A8 0x4 0x1 +#define MX93_PAD_SD1_DATA6__GPIO3_IO16 0x0128 0x02D8 0x0000 0x5 0x0 +#define MX93_PAD_SD1_DATA7__USDHC1_DATA7 0x012C 0x02DC 0x0000 0x0 0x0 +#define MX93_PAD_SD1_DATA7__FLEXSPI1_A_DATA07 0x012C 0x02DC 0x0000 0x1 0x0 +#define MX93_PAD_SD1_DATA7__USDHC1_WP 0x012C 0x02DC 0x0000 0x2 0x0 +#define MX93_PAD_SD1_DATA7__FLEXIO1_FLEXIO17 0x012C 0x02DC 0x03AC 0x4 0x1 +#define MX93_PAD_SD1_DATA7__GPIO3_IO17 0x012C 0x02DC 0x0000 0x5 0x0 +#define MX93_PAD_SD1_STROBE__USDHC1_STROBE 0x0130 0x02E0 0x0000 0x0 0x0 +#define MX93_PAD_SD1_STROBE__FLEXSPI1_A_DQS 0x0130 0x02E0 0x0000 0x1 0x0 +#define MX93_PAD_SD1_STROBE__FLEXIO1_FLEXIO18 0x0130 0x02E0 0x03B0 0x4 0x1 +#define MX93_PAD_SD1_STROBE__GPIO3_IO18 0x0130 0x02E0 0x0000 0x5 0x0 +#define MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x0134 0x02E4 0x0000 0x0 0x0 +#define MX93_PAD_SD2_VSELECT__USDHC2_WP 0x0134 0x02E4 0x0000 0x1 0x0 +#define MX93_PAD_SD2_VSELECT__LPTMR2_ALT3 0x0134 0x02E4 0x0418 0x2 0x1 +#define MX93_PAD_SD2_VSELECT__FLEXIO1_FLEXIO19 0x0134 0x02E4 0x0000 0x4 0x0 +#define MX93_PAD_SD2_VSELECT__GPIO3_IO19 0x0134 0x02E4 0x0000 0x5 0x0 +#define MX93_PAD_SD2_VSELECT__CCMSRCGPCMIX_EXT_CLK1 0x0134 0x02E4 0x0368 0x6 0x0 +#define MX93_PAD_SD3_CLK__USDHC3_CLK 0x0138 0x02E8 0x0460 0x0 0x1 +#define MX93_PAD_SD3_CLK__FLEXSPI1_A_SCLK 0x0138 0x02E8 0x0000 0x1 0x0 +#define MX93_PAD_SD3_CLK__FLEXIO1_FLEXIO20 0x0138 0x02E8 0x03B4 0x4 0x1 +#define MX93_PAD_SD3_CLK__GPIO3_IO20 0x0138 0x02E8 0x0000 0x5 0x0 +#define MX93_PAD_SD3_CMD__USDHC3_CMD 0x013C 0x02EC 0x0464 0x0 0x1 +#define MX93_PAD_SD3_CMD__FLEXSPI1_A_SS0_B 0x013C 0x02EC 0x0000 0x1 0x0 +#define MX93_PAD_SD3_CMD__FLEXIO1_FLEXIO21 0x013C 0x02EC 0x0000 0x4 0x0 +#define MX93_PAD_SD3_CMD__GPIO3_IO21 0x013C 0x02EC 0x0000 0x5 0x0 +#define MX93_PAD_SD3_DATA0__USDHC3_DATA0 0x0140 0x02F0 0x0468 0x0 0x1 +#define MX93_PAD_SD3_DATA0__FLEXSPI1_A_DATA00 0x0140 0x02F0 0x0000 0x1 0x0 +#define MX93_PAD_SD3_DATA0__FLEXIO1_FLEXIO22 0x0140 0x02F0 0x03B8 0x4 0x1 +#define MX93_PAD_SD3_DATA0__GPIO3_IO22 0x0140 0x02F0 0x0000 0x5 0x0 +#define MX93_PAD_SD3_DATA1__USDHC3_DATA1 0x0144 0x02F4 0x046C 0x0 0x1 +#define MX93_PAD_SD3_DATA1__FLEXSPI1_A_DATA01 0x0144 0x02F4 0x0000 0x1 0x0 +#define MX93_PAD_SD3_DATA1__FLEXIO1_FLEXIO23 0x0144 0x02F4 0x03BC 0x4 0x1 +#define MX93_PAD_SD3_DATA1__GPIO3_IO23 0x0144 0x02F4 0x0000 0x5 0x0 +#define MX93_PAD_SD3_DATA2__USDHC3_DATA2 0x0148 0x02F8 0x0470 0x0 0x1 +#define MX93_PAD_SD3_DATA2__FLEXSPI1_A_DATA02 0x0148 0x02F8 0x0000 0x1 0x0 +#define MX93_PAD_SD3_DATA2__FLEXIO1_FLEXIO24 0x0148 0x02F8 0x03C0 0x4 0x1 +#define MX93_PAD_SD3_DATA2__GPIO3_IO24 0x0148 0x02F8 0x0000 0x5 0x0 +#define MX93_PAD_SD3_DATA3__USDHC3_DATA3 0x014C 0x02FC 0x0474 0x0 0x1 +#define MX93_PAD_SD3_DATA3__FLEXSPI1_A_DATA03 0x014C 0x02FC 0x0000 0x1 0x0 +#define MX93_PAD_SD3_DATA3__FLEXIO1_FLEXIO25 0x014C 0x02FC 0x03C4 0x4 0x1 +#define MX93_PAD_SD3_DATA3__GPIO3_IO25 0x014C 0x02FC 0x0000 0x5 0x0 +#define MX93_PAD_SD2_CD_B__USDHC2_CD_B 0x0150 0x0300 0x0000 0x0 0x0 +#define MX93_PAD_SD2_CD_B__ENET_QOS_1588_EVENT0_IN 0x0150 0x0300 0x0000 0x1 0x0 +#define MX93_PAD_SD2_CD_B__I3C2_SCL 0x0150 0x0300 0x03D4 0x2 0x1 +#define MX93_PAD_SD2_CD_B__FLEXIO1_FLEXIO00 0x0150 0x0300 0x036C 0x4 0x1 +#define MX93_PAD_SD2_CD_B__GPIO3_IO00 0x0150 0x0300 0x0000 0x5 0x0 +#define MX93_PAD_SD2_CD_B__CCMSRCGPCMIX_TESTER_ACK 0x0150 0x0300 0x0000 0x6 0x0 +#define MX93_PAD_SD2_CLK__USDHC2_CLK 0x0154 0x0304 0x0000 0x0 0x0 +#define MX93_PAD_SD2_CLK__ENET_QOS_1588_EVENT0_OUT 0x0154 0x0304 0x0000 0x1 0x0 +#define MX93_PAD_SD2_CLK__I3C2_SDA 0x0154 0x0304 0x03D8 0x2 0x1 +#define MX93_PAD_SD2_CLK__FLEXIO1_FLEXIO01 0x0154 0x0304 0x0370 0x4 0x1 +#define MX93_PAD_SD2_CLK__GPIO3_IO01 0x0154 0x0304 0x0000 0x5 0x0 +#define MX93_PAD_SD2_CLK__CCMSRCGPCMIX_OBSERVE0 0x0154 0x0304 0x0000 0x6 0x0 +#define MX93_PAD_SD2_CMD__USDHC2_CMD 0x0158 0x0308 0x0000 0x0 0x0 +#define MX93_PAD_SD2_CMD__ENET1_1588_EVENT0_IN 0x0158 0x0308 0x0000 0x1 0x0 +#define MX93_PAD_SD2_CMD__I3C2_PUR 0x0158 0x0308 0x0000 0x2 0x0 +#define MX93_PAD_SD2_CMD__I3C2_PUR_B 0x0158 0x0308 0x0000 0x3 0x0 +#define MX93_PAD_SD2_CMD__FLEXIO1_FLEXIO02 0x0158 0x0308 0x0374 0x4 0x1 +#define MX93_PAD_SD2_CMD__GPIO3_IO02 0x0158 0x0308 0x0000 0x5 0x0 +#define MX93_PAD_SD2_CMD__CCMSRCGPCMIX_OBSERVE1 0x0158 0x0308 0x0000 0x6 0x0 +#define MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x015C 0x030C 0x0000 0x0 0x0 +#define MX93_PAD_SD2_DATA0__ENET1_1588_EVENT0_OUT 0x015C 0x030C 0x0000 0x1 0x0 +#define MX93_PAD_SD2_DATA0__CAN2_TX 0x015C 0x030C 0x0000 0x2 0x0 +#define MX93_PAD_SD2_DATA0__FLEXIO1_FLEXIO03 0x015C 0x030C 0x0378 0x4 0x1 +#define MX93_PAD_SD2_DATA0__GPIO3_IO03 0x015C 0x030C 0x0000 0x5 0x0 +#define MX93_PAD_SD2_DATA0__CCMSRCGPCMIX_OBSERVE2 0x015C 0x030C 0x0000 0x6 0x0 +#define MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x0160 0x0310 0x0000 0x0 0x0 +#define MX93_PAD_SD2_DATA1__ENET1_1588_EVENT1_IN 0x0160 0x0310 0x0000 0x1 0x0 +#define MX93_PAD_SD2_DATA1__CAN2_RX 0x0160 0x0310 0x0364 0x2 0x3 +#define MX93_PAD_SD2_DATA1__FLEXIO1_FLEXIO04 0x0160 0x0310 0x037C 0x4 0x1 +#define MX93_PAD_SD2_DATA1__GPIO3_IO04 0x0160 0x0310 0x0000 0x5 0x0 +#define MX93_PAD_SD2_DATA1__CCMSRCGPCMIX_WAIT 0x0160 0x0310 0x0000 0x6 0x0 +#define MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x0164 0x0314 0x0000 0x0 0x0 +#define MX93_PAD_SD2_DATA2__ENET1_1588_EVENT1_OUT 0x0164 0x0314 0x0000 0x1 0x0 +#define MX93_PAD_SD2_DATA2__MQS2_RIGHT 0x0164 0x0314 0x0000 0x2 0x0 +#define MX93_PAD_SD2_DATA2__FLEXIO1_FLEXIO05 0x0164 0x0314 0x0380 0x4 0x1 +#define MX93_PAD_SD2_DATA2__GPIO3_IO05 0x0164 0x0314 0x0000 0x5 0x0 +#define MX93_PAD_SD2_DATA2__CCMSRCGPCMIX_STOP 0x0164 0x0314 0x0000 0x6 0x0 +#define MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x0168 0x0318 0x0000 0x0 0x0 +#define MX93_PAD_SD2_DATA3__LPTMR2_ALT1 0x0168 0x0318 0x0410 0x1 0x1 +#define MX93_PAD_SD2_DATA3__MQS2_LEFT 0x0168 0x0318 0x0000 0x2 0x0 +#define MX93_PAD_SD2_DATA3__FLEXIO1_FLEXIO06 0x0168 0x0318 0x0384 0x4 0x1 +#define MX93_PAD_SD2_DATA3__GPIO3_IO06 0x0168 0x0318 0x0000 0x5 0x0 +#define MX93_PAD_SD2_DATA3__CCMSRCGPCMIX_EARLY_RESET 0x0168 0x0318 0x0000 0x6 0x0 +#define MX93_PAD_SD2_RESET_B__USDHC2_RESET_B 0x016C 0x031C 0x0000 0x0 0x0 +#define MX93_PAD_SD2_RESET_B__LPTMR2_ALT2 0x016C 0x031C 0x0414 0x1 0x1 +#define MX93_PAD_SD2_RESET_B__FLEXIO1_FLEXIO07 0x016C 0x031C 0x0388 0x4 0x1 +#define MX93_PAD_SD2_RESET_B__GPIO3_IO07 0x016C 0x031C 0x0000 0x5 0x0 +#define MX93_PAD_SD2_RESET_B__CCMSRCGPCMIX_SYSTEM_RESET 0x016C 0x031C 0x0000 0x6 0x0 +#define MX93_PAD_I2C1_SCL__LPI2C1_SCL 0x0170 0x0320 0x0000 0x0 0x0 +#define MX93_PAD_I2C1_SCL__I3C1_SCL 0x0170 0x0320 0x0000 0x1 0x0 +#define MX93_PAD_I2C1_SCL__LPUART1_DCB_B 0x0170 0x0320 0x0000 0x2 0x0 +#define MX93_PAD_I2C1_SCL__TPM2_CH0 0x0170 0x0320 0x0000 0x3 0x0 +#define MX93_PAD_I2C1_SCL__GPIO1_IO00 0x0170 0x0320 0x0000 0x5 0x0 +#define MX93_PAD_I2C1_SDA__LPI2C1_SDA 0x0174 0x0324 0x0000 0x0 0x0 +#define MX93_PAD_I2C1_SDA__I3C1_SDA 0x0174 0x0324 0x0000 0x1 0x0 +#define MX93_PAD_I2C1_SDA__LPUART1_RIN_B 0x0174 0x0324 0x0000 0x2 0x0 +#define MX93_PAD_I2C1_SDA__TPM2_CH1 0x0174 0x0324 0x0000 0x3 0x0 +#define MX93_PAD_I2C1_SDA__GPIO1_IO01 0x0174 0x0324 0x0000 0x5 0x0 +#define MX93_PAD_I2C2_SCL__LPI2C2_SCL 0x0178 0x0328 0x0000 0x0 0x0 +#define MX93_PAD_I2C2_SCL__I3C1_PUR 0x0178 0x0328 0x0000 0x1 0x0 +#define MX93_PAD_I2C2_SCL__LPUART2_DCB_B 0x0178 0x0328 0x0000 0x2 0x0 +#define MX93_PAD_I2C2_SCL__TPM2_CH2 0x0178 0x0328 0x0000 0x3 0x0 +#define MX93_PAD_I2C2_SCL__SAI1_RX_SYNC 0x0178 0x0328 0x0000 0x4 0x0 +#define MX93_PAD_I2C2_SCL__GPIO1_IO02 0x0178 0x0328 0x0000 0x5 0x0 +#define MX93_PAD_I2C2_SCL__I3C1_PUR_B 0x0178 0x0328 0x0000 0x6 0x0 +#define MX93_PAD_I2C2_SDA__LPI2C2_SDA 0x017C 0x032C 0x0000 0x0 0x0 +#define MX93_PAD_I2C2_SDA__LPUART2_RIN_B 0x017C 0x032C 0x0000 0x2 0x0 +#define MX93_PAD_I2C2_SDA__TPM2_CH3 0x017C 0x032C 0x0000 0x3 0x0 +#define MX93_PAD_I2C2_SDA__SAI1_RX_BCLK 0x017C 0x032C 0x0000 0x4 0x0 +#define MX93_PAD_I2C2_SDA__GPIO1_IO03 0x017C 0x032C 0x0000 0x5 0x0 +#define MX93_PAD_UART1_RXD__LPUART1_RX 0x0180 0x0330 0x0000 0x0 0x0 +#define MX93_PAD_UART1_RXD__S400_UART_RX 0x0180 0x0330 0x0000 0x1 0x0 +#define MX93_PAD_UART1_RXD__LPSPI2_SIN 0x0180 0x0330 0x0000 0x2 0x0 +#define MX93_PAD_UART1_RXD__TPM1_CH0 0x0180 0x0330 0x0000 0x3 0x0 +#define MX93_PAD_UART1_RXD__GPIO1_IO04 0x0180 0x0330 0x0000 0x5 0x0 +#define MX93_PAD_UART1_TXD__LPUART1_TX 0x0184 0x0334 0x0000 0x0 0x0 +#define MX93_PAD_UART1_TXD__S400_UART_TX 0x0184 0x0334 0x0000 0x1 0x0 +#define MX93_PAD_UART1_TXD__LPSPI2_PCS0 0x0184 0x0334 0x0000 0x2 0x0 +#define MX93_PAD_UART1_TXD__TPM1_CH1 0x0184 0x0334 0x0000 0x3 0x0 +#define MX93_PAD_UART1_TXD__GPIO1_IO05 0x0184 0x0334 0x0000 0x5 0x0 +#define MX93_PAD_UART2_RXD__LPUART2_RX 0x0188 0x0338 0x0000 0x0 0x0 +#define MX93_PAD_UART2_RXD__LPUART1_CTS_B 0x0188 0x0338 0x0000 0x1 0x0 +#define MX93_PAD_UART2_RXD__LPSPI2_SOUT 0x0188 0x0338 0x0000 0x2 0x0 +#define MX93_PAD_UART2_RXD__TPM1_CH2 0x0188 0x0338 0x0000 0x3 0x0 +#define MX93_PAD_UART2_RXD__SAI1_MCLK 0x0188 0x0338 0x0450 0x4 0x0 +#define MX93_PAD_UART2_RXD__GPIO1_IO06 0x0188 0x0338 0x0000 0x5 0x0 +#define MX93_PAD_UART2_TXD__LPUART2_TX 0x018C 0x033C 0x0000 0x0 0x0 +#define MX93_PAD_UART2_TXD__LPUART1_RTS_B 0x018C 0x033C 0x0000 0x1 0x0 +#define MX93_PAD_UART2_TXD__LPSPI2_SCK 0x018C 0x033C 0x0000 0x2 0x0 +#define MX93_PAD_UART2_TXD__TPM1_CH3 0x018C 0x033C 0x0000 0x3 0x0 +#define MX93_PAD_UART2_TXD__GPIO1_IO07 0x018C 0x033C 0x0000 0x5 0x0 +#define MX93_PAD_PDM_CLK__PDM_CLK 0x0190 0x0340 0x0000 0x0 0x0 +#define MX93_PAD_PDM_CLK__MQS1_LEFT 0x0190 0x0340 0x0000 0x1 0x0 +#define MX93_PAD_PDM_CLK__LPTMR1_ALT1 0x0190 0x0340 0x0000 0x4 0x0 +#define MX93_PAD_PDM_CLK__GPIO1_IO08 0x0190 0x0340 0x0000 0x5 0x0 +#define MX93_PAD_PDM_CLK__CAN1_TX 0x0190 0x0340 0x0000 0x6 0x0 +#define MX93_PAD_PDM_BIT_STREAM0__PDM_BIT_STREAM00 0x0194 0x0344 0x0440 0x0 0x2 +#define MX93_PAD_PDM_BIT_STREAM0__MQS1_RIGHT 0x0194 0x0344 0x0000 0x1 0x0 +#define MX93_PAD_PDM_BIT_STREAM0__LPSPI1_PCS1 0x0194 0x0344 0x0000 0x2 0x0 +#define MX93_PAD_PDM_BIT_STREAM0__TPM1_EXTCLK 0x0194 0x0344 0x0000 0x3 0x0 +#define MX93_PAD_PDM_BIT_STREAM0__LPTMR1_ALT2 0x0194 0x0344 0x0000 0x4 0x0 +#define MX93_PAD_PDM_BIT_STREAM0__GPIO1_IO09 0x0194 0x0344 0x0000 0x5 0x0 +#define MX93_PAD_PDM_BIT_STREAM0__CAN1_RX 0x0194 0x0344 0x0360 0x6 0x0 +#define MX93_PAD_PDM_BIT_STREAM1__PDM_BIT_STREAM01 0x0198 0x0348 0x0444 0x0 0x2 +#define MX93_PAD_PDM_BIT_STREAM1__NMI_GLUE_NMI 0x0198 0x0348 0x0000 0x1 0x0 +#define MX93_PAD_PDM_BIT_STREAM1__LPSPI2_PCS1 0x0198 0x0348 0x0000 0x2 0x0 +#define MX93_PAD_PDM_BIT_STREAM1__TPM2_EXTCLK 0x0198 0x0348 0x0000 0x3 0x0 +#define MX93_PAD_PDM_BIT_STREAM1__LPTMR1_ALT3 0x0198 0x0348 0x0000 0x4 0x0 +#define MX93_PAD_PDM_BIT_STREAM1__GPIO1_IO10 0x0198 0x0348 0x0000 0x5 0x0 +#define MX93_PAD_PDM_BIT_STREAM1__CCMSRCGPCMIX_EXT_CLK1 0x0198 0x0348 0x0368 0x6 0x1 +#define MX93_PAD_SAI1_TXFS__SAI1_TX_SYNC 0x019C 0x034C 0x0000 0x0 0x0 +#define MX93_PAD_SAI1_TXFS__SAI1_TX_DATA01 0x019C 0x034C 0x0000 0x1 0x0 +#define MX93_PAD_SAI1_TXFS__LPSPI1_PCS0 0x019C 0x034C 0x0000 0x2 0x0 +#define MX93_PAD_SAI1_TXFS__LPUART2_DTR_B 0x019C 0x034C 0x0000 0x3 0x0 +#define MX93_PAD_SAI1_TXFS__MQS1_LEFT 0x019C 0x034C 0x0000 0x4 0x0 +#define MX93_PAD_SAI1_TXFS__GPIO1_IO11 0x019C 0x034C 0x0000 0x5 0x0 +#define MX93_PAD_SAI1_TXC__SAI1_TX_BCLK 0x01A0 0x0350 0x0000 0x0 0x0 +#define MX93_PAD_SAI1_TXC__LPUART2_CTS_B 0x01A0 0x0350 0x0000 0x1 0x0 +#define MX93_PAD_SAI1_TXC__LPSPI1_SIN 0x01A0 0x0350 0x0000 0x2 0x0 +#define MX93_PAD_SAI1_TXC__LPUART1_DSR_B 0x01A0 0x0350 0x0000 0x3 0x0 +#define MX93_PAD_SAI1_TXC__CAN1_RX 0x01A0 0x0350 0x0360 0x4 0x1 +#define MX93_PAD_SAI1_TXC__GPIO1_IO12 0x01A0 0x0350 0x0000 0x5 0x0 +#define MX93_PAD_SAI1_TXD0__SAI1_TX_DATA00 0x01A4 0x0354 0x0000 0x0 0x0 +#define MX93_PAD_SAI1_TXD0__LPUART2_RTS_B 0x01A4 0x0354 0x0000 0x1 0x0 +#define MX93_PAD_SAI1_TXD0__LPSPI1_SCK 0x01A4 0x0354 0x0000 0x2 0x0 +#define MX93_PAD_SAI1_TXD0__LPUART1_DTR_B 0x01A4 0x0354 0x0000 0x3 0x0 +#define MX93_PAD_SAI1_TXD0__CAN1_TX 0x01A4 0x0354 0x0000 0x4 0x0 +#define MX93_PAD_SAI1_TXD0__GPIO1_IO13 0x01A4 0x0354 0x0000 0x5 0x0 +#define MX93_PAD_SAI1_RXD0__SAI1_RX_DATA00 0x01A8 0x0358 0x0000 0x0 0x0 +#define MX93_PAD_SAI1_RXD0__SAI1_MCLK 0x01A8 0x0358 0x0450 0x1 0x1 +#define MX93_PAD_SAI1_RXD0__LPSPI1_SOUT 0x01A8 0x0358 0x0000 0x2 0x0 +#define MX93_PAD_SAI1_RXD0__LPUART2_DSR_B 0x01A8 0x0358 0x0000 0x3 0x0 +#define MX93_PAD_SAI1_RXD0__MQS1_RIGHT 0x01A8 0x0358 0x0000 0x4 0x0 +#define MX93_PAD_SAI1_RXD0__GPIO1_IO14 0x01A8 0x0358 0x0000 0x5 0x0 +#define MX93_PAD_WDOG_ANY__WDOG1_WDOG_ANY 0x01AC 0x035C 0x0000 0x0 0x0 +#define MX93_PAD_WDOG_ANY__GPIO1_IO15 0x01AC 0x035C 0x0000 0x5 0x0 + +#endif /* __DTS_IMX93_PINFUNC_H */
drivers/pinctrl/nxp/Kconfig +13 -0
@@ -102,6 +102,19 @@ config PINCTRL_IMX8M only parses the 'fsl,pins' property and configure related registers. +config PINCTRL_IMX93 + bool "IMX8M pinctrl driver" + depends on ARCH_IMX9 && PINCTRL_FULL + select PINCTRL_IMX + help + Say Y here to enable the imx8m pinctrl driver + + This provides a simple pinctrl driver for i.MX8M SoC familiy. + This feature depends on device tree configuration. This driver + is different from the linux one, this is a simple implementation, + only parses the 'fsl,pins' property and configure related + registers. + config PINCTRL_MXS bool "NXP MXS pinctrl driver" depends on ARCH_MX28 && PINCTRL_FULL
drivers/pinctrl/nxp/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_PINCTRL_IMX8ULP) += pinctrl-imx8ulp.o obj-$(CONFIG_PINCTRL_IMX_SCU) += pinctrl-scu.o obj-$(CONFIG_PINCTRL_IMX8) += pinctrl-imx8.o obj-$(CONFIG_PINCTRL_IMX8M) += pinctrl-imx8m.o +obj-$(CONFIG_PINCTRL_IMX93) += pinctrl-imx93.o obj-$(CONFIG_PINCTRL_MXS) += pinctrl-mxs.o obj-$(CONFIG_PINCTRL_VYBRID) += pinctrl-vf610.o obj-$(CONFIG_PINCTRL_IMXRT) += pinctrl-imxrt.o
drivers/pinctrl/nxp/pinctrl-imx93.c new file +37 -0
@@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2022 NXP +*/ + +#include <dm/device.h> +#include <dm/pinctrl.h> + +#include "pinctrl-imx.h" + +static struct imx_pinctrl_soc_info imx93_pinctrl_soc_info __section(".data") = { + .flags = ZERO_OFFSET_VALID, +}; + +static int imx93_pinctrl_probe (struct udevice *dev) +{ +struct imx_pinctrl_soc_info *info = + (struct imx_pinctrl_soc_info *)dev_get_driver_data (dev); + +return imx_pinctrl_probe (dev, info); +} + +static const struct udevice_id imx93_pinctrl_match[] = { + { .compatible ="fsl,imx93-iomuxc" , .data = (ulong)&imx93_pinctrl_soc_info }, + {/* sentinel */ } +}; + +U_BOOT_DRIVER (imx93_pinctrl) = { + .name ="imx93-pinctrl" , + .id =UCLASS_PINCTRL , + .of_match =of_match_ptr (imx93_pinctrl_match), + .probe = imx93_pinctrl_probe, + .remove = imx_pinctrl_remove, + .priv_auto =sizeof (struct imx_pinctrl_priv ), + .ops = &imx_pinctrl_ops, + .flags =DM_FLAG_PRE_RELOC , +};
Signature · 1 line
2.36.0
PATCH v2 12/53 imx: pinctrl: add pinctrl and pinfunc file for i.MX93
Quoted 3 lines
From: Peng Fan <[email protected]>
Add the pinctrl driver and pinfunc header file to support iMX93Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 13/53 imx: imx9: Add CCM and clock API support
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add clock API to support CCM root clock and LPCG setting Set the CCM AUTHEN register to allow non-secure world to set root clock and lpcg.
--- arch/arm/include/asm/arch-imx9/ccm_regs.h | 266 ++++++++ arch/arm/include/asm/arch-imx9/clock.h | 239 +++++++ arch/arm/include/asm/arch-imx9/imx-regs.h | 6 +- arch/arm/mach-imx/imx9/Makefile | 2 +- arch/arm/mach-imx/imx9/clock.c | 769 +++++++++++++++++++++- arch/arm/mach-imx/imx9/clock_root.c | 438 ++++++++++++ arch/arm/mach-imx/imx9/soc.c | 3 + 7 files changed, 1720 insertions(+), 3 deletions(-) create mode 100644 arch/arm/include/asm/arch-imx9/ccm_regs.h create mode 100644 arch/arm/mach-imx/imx9/clock_root.c
arch/arm/include/asm/arch-imx9/ccm_regs.h new file +266 -0
@@ -0,0 +1,266 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2022 NXP +*/ + +#ifndef __ASM_ARCH_IMX9_CCM_REGS_H__ +#define __ASM_ARCH_IMX9_CCM_REGS_H__ +#define IMX93_CLK_ROOT_MAX 95 +#define IMX93_CLK_CCGR_MAX 127 + +#define ARM_A55_PERIPH_CLK_ROOT 0 +#define ARM_A55_MTR_BUS_CLK_ROOT 1 +#define ARM_A55_CLK_ROOT 2 +#define M33_CLK_ROOT 3 +#define SENTINEL_CLK_ROOT 4 +#define BUS_WAKEUP_CLK_ROOT 5 +#define BUS_AON_CLK_ROOT 6 +#define WAKEUP_AXI_CLK_ROOT 7 +#define SWO_TRACE_CLK_ROOT 8 +#define M33_SYSTICK_CLK_ROOT 9 +#define FLEXIO1_CLK_ROOT 10 +#define FLEXIO2_CLK_ROOT 11 +#define LPIT1_CLK_ROOT 12 +#define LPIT2_CLK_ROOT 13 +#define LPTMR1_CLK_ROOT 14 +#define LPTMR2_CLK_ROOT 15 +#define TPM1_CLK_ROOT 16 +#define TPM2_CLK_ROOT 17 +#define TPM3_CLK_ROOT 18 +#define TPM4_CLK_ROOT 19 +#define TPM5_CLK_ROOT 20 +#define TPM6_CLK_ROOT 21 +#define FLEXSPI1_CLK_ROOT 22 +#define CAN1_CLK_ROOT 23 +#define CAN2_CLK_ROOT 24 +#define LPUART1_CLK_ROOT 25 +#define LPUART2_CLK_ROOT 26 +#define LPUART3_CLK_ROOT 27 +#define LPUART4_CLK_ROOT 28 +#define LPUART5_CLK_ROOT 29 +#define LPUART6_CLK_ROOT 30 +#define LPUART7_CLK_ROOT 31 +#define LPUART8_CLK_ROOT 32 +#define LPI2C1_CLK_ROOT 33 +#define LPI2C2_CLK_ROOT 34 +#define LPI2C3_CLK_ROOT 35 +#define LPI2C4_CLK_ROOT 36 +#define LPI2C5_CLK_ROOT 37 +#define LPI2C6_CLK_ROOT 38 +#define LPI2C7_CLK_ROOT 39 +#define LPI2C8_CLK_ROOT 40 +#define LPSPI1_CLK_ROOT 41 +#define LPSPI2_CLK_ROOT 42 +#define LPSPI3_CLK_ROOT 43 +#define LPSPI4_CLK_ROOT 44 +#define LPSPI5_CLK_ROOT 45 +#define LPSPI6_CLK_ROOT 46 +#define LPSPI7_CLK_ROOT 47 +#define LPSPI8_CLK_ROOT 48 +#define I3C1_CLK_ROOT 49 +#define I3C2_CLK_ROOT 50 +#define USDHC1_CLK_ROOT 51 +#define USDHC2_CLK_ROOT 52 +#define USDHC3_CLK_ROOT 53 +#define SAI1_CLK_ROOT 54 +#define SAI2_CLK_ROOT 55 +#define SAI3_CLK_ROOT 56 +#define CCM_CKO1_CLK_ROOT 57 +#define CCM_CKO2_CLK_ROOT 58 +#define CCM_CKO3_CLK_ROOT 59 +#define CCM_CKO4_CLK_ROOT 60 +#define HSIO_CLK_ROOT 61 +#define HSIO_USB_TEST_60M_CLK_ROOT 62 +#define HSIO_ACSCAN_80M_CLK_ROOT 63 +#define HSIO_ACSCAN_480M_CLK_ROOT 64 +#define NIC_CLK_ROOT 65 +#define NIC_APB_CLK_ROOT 66 +#define ML_APB_CLK_ROOT 67 +#define ML_CLK_ROOT 68 +#define MEDIA_AXI_CLK_ROOT 69 +#define MEDIA_APB_CLK_ROOT 70 +#define MEDIA_LDB_CLK_ROOT 71 +#define MEDIA_DISP_PIX_CLK_ROOT 72 +#define CAM_PIX_CLK_ROOT 73 +#define MIPI_TEST_BYTE_CLK_ROOT 74 +#define MIPI_PHY_CFG_CLK_ROOT 75 +#define DRAM_ALT_CLK_ROOT 76 +#define DRAM_APB_CLK_ROOT 77 +#define ADC_CLK_ROOT 78 +#define PDM_CLK_ROOT 79 +#define TSTMR1_CLK_ROOT 80 +#define TSTMR2_CLK_ROOT 81 +#define MQS1_CLK_ROOT 82 +#define MQS2_CLK_ROOT 83 +#define AUDIO_XCVR_CLK_ROOT 84 +#define SPDIF_CLK_ROOT 85 +#define ENET_CLK_ROOT 86 +#define ENET_TIMER1_CLK_ROOT 87 +#define ENET_TIMER2_CLK_ROOT 88 +#define ENET_REF_CLK_ROOT 89 +#define ENET_REF_PHY_CLK_ROOT 90 +#define I3C1_SLOW_CLK_ROOT 91 +#define I3C2_SLOW_CLK_ROOT 92 +#define USB_PHY_BURUNIN_CLK_ROOT 93 +#define PAL_CAME_SCAN_CLK_ROOT 94 +#define CLK_ROOT_NUM 95 + +#define CCGR_A55 0 +#define CCGR_CM33 1 +#define CCGR_ARMTROUT 2 +#define CCGR_SENT 3 +#define CCGR_BUSM 4 +#define CCGR_BUS7 5 +#define CCGR_BUSD 6 +#define CCGR_ANAD 7 +#define CCGR_SRC 8 +#define CCGR_CCM 9 +#define CCGR_GPC 10 +#define CCGR_ADC 11 +#define CCGR_WDG1 12 +#define CCGR_WDG2 13 +#define CCGR_WDG3 14 +#define CCGR_WDG4 15 +#define CCGR_WDG5 16 +#define CCGR_SEM1 17 +#define CCGR_SEM2 18 +#define CCGR_MUA 19 +#define CCGR_MUB 20 +#define CCGR_DMA1 21 +#define CCGR_DMA2 22 +#define CCGR_ROMCA55 23 +#define CCGR_ROMCM33 24 +#define CCGR_QSP1 25 +#define CCGR_AONRDC 26 +#define CCGR_WKUPRDC 27 +#define CCGR_FUSE 28 +#define CCGR_SNVH 29 +#define CCGR_SNVS 30 +#define CCGR_TRAC 31 +#define CCGR_SWO 32 +#define CCGR_IOCG 33 +#define CCGR_PIO1 34 +#define CCGR_PIO2 35 +#define CCGR_PIO3 36 +#define CCGR_PIO4 37 +#define CCGR_FIO1 38 +#define CCGR_FIO2 39 +#define CCGR_PIT1 40 +#define CCGR_PIT2 41 +#define CCGR_GPT1 42 +#define CCGR_GPT2 43 +#define CCGR_TPM1 44 +#define CCGR_TPM2 45 +#define CCGR_TPM3 46 +#define CCGR_TPM4 47 +#define CCGR_TPM5 48 +#define CCGR_TPM6 49 +#define CCGR_CAN1 50 +#define CCGR_CAN2 51 +#define CCGR_URT1 52 +#define CCGR_URT2 53 +#define CCGR_URT3 54 +#define CCGR_URT4 55 +#define CCGR_URT5 56 +#define CCGR_URT6 57 +#define CCGR_URT7 58 +#define CCGR_URT8 59 +#define CCGR_I2C1 60 +#define CCGR_I2C2 61 +#define CCGR_I2C3 62 +#define CCGR_I2C4 63 +#define CCGR_I2C5 64 +#define CCGR_I2C6 65 +#define CCGR_I2C7 66 +#define CCGR_I2C8 67 +#define CCGR_SPI1 68 +#define CCGR_SPI2 69 +#define CCGR_SPI3 70 +#define CCGR_SPI4 71 +#define CCGR_SPI5 72 +#define CCGR_SPI6 73 +#define CCGR_SPI7 74 +#define CCGR_SPI8 75 +#define CCGR_I3C1 76 +#define CCGR_I3C2 77 +#define CCGR_USDHC1 78 +#define CCGR_USDHC2 79 +#define CCGR_USDHC3 80 +#define CCGR_SAI1 81 +#define CCGR_SAI2 82 +#define CCGR_SAI3 83 +#define CCGR_W2AO 84 +#define CCGR_AO2W 85 +#define CCGR_MIPIC 86 +#define CCGR_MIPID 87 +#define CCGR_LVDS 88 +#define CCGR_LCDIF 89 +#define CCGR_PXP 90 +#define CCGR_ISI 91 +#define CCGR_NMED 92 +#define CCGR_DFI 93 +#define CCGR_DDRC 94 +#define CCGR_DFIC 95 +#define CCGR_DSSI 96 +#define CCGR_DBYP 97 +#define CCGR_DAPB 98 +#define CCGR_DRAMP 99 +#define CCGR_DCLKC 100 +#define CCGR_NCTL 101 +#define CCGR_GIC 102 +#define CCGR_NICAPB 103 +#define CCGR_USBC 104 +#define CCGR_USBT 105 +#define CCGR_HSIO 106 +#define CCGR_PDM 107 +#define CCGR_MQS1 108 +#define CCGR_MQS2 109 +#define CCGR_AXCVR 110 +#define CCGR_MECC 111 +#define CCGR_SPDIF 112 +#define CCGR_ML2NIC 113 +#define CCGR_MED2NIC 114 +#define CCGR_HSIO2NIC 115 +#define CCGR_W2NIC 116 +#define CCGR_NIC2W 117 +#define CCGR_NIC2DDR 118 +#define CCGR_HSIO32K 119 +#define CCGR_ENET1 120 +#define CCGR_ENETQOS 121 +#define CCGR_SYSCNT 122 +#define CCGR_TSTMR1 123 +#define CCGR_TSTMR2 124 +#define CCGR_TMC 125 +#define CCGR_PMRO 126 +#define CCGR_NUM 127 + +#define SHARED_GPR_EXT_CLK 0 +#define SHARED_GPR_EXT_CLK_SEL_EXT1 0 +#define SHARED_GPR_EXT_CLK_SEL_EXT2 BIT(0) +#define SHARED_GPR_EXT_CLK_SEL_EXT3 BIT(1) +#define SHARED_GPR_EXT_CLK_SEL_EXT4 GENMASK(1, 0) + +#define SHARED_GPR_A55_CLK 1 +#define SHARED_GPR_A55_CLK_SEL_CCM 0 +#define SHARED_GPR_A55_CLK_SEL_PLL BIT(0) + +#define SHARED_GPR_DRAM_CLK 2 +#define SHARED_GPR_DRAM_CLK_SEL_PLL 0 +#define SHARED_GPR_DRAM_CLK_SEL_CCM BIT(0) + +#define SHARED_GPR_NUM 8 +#define PRIVATE_GPR_NUM 8 + +#define CLK_ROOT_STATUS_OFF BIT(24) +#define CLK_ROOT_STATUS_CHANGING BIT(31) +#define CLK_ROOT_MUX_MASK GENMASK(9, 8) +#define CLK_ROOT_MUX_SHIFT 8 +#define CLK_ROOT_DIV_MASK GENMASK(7, 0) + +#define CCM_AUTHEN_LOCK_TZ BIT(11) +#define CCM_AUTHEN_TZ_NS BIT(9) +#define CCM_AUTHEN_TZ_USER BIT(8) +#define CCM_AUTHEN_CPULPM_MODE BIT(2) +#define CCM_AUTHEN_AUTO_CTRL BIT(3) + +#endif
arch/arm/include/asm/arch-imx9/clock.h +239 -0
239 lines not on this page · raw message
arch/arm/include/asm/arch-imx9/imx-regs.h +5 -1
@@ -8,6 +8,10 @@#define ARCH_MXC -#define IOMUXC_BASE_ADDR 0x443C0000UL +#define IOMUXC_BASE_ADDR 0x443C0000UL +#define CCM_BASE_ADDR 0x44450000UL +#define CCM_CCGR_BASE_ADDR 0x44458000UL + +#define ANATOP_BASE_ADDR 0x44480000UL#endif
arch/arm/mach-imx/imx9/Makefile +1 -1
@@ -3,4 +3,4 @@ # Copyright 2022 NXP obj-y += lowlevel_init.o -obj-y += soc.o clock.o +obj-y += soc.o clock.o clock_root.o
arch/arm/mach-imx/imx9/clock.c +768 -1
782 lines not on this page · raw message
arch/arm/mach-imx/imx9/clock_root.c new file +438 -0
438 lines not on this page · raw message
arch/arm/mach-imx/imx9/soc.c +3 -0
@@ -123,5 +123,8 @@ int ft_system_setup(void *blob, struct bd_info *bd)int arch_cpu_init (void ) { +if (IS_ENABLED (CONFIG_SPL_BUILD )) +clock_init (); +return 0 ; }
Signature · 1 line
2.36.0
PATCH v2 13/53 imx: imx9: Add CCM and clock API support
Quoted 6 lines
From: Peng Fan <[email protected]>
Add clock API to support CCM root clock and LPCG setting Set the CCM AUTHEN register to allow non-secure world to set root clock and lpcg.Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 14/53 mmc: fsl_esdhc_imx: Support i.MX9
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Support i.MX9 for fsl_esdhc_imx driver
--- drivers/mmc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/Kconfig +1 -1
@@ -854,7 +854,7 @@ config FSL_ESDHC_IMX config FSL_USDHC bool "Freescale/NXP i.MX uSDHC controller support" - depends on MX6 || MX7 ||ARCH_MX7ULP || IMX8 || IMX8M || IMX8ULP || IMXRT + depends on MX6 || MX7 ||ARCH_MX7ULP || IMX8 || IMX8M || IMX8ULP || IMX9 || IMXRT select FSL_ESDHC_IMX help This enables the Ultra Secured Digital Host Controller enhancements
Signature · 1 line
2.36.0
PATCH v2 14/53 mmc: fsl_esdhc_imx: Support i.MX9
Quoted 3 lines
From: Peng Fan <[email protected]>
Support i.MX9 forfsl_esdhc_imxdriverSigned-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 15/53 spl: Use SPL_FIT_IMAGE_TINY for iMX9
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Select SPL_FIT_IMAGE_TINY for i.MX9
--- common/spl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/Kconfig +1 -1
@@ -565,7 +565,7 @@ config SPL_FIT_IMAGE_TINY bool "Remove functionality from SPL FIT loading to reduce size" depends on SPL_FIT default y if MACH_SUN50I || MACH_SUN50I_H5 || SUN50I_GEN_H6 - default y if ARCH_IMX8M + default y if ARCH_IMX8M || ARCH_IMX9 help Enable this to reduce the size of the FIT image loading code in SPL, if space for the SPL binary is very tight.
Signature · 1 line
2.36.0
PATCH v2 15/53 spl: Use SPL_FIT_IMAGE_TINY for iMX9
Quoted 3 lines
From: Peng Fan <[email protected]>
SelectSPL_FIT_IMAGE_TINYfor i.MX9Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 16/53 imx: imx9: Add function to initialize timer
In reply to Peng Fan (OSS)From: Jian Li <[email protected]>
Add timer_init to update ARM arch timer with correct frequency from system counter and enable system counter.
--- arch/arm/include/asm/arch-imx9/imx-regs.h | 1 + arch/arm/mach-imx/imx9/soc.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+)
arch/arm/include/asm/arch-imx9/imx-regs.h +1 -0
@@ -11,6 +11,7 @@#define IOMUXC_BASE_ADDR 0x443C0000UL#define CCM_BASE_ADDR 0x44450000UL#define CCM_CCGR_BASE_ADDR 0x44458000UL +#define SYSCNT_CTRL_BASE_ADDR 0x44290000#define ANATOP_BASE_ADDR 0x44480000UL
arch/arm/mach-imx/imx9/soc.c +19 -0
@@ -128,3 +128,22 @@ int arch_cpu_init(void)return 0 ; } + +int timer_init (void ) +{ +#ifdef CONFIG_SPL_BUILD +struct sctr_regs *sctr = (struct sctr_regs *)SYSCNT_CTRL_BASE_ADDR ; +unsigned long freq =readl (&sctr->cntfid0); + +/* Update with accurate clock frequency */ + asmvolatile ("msr cntfrq_el0, %0" : :"r" (freq) :"memory" ); + +clrsetbits_le32 (&sctr->cntcr,SC_CNTCR_FREQ0 |SC_CNTCR_FREQ1 , +SC_CNTCR_FREQ0 |SC_CNTCR_ENABLE |SC_CNTCR_HDBG ); +#endif + + gd->arch.tbl =0 ; + gd->arch.tbu =0 ; + +return 0 ; +}
Signature · 1 line
2.36.0
PATCH v2 16/53 imx: imx9: Add function to initialize timer
Quoted 5 lines
From: Jian Li <[email protected]>
Addtimer_initto update ARM arch timer with correct frequency from system counter and enable system counter.Signed-off-by Jian Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 17/53 imx: imx9: disable watchdog
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Disable all 3 wdogs on AIPS2 and unmask SRC reset trigger for WDOG3-5
--- arch/arm/include/asm/arch-imx9/imx-regs.h | 4 ++ arch/arm/mach-imx/imx9/soc.c | 45 ++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-imx9/imx-regs.h +4 -0
@@ -15,4 +15,8 @@#define ANATOP_BASE_ADDR 0x44480000UL +#define WDG3_BASE_ADDR 0x42490000UL +#define WDG4_BASE_ADDR 0x424a0000UL +#define WDG5_BASE_ADDR 0x424b0000UL +#endif
arch/arm/mach-imx/imx9/soc.c +44 -1
58 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 17/53 imx: imx9: disable watchdog
Quoted 4 lines
From: Ye Li <[email protected]>
Disable all 3 wdogs on AIPS2 and unmask SRC reset trigger for WDOG3-5Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 18/53 imx: imx9: support romapi
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
i.MX9 shares same ROM API with i.MX8ULP, so make the i.MX8ULP the function prototype common and usable by i.MX9.
Also include mmc env functions that use ROM API.
--- arch/arm/include/asm/arch-imx8ulp/sys_proto.h | 4 -- arch/arm/include/asm/mach-imx/sys_proto.h | 4 ++ arch/arm/mach-imx/imx9/soc.c | 37 +++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-)
arch/arm/include/asm/arch-imx8ulp/sys_proto.h +0 -4
@@ -8,10 +8,6 @@#include <asm/mach-imx/sys_proto.h> -extern unsigned long rom_pointer[]; - -ulong spl_romapi_raw_seekable_read (u32 offset,u32 size,void *buf); -ulong spl_romapi_get_uboot_base (u32 image_offset,u32 rom_bt_dev);enum bt_mode get_boot_mode (void );int xrdc_config_pdac (u32 bridge,u32 index,u32 dom,u32 perm);int xrdc_config_pdac_openacc (u32 bridge,u32 index);
arch/arm/include/asm/mach-imx/sys_proto.h +4 -0
@@ -180,6 +180,10 @@ enum boot_dev_type_e {#define ROM_API_OKAY 0xF0extern struct rom_api *g_rom_api; +extern unsigned long rom_pointer[]; + +ulong spl_romapi_raw_seekable_read (u32 offset,u32 size,void *buf); +ulong spl_romapi_get_uboot_base (u32 image_offset,u32 rom_bt_dev);u32 rom_api_download_image (u8 *dest,u32 offset,u32 size);u32 rom_api_query_boot_infor (u32 info_type,u32 *info);
arch/arm/mach-imx/imx9/soc.c +37 -0
@@ -29,6 +29,43 @@DECLARE_GLOBAL_DATA_PTR ; +struct rom_api *g_rom_api = (struct rom_api *)0x1980 ; + +#ifdef CONFIG_ENV_IS_IN_MMC +__weak int board_mmc_get_env_dev (int devno) +{ +return devno; } + +int mmc_get_env_dev (void ) +{ +volatile gd_t *pgd = gd; +int ret; +u32 boot; +u16 boot_type; +u8 boot_instance; + + ret = g_rom_api->query_boot_infor (QUERY_BT_DEV , &boot, + ((uintptr_t )&boot) ^QUERY_BT_DEV ); +set_gd (pgd); + +if (ret !=ROM_API_OKAY ) { +puts ("ROMAPI: failure at query_boot_info\n" ); +return CONFIG_SYS_MMC_ENV_DEV ; + } + + boot_type = boot >>16 ; + boot_instance = (boot >>8 ) &0xff ; + +debug ("boot_type %d, instance %d\n" , boot_type, boot_instance); + +/* If not boot from sd/mmc, use default value */ +if (boot_type !=BOOT_TYPE_SD && boot_type !=BOOT_TYPE_MMC ) +return env_get_ulong ("mmcdev" ,10 ,CONFIG_SYS_MMC_ENV_DEV ); + +return board_mmc_get_env_dev (boot_instance); +} +#endif +u32 get_cpu_rev (void ) {return (MXC_CPU_IMX93 <<12 ) |CHIP_REV_1_0 ;
Signature · 1 line
2.36.0
PATCH v2 18/53 imx: imx9: support romapi
Quoted 5 lines
From: Peng Fan <[email protected]>
i.MX9 shares same ROM API with i.MX8ULP, so make the i.MX8ULP the function prototype common and usable by i.MX9.
Also include mmc env functions that use ROM API.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 19/53 misc: imx: S400_API: Move S400 MU and API to a common place
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Since iMX9 uses S401 which shares the API with iMX8ULP. So move S400 MU driver and API to a common place and selected by CONFIG_IMX_SENTINEL
---
arch/arm/Kconfig | 4 +
arch/arm/include/asm/global_data.h | 2 +-
.../asm/{arch-imx8ulp => mach-imx}/mu_hal.h | 4 +-
.../asm/{arch-imx8ulp => mach-imx}/s400_api.h | 0
arch/arm/mach-imx/imx8ulp/ahab.c | 345 ++++++++++++++++++
arch/arm/mach-imx/imx8ulp/rdc.c | 4 +-
arch/arm/mach-imx/imx8ulp/soc.c | 4 +-
board/freescale/imx8ulp_evk/spl.c | 2 +-
drivers/misc/Kconfig | 7 +
drivers/misc/Makefile | 2 +
drivers/misc/imx8ulp/Makefile | 1 -
drivers/misc/imx8ulp/fuse.c | 2 +-
drivers/misc/sentinel/Makefile | 3 +
drivers/misc/{imx8ulp => sentinel}/s400_api.c | 6 +-
.../{imx8ulp/imx8ulp_mu.c => sentinel/s4mu.c} | 4 +-
15 files changed, 375 insertions(+), 15 deletions(-)
rename arch/arm/include/asm/{arch-imx8ulp => mach-imx}/mu_hal.h (79%)
rename arch/arm/include/asm/{arch-imx8ulp => mach-imx}/s400_api.h (100%)
create mode 100644 arch/arm/mach-imx/imx8ulp/ahab.c
create mode 100644 drivers/misc/sentinel/Makefile
rename drivers/misc/{imx8ulp => sentinel}/s400_api.c (98%)
rename drivers/misc/{imx8ulp/imx8ulp_mu.c => sentinel/s4mu.c} (98%)arch/arm/Kconfig +4 -0
@@ -905,6 +905,8 @@ config ARCH_IMX8ULP select OF_CONTROL select SUPPORT_SPL select GPIO_EXTRA_HEADER + select MISC + select IMX_SENTINEL imply CMD_DM imply DM_EVENT
@@ -914,6 +916,8 @@ config ARCH_IMX9 select DM select MACH_IMX select SUPPORT_SPL + select MISC + select IMX_SENTINEL imply CMD_DM imply DM_EVENT
arch/arm/include/asm/global_data.h +1 -1
@@ -90,7 +90,7 @@ struct arch_global_data {struct udevice *scu_dev;#endif -#ifdef CONFIG_ARCH_IMX8ULP +#ifdef CONFIG_IMX_SENTINEL struct udevice *s400_dev;#endif
arch/arm/include/asm/mach-imx/mu_hal.h renamed from arch/arm/include/asm/arch-imx8ulp/mu_hal.h +2 -2
@@ -3,8 +3,8 @@* Copyright 2021 NXP */ -#ifndef __IMX8ULP_MU_HAL_H__ -#define __IMX8ULP_MU_HAL_H__ +#ifndef __SNT_MU_HAL_H__ +#define __SNT_MU_HAL_H__void mu_hal_init (ulong base);int mu_hal_sendmsg (ulong base,u32 reg_index,u32 msg);
arch/arm/include/asm/mach-imx/s400_api.h renamed from arch/arm/include/asm/arch-imx8ulp/s400_api.h +0 -0
arch/arm/mach-imx/imx8ulp/ahab.c new file +345 -0
345 lines not on this page · raw message
arch/arm/mach-imx/imx8ulp/rdc.c +2 -2
@@ -8,8 +8,8 @@#include <asm/types.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> -#include <asm/arch/mu_hal.h> -#include <asm/arch/s400_api.h> +#include <asm/mach-imx/mu_hal.h> +#include <asm/mach-imx/s400_api.h> #include <asm/arch/rdc.h> #include <div64.h>
arch/arm/mach-imx/imx8ulp/soc.c +2 -2
@@ -14,8 +14,8 @@#include <event.h> #include <spl.h> #include <asm/arch/rdc.h> -#include <asm/arch/s400_api.h> -#include <asm/arch/mu_hal.h> +#include <asm/mach-imx/s400_api.h> +#include <asm/mach-imx/mu_hal.h> #include <cpu_func.h> #include <asm/setup.h> #include <dm.h>
board/freescale/imx8ulp_evk/spl.c +1 -1
@@ -19,7 +19,7 @@#include <asm/arch/ddr.h> #include <asm/arch/rdc.h> #include <asm/arch/upower.h> -#include <asm/arch/s400_api.h> +#include <asm/mach-imx/s400_api.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/misc/Kconfig +7 -0
@@ -350,6 +350,13 @@ config NPCM_OTP To compile this driver as a module, choose M here: the module will be called npcm_otp. +config IMX_SENTINEL + bool "Enable i.MX Sentinel MU driver and API" + depends on MISC && (ARCH_IMX9 || ARCH_IMX8ULP) + help + If you say Y here to enable Message Unit driver to work with + Sentinel core on some NXP i.MX processors. + config NUVOTON_NCT6102D bool "Enable Nuvoton NCT6102D Super I/O driver" help
drivers/misc/Makefile +2 -0
@@ -50,6 +50,8 @@ obj-$(CONFIG_$(SPL_)I2C_EEPROM) += i2c_eeprom.o obj-$(CONFIG_IHS_FPGA) += ihs_fpga.o obj-$(CONFIG_IMX8) += imx8/ obj-$(CONFIG_IMX8ULP) += imx8ulp/ +obj-$(CONFIG_IMX8ULP) += imx8ulp/ +obj-$(CONFIG_IMX_SENTINEL) += sentinel/ obj-$(CONFIG_LED_STATUS) += status_led.o obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o obj-$(CONFIG_MPC83XX_SERDES) += mpc83xx_serdes.o
drivers/misc/imx8ulp/Makefile +0 -1
@@ -1,4 +1,3 @@ # SPDX-License-Identifier: GPL-2.0+ -obj-y += s400_api.o imx8ulp_mu.o obj-$(CONFIG_CMD_FUSE) += fuse.o
drivers/misc/imx8ulp/fuse.c +1 -1
@@ -10,7 +10,7 @@#include <asm/arch/sys_proto.h> #include <asm/arch/imx-regs.h> #include <env.h> -#include <asm/arch/s400_api.h> +#include <asm/mach-imx/s400_api.h> #include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/misc/sentinel/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-y += s400_api.o s4mu.o
drivers/misc/sentinel/s400_api.c renamed from drivers/misc/imx8ulp/s400_api.c +3 -3
@@ -9,7 +9,7 @@#include <malloc.h> #include <asm/io.h> #include <dm.h> -#include <asm/arch/s400_api.h> +#include <asm/mach-imx/s400_api.h> #include <misc.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -275,8 +275,8 @@ int ahab_release_caam(u32 core_did, u32 *response)int ahab_get_fw_version (u32 *fw_version,u32 *sha1,u32 *response) {struct udevice *dev = gd->arch.s400_dev; -int size =sizeof (struct imx8ulp_s400_msg ); -struct imx8ulp_s400_msg msg; +int size =sizeof (struct sentinel_msg ); +struct sentinel_msg msg;int ret;if (!dev) {
drivers/misc/sentinel/s4mu.c renamed from drivers/misc/imx8ulp/imx8ulp_mu.c +2 -2
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 /* -* Copyright 2020 NXP +* Copyright 2020-2022 NXP */ #include <common.h>
@@ -9,7 +9,7 @@#include <dm/lists.h> #include <dm/root.h> #include <dm/device-internal.h> -#include <asm/arch/s400_api.h> +#include <asm/mach-imx/s400_api.h> #include <asm/arch/imx-regs.h> #include <linux/iopoll.h> #include <misc.h>
Signature · 1 line
2.36.0
PATCH v2 19/53 misc: imx: S400_API: Move S400 MU and API to a common place
Quoted 5 lines
From: Ye Li <[email protected]>
Since iMX9 uses S401 which shares the API with iMX8ULP. So move S400 MU driver and API to a common place and selected byCONFIG_IMX_SENTINELSigned-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 20/53 misc: s4mu: Support iMX93 with Sentinel MU
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Support iMX93 communicate with Sentinel
--- arch/arm/include/asm/arch-imx9/imx-regs.h | 30 +++++++++++++++++++++++ drivers/misc/sentinel/s4mu.c | 1 + 2 files changed, 31 insertions(+)
arch/arm/include/asm/arch-imx9/imx-regs.h +30 -0
@@ -19,4 +19,34 @@#define WDG4_BASE_ADDR 0x424a0000UL#define WDG5_BASE_ADDR 0x424b0000UL +#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) +#include <asm/types.h> +#include <stdbool.h> + +struct mu_type { +u32 ver; +u32 par; +u32 cr; +u32 sr; +u32 reserved0[60 ]; +u32 fcr; +u32 fsr; +u32 reserved1[2 ]; +u32 gier; +u32 gcr; +u32 gsr; +u32 reserved2; +u32 tcr; +u32 tsr; +u32 rcr; +u32 rsr; +u32 reserved3[52 ]; +u32 tr[16 ]; +u32 reserved4[16 ]; +u32 rr[16 ]; +u32 reserved5[14 ]; +u32 mu_attr; +}; +#endif +#endif
drivers/misc/sentinel/s4mu.c +1 -0
@@ -219,6 +219,7 @@ static struct misc_ops imx8ulp_mu_ops = {static const struct udevice_id imx8ulp_mu_ids[] = { { .compatible ="fsl,imx8ulp-mu" }, + { .compatible ="fsl,imx93-mu-s4" }, { } };
Signature · 1 line
2.36.0
PATCH v2 20/53 misc: s4mu: Support iMX93 with Sentinel MU
Quoted 3 lines
From: Peng Fan <[email protected]>
Support iMX93 communicate with SentinelSigned-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 21/53 misc: S400_API: Update release RDC API
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
To support more RDC instances on i.MX93, update API to latest definition.
--- arch/arm/include/asm/mach-imx/s400_api.h | 2 +- drivers/misc/sentinel/s400_api.c | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-)
arch/arm/include/asm/mach-imx/s400_api.h +1 -1
@@ -32,7 +32,7 @@ struct imx8ulp_s400_msg {u32 data[(S400_MAX_MSG -1U )]; }; -int ahab_release_rdc (u8 core_id,bool xrdc,u32 *response); +int ahab_release_rdc (u8 core_id,u8 xrdc,u32 *response);int ahab_auth_oem_ctnr (ulong ctnr_addr,u32 *response);int ahab_release_container (u32 *response);int ahab_verify_image (u32 img_id,u32 *response);
drivers/misc/sentinel/s400_api.c +17 -4
@@ -14,7 +14,7 @@DECLARE_GLOBAL_DATA_PTR ; -int ahab_release_rdc (u8 core_id,bool xrdc,u32 *response) +int ahab_release_rdc (u8 core_id,u8 xrdc,u32 *response) {struct udevice *dev = gd->arch.s400_dev;int size =sizeof (struct imx8ulp_s400_msg );
@@ -30,10 +30,23 @@ int ahab_release_rdc(u8 core_id, bool xrdc, u32 *response) msg.tag =AHAB_CMD_TAG ; msg.size =2 ; msg.command =AHAB_RELEASE_RDC_REQ_CID ; -if (xrdc) - msg.data[0 ] = (0x78 <<8 ) | core_id; -else +switch (xrdc) { +case 0 : msg.data[0 ] = (0x74 <<8 ) | core_id; +break ; +case 1 : + msg.data[0 ] = (0x78 <<8 ) | core_id; +break ; +case 2 : + msg.data[0 ] = (0x82 <<8 ) | core_id; +break ; +case 3 : + msg.data[0 ] = (0x86 <<8 ) | core_id; +break ; +default : +printf ("Error: wrong xrdc index %u\n" , xrdc); +return -EINVAL ; + } ret =misc_call (dev, false, &msg, size, &msg, size);if (ret)
Signature · 1 line
2.36.0
PATCH v2 21/53 misc: S400_API: Update release RDC API
Quoted 5 lines
From: Ye Li <[email protected]>
To support more RDC instances on i.MX93, update API to latest definition.Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 22/53 misc: S400_API: New API for FW status and chip info
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add new API to get sentinel FW status and SoC chip info
--- arch/arm/include/asm/mach-imx/s400_api.h | 13 +++++ drivers/misc/sentinel/s400_api.c | 61 ++++++++++++++++++++++++ 2 files changed, 74 insertions(+)
arch/arm/include/asm/mach-imx/s400_api.h +13 -0
@@ -19,8 +19,10 @@#define AHAB_READ_FUSE_REQ_CID 0x97#define AHAB_GET_FW_VERSION_CID 0x9D#define AHAB_RELEASE_RDC_REQ_CID 0xC4 +#define AHAB_GET_FW_STATUS_CID 0xC5#define AHAB_WRITE_FUSE_REQ_CID 0xD6#define AHAB_CAAM_RELEASE_CID 0xD7 +#define AHAB_GET_INFO_CID 0xDA#define S400_MAX_MSG 255U
@@ -32,6 +34,15 @@ struct imx8ulp_s400_msg {u32 data[(S400_MAX_MSG -1U )]; }; +struct sentinel_get_info_data { +u32 hdr; +u32 soc; +u32 lc; +u32 uid[4 ]; +u32 sha256_rom_patch[8 ]; +u32 sha_fw[8 ]; +}; +int ahab_release_rdc (u8 core_id,u8 xrdc,u32 *response);int ahab_auth_oem_ctnr (ulong ctnr_addr,u32 *response);int ahab_release_container (u32 *response);
@@ -42,5 +53,7 @@ int ahab_read_common_fuse(u16 fuse_id, u32 *fuse_words, u32 fuse_num, u32 *respoint ahab_release_caam (u32 core_did,u32 *response);int ahab_get_fw_version (u32 *fw_version,u32 *sha1,u32 *response);int ahab_dump_buffer (u32 *buffer,u32 buffer_length); +int ahab_get_info (struct sentinel_get_info_data *info,u32 *response); +int ahab_get_fw_status (u32 *status,u32 *response);#endif
drivers/misc/sentinel/s400_api.c +61 -0
64 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 22/53 misc: S400_API: New API for FW status and chip info
Quoted 4 lines
From: Peng Fan <[email protected]>
Add new API to get sentinel FW status and SoC chip infoSigned-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 23/53 misc: s400_api: introduce ahab_release_m33_trout
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Introduce Sentinel API ahab_release_m33_trout to make sure sentinel release M33 trout and make sure M33 could boot.
--- arch/arm/include/asm/mach-imx/s400_api.h | 1 + drivers/misc/sentinel/s400_api.c | 25 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+)
arch/arm/include/asm/mach-imx/s400_api.h +1 -0
@@ -55,5 +55,6 @@ int ahab_get_fw_version(u32 *fw_version, u32 *sha1, u32 *response);int ahab_dump_buffer (u32 *buffer,u32 buffer_length);int ahab_get_info (struct sentinel_get_info_data *info,u32 *response);int ahab_get_fw_status (u32 *status,u32 *response); +int ahab_release_m33_trout (void );#endif
drivers/misc/sentinel/s400_api.c +25 -0
@@ -420,3 +420,28 @@ int ahab_get_fw_status(u32 *status, u32 *response)return ret; } + +int ahab_release_m33_trout (void ) +{ +struct udevice *dev = gd->arch.s400_dev; +int size =sizeof (struct sentinel_msg ); +struct sentinel_msg msg; +int ret; + +if (!dev) { +printf ("s400 dev is not initialized\n" ); +return -ENODEV ; + } + + msg.version =AHAB_VERSION ; + msg.tag =AHAB_CMD_TAG ; + msg.size =1 ; + msg.command =0xd3 ; + + ret =misc_call (dev, false, &msg, size, &msg, size); +if (ret) +printf ("Error: %s: ret %d, response 0x%x\n" , + __func__, ret, msg.data[0 ]); + +return ret; +}
Signature · 1 line
2.36.0
PATCH v2 23/53 misc: s400_api: introduce ahab_release_m33_trout
Quoted 4 lines
From: Peng Fan <[email protected]>
Introduce Sentinel APIahab_release_m33_troutto make sure sentinel release M33 trout and make sure M33 could boot.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 24/53 imx: imx9: Add TRDC driver for TRDC init
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Add TRDC driver to iMX9. The TRDC init splits to two phases:
1. Early init phase will release TRDC from Sentinel and open write permission to the memory where SPL image runs. Sentinel will set the memory to RX only after ROM authentication for the OEM closed part.
2. Init phase will configure TRDC to allow non-secure master to access DDR. So the peripherals can work in u-boot.
--- arch/arm/include/asm/arch-imx9/trdc.h | 19 + arch/arm/mach-imx/imx9/Makefile | 2 +- arch/arm/mach-imx/imx9/soc.c | 3 + arch/arm/mach-imx/imx9/trdc.c | 581 ++++++++++++++++++++++++++ 4 files changed, 604 insertions(+), 1 deletion(-) create mode 100644 arch/arm/include/asm/arch-imx9/trdc.h create mode 100644 arch/arm/mach-imx/imx9/trdc.c
arch/arm/include/asm/arch-imx9/trdc.h new file +19 -0
@@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2022 NXP +*/ + +#ifndef __ASM_ARCH_IMX9_TRDC_H +#define __ASM_ARCH_IMX9_TRDC_H + +int trdc_mbc_set_control (ulong trdc_reg,u32 mbc_x,u32 glbac_id,u32 glbac_val); +int trdc_mbc_blk_config (ulong trdc_reg,u32 mbc_x,u32 dom_x,u32 mem_x,u32 blk_x, +bool sec_access,u32 glbac_id); +int trdc_mrc_set_control (ulong trdc_reg,u32 mrc_x,u32 glbac_id,u32 glbac_val); +int trdc_mrc_region_config (ulong trdc_reg,u32 mrc_x,u32 dom_x,u32 addr_start, +u32 addr_end,bool sec_access,u32 glbac_id); + +void trdc_early_init (void ); +void trdc_init (void ); + +#endif
arch/arm/mach-imx/imx9/Makefile +1 -1
@@ -3,4 +3,4 @@ # Copyright 2022 NXP obj-y += lowlevel_init.o -obj-y += soc.o clock.o clock_root.o +obj-y += soc.o clock.o clock_root.o trdc.o
arch/arm/mach-imx/imx9/soc.c +3 -0
@@ -14,6 +14,7 @@#include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> +#include <asm/arch/trdc.h> #include <asm/mach-imx/boot_mode.h> #include <asm/mach-imx/syscounter.h> #include <asm/armv8/mmu.h>
@@ -204,6 +205,8 @@ int arch_cpu_init(void)init_wdog ();clock_init (); + +trdc_early_init (); }return 0 ;
arch/arm/mach-imx/imx9/trdc.c new file +581 -0
581 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 24/53 imx: imx9: Add TRDC driver for TRDC init
Quoted 10 lines
From: Ye Li <[email protected]>
Add TRDC driver to iMX9. The TRDC init splits to two phases:
1. Early init phase will release TRDC from Sentinel and open write permission to the memory where SPL image runs. Sentinel will set the memory to RX only after ROM authentication for the OEM closed part.
2. Init phase will configure TRDC to allow non-secure master to access DDR. So the peripherals can work in u-boot.Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 25/53 imx: imx9: Add AHAB boot support
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Add AHAB driver for iMX9 to do authentication by calling sentinel API
--- arch/arm/mach-imx/imx9/Kconfig | 5 + arch/arm/mach-imx/imx9/Makefile | 1 + arch/arm/mach-imx/imx9/ahab.c | 346 ++++++++++++++++++++++++++++++++ 3 files changed, 352 insertions(+) create mode 100644 arch/arm/mach-imx/imx9/ahab.c
arch/arm/mach-imx/imx9/Kconfig +5 -0
@@ -1,5 +1,10 @@ if ARCH_IMX9 +config AHAB_BOOT + bool "Support i.MX9 AHAB features" + help + This option enables the support for AHAB secure boot. + config IMX9 bool select HAS_CAAM
arch/arm/mach-imx/imx9/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-y += lowlevel_init.o obj-y += soc.o clock.o clock_root.o trdc.o +obj-$(CONFIG_AHAB_BOOT) += ahab.o
arch/arm/mach-imx/imx9/ahab.c new file +346 -0
346 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 25/53 imx: imx9: Add AHAB boot support
Quoted 4 lines
From: Ye Li <[email protected]>
Add AHAB driver for iMX9 to do authentication by calling sentinel APISigned-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 26/53 imx: imx9: Get the chip revision through S400 API
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Update the get chip revision methond to use S400 API, also record other information like lifecycle and UID to global data.
--- arch/arm/include/asm/global_data.h | 3 ++ arch/arm/mach-imx/imx9/soc.c | 49 +++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-)
arch/arm/include/asm/global_data.h +3 -0
@@ -92,6 +92,9 @@ struct arch_global_data {#ifdef CONFIG_IMX_SENTINEL struct udevice *s400_dev; +u32 soc_rev; +u32 lifecycle; +u32 uid[4 ];#endif };
arch/arm/mach-imx/imx9/soc.c +48 -1
75 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 26/53 imx: imx9: Get the chip revision through S400 API
Quoted 4 lines
From: Peng Fan <[email protected]>
Update the get chip revision methond to use S400 API, also record other information like lifecycle and UID to global data.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 27/53 misc: S400_API: Rename imx8ulp_s400_msg to sentinel_msg
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Use more generic name for S40x msg structure
--- arch/arm/include/asm/mach-imx/s400_api.h | 2 +- arch/arm/mach-imx/imx8ulp/rdc.c | 2 +- arch/arm/mach-imx/imx9/trdc.c | 2 +- drivers/misc/sentinel/s400_api.c | 44 ++++++++++++------------ drivers/misc/sentinel/s4mu.c | 6 ++-- 5 files changed, 28 insertions(+), 28 deletions(-)
arch/arm/include/asm/mach-imx/s400_api.h +1 -1
@@ -26,7 +26,7 @@#define S400_MAX_MSG 255U -struct imx8ulp_s400_msg { +struct sentinel_msg {u8 version;u8 size;u8 command;
arch/arm/mach-imx/imx8ulp/rdc.c +1 -1
@@ -184,7 +184,7 @@ int xrdc_config_pdac(u32 bridge, u32 index, u32 dom, u32 perm)int release_rdc (enum rdc_type type) {ulong s_mu_base =0x27020000UL ; -struct imx8ulp_s400_msg msg; +struct sentinel_msg msg;int ret;u32 rdc_id = (type ==RDC_XRDC ) ?0x78 :0x74 ;
arch/arm/mach-imx/imx9/trdc.c +1 -1
@@ -315,7 +315,7 @@ bool trdc_mbc_enabled(ulong trdc_base)int release_rdc (u8 xrdc) {ulong s_mu_base =0x47520000UL ; -struct imx8ulp_s400_msg msg; +struct sentinel_msg msg;int ret;u32 rdc_id;
drivers/misc/sentinel/s400_api.c +22 -22
110 lines not on this page · raw message
drivers/misc/sentinel/s4mu.c +3 -3
@@ -85,7 +85,7 @@ int mu_hal_receivemsg(ulong base, u32 reg_index, u32 *msg)static int imx8ulp_mu_read (struct mu_type *base,void *data) { -struct imx8ulp_s400_msg *msg = (struct imx8ulp_s400_msg *)data; +struct sentinel_msg *msg = (struct sentinel_msg *)data;int ret;u8 count =0 ;
@@ -118,7 +118,7 @@ static int imx8ulp_mu_read(struct mu_type *base, void *data)static int imx8ulp_mu_write (struct mu_type *base,void *data) { -struct imx8ulp_s400_msg *msg = (struct imx8ulp_s400_msg *)data; +struct sentinel_msg *msg = (struct sentinel_msg *)data;int ret;u8 count =0 ;
@@ -171,7 +171,7 @@ static int imx8ulp_mu_call(struct udevice *dev, int no_resp, void *tx_msg,return ret; } - result = ((struct imx8ulp_s400_msg *)rx_msg)->data[0 ]; + result = ((struct sentinel_msg *)rx_msg)->data[0 ];if ((result &0xff ) ==0xd6 )return 0 ;
Signature · 1 line
2.36.0
PATCH v2 27/53 misc: S400_API: Rename imx8ulp_s400_msg to sentinel_msg
Quoted 4 lines
From: Ye Li <[email protected]>
Use more generic name for S40x msg structureSigned-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 28/53 misc: imx8ulp: move fuse.c from imx8ulp to sentinel
In reply to Peng Fan (OSS)From: Alice Guo <[email protected]>
The i.MX93 platform wants to reuse drivers/misc/imx8ulp/fuse.c. Moving fuse.c from the folder imx8ulp to sentinel makes it can be used by other platforms.
---
drivers/misc/Makefile | 2 --
drivers/misc/imx8ulp/Makefile | 3 ---
drivers/misc/sentinel/Makefile | 1 +
drivers/misc/{imx8ulp => sentinel}/fuse.c | 0
4 files changed, 1 insertion(+), 5 deletions(-)
delete mode 100644 drivers/misc/imx8ulp/Makefile
rename drivers/misc/{imx8ulp => sentinel}/fuse.c (100%)drivers/misc/Makefile +0 -2
@@ -49,8 +49,6 @@ obj-$(CONFIG_SANDBOX) += irq_sandbox.o irq_sandbox_test.o obj-$(CONFIG_$(SPL_)I2C_EEPROM) += i2c_eeprom.o obj-$(CONFIG_IHS_FPGA) += ihs_fpga.o obj-$(CONFIG_IMX8) += imx8/ -obj-$(CONFIG_IMX8ULP) += imx8ulp/ -obj-$(CONFIG_IMX8ULP) += imx8ulp/ obj-$(CONFIG_IMX_SENTINEL) += sentinel/ obj-$(CONFIG_LED_STATUS) += status_led.o obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o
drivers/misc/imx8ulp/Makefile deleted +0 -3
@@ -1,3 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ - -obj-$(CONFIG_CMD_FUSE) += fuse.o
drivers/misc/sentinel/Makefile +1 -0
@@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0+ obj-y += s400_api.o s4mu.o +obj-$(CONFIG_CMD_FUSE) += fuse.o
drivers/misc/sentinel/fuse.c renamed from drivers/misc/imx8ulp/fuse.c +0 -0
Signature · 1 line
2.36.0
PATCH v2 28/53 misc: imx8ulp: move fuse.c from imx8ulp to sentinel
Quoted 6 lines
From: Alice Guo <[email protected]>
The i.MX93 platform wants to reusedrivers/misc/imx8ulp/fuse.c. Movingfuse.cfrom the folder imx8ulp to sentinel makes it can be used by other platforms.Signed-off-by Alice Guo <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 29/53 misc: fuse: support to access fuse on i.MX93
In reply to Peng Fan (OSS)From: Alice Guo <[email protected]>
i.MX93 fuse can be accessed through FSB and s400-api. Add mapping tables for i.MX93. The offset address of FSB accessing OTP shadow registers is different between i.MX8ULP and i.MX93, so use macro to define the offset address instead of hardcode.
--- arch/arm/include/asm/arch-imx9/imx-regs.h | 2 ++ drivers/misc/sentinel/fuse.c | 30 ++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-imx9/imx-regs.h +2 -0
@@ -19,6 +19,8 @@#define WDG4_BASE_ADDR 0x424a0000UL#define WDG5_BASE_ADDR 0x424b0000UL +#define FSB_BASE_ADDR 0x47510000UL +#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))#include <asm/types.h> #include <stdbool.h>
drivers/misc/sentinel/fuse.c +29 -1
@@ -31,6 +31,9 @@ struct s400_map_entry {u32 s400_index; }; +#if defined(CONFIG_IMX8ULP ) +#define FSB_OTP_SHADOW 0x800 +struct fsb_map_entry fsb_mapping_table[] = { {3 ,8 }, { 4, 8 },
@@ -65,6 +68,31 @@ struct s400_map_entry s400_api_mapping_table[] = { { 23, 1, 4, 2 }, /* OTFAD */ { 25, 8 }, /* Test config2 */ }; +#elif defined(CONFIG_ARCH_IMX9) +#define FSB_OTP_SHADOW 0x8000 + +struct fsb_map_entry fsb_mapping_table[] = { + { 0, 8 }, + { 1, 8 }, + { 2, 8 }, + { -1, 8 }, + { 4, 8 }, + { 5, 8 }, + { 6, 8 }, /* UID */ + { -1, 8 }, + { 8, 8 }, + { 9, 8 }, + { 10, 8 }, +}; + +struct s400_map_entry s400_api_mapping_table[] = { + { 3, 11 }, /* 24 .. 34 */ + { 7, 8 }, + { 16, 11 }, /* 128 .. 143 */ + { 22, 8 }, + { 23, 8 }, +}; +#endif static s32 map_fsb_fuse_index(u32 bank, u32 word, bool *redundancy) {
@@ -128,7 +156,7 @@ int fuse_sense(u32 bank, u32 word, u32 *val) word_index =map_fsb_fuse_index (bank, word, &redundancy);if (word_index >=0 ) { - *val =readl ((ulong )FSB_BASE_ADDR +0x800 + (word_index <<2 )); + *val =readl ((ulong )FSB_BASE_ADDR +FSB_OTP_SHADOW + (word_index <<2 ));if (redundancy) *val = (*val >> ((word %2 ) *16 )) &0xFFFF ;
Signature · 1 line
2.36.0
PATCH v2 29/53 misc: fuse: support to access fuse on i.MX93
Quoted 7 lines
From: Alice Guo <[email protected]>
i.MX93 fuse can be accessed through FSB and s400-api. Add mapping tables for i.MX93. The offset address of FSB accessing OTP shadow registers is different between i.MX8ULP and i.MX93, so use macro to define the offset address instead of hardcode.Signed-off-by Alice Guo <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 30/53 misc: fuse: update the code for accessing fuse of i.MX93
In reply to Peng Fan (OSS)From: Alice Guo <[email protected]>
Sentinel have read access of OTP shadow register 0-511, and fsb have read access of shadow 0-51/312-511.
--- drivers/misc/sentinel/fuse.c | 86 +++++++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 12 deletions(-)
drivers/misc/sentinel/fuse.c +74 -12
@@ -75,22 +75,44 @@ struct fsb_map_entry fsb_mapping_table[] = { { 0, 8 }, { 1, 8 }, { 2, 8 }, - { -1, 8 }, + { 3, 8 }, { 4, 8 }, { 5, 8 }, - { 6, 8 }, /* UID */ - { -1, 8 }, - { 8, 8 }, - { 9, 8 }, - { 10, 8 }, + { 6, 4 }, + { -1, 260 }, + { 39, 8 }, + { 40, 8 }, + { 41, 8 }, + { 42, 8 }, + { 43, 8 }, + { 44, 8 }, + { 45, 8 }, + { 46, 8 }, + { 47, 8 }, + { 48, 8 }, + { 49, 8 }, + { 50, 8 }, + { 51, 8 }, + { 52, 8 }, + { 53, 8 }, + { 54, 8 }, + { 55, 8 }, + { 56, 8 }, + { 57, 8 }, + { 58, 8 }, + { 59, 8 }, + { 60, 8 }, + { 61, 8 }, + { 62, 8 }, + { 63, 8 }, }; struct s400_map_entry s400_api_mapping_table[] = { - { 3, 11 }, /* 24 .. 34 */ - { 7, 8 }, - { 16, 11 }, /* 128 .. 143 */ - { 22, 8 }, - { 23, 8 }, + { 7, 1, 7, 63 }, + { 16, 8, }, + { 17, 8, }, + { 22, 1, 6 }, + { 23, 1, 4 }, }; #endif
@@ -102,7 +124,8 @@ static s32 map_fsb_fuse_index(u32 bank, u32 word, bool *redundancy)/* map the fuse from ocotp fuse map to FSB*/ for (i =0 ; i < size; i++) {if (fsb_mapping_table[i].fuse_bank !=-1 && - fsb_mapping_table[i].fuse_bank == bank) { + fsb_mapping_table[i].fuse_bank == bank && + fsb_mapping_table[i].fuse_words > word) {break ; }
@@ -146,6 +169,7 @@ static s32 map_s400_fuse_index(u32 bank, u32 word)return s400_api_mapping_table[i].fuse_bank *8 + word; } +#if defined(CONFIG_IMX8ULP )int fuse_sense (u32 bank,u32 word,u32 *val) {s32 word_index;
@@ -198,6 +222,44 @@ int fuse_sense(u32 bank, u32 word, u32 *val)return -ENOENT ; } +#elif defined(CONFIG_ARCH_IMX9 ) +int fuse_sense (u32 bank,u32 word,u32 *val) +{ +s32 word_index; +bool redundancy; + +if (bank >=FUSE_BANKS || word >=WORDS_PER_BANKS || !val) +return -EINVAL ; + + word_index =map_fsb_fuse_index (bank, word, &redundancy); +if (word_index >=0 ) { + *val =readl ((ulong )FSB_BASE_ADDR +FSB_OTP_SHADOW + (word_index <<2 )); +if (redundancy) + *val = (*val >> ((word %2 ) *16 )) &0xFFFF ; + +return 0 ; + } + + word_index =map_s400_fuse_index (bank, word); +if (word_index >=0 ) { +u32 data; +u32 res, size =1 ; +int ret; + + ret =ahab_read_common_fuse (word_index, &data, size, &res); +if (ret) { +printf ("ahab read fuse failed %d, 0x%x\n" , ret, res); +return ret; + } + + *val = data; + +return 0 ; + } + +return -ENOENT ; +} +#endif int fuse_read (u32 bank,u32 word,u32 *val) {
Signature · 1 line
2.36.0
PATCH v2 30/53 misc: fuse: update the code for accessing fuse of i.MX93
Quoted 6 lines
From: Alice Guo <[email protected]>
Sentinel have read access of OTP shadow register 0-511, and fsb have read access of shadow 0-51/312-511.Reviewed-by Ye Li <[email protected]>Signed-off-by Alice Guo <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 31/53 imx: imx9: Add gpio registers structure
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Add GPIO registers structure for iMX93, so that we can enable lpgpio driver
--- arch/arm/Kconfig | 1 + arch/arm/include/asm/arch-imx9/gpio.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+)
arch/arm/Kconfig +1 -0
@@ -916,6 +916,7 @@ config ARCH_IMX9 select DM select MACH_IMX select SUPPORT_SPL + select GPIO_EXTRA_HEADER select MISC select IMX_SENTINEL imply CMD_DM
arch/arm/include/asm/arch-imx9/gpio.h +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2022 NXP +*/ + +#ifndef __ASM_ARCH_IMX9_GPIO_H +#define __ASM_ARCH_IMX9_GPIO_H + +struct gpio_regs { +u32 gpio_pdor; +u32 gpio_psor; +u32 gpio_pcor; +u32 gpio_ptor; +u32 gpio_pdir; +u32 gpio_pddr; +u32 gpio_pidr; +u8 gpio_pxdr[32 ]; +}; + +#endif
Signature · 1 line
2.36.0
PATCH v2 31/53 imx: imx9: Add gpio registers structure
Quoted 5 lines
From: Ye Li <[email protected]>
Add GPIO registers structure for iMX93, so that we can enable lpgpio driverSigned-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 32/53 imx: imx9: Add MIX power init
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add power init of MEDIAMIX, MLMIX and DDRMIX. And clear isolation of MIPI DSI/CSI, USBPHY after the power up.
SPL should call the power init in its boot sequence before accessing above three MIX and USB.
--- arch/arm/include/asm/arch-imx9/imx-regs.h | 173 +++++++++++++++++++++ arch/arm/include/asm/arch-imx9/sys_proto.h | 1 + arch/arm/mach-imx/imx9/soc.c | 101 ++++++++++++ 3 files changed, 275 insertions(+)
arch/arm/include/asm/arch-imx9/imx-regs.h +173 -0
@@ -21,6 +21,24 @@#define FSB_BASE_ADDR 0x47510000UL +#define ANATOP_BASE_ADDR 0x44480000UL + +#define BLK_CTRL_WAKEUPMIX_BASE_ADDR 0x42420000 +#define BLK_CTRL_S_ANOMIX_BASE_ADDR 0x444f0000 + +#define SRC_IPS_BASE_ADDR (0x44460000) +#define SRC_GLOBAL_RBASE (SRC_IPS_BASE_ADDR + 0x0000) + +#define SRC_DDR_RBASE (SRC_IPS_BASE_ADDR + 0x1000) +#define SRC_ML_RBASE (SRC_IPS_BASE_ADDR + 0x1800) +#define SRC_MEDIA_RBASE (SRC_IPS_BASE_ADDR + 0x2400) +#define SRC_M33P_RBASE (SRC_IPS_BASE_ADDR + 0x2800) + +#define SRC_MIX_SLICE_FUNC_STAT_PSW_STAT BIT(0) +#define SRC_MIX_SLICE_FUNC_STAT_RST_STAT BIT(2) +#define SRC_MIX_SLICE_FUNC_STAT_ISO_STAT BIT(4) +#define SRC_MIX_SLICE_FUNC_STAT_MEM_STAT BIT(12) +#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))#include <asm/types.h> #include <stdbool.h>
@@ -49,6 +67,161 @@ struct mu_type {u32 reserved5[14 ];u32 mu_attr; }; + +enum mix_power_domain { +MIX_PD_MEDIAMIX , +MIX_PD_MLMIX , +MIX_PD_DDRMIX , +}; + +enum src_mix_slice_id { +SRC_MIX_EDGELOCK =0 , +SRC_MIX_AONMIX =1 , +SRC_MIX_WAKEUPMIX =2 , +SRC_MIX_DDRMIX =3 , +SRC_MIX_DDRPHY =4 , +SRC_MIX_ML =5 , +SRC_MIX_NIC =6 , +SRC_MIX_HSIO =7 , +SRC_MIX_MEDIA =8 , +SRC_MIX_CM33 =9 , +SRC_MIX_CA55C0 =10 , +SRC_MIX_CA55C1 =11 , +SRC_MIX_CA55CLUSTER =12 , +}; + +enum src_mem_slice_id { +SRC_MEM_AONMIX =0 , +SRC_MEM_WAKEUPMIX =1 , +SRC_MEM_DDRMIX =2 , +SRC_MEM_DDRPHY =3 , +SRC_MEM_ML =4 , +SRC_MEM_NIC =5 , +SRC_MEM_OCRAM =6 , +SRC_MEM_HSIO =7 , +SRC_MEM_MEDIA =8 , +SRC_MEM_CA55C0 =9 , +SRC_MEM_CA55C1 =10 , +SRC_MEM_CA55CLUSTER =11 , +SRC_MEM_L3 =12 , +}; + +struct blk_ctrl_s_aonmix_regs { +u32 cm33_irq_mask[7 ]; +u32 initnsvtor; +u32 reserved1[8 ]; +u32 ca55_irq_mask[7 ]; +u32 initsvtor; +u32 m33_cfg; +u32 reserved2[11 ]; +u32 axbs_aon_ctrl; +u32 reserved3[27 ]; +u32 dap_access_stkybit; +u32 reserved4[3 ]; +u32 lp_handshake[2 ]; +u32 ca55_cpuwait; +u32 ca55_rvbaraddr0_l; +u32 ca55_rvbaraddr0_h; +u32 ca55_rvbaraddr1_l; +u32 ca55_rvbaraddr1_h; +u32 s401_irq_mask; +u32 s401_reset_req_mask; +u32 s401_halt_st; +u32 ca55_mode; +u32 nmi_mask; +u32 nmi_clr; +u32 wdog_any_mask; +u32 s4v1_ipi_noclk_ref1; +}; + +struct blk_ctrl_wakeupmix_regs { +u32 upper_addr; +u32 ipg_debug_cm33; +u32 reserved[2 ]; +u32 qch_dis; +u32 ssi; +u32 reserved1[1 ]; +u32 dexsc_err; +u32 mqs_setting; +u32 sai_clk_sel; +u32 eqos_gpr; +u32 enet_clk_sel; +u32 reserved2[1 ]; +u32 volt_detect; +u32 i3c2_wakeup; +u32 ipg_debug_ca55c0; +u32 ipg_debug_ca55c1; +u32 axi_attr_cfg; +u32 i3c2_sda_irq; +}; + +struct src_general_regs { +u32 reserved[1 ]; +u32 authen_ctrl; +u32 reserved1[2 ]; +u32 scr; +u32 srtmr; +u32 srmask; +u32 reserved2[1 ]; +u32 srmr[6 ]; +u32 reserved3[2 ]; +u32 sbmr[2 ]; +u32 reserved4[2 ]; +u32 srsr; +u32 gpr[19 ]; +u32 reserved5[24 ]; +u32 gpr20; +u32 cm_quiesce; +u32 cold_reset_ssar_ack_ctrl; +u32 sp_iso_ctrl; +u32 rom_lp_ctrl; +u32 a55_deny_stat; +}; + +struct src_mem_slice_regs { +u32 reserved[1 ]; +u32 mem_ctrl; +u32 memlp_ctrl_0; +u32 reserved1[1 ]; +u32 memlp_ctrl_1; +u32 memlp_ctrl_2; +u32 mem_stat; +}; + +struct src_mix_slice_regs { +u32 reserved[1 ]; +u32 authen_ctrl; +u32 reserved1[2 ]; +u32 lpm_setting[3 ]; +u32 reserved2[1 ]; +u32 slice_sw_ctrl; +u32 single_reset_sw_ctrl; +u32 reserved3[6 ]; +u32 a55_hdsk_ack_ctrl; +u32 a55_hdsk_ack_stat; +u32 reserved4[2 ]; +u32 ssar_ack_ctrl; +u32 ssar_ack_stat; +u32 reserved5[1 ]; +u32 iso_off_dly_por; +u32 iso_on_dly; +u32 iso_off_dly; +u32 psw_off_lf_dly; +u32 reserved6[1 ]; +u32 psw_off_hf_dly; +u32 psw_on_lf_dly; +u32 psw_on_hf_dly; +u32 reserved7[1 ]; +u32 psw_ack_ctrl[2 ]; +u32 psw_ack_stat; +u32 reserved8[1 ]; +u32 mtr_ack_ctrl; +u32 mtr_ack_stat; +u32 reserved9[2 ]; +u32 upi_stat[4 ]; +u32 fsm_stat; +u32 func_stat; +};#endif #endif
arch/arm/include/asm/arch-imx9/sys_proto.h +1 -0
@@ -8,4 +8,5 @@#include <asm/mach-imx/sys_proto.h> +void soc_power_init (void );#endif
arch/arm/mach-imx/imx9/soc.c +101 -0
110 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 32/53 imx: imx9: Add MIX power init
Quoted 6 lines
From: Peng Fan <[email protected]>
Add power init of MEDIAMIX, MLMIX and DDRMIX. And clear isolation of MIPI DSI/CSI, USBPHY after the power up.
SPL should call the power init in its boot sequence before accessing above three MIX and USB.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 33/53 imx: imx9: Add M33 release prepare function
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
To support on-demand booting M33 image from A core. SPL needs to follow M33 kick up sequence to release M33 firstly, then set M33 CPUWAIT signal. ATF will clear CPUWAIT to kick M33 to run.
The prepare function also works around the M33 TCM ECC issue by clean the TCM. Also enable sentinel handshake and WDOG1 clock for M33 stop and reset.
--- arch/arm/include/asm/arch-imx9/sys_proto.h | 2 + arch/arm/mach-imx/imx9/soc.c | 51 ++++++++++++++++++++++ 2 files changed, 53 insertions(+)
arch/arm/include/asm/arch-imx9/sys_proto.h +2 -0
@@ -9,4 +9,6 @@#include <asm/mach-imx/sys_proto.h> void soc_power_init (void ); +bool m33_is_rom_kicked (void ); +int m33_prepare (void );#endif
arch/arm/mach-imx/imx9/soc.c +51 -0
60 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 33/53 imx: imx9: Add M33 release prepare function
Quoted 10 lines
From: Peng Fan <[email protected]>
To support on-demand booting M33 image from A core. SPL needs to follow M33 kick up sequence to release M33 firstly, then set M33 CPUWAIT signal. ATF will clear CPUWAIT to kick M33 to run.
The prepare function also works around the M33 TCM ECC issue by clean the TCM. Also enable sentinel handshake and WDOG1 clock for M33 stop and reset.Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 34/53 imx: imx9: Support booting m33 from Acore
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add bootaux command to support on-demand booting M33 from u-boot. It kicks M33 via ATF by "bootaux 0x201e0000 0"
--- arch/arm/mach-imx/imx9/Makefile | 4 + arch/arm/mach-imx/imx9/imx_bootaux.c | 133 +++++++++++++++++++++++++++ arch/arm/mach-imx/imx9/soc.c | 10 +- include/imx_sip.h | 1 + 4 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-imx/imx9/imx_bootaux.c
arch/arm/mach-imx/imx9/Makefile +4 -0
@@ -5,3 +5,7 @@ obj-y += lowlevel_init.o obj-y += soc.o clock.o clock_root.o trdc.o obj-$(CONFIG_AHAB_BOOT) += ahab.o + +#ifndef CONFIG_SPL_BUILD +obj-y += imx_bootaux.o +#endif
arch/arm/mach-imx/imx9/imx_bootaux.c new file +133 -0
133 lines not on this page · raw message
arch/arm/mach-imx/imx9/soc.c +9 -1
@@ -131,6 +131,14 @@ static struct mm_region imx93_mem_map[] = { .size = 0x100000UL, .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE + }, { +/* TCM */ + .virt = 0x201c0000UL, + .phys = 0x201c0000UL, + .size = 0x80000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE | + PTE_BLOCK_PXN | PTE_BLOCK_UXN }, {/* OCRAM */ .virt = 0x20480000UL,
@@ -380,7 +388,7 @@ void soc_power_init(void)disable_isolation (); } -static bool m33_is_rom_kicked (void ) +bool m33_is_rom_kicked (void ) {struct blk_ctrl_s_aonmix_regs *s_regs = (struct blk_ctrl_s_aonmix_regs *)BLK_CTRL_S_ANOMIX_BASE_ADDR ;
include/imx_sip.h +1 -0
@@ -15,5 +15,6 @@#define IMX_SIP_SRC 0xC2000005#define IMX_SIP_SRC_M4_START 0x00#define IMX_SIP_SRC_M4_STARTED 0x01 +#define IMX_SIP_SRC_M4_STOP 0x02#endif
Signature · 1 line
2.36.0
PATCH v2 34/53 imx: imx9: Support booting m33 from Acore
Quoted 4 lines
From: Peng Fan <[email protected]>
Add bootaux command to support on-demand booting M33 from u-boot. It kicks M33 via ATF by "bootaux0x201e00000"Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 35/53 imx: imx9: Support multiple env storages at runtime
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Select env storages according to boot device at runtime
--- arch/arm/mach-imx/imx9/soc.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/arm/mach-imx/imx9/soc.c +34 -0
@@ -288,6 +288,40 @@ int timer_init(void)return 0 ; } +enum env_location env_get_location (enum env_operation op,int prio) +{ +enum boot_device dev =get_boot_device (); +enum env_location env_loc =ENVL_UNKNOWN ; + +if (prio) +return env_loc; + +switch (dev) { +#if defined(CONFIG_ENV_IS_IN_SPI_FLASH ) +case QSPI_BOOT : + env_loc =ENVL_SPI_FLASH ; +break ; +#endif +#if defined(CONFIG_ENV_IS_IN_MMC ) +case SD1_BOOT : +case SD2_BOOT : +case SD3_BOOT : +case MMC1_BOOT : +case MMC2_BOOT : +case MMC3_BOOT : + env_loc =ENVL_MMC ; +break ; +#endif +default : +#if defined(CONFIG_ENV_IS_NOWHERE ) + env_loc =ENVL_NOWHERE ; +#endif +break ; + } + +return env_loc; +} +static int mix_power_init (enum mix_power_domain pd) {enum src_mix_slice_id mix_id;
Signature · 1 line
2.36.0
PATCH v2 35/53 imx: imx9: Support multiple env storages at runtime
Quoted 4 lines
From: Ye Li <[email protected]>
Select env storages according to boot device at runtimeSigned-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 36/53 imx: imx9: clock: Add DDR clock support
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Implement the DDR driver clock interfaces for set DDR rate and bypass DDR PLL
--- arch/arm/include/asm/arch-imx9/clock.h | 3 ++ arch/arm/mach-imx/imx9/clock.c | 41 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+)
arch/arm/include/asm/arch-imx9/clock.h +3 -0
@@ -213,6 +213,9 @@ void init_clk_usdhc(u32 index);int enable_i2c_clk (unsigned char enable,u32 i2c_num);u32 imx_get_i2cclk (u32 i2c_num);u32 mxc_get_clock (enum mxc_clock clk); +void dram_pll_init (ulong pll_val); +void dram_enable_bypass (ulong clk_val); +void dram_disable_bypass (void );int ccm_clk_src_on (enum ccm_clk_src oscpll,bool enable);int ccm_clk_src_auto (enum ccm_clk_src oscpll,bool enable);
arch/arm/mach-imx/imx9/clock.c +41 -0
47 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 36/53 imx: imx9: clock: Add DDR clock support
Quoted 5 lines
From: Ye Li <[email protected]>
Implement the DDR driver clock interfaces for set DDR rate and bypass DDR PLLSigned-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 37/53 ddr: imx: Add i.MX9 DDR controller driver
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Since i.MX9 uses same DDR PHY with i.MX8M, split the DDRPHY to a common directory under imx, then use dedicated ddr controller driver for each iMX9 and iMX8M.
The DDRPHY registers are space compressed, so it needs conversion to access the DDRPHY address. Introduce a common PHY address remap function for both iMX8M and iMX9 for all PHY registers accessing.
---
arch/arm/include/asm/arch-imx8m/ddr.h | 6 +-
arch/arm/include/asm/arch-imx9/ddr.h | 126 +++++
drivers/Makefile | 1 +
drivers/ddr/imx/Kconfig | 2 +
drivers/ddr/imx/imx8m/Kconfig | 1 +
drivers/ddr/imx/imx8m/Makefile | 3 +-
drivers/ddr/imx/imx8m/ddr_init.c | 219 ++++++++
drivers/ddr/imx/imx9/Kconfig | 21 +
drivers/ddr/imx/imx9/Makefile | 10 +
drivers/ddr/imx/imx9/ddr_init.c | 485 ++++++++++++++++++
drivers/ddr/imx/phy/Kconfig | 4 +
drivers/ddr/imx/phy/Makefile | 9 +
drivers/ddr/imx/{imx8m => phy}/ddrphy_csr.c | 0
drivers/ddr/imx/{imx8m => phy}/ddrphy_train.c | 1 -
drivers/ddr/imx/phy/ddrphy_utils.c | 169 ++++++
drivers/ddr/imx/{imx8m => phy}/helper.c | 45 +-
16 files changed, 1077 insertions(+), 25 deletions(-)
create mode 100644 arch/arm/include/asm/arch-imx9/ddr.h
create mode 100644 drivers/ddr/imx/imx9/Kconfig
create mode 100644 drivers/ddr/imx/imx9/Makefile
create mode 100644 drivers/ddr/imx/imx9/ddr_init.c
create mode 100644 drivers/ddr/imx/phy/Kconfig
create mode 100644 drivers/ddr/imx/phy/Makefile
rename drivers/ddr/imx/{imx8m => phy}/ddrphy_csr.c (100%)
rename drivers/ddr/imx/{imx8m => phy}/ddrphy_train.c (98%)
create mode 100644 drivers/ddr/imx/phy/ddrphy_utils.c
rename drivers/ddr/imx/{imx8m => phy}/helper.c (79%)arch/arm/include/asm/arch-imx8m/ddr.h +4 -2
@@ -725,6 +725,8 @@ void update_umctl2_rank_space_setting(unsigned int pstat_num);void get_trained_CDD (unsigned int fsp);unsigned int lpddr4_mr_read (unsigned int mr_rank,unsigned int mr_addr); +ulong ddrphy_addr_remap (uint32_t paddr_apb_from_ctlr); +static inline void reg32_write (unsigned long addr,u32 val) {writel (val, addr);
@@ -741,9 +743,9 @@ static inline void reg32setbit(unsigned long addr, u32 bit) }#define dwc_ddrphy_apb_wr (addr, data) \ - reg32_write(IP2APB_DDRPHY_IPS_BASE_ADDR(0) + 4 * (addr), data) + reg32_write(IP2APB_DDRPHY_IPS_BASE_ADDR(0) + ddrphy_addr_remap(addr), data)#define dwc_ddrphy_apb_rd (addr) \ - reg32_read(IP2APB_DDRPHY_IPS_BASE_ADDR(0) + 4 * (addr)) + reg32_read(IP2APB_DDRPHY_IPS_BASE_ADDR(0) + ddrphy_addr_remap(addr))extern struct dram_cfg_param ddrphy_trained_csr[];extern uint32_t ddrphy_trained_csr_num;
arch/arm/include/asm/arch-imx9/ddr.h new file +126 -0
126 lines not on this page · raw message
drivers/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_ARMADA_XP) += ddr/marvell/axp/ obj-$(CONFIG_$(SPL_)ALTERA_SDRAM) += ddr/altera/ obj-$(CONFIG_ARCH_IMX8M) += ddr/imx/imx8m/ obj-$(CONFIG_IMX8ULP_DRAM) += ddr/imx/imx8ulp/ +obj-$(CONFIG_ARCH_IMX9) += ddr/imx/imx9/ obj-$(CONFIG_SPL_DM_RESET) += reset/ obj-$(CONFIG_SPL_MUSB_NEW) += usb/musb-new/ obj-$(CONFIG_SPL_USB_GADGET) += usb/gadget/
drivers/ddr/imx/Kconfig +2 -0
@@ -1,2 +1,4 @@ source "drivers/ddr/imx/imx8m/Kconfig" source "drivers/ddr/imx/imx8ulp/Kconfig" +source "drivers/ddr/imx/imx9/Kconfig" +source "drivers/ddr/imx/phy/Kconfig"
drivers/ddr/imx/imx8m/Kconfig +1 -0
@@ -3,6 +3,7 @@ menu "i.MX8M DDR controllers" config IMX8M_DRAM bool "imx8m dram" + select IMX_SNPS_DDR_PHY config IMX8M_LPDDR4 bool "imx8m lpddr4"
drivers/ddr/imx/imx8m/Makefile +2 -1
@@ -5,5 +5,6 @@ # ifdef CONFIG_SPL_BUILD -obj-$(CONFIG_IMX8M_DRAM) += helper.o ddrphy_utils.o ddrphy_train.o ddrphy_csr.o ddr_init.o +obj-$(CONFIG_IMX8M_DRAM) += ddr_init.o +obj-y += ../phy/ endif
drivers/ddr/imx/imx8m/ddr_init.c +219 -0
234 lines not on this page · raw message
drivers/ddr/imx/imx9/Kconfig new file +21 -0
@@ -0,0 +1,21 @@ +menu "i.MX9 DDR controllers" + depends on ARCH_IMX9 + +config IMX9_DRAM + bool "imx9 dram" + select IMX_SNPS_DDR_PHY + +config IMX9_LPDDR4X + bool "imx9 lpddr4 and lpddr4x" + select IMX9_DRAM + help + Select the i.MX9 LPDDR4/4X driver support on i.MX9 SOC. + +config SAVED_DRAM_TIMING_BASE + hex "Define the base address for saved dram timing" + help + after DRAM is trained, need to save the dram related timming + info into memory for low power use. + default 0x204DC000 + +endmenu
drivers/ddr/imx/imx9/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +# +# Copyright 2018 NXP +# +# SPDX-License-Identifier: GPL-2.0+ +# + +ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_IMX9_DRAM) += ddr_init.o +obj-y += ../phy/ +endif
drivers/ddr/imx/imx9/ddr_init.c new file +485 -0
485 lines not on this page · raw message
drivers/ddr/imx/phy/Kconfig new file +4 -0
@@ -0,0 +1,4 @@ +config IMX_SNPS_DDR_PHY + bool "i.MX Snopsys DDR PHY" + help + Select the DDR PHY driver support on i.MX8M and i.MX9 SOC.
drivers/ddr/imx/phy/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# +# Copyright 2018 NXP +# +# SPDX-License-Identifier: GPL-2.0+ +# + +ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_IMX_SNPS_DDR_PHY) += helper.o ddrphy_utils.o ddrphy_train.o ddrphy_csr.o +endif
drivers/ddr/imx/phy/ddrphy_csr.c renamed from drivers/ddr/imx/imx8m/ddrphy_csr.c +0 -0
drivers/ddr/imx/phy/ddrphy_train.c renamed from drivers/ddr/imx/imx8m/ddrphy_train.c +0 -1
@@ -7,7 +7,6 @@#include <log.h> #include <linux/kernel.h> #include <asm/arch/ddr.h> -#include <asm/arch/lpddr4_define.h> #include <asm/arch/sys_proto.h> int ddr_cfg_phy (struct dram_timing_info *dram_timing)
drivers/ddr/imx/phy/ddrphy_utils.c new file +169 -0
169 lines not on this page · raw message
drivers/ddr/imx/phy/helper.c renamed from drivers/ddr/imx/imx8m/helper.c +24 -21
91 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 37/53 ddr: imx: Add i.MX9 DDR controller driver
Quoted 9 lines
From: Ye Li <[email protected]>
Since i.MX9 uses same DDR PHY with i.MX8M, split the DDRPHY to a common directory under imx, then use dedicated ddr controller driver for each iMX9 and iMX8M.
The DDRPHY registers are space compressed, so it needs conversion to access the DDRPHY address. Introduce a common PHY address remap function for both iMX8M and iMX9 for all PHY registers accessing.Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
Re: [PATCH V2 37/53] ddr: imx: Add i.MX9 DDR controller driver
In reply to Peng Fan (OSS)Hi Peng, Marcel,
Quoted 13 lines · Peng Fan (OSS)
From: Ye Li <[email protected]>
Since i.MX9 uses same DDR PHY with i.MX8M, split the DDRPHY to a common directory under imx, then use dedicated ddr controller driver for each iMX9 and iMX8M.
The DDRPHY registers are space compressed, so it needs conversion to access the DDRPHY address. Introduce a common PHY address remap function for both iMX8M and iMX9 for all PHY registers accessing.
Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>---
[...]
Quoted 4 lines
drivers/ddr/imx/phy/ddrphy_utils.c new file +4
-0+int wait_ddrphy_training_complete (void ) +{ +unsigned int mail; +
drivers/ddr/imx/phy/ddrphy_utils.c line 101
Quoted 10 lines
drivers/ddr/imx/phy/ddrphy_utils.c new file +10
-0+while (1 ) { + mail =get_mail (); +decode_major_message (mail); +if (mail ==0x08 ) { +decode_streaming_message (); + }else if (mail ==0x07 ) { +debug ("Training PASS\n" ); +return 0 ; + }else if (mail ==0xff ) { +printf ("Training FAILED\n" );
Our SPL for "kontron-sl-mx8mm" calls ddr_init() multiple times as it tries multiple configurations and it is expected that it sometimes fails and falls back to another config: [1].
Other boards like "verdin-mx8mp" seem to have a similar approach: [2].
With this change in v2022.10 we now get "Training FAILED" printed to the console on our boards with 1GB DDR, even if the training of the fallback configuration afterwards succeeded. This is kind of misleading for the user.
Do you have any idea what would be a good way to suppress this message in our case? Passing a parameter like "fail_expected" all the way from the boards spl_dram_init() down to wait_ddrphy_training_complete() doesn't seem optimal, but removing the message in wait_ddrphy_training_complete() and duplicating it in each spl_dram_init() doesn't seem like a good option either.
Maybe you have some idea how to handle this!?
Thanks
Frieder
[1]
https://source.denx.de/u-boot/u-boot/-/blob/master/board/kontron/sl-mx8mm/spl.c#L79
[2]
https://source.denx.de/u-boot/u-boot/-/blob/master/board/toradex/verdin-imx8mp/spl.c#L40
PATCH v2 38/53 ddr: imx9: enable Performance monitor counter
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Add Kconfig for enabling reference events counter in DDRC performance monitor by default
--- drivers/ddr/imx/imx9/Kconfig | 6 ++++++ drivers/ddr/imx/imx9/ddr_init.c | 4 ++++ 2 files changed, 10 insertions(+)
drivers/ddr/imx/imx9/Kconfig +6 -0
@@ -11,6 +11,12 @@ config IMX9_LPDDR4X help Select the i.MX9 LPDDR4/4X driver support on i.MX9 SOC. +config IMX9_DRAM_PM_COUNTER + bool "imx9 DDRC performance monitor counter" + default y + help + Enable DDR controller performance monitor counter for reference events. + config SAVED_DRAM_TIMING_BASE hex "Define the base address for saved dram timing" help
drivers/ddr/imx/imx9/ddr_init.c +4 -0
@@ -112,6 +112,10 @@ int ddr_init(struct dram_timing_info *dram_timing)ddrc_config (dram_timing->ddrc_cfg, dram_timing->ddrc_cfg_num);debug ("DDRINFO: ddrc config done\n" ); +#ifdef CONFIG_IMX9_DRAM_PM_COUNTER +writel (0x200000 ,REG_DDR_DEBUG_19 ); +#endif +check_dfi_init_complete (); regval =readl (REG_DDR_SDRAM_CFG );
Signature · 1 line
2.36.0
PATCH v2 38/53 ddr: imx9: enable Performance monitor counter
Quoted 5 lines
From: Ye Li <[email protected]>
AddKconfigfor enabling reference events counter in DDRC performance monitor by defaultSigned-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 39/53 arm: dts: Add i.MX93 SoC DTSi file
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add the DTSi file and DT header files for i.MX93 SoC
--- arch/arm/dts/imx93.dtsi | 688 ++++++++++++++++++++++++ include/dt-bindings/clock/imx93-clock.h | 203 +++++++ include/dt-bindings/power/imx93-power.h | 12 + 3 files changed, 903 insertions(+) create mode 100644 arch/arm/dts/imx93.dtsi create mode 100644 include/dt-bindings/clock/imx93-clock.h create mode 100644 include/dt-bindings/power/imx93-power.h
arch/arm/dts/imx93.dtsi new file +688 -0
@@ -0,0 +1,688 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2021 NXP + */ + +#include <dt-bindings/clock/imx93-clock.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> +#include <dt-bindings/power/imx93-power.h> +#include <dt-bindings/usb/pd.h> + +#include "imx93-pinfunc.h" + +/ { + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + aliases { + gpio0 = &gpio1; + gpio1 = &gpio2; + gpio2 = &gpio3; + gpio3 = &gpio4; + mmc0 = &usdhc1; + mmc1 = &usdhc2; + mmc2 = &usdhc3; + ethernet0 = &fec; + ethernet1 = &eqos; + serial0 = &lpuart1; + serial1 = &lpuart2; + serial2 = &lpuart3; + serial3 = &lpuart4; + serial4 = &lpuart5; + serial5 = &lpuart6; + serial6 = &lpuart7; + serial7 = &lpuart8; + i2c0 = &lpi2c1; + i2c1 = &lpi2c2; + i2c2 = &lpi2c3; + i2c3 = &lpi2c4; + i2c4 = &lpi2c5; + i2c5 = &lpi2c6; + usb0 = &usbotg1; + usb1 = &usbotg2; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + A55_0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x0>; + enable-method = "psci"; + #cooling-cells = <2>; + }; + + A55_1: cpu@100 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x100>; + enable-method = "psci"; + #cooling-cells = <2>; + }; + + }; + + osc_32k: clock-osc-32k { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + clock-output-names = "osc_32k"; + }; + + osc_24m: clock-osc-24m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + clock-output-names = "osc_24m"; + }; + + clk_ext1: clock-ext1 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <133000000>; + clock-output-names = "clk_ext1"; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>; + clock-frequency = <24000000>; + arm,no-tick-in-suspend; + interrupt-parent = <&gic>; + }; + + gic: interrupt-controller@48000000 { + compatible = "arm,gic-v3"; + reg = <0 0x48000000 0 0x10000>, + <0 0x48040000 0 0xc0000>; + #interrupt-cells = <3>; + interrupt-controller; + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&gic>; + }; + + soc@0 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 0x0 0x80000000>, + <0x28000000 0x0 0x28000000 0x10000000>; + + aips1: bus@44000000 { + compatible = "fsl,aips-bus", "simple-bus"; + reg = <0x44000000 0x800000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + mu1: mailbox@44230000 { + compatible = "fsl,imx93-mu", "fsl,imx8ulp-mu"; + reg = <0x44230000 0x10000>; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; + #mbox-cells = <2>; + status = "disabled"; + }; + + anomix_ns_gpr: blk-ctrl-anomix@42420000 { + compatible = "syscon"; + reg = <0x44210000 0x1000>; + }; + + system_counter: timer@44290000 { + compatible = "nxp,sysctr-timer"; + reg = <0x44290000 0x30000>; + interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&osc_24m>; + clock-names = "per"; + }; + + i3c1: i3c-master@44330000 { + #address-cells = <3>; + #size-cells = <0>; + compatible = "fsl,imx93-i3c-master", "silvaco,i3c-master"; + reg = <0x44330000 0x10000>; + interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_I3C1_GATE>, + <&clk IMX93_CLK_I3C1_GATE>, + <&clk IMX93_CLK_DUMMY>; + clock-names = "pclk", "fast_clk", "slow_clk"; + status = "disabled"; + }; + + lpi2c1: i2c@44340000 { + compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x44340000 0x10000>; + interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPI2C1_GATE>, + <&clk IMX93_CLK_LPI2C1_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + + lpi2c2: i2c@44350000 { + compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x44350000 0x10000>; + interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPI2C2_GATE>, + <&clk IMX93_CLK_LPI2C2_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + + lpspi1: spi@44360000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx93-spi", "fsl,imx7ulp-spi"; + reg = <0x44360000 0x10000>; + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPSPI1_GATE>, + <&clk IMX93_CLK_LPSPI1_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + + lpspi2: spi@44370000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx93-spi", "fsl,imx7ulp-spi"; + reg = <0x44370000 0x10000>; + interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPSPI2_GATE>, + <&clk IMX93_CLK_LPSPI2_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + + lpuart1: serial@44380000 { + compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", + "fsl,imx7ulp-lpuart"; + reg = <0x44380000 0x1000>; + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPUART1_GATE>; + clock-names = "ipg"; + status = "disabled"; + }; + + lpuart2: serial@44390000 { + compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", + "fsl,imx7ulp-lpuart"; + reg = <0x44390000 0x1000>; + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPUART2_GATE>; + clock-names = "ipg"; + status = "disabled"; + }; + + iomuxc: pinctrl@443c0000 { + compatible = "fsl,imx93-iomuxc"; + reg = <0x443c0000 0x10000>; + }; + + clk: clock-controller@44450000 { + compatible = "fsl,imx93-ccm"; + reg = <0x44450000 0x10000>; + #clock-cells = <1>; + clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>; + clock-names = "osc_32k", "osc_24m", "clk_ext1"; + assigned-clocks = <&clk IMX93_CLK_AUDIO_PLL>; + assigned-clock-rates = <393216000>; + status = "okay"; + }; + + anatop: anatop@44480000 { + compatible = "fsl,imx93-anatop", "syscon"; + reg = <0x44480000 0x10000>; + }; + + adc1: adc@44530000 { + compatible = "nxp,imx93-adc"; + reg = <0x44530000 0x10000>; + interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_ADC1_GATE>; + clock-names = "ipg"; + status = "disabled"; + }; + }; + + aips2: bus@42000000 { + compatible = "fsl,aips-bus", "simple-bus"; + reg = <0x42000000 0x800000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + wakeupmix_gpr: blk-ctrl-wakeupmix@42420000 { + compatible = "syscon"; + reg = <0x42420000 0x1000>; + }; + + mu2: mailbox@42440000 { + compatible = "fsl,imx93-mu", "fsl,imx8ulp-mu"; + reg = <0x42440000 0x10000>; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; + #mbox-cells = <2>; + status = "disabled"; + }; + + wdog3: wdog@42490000 { + compatible = "fsl,imx93-wdt"; + reg = <0x42490000 0x10000>; + interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_WDOG3_GATE>; + timeout-sec = <40>; + status = "disabled"; + }; + + tpm4: pwm@424f0000 { + compatible = "fsl,imx7ulp-pwm"; + reg = <0x424f0000 0x1000>; + clocks = <&clk IMX93_CLK_TPM4_GATE>; + assigned-clocks = <&clk IMX93_CLK_TPM4>; + assigned-clock-parents = <&clk IMX93_CLK_24M>; + assigned-clock-rates = <24000000>; + #pwm-cells = <3>; + status = "disabled"; + }; + + i3c2: i3c-master@42520000 { + #address-cells = <3>; + #size-cells = <0>; + compatible = "fsl,imx93-i3c-master", "silvaco,i3c-master"; + reg = <0x42520000 0x10000>; + interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_I3C2_GATE>, + <&clk IMX93_CLK_I3C2_GATE>, + <&clk IMX93_CLK_DUMMY>; + clock-names = "pclk", "fast_clk", "slow_clk"; + status = "disabled"; + }; + + lpi2c3: i2c@42530000 { + compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x42530000 0x10000>; + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPI2C3_GATE>, + <&clk IMX93_CLK_LPI2C3_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + + lpi2c4: i2c@42540000 { + compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x42540000 0x10000>; + interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPI2C4_GATE>, + <&clk IMX93_CLK_LPI2C4_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + + lpspi3: spi@42550000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx93-spi", "fsl,imx7ulp-spi"; + reg = <0x42550000 0x10000>; + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPSPI3_GATE>, + <&clk IMX93_CLK_LPSPI3_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + + lpspi4: spi@42560000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx93-spi", "fsl,imx7ulp-spi"; + reg = <0x42560000 0x10000>; + interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPSPI4_GATE>, + <&clk IMX93_CLK_LPSPI4_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + + lpuart3: serial@42570000 { + compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", + "fsl,imx7ulp-lpuart"; + reg = <0x42570000 0x1000>; + interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPUART3_GATE>; + clock-names = "ipg"; + status = "disabled"; + }; + + lpuart4: serial@42580000 { + compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", + "fsl,imx7ulp-lpuart"; + reg = <0x42580000 0x1000>; + interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPUART4_GATE>; + clock-names = "ipg"; + status = "disabled"; + }; + + lpuart5: serial@42590000 { + compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", + "fsl,imx7ulp-lpuart"; + reg = <0x42590000 0x1000>; + interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPUART5_GATE>; + clock-names = "ipg"; + status = "disabled"; + }; + + lpuart6: serial@425a0000 { + compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", + "fsl,imx7ulp-lpuart"; + reg = <0x425a0000 0x1000>; + interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPUART6_GATE>; + clock-names = "ipg"; + status = "disabled"; + }; + + flexspi: spi@425e0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "nxp,imx8mm-fspi"; + reg = <0x425e0000 0x10000>, <0x28000000 0x10000000>; + reg-names = "fspi_base", "fspi_mmap"; + interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_DUMMY>, + <&clk IMX93_CLK_DUMMY>; + clock-names = "fspi", "fspi_en"; + status = "disabled"; + }; + + lpuart7: serial@42690000 { + compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", + "fsl,imx7ulp-lpuart"; + reg = <0x42690000 0x1000>; + interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPUART7_GATE>; + clock-names = "ipg"; + status = "disabled"; + }; + + lpuart8: serial@426a0000 { + compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", + "fsl,imx7ulp-lpuart"; + reg = <0x426a0000 0x1000>; + interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPUART8_GATE>; + clock-names = "ipg"; + status = "disabled"; + }; + + lpi2c5: i2c@426b0000 { + compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x426b0000 0x10000>; + interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPI2C5_GATE>, + <&clk IMX93_CLK_LPI2C5_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + + lpi2c6: i2c@426c0000 { + compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x426c0000 0x10000>; + interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_LPI2C6_GATE>, + <&clk IMX93_CLK_LPI2C6_GATE>; + clock-names = "per", "ipg"; + status = "disabled"; + }; + }; + + aips3: bus@42800000 { + compatible = "fsl,aips-bus", "simple-bus"; + reg = <0x42800000 0x800000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + usdhc1: mmc@42850000 { + compatible = "fsl,imx93-usdhc", "fsl,imx8mm-usdhc"; + reg = <0x42850000 0x10000>; + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_DUMMY>, + <&clk IMX93_CLK_DUMMY>, + <&clk IMX93_CLK_USDHC1_GATE>; + clock-names = "ipg", "ahb", "per"; + bus-width = <8>; + fsl,tuning-start-tap = <20>; + fsl,tuning-step= <2>; + status = "disabled"; + }; + + usdhc2: mmc@42860000 { + compatible = "fsl,imx93-usdhc", "fsl,imx8mm-usdhc"; + reg = <0x42860000 0x10000>; + interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_DUMMY>, + <&clk IMX93_CLK_DUMMY>, + <&clk IMX93_CLK_USDHC2_GATE>; + clock-names = "ipg", "ahb", "per"; + bus-width = <4>; + fsl,tuning-start-tap = <20>; + fsl,tuning-step= <2>; + status = "disabled"; + }; + + fec: ethernet@42890000 { + compatible = "fsl,imx93-fec", "fsl,imx8mp-fec", "fsl,imx8mq-fec"; + reg = <0x42890000 0x10000>; + interrupts = <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_WAKEUP_AXI>, + <&clk IMX93_CLK_WAKEUP_AXI>, + <&clk IMX93_CLK_ENET_TIMER1>, + <&clk IMX93_CLK_ENET_REF>, + <&clk IMX93_CLK_ENET_REF_PHY>; + clock-names = "ipg", "ahb", "ptp", + "enet_clk_ref", "enet_out"; + assigned-clocks = <&clk IMX93_CLK_ENET_TIMER1>, + <&clk IMX93_CLK_ENET_REF>, + <&clk IMX93_CLK_ENET_REF_PHY>; + assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>, + <&clk IMX93_CLK_SYS_PLL_PFD0_DIV2>, + <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>; + assigned-clock-rates = <100000000>, <250000000>, <50000000>; + fsl,num-tx-queues = <3>; + fsl,num-rx-queues = <3>; + fsl,wakeup_irq = <2>; + status = "disabled"; + }; + + eqos: ethernet@428a0000 { + compatible = "nxp,imx93-dwmac-eqos", "snps,dwmac-5.10a"; + reg = <0x428a0000 0x10000>; + interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "eth_wake_irq", "macirq"; + clocks = <&clk IMX93_CLK_WAKEUP_AXI>, + <&clk IMX93_CLK_WAKEUP_AXI>, + <&clk IMX93_CLK_ENET_TIMER2>, + <&clk IMX93_CLK_ENET>, + <&clk IMX93_CLK_WAKEUP_AXI>; + clock-names = "stmmaceth", "pclk", "ptp_ref", "tx", "mem"; + assigned-clocks = <&clk IMX93_CLK_ENET_TIMER2>, + <&clk IMX93_CLK_ENET>; + assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>, + <&clk IMX93_CLK_SYS_PLL_PFD0_DIV2>; + assigned-clock-rates = <100000000>, <250000000>; + intf_mode = <&wakeupmix_gpr 0x28>; + clk_csr = <0>; + status = "disabled"; + }; + + usdhc3: mmc@428b0000 { + compatible = "fsl,imx93-usdhc", "fsl,imx8mm-usdhc"; + reg = <0x428b0000 0x10000>; + interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_DUMMY>, + <&clk IMX93_CLK_DUMMY>, + <&clk IMX93_CLK_USDHC3_GATE>; + clock-names = "ipg", "ahb", "per"; + bus-width = <4>; + fsl,tuning-start-tap = <20>; + fsl,tuning-step= <2>; + status = "disabled"; + }; + }; + + gpio2: gpio@43810000 { + compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio"; + reg = <0x43810080 0x1000>, <0x43810040 0x40>; + gpio-controller; + #gpio-cells = <2>; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-ranges = <&iomuxc 0 32 32>; + }; + + gpio3: gpio@43820000 { + compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio"; + reg = <0x43820080 0x1000>, <0x43820040 0x40>; + gpio-controller; + #gpio-cells = <2>; + interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-ranges = <&iomuxc 0 64 32>; + }; + + gpio4: gpio@43830000 { + compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio"; + reg = <0x43830080 0x1000>, <0x43830040 0x40>; + gpio-controller; + #gpio-cells = <2>; + interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-ranges = <&iomuxc 0 96 32>; + }; + + gpio1: gpio@47400000 { + compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio"; + reg = <0x47400080 0x1000>, <0x47400040 0x40>; + gpio-controller; + #gpio-cells = <2>; + interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-ranges = <&iomuxc 0 0 32>; + }; + + ocotp: efuse@47510000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,imx93-ocotp", "syscon"; + reg = <0x47510000 0x1000>; + status = "disabled"; + }; + + s4muap: s4muap@47520000 { + compatible = "fsl,imx93-mu-s4"; + reg = <0x47520000 0x10000>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "txirq", "rxirq"; + #mbox-cells = <2>; + status = "okay"; + }; + + sentnl_mu: sentnl-mu { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,imx-sentnl"; + mboxes = <&s4muap 0 0 &s4muap 1 0>; + mbox-names = "tx", "rx"; + fsl,sentnl_mu_id = <2>; + fsl,sentnl_mu_max_users = <4>; + status = "okay"; + dma-ranges = <0x80000000 0x80000000 0x20000000>; + }; + + ddr-pmu@4e300e00 { + compatible = "fsl,imx93-ddr-pmu"; + reg = <0x4e300dc0 0x200>; /* _dc0 ~ _eb8 */ + interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; + }; + + usbphynop1: usbphynop1 { + compatible = "usb-nop-xceiv"; + clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>; + clock-names = "main_clk"; + }; + + usbotg1: usb@4c100000 { + compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb"; + reg = <0x4c100000 0x200>; + interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>; + clock-names = "usb1_ctrl_root_clk"; + assigned-clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>; + assigned-clock-parents = <&clk IMX93_CLK_HSIO>; + fsl,usbphy = <&usbphynop1>; + fsl,usbmisc = <&usbmisc1 0>; + status = "disabled"; + }; + + usbmisc1: usbmisc@4c100200 { + compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc"; + #index-cells = <1>; + reg = <0x4c100200 0x200>; + }; + + usbphynop2: usbphynop2 { + compatible = "usb-nop-xceiv"; + clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>; + clock-names = "main_clk"; + }; + + usbotg2: usb@4c200000 { + compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb"; + reg = <0x4c200000 0x200>; + interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>; + clock-names = "usb2_ctrl_root_clk"; + assigned-clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>; + assigned-clock-parents = <&clk IMX93_CLK_HSIO>; + fsl,usbphy = <&usbphynop2>; + fsl,usbmisc = <&usbmisc2 0>; + status = "disabled"; + }; + + usbmisc2: usbmisc@4c200200 { + compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc"; + #index-cells = <1>; + reg = <0x4c200200 0x200>; + }; + }; +};
include/dt-bindings/clock/imx93-clock.h new file +203 -0
203 lines not on this page · raw message
include/dt-bindings/power/imx93-power.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright 2021 NXP +*/ + +#ifndef __DT_BINDINGS_IMX93_POWER_H__ +#define __DT_BINDINGS_IMX93_POWER_H__ + +#define IMX93_POWER_DOMAIN_MLMIX 0 +#define IMX93_POWER_DOMAIN_MEDIAMIX 1 + +#endif
Signature · 1 line
2.36.0
PATCH v2 39/53 arm: dts: Add i.MX93 SoC DTSi file
Quoted 5 lines
From: Peng Fan <[email protected]>
Add the DTSi file and DT header files for i.MX93 SoCSigned-off-by Ye Li <[email protected]>Signed-off-by Alice Guo <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 40/53 imx: imx93_evk: Add basic board support
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add basic board codes and defconfig for i.MX93 11x11 EVK board.
--- arch/arm/dts/Makefile | 3 + arch/arm/dts/imx93-11x11-evk-u-boot.dtsi | 157 +++ arch/arm/dts/imx93-11x11-evk.dts | 527 +++++++ arch/arm/mach-imx/imx9/Kconfig | 12 + board/freescale/common/Makefile | 2 +- board/freescale/imx93_evk/Kconfig | 19 + board/freescale/imx93_evk/MAINTAINERS | 6 + board/freescale/imx93_evk/Makefile | 12 + board/freescale/imx93_evk/imx93_evk.c | 58 + board/freescale/imx93_evk/lpddr4x_timing.c | 1486 ++++++++++++++++++++ board/freescale/imx93_evk/spl.c | 126 ++ configs/imx93_11x11_evk_defconfig | 108 ++ include/configs/imx93_evk.h | 145 ++ 13 files changed, 2660 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/imx93-11x11-evk-u-boot.dtsi create mode 100644 arch/arm/dts/imx93-11x11-evk.dts create mode 100644 board/freescale/imx93_evk/Kconfig create mode 100644 board/freescale/imx93_evk/MAINTAINERS create mode 100644 board/freescale/imx93_evk/Makefile create mode 100644 board/freescale/imx93_evk/imx93_evk.c create mode 100644 board/freescale/imx93_evk/lpddr4x_timing.c create mode 100644 board/freescale/imx93_evk/spl.c create mode 100644 configs/imx93_11x11_evk_defconfig create mode 100644 include/configs/imx93_evk.h
arch/arm/dts/Makefile +3 -0
@@ -971,6 +971,9 @@ dtb-$(CONFIG_ARCH_IMX8M) += \ imx8mq-pico-pi.dtb \ imx8mq-kontron-pitx-imx8m.dtb +dtb-$(CONFIG_ARCH_IMX9) += \ + imx93-11x11-evk.dtb + dtb-$(CONFIG_ARCH_IMXRT) += imxrt1050-evk.dtb \ imxrt1020-evk.dtb
arch/arm/dts/imx93-11x11-evk-u-boot.dtsi new file +157 -0
157 lines not on this page · raw message
arch/arm/dts/imx93-11x11-evk.dts new file +527 -0
527 lines not on this page · raw message
arch/arm/mach-imx/imx9/Kconfig +12 -0
@@ -18,5 +18,17 @@ config IMX93 config SYS_SOC default "imx9" +choice + prompt "NXP i.MX9 board select" + optional + +config TARGET_IMX93_11X11_EVK + bool "imx93_11x11_evk" + select IMX93 + +endchoice + +source "board/freescale/imx93_evk/Kconfig" + endif
board/freescale/common/Makefile +1 -1
@@ -65,7 +65,7 @@ obj-$(CONFIG_ZM7300) += zm7300.o obj-$(CONFIG_POWER_PFUZE100) += pfuze.o obj-$(CONFIG_DM_PMIC_PFUZE100) += pfuze.o obj-$(CONFIG_POWER_MC34VR500) += mc34vr500.o -ifneq (,$(filter $(SOC), imx8ulp)) +ifneq (,$(filter $(SOC), imx8ulp imx9)) obj-y += mmc.o endif
board/freescale/imx93_evk/Kconfig new file +19 -0
@@ -0,0 +1,19 @@ +if TARGET_IMX93_11X11_EVK + +config SYS_BOARD + default "imx93_evk" + +config SYS_VENDOR + default "freescale" + +config SYS_CONFIG_NAME + default "imx93_evk" + +config IMX93_EVK_LPDDR4X + bool "Using LPDDR4X Timing and PMIC voltage" + default y + select IMX9_LPDDR4X + help + Select the LPDDR4X timing and 0.6V VDDQ + +endif
board/freescale/imx93_evk/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +i.MX93 MEK BOARD +M: Peng Fan <[email protected]> +S: Maintained +F: board/freescale/imx93_evk/ +F: include/configs/imx93_evk.h +F: configs/imx93_11x11_evk_defconfig
board/freescale/imx93_evk/Makefile new file +12 -0
@@ -0,0 +1,12 @@ +# +# Copyright 2022 NXP +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += imx93_evk.o + +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +obj-$(CONFIG_IMX93_EVK_LPDDR4X) += lpddr4x_timing.o +endif
board/freescale/imx93_evk/imx93_evk.c new file +58 -0
58 lines not on this page · raw message
board/freescale/imx93_evk/lpddr4x_timing.c new file +1486 -0
1,486 lines not on this page · raw message
board/freescale/imx93_evk/spl.c new file +126 -0
126 lines not on this page · raw message
configs/imx93_11x11_evk_defconfig new file +108 -0
108 lines not on this page · raw message
include/configs/imx93_evk.h new file +145 -0
145 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 40/53 imx: imx93_evk: Add basic board support
Quoted 4 lines
From: Peng Fan <[email protected]>
Add basic board codes and defconfig for i.MX93 11x11 EVK board.Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 41/53 imx: imx93_evk: Set ARM clock to 1.7Ghz
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Set ARM clock to OD frequency 1.7Ghz, since we have set PMIC VDD_SOC to Overdrive voltage 0.9V
--- arch/arm/include/asm/arch-imx9/clock.h | 4 +++- arch/arm/mach-imx/imx9/clock.c | 9 +++++++++ board/freescale/imx93_evk/spl.c | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-imx9/clock.h +3 -1
@@ -217,6 +217,8 @@ void dram_pll_init(ulong pll_val);void dram_enable_bypass (ulong clk_val);void dram_disable_bypass (void ); +int configure_intpll (enum ccm_clk_src pll,u32 freq); +int ccm_clk_src_on (enum ccm_clk_src oscpll,bool enable);int ccm_clk_src_auto (enum ccm_clk_src oscpll,bool enable);int ccm_clk_src_lpm (enum ccm_clk_src oscpll,bool enable);
@@ -238,5 +240,5 @@ int ccm_shared_gpr_tz_access(u32 gpr, bool non_secure, bool user_mode, bool lockvoid enable_usboh3_clk (unsigned char enable);int set_clk_enet (enum enet_freq type);int set_clk_eqos (enum enet_freq type); - +void set_arm_clk (ulong freq);#endif
arch/arm/mach-imx/imx9/clock.c +9 -0
@@ -665,6 +665,15 @@ void dram_disable_bypass(void)/* Switch from DRAM clock root from CCM to PLL */ ccm_shared_gpr_set(SHARED_GPR_DRAM_CLK, SHARED_GPR_DRAM_CLK_SEL_PLL); } + +void set_arm_clk (ulong freq) +{ +/* Increase ARM clock to 1.7Ghz */ +ccm_shared_gpr_set (SHARED_GPR_A55_CLK ,SHARED_GPR_A55_CLK_SEL_CCM ); +configure_intpll (ARM_PLL_CLK ,1700000000 ); +ccm_shared_gpr_set (SHARED_GPR_A55_CLK ,SHARED_GPR_A55_CLK_SEL_PLL ); +} +#endif int clock_init (void )
board/freescale/imx93_evk/spl.c +3 -0
@@ -108,6 +108,9 @@ void board_init_f(ulong dummy) }power_init_board (); +/* 1.7GHz */ +set_arm_clk (1700000000 ); +/* Init power of mix */ soc_power_init ();
Signature · 1 line
2.36.0
PATCH v2 41/53 imx: imx93_evk: Set ARM clock to 1.7Ghz
Quoted 5 lines
From: Peng Fan <[email protected]>
Set ARM clock to OD frequency 1.7Ghz, since we have set PMICVDD_SOCto Overdrive voltage 0.9VSigned-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 42/53 net: fec_mxc: support i.MX93
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Support i.MX93 in fec_mxc driver
--- drivers/net/Kconfig | 2 +- drivers/net/fec_mxc.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/Kconfig +1 -1
@@ -349,7 +349,7 @@ config FEC_MXC_MDIO_BASE config FEC_MXC bool "FEC Ethernet controller" - depends on MX28 || MX5 || MX6 || MX7 || IMX8 || IMX8M || IMX8ULP || VF610 + depends on MX28 || MX5 || MX6 || MX7 || IMX8 || IMX8M || IMX8ULP || IMX93 || VF610 help This driver supports the 10/100 Fast Ethernet controller for NXP i.MX processors.
drivers/net/fec_mxc.c +3 -1
@@ -598,7 +598,8 @@ static int fecmxc_init(struct udevice *dev)writel (0x00000000 , &fec->eth->gaddr2);/* Do not access reserved register */ -if (!is_mx6ul () && !is_mx6ull () && !is_imx8 () && !is_imx8m () && !is_imx8ulp ()) { +if (!is_mx6ul () && !is_mx6ull () && !is_imx8 () && !is_imx8m () && !is_imx8ulp () && + !is_imx93 ()) {/* clear MIB RAM */ for (i = mib_ptr; i <= mib_ptr +0xfc ; i +=4 )writel (0 , i);
@@ -1357,6 +1358,7 @@ static const struct udevice_id fecmxc_ids[] = { { .compatible = "fsl,imx53-fec" }, { .compatible = "fsl,imx7d-fec" }, { .compatible = "fsl,mvf600-fec" }, + { .compatible = "fsl,imx93-fec" }, { } };
Signature · 1 line
2.36.0
PATCH v2 42/53 net: fec_mxc: support i.MX93
Quoted 4 lines
From: Peng Fan <[email protected]>
Support i.MX93 infec_mxcdriverReviewed-by Ramon Fried <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 43/53 net: dwc_eth_qos: fix build break when CLK not enabled
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
When CONFIG_CLK is not enabled, there will be buil break:
"error: ‘eqos’ undeclared (first use in this function)"
Take eqos definition out the CONFIG_CLK ifdef.
--- drivers/net/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dwc_eth_qos.c +1 -1
@@ -1774,11 +1774,11 @@ static int eqos_remove_resources_tegra186(struct udevice *dev)static int eqos_remove_resources_stm32 (struct udevice *dev) { -#ifdef CONFIG_CLK struct eqos_priv *eqos =dev_get_priv (dev);debug ("%s(dev=%p):\n" , __func__, dev); +#ifdef CONFIG_CLK clk_free (&eqos->clk_tx);clk_free (&eqos->clk_rx);clk_free (&eqos->clk_master_bus);
Signature · 1 line
2.36.0
PATCH v2 43/53 net: dwc_eth_qos: fix build break when CLK not enabled
Quoted 5 lines
From: Peng Fan <[email protected]>
WhenCONFIG_CLKis not enabled, there will be buil break:
"error: ‘eqos’ undeclared (first use in this function)" Take eqos definition out theCONFIG_CLKifdef.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 44/53 net: dwc_eth_qos: public some functions
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Move macros and structures to header file and make some functions public, so that could used by other files, this is to prepare split platform specific config to one file.
--- drivers/net/dwc_eth_qos.c | 280 +------------------------------------- drivers/net/dwc_eth_qos.h | 280 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 287 insertions(+), 273 deletions(-) create mode 100644 drivers/net/dwc_eth_qos.h
drivers/net/dwc_eth_qos.c +7 -273
@@ -51,275 +51,9 @@#include <asm/arch/clock.h> #include <asm/mach-imx/sys_proto.h> #endif -#include <linux/bitops.h> #include <linux/delay.h> -/* Core registers */ - -#define EQOS_MAC_REGS_BASE 0x000 -struct eqos_mac_regs { -uint32_t configuration;/* 0x000 */ -uint32_t unused_004[(0x070 -0x004 ) /4 ];/* 0x004 */ -uint32_t q0_tx_flow_ctrl;/* 0x070 */ -uint32_t unused_070[(0x090 -0x074 ) /4 ];/* 0x074 */ -uint32_t rx_flow_ctrl;/* 0x090 */ -uint32_t unused_094;/* 0x094 */ -uint32_t txq_prty_map0;/* 0x098 */ -uint32_t unused_09c;/* 0x09c */ -uint32_t rxq_ctrl0;/* 0x0a0 */ -uint32_t unused_0a4;/* 0x0a4 */ -uint32_t rxq_ctrl2;/* 0x0a8 */ -uint32_t unused_0ac[(0x0dc -0x0ac ) /4 ];/* 0x0ac */ -uint32_t us_tic_counter;/* 0x0dc */ -uint32_t unused_0e0[(0x11c -0x0e0 ) /4 ];/* 0x0e0 */ -uint32_t hw_feature0;/* 0x11c */ -uint32_t hw_feature1;/* 0x120 */ -uint32_t hw_feature2;/* 0x124 */ -uint32_t unused_128[(0x200 -0x128 ) /4 ];/* 0x128 */ -uint32_t mdio_address;/* 0x200 */ -uint32_t mdio_data;/* 0x204 */ -uint32_t unused_208[(0x300 -0x208 ) /4 ];/* 0x208 */ -uint32_t address0_high;/* 0x300 */ -uint32_t address0_low;/* 0x304 */ -}; - -#define EQOS_MAC_CONFIGURATION_GPSLCE BIT(23) -#define EQOS_MAC_CONFIGURATION_CST BIT(21) -#define EQOS_MAC_CONFIGURATION_ACS BIT(20) -#define EQOS_MAC_CONFIGURATION_WD BIT(19) -#define EQOS_MAC_CONFIGURATION_JD BIT(17) -#define EQOS_MAC_CONFIGURATION_JE BIT(16) -#define EQOS_MAC_CONFIGURATION_PS BIT(15) -#define EQOS_MAC_CONFIGURATION_FES BIT(14) -#define EQOS_MAC_CONFIGURATION_DM BIT(13) -#define EQOS_MAC_CONFIGURATION_LM BIT(12) -#define EQOS_MAC_CONFIGURATION_TE BIT(1) -#define EQOS_MAC_CONFIGURATION_RE BIT(0) - -#define EQOS_MAC_Q0_TX_FLOW_CTRL_PT_SHIFT 16 -#define EQOS_MAC_Q0_TX_FLOW_CTRL_PT_MASK 0xffff -#define EQOS_MAC_Q0_TX_FLOW_CTRL_TFE BIT(1) - -#define EQOS_MAC_RX_FLOW_CTRL_RFE BIT(0) - -#define EQOS_MAC_TXQ_PRTY_MAP0_PSTQ0_SHIFT 0 -#define EQOS_MAC_TXQ_PRTY_MAP0_PSTQ0_MASK 0xff - -#define EQOS_MAC_RXQ_CTRL0_RXQ0EN_SHIFT 0 -#define EQOS_MAC_RXQ_CTRL0_RXQ0EN_MASK 3 -#define EQOS_MAC_RXQ_CTRL0_RXQ0EN_NOT_ENABLED 0 -#define EQOS_MAC_RXQ_CTRL0_RXQ0EN_ENABLED_DCB 2 -#define EQOS_MAC_RXQ_CTRL0_RXQ0EN_ENABLED_AV 1 - -#define EQOS_MAC_RXQ_CTRL2_PSRQ0_SHIFT 0 -#define EQOS_MAC_RXQ_CTRL2_PSRQ0_MASK 0xff - -#define EQOS_MAC_HW_FEATURE0_MMCSEL_SHIFT 8 -#define EQOS_MAC_HW_FEATURE0_HDSEL_SHIFT 2 -#define EQOS_MAC_HW_FEATURE0_GMIISEL_SHIFT 1 -#define EQOS_MAC_HW_FEATURE0_MIISEL_SHIFT 0 - -#define EQOS_MAC_HW_FEATURE1_TXFIFOSIZE_SHIFT 6 -#define EQOS_MAC_HW_FEATURE1_TXFIFOSIZE_MASK 0x1f -#define EQOS_MAC_HW_FEATURE1_RXFIFOSIZE_SHIFT 0 -#define EQOS_MAC_HW_FEATURE1_RXFIFOSIZE_MASK 0x1f - -#define EQOS_MAC_HW_FEATURE3_ASP_SHIFT 28 -#define EQOS_MAC_HW_FEATURE3_ASP_MASK 0x3 - -#define EQOS_MAC_MDIO_ADDRESS_PA_SHIFT 21 -#define EQOS_MAC_MDIO_ADDRESS_RDA_SHIFT 16 -#define EQOS_MAC_MDIO_ADDRESS_CR_SHIFT 8 -#define EQOS_MAC_MDIO_ADDRESS_CR_20_35 2 -#define EQOS_MAC_MDIO_ADDRESS_CR_250_300 5 -#define EQOS_MAC_MDIO_ADDRESS_SKAP BIT(4) -#define EQOS_MAC_MDIO_ADDRESS_GOC_SHIFT 2 -#define EQOS_MAC_MDIO_ADDRESS_GOC_READ 3 -#define EQOS_MAC_MDIO_ADDRESS_GOC_WRITE 1 -#define EQOS_MAC_MDIO_ADDRESS_C45E BIT(1) -#define EQOS_MAC_MDIO_ADDRESS_GB BIT(0) - -#define EQOS_MAC_MDIO_DATA_GD_MASK 0xffff - -#define EQOS_MTL_REGS_BASE 0xd00 -struct eqos_mtl_regs { -uint32_t txq0_operation_mode;/* 0xd00 */ -uint32_t unused_d04;/* 0xd04 */ -uint32_t txq0_debug;/* 0xd08 */ -uint32_t unused_d0c[(0xd18 -0xd0c ) /4 ];/* 0xd0c */ -uint32_t txq0_quantum_weight;/* 0xd18 */ -uint32_t unused_d1c[(0xd30 -0xd1c ) /4 ];/* 0xd1c */ -uint32_t rxq0_operation_mode;/* 0xd30 */ -uint32_t unused_d34;/* 0xd34 */ -uint32_t rxq0_debug;/* 0xd38 */ -}; - -#define EQOS_MTL_TXQ0_OPERATION_MODE_TQS_SHIFT 16 -#define EQOS_MTL_TXQ0_OPERATION_MODE_TQS_MASK 0x1ff -#define EQOS_MTL_TXQ0_OPERATION_MODE_TXQEN_SHIFT 2 -#define EQOS_MTL_TXQ0_OPERATION_MODE_TXQEN_MASK 3 -#define EQOS_MTL_TXQ0_OPERATION_MODE_TXQEN_ENABLED 2 -#define EQOS_MTL_TXQ0_OPERATION_MODE_TSF BIT(1) -#define EQOS_MTL_TXQ0_OPERATION_MODE_FTQ BIT(0) - -#define EQOS_MTL_TXQ0_DEBUG_TXQSTS BIT(4) -#define EQOS_MTL_TXQ0_DEBUG_TRCSTS_SHIFT 1 -#define EQOS_MTL_TXQ0_DEBUG_TRCSTS_MASK 3 - -#define EQOS_MTL_RXQ0_OPERATION_MODE_RQS_SHIFT 20 -#define EQOS_MTL_RXQ0_OPERATION_MODE_RQS_MASK 0x3ff -#define EQOS_MTL_RXQ0_OPERATION_MODE_RFD_SHIFT 14 -#define EQOS_MTL_RXQ0_OPERATION_MODE_RFD_MASK 0x3f -#define EQOS_MTL_RXQ0_OPERATION_MODE_RFA_SHIFT 8 -#define EQOS_MTL_RXQ0_OPERATION_MODE_RFA_MASK 0x3f -#define EQOS_MTL_RXQ0_OPERATION_MODE_EHFC BIT(7) -#define EQOS_MTL_RXQ0_OPERATION_MODE_RSF BIT(5) - -#define EQOS_MTL_RXQ0_DEBUG_PRXQ_SHIFT 16 -#define EQOS_MTL_RXQ0_DEBUG_PRXQ_MASK 0x7fff -#define EQOS_MTL_RXQ0_DEBUG_RXQSTS_SHIFT 4 -#define EQOS_MTL_RXQ0_DEBUG_RXQSTS_MASK 3 - -#define EQOS_DMA_REGS_BASE 0x1000 -struct eqos_dma_regs { -uint32_t mode;/* 0x1000 */ -uint32_t sysbus_mode;/* 0x1004 */ -uint32_t unused_1008[(0x1100 -0x1008 ) /4 ];/* 0x1008 */ -uint32_t ch0_control;/* 0x1100 */ -uint32_t ch0_tx_control;/* 0x1104 */ -uint32_t ch0_rx_control;/* 0x1108 */ -uint32_t unused_110c;/* 0x110c */ -uint32_t ch0_txdesc_list_haddress;/* 0x1110 */ -uint32_t ch0_txdesc_list_address;/* 0x1114 */ -uint32_t ch0_rxdesc_list_haddress;/* 0x1118 */ -uint32_t ch0_rxdesc_list_address;/* 0x111c */ -uint32_t ch0_txdesc_tail_pointer;/* 0x1120 */ -uint32_t unused_1124;/* 0x1124 */ -uint32_t ch0_rxdesc_tail_pointer;/* 0x1128 */ -uint32_t ch0_txdesc_ring_length;/* 0x112c */ -uint32_t ch0_rxdesc_ring_length;/* 0x1130 */ -}; - -#define EQOS_DMA_MODE_SWR BIT(0) - -#define EQOS_DMA_SYSBUS_MODE_RD_OSR_LMT_SHIFT 16 -#define EQOS_DMA_SYSBUS_MODE_RD_OSR_LMT_MASK 0xf -#define EQOS_DMA_SYSBUS_MODE_EAME BIT(11) -#define EQOS_DMA_SYSBUS_MODE_BLEN16 BIT(3) -#define EQOS_DMA_SYSBUS_MODE_BLEN8 BIT(2) -#define EQOS_DMA_SYSBUS_MODE_BLEN4 BIT(1) - -#define EQOS_DMA_CH0_CONTROL_DSL_SHIFT 18 -#define EQOS_DMA_CH0_CONTROL_PBLX8 BIT(16) - -#define EQOS_DMA_CH0_TX_CONTROL_TXPBL_SHIFT 16 -#define EQOS_DMA_CH0_TX_CONTROL_TXPBL_MASK 0x3f -#define EQOS_DMA_CH0_TX_CONTROL_OSP BIT(4) -#define EQOS_DMA_CH0_TX_CONTROL_ST BIT(0) - -#define EQOS_DMA_CH0_RX_CONTROL_RXPBL_SHIFT 16 -#define EQOS_DMA_CH0_RX_CONTROL_RXPBL_MASK 0x3f -#define EQOS_DMA_CH0_RX_CONTROL_RBSZ_SHIFT 1 -#define EQOS_DMA_CH0_RX_CONTROL_RBSZ_MASK 0x3fff -#define EQOS_DMA_CH0_RX_CONTROL_SR BIT(0) - -/* These registers are Tegra186-specific */ -#define EQOS_TEGRA186_REGS_BASE 0x8800 -struct eqos_tegra186_regs { -uint32_t sdmemcomppadctrl;/* 0x8800 */ -uint32_t auto_cal_config;/* 0x8804 */ -uint32_t unused_8808;/* 0x8808 */ -uint32_t auto_cal_status;/* 0x880c */ -}; - -#define EQOS_SDMEMCOMPPADCTRL_PAD_E_INPUT_OR_E_PWRD BIT(31) - -#define EQOS_AUTO_CAL_CONFIG_START BIT(31) -#define EQOS_AUTO_CAL_CONFIG_ENABLE BIT(29) - -#define EQOS_AUTO_CAL_STATUS_ACTIVE BIT(31) - -/* Descriptors */ -#define EQOS_DESCRIPTORS_TX 4 -#define EQOS_DESCRIPTORS_RX 4 -#define EQOS_DESCRIPTORS_NUM (EQOS_DESCRIPTORS_TX + EQOS_DESCRIPTORS_RX) -#define EQOS_BUFFER_ALIGN ARCH_DMA_MINALIGN -#define EQOS_MAX_PACKET_SIZE ALIGN(1568, ARCH_DMA_MINALIGN) -#define EQOS_RX_BUFFER_SIZE (EQOS_DESCRIPTORS_RX * EQOS_MAX_PACKET_SIZE) - -struct eqos_desc { -u32 des0; -u32 des1; -u32 des2; -u32 des3; -}; - -#define EQOS_DESC3_OWN BIT(31) -#define EQOS_DESC3_FD BIT(29) -#define EQOS_DESC3_LD BIT(28) -#define EQOS_DESC3_BUF1V BIT(24) - -#define EQOS_AXI_WIDTH_32 4 -#define EQOS_AXI_WIDTH_64 8 -#define EQOS_AXI_WIDTH_128 16 - -struct eqos_config { -bool reg_access_always_ok; -int mdio_wait; -int swr_wait; -int config_mac; -int config_mac_mdio; -unsigned int axi_bus_width; -phy_interface_t (*interface)(const struct udevice *dev); -struct eqos_ops *ops; -}; - -struct eqos_ops { -void (*eqos_inval_desc)(void *desc); -void (*eqos_flush_desc)(void *desc); -void (*eqos_inval_buffer)(void *buf,size_t size); -void (*eqos_flush_buffer)(void *buf,size_t size); -int (*eqos_probe_resources)(struct udevice *dev); -int (*eqos_remove_resources)(struct udevice *dev); -int (*eqos_stop_resets)(struct udevice *dev); -int (*eqos_start_resets)(struct udevice *dev); -int (*eqos_stop_clks)(struct udevice *dev); -int (*eqos_start_clks)(struct udevice *dev); -int (*eqos_calibrate_pads)(struct udevice *dev); -int (*eqos_disable_calibration)(struct udevice *dev); -int (*eqos_set_tx_clk_speed)(struct udevice *dev); -ulong (*eqos_get_tick_clk_rate)(struct udevice *dev); -}; - -struct eqos_priv { -struct udevice *dev; -const struct eqos_config *config; -fdt_addr_t regs; -struct eqos_mac_regs *mac_regs; -struct eqos_mtl_regs *mtl_regs; -struct eqos_dma_regs *dma_regs; -struct eqos_tegra186_regs *tegra186_regs; -struct reset_ctl reset_ctl; -struct gpio_desc phy_reset_gpio; -struct clk clk_master_bus; -struct clk clk_rx; -struct clk clk_ptp_ref; -struct clk clk_tx; -struct clk clk_ck; -struct clk clk_slave_bus; -struct mii_dev *mii; -struct phy_device *phy; -u32 max_speed; -void *descs; -int tx_desc_idx, rx_desc_idx; -unsigned int desc_size; -void *tx_dma_buf; -void *rx_dma_buf; -void *rx_pkt; -bool started; -bool reg_access_ok; -bool clk_ck_enabled; -}; +#include "dwc_eth_qos.h" /* * TX and RX descriptors are 16 bytes. This causes problems with the cache
@@ -359,7 +93,7 @@ static struct eqos_desc *eqos_get_desc(struct eqos_priv *eqos, ((rx ?EQOS_DESCRIPTORS_TX :0 ) + num) * eqos->desc_size; } -static void eqos_inval_desc_generic (void *desc) +void eqos_inval_desc_generic (void *desc) {unsigned long start = (unsigned long )desc; unsigned long end = ALIGN(start + sizeof(struct eqos_desc),
@@ -368,7 +102,7 @@ static void eqos_inval_desc_generic(void *desc)invalidate_dcache_range (start, end); } -static void eqos_flush_desc_generic (void *desc) +void eqos_flush_desc_generic (void *desc) {unsigned long start = (unsigned long )desc; unsigned long end = ALIGN(start + sizeof(struct eqos_desc),
@@ -377,7 +111,7 @@ static void eqos_flush_desc_generic(void *desc)flush_dcache_range (start, end); } -static void eqos_inval_buffer_tegra186 (void *buf,size_t size) +void eqos_inval_buffer_tegra186 (void *buf,size_t size) {unsigned long start = (unsigned long )buf & ~(ARCH_DMA_MINALIGN -1 );unsigned long end =ALIGN (start + size,ARCH_DMA_MINALIGN );
@@ -385,7 +119,7 @@ static void eqos_inval_buffer_tegra186(void *buf, size_t size)invalidate_dcache_range (start, end); } -static void eqos_inval_buffer_generic (void *buf,size_t size) +void eqos_inval_buffer_generic (void *buf,size_t size) {unsigned long start =rounddown ((unsigned long )buf,ARCH_DMA_MINALIGN ); unsigned long end = roundup((unsigned long)buf + size,
@@ -399,7 +133,7 @@ static void eqos_flush_buffer_tegra186(void *buf, size_t size)flush_cache ((unsigned long )buf, size); } -static void eqos_flush_buffer_generic (void *buf,size_t size) +void eqos_flush_buffer_generic (void *buf,size_t size) {unsigned long start =rounddown ((unsigned long )buf,ARCH_DMA_MINALIGN ); unsigned long end = roundup((unsigned long)buf + size,
@@ -1890,7 +1624,7 @@ static int eqos_remove(struct udevice *dev)return 0 ; } -static int eqos_null_ops (struct udevice *dev) +int eqos_null_ops (struct udevice *dev) {return 0 ; }
drivers/net/dwc_eth_qos.h new file +280 -0
280 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 44/53 net: dwc_eth_qos: public some functions
Quoted 5 lines
From: Peng Fan <[email protected]>
Move macros and structures to header file and make some functions public, so that could used by other files, this is to prepare split platform specific config to one file.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 45/53 net: dwc_eth_qos: move i.MX code out
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Move i.MX code to a standalone file to make it easy for adding new platform support
--- drivers/net/Makefile | 1 + drivers/net/dwc_eth_qos.c | 92 -------------------------- drivers/net/dwc_eth_qos.h | 2 + drivers/net/dwc_eth_qos_imx.c | 121 ++++++++++++++++++++++++++++++++++ 4 files changed, 124 insertions(+), 92 deletions(-) create mode 100644 drivers/net/dwc_eth_qos_imx.c
drivers/net/Makefile +1 -0
@@ -19,6 +19,7 @@ obj-$(CONFIG_DM_ETH_PHY) += eth-phy-uclass.o obj-$(CONFIG_DRIVER_DM9000) += dm9000x.o obj-$(CONFIG_DSA_SANDBOX) += dsa_sandbox.o obj-$(CONFIG_DWC_ETH_QOS) += dwc_eth_qos.o +obj-$(CONFIG_DWC_ETH_QOS_IMX) += dwc_eth_qos_imx.o obj-$(CONFIG_E1000) += e1000.o obj-$(CONFIG_E1000_SPI) += e1000_spi.o obj-$(CONFIG_EEPRO100) += eepro100.o
drivers/net/dwc_eth_qos.c +0 -92
116 lines not on this page · raw message
drivers/net/dwc_eth_qos.h +2 -0
@@ -278,3 +278,5 @@ void eqos_flush_desc_generic(void *desc);void eqos_inval_buffer_generic (void *buf,size_t size);void eqos_flush_buffer_generic (void *buf,size_t size);int eqos_null_ops (struct udevice *dev); + +extern struct eqos_config eqos_imx_config;
drivers/net/dwc_eth_qos_imx.c new file +121 -0
121 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 45/53 net: dwc_eth_qos: move i.MX code out
Quoted 5 lines
From: Peng Fan <[email protected]>
Move i.MX code to a standalone file to make it easy for adding new platform supportReviewed-by Ramon Fried <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 46/53 net: eqos: add function to get phy node and address
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Since new atheros PHY driver needs to access its PHY node through phy device, we have to assign the phy node in ethernet controller driver. Otherwise the PHY driver will fail to get some nodes and properties.
--- drivers/net/dwc_eth_qos.c | 23 ++++++++++++++++++++--- drivers/net/dwc_eth_qos.h | 1 + 2 files changed, 21 insertions(+), 3 deletions(-)
drivers/net/dwc_eth_qos.c +20 -3
@@ -719,6 +719,24 @@ static int eqos_read_rom_hwaddr(struct udevice *dev)return !is_valid_ethaddr (pdata->enetaddr); } +static int eqos_get_phy_addr (struct eqos_priv *priv,struct udevice *dev) +{ +struct ofnode_phandle_args phandle_args; +int reg; + +if (dev_read_phandle_with_args (dev,"phy-handle" ,NULL ,0 ,0 , + &phandle_args)) { +debug ("Failed to find phy-handle" ); +return -ENODEV ; + } + + priv->phy_of_node = phandle_args.node; + + reg =ofnode_read_u32_default (phandle_args.node,"reg" ,0 ); + +return reg; +} +static int eqos_start (struct udevice *dev) {struct eqos_priv *eqos =dev_get_priv (dev);
@@ -767,9 +785,7 @@ static int eqos_start(struct udevice *dev)*/ if (!eqos->phy) {int addr =-1 ; -#ifdef CONFIG_DM_ETH_PHY - addr =eth_phy_get_addr (dev); -#endif + addr =eqos_get_phy_addr (eqos, dev);#ifdef DWC_NET_PHYADDR addr =DWC_NET_PHYADDR ;#endif
@@ -788,6 +804,7 @@ static int eqos_start(struct udevice *dev) } } + eqos->phy->node = eqos->phy_of_node; ret =phy_config (eqos->phy);if (ret <0 ) {pr_err ("phy_config() failed: %d" , ret);
drivers/net/dwc_eth_qos.h +1 -0
@@ -261,6 +261,7 @@ struct eqos_priv {struct clk clk_slave_bus;struct mii_dev *mii;struct phy_device *phy; +ofnode phy_of_node;u32 max_speed;void *descs;int tx_desc_idx, rx_desc_idx;
Signature · 1 line
2.36.0
PATCH v2 46/53 net: eqos: add function to get phy node and address
Quoted 7 lines
From: Ye Li <[email protected]>
Since new atheros PHY driver needs to access its PHY node through phy device, we have to assign the phy node in ethernet controller driver. Otherwise the PHY driver will fail to get some nodes and properties.Signed-off-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 47/53 net: dwc_eth_qos: introduce eqos hook eqos_get_enetaddr
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
i.MX has specific hook to get MAC address, so introduce a hook and move i.MX code to its own driver
--- drivers/net/dwc_eth_qos.c | 9 ++++++--- drivers/net/dwc_eth_qos.h | 1 + drivers/net/dwc_eth_qos_imx.c | 12 +++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-)
drivers/net/dwc_eth_qos.c +6 -3
@@ -712,10 +712,13 @@ static int eqos_write_hwaddr(struct udevice *dev)static int eqos_read_rom_hwaddr (struct udevice *dev) {struct eth_pdata *pdata =dev_get_plat (dev); +struct eqos_priv *eqos =dev_get_priv (dev); +int ret; + + ret = eqos->config->ops->eqos_get_enetaddr (dev); +if (ret <0 ) +return ret; -#ifdef CONFIG_ARCH_IMX8M -imx_get_mac_from_fuse (dev_seq (dev), pdata->enetaddr); -#endif return !is_valid_ethaddr (pdata->enetaddr); }
drivers/net/dwc_eth_qos.h +1 -0
@@ -240,6 +240,7 @@ struct eqos_ops {int (*eqos_calibrate_pads)(struct udevice *dev);int (*eqos_disable_calibration)(struct udevice *dev);int (*eqos_set_tx_clk_speed)(struct udevice *dev); +int (*eqos_get_enetaddr)(struct udevice *dev);ulong (*eqos_get_tick_clk_rate)(struct udevice *dev); };
drivers/net/dwc_eth_qos_imx.c +11 -1
@@ -92,6 +92,15 @@ static int eqos_set_tx_clk_speed_imx(struct udevice *dev)return 0 ; } +static int eqos_get_enetaddr_imx (struct udevice *dev) +{ +struct eth_pdata *pdata =dev_get_plat (dev); + +imx_get_mac_from_fuse (dev_seq (dev), pdata->enetaddr); + +return 0 ; +} +static struct eqos_ops eqos_imx_ops = { .eqos_inval_desc = eqos_inval_desc_generic, .eqos_flush_desc = eqos_flush_desc_generic,
@@ -106,7 +115,8 @@ static struct eqos_ops eqos_imx_ops = { .eqos_calibrate_pads = eqos_null_ops, .eqos_disable_calibration = eqos_null_ops, .eqos_set_tx_clk_speed = eqos_set_tx_clk_speed_imx, - .eqos_get_tick_clk_rate = eqos_get_tick_clk_rate_imx + .eqos_get_enetaddr = eqos_get_enetaddr_imx, + .eqos_get_tick_clk_rate = eqos_get_tick_clk_rate_imx, };struct eqos_config __maybe_unused eqos_imx_config = {
Signature · 1 line
2.36.0
PATCH v2 47/53 net: dwc_eth_qos: introduce eqos hook eqos_get_enetaddr
Quoted 4 lines
From: Peng Fan <[email protected]>
i.MX has specific hook to get MAC address, so introduce a hook and move i.MX code to its own driverSigned-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 48/53 board: freescale: imx93_evk: support ethernet
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add ethernet support
--- arch/arm/include/asm/arch-imx9/imx-regs.h | 7 +++++ board/freescale/imx93_evk/imx93_evk.c | 32 +++++++++++++++++++++++ configs/imx93_11x11_evk_defconfig | 9 +++++++ 3 files changed, 48 insertions(+)
arch/arm/include/asm/arch-imx9/imx-regs.h +7 -0
@@ -7,6 +7,7 @@#define __ASM_ARCH_IMX9_REGS_H__#define ARCH_MXC +#define FEC_QUIRK_ENET_MAC #define IOMUXC_BASE_ADDR 0x443C0000UL#define CCM_BASE_ADDR 0x44450000UL
@@ -39,6 +40,12 @@#define SRC_MIX_SLICE_FUNC_STAT_ISO_STAT BIT(4)#define SRC_MIX_SLICE_FUNC_STAT_MEM_STAT BIT(12) +#define BCTRL_GPR_ENET_QOS_INTF_MODE_MASK GENMASK(3, 1) +#define BCTRL_GPR_ENET_QOS_INTF_SEL_MII (0x0 << 1) +#define BCTRL_GPR_ENET_QOS_INTF_SEL_RMII (0x4 << 1) +#define BCTRL_GPR_ENET_QOS_INTF_SEL_RGMII (0x1 << 1) +#define BCTRL_GPR_ENET_QOS_CLK_GEN_EN (0x1 << 0) +#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))#include <asm/types.h> #include <stdbool.h>
board/freescale/imx93_evk/imx93_evk.c +32 -0
@@ -38,8 +38,40 @@ int board_early_init_f(void)return 0 ; } +static int setup_fec (void ) +{ +return set_clk_enet (ENET_125MHZ ); +} + +int board_phy_config (struct phy_device *phydev) +{ +if (phydev->drv->config) + phydev->drv->config (phydev); + +return 0 ; +} + +static int setup_eqos (void ) +{ +struct blk_ctrl_wakeupmix_regs *bctrl = + (struct blk_ctrl_wakeupmix_regs *)BLK_CTRL_WAKEUPMIX_BASE_ADDR ; + +/* set INTF as RGMII, enable RGMII TXC clock */ +clrsetbits_le32 (&bctrl->eqos_gpr, +BCTRL_GPR_ENET_QOS_INTF_MODE_MASK , +BCTRL_GPR_ENET_QOS_INTF_SEL_RGMII |BCTRL_GPR_ENET_QOS_CLK_GEN_EN ); + +return set_clk_eqos (ENET_125MHZ ); +} +int board_init (void ) { +if (CONFIG_IS_ENABLED (FEC_MXC )) +setup_fec (); + +if (CONFIG_IS_ENABLED (DWC_ETH_QOS )) +setup_eqos (); +return 0 ; }
configs/imx93_11x11_evk_defconfig +9 -0
@@ -75,6 +75,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM=y CONFIG_REGMAP=y CONFIG_SYSCON=y
@@ -89,6 +90,14 @@ CONFIG_MMC_UHS_SUPPORT=y CONFIG_MMC_HS400_ES_SUPPORT=y CONFIG_MMC_HS400_SUPPORT=y CONFIG_FSL_USDHC=y +CONFIG_PHY_REALTEK=y +CONFIG_DM_ETH=y +CONFIG_DM_ETH_PHY=y +CONFIG_PHY_GIGE=y +CONFIG_DWC_ETH_QOS=y +CONFIG_DWC_ETH_QOS_IMX=y +CONFIG_FEC_MXC=y +CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX93=y
Signature · 1 line
2.36.0
PATCH v2 48/53 board: freescale: imx93_evk: support ethernet
Quoted 3 lines
From: Peng Fan <[email protected]>
Add ethernet supportSigned-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 49/53 tools: image: support i.MX93
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Support build i.MX93 container image with mkimage
--- include/imx8image.h | 15 +++++++-- tools/imx8image.c | 79 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 78 insertions(+), 16 deletions(-)
include/imx8image.h +13 -2
@@ -165,6 +165,7 @@ enum imx8image_core_type {CFG_M40 ,CFG_M41 ,CFG_A35 , +CFG_A55 ,CFG_A53 , CFG_A72 };
@@ -180,7 +181,9 @@ enum imx8image_fld_types {typedef enum SOC_TYPE {NONE =0 ,QX , -QM +QM , +ULP , +IMX9 }soc_type_t ; typedef enum option_type {
@@ -201,7 +204,9 @@ typedef enum option_type {DATA ,PARTITION ,FILEOFF , - MSG_BLOCK +MSG_BLOCK , +SENTINEL , + UPOWER } option_type_t; typedef struct {
@@ -221,6 +226,11 @@ typedef struct {#define CORE_CA72 5#define CORE_SECO 6 +#define CORE_ULP_CM33 0x1 +#define CORE_ULP_CA35 0x2 +#define CORE_ULP_UPOWER 0x4 +#define CORE_ULP_SENTINEL 0x6 +#define SC_R_OTP 357U#define SC_R_DEBUG 354U#define SC_R_ROM_0 236U
@@ -235,6 +245,7 @@ typedef struct {#define IMG_TYPE_DATA 0x04/* Data image type */ #define IMG_TYPE_DCD_DDR 0x05/* DCD/DDR image type */ #define IMG_TYPE_SECO 0x06/* SECO image type */ +#define IMG_TYPE_SENTINEL 0x06/* SENTINEL image type */ #define IMG_TYPE_PROV 0x07/* Provisioning image type */ #define IMG_TYPE_DEK 0x08/* DEK validation type */
tools/imx8image.c +65 -14
164 lines not on this page · raw message
Signature · 1 line
2.36.0
PATCH v2 49/53 tools: image: support i.MX93
Quoted 3 lines
From: Peng Fan <[email protected]>
Support build i.MX93 container image with mkimageSigned-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 50/53 arm: dts: imx8m: update binman ddr firmware node name
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
We are migrating to use binman symbols, the current names are inconsistent across different boards, so unify them.
Also add type = "blob-ext";, since the new names are not valid binman types.
--- arch/arm/dts/imx8mm-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi | 12 ++++++++---- arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi | 4 ++-- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 12 ++++++++---- arch/arm/dts/imx8mn-evk-u-boot.dtsi | 12 ++++++++---- arch/arm/dts/imx8mn-var-som-symphony-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mn-venice-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mp-u-boot.dtsi | 12 ++++++++---- arch/arm/dts/imx8mq-cm-u-boot.dtsi | 12 ++++++++---- arch/arm/dts/imx8mq-u-boot.dtsi | 8 ++++---- 10 files changed, 58 insertions(+), 38 deletions(-)
arch/arm/dts/imx8mm-u-boot.dtsi +4 -4
@@ -39,25 +39,25 @@ filename = "u-boot-spl.bin"; }; - 1d-imem { + ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; size = <0x8000>; type = "blob-ext"; }; - 1d-dmem { + ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; size = <0x4000>; type = "blob-ext"; }; - 2d-imem { + ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; size = <0x8000>; type = "blob-ext"; }; - 2d-dmem { + ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; size = <0x4000>; type = "blob-ext";
arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi +8 -4
@@ -147,24 +147,28 @@ align-end = <4>; }; - blob_1: blob-ext@1 { + ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_2: blob-ext@2 { + ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; size = <0x4000>; + type = "blob-ext"; }; - blob_3: blob-ext@3 { + ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_4: blob-ext@4 { + ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; size = <0x4000>; + type = "blob-ext"; }; };
arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi +2 -2
@@ -111,13 +111,13 @@ filename = "u-boot-spl.bin"; }; - 1d-imem { + ddr-1d-imem-fw { filename = "ddr3_imem_1d.bin"; size = <0x8000>; type = "blob-ext"; }; - 1d_dmem { + ddr-1d-dmem-fw { filename = "ddr3_dmem_1d.bin"; size = <0x4000>; type = "blob-ext";
arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +8 -4
@@ -155,24 +155,28 @@ align-end = <4>; }; - blob_1: blob-ext@1 { + ddr-1d-imem-fw { filename = "ddr4_imem_1d_201810.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_2: blob-ext@2 { + ddr-1d-dmem-fw { filename = "ddr4_dmem_1d_201810.bin"; size = <0x4000>; + type = "blob-ext"; }; - blob_3: blob-ext@3 { + ddr-2d-imem-fw { filename = "ddr4_imem_2d_201810.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_4: blob-ext@4 { + ddr-2d-dmem-fw { filename = "ddr4_dmem_2d_201810.bin"; size = <0x4000>; + type = "blob-ext"; }; };
arch/arm/dts/imx8mn-evk-u-boot.dtsi +8 -4
@@ -36,24 +36,28 @@ align-end = <4>; }; - blob_1: blob-ext@1 { + ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_2: blob-ext@2 { + ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; size = <0x4000>; + type = "blob-ext"; }; - blob_3: blob-ext@3 { + ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_4: blob-ext@4 { + ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; size = <0x4000>; + type = "blob-ext"; }; };
arch/arm/dts/imx8mn-var-som-symphony-u-boot.dtsi +4 -4
@@ -130,25 +130,25 @@ filename = "u-boot-spl.bin"; }; - 1d-imem { + ddr-1d-imem-fw { filename = "ddr4_imem_1d.bin"; size = <0x8000>; type = "blob-ext"; }; - 1d_dmem { + ddr-1d-dmem-fw { filename = "ddr4_dmem_1d.bin"; size = <0x4000>; type = "blob-ext"; }; - 2d_imem { + ddr-2d-imem-fw { filename = "ddr4_imem_2d.bin"; size = <0x8000>; type = "blob-ext"; }; - 2d_dmem { + ddr-2d-dmem-fw { filename = "ddr4_dmem_2d.bin"; size = <0x4000>; type = "blob-ext";
arch/arm/dts/imx8mn-venice-u-boot.dtsi +4 -4
@@ -126,25 +126,25 @@ filename = "u-boot-spl.bin"; }; - 1d-imem { + ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; size = <0x8000>; type = "blob-ext"; }; - 1d_dmem { + ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; size = <0x4000>; type = "blob-ext"; }; - 2d_imem { + ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; size = <0x8000>; type = "blob-ext"; }; - 2d_dmem { + ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; size = <0x4000>; type = "blob-ext";
arch/arm/dts/imx8mp-u-boot.dtsi +8 -4
@@ -61,24 +61,28 @@ align-end = <4>; }; - blob_1: blob-ext@1 { + ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem_202006.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_2: blob-ext@2 { + ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; size = <0x4000>; + type = "blob-ext"; }; - blob_3: blob-ext@3 { + ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem_202006.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_4: blob-ext@4 { + ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; size = <0x4000>; + type = "blob-ext"; }; };
arch/arm/dts/imx8mq-cm-u-boot.dtsi +8 -4
@@ -28,24 +28,28 @@ align-end = <4>; }; - blob_1: blob-ext@1 { + ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_2: blob-ext@2 { + ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; size = <0x4000>; + type = "blob-ext"; }; - blob_3: blob-ext@3 { + ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_4: blob-ext@4 { + ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; size = <0x4000>; + type = "blob-ext"; }; };
arch/arm/dts/imx8mq-u-boot.dtsi +4 -4
@@ -46,25 +46,25 @@ filename = "u-boot-spl.bin"; }; - 1d-imem { + ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; size = <0x8000>; type = "blob-ext"; }; - 1d-dmem { + ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; size = <0x4000>; type = "blob-ext"; }; - 2d-imem { + ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; size = <0x8000>; type = "blob-ext"; }; - 2d-dmem { + ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; size = <0x4000>; type = "blob-ext";
Signature · 1 line
2.36.0
PATCH v2 50/53 arm: dts: imx8m: update binman ddr firmware node name
Quoted 10 lines
From: Peng Fan <[email protected]>
We are migrating to use binman symbols, the current names are inconsistent across different boards, so unify them.
Also addtype = "blob-ext";, since the new names are not valid binman types.Signed-off-by Peng Fan <[email protected]>Reviewed-by Alper Nebi Yasak <[email protected]>[Alper: Edit commit message]Signed-off-by Alper Nebi Yasak <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 51/53 ddr: imx8m: helper: load ddr firmware according to binman symbols
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
By reading binman symbols, we no need hard coded IMEM_LEN/DMEM_LEN after we update the binman dtsi to drop 0x8000/0x4000 length for the firmware.
And that could save binary size for many KBs.
--- drivers/ddr/imx/phy/helper.c | 47 +++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 6 deletions(-)
drivers/ddr/imx/phy/helper.c +41 -6
@@ -4,6 +4,7 @@*/ #include <common.h> +#include <binman_sym.h> #include <log.h> #include <spl.h> #include <asm/global_data.h>
@@ -24,15 +25,30 @@ DECLARE_GLOBAL_DATA_PTR;#define DMEM_OFFSET_ADDR 0x00054000#define DDR_TRAIN_CODE_BASE_ADDR IP2APB_DDRPHY_IPS_BASE_ADDR(0) +binman_sym_declare (ulong, ddr_1d_imem_fw, image_pos); +binman_sym_declare (ulong, ddr_1d_imem_fw, size); + +binman_sym_declare (ulong, ddr_1d_dmem_fw, image_pos); +binman_sym_declare (ulong, ddr_1d_dmem_fw, size); + +#if !IS_ENABLED (CONFIG_IMX8M_DDR3L ) +binman_sym_declare (ulong, ddr_2d_imem_fw, image_pos); +binman_sym_declare (ulong, ddr_2d_imem_fw, size); + +binman_sym_declare (ulong, ddr_2d_dmem_fw, image_pos); +binman_sym_declare (ulong, ddr_2d_dmem_fw, size); +#endif +/* We need PHY iMEM PHY is 32KB padded */ void ddr_load_train_firmware (enum fw_type type) {u32 tmp32, i;u32 error =0 ;unsigned long pr_to32, pr_from32; -unsigned long fw_offset = type ?IMEM_2D_OFFSET :0 ; +uint32_t fw_offset = type ?IMEM_2D_OFFSET :0 ;unsigned long imem_start = (unsigned long )&_end + fw_offset;unsigned long dmem_start; +unsigned long imem_len =IMEM_LEN , dmem_len =DMEM_LEN ;#ifdef CONFIG_SPL_OF_CONTROL if (gd->fdt_blob && !fdt_check_header (gd->fdt_blob)) {
@@ -42,11 +58,30 @@ void ddr_load_train_firmware(enum fw_type type) }#endif - dmem_start = imem_start +IMEM_LEN ; + dmem_start = imem_start + imem_len; + +if (BINMAN_SYMS_OK ) { +switch (type) { +case FW_1D_IMAGE : + imem_start =binman_sym (ulong, ddr_1d_imem_fw, image_pos); + imem_len =binman_sym (ulong, ddr_1d_imem_fw, size); + dmem_start =binman_sym (ulong, ddr_1d_dmem_fw, image_pos); + dmem_len =binman_sym (ulong, ddr_1d_dmem_fw, size); +break ; +case FW_2D_IMAGE : +#if !IS_ENABLED (CONFIG_IMX8M_DDR3L ) + imem_start =binman_sym (ulong, ddr_2d_imem_fw, image_pos); + imem_len =binman_sym (ulong, ddr_2d_imem_fw, size); + dmem_start =binman_sym (ulong, ddr_2d_dmem_fw, image_pos); + dmem_len =binman_sym (ulong, ddr_2d_dmem_fw, size); +#endif +break ; + } + } pr_from32 = imem_start; pr_to32 =IMEM_OFFSET_ADDR ; -for (i =0x0 ; i <IMEM_LEN ; ) { +for (i =0x0 ; i < imem_len; ) { tmp32 =readl (pr_from32);writew (tmp32 &0x0000ffff ,DDR_TRAIN_CODE_BASE_ADDR +ddrphy_addr_remap (pr_to32)); pr_to32 +=1 ;
@@ -59,7 +94,7 @@ void ddr_load_train_firmware(enum fw_type type) pr_from32 = dmem_start; pr_to32 =DMEM_OFFSET_ADDR ; -for (i =0x0 ; i <DMEM_LEN ; ) { +for (i =0x0 ; i < dmem_len; ) { tmp32 =readl (pr_from32);writew (tmp32 &0x0000ffff ,DDR_TRAIN_CODE_BASE_ADDR +ddrphy_addr_remap (pr_to32)); pr_to32 +=1 ;
@@ -73,7 +108,7 @@ void ddr_load_train_firmware(enum fw_type type)debug ("check ddr_pmu_train_imem code\n" ); pr_from32 = imem_start; pr_to32 =IMEM_OFFSET_ADDR ; -for (i =0x0 ; i <IMEM_LEN ; ) { +for (i =0x0 ; i < imem_len; ) { tmp32 = (readw (DDR_TRAIN_CODE_BASE_ADDR +ddrphy_addr_remap (pr_to32)) &0x0000ffff ); pr_to32 +=1 ; tmp32 += ((readw(DDR_TRAIN_CODE_BASE_ADDR +
@@ -95,7 +130,7 @@ void ddr_load_train_firmware(enum fw_type type)debug ("check ddr4_pmu_train_dmem code\n" ); pr_from32 = dmem_start; pr_to32 =DMEM_OFFSET_ADDR ; -for (i =0x0 ; i <DMEM_LEN ;) { +for (i =0x0 ; i < dmem_len;) { tmp32 = (readw (DDR_TRAIN_CODE_BASE_ADDR +ddrphy_addr_remap (pr_to32)) &0x0000ffff ); pr_to32 +=1 ; tmp32 += ((readw(DDR_TRAIN_CODE_BASE_ADDR +
Signature · 1 line
2.36.0
PATCH v2 51/53 ddr: imx8m: helper: load ddr firmware according to binman symbols
Quoted 9 lines
From: Peng Fan <[email protected]>
By reading binman symbols, we no need hard coded IMEM_LEN/DMEM_LEN after we update the binman dtsi to drop 0x8000/0x4000 length for the firmware. And that could save binary size for many KBs.Signed-off-by Peng Fan <[email protected]>Reviewed-by Alper Nebi Yasak <[email protected]>[Alper: Check BINMAN_SYMS_OK instead]Signed-off-by Alper Nebi Yasak <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 52/53 arm: dts: imx8m: shrink ddr firmware size to actual file size
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
After we switch to use BINMAN_SYMBOLS, there is no need to pad the file size to 0x8000 and 0x4000. After we use BINMAN_SYMBOLS, the u-boot-spl-ddr.bin shrink about 36KB with i.MX8MP-EVK.
--- arch/arm/dts/imx8mm-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi | 4 ++-- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mn-evk-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mn-var-som-symphony-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mn-venice-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mp-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mq-cm-u-boot.dtsi | 8 ++++---- arch/arm/dts/imx8mq-u-boot.dtsi | 8 ++++---- 10 files changed, 38 insertions(+), 38 deletions(-)
arch/arm/dts/imx8mm-u-boot.dtsi +4 -4
@@ -41,25 +41,25 @@ ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; - size = <0x8000>; + align-end = <4>; type = "blob-ext"; }; ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; - size = <0x4000>; + align-end = <4>; type = "blob-ext"; }; ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; - size = <0x8000>; + align-end = <4>; type = "blob-ext"; }; ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; - size = <0x4000>; + align-end = <4>; type = "blob-ext"; }; };
arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi +4 -4
@@ -149,26 +149,26 @@ ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; };
arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi +2 -2
@@ -113,13 +113,13 @@ ddr-1d-imem-fw { filename = "ddr3_imem_1d.bin"; - size = <0x8000>; + align-end = <4>; type = "blob-ext"; }; ddr-1d-dmem-fw { filename = "ddr3_dmem_1d.bin"; - size = <0x4000>; + align-end = <4>; type = "blob-ext"; }; };
arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +4 -4
@@ -157,26 +157,26 @@ ddr-1d-imem-fw { filename = "ddr4_imem_1d_201810.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-1d-dmem-fw { filename = "ddr4_dmem_1d_201810.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-imem-fw { filename = "ddr4_imem_2d_201810.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-dmem-fw { filename = "ddr4_dmem_2d_201810.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; };
arch/arm/dts/imx8mn-evk-u-boot.dtsi +4 -4
@@ -38,26 +38,26 @@ ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; };
arch/arm/dts/imx8mn-var-som-symphony-u-boot.dtsi +4 -4
@@ -132,25 +132,25 @@ ddr-1d-imem-fw { filename = "ddr4_imem_1d.bin"; - size = <0x8000>; + align-end = <4>; type = "blob-ext"; }; ddr-1d-dmem-fw { filename = "ddr4_dmem_1d.bin"; - size = <0x4000>; + align-end = <4>; type = "blob-ext"; }; ddr-2d-imem-fw { filename = "ddr4_imem_2d.bin"; - size = <0x8000>; + align-end = <4>; type = "blob-ext"; }; ddr-2d-dmem-fw { filename = "ddr4_dmem_2d.bin"; - size = <0x4000>; + align-end = <4>; type = "blob-ext"; }; };
arch/arm/dts/imx8mn-venice-u-boot.dtsi +4 -4
@@ -128,25 +128,25 @@ ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; - size = <0x8000>; + align-end = <4>; type = "blob-ext"; }; ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; - size = <0x4000>; + align-end = <4>; type = "blob-ext"; }; ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; - size = <0x8000>; + align-end = <4>; type = "blob-ext"; }; ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; - size = <0x4000>; + align-end = <4>; type = "blob-ext"; }; };
arch/arm/dts/imx8mp-u-boot.dtsi +4 -4
@@ -63,26 +63,26 @@ ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem_202006.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem_202006.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem_202006.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem_202006.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; };
arch/arm/dts/imx8mq-cm-u-boot.dtsi +4 -4
@@ -30,26 +30,26 @@ ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; - size = <0x8000>; type = "blob-ext"; + align-end = <4>; }; ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; - size = <0x4000>; type = "blob-ext"; + align-end = <4>; }; };
arch/arm/dts/imx8mq-u-boot.dtsi +4 -4
@@ -48,25 +48,25 @@ ddr-1d-imem-fw { filename = "lpddr4_pmu_train_1d_imem.bin"; - size = <0x8000>; + align-end = <4>; type = "blob-ext"; }; ddr-1d-dmem-fw { filename = "lpddr4_pmu_train_1d_dmem.bin"; - size = <0x4000>; + align-end = <4>; type = "blob-ext"; }; ddr-2d-imem-fw { filename = "lpddr4_pmu_train_2d_imem.bin"; - size = <0x8000>; + align-end = <4>; type = "blob-ext"; }; ddr-2d-dmem-fw { filename = "lpddr4_pmu_train_2d_dmem.bin"; - size = <0x4000>; + align-end = <4>; type = "blob-ext"; }; };
Signature · 1 line
2.36.0
PATCH v2 52/53 arm: dts: imx8m: shrink ddr firmware size to actual file size
Quoted 7 lines
From: Peng Fan <[email protected]>
After we switch to useBINMAN_SYMBOLS, there is no need to pad the file size to0x8000and0x4000. After we useBINMAN_SYMBOLS, the u-boot-spl-ddr.bin shrink about 36KB with i.MX8MP-EVK.Signed-off-by Peng Fan <[email protected]>Reviewed-by Alper Nebi Yasak <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 53/53 imx: imx8mm-icore: migrate to use BINMAN
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Use BINMAN instead of imx specific packing method.
--- arch/arm/mach-imx/imx8m/Kconfig | 1 + arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg | 10 +--------- configs/imx8mm-icore-mx8mm-ctouch2_defconfig | 2 +- configs/imx8mm-icore-mx8mm-edimm2.2_defconfig | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-)
arch/arm/mach-imx/imx8m/Kconfig +1 -0
@@ -69,6 +69,7 @@ config TARGET_IMX8MM_EVK config TARGET_IMX8MM_ICORE_MX8MM bool "Engicam i.Core MX8M Mini SOM" + select BINMAN select IMX8MM select SUPPORT_SPL select IMX8M_LPDDR4
arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg +1 -9
@@ -3,13 +3,5 @@ * Copyright 2019 NXP */ - -FIT BOOT_FROM sd -LOADER spl/u-boot-spl-ddr.bin 0x7E1000 -SECOND_LOADER u-boot.itb 0x40200000 0x60000 - -DDR_FW lpddr4_pmu_train_1d_imem.bin -DDR_FW lpddr4_pmu_train_1d_dmem.bin -DDR_FW lpddr4_pmu_train_2d_imem.bin -DDR_FW lpddr4_pmu_train_2d_dmem.bin +LOADER u-boot-spl-ddr.bin 0x7E1000
configs/imx8mm-icore-mx8mm-ctouch2_defconfig +1 -1
@@ -20,7 +20,7 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_SPL_LOAD_FIT=y -CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" +# CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_SYSTEM_SETUP=y CONFIG_DEFAULT_FDT_FILE="imx8mm-icore-mx8mm-ctouch2.dtb" CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
configs/imx8mm-icore-mx8mm-edimm2.2_defconfig +1 -1
@@ -20,7 +20,7 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_SPL_LOAD_FIT=y -CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" +# CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_SYSTEM_SETUP=y CONFIG_DEFAULT_FDT_FILE="imx8mm-icore-mx8mm-edimm2.2.dtb" CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
Signature · 1 line
2.36.0
PATCH v2 53/53 imx: imx8mm-icore: migrate to use BINMAN
Quoted 4 lines
From: Peng Fan <[email protected]>
Use BINMAN instead of imx specific packing method.Signed-off-by Peng Fan <[email protected]>Reviewed-by Alper Nebi Yasak <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================