Skip to contentSkip to conversation

Introduce initial TI's J784S4 and AM69 support

PATCH Superseded Apurva Nandan 9 participants 37 messages Dec 6, 2023 – Dec 19, 2023

Subsystems (7)

v6 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

v6 cover Introduce initial TI's J784S4 and AM69 support

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

The J784S4 SoC device tree patches are taken from kernel patch submissions and will be updated as they are accepted and merged to the kernel tree. All other patches are specific to SPL and u-boot and do not have dependency on other trees. Appreciate a review for acceptance to u-boot tree.

Here are some of the salient features of the J784S4 automotive grade application processor:

The J784S4 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications.

Some highlights of this SoC are:
* Up to 8 Cortex-A72s, four clusters of lockstep capable dual Cortex-R5F MCUs, 4 C7x floating point vector DSPs with Matrix Multiply Accelerator(MMA) for deep learning and CNN.
* 3D GPU: Automotive grade IMG BXS-4-64 MC1
* Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC)
* Three CSI2.0 4L RX plus two CSI2.0 4L TX, two DSI Tx, one eDP/DP and one DPI interface.
* Integrated gigabit ethernet switch, up to 8 ports (TDA4VH), two ports support 10Gb USXGMII; Two 4 lane PCIe-GEN3 controllers, USB3.0 Dual-role device subsystems, Up to 20 MCANs, among other peripherals.

See J784S4 Technical Reference Manual (SPRUJ52 - JUNE 2022) for further details: http://www.ti.com/lit/zip/spruj52

In addtion, the J784S4 EVM board is designed for TI J784S4 SoC. It supports the following interfaces:
* 32 GB DDR4 RAM
* x2 Gigabit Ethernet interfaces capable of working in Switch and MAC mode
* x1 Input Audio Jack, x1 Output Audio Jack
* x1 USB2.0 Hub with two Type A host and x1 USB 3.1 Type-C Port
* x2 4L PCIe connector
* x1 UHS-1 capable micro-SD card slot
* 512 Mbit OSPI flash, 1 Gbit Octal NAND flash, 512 Mbit QSPI flash, UFS flash.
* x6 UART through UART-USB bridge
* XDS110 for onboard JTAG debug using USB
* Temperature sensors, user push buttons and LEDs
* 40-pin User Expansion Connector
* x2 ENET Expansion Connector, x1 GESI expander, x2 Display connector
* x1 15-pin CSI header
* x6 MCAN instances

Schematics: https://www.ti.com/lit/zip/sprr458

eMMC UDA moode bootlog: https://gist.githubusercontent.com/apurvanandan1997/3cffada252d50a8aa0c00a91f1f2f856/raw/

Changes in v6:
1) Move bootph-all of memory node to u-boot.dtsi
2) Used a while loop for DRAM controller init, instead of hard-coding for 4 DRAM
3) Fixed build error by adding board/ti/j784s4/Kconfig
4) Trimmed out j784s4_evm.h
5) Fixed checkpatch warnings

Link to v5:
https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Changes in v5:
1) Incorporated Andrew Davis' "Move R5 specific code into new r5/ directory" and "Move board selection to mach-k3" series changes.
2) Incorporated Neha Francis' "Move to using templated FITs" series changes.
3) Synced device tree files with Linux v6.7-rc1
4) Changed ti_mmc to mmc1 target from bootstd
5) Updated doc based on review comments
6) Removed remoteproc support from the series
7) Splitted board files patch into smaller patches
8) Trimmed j784s4.env to necessary variables
9) Used fdtdec_setup_mem_size_base fdtdec_setup_memory_banksize in evm.c
10) Trimmed down evm.c to essential header files.
11) Switched to multi-dtb fit compilation with config fragments

Link to v4:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v4:
1) Cleaned up Copyright and SPDX identifiers
2) Synced the device trees to Linux v6.6-rc1 tag
3) Added cleanup patch for sorting SoC JTAG ID entries
4) Removed EEPROM board detect from evm.c and added am69 config fragments
5) Updated MAINTAINERS files and commit messages
6) Removed struct renaming in ti_k3_r5f_rproc driver

Link to v3:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v3:
1) Added AM69 SK support in the series
2) Switched from distroboot to bootstd support
3) Added remoteproc support for J784S4
4) Added documentation for both SoCs
5) Added binman support
6) Removed unnecessarry nodes from r5-evm.dts and evm-u-boot.dtsi
7) Added HS device support
8) Added env file for environement variables
9) Removed ti-serdes-mux bindings
10) Cleaned up all files and synced with latest
11) Addressed all previous review comments

Note: The base dts files have been sync from next-20230905 linux tag as per review comment received on previous re-roll:
https://lore.kernel.org/u-boot/20230321155227.GV8135@bill-the-cat/

Link to v2:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v2:
- Refactored environement scripts to 'j784s4.env' and removed scripts not needed for basic board bootup.
- Imported the J7874S4 basic device tree files from v6.2 linux kernel.
- Moved j784s4 clock definitions and clock data into one patch/commit.
- coalesce board commits into one commit.

Apurva Nandan (14):
arm: dts: Introduce j784s4 dts from linux kernel
arm: mach-k3: Add basic support for J784S4 SoC definition
arm: mach-k3: Sort SoC JTAG_ID entries
soc: ti: k3-socinfo: Add entry for J784S4 SoC
arm: mach-k3: j784s4: Add clk and power support
drivers: dma: Add support for J784S4 SoC
board: ti: j784s4: Add board support for J784S4 EVM
board: ti: j748s4: Add board config yaml files
board: ti: j784s4: Add boot environment variables
arm: dts: Introduce j784s4 u-boot dts files
arm: dts: Add bootph-all for memory node
configs: j784s4_evm: Add defconfig for j784s4 evm board
doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation
board: ti: j784s4: Add MAINTAINERS file

Dasnavis Sabiya (3):
arm: dts: Introduce am69-sk dts from linux kernel
arm: dts: Introduce am69-sk u-boot dts files
configs: Add am69_sk_* defconfig fragments

 arch/arm/dts/Makefile                         |    4 +
 arch/arm/dts/k3-am69-r5-sk.dts                |  105 +
 arch/arm/dts/k3-am69-sk-u-boot.dtsi           |   31 +
 arch/arm/dts/k3-am69-sk.dts                   |  900 ++
 arch/arm/dts/k3-j784s4-binman.dtsi            |  435 +
 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi  | 8757 ++++++++++++++++
 arch/arm/dts/k3-j784s4-ddr.dtsi               | 8858 +++++++++++++++++
 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        |   31 +
 arch/arm/dts/k3-j784s4-evm.dts                |  981 ++
 arch/arm/dts/k3-j784s4-main.dtsi              | 2068 ++++
 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi        |  743 ++
 arch/arm/dts/k3-j784s4-r5-evm.dts             |  105 +
 arch/arm/dts/k3-j784s4-thermal.dtsi           |  101 +
 arch/arm/dts/k3-j784s4.dtsi                   |  294 +
 arch/arm/mach-k3/Kconfig                      |   17 +-
 arch/arm/mach-k3/Makefile                     |    2 +
 arch/arm/mach-k3/arm64-mmu.c                  |   52 +
 arch/arm/mach-k3/include/mach/hardware.h      |   13 +-
 .../mach-k3/include/mach/j784s4_hardware.h    |   60 +
 arch/arm/mach-k3/include/mach/j784s4_spl.h    |   47 +
 arch/arm/mach-k3/include/mach/spl.h           |    4 +
 arch/arm/mach-k3/j784s4/Kconfig               |   35 +
 arch/arm/mach-k3/j784s4_fdt.c                 |   15 +
 arch/arm/mach-k3/j784s4_init.c                |  335 +
 arch/arm/mach-k3/r5/Makefile                  |    1 +
 arch/arm/mach-k3/r5/j784s4/Makefile           |    7 +
 arch/arm/mach-k3/r5/j784s4/clk-data.c         |  428 +
 arch/arm/mach-k3/r5/j784s4/dev-data.c         |   98 +
 board/ti/j784s4/Kconfig                       |   37 +
 board/ti/j784s4/MAINTAINERS                   |   25 +
 board/ti/j784s4/Makefile                      |    7 +
 board/ti/j784s4/board-cfg.yaml                |   37 +
 board/ti/j784s4/evm.c                         |   38 +
 board/ti/j784s4/j784s4.env                    |   18 +
 board/ti/j784s4/pm-cfg.yaml                   |   13 +
 board/ti/j784s4/rm-cfg.yaml                   | 3058 ++++++
 board/ti/j784s4/sec-cfg.yaml                  |  380 +
 board/ti/j784s4/tifs-rm-cfg.yaml              | 2656 +++++
 configs/am69_sk_a72.config                    |    3 +
 configs/am69_sk_r5.config                     |    3 +
 configs/j784s4_evm_a72_defconfig              |  180 +
 configs/j784s4_evm_r5_defconfig               |  163 +
 doc/board/ti/j784s4_evm.rst                   |  303 +
 doc/board/ti/k3.rst                           |    1 +
 drivers/clk/ti/clk-k3.c                       |    6 +
 drivers/dma/ti/Makefile                       |    1 +
 drivers/dma/ti/k3-psil-j784s4.c               |  166 +
 drivers/dma/ti/k3-psil-priv.h                 |    1 +
 drivers/dma/ti/k3-psil.c                      |    2 +
 drivers/firmware/ti_sci_static_data.h         |   34 +
 drivers/power/domain/ti-power-domain.c        |    6 +
 drivers/ram/Kconfig                           |    2 +-
 drivers/soc/soc_ti_k3.c                       |    3 +
 include/configs/j784s4_evm.h                  |   15 +
 include/k3-clk.h                              |    1 +
 include/k3-dev.h                              |    1 +
 56 files changed, 31675 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/dts/k3-am69-r5-sk.dts
 create mode 100644 arch/arm/dts/k3-am69-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-am69-sk.dts
 create mode 100644 arch/arm/dts/k3-j784s4-binman.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-ddr.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-evm.dts
 create mode 100644 arch/arm/dts/k3-j784s4-main.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-r5-evm.dts
 create mode 100644 arch/arm/dts/k3-j784s4-thermal.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4.dtsi
 create mode 100644 arch/arm/mach-k3/include/mach/j784s4_hardware.h
 create mode 100644 arch/arm/mach-k3/include/mach/j784s4_spl.h
 create mode 100644 arch/arm/mach-k3/j784s4/Kconfig
 create mode 100644 arch/arm/mach-k3/j784s4_fdt.c
 create mode 100644 arch/arm/mach-k3/j784s4_init.c
 create mode 100644 arch/arm/mach-k3/r5/j784s4/Makefile
 create mode 100644 arch/arm/mach-k3/r5/j784s4/clk-data.c
 create mode 100644 arch/arm/mach-k3/r5/j784s4/dev-data.c
 create mode 100644 board/ti/j784s4/Kconfig
 create mode 100644 board/ti/j784s4/MAINTAINERS
 create mode 100644 board/ti/j784s4/Makefile
 create mode 100644 board/ti/j784s4/board-cfg.yaml
 create mode 100644 board/ti/j784s4/evm.c
 create mode 100644 board/ti/j784s4/j784s4.env
 create mode 100644 board/ti/j784s4/pm-cfg.yaml
 create mode 100644 board/ti/j784s4/rm-cfg.yaml
 create mode 100644 board/ti/j784s4/sec-cfg.yaml
 create mode 100644 board/ti/j784s4/tifs-rm-cfg.yaml
 create mode 100644 configs/am69_sk_a72.config
 create mode 100644 configs/am69_sk_r5.config
 create mode 100644 configs/j784s4_evm_a72_defconfig
 create mode 100644 configs/j784s4_evm_r5_defconfig
 create mode 100644 doc/board/ti/j784s4_evm.rst
 create mode 100644 drivers/dma/ti/k3-psil-j784s4.c
 create mode 100644 include/configs/j784s4_evm.h
Signature · 1 line
2.34.1
#1 lore raw

PATCH v6 1/17 arm: dts: Introduce j784s4 dts from linux kernel

Introduce the basic j784s4 SoC dts from the v6.7-rc1 tag of the linux kernel.

---
 arch/arm/dts/Makefile                  |    1 +
 arch/arm/dts/k3-j784s4-evm.dts         |  981 +++++++++++
 arch/arm/dts/k3-j784s4-main.dtsi       | 2068 ++++++++++++++++++++++++
 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi |  743 +++++++++
 arch/arm/dts/k3-j784s4-thermal.dtsi    |  101 ++
 arch/arm/dts/k3-j784s4.dtsi            |  294 ++++
 6 files changed, 4188 insertions(+)
 create mode 100644 arch/arm/dts/k3-j784s4-evm.dts
 create mode 100644 arch/arm/dts/k3-j784s4-main.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-thermal.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4.dtsi
arch/arm/dts/Makefile +1 -0
index ea420db1b8..23ee65114b 100644
@@ -1408,6 +1408,7 @@ dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-board.dtb\
 			       k3-am68-sk-r5-base-board.dtb\
 			       k3-j721s2-common-proc-board.dtb\
 			       k3-j721s2-r5-common-proc-board.dtb
+dtb-$(CONFIG_SOC_K3_J784S4) += k3-j784s4-evm.dtb
 dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
 			      k3-am642-r5-evm.dtb \
 			      k3-am642-sk.dtb \
arch/arm/dts/k3-j784s4-evm.dts new file +981 -0

981 lines not on this page · raw message

arch/arm/dts/k3-j784s4-main.dtsi new file +2068 -0

2,012 lines not on this page · raw message

arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi new file +743 -0

743 lines not on this page · raw message

arch/arm/dts/k3-j784s4-thermal.dtsi new file +101 -0

101 lines not on this page · raw message

arch/arm/dts/k3-j784s4.dtsi new file +294 -0

294 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH v6 2/17 arm: dts: Introduce am69-sk dts from linux kernel

In reply to Apurva Nandan

From: Dasnavis Sabiya <[email protected]>

Introduce the basic am69-sk evm dts from the v6.7-rc1 tag of the linux kernel.

---
 arch/arm/dts/Makefile       |   3 +-
 arch/arm/dts/k3-am69-sk.dts | 900 ++++++++++++++++++++++++++++++++++++
 2 files changed, 902 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-am69-sk.dts
arch/arm/dts/Makefile +2 -1
index 23ee65114b..1a63ccba8e 100644
@@ -1408,7 +1408,8 @@ dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-board.dtb\
 			       k3-am68-sk-r5-base-board.dtb\
 			       k3-j721s2-common-proc-board.dtb\
 			       k3-j721s2-r5-common-proc-board.dtb
-dtb-$(CONFIG_SOC_K3_J784S4) += k3-j784s4-evm.dtb
+dtb-$(CONFIG_SOC_K3_J784S4) += k3-am69-sk.dtb\
+			       k3-j784s4-evm.dtb
 dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
 			      k3-am642-r5-evm.dtb \
 			      k3-am642-sk.dtb \
arch/arm/dts/k3-am69-sk.dts new file +900 -0

900 lines not on this page · raw message

Signature · 1 line
2.34.1
#3 lore raw

PATCH v6 3/17 arm: mach-k3: Add basic support for J784S4 SoC definition

In reply to Apurva Nandan

Add J784S4 initialization files for initial SPL boot.

[ add firewall configurations and change the R5 MCU scratchpad ]
---
 arch/arm/mach-k3/Kconfig                      |  16 +-
 arch/arm/mach-k3/Makefile                     |   2 +
 arch/arm/mach-k3/arm64-mmu.c                  |  52 +++
 arch/arm/mach-k3/include/mach/hardware.h      |   4 +
 .../mach-k3/include/mach/j784s4_hardware.h    |  60 ++++
 arch/arm/mach-k3/include/mach/j784s4_spl.h    |  47 +++
 arch/arm/mach-k3/include/mach/spl.h           |   4 +
 arch/arm/mach-k3/j784s4_fdt.c                 |  15 +
 arch/arm/mach-k3/j784s4_init.c                | 335 ++++++++++++++++++
 arch/arm/mach-k3/r5/Makefile                  |   1 +
 10 files changed, 529 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/mach-k3/include/mach/j784s4_hardware.h
 create mode 100644 arch/arm/mach-k3/include/mach/j784s4_spl.h
 create mode 100644 arch/arm/mach-k3/j784s4_fdt.c
 create mode 100644 arch/arm/mach-k3/j784s4_init.c
arch/arm/mach-k3/Kconfig +9 -7
index 03898424c9..150d0bfa14 100644
@@ -22,6 +22,9 @@ config SOC_K3_AM625
 config SOC_K3_AM62A7
 	bool "TI's K3 based AM62A7 SoC Family Support"
 
+config SOC_K3_J784S4
+	bool "TI's K3 based J784S4 SoC Family Support"
+
 endchoice
 
 if SOC_K3_J721E
@@ -35,7 +38,7 @@ config SYS_SOC
 config SYS_K3_NON_SECURE_MSRAM_SIZE
 	hex
 	default 0x80000 if SOC_K3_AM654
-	default 0x100000 if SOC_K3_J721E || SOC_K3_J721S2
+	default 0x100000 if SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_J784S4
 	default 0x1c0000 if SOC_K3_AM642
 	default 0x3c000 if SOC_K3_AM625 || SOC_K3_AM62A7
 	help
@@ -47,7 +50,7 @@ config SYS_K3_NON_SECURE_MSRAM_SIZE
 config SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE
 	hex
 	default 0x58000 if SOC_K3_AM654
-	default 0xc0000 if SOC_K3_J721E || SOC_K3_J721S2
+	default 0xc0000 if SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_J784S4
 	default 0x180000 if SOC_K3_AM642
 	default 0x38000 if SOC_K3_AM625 || SOC_K3_AM62A7
 	help
@@ -57,15 +60,14 @@ config SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE
 config SYS_K3_MCU_SCRATCHPAD_BASE
 	hex
 	default 0x40280000 if SOC_K3_AM654
-	default 0x41cff9fc if SOC_K3_J721S2
-	default 0x41cff9fc if SOC_K3_J721E
+	default 0x41cff9fc if SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_J784S4
 	help
 	  Describes the base address of MCU Scratchpad RAM.
 
 config SYS_K3_MCU_SCRATCHPAD_SIZE
 	hex
 	default 0x200 if SOC_K3_AM654
-	default 0x200 if SOC_K3_J721E || SOC_K3_J721S2
+	default 0x200 if SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_J784S4
 	help
 	  Describes the size of MCU Scratchpad RAM.
 
@@ -73,7 +75,7 @@ config SYS_K3_BOOT_PARAM_TABLE_INDEX
 	hex
 	default 0x41c7fbfc if SOC_K3_AM654
 	default 0x41cffbfc if SOC_K3_J721E
-	default 0x41cfdbfc if SOC_K3_J721S2
+	default 0x41cfdbfc if SOC_K3_J721S2 || SOC_K3_J784S4
 	default 0x701bebfc if SOC_K3_AM642
 	default 0x43c3f290 if SOC_K3_AM625
 	default 0x43c3f290 if SOC_K3_AM62A7 && CPU_V7R
@@ -130,7 +132,7 @@ config K3_ATF_LOAD_ADDR
 
 config K3_DM_FW
 	bool "Separate DM firmware image"
-	depends on CPU_V7R && (SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_AM625 || SOC_K3_AM62A7) && !CLK_TI_SCI && !TI_SCI_POWER_DOMAIN
+	depends on CPU_V7R && (SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_AM625 || SOC_K3_AM62A7 || SOC_K3_J784S4) && !CLK_TI_SCI && !TI_SCI_POWER_DOMAIN
 	default y
 	help
 	  Enabling this will indicate that the system has separate DM
arch/arm/mach-k3/Makefile +2 -0
index 4216137646..945698e6e8 100644
@@ -12,6 +12,7 @@ obj-$(CONFIG_SOC_K3_AM654) += am654_fdt.o
 obj-$(CONFIG_SOC_K3_J721E) += j721e_fdt.o
 obj-$(CONFIG_SOC_K3_J721S2) += j721s2_fdt.o
 obj-$(CONFIG_SOC_K3_AM625) += am625_fdt.o
+obj-$(CONFIG_SOC_K3_J784S4) += j784s4_fdt.o
 endif
 ifeq ($(CONFIG_SPL_BUILD),y)
 obj-$(CONFIG_SOC_K3_AM654) += am654_init.o
@@ -20,5 +21,6 @@ obj-$(CONFIG_SOC_K3_J721S2) += j721s2_init.o
 obj-$(CONFIG_SOC_K3_AM642) += am642_init.o
 obj-$(CONFIG_SOC_K3_AM625) += am625_init.o
 obj-$(CONFIG_SOC_K3_AM62A7) += am62a7_init.o
+obj-$(CONFIG_SOC_K3_J784S4) += j784s4_init.o
 endif
 obj-y += common.o security.o
arch/arm/mach-k3/arm64-mmu.c +52 -0

55 lines not on this page · raw message

arch/arm/mach-k3/include/mach/hardware.h +4 -0
index a1a9dfbde6..0cf1e12aaa 100644
@@ -33,6 +33,10 @@
 #include "am62a_qos.h"
 #endif
 
+#ifdef CONFIG_SOC_K3_J784S4
+#include "j784s4_hardware.h"
+#endif
+
 /* Assuming these addresses and definitions stay common across K3 devices */
 #define CTRLMMR_WKUP_JTAG_ID	(WKUP_CTRL_MMR0_BASE + 0x14)
 #define JTAG_ID_VARIANT_SHIFT	28
arch/arm/mach-k3/include/mach/j784s4_hardware.h new file +60 -0

60 lines not on this page · raw message

arch/arm/mach-k3/include/mach/j784s4_spl.h new file +47 -0

47 lines not on this page · raw message

arch/arm/mach-k3/include/mach/spl.h +4 -0
index 3ddc7eb6b6..6f01ab58e2 100644
@@ -30,4 +30,8 @@
 #include "am62a_spl.h"
 #endif
 
+#ifdef CONFIG_SOC_K3_J784S4
+#include "j784s4_spl.h"
+#endif
+
 #endif /* _ASM_ARCH_SPL_H_ */
arch/arm/mach-k3/j784s4_fdt.c new file +15 -0
new file mode 100644
index 0000000000..125f55c9a6
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * J784S4: SoC specific initialization
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ *	Apurva Nandan <[email protected]>
+ */
+
+#include "common_fdt.h"
+#include <fdt_support.h>
+
+int ft_system_setup(void *blob, struct bd_info *bd)
+{
+	return fdt_fixup_msmc_ram_k3(blob);
+}
arch/arm/mach-k3/j784s4_init.c new file +335 -0

335 lines not on this page · raw message

arch/arm/mach-k3/r5/Makefile +1 -0
index b99199d337..b666ed34d1 100644
@@ -8,6 +8,7 @@ obj-$(CONFIG_SOC_K3_J721E) += j7200/
 obj-$(CONFIG_SOC_K3_J721S2) += j721s2/
 obj-$(CONFIG_SOC_K3_AM625) += am62x/
 obj-$(CONFIG_SOC_K3_AM62A7) += am62ax/
+obj-$(CONFIG_SOC_K3_J784S4) += j784s4/
 
 obj-y += lowlevel_init.o
 obj-y += r5_mpu.o
Signature · 1 line
2.34.1
Reviewed-by on v6 3/17
#4 lore raw

Re: [PATCH v6 03/17] arm: mach-k3: Add basic support for J784S4 SoC definition

Hi Apurva,

Quoted 519 lines · Apurva Nandan

Add J784S4 initialization files for initial SPL boot.

[ add firewall configurations and change the R5 MCU scratchpad ]
---
  arch/arm/mach-k3/Kconfig                      |  16 +-
  arch/arm/mach-k3/Makefile                     |   2 +
  arch/arm/mach-k3/arm64-mmu.c                  |  52 +++
  arch/arm/mach-k3/include/mach/hardware.h      |   4 +
  .../mach-k3/include/mach/j784s4_hardware.h    |  60 ++++
  arch/arm/mach-k3/include/mach/j784s4_spl.h    |  47 +++
  arch/arm/mach-k3/include/mach/spl.h           |   4 +
  arch/arm/mach-k3/j784s4_fdt.c                 |  15 +
  arch/arm/mach-k3/j784s4_init.c                | 335 ++++++++++++++++++
  arch/arm/mach-k3/r5/Makefile                  |   1 +
  10 files changed, 529 insertions(+), 7 deletions(-)

create mode 100644 arch/arm/mach-k3/include/mach/j784s4_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/j784s4_spl.h create mode 100644 arch/arm/mach-k3/j784s4_fdt.c
create mode 100644 arch/arm/mach-k3/j784s4_init.c

arch/arm/mach-k3/Kconfig +9 -7
index 03898424c9..150d0bfa14 100644
@@ -22,6 +22,9 @@ config SOC_K3_AM625
  config SOC_K3_AM62A7
  	bool "TI's K3 based AM62A7 SoC Family Support"
 
+config SOC_K3_J784S4
+	bool "TI's K3 based J784S4 SoC Family Support"
+
  endchoice
 
  if SOC_K3_J721E
@@ -35,7 +38,7 @@ config SYS_SOC
  config SYS_K3_NON_SECURE_MSRAM_SIZE
  	hex
  	default 0x80000 if SOC_K3_AM654
-	default 0x100000 if SOC_K3_J721E || SOC_K3_J721S2
+	default 0x100000 if SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_J784S4
  	default 0x1c0000 if SOC_K3_AM642
  	default 0x3c000 if SOC_K3_AM625 || SOC_K3_AM62A7
  	help
@@ -47,7 +50,7 @@ config SYS_K3_NON_SECURE_MSRAM_SIZE
  config SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE
  	hex
  	default 0x58000 if SOC_K3_AM654
-	default 0xc0000 if SOC_K3_J721E || SOC_K3_J721S2
+	default 0xc0000 if SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_J784S4
  	default 0x180000 if SOC_K3_AM642
  	default 0x38000 if SOC_K3_AM625 || SOC_K3_AM62A7
  	help
@@ -57,15 +60,14 @@ config SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE
  config SYS_K3_MCU_SCRATCHPAD_BASE
  	hex
  	default 0x40280000 if SOC_K3_AM654
-	default 0x41cff9fc if SOC_K3_J721S2
-	default 0x41cff9fc if SOC_K3_J721E
+	default 0x41cff9fc if SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_J784S4
  	help
  	  Describes the base address of MCU Scratchpad RAM.
 
  config SYS_K3_MCU_SCRATCHPAD_SIZE
  	hex
  	default 0x200 if SOC_K3_AM654
-	default 0x200 if SOC_K3_J721E || SOC_K3_J721S2
+	default 0x200 if SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_J784S4
  	help
  	  Describes the size of MCU Scratchpad RAM.
 
@@ -73,7 +75,7 @@ config SYS_K3_BOOT_PARAM_TABLE_INDEX
  	hex
  	default 0x41c7fbfc if SOC_K3_AM654
  	default 0x41cffbfc if SOC_K3_J721E
-	default 0x41cfdbfc if SOC_K3_J721S2
+	default 0x41cfdbfc if SOC_K3_J721S2 || SOC_K3_J784S4
  	default 0x701bebfc if SOC_K3_AM642
  	default 0x43c3f290 if SOC_K3_AM625
  	default 0x43c3f290 if SOC_K3_AM62A7 && CPU_V7R
@@ -130,7 +132,7 @@ config K3_ATF_LOAD_ADDR
 
  config K3_DM_FW
  	bool "Separate DM firmware image"
-	depends on CPU_V7R && (SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_AM625 || SOC_K3_AM62A7) && !CLK_TI_SCI && !TI_SCI_POWER_DOMAIN
+	depends on CPU_V7R && (SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_AM625 || SOC_K3_AM62A7 || SOC_K3_J784S4) && !CLK_TI_SCI && !TI_SCI_POWER_DOMAIN
  	default y
  	help
  	  Enabling this will indicate that the system has separate DM
arch/arm/mach-k3/Makefile +2 -0
index 4216137646..945698e6e8 100644
@@ -12,6 +12,7 @@ obj-$(CONFIG_SOC_K3_AM654) += am654_fdt.o
  obj-$(CONFIG_SOC_K3_J721E) += j721e_fdt.o
  obj-$(CONFIG_SOC_K3_J721S2) += j721s2_fdt.o
  obj-$(CONFIG_SOC_K3_AM625) += am625_fdt.o
+obj-$(CONFIG_SOC_K3_J784S4) += j784s4_fdt.o
  endif
  ifeq ($(CONFIG_SPL_BUILD),y)
  obj-$(CONFIG_SOC_K3_AM654) += am654_init.o
@@ -20,5 +21,6 @@ obj-$(CONFIG_SOC_K3_J721S2) += j721s2_init.o
  obj-$(CONFIG_SOC_K3_AM642) += am642_init.o
  obj-$(CONFIG_SOC_K3_AM625) += am625_init.o
  obj-$(CONFIG_SOC_K3_AM62A7) += am62a7_init.o
+obj-$(CONFIG_SOC_K3_J784S4) += j784s4_init.o
  endif
  obj-y += common.o security.o
arch/arm/mach-k3/arm64-mmu.c +52 -0
index e8db5332ae..f8b8a9b94f 100644
@@ -317,3 +317,55 @@ struct mm_region am64_mem_map[NR_MMU_REGIONS] = {
 
  struct mm_region *mem_map = am64_mem_map;
  #endif /* CONFIG_SOC_K3_AM642 */
+
+#if defined(CONFIG_SOC_K3_J784S4)
+#define NR_MMU_REGIONS	(CONFIG_NR_DRAM_BANKS + 5)
+
+struct mm_region j784s4_mem_map[NR_MMU_REGIONS] = {
+	{
+		.virt = 0x0UL,
+		.phys = 0x0UL,
+		.size = 0x80000000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+			 PTE_BLOCK_NON_SHARE |
+			 PTE_BLOCK_PXN | PTE_BLOCK_UXN
+	}, {
+		.virt = 0x80000000UL,
+		.phys = 0x80000000UL,
+		.size = 0x20000000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+			 PTE_BLOCK_INNER_SHARE
+	}, {
+		.virt = 0xa0000000UL,
+		.phys = 0xa0000000UL,
+		.size = 0x21000000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
+			 PTE_BLOCK_NON_SHARE
+	}, {
+		.virt = 0xc1000000UL,
+		.phys = 0xc1000000UL,
+		.size = 0x3f000000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+			 PTE_BLOCK_INNER_SHARE
+	}, {
+		.virt = 0x880000000UL,
+		.phys = 0x880000000UL,
+		.size = 0x80000000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+			 PTE_BLOCK_INNER_SHARE
+	}, {
+		.virt = 0x500000000UL,
+		.phys = 0x500000000UL,
+		.size = 0x400000000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+			 PTE_BLOCK_NON_SHARE |
+			 PTE_BLOCK_PXN | PTE_BLOCK_UXN
+	}, {
+		/* List terminator */
+		0,
+	}
+};
+
+struct mm_region *mem_map = j784s4_mem_map;
+
+#endif /* CONFIG_SOC_K3_J784S4 */
arch/arm/mach-k3/include/mach/hardware.h +4 -0
index a1a9dfbde6..0cf1e12aaa 100644
@@ -33,6 +33,10 @@
  #include "am62a_qos.h"
  #endif
 
+#ifdef CONFIG_SOC_K3_J784S4
+#include "j784s4_hardware.h"
+#endif
+
  /* Assuming these addresses and definitions stay common across K3 devices */
  #define CTRLMMR_WKUP_JTAG_ID	(WKUP_CTRL_MMR0_BASE + 0x14)
  #define JTAG_ID_VARIANT_SHIFT	28
arch/arm/mach-k3/include/mach/j784s4_hardware.h new file +60 -0
new file mode 100644
index 0000000000..a34ca6db23
@@ -0,0 +1,60 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * K3: J784S4 SoC definitions, structures etc.
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+#ifndef __ASM_ARCH_J784S4_HARDWARE_H
+#define __ASM_ARCH_J784S4_HARDWARE_H
+
+#include <config.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
+#define WKUP_CTRL_MMR0_BASE				0x43000000
+#define MCU_CTRL_MMR0_BASE				0x40f00000
+#define CTRL_MMR0_BASE					0x00100000
+
+#define CTRLMMR_MAIN_DEVSTAT				(CTRL_MMR0_BASE + 0x30)
+#define MAIN_DEVSTAT_BOOT_MODE_B_MASK			BIT(0)
+#define MAIN_DEVSTAT_BOOT_MODE_B_SHIFT			0
+#define MAIN_DEVSTAT_BKUP_BOOTMODE_MASK			GENMASK(3, 1)
+#define MAIN_DEVSTAT_BKUP_BOOTMODE_SHIFT		1
+#define MAIN_DEVSTAT_PRIM_BOOTMODE_MMC_PORT_MASK	BIT(6)
+#define MAIN_DEVSTAT_PRIM_BOOTMODE_PORT_SHIFT		6
+#define MAIN_DEVSTAT_BKUP_MMC_PORT_MASK			BIT(7)
+#define MAIN_DEVSTAT_BKUP_MMC_PORT_SHIFT		7
+
+#define CTRLMMR_WKUP_DEVSTAT				(WKUP_CTRL_MMR0_BASE + 0x30)
+#define WKUP_DEVSTAT_PRIMARY_BOOTMODE_MASK		GENMASK(5, 3)
+#define WKUP_DEVSTAT_PRIMARY_BOOTMODE_SHIFT		3
+#define WKUP_DEVSTAT_MCU_OMLY_MASK			BIT(6)
+#define WKUP_DEVSTAT_MCU_ONLY_SHIFT			6
+
+/* ROM HANDOFF Structure location */
+#define ROM_EXTENDED_BOOT_DATA_INFO			0x41cfdb00
+
+/* MCU SCRATCHPAD usage */
+#define TI_SRAM_SCRATCH_BOARD_EEPROM_START	CONFIG_SYS_K3_MCU_SCRATCHPAD_BASE
+
+#if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__)
+
+#define J784S4_DEV_MCU_RTI0			367
+#define J784S4_DEV_MCU_RTI1			368
+#define J784S4_DEV_MCU_ARMSS0_CPU0		346
+#define J784S4_DEV_MCU_ARMSS0_CPU1		347
+
+static const u32 put_device_ids[] = {
+	J784S4_DEV_MCU_RTI0,
+	J784S4_DEV_MCU_RTI1,
+};
+
+static const u32 put_core_ids[] = {
+	J784S4_DEV_MCU_ARMSS0_CPU1,
+	J784S4_DEV_MCU_ARMSS0_CPU0,     /* Handle CPU0 after CPU1 */
+};
+
+#endif
+
+#endif /* __ASM_ARCH_J784S4_HARDWARE_H */
arch/arm/mach-k3/include/mach/j784s4_spl.h new file +47 -0
new file mode 100644
index 0000000000..08e6ff5c0c
@@ -0,0 +1,47 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#ifndef _ASM_ARCH_J784S4_SPL_H_
+#define _ASM_ARCH_J784S4_SPL_H_
+
+/* With BootMode B = 0 */
+#include <linux/bitops.h>
+
+#define BOOT_DEVICE_HYPERFLASH		0x00
+#define BOOT_DEVICE_OSPI		0x01
+#define BOOT_DEVICE_QSPI		0x02
+#define BOOT_DEVICE_SPI			0x03
+#define BOOT_DEVICE_ETHERNET		0x04
+#define BOOT_DEVICE_I2C			0x06
+#define BOOT_DEVICE_UART		0x07
+#define BOOT_DEVICE_NOR			BOOT_DEVICE_HYPERFLASH
+
+/* With BootMode B = 1 */
+#define BOOT_DEVICE_MMC2		0x10
+#define BOOT_DEVICE_MMC1		0x11
+#define BOOT_DEVICE_DFU			0x12
+#define BOOT_DEVICE_UFS			0x13
+#define BOOT_DEVIE_GPMC			0x14
+#define BOOT_DEVICE_PCIE		0x15
+#define BOOT_DEVICE_XSPI		0x16
+#define BOOT_DEVICE_RAM			0x17
+#define BOOT_DEVICE_MMC2_2		0xFF /* Invalid value */
+
+/* Backup boot modes with MCU Only = 0 */
+#define BACKUP_BOOT_DEVICE_RAM		0x0
+#define BACKUP_BOOT_DEVICE_USB		0x1
+#define BACKUP_BOOT_DEVICE_UART		0x3
+#define BACKUP_BOOT_DEVICE_ETHERNET	0x4
+#define BACKUP_BOOT_DEVICE_MMC2		0x5
+#define BACKUP_BOOT_DEVICE_SPI		0x6
+#define BACKUP_BOOT_DEVICE_I2C		0x7
+
+#define BOOT_MODE_B_SHIFT		4
+#define BOOT_MODE_B_MASK		BIT(4)
+
+#define K3_PRIMARY_BOOTMODE		0x0
+#define K3_BACKUP_BOOTMODE		0x1
+
+#endif
arch/arm/mach-k3/include/mach/spl.h +4 -0
index 3ddc7eb6b6..6f01ab58e2 100644
@@ -30,4 +30,8 @@
  #include "am62a_spl.h"
  #endif
 
+#ifdef CONFIG_SOC_K3_J784S4
+#include "j784s4_spl.h"
+#endif
+
  #endif /* _ASM_ARCH_SPL_H_ */
arch/arm/mach-k3/j784s4_fdt.c new file +15 -0
new file mode 100644
index 0000000000..125f55c9a6
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * J784S4: SoC specific initialization
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ *	Apurva Nandan <[email protected]>
+ */
+
+#include "common_fdt.h"
+#include <fdt_support.h>
+
+int ft_system_setup(void *blob, struct bd_info *bd)
+{
+	return fdt_fixup_msmc_ram_k3(blob);
+}
arch/arm/mach-k3/j784s4_init.c new file +174 -0
new file mode 100644
index 0000000000..46e482b498
@@ -0,0 +1,335 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * J784S4: SoC specific initialization
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ *	Hari Nagalla <[email protected]>
+ */
+
+#include <init.h>
+#include <spl.h>
+#include <asm/io.h>
+#include <asm/armv7_mpu.h>
+#include <asm/arch/hardware.h>
+#include "sysfw-loader.h"
+#include "common.h"
+#include <linux/soc/ti/ti_sci_protocol.h>
+#include <dm.h>
+#include <dm/uclass-internal.h>
+#include <dm/pinctrl.h>
+#include <mmc.h>
+#include <remoteproc.h>
+
+struct fwl_data infra_cbass0_fwls[] = {
+	{ "PSC0", 5, 1 },
+	{ "PLL_CTRL0", 6, 1 },
+	{ "PLL_MMR0", 8, 26 },
+	{ "CTRL_MMR0", 9, 16 },
+	{ "GPIO0", 16, 1 },
+}, wkup_cbass0_fwls[] = {
+	{ "WKUP_PSC0", 129, 1 },
+	{ "WKUP_PLL_CTRL0", 130, 1 },
+	{ "WKUP_CTRL_MMR0", 131, 16 },
+	{ "WKUP_GPIO0", 132, 1 },
+	{ "WKUP_I2C0", 144, 1 },
+	{ "WKUP_USART0", 160, 1 },
+}, mcu_cbass0_fwls[] = {
+	{ "MCU_R5FSS0_CORE0", 1024, 4 },
+	{ "MCU_R5FSS0_CORE0_CFG", 1025, 3 },
+	{ "MCU_R5FSS0_CORE1", 1028, 4 },
+	{ "MCU_R5FSS0_CORE1_CFG", 1029, 1 },
+	{ "MCU_FSS0_CFG", 1032, 12 },
+	{ "MCU_FSS0_S1", 1033, 8 },
+	{ "MCU_FSS0_S0", 1036, 8 },
+	{ "MCU_PSROM49152X32", 1048, 1 },
+	{ "MCU_MSRAM128KX64", 1050, 8 },
+	{ "MCU_MSRAM128KX64_CFG", 1051, 1 },
+	{ "MCU_TIMER0", 1056, 1 },
+	{ "MCU_TIMER9", 1065, 1 },
+	{ "MCU_USART0", 1120, 1 },
+	{ "MCU_I2C0", 1152, 1 },
+	{ "MCU_CTRL_MMR0", 1200, 8 },
+	{ "MCU_PLL_MMR0", 1201, 3 },
+	{ "MCU_CPSW0", 1220, 2 },
+}, cbass_rc_cfg0_fwls[] = {
+	{ "EMMCSD4SS0_CFG", 2400, 4 },
+}, cbass_hc2_fwls[] = {
+	{ "PCIE0", 2547, 24 },
+}, cbass_hc_cfg0_fwls[] = {
+	{ "PCIE0_CFG", 2577, 7 },
+	{ "EMMC8SS0_CFG", 2579, 4 },
+	{ "USB3SS0_CORE", 2580, 4 },
+	{ "USB3SS1_CORE", 2581, 1 },
+}, navss_cbass0_fwls[] = {
+	{ "NACSS_VIRT0", 6253, 1 },
+};
+
+static void ctrl_mmr_unlock(void)
+{
+	/* Unlock all WKUP_CTRL_MMR0 module registers */
+	mmr_unlock(WKUP_CTRL_MMR0_BASE, 0);
+	mmr_unlock(WKUP_CTRL_MMR0_BASE, 1);
+	mmr_unlock(WKUP_CTRL_MMR0_BASE, 2);
+	mmr_unlock(WKUP_CTRL_MMR0_BASE, 3);
+	mmr_unlock(WKUP_CTRL_MMR0_BASE, 4);
+	mmr_unlock(WKUP_CTRL_MMR0_BASE, 6);
+	mmr_unlock(WKUP_CTRL_MMR0_BASE, 7);
+
+	/* Unlock all MCU_CTRL_MMR0 module registers */
+	mmr_unlock(MCU_CTRL_MMR0_BASE, 0);
+	mmr_unlock(MCU_CTRL_MMR0_BASE, 1);
+	mmr_unlock(MCU_CTRL_MMR0_BASE, 2);
+	mmr_unlock(MCU_CTRL_MMR0_BASE, 3);
+	mmr_unlock(MCU_CTRL_MMR0_BASE, 4);
+
+	/* Unlock all CTRL_MMR0 module registers */
+	mmr_unlock(CTRL_MMR0_BASE, 0);
+	mmr_unlock(CTRL_MMR0_BASE, 1);
+	mmr_unlock(CTRL_MMR0_BASE, 2);
+	mmr_unlock(CTRL_MMR0_BASE, 3);
+	mmr_unlock(CTRL_MMR0_BASE, 5);
+	mmr_unlock(CTRL_MMR0_BASE, 7);
+}
+
+void k3_mmc_stop_clock(void)
+{
+	if (IS_ENABLED(CONFIG_K3_LOAD_SYSFW)) {
+		if (spl_boot_device() == BOOT_DEVICE_MMC1) {
+			struct mmc *mmc = find_mmc_device(0);
+
+			if (!mmc)
+				return;
+
+			mmc->saved_clock = mmc->clock;
+			mmc_set_clock(mmc, 0, true);
+		}
+	}
+}
+
+void k3_mmc_restart_clock(void)
+{
+	if (IS_ENABLED(CONFIG_K3_LOAD_SYSFW)) {
+		if (spl_boot_device() == BOOT_DEVICE_MMC1) {
+			struct mmc *mmc = find_mmc_device(0);
+
+			if (!mmc)
+				return;
+
+			mmc_set_clock(mmc, mmc->saved_clock, false);
+		}
+	}
+}
+
+/*
+ * This uninitialized global variable would normal end up in the .bss section,
+ * but the .bss is cleared between writing and reading this variable, so move
+ * it to the .data section.
+ */
+u32 bootindex __section(".data");
+static struct rom_extended_boot_data bootdata __section(".data");
+
+static void store_boot_info_from_rom(void)
+{
+	bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX);
+	memcpy(&bootdata, (uintptr_t *)ROM_EXTENDED_BOOT_DATA_INFO,
+	       sizeof(struct rom_extended_boot_data));
+}
+
+void board_init_f(ulong dummy)
+{
+	struct udevice *dev;
+	int ret, ctr = 1;
+
+	/*
+	 * Cannot delay this further as there is a chance that
+	 * K3_BOOT_PARAM_TABLE_INDEX can be over written by SPL MALLOC section.
+	 */
+	store_boot_info_from_rom();
+
+	/* Make all control module registers accessible */
+	ctrl_mmr_unlock();
+
+	if (IS_ENABLED(CONFIG_CPU_V7R)) {
+		disable_linefill_optimization();
+		setup_k3_mpu_regions();
+	}
+
+	/* Init DM early */
+	ret = spl_early_init();
+
+	/* Prepare console output */
+	preloader_console_init();
+
+	if (IS_ENABLED(CONFIG_K3_LOAD_SYSFW)) {
+		/*
+		 * Process pinctrl for the serial0 a.k.a. WKUP_UART0 module and continue
+		 * regardless of the result of pinctrl. Do this without probing the
+		 * device, but instead by searching the device that would request the
+		 * given sequence number if probed. The UART will be used by the system
+		 * firmware (SYSFW) image for various purposes and SYSFW depends on us
+		 * to initialize its pin settings.
+		 */
+		ret = uclass_find_device_by_seq(UCLASS_SERIAL, 0, &dev);
+		if (!ret)
+			pinctrl_select_state(dev, "default");

arch/arm/mach-k3/j784s4_init.c line 184

Quoted 10 lines
arch/arm/mach-k3/j784s4_init.c new file +10 -0
+
+		/*
+		 * Load, start up, and configure system controller firmware. Provide
+		 * the U-Boot console init function to the SYSFW post-PM configuration
+		 * callback hook, effectively switching on (or over) the console
+		 * output.
+		 */
+		k3_sysfw_loader(is_rom_loaded_sysfw(&bootdata),
+				k3_mmc_stop_clock, k3_mmc_restart_clock);
+

All these K3 specific code, should we push it out to a separate function like J721S2? (commit fca27ee8b993bd1a5752fc2156b1e86358fa8041 "arch: mach-k3: Update board specific API name to K3 generic API name")

Else we can take this up in a separate clean up series.

Quoted 38 lines
arch/arm/mach-k3/j784s4_init.c new file +38 -0
+#ifdef CONFIG_SPL_OF_LIST
+		if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
+			do_board_detect();
+#endif
+
+		if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
+			/*
+			 * Force probe of clk_k3 driver here to ensure basic default clock
+			 * configuration is always done for enabling PM services.
+			 */
+			ret = uclass_get_device_by_driver(UCLASS_CLK,
+							  DM_DRIVER_GET(ti_clk),
+							  &dev);
+			if (ret)
+				panic("Failed to initialize clk-k3!\n");
+		}
+
+		remove_fwl_configs(cbass_hc_cfg0_fwls, ARRAY_SIZE(cbass_hc_cfg0_fwls));
+		remove_fwl_configs(cbass_hc2_fwls, ARRAY_SIZE(cbass_hc2_fwls));
+		remove_fwl_configs(cbass_rc_cfg0_fwls, ARRAY_SIZE(cbass_rc_cfg0_fwls));
+		remove_fwl_configs(infra_cbass0_fwls, ARRAY_SIZE(infra_cbass0_fwls));
+		remove_fwl_configs(mcu_cbass0_fwls, ARRAY_SIZE(mcu_cbass0_fwls));
+		remove_fwl_configs(wkup_cbass0_fwls, ARRAY_SIZE(wkup_cbass0_fwls));
+		remove_fwl_configs(navss_cbass0_fwls, ARRAY_SIZE(navss_cbass0_fwls));
+	}
+
+	/* Output System Firmware version info */
+	k3_sysfw_print_ver();
+
+	if (IS_ENABLED(CONFIG_TARGET_J784S4_R5_EVM)) {
+		ret = uclass_get_device_by_name(UCLASS_MISC, "msmc", &dev);
+		if (ret)
+			panic("Probe of msmc failed: %d\n", ret);
+
+		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+		if (ret)
+			panic("DRAM 0 init failed: %d\n", ret);
+

arch/arm/mach-k3/j784s4_init.c line 232

Quoted 10 lines
arch/arm/mach-k3/j784s4_init.c new file +10 -0
+		while (dev) {
+			ret = uclass_next_device_err(&dev);
+			if (ret) {
+				printf("Initialized %d DRAM controllers\n", ctr);
+				break;
+			}
+			ctr++;
+		}
+	}
+

This looks fine. With the above comment addressed or not:

Quoted 115 lines
arch/arm/mach-k3/j784s4_init.c new file +103 -0
+	spl_enable_cache();
+}
+
+u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
+{
+	switch (boot_device) {
+	case BOOT_DEVICE_MMC1:
+		if (IS_ENABLED(CONFIG_SUPPORT_EMMC_BOOT)) {
+			if (spl_mmc_emmc_boot_partition(mmc))
+				return MMCSD_MODE_EMMCBOOT;
+			return MMCSD_MODE_FS;
+		}
+		if (IS_ENABLED(CONFIG_SPL_FS_FAT) || IS_ENABLED(CONFIG_SPL_FS_EXT4))
+			return MMCSD_MODE_FS;
+		return MMCSD_MODE_EMMCBOOT;
+	case BOOT_DEVICE_MMC2:
+		return MMCSD_MODE_FS;
+	default:
+		return MMCSD_MODE_RAW;
+	}
+}
+
+static u32 __get_backup_bootmedia(u32 main_devstat)
+{
+	u32 bkup_boot = (main_devstat & MAIN_DEVSTAT_BKUP_BOOTMODE_MASK) >>
+			MAIN_DEVSTAT_BKUP_BOOTMODE_SHIFT;
+
+	switch (bkup_boot) {
+	case BACKUP_BOOT_DEVICE_USB:
+		return BOOT_DEVICE_DFU;
+	case BACKUP_BOOT_DEVICE_UART:
+		return BOOT_DEVICE_UART;
+	case BACKUP_BOOT_DEVICE_ETHERNET:
+		return BOOT_DEVICE_ETHERNET;
+	case BACKUP_BOOT_DEVICE_MMC2:
+	{
+		u32 port = (main_devstat & MAIN_DEVSTAT_BKUP_MMC_PORT_MASK) >>
+			    MAIN_DEVSTAT_BKUP_MMC_PORT_SHIFT;
+		if (port == 0x0)
+			return BOOT_DEVICE_MMC1;
+		return BOOT_DEVICE_MMC2;
+	}
+	case BACKUP_BOOT_DEVICE_SPI:
+		return BOOT_DEVICE_SPI;
+	case BACKUP_BOOT_DEVICE_I2C:
+		return BOOT_DEVICE_I2C;
+	}
+
+	return BOOT_DEVICE_RAM;
+}
+
+static u32 __get_primary_bootmedia(u32 main_devstat, u32 wkup_devstat)
+{
+	u32 bootmode = (wkup_devstat & WKUP_DEVSTAT_PRIMARY_BOOTMODE_MASK) >>
+			WKUP_DEVSTAT_PRIMARY_BOOTMODE_SHIFT;
+
+	bootmode |= (main_devstat & MAIN_DEVSTAT_BOOT_MODE_B_MASK) <<
+			BOOT_MODE_B_SHIFT;
+
+	if (bootmode == BOOT_DEVICE_OSPI || bootmode ==	BOOT_DEVICE_QSPI ||
+	    bootmode == BOOT_DEVICE_XSPI)
+		bootmode = BOOT_DEVICE_SPI;
+
+	if (bootmode == BOOT_DEVICE_MMC2) {
+		u32 port = (main_devstat &
+			    MAIN_DEVSTAT_PRIM_BOOTMODE_MMC_PORT_MASK) >>
+			   MAIN_DEVSTAT_PRIM_BOOTMODE_PORT_SHIFT;
+		if (port == 0x0)
+			bootmode = BOOT_DEVICE_MMC1;
+	}
+
+	return bootmode;
+}
+
+u32 spl_spi_boot_bus(void)
+{
+	u32 wkup_devstat = readl(CTRLMMR_WKUP_DEVSTAT);
+	u32 main_devstat = readl(CTRLMMR_MAIN_DEVSTAT);
+	u32 bootmode = ((wkup_devstat & WKUP_DEVSTAT_PRIMARY_BOOTMODE_MASK) >>
+				WKUP_DEVSTAT_PRIMARY_BOOTMODE_SHIFT) |
+			((main_devstat & MAIN_DEVSTAT_BOOT_MODE_B_MASK) << BOOT_MODE_B_SHIFT);
+
+	return (bootmode == BOOT_DEVICE_QSPI) ? 1 : 0;
+}
+
+u32 spl_boot_device(void)
+{
+	u32 wkup_devstat = readl(CTRLMMR_WKUP_DEVSTAT);
+	u32 main_devstat;
+
+	if (wkup_devstat & WKUP_DEVSTAT_MCU_OMLY_MASK) {
+		printf("ERROR: MCU only boot is not yet supported\n");
+		return BOOT_DEVICE_RAM;
+	}
+
+	/* MAIN CTRL MMR can only be read if MCU ONLY is 0 */
+	main_devstat = readl(CTRLMMR_MAIN_DEVSTAT);
+
+	if (bootindex == K3_PRIMARY_BOOTMODE)
+		return __get_primary_bootmedia(main_devstat, wkup_devstat);
+	else
+		return __get_backup_bootmedia(main_devstat);
+}
arch/arm/mach-k3/r5/Makefile +1 -0
index b99199d337..b666ed34d1 100644
@@ -8,6 +8,7 @@ obj-$(CONFIG_SOC_K3_J721E) += j7200/
  obj-$(CONFIG_SOC_K3_J721S2) += j721s2/
  obj-$(CONFIG_SOC_K3_AM625) += am62x/
  obj-$(CONFIG_SOC_K3_AM62A7) += am62ax/
+obj-$(CONFIG_SOC_K3_J784S4) += j784s4/
 
  obj-y += lowlevel_init.o
  obj-y += r5_mpu.o
Signature · 2 lines
Thanking You
Neha Malcom Francis
#5 lore raw

Re: [PATCH v6 03/17] arm: mach-k3: Add basic support for J784S4 SoC definition

On December 7, 2023 thus sayeth Neha Malcom Francis:

Quoted 27 lines

Hi Apurva,

Quoted 24 lines · Apurva Nandan

Add J784S4 initialization files for initial SPL boot.

[ add firewall configurations and change the R5 MCU scratchpad ]
---
  arch/arm/mach-k3/Kconfig                      |  16 +-
  arch/arm/mach-k3/Makefile                     |   2 +
  arch/arm/mach-k3/arm64-mmu.c                  |  52 +++
  arch/arm/mach-k3/include/mach/hardware.h      |   4 +
  .../mach-k3/include/mach/j784s4_hardware.h    |  60 ++++
  arch/arm/mach-k3/include/mach/j784s4_spl.h    |  47 +++
  arch/arm/mach-k3/include/mach/spl.h           |   4 +
  arch/arm/mach-k3/j784s4_fdt.c                 |  15 +
  arch/arm/mach-k3/j784s4_init.c                | 335 ++++++++++++++++++
  arch/arm/mach-k3/r5/Makefile                  |   1 +
  10 files changed, 529 insertions(+), 7 deletions(-)

create mode 100644 arch/arm/mach-k3/include/mach/j784s4_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/j784s4_spl.h create mode 100644 arch/arm/mach-k3/j784s4_fdt.c
create mode 100644 arch/arm/mach-k3/j784s4_init.c

...

Quoted 29 lines
Quoted 29 lines
arch/arm/mach-k3/j784s4_init.c new file +29 -0
+
+void k3_mmc_stop_clock(void)
+{
+	if (IS_ENABLED(CONFIG_K3_LOAD_SYSFW)) {
+		if (spl_boot_device() == BOOT_DEVICE_MMC1) {
+			struct mmc *mmc = find_mmc_device(0);
+
+			if (!mmc)
+				return;
+
+			mmc->saved_clock = mmc->clock;
+			mmc_set_clock(mmc, 0, true);
+		}
+	}
+}
+
+void k3_mmc_restart_clock(void)
+{
+	if (IS_ENABLED(CONFIG_K3_LOAD_SYSFW)) {
+		if (spl_boot_device() == BOOT_DEVICE_MMC1) {
+			struct mmc *mmc = find_mmc_device(0);
+
+			if (!mmc)
+				return;
+
+			mmc_set_clock(mmc, mmc->saved_clock, false);
+		}
+	}
+}

...

Quoted 52 lines
Quoted 37 lines
arch/arm/mach-k3/j784s4_init.c new file +37 -0
+void board_init_f(ulong dummy)
+{
+	struct udevice *dev;
+	int ret, ctr = 1;
+
+	/*
+	 * Cannot delay this further as there is a chance that
+	 * K3_BOOT_PARAM_TABLE_INDEX can be over written by SPL MALLOC section.
+	 */
+	store_boot_info_from_rom();
+
+	/* Make all control module registers accessible */
+	ctrl_mmr_unlock();
+
+	if (IS_ENABLED(CONFIG_CPU_V7R)) {
+		disable_linefill_optimization();
+		setup_k3_mpu_regions();
+	}
+
+	/* Init DM early */
+	ret = spl_early_init();
+
+	/* Prepare console output */
+	preloader_console_init();
+
+	if (IS_ENABLED(CONFIG_K3_LOAD_SYSFW)) {
+		/*
+		 * Process pinctrl for the serial0 a.k.a. WKUP_UART0 module and continue
+		 * regardless of the result of pinctrl. Do this without probing the
+		 * device, but instead by searching the device that would request the
+		 * given sequence number if probed. The UART will be used by the system
+		 * firmware (SYSFW) image for various purposes and SYSFW depends on us
+		 * to initialize its pin settings.
+		 */
+		ret = uclass_find_device_by_seq(UCLASS_SERIAL, 0, &dev);
+		if (!ret)
+			pinctrl_select_state(dev, "default");

arch/arm/mach-k3/j784s4_init.c line 184

Quoted 10 lines
arch/arm/mach-k3/j784s4_init.c new file +10 -0
+
+		/*
+		 * Load, start up, and configure system controller firmware. Provide
+		 * the U-Boot console init function to the SYSFW post-PM configuration
+		 * callback hook, effectively switching on (or over) the console
+		 * output.
+		 */
+		k3_sysfw_loader(is_rom_loaded_sysfw(&bootdata),
+				k3_mmc_stop_clock, k3_mmc_restart_clock);
+

All these K3 specific code, should we push it out to a separate function like J721S2? (commit fca27ee8b993bd1a5752fc2156b1e86358fa8041 "arch:
mach-k3: Update board specific API name to K3 generic API name")

Quoted 2 lines

Else we can take this up in a separate clean up series.

Do we still have a need to support the split binary (sysfw.itb) boot anymore now that binman is building tiboot3 for us? I don't think we will ever be in a situation where ROM hasn't loaded the firmware for us.

Quoted 5 lines

arch/arm/mach-k3/j784s4_init.c line 189

Quoted 5 lines
arch/arm/mach-k3/j784s4_init.c new file +5 -0
+#ifdef CONFIG_SPL_OF_LIST
+		if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
+			do_board_detect();
+#endif
+

Should we tie CONFIG_SPL_OF_LIST and CONFIG_TI_I2C_BOARD_DETECT together in Kconfig to avoid this?

Quoted 32 lines
Quoted 32 lines
arch/arm/mach-k3/j784s4_init.c new file +32 -0
+		if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
+			/*
+			 * Force probe of clk_k3 driver here to ensure basic default clock
+			 * configuration is always done for enabling PM services.
+			 */
+			ret = uclass_get_device_by_driver(UCLASS_CLK,
+							  DM_DRIVER_GET(ti_clk),
+							  &dev);
+			if (ret)
+				panic("Failed to initialize clk-k3!\n");
+		}
+
+		remove_fwl_configs(cbass_hc_cfg0_fwls, ARRAY_SIZE(cbass_hc_cfg0_fwls));
+		remove_fwl_configs(cbass_hc2_fwls, ARRAY_SIZE(cbass_hc2_fwls));
+		remove_fwl_configs(cbass_rc_cfg0_fwls, ARRAY_SIZE(cbass_rc_cfg0_fwls));
+		remove_fwl_configs(infra_cbass0_fwls, ARRAY_SIZE(infra_cbass0_fwls));
+		remove_fwl_configs(mcu_cbass0_fwls, ARRAY_SIZE(mcu_cbass0_fwls));
+		remove_fwl_configs(wkup_cbass0_fwls, ARRAY_SIZE(wkup_cbass0_fwls));
+		remove_fwl_configs(navss_cbass0_fwls, ARRAY_SIZE(navss_cbass0_fwls));
+	}
+
+	/* Output System Firmware version info */
+	k3_sysfw_print_ver();
+
+	if (IS_ENABLED(CONFIG_TARGET_J784S4_R5_EVM)) {
+		ret = uclass_get_device_by_name(UCLASS_MISC, "msmc", &dev);
+		if (ret)
+			panic("Probe of msmc failed: %d\n", ret);
+
+		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+		if (ret)
+			panic("DRAM 0 init failed: %d\n", ret);
Quoted 8 lines

arch/arm/mach-k3/j784s4_init.c line 229

Quoted 8 lines
arch/arm/mach-k3/j784s4_init.c new file +8 -0
+
+		while (dev) {
+			ret = uclass_next_device_err(&dev);
+			if (ret) {
+				printf("Initialized %d DRAM controllers\n", ctr);
+				break;
+			}
+			ctr++;

Nice! However I'm worried we miss events with controllers that we wanted and failed to probe. Should we invert this check?

The uclass_foreach_dev() macro could help here too, but I don't see that used very much. There may be a better idea i'm missing

Quoted 4 lines

This looks fine. With the above comment addressed or not:

~Bryan

#6 lore raw

PATCH v6 4/17 arm: mach-k3: Sort SoC JTAG_ID entries

In reply to Apurva Nandan

Sort JTAG_IDs for K3 SoCs in hardware.h in alphabetical order.

---
 arch/arm/mach-k3/include/mach/hardware.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-k3/include/mach/hardware.h +4 -4
index 0cf1e12aaa..7e143c6bdc 100644
@@ -43,13 +43,13 @@
 #define JTAG_ID_VARIANT_MASK	(0xf << 28)
 #define JTAG_ID_PARTNO_SHIFT	12
 #define JTAG_ID_PARTNO_MASK	(0xffff << 12)
+#define JTAG_ID_PARTNO_AM62AX   0xbb8d
+#define JTAG_ID_PARTNO_AM62X	0xbb7e
+#define JTAG_ID_PARTNO_AM64X	0xbb38
 #define JTAG_ID_PARTNO_AM65X	0xbb5a
-#define JTAG_ID_PARTNO_J721E	0xbb64
 #define JTAG_ID_PARTNO_J7200	0xbb6d
-#define JTAG_ID_PARTNO_AM64X	0xbb38
+#define JTAG_ID_PARTNO_J721E	0xbb64
 #define JTAG_ID_PARTNO_J721S2	0xbb75
-#define JTAG_ID_PARTNO_AM62X	0xbb7e
-#define JTAG_ID_PARTNO_AM62AX   0xbb8d
 
 #define K3_SOC_ID(id, ID) \
 static inline bool soc_is_##id(void) \
Signature · 1 line
2.34.1
#7 lore raw

PATCH v6 5/17 soc: ti: k3-socinfo: Add entry for J784S4 SoC

In reply to Apurva Nandan

Add support for J784S4 SoC Identification.

---
 arch/arm/mach-k3/include/mach/hardware.h | 1 +
 drivers/soc/soc_ti_k3.c                  | 3 +++
 2 files changed, 4 insertions(+)
arch/arm/mach-k3/include/mach/hardware.h +1 -0
index 7e143c6bdc..74692b745a 100644
@@ -50,6 +50,7 @@
 #define JTAG_ID_PARTNO_J7200	0xbb6d
 #define JTAG_ID_PARTNO_J721E	0xbb64
 #define JTAG_ID_PARTNO_J721S2	0xbb75
+#define JTAG_ID_PARTNO_J784S4	0xbb80
 
 #define K3_SOC_ID(id, ID) \
 static inline bool soc_is_##id(void) \
drivers/soc/soc_ti_k3.c +3 -0
index 355a5368dd..d176980915 100644
@@ -45,6 +45,9 @@ static const char *get_family_string(u32 idreg)
 	case JTAG_ID_PARTNO_AM62AX:
 		family = "AM62AX";
 		break;
+	case JTAG_ID_PARTNO_J784S4:
+		family = "J784S4";
+		break;
 	default:
 		family = "Unknown Silicon";
 	};
Signature · 1 line
2.34.1
#8 lore raw

PATCH v6 6/17 arm: mach-k3: j784s4: Add clk and power support

In reply to Apurva Nandan

Add clk and device data which can be used by respective drivers to configure clocks and PSC.

---
 arch/arm/mach-k3/r5/j784s4/Makefile    |   7 +
 arch/arm/mach-k3/r5/j784s4/clk-data.c  | 428 +++++++++++++++++++++++++
 arch/arm/mach-k3/r5/j784s4/dev-data.c  |  98 ++++++
 drivers/clk/ti/clk-k3.c                |   6 +
 drivers/power/domain/ti-power-domain.c |   6 +
 include/k3-clk.h                       |   1 +
 include/k3-dev.h                       |   1 +
 7 files changed, 547 insertions(+)
 create mode 100644 arch/arm/mach-k3/r5/j784s4/Makefile
 create mode 100644 arch/arm/mach-k3/r5/j784s4/clk-data.c
 create mode 100644 arch/arm/mach-k3/r5/j784s4/dev-data.c
arch/arm/mach-k3/r5/j784s4/Makefile new file +7 -0
new file mode 100644
index 0000000000..23e1ce51ac
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+
+obj-y += clk-data.o
+obj-y += dev-data.o
arch/arm/mach-k3/r5/j784s4/clk-data.c new file +428 -0

428 lines not on this page · raw message

arch/arm/mach-k3/r5/j784s4/dev-data.c new file +98 -0

98 lines not on this page · raw message

drivers/clk/ti/clk-k3.c +6 -0
index eb76195bd7..10f6049797 100644
@@ -86,6 +86,12 @@ static const struct soc_attr ti_k3_soc_clk_data[] = {
 		.family = "AM62AX",
 		.data = &am62ax_clk_platdata,
 	},
+#endif
+#ifdef CONFIG_SOC_K3_J784S4
+	{
+		.family = "J784S4",
+		.data = &j784s4_clk_platdata,
+	},
 #endif
 	{ /* sentinel */ }
 };
drivers/power/domain/ti-power-domain.c +6 -0
index b34c982f4f..fb4ca2dd6b 100644
@@ -98,6 +98,12 @@ static const struct soc_attr ti_k3_soc_pd_data[] = {
 		.family = "AM62AX",
 		.data = &am62ax_pd_platdata,
 	},
+#endif
+#ifdef CONFIG_SOC_K3_J784S4
+	{
+		.family = "J784S4",
+		.data = &j784s4_pd_platdata,
+	},
 #endif
 	{ /* sentinel */ }
 };
include/k3-clk.h +1 -0
index 1b6ab8fe65..e161f09c0f 100644
@@ -176,6 +176,7 @@ extern const struct ti_k3_clk_platdata j7200_clk_platdata;
 extern const struct ti_k3_clk_platdata j721s2_clk_platdata;
 extern const struct ti_k3_clk_platdata am62x_clk_platdata;
 extern const struct ti_k3_clk_platdata am62ax_clk_platdata;
+extern const struct ti_k3_clk_platdata j784s4_clk_platdata;
 
 struct clk *clk_register_ti_pll(const char *name, const char *parent_name,
 				void __iomem *reg);
include/k3-dev.h +1 -0
index 072e10ba63..a9d1ada804 100644
@@ -80,6 +80,7 @@ extern const struct ti_k3_pd_platdata j7200_pd_platdata;
 extern const struct ti_k3_pd_platdata j721s2_pd_platdata;
 extern const struct ti_k3_pd_platdata am62x_pd_platdata;
 extern const struct ti_k3_pd_platdata am62ax_pd_platdata;
+extern const struct ti_k3_pd_platdata j784s4_pd_platdata;
 
 u8 ti_pd_state(struct ti_pd *pd);
 u8 lpsc_get_state(struct ti_lpsc *lpsc);
Signature · 1 line
2.34.1
Reviewed-by on v6 6/17
#9 lore raw

Re: [PATCH v6 06/17] arm: mach-k3: j784s4: Add clk and power support

Quoted 620 lines · Apurva Nandan

Add clk and device data which can be used by respective drivers to configure clocks and PSC.

---
  arch/arm/mach-k3/r5/j784s4/Makefile    |   7 +
  arch/arm/mach-k3/r5/j784s4/clk-data.c  | 428 +++++++++++++++++++++++++
  arch/arm/mach-k3/r5/j784s4/dev-data.c  |  98 ++++++
  drivers/clk/ti/clk-k3.c                |   6 +
  drivers/power/domain/ti-power-domain.c |   6 +
  include/k3-clk.h                       |   1 +
  include/k3-dev.h                       |   1 +
  7 files changed, 547 insertions(+)

create mode 100644 arch/arm/mach-k3/r5/j784s4/Makefile create mode 100644 arch/arm/mach-k3/r5/j784s4/clk-data.c create mode 100644 arch/arm/mach-k3/r5/j784s4/dev-data.c

arch/arm/mach-k3/r5/j784s4/Makefile new file +7 -0
new file mode 100644
index 0000000000..23e1ce51ac
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+
+obj-y += clk-data.o
+obj-y += dev-data.o
arch/arm/mach-k3/r5/j784s4/clk-data.c new file +428 -0
new file mode 100644
index 0000000000..d3fac38dd6
@@ -0,0 +1,428 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * J784S4 specific clock platform data
+ *
+ * This file is auto generated. Please do not hand edit and report any issues
+ * to Bryan Brattlof <[email protected]>.
+ *
+ * Copyright (C) 2020-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include <linux/clk-provider.h>
+#include "k3-clk.h"
+
+static const char * const gluelogic_hfosc0_clkout_parents[] = {
+	"osc_19_2_mhz",
+	"osc_20_mhz",
+	"osc_24_mhz",
+	"osc_25_mhz",
+	"osc_26_mhz",
+	"osc_27_mhz",
+};
+
+static const char * const mcu_ospi0_iclk_sel_out0_parents[] = {
+	"board_0_mcu_ospi0_dqs_out",
+	"fss_mcu_0_ospi_0_ospi_oclk_clk",
+};
+
+static const char * const mcu_ospi1_iclk_sel_out0_parents[] = {
+	"board_0_mcu_ospi1_dqs_out",
+	"fss_mcu_0_ospi_1_ospi_oclk_clk",
+};
+
+static const char * const wkup_fref_clksel_out0_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"j7am_wakeup_16ff_wkup_0_wkup_rcosc_12p5m_clk",
+};
+
+static const char * const k3_pll_ctrl_wrap_wkup_0_sysclkout_clk_parents[] = {
+	"wkup_fref_clksel_out0",
+	"hsdiv1_16fft_mcu_0_hsdivout0_clk",
+};
+
+static const char * const mcu_ospi_ref_clk_sel_out0_parents[] = {
+	"hsdiv4_16fft_mcu_1_hsdivout4_clk",
+	"hsdiv4_16fft_mcu_2_hsdivout4_clk",
+};
+
+static const char * const mcu_ospi_ref_clk_sel_out1_parents[] = {
+	"hsdiv4_16fft_mcu_1_hsdivout4_clk",
+	"hsdiv4_16fft_mcu_2_hsdivout4_clk",
+};
+
+static const char * const wkup_gpio0_clksel_out0_parents[] = {
+	"k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk",
+	"k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk",
+	"j7am_wakeup_16ff_wkup_0_wkup_rcosc_32k_clk",
+	"j7am_wakeup_16ff_wkup_0_wkup_rcosc_12p5m_clk",
+};
+
+static const char * const mcu_usart_clksel_out0_parents[] = {
+	"hsdiv4_16fft_mcu_1_hsdivout3_clk",
+	"postdiv3_16fft_main_1_hsdivout5_clk",
+};
+
+static const char * const wkup_i2c_mcupll_bypass_out0_parents[] = {
+	"hsdiv4_16fft_mcu_1_hsdivout3_clk",
+	"gluelogic_hfosc0_clkout",
+};
+
+static const char * const main_pll_hfosc_sel_out0_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out1_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out12_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out19_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out2_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out26_0_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out27_0_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out28_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out3_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out7_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const main_pll_hfosc_sel_out8_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const usb0_refclk_sel_out0_parents[] = {
+	"gluelogic_hfosc0_clkout",
+	"board_0_hfosc1_clk_out",
+};
+
+static const char * const emmcsd1_lb_clksel_out0_parents[] = {
+	"board_0_mmc1_clklb_out",
+	"board_0_mmc1_clk_out",
+};
+
+static const char * const mcu_clkout_mux_out0_parents[] = {
+	"hsdiv4_16fft_mcu_2_hsdivout0_clk",
+	"hsdiv4_16fft_mcu_2_hsdivout0_clk",
+};
+
+static const char * const k3_pll_ctrl_wrap_main_0_sysclkout_clk_parents[] = {
+	"main_pll_hfosc_sel_out0",
+	"hsdiv4_16fft_main_0_hsdivout0_clk",
+};
+
+static const char * const dpi0_ext_clksel_out0_parents[] = {
+	"hsdiv1_16fft_main_19_hsdivout0_clk",
+	"board_0_vout0_extpclkin_out",
+};
+
+static const char * const emmcsd_refclk_sel_out0_parents[] = {
+	"hsdiv4_16fft_main_0_hsdivout2_clk",
+	"hsdiv4_16fft_main_1_hsdivout2_clk",
+	"hsdiv4_16fft_main_2_hsdivout2_clk",
+	"hsdiv4_16fft_main_3_hsdivout2_clk",
+};
+
+static const char * const emmcsd_refclk_sel_out1_parents[] = {
+	"hsdiv4_16fft_main_0_hsdivout2_clk",
+	"hsdiv4_16fft_main_1_hsdivout2_clk",
+	"hsdiv4_16fft_main_2_hsdivout2_clk",
+	"hsdiv4_16fft_main_3_hsdivout2_clk",
+};
+
+static const char * const gtc_clk_mux_out0_parents[] = {
+	"hsdiv4_16fft_main_3_hsdivout1_clk",
+	"postdiv3_16fft_main_0_hsdivout6_clk",
+	"board_0_mcu_cpts0_rft_clk_out",
+	"board_0_cpts0_rft_clk_out",
+	"board_0_mcu_ext_refclk0_out",
+	"board_0_ext_refclk1_out",
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	"hsdiv4_16fft_mcu_2_hsdivout1_clk",
+	"k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk",
+};
+
+static const struct clk_data clk_list[] = {
+	CLK_FIXED_RATE("osc_27_mhz", 27000000, 0),
+	CLK_FIXED_RATE("osc_26_mhz", 26000000, 0),
+	CLK_FIXED_RATE("osc_25_mhz", 25000000, 0),
+	CLK_FIXED_RATE("osc_24_mhz", 24000000, 0),
+	CLK_FIXED_RATE("osc_20_mhz", 20000000, 0),
+	CLK_FIXED_RATE("osc_19_2_mhz", 19200000, 0),
+	CLK_MUX("gluelogic_hfosc0_clkout", gluelogic_hfosc0_clkout_parents, 6, 0x43000030, 0, 3, 0),
+	CLK_FIXED_RATE("board_0_hfosc1_clk_out", 0, 0),
+	CLK_FIXED_RATE("board_0_mcu_ospi0_dqs_out", 0, 0),
+	CLK_FIXED_RATE("board_0_mcu_ospi1_dqs_out", 0, 0),
+	CLK_FIXED_RATE("board_0_wkup_i2c0_scl_out", 0, 0),
+	CLK_FIXED_RATE("fss_mcu_0_hyperbus1p0_0_hpb_out_clk_n", 0, 0),
+	CLK_FIXED_RATE("fss_mcu_0_hyperbus1p0_0_hpb_out_clk_p", 0, 0),
+	CLK_FIXED_RATE("fss_mcu_0_ospi_0_ospi_oclk_clk", 0, 0),
+	CLK_FIXED_RATE("fss_mcu_0_ospi_1_ospi_oclk_clk", 0, 0),
+	CLK_FIXED_RATE("j7am_wakeup_16ff_wkup_0_wkup_rcosc_12p5m_clk", 12500000, 0),
+	CLK_FIXED_RATE("j7am_wakeup_16ff_wkup_0_wkup_rcosc_32k_clk", 32000, 0),
+	CLK_MUX("mcu_ospi0_iclk_sel_out0", mcu_ospi0_iclk_sel_out0_parents, 2, 0x40f08030, 4, 1, 0),
+	CLK_MUX("mcu_ospi1_iclk_sel_out0", mcu_ospi1_iclk_sel_out0_parents, 2, 0x40f08034, 4, 1, 0),
+	CLK_FIXED_RATE("mshsi2c_wkup_0_porscl", 0, 0),
+	CLK_MUX("wkup_fref_clksel_out0", wkup_fref_clksel_out0_parents, 2, 0x43008050, 8, 1, 0),
+	CLK_PLL("pllfracf2_ssmod_16fft_mcu_0_foutvcop_clk", "wkup_fref_clksel_out0", 0x40d00000, 0),
+	CLK_PLL_DEFFREQ("pllfracf2_ssmod_16fft_mcu_1_foutvcop_clk", "wkup_fref_clksel_out0", 0x40d01000, 0, 2400000000),
+	CLK_PLL_DEFFREQ("pllfracf2_ssmod_16fft_mcu_2_foutvcop_clk", "wkup_fref_clksel_out0", 0x40d02000, 0, 2000000000),
+	CLK_DIV("hsdiv1_16fft_mcu_0_hsdivout0_clk", "pllfracf2_ssmod_16fft_mcu_0_foutvcop_clk", 0x40d00080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_mcu_1_hsdivout3_clk", "pllfracf2_ssmod_16fft_mcu_1_foutvcop_clk", 0x40d0108c, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_mcu_1_hsdivout4_clk", "pllfracf2_ssmod_16fft_mcu_1_foutvcop_clk", 0x40d01090, 0, 7, 0, 0),
+	CLK_DIV_DEFFREQ("hsdiv4_16fft_mcu_2_hsdivout4_clk", "pllfracf2_ssmod_16fft_mcu_2_foutvcop_clk", 0x40d02090, 0, 7, 0, 0, 166666666),
+	CLK_MUX_PLLCTRL("k3_pll_ctrl_wrap_wkup_0_sysclkout_clk", k3_pll_ctrl_wrap_wkup_0_sysclkout_clk_parents, 2, 0x42010000, 0),
+	CLK_DIV("k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk", "k3_pll_ctrl_wrap_wkup_0_sysclkout_clk", 0x42010118, 0, 5, 0, 0),
+	CLK_MUX("mcu_ospi_ref_clk_sel_out0", mcu_ospi_ref_clk_sel_out0_parents, 2, 0x40f08030, 0, 1, 0),
+	CLK_MUX("mcu_ospi_ref_clk_sel_out1", mcu_ospi_ref_clk_sel_out1_parents, 2, 0x40f08034, 0, 1, 0),
+	CLK_MUX("wkup_gpio0_clksel_out0", wkup_gpio0_clksel_out0_parents, 4, 0x43008070, 0, 2, 0),
+	CLK_MUX("mcu_usart_clksel_out0", mcu_usart_clksel_out0_parents, 2, 0x40f081c0, 0, 1, 0),
+	CLK_MUX("wkup_i2c_mcupll_bypass_out0", wkup_i2c_mcupll_bypass_out0_parents, 2, 0x43008060, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out0", main_pll_hfosc_sel_out0_parents, 2, 0x43008080, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out1", main_pll_hfosc_sel_out1_parents, 2, 0x43008084, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out12", main_pll_hfosc_sel_out12_parents, 2, 0x430080b0, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out19", main_pll_hfosc_sel_out19_parents, 2, 0x430080cc, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out2", main_pll_hfosc_sel_out2_parents, 2, 0x43008088, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out26_0", main_pll_hfosc_sel_out26_0_parents, 2, 0x430080e8, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out27_0", main_pll_hfosc_sel_out27_0_parents, 2, 0x430080ec, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out28", main_pll_hfosc_sel_out28_parents, 2, 0x430080f0, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out3", main_pll_hfosc_sel_out3_parents, 2, 0x4300808c, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out7", main_pll_hfosc_sel_out7_parents, 2, 0x4300809c, 0, 1, 0),
+	CLK_MUX("main_pll_hfosc_sel_out8", main_pll_hfosc_sel_out8_parents, 2, 0x430080a0, 0, 1, 0),
+	CLK_MUX("usb0_refclk_sel_out0", usb0_refclk_sel_out0_parents, 2, 0x1080e0, 0, 1, 0),
+	CLK_FIXED_RATE("board_0_cpts0_rft_clk_out", 0, 0),
+	CLK_FIXED_RATE("board_0_ext_refclk1_out", 0, 0),
+	CLK_FIXED_RATE("board_0_mcu_cpts0_rft_clk_out", 0, 0),
+	CLK_FIXED_RATE("board_0_mcu_ext_refclk0_out", 0, 0),
+	CLK_FIXED_RATE("board_0_mmc1_clklb_out", 0, 0),
+	CLK_FIXED_RATE("board_0_mmc1_clk_out", 0, 0),
+	CLK_FIXED_RATE("board_0_tck_out", 0, 0),
+	CLK_FIXED_RATE("board_0_vout0_extpclkin_out", 0, 0),
+	CLK_FIXED_RATE("emmcsd4ss_main_0_emmcsdss_io_clk_o", 0, 0),
+	CLK_DIV("hsdiv4_16fft_mcu_2_hsdivout0_clk", "pllfracf2_ssmod_16fft_mcu_2_foutvcop_clk", 0x40d02080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_mcu_2_hsdivout1_clk", "pllfracf2_ssmod_16fft_mcu_2_foutvcop_clk", 0x40d02084, 0, 7, 0, 0),
+	CLK_PLL_DEFFREQ("pllfracf2_ssmod_16fft_main_0_foutvcop_clk", "main_pll_hfosc_sel_out0", 0x680000, 0, 2000000000),
+	CLK_DIV("pllfracf2_ssmod_16fft_main_0_foutpostdiv_clk_subdiv", "pllfracf2_ssmod_16fft_main_0_foutvcop_clk", 0x680038, 16, 3, 0, CLK_DIVIDER_ONE_BASED),
+	CLK_DIV("pllfracf2_ssmod_16fft_main_0_foutpostdiv_clk", "pllfracf2_ssmod_16fft_main_0_foutpostdiv_clk_subdiv", 0x680038, 24, 3, 0, CLK_DIVIDER_ONE_BASED),
+	CLK_PLL_DEFFREQ("pllfracf2_ssmod_16fft_main_1_foutvcop_clk", "main_pll_hfosc_sel_out1", 0x681000, 0, 1920000000),
+	CLK_DIV("pllfracf2_ssmod_16fft_main_1_foutpostdiv_clk_subdiv", "pllfracf2_ssmod_16fft_main_1_foutvcop_clk", 0x681038, 16, 3, 0, CLK_DIVIDER_ONE_BASED),
+	CLK_DIV("pllfracf2_ssmod_16fft_main_1_foutpostdiv_clk", "pllfracf2_ssmod_16fft_main_1_foutpostdiv_clk_subdiv", 0x681038, 24, 3, 0, CLK_DIVIDER_ONE_BASED),
+	CLK_PLL("pllfracf2_ssmod_16fft_main_12_foutvcop_clk", "main_pll_hfosc_sel_out12", 0x68c000, 0),
+	CLK_PLL("pllfracf2_ssmod_16fft_main_19_foutvcop_clk", "main_pll_hfosc_sel_out19", 0x693000, 0),
+	CLK_PLL("pllfracf2_ssmod_16fft_main_2_foutvcop_clk", "main_pll_hfosc_sel_out2", 0x682000, 0),
+	CLK_PLL("pllfracf2_ssmod_16fft_main_26_foutvcop_clk", "main_pll_hfosc_sel_out26_0", 0x69a000, 0),
+	CLK_PLL("pllfracf2_ssmod_16fft_main_27_foutvcop_clk", "main_pll_hfosc_sel_out27_0", 0x69b000, 0),
+	CLK_PLL("pllfracf2_ssmod_16fft_main_28_foutvcop_clk", "main_pll_hfosc_sel_out28", 0x69c000, 0),
+	CLK_PLL_DEFFREQ("pllfracf2_ssmod_16fft_main_3_foutvcop_clk", "main_pll_hfosc_sel_out3", 0x683000, 0, 2000000000),
+	CLK_PLL("pllfracf2_ssmod_16fft_main_7_foutvcop_clk", "main_pll_hfosc_sel_out7", 0x687000, 0),
+	CLK_PLL("pllfracf2_ssmod_16fft_main_8_foutvcop_clk", "main_pll_hfosc_sel_out8", 0x688000, 0),
+	CLK_DIV("postdiv3_16fft_main_0_hsdivout6_clk", "pllfracf2_ssmod_16fft_main_0_foutpostdiv_clk", 0x680098, 0, 7, 0, 0),
+	CLK_DIV("postdiv3_16fft_main_0_hsdivout8_clk", "pllfracf2_ssmod_16fft_main_0_foutpostdiv_clk", 0x6800a0, 0, 7, 0, 0),
+	CLK_DIV("postdiv3_16fft_main_1_hsdivout5_clk", "pllfracf2_ssmod_16fft_main_1_foutpostdiv_clk", 0x681094, 0, 7, 0, 0),
+	CLK_DIV("postdiv3_16fft_main_1_hsdivout7_clk", "pllfracf2_ssmod_16fft_main_1_foutpostdiv_clk", 0x68109c, 0, 7, 0, 0),
+	CLK_MUX("emmcsd1_lb_clksel_out0", emmcsd1_lb_clksel_out0_parents, 2, 0x1080b4, 16, 1, 0),
+	CLK_MUX("mcu_clkout_mux_out0", mcu_clkout_mux_out0_parents, 2, 0x40f08010, 0, 1, 0),
+	CLK_DIV("hsdiv0_16fft_main_12_hsdivout0_clk", "pllfracf2_ssmod_16fft_main_12_foutvcop_clk", 0x68c080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv0_16fft_main_26_hsdivout0_clk", "pllfracf2_ssmod_16fft_main_26_foutvcop_clk", 0x69a080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv0_16fft_main_27_hsdivout0_clk", "pllfracf2_ssmod_16fft_main_27_foutvcop_clk", 0x69b080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv0_16fft_main_28_hsdivout0_clk", "pllfracf2_ssmod_16fft_main_28_foutvcop_clk", 0x69c080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv0_16fft_main_7_hsdivout0_clk", "pllfracf2_ssmod_16fft_main_7_foutvcop_clk", 0x687080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv0_16fft_main_8_hsdivout0_clk", "pllfracf2_ssmod_16fft_main_8_foutvcop_clk", 0x688080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv1_16fft_main_19_hsdivout0_clk", "pllfracf2_ssmod_16fft_main_19_foutvcop_clk", 0x693080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_main_0_hsdivout0_clk", "pllfracf2_ssmod_16fft_main_0_foutvcop_clk", 0x680080, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_main_0_hsdivout2_clk", "pllfracf2_ssmod_16fft_main_0_foutvcop_clk", 0x680088, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_main_0_hsdivout3_clk", "pllfracf2_ssmod_16fft_main_0_foutvcop_clk", 0x68008c, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_main_0_hsdivout4_clk", "pllfracf2_ssmod_16fft_main_0_foutvcop_clk", 0x680090, 0, 7, 0, 0),
+	CLK_DIV_DEFFREQ("hsdiv4_16fft_main_1_hsdivout0_clk", "pllfracf2_ssmod_16fft_main_1_foutvcop_clk", 0x681080, 0, 7, 0, 0, 192000000),
+	CLK_DIV("hsdiv4_16fft_main_1_hsdivout2_clk", "pllfracf2_ssmod_16fft_main_1_foutvcop_clk", 0x681088, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_main_2_hsdivout2_clk", "pllfracf2_ssmod_16fft_main_2_foutvcop_clk", 0x682088, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_main_3_hsdivout1_clk", "pllfracf2_ssmod_16fft_main_3_foutvcop_clk", 0x683084, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_main_3_hsdivout2_clk", "pllfracf2_ssmod_16fft_main_3_foutvcop_clk", 0x683088, 0, 7, 0, 0),
+	CLK_MUX_PLLCTRL("k3_pll_ctrl_wrap_main_0_sysclkout_clk", k3_pll_ctrl_wrap_main_0_sysclkout_clk_parents, 2, 0x410000, 0),
+	CLK_DIV("k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk", "k3_pll_ctrl_wrap_main_0_sysclkout_clk", 0x410118, 0, 5, 0, 0),
+	CLK_MUX("dpi0_ext_clksel_out0", dpi0_ext_clksel_out0_parents, 2, 0x108300, 0, 1, 0),
+	CLK_MUX("emmcsd_refclk_sel_out0", emmcsd_refclk_sel_out0_parents, 4, 0x1080b0, 0, 2, 0),
+	CLK_MUX("emmcsd_refclk_sel_out1", emmcsd_refclk_sel_out1_parents, 4, 0x1080b4, 0, 2, 0),
+	CLK_MUX("gtc_clk_mux_out0", gtc_clk_mux_out0_parents, 16, 0x108030, 0, 4, 0),
+	CLK_DIV_DEFFREQ("usart_programmable_clock_divider_out0", "hsdiv4_16fft_main_1_hsdivout0_clk", 0x1081c0, 0, 2, 0, 0, 48000000),
+	CLK_DIV("usart_programmable_clock_divider_out5", "hsdiv4_16fft_main_1_hsdivout0_clk", 0x1081d4, 0, 2, 0, 0),
+	CLK_DIV("usart_programmable_clock_divider_out8", "hsdiv4_16fft_main_1_hsdivout0_clk", 0x1081e0, 0, 2, 0, 0),
+	CLK_DIV("k3_pll_ctrl_wrap_main_0_chip_div24_clk_clk", "k3_pll_ctrl_wrap_main_0_sysclkout_clk", 0x41011c, 0, 5, 0, 0),
+	CLK_DIV("k3_pll_ctrl_wrap_wkup_0_chip_div24_clk_clk", "k3_pll_ctrl_wrap_wkup_0_sysclkout_clk", 0x4201011c, 0, 5, 0, 0),
+};
+
+static const struct dev_clk soc_dev_clk_data[] = {
+	DEV_CLK(198, 0, "hsdiv0_16fft_main_8_hsdivout0_clk"),
+	DEV_CLK(198, 3, "hsdiv0_16fft_main_7_hsdivout0_clk"),
+	DEV_CLK(198, 4, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(202, 0, "hsdiv0_16fft_main_8_hsdivout0_clk"),
+	DEV_CLK(203, 0, "hsdiv0_16fft_main_8_hsdivout0_clk"),
+	DEV_CLK(61, 0, "gtc_clk_mux_out0"),
+	DEV_CLK(61, 1, "hsdiv4_16fft_main_3_hsdivout1_clk"),
+	DEV_CLK(61, 2, "postdiv3_16fft_main_0_hsdivout6_clk"),
+	DEV_CLK(61, 3, "board_0_mcu_cpts0_rft_clk_out"),
+	DEV_CLK(61, 4, "board_0_cpts0_rft_clk_out"),
+	DEV_CLK(61, 5, "board_0_mcu_ext_refclk0_out"),
+	DEV_CLK(61, 6, "board_0_ext_refclk1_out"),
+	DEV_CLK(61, 15, "hsdiv4_16fft_mcu_2_hsdivout1_clk"),
+	DEV_CLK(61, 16, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(61, 17, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(78, 0, "postdiv3_16fft_main_0_hsdivout8_clk"),
+	DEV_CLK(78, 1, "hsdiv4_16fft_main_0_hsdivout2_clk"),
+	DEV_CLK(78, 2, "hsdiv4_16fft_main_0_hsdivout3_clk"),
+	DEV_CLK(78, 3, "hsdiv4_16fft_main_0_hsdivout4_clk"),
+	DEV_CLK(78, 4, "gluelogic_hfosc0_clkout"),
+	DEV_CLK(78, 5, "board_0_hfosc1_clk_out"),
+	DEV_CLK(78, 6, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(78, 8, "gluelogic_hfosc0_clkout"),
+	DEV_CLK(78, 9, "board_0_hfosc1_clk_out"),
+	DEV_CLK(78, 10, "j7am_wakeup_16ff_wkup_0_wkup_rcosc_12p5m_clk"),
+	DEV_CLK(78, 11, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(78, 12, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(140, 1, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(140, 2, "emmcsd_refclk_sel_out0"),
+	DEV_CLK(140, 3, "hsdiv4_16fft_main_0_hsdivout2_clk"),
+	DEV_CLK(140, 4, "hsdiv4_16fft_main_1_hsdivout2_clk"),
+	DEV_CLK(140, 5, "hsdiv4_16fft_main_2_hsdivout2_clk"),
+	DEV_CLK(140, 6, "hsdiv4_16fft_main_3_hsdivout2_clk"),
+	DEV_CLK(141, 0, "emmcsd1_lb_clksel_out0"),
+	DEV_CLK(141, 3, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(141, 4, "emmcsd_refclk_sel_out1"),
+	DEV_CLK(141, 5, "hsdiv4_16fft_main_0_hsdivout2_clk"),
+	DEV_CLK(141, 6, "hsdiv4_16fft_main_1_hsdivout2_clk"),
+	DEV_CLK(141, 7, "hsdiv4_16fft_main_2_hsdivout2_clk"),
+	DEV_CLK(141, 8, "hsdiv4_16fft_main_3_hsdivout2_clk"),
+	DEV_CLK(146, 0, "usart_programmable_clock_divider_out0"),
+	DEV_CLK(146, 3, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(149, 0, "mcu_usart_clksel_out0"),
+	DEV_CLK(149, 1, "hsdiv4_16fft_mcu_1_hsdivout3_clk"),
+	DEV_CLK(149, 2, "postdiv3_16fft_main_1_hsdivout5_clk"),
+	DEV_CLK(149, 5, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(157, 174, "mcu_clkout_mux_out0"),
+	DEV_CLK(157, 175, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
+	DEV_CLK(157, 176, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
+	DEV_CLK(157, 179, "fss_mcu_0_hyperbus1p0_0_hpb_out_clk_p"),
+	DEV_CLK(157, 180, "fss_mcu_0_hyperbus1p0_0_hpb_out_clk_n"),
+	DEV_CLK(157, 224, "fss_mcu_0_ospi_0_ospi_oclk_clk"),
+	DEV_CLK(157, 226, "fss_mcu_0_ospi_0_ospi_oclk_clk"),
+	DEV_CLK(157, 228, "fss_mcu_0_ospi_1_ospi_oclk_clk"),
+	DEV_CLK(157, 230, "fss_mcu_0_ospi_1_ospi_oclk_clk"),
+	DEV_CLK(157, 239, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(157, 243, "emmcsd4ss_main_0_emmcsdss_io_clk_o"),
+	DEV_CLK(157, 245, "emmcsd4ss_main_0_emmcsdss_io_clk_o"),
+	DEV_CLK(157, 354, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(157, 359, "dpi0_ext_clksel_out0"),
+	DEV_CLK(157, 360, "mshsi2c_wkup_0_porscl"),
+	DEV_CLK(160, 0, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(160, 2, "hsdiv4_16fft_mcu_2_hsdivout4_clk"),
+	DEV_CLK(160, 4, "hsdiv4_16fft_mcu_2_hsdivout4_clk"),
+	DEV_CLK(160, 6, "hsdiv4_16fft_mcu_2_hsdivout4_clk"),
+	DEV_CLK(160, 8, "hsdiv4_16fft_mcu_2_hsdivout4_clk"),
+	DEV_CLK(161, 0, "board_0_mcu_ospi0_dqs_out"),
+	DEV_CLK(161, 1, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(161, 2, "mcu_ospi0_iclk_sel_out0"),
+	DEV_CLK(161, 3, "board_0_mcu_ospi0_dqs_out"),
+	DEV_CLK(161, 4, "fss_mcu_0_ospi_0_ospi_oclk_clk"),
+	DEV_CLK(161, 6, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(161, 7, "mcu_ospi_ref_clk_sel_out0"),
+	DEV_CLK(161, 8, "hsdiv4_16fft_mcu_1_hsdivout4_clk"),
+	DEV_CLK(161, 9, "hsdiv4_16fft_mcu_2_hsdivout4_clk"),
+	DEV_CLK(162, 0, "board_0_mcu_ospi1_dqs_out"),
+	DEV_CLK(162, 1, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(162, 2, "mcu_ospi1_iclk_sel_out0"),
+	DEV_CLK(162, 3, "board_0_mcu_ospi1_dqs_out"),
+	DEV_CLK(162, 4, "fss_mcu_0_ospi_1_ospi_oclk_clk"),
+	DEV_CLK(162, 6, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(162, 7, "mcu_ospi_ref_clk_sel_out1"),
+	DEV_CLK(162, 8, "hsdiv4_16fft_mcu_1_hsdivout4_clk"),
+	DEV_CLK(162, 9, "hsdiv4_16fft_mcu_2_hsdivout4_clk"),
+	DEV_CLK(167, 0, "wkup_gpio0_clksel_out0"),
+	DEV_CLK(178, 0, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(178, 1, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(188, 0, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(188, 1, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(191, 0, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(191, 1, "hsdiv0_16fft_main_12_hsdivout0_clk"),
+	DEV_CLK(191, 4, "hsdiv0_16fft_main_7_hsdivout0_clk"),
+	DEV_CLK(191, 5, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(192, 0, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(192, 1, "hsdiv0_16fft_main_26_hsdivout0_clk"),
+	DEV_CLK(192, 4, "hsdiv0_16fft_main_7_hsdivout0_clk"),
+	DEV_CLK(192, 5, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(193, 0, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(193, 1, "hsdiv0_16fft_main_27_hsdivout0_clk"),
+	DEV_CLK(193, 4, "hsdiv0_16fft_main_7_hsdivout0_clk"),
+	DEV_CLK(193, 5, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(194, 0, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(194, 1, "hsdiv0_16fft_main_28_hsdivout0_clk"),
+	DEV_CLK(194, 4, "hsdiv0_16fft_main_7_hsdivout0_clk"),
+	DEV_CLK(194, 5, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(201, 0, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(201, 1, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(243, 0, "j7am_wakeup_16ff_wkup_0_wkup_rcosc_12p5m_clk"),
+	DEV_CLK(243, 1, "gluelogic_hfosc0_clkout"),
+	DEV_CLK(243, 2, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(279, 0, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(279, 1, "board_0_wkup_i2c0_scl_out"),
+	DEV_CLK(279, 2, "wkup_i2c_mcupll_bypass_out0"),
+	DEV_CLK(279, 3, "hsdiv4_16fft_mcu_1_hsdivout3_clk"),
+	DEV_CLK(279, 4, "gluelogic_hfosc0_clkout"),
+	DEV_CLK(392, 0, "usart_programmable_clock_divider_out5"),
+	DEV_CLK(392, 3, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(395, 0, "usart_programmable_clock_divider_out8"),
+	DEV_CLK(395, 3, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(398, 0, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(398, 1, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(398, 2, "postdiv3_16fft_main_1_hsdivout7_clk"),
+	DEV_CLK(398, 3, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(398, 20, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(398, 21, "usb0_refclk_sel_out0"),
+	DEV_CLK(398, 22, "gluelogic_hfosc0_clkout"),
+	DEV_CLK(398, 23, "board_0_hfosc1_clk_out"),
+	DEV_CLK(398, 28, "board_0_tck_out"),
+};
+
+const struct ti_k3_clk_platdata j784s4_clk_platdata = {
+	.clk_list = clk_list,
+	.clk_list_cnt = 106,
+	.soc_dev_clk_data = soc_dev_clk_data,
+	.soc_dev_clk_data_cnt = 128,
+};
arch/arm/mach-k3/r5/j784s4/dev-data.c new file +98 -0
new file mode 100644
index 0000000000..a9b77d0f49
@@ -0,0 +1,98 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * J784S4 specific device platform data
+ *
+ * This file is auto generated. Please do not hand edit and report any issues
+ * to Bryan Brattlof <[email protected]>.
+ *
+ * Copyright (C) 2020-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-dev.h"
+
+static struct ti_psc soc_psc_list[] = {
+	[0] = PSC(0, 0x42000000),
+	[1] = PSC(1, 0x00420000),
+	[2] = PSC(2, 0x00400000),
+};
+
+static struct ti_pd soc_pd_list[] = {
+	[0] = PSC_PD(0, &soc_psc_list[0], NULL),
+	[1] = PSC_PD(3, &soc_psc_list[1], NULL),
+	[2] = PSC_PD(0, &soc_psc_list[2], NULL),
+	[3] = PSC_PD(1, &soc_psc_list[2], &soc_pd_list[2]),
+	[4] = PSC_PD(14, &soc_psc_list[2], NULL),
+	[5] = PSC_PD(15, &soc_psc_list[2], &soc_pd_list[4]),
+	[6] = PSC_PD(16, &soc_psc_list[2], &soc_pd_list[4]),
+	[7] = PSC_PD(38, &soc_psc_list[2], NULL),
+};
+
+static struct ti_lpsc soc_lpsc_list[] = {
+	[0] = PSC_LPSC(0, &soc_psc_list[0], &soc_pd_list[0], NULL),
+	[1] = PSC_LPSC(3, &soc_psc_list[0], &soc_pd_list[0], NULL),
+	[2] = PSC_LPSC(10, &soc_psc_list[0], &soc_pd_list[0], NULL),
+	[3] = PSC_LPSC(11, &soc_psc_list[0], &soc_pd_list[0], NULL),
+	[4] = PSC_LPSC(12, &soc_psc_list[0], &soc_pd_list[0], NULL),
+	[5] = PSC_LPSC(12, &soc_psc_list[1], &soc_pd_list[1], &soc_lpsc_list[6]),
+	[6] = PSC_LPSC(13, &soc_psc_list[1], &soc_pd_list[1], NULL),
+	[7] = PSC_LPSC(0, &soc_psc_list[2], &soc_pd_list[2], NULL),
+	[8] = PSC_LPSC(9, &soc_psc_list[2], &soc_pd_list[2], &soc_lpsc_list[2]),
+	[9] = PSC_LPSC(14, &soc_psc_list[2], &soc_pd_list[2], &soc_lpsc_list[10]),
+	[10] = PSC_LPSC(15, &soc_psc_list[2], &soc_pd_list[2], NULL),
+	[11] = PSC_LPSC(16, &soc_psc_list[2], &soc_pd_list[2], &soc_lpsc_list[12]),
+	[12] = PSC_LPSC(17, &soc_psc_list[2], &soc_pd_list[2], NULL),
+	[13] = PSC_LPSC(20, &soc_psc_list[2], &soc_pd_list[2], &soc_lpsc_list[5]),
+	[14] = PSC_LPSC(23, &soc_psc_list[2], &soc_pd_list[2], &soc_lpsc_list[5]),
+	[15] = PSC_LPSC(25, &soc_psc_list[2], &soc_pd_list[2], &soc_lpsc_list[5]),
+	[16] = PSC_LPSC(43, &soc_psc_list[2], &soc_pd_list[3], NULL),
+	[17] = PSC_LPSC(45, &soc_psc_list[2], &soc_pd_list[3], NULL),
+	[18] = PSC_LPSC(78, &soc_psc_list[2], &soc_pd_list[4], NULL),
+	[19] = PSC_LPSC(80, &soc_psc_list[2], &soc_pd_list[5], &soc_lpsc_list[18]),
+	[20] = PSC_LPSC(81, &soc_psc_list[2], &soc_pd_list[6], &soc_lpsc_list[18]),
+	[21] = PSC_LPSC(120, &soc_psc_list[2], &soc_pd_list[7], &soc_lpsc_list[22]),
+	[22] = PSC_LPSC(121, &soc_psc_list[2], &soc_pd_list[7], NULL),
+};
+
+static struct ti_dev soc_dev_list[] = {
+	PSC_DEV(35, &soc_lpsc_list[0]),
+	PSC_DEV(160, &soc_lpsc_list[0]),
+	PSC_DEV(161, &soc_lpsc_list[0]),
+	PSC_DEV(162, &soc_lpsc_list[0]),
+	PSC_DEV(243, &soc_lpsc_list[0]),
+	PSC_DEV(149, &soc_lpsc_list[0]),
+	PSC_DEV(167, &soc_lpsc_list[1]),
+	PSC_DEV(279, &soc_lpsc_list[1]),
+	PSC_DEV(161, &soc_lpsc_list[2]),
+	PSC_DEV(162, &soc_lpsc_list[3]),
+	PSC_DEV(160, &soc_lpsc_list[4]),
+	PSC_DEV(139, &soc_lpsc_list[5]),
+	PSC_DEV(194, &soc_lpsc_list[6]),
+	PSC_DEV(78, &soc_lpsc_list[7]),
+	PSC_DEV(61, &soc_lpsc_list[8]),
+	PSC_DEV(131, &soc_lpsc_list[9]),
+	PSC_DEV(191, &soc_lpsc_list[10]),
+	PSC_DEV(132, &soc_lpsc_list[11]),
+	PSC_DEV(192, &soc_lpsc_list[12]),
+	PSC_DEV(398, &soc_lpsc_list[13]),
+	PSC_DEV(141, &soc_lpsc_list[14]),
+	PSC_DEV(140, &soc_lpsc_list[15]),
+	PSC_DEV(146, &soc_lpsc_list[16]),
+	PSC_DEV(392, &soc_lpsc_list[17]),
+	PSC_DEV(395, &soc_lpsc_list[17]),
+	PSC_DEV(198, &soc_lpsc_list[18]),
+	PSC_DEV(202, &soc_lpsc_list[19]),
+	PSC_DEV(203, &soc_lpsc_list[20]),
+	PSC_DEV(133, &soc_lpsc_list[21]),
+	PSC_DEV(193, &soc_lpsc_list[22]),
+};
+
+const struct ti_k3_pd_platdata j784s4_pd_platdata = {
+	.psc = soc_psc_list,
+	.pd = soc_pd_list,
+	.lpsc = soc_lpsc_list,
+	.devs = soc_dev_list,
+	.num_psc = 3,
+	.num_pd = 8,
+	.num_lpsc = 23,
+	.num_devs = 30,
+};
drivers/clk/ti/clk-k3.c +6 -0
index eb76195bd7..10f6049797 100644
@@ -86,6 +86,12 @@ static const struct soc_attr ti_k3_soc_clk_data[] = {
  		.family = "AM62AX",
  		.data = &am62ax_clk_platdata,
  	},
+#endif
+#ifdef CONFIG_SOC_K3_J784S4
+	{
+		.family = "J784S4",
+		.data = &j784s4_clk_platdata,
+	},
  #endif
  	{ /* sentinel */ }
  };
drivers/power/domain/ti-power-domain.c +6 -0
index b34c982f4f..fb4ca2dd6b 100644
@@ -98,6 +98,12 @@ static const struct soc_attr ti_k3_soc_pd_data[] = {
  		.family = "AM62AX",
  		.data = &am62ax_pd_platdata,
  	},
+#endif
+#ifdef CONFIG_SOC_K3_J784S4
+	{
+		.family = "J784S4",
+		.data = &j784s4_pd_platdata,
+	},
  #endif
  	{ /* sentinel */ }
  };
include/k3-clk.h +1 -0
index 1b6ab8fe65..e161f09c0f 100644
@@ -176,6 +176,7 @@ extern const struct ti_k3_clk_platdata j7200_clk_platdata;
  extern const struct ti_k3_clk_platdata j721s2_clk_platdata;
  extern const struct ti_k3_clk_platdata am62x_clk_platdata;
  extern const struct ti_k3_clk_platdata am62ax_clk_platdata;
+extern const struct ti_k3_clk_platdata j784s4_clk_platdata;
 
  struct clk *clk_register_ti_pll(const char *name, const char *parent_name,
  				void __iomem *reg);
include/k3-dev.h +0 -0
index 072e10ba63..a9d1ada804 100644

include/k3-dev.h extern const struct ti_k3_pd_platdata j7200_pd_platdata; · line 86

Quoted 7 lines
include/k3-dev.h +1 -0
@@ -80,6 +80,7 @@ extern const struct ti_k3_pd_platdata j7200_pd_platdata;
  extern const struct ti_k3_pd_platdata j721s2_pd_platdata;
  extern const struct ti_k3_pd_platdata am62x_pd_platdata;
  extern const struct ti_k3_pd_platdata am62ax_pd_platdata;
+extern const struct ti_k3_pd_platdata j784s4_pd_platdata;
 
  u8 ti_pd_state(struct ti_pd *pd);
  u8 lpsc_get_state(struct ti_lpsc *lpsc);
#10 lore raw

Re: [PATCH v6 06/17] arm: mach-k3: j784s4: Add clk and power support

In reply to Apurva Nandan

On December 6, 2023 thus sayeth Apurva Nandan:

Quoted 17 lines

Add clk and device data which can be used by respective drivers to configure clocks and PSC.

---
 arch/arm/mach-k3/r5/j784s4/Makefile    |   7 +
 arch/arm/mach-k3/r5/j784s4/clk-data.c  | 428 +++++++++++++++++++++++++
 arch/arm/mach-k3/r5/j784s4/dev-data.c  |  98 ++++++
 drivers/clk/ti/clk-k3.c                |   6 +
 drivers/power/domain/ti-power-domain.c |   6 +
 include/k3-clk.h                       |   1 +
 include/k3-dev.h                       |   1 +
 7 files changed, 547 insertions(+)
 create mode 100644 arch/arm/mach-k3/r5/j784s4/Makefile
 create mode 100644 arch/arm/mach-k3/r5/j784s4/clk-data.c
 create mode 100644 arch/arm/mach-k3/r5/j784s4/dev-data.c

...

Quoted 6 lines
arch/arm/mach-k3/r5/j784s4/clk-data.c new file +0 -0
new file mode 100644
index 0000000000..d3fac38dd6
@@ -0,0 +1,428 @@

...

arch/arm/mach-k3/r5/j784s4/clk-data.c line 427

Quoted 5 lines
arch/arm/mach-k3/r5/j784s4/clk-data.c new file +5 -0
+const struct ti_k3_clk_platdata j784s4_clk_platdata = {
+	.clk_list = clk_list,
+	.clk_list_cnt = 106,
+	.soc_dev_clk_data = soc_dev_clk_data,
+	.soc_dev_clk_data_cnt = 128,

These should probably be updated to use the ARRAY_SIZE() macros instead of their hard coded values.

Quoted 6 lines
arch/arm/mach-k3/r5/j784s4/dev-data.c new file +0 -0
new file mode 100644
index 0000000000..a9b77d0f49
@@ -0,0 +1,98 @@

...

arch/arm/mach-k3/r5/j784s4/dev-data.c line 98

Quoted 10 lines
arch/arm/mach-k3/r5/j784s4/dev-data.c new file +10 -0
+const struct ti_k3_pd_platdata j784s4_pd_platdata = {
+	.psc = soc_psc_list,
+	.pd = soc_pd_list,
+	.lpsc = soc_lpsc_list,
+	.devs = soc_dev_list,
+	.num_psc = 3,
+	.num_pd = 8,
+	.num_lpsc = 23,
+	.num_devs = 30,
+};

Here too, just to make future updates a little easier.

~Bryan

#11 lore raw

PATCH v6 7/17 drivers: dma: Add support for J784S4 SoC

In reply to Apurva Nandan

Add support for DMA in J784S4 SoC.

---
 drivers/dma/ti/Makefile               |   1 +
 drivers/dma/ti/k3-psil-j784s4.c       | 166 ++++++++++++++++++++++++++
 drivers/dma/ti/k3-psil-priv.h         |   1 +
 drivers/dma/ti/k3-psil.c              |   2 +
 drivers/firmware/ti_sci_static_data.h |  34 ++++++
 drivers/ram/Kconfig                   |   2 +-
 6 files changed, 205 insertions(+), 1 deletion(-)
 create mode 100644 drivers/dma/ti/k3-psil-j784s4.c
drivers/dma/ti/Makefile +1 -0
index f4e0271efb..9e0b13e8c0 100644
@@ -9,3 +9,4 @@ k3-psil-data-$(CONFIG_SOC_K3_J721S2) += k3-psil-j721s2.o
 k3-psil-data-$(CONFIG_SOC_K3_AM642) += k3-psil-am64.o
 k3-psil-data-$(CONFIG_SOC_K3_AM625) += k3-psil-am62.o
 k3-psil-data-$(CONFIG_SOC_K3_AM62A7) += k3-psil-am62a.o
+k3-psil-data-$(CONFIG_SOC_K3_J784S4) += k3-psil-j784s4.o
drivers/dma/ti/k3-psil-j784s4.c new file +166 -0

166 lines not on this page · raw message

drivers/dma/ti/k3-psil-priv.h +1 -0
index 83f873b84c..02ea1e9ed3 100644
@@ -43,5 +43,6 @@ extern struct psil_ep_map j721s2_ep_map;
 extern struct psil_ep_map am64_ep_map;
 extern struct psil_ep_map am62_ep_map;
 extern struct psil_ep_map am62a_ep_map;
+extern struct psil_ep_map j784s4_ep_map;
 
 #endif /* K3_PSIL_PRIV_H_ */
drivers/dma/ti/k3-psil.c +2 -0
index d4d4fede8f..d21ef193e8 100644
@@ -28,6 +28,8 @@ struct psil_endpoint_config *psil_get_ep_config(u32 thread_id)
 			soc_ep_map = &am62_ep_map;
 		else if (IS_ENABLED(CONFIG_SOC_K3_AM62A7))
 			soc_ep_map = &am62a_ep_map;
+		else if (IS_ENABLED(CONFIG_SOC_K3_J784S4))
+			soc_ep_map = &j784s4_ep_map;
 	}
 
 	if (thread_id & K3_PSIL_DST_THREAD_ID_OFFSET && soc_ep_map->dst) {
drivers/firmware/ti_sci_static_data.h +34 -0
index 567ce8911a..789f0c6b2d 100644
@@ -97,6 +97,40 @@ static struct ti_sci_resource_static_data rm_static_data[] = {
 };
 #endif /* CONFIG_SOC_K3_AM625 || CONFIG_SOC_K3_AM62A7 */
 
+#if IS_ENABLED(CONFIG_SOC_K3_J784S4)
+static struct ti_sci_resource_static_data rm_static_data[] = {
+	/* Free rings */
+	{
+		.dev_id = 328,
+		.subtype = 1,
+		.range_start = 208,
+		.range_num = 32,
+	},
+	/* TX channels */
+	{
+		.dev_id = 329,
+		.subtype = 13,
+		.range_start = 40,
+		.range_num = 3,
+	},
+	/* RX channels */
+	{
+		.dev_id = 329,
+		.subtype = 10,
+		.range_start = 40,
+		.range_num = 3,
+	},
+	/* RX Free flows */
+	{
+		.dev_id = 329,
+		.subtype = 0,
+		.range_start = 84,
+		.range_num = 8,
+	},
+	{ },
+};
+#endif /* CONFIG_SOC_K3_J784S4 */
+
 #else
 static struct ti_sci_resource_static_data rm_static_data[] = {
 	{ },
drivers/ram/Kconfig +1 -1
index 5b07e92030..8e9e53cbb0 100644
@@ -62,7 +62,7 @@ choice
 	depends on K3_DDRSS
 	prompt "K3 DDRSS Arch Support"
 
-	default K3_J721E_DDRSS if SOC_K3_J721E || SOC_K3_J721S2
+	default K3_J721E_DDRSS if SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_J784S4
 	default K3_AM64_DDRSS if SOC_K3_AM642
 	default K3_AM64_DDRSS if SOC_K3_AM625
 	default K3_AM62A_DDRSS if SOC_K3_AM62A7
Signature · 1 line
2.34.1
#12 lore raw

PATCH v6 8/17 board: ti: j784s4: Add board support for J784S4 EVM

In reply to Apurva Nandan

Add board files for J784S4 EVM.

[ add env and board specific yaml files for binman ]
[ cleaned up the env files ]
---
 arch/arm/mach-k3/Kconfig        |  1 +
 arch/arm/mach-k3/j784s4/Kconfig | 35 ++++++++++++++++++++++++++++++
 board/ti/j784s4/Kconfig         | 37 ++++++++++++++++++++++++++++++++
 board/ti/j784s4/Makefile        |  7 ++++++
 board/ti/j784s4/evm.c           | 38 +++++++++++++++++++++++++++++++++
 include/configs/j784s4_evm.h    | 15 +++++++++++++
 6 files changed, 133 insertions(+)
 create mode 100644 arch/arm/mach-k3/j784s4/Kconfig
 create mode 100644 board/ti/j784s4/Kconfig
 create mode 100644 board/ti/j784s4/Makefile
 create mode 100644 board/ti/j784s4/evm.c
 create mode 100644 include/configs/j784s4_evm.h
arch/arm/mach-k3/Kconfig +1 -0
index 150d0bfa14..445b49e245 100644
@@ -157,5 +157,6 @@ source "arch/arm/mach-k3/am62x/Kconfig"
 source "arch/arm/mach-k3/am62ax/Kconfig"
 source "arch/arm/mach-k3/j721e/Kconfig"
 source "arch/arm/mach-k3/j721s2/Kconfig"
+source "arch/arm/mach-k3/j784s4/Kconfig"
 
 endif
arch/arm/mach-k3/j784s4/Kconfig new file +35 -0
new file mode 100644
index 0000000000..03d3f91371
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+#	Hari Nagalla <[email protected]>
+
+if SOC_K3_J784S4
+
+choice
+	prompt "K3 J784S4 board"
+	optional
+
+config TARGET_J784S4_A72_EVM
+	bool "TI K3 based J784S4 EVM running on A72"
+	select ARM64
+	select BOARD_LATE_INIT
+	select SYS_DISABLE_DCACHE_OPS
+	select BINMAN
+
+config TARGET_J784S4_R5_EVM
+	bool "TI K3 based J784S4 EVM running on R5"
+	select CPU_V7R
+	select SYS_THUMB_BUILD
+	select K3_LOAD_SYSFW
+	select RAM
+	select SPL_RAM
+	select K3_DDRSS
+	select BINMAN
+	imply SYS_K3_SPL_ATF
+
+endchoice
+
+source "board/ti/j784s4/Kconfig"
+
+endif
+
board/ti/j784s4/Kconfig new file +37 -0
new file mode 100644
index 0000000000..33d4770b2d
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+#	Hari Nagalla <[email protected]>
+
+if TARGET_J784S4_A72_EVM
+
+config SYS_BOARD
+       default "j784s4"
+
+config SYS_VENDOR
+       default "ti"
+
+config SYS_CONFIG_NAME
+       default "j784s4_evm"
+
+source "board/ti/common/Kconfig"
+
+endif
+
+if TARGET_J784S4_R5_EVM
+
+config SYS_BOARD
+       default "j784s4"
+
+config SYS_VENDOR
+       default "ti"
+
+config SYS_CONFIG_NAME
+       default "j784s4_evm"
+
+config SPL_LDSCRIPT
+	default "arch/arm/mach-omap2/u-boot-spl.lds"
+
+source "board/ti/common/Kconfig"
+
+endif
board/ti/j784s4/Makefile new file +7 -0
new file mode 100644
index 0000000000..3fc70eb8fb
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+#	Hari Nagalla <[email protected]>
+#
+
+obj-y += evm.o
board/ti/j784s4/evm.c new file +38 -0
new file mode 100644
index 0000000000..4857c9d2f6
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Board specific initialization for J784S4 EVM
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ *	Hari Nagalla <[email protected]>
+ *
+ */
+
+#include <image.h>
+#include <init.h>
+#include <spl.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+	return 0;
+}
+
+int dram_init(void)
+{
+	return fdtdec_setup_mem_size_base();
+}
+
+int dram_init_banksize(void)
+{
+	return fdtdec_setup_memory_banksize();
+}
+
+int board_late_init(void)
+{
+	return 0;
+}
+
+void spl_board_init(void)
+{
+}
include/configs/j784s4_evm.h new file +15 -0
new file mode 100644
index 0000000000..a4e0521198
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Configuration header file for K3 J784S4 EVM
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ *	Hari Nagalla <[email protected]>
+ */
+
+#ifndef __CONFIG_J784S4_EVM_H
+#define __CONFIG_J784S4_EVM_H
+
+/* Now for the remaining common defines */
+#include <configs/ti_armv7_common.h>
+
+#endif /* __CONFIG_J784S4_EVM_H */
Signature · 1 line
2.34.1
Reviewed-by on v6 8/17
#13 lore raw

Re: [PATCH v6 08/17] board: ti: j784s4: Add board support for J784S4 EVM

Quoted 9 lines · Apurva Nandan

Add board files for J784S4 EVM.

[ add env and board specific yaml files for binman ]
[ cleaned up the env files ]
Signature · 1 line
Tom
#14 lore raw

PATCH v6 9/17 board: ti: j748s4: Add board config yaml files

In reply to Apurva Nandan

Add board-cfg, rm-cfg, pm-cfg, sec-cfg, tifs-rm-cfg yaml for buidling u-boot sysfw data.

---
 board/ti/j784s4/board-cfg.yaml   |   37 +
 board/ti/j784s4/pm-cfg.yaml      |   13 +
 board/ti/j784s4/rm-cfg.yaml      | 3058 ++++++++++++++++++++++++++++++
 board/ti/j784s4/sec-cfg.yaml     |  380 ++++
 board/ti/j784s4/tifs-rm-cfg.yaml | 2656 ++++++++++++++++++++++++++
 5 files changed, 6144 insertions(+)
 create mode 100644 board/ti/j784s4/board-cfg.yaml
 create mode 100644 board/ti/j784s4/pm-cfg.yaml
 create mode 100644 board/ti/j784s4/rm-cfg.yaml
 create mode 100644 board/ti/j784s4/sec-cfg.yaml
 create mode 100644 board/ti/j784s4/tifs-rm-cfg.yaml
board/ti/j784s4/board-cfg.yaml new file +37 -0
new file mode 100644
index 0000000000..3760f51073
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Board configuration for J784S4
+#
+
+---
+
+board-cfg:
+    rev:
+        boardcfg_abi_maj: 0x0
+        boardcfg_abi_min: 0x1
+    control:
+        subhdr:
+            magic: 0xC1D3
+            size: 7
+        main_isolation_enable: 0x5A
+        main_isolation_hostid: 0x2
+    secproxy:
+        subhdr:
+            magic: 0x1207
+            size: 7
+        scaling_factor: 0x1
+        scaling_profile: 0x1
+        disable_main_nav_secure_proxy: 0
+    msmc:
+        subhdr:
+            magic: 0xA5C3
+            size: 5
+        msmc_cache_size: 0x8
+    debug_cfg:
+        subhdr:
+            magic: 0x020C
+            size: 8
+        trace_dst_enables: 0x00
+        trace_src_enables: 0x00
board/ti/j784s4/pm-cfg.yaml new file +13 -0
new file mode 100644
index 0000000000..6720b26dd5
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Power management configuration for J784S4
+#
+
+---
+
+pm-cfg:
+    rev:
+        boardcfg_abi_maj: 0x0
+        boardcfg_abi_min: 0x1
board/ti/j784s4/rm-cfg.yaml new file +3058 -0

2,950 lines not on this page · raw message

board/ti/j784s4/sec-cfg.yaml new file +380 -0

380 lines not on this page · raw message

board/ti/j784s4/tifs-rm-cfg.yaml new file +2656 -0

2,656 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.

#15 lore raw

PATCH v6 10/17 board: ti: j784s4: Add boot environment variables

In reply to Apurva Nandan

Add env file with necessary boot variables.

---
 board/ti/j784s4/j784s4.env | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 board/ti/j784s4/j784s4.env
board/ti/j784s4/j784s4.env new file +18 -0
new file mode 100644
index 0000000000..0055019074
@@ -0,0 +1,18 @@
+#include <env/ti/ti_common.env>
+#include <env/ti/default_findfdt.env>
+#include <env/ti/mmc.env>
+#include <env/ti/ufs.env>
+#include <env/ti/k3_dfu.env>
+
+name_kern=Image
+console=ttyS2,115200n8
+args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02880000
+	${mtdparts}
+run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
+
+boot_targets=mmc1 mmc0 usb pxe dhcp
+boot=mmc
+mmcdev=1
+bootpart=1:2
+bootdir=/boot
+rd_spec=-
Signature · 1 line
2.34.1
#16 lore raw

PATCH v6 11/17 arm: dts: Introduce j784s4 u-boot dts files

In reply to Apurva Nandan

Introduce the base dts files needed for u-boot or to augment the linux dtbs for use in the u-boot-spl and u-boot binaries.

---
 arch/arm/dts/Makefile                        |    3 +-
 arch/arm/dts/k3-j784s4-binman.dtsi           |  346 +
 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi | 8757 +++++++++++++++++
 arch/arm/dts/k3-j784s4-ddr.dtsi              | 8858 ++++++++++++++++++
 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi       |   25 +
 arch/arm/dts/k3-j784s4-r5-evm.dts            |  105 +
 6 files changed, 18093 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-j784s4-binman.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-ddr.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-r5-evm.dts
arch/arm/dts/Makefile +2 -1
index 1a63ccba8e..b73f8a9230 100644
@@ -1409,7 +1409,8 @@ dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-board.dtb\
 			       k3-j721s2-common-proc-board.dtb\
 			       k3-j721s2-r5-common-proc-board.dtb
 dtb-$(CONFIG_SOC_K3_J784S4) += k3-am69-sk.dtb\
-			       k3-j784s4-evm.dtb
+			       k3-j784s4-evm.dtb\
+			       k3-j784s4-r5-evm.dtb
 dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
 			      k3-am642-r5-evm.dtb \
 			      k3-am642-sk.dtb \
arch/arm/dts/k3-j784s4-binman.dtsi new file +346 -0

346 lines not on this page · raw message

arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi new file +8757 -0

2,645 lines not on this page · raw message

arch/arm/dts/k3-j784s4-ddr.dtsi new file +8858 -0

8,858 lines not on this page · raw message

arch/arm/dts/k3-j784s4-evm-u-boot.dtsi new file +25 -0
new file mode 100644
index 0000000000..74de8a4db8

Lines of this file are not shown. View the raw message.

arch/arm/dts/k3-j784s4-r5-evm.dts new file +105 -0

105 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.

#17 lore raw

PATCH v6 12/17 arm: dts: Introduce am69-sk u-boot dts files

In reply to Apurva Nandan

From: Dasnavis Sabiya <[email protected]>

Introduce the base dts files needed for u-boot or to augment the linux dtbs for use in the u-boot-spl and u-boot binaries.

---
 arch/arm/dts/Makefile               |   1 +
 arch/arm/dts/k3-am69-r5-sk.dts      | 105 ++++++++++++++++++++++++++++
 arch/arm/dts/k3-am69-sk-u-boot.dtsi |  25 +++++++
 arch/arm/dts/k3-j784s4-binman.dtsi  |  89 +++++++++++++++++++++++
 4 files changed, 220 insertions(+)
 create mode 100644 arch/arm/dts/k3-am69-r5-sk.dts
 create mode 100644 arch/arm/dts/k3-am69-sk-u-boot.dtsi
arch/arm/dts/Makefile +1 -0
index b73f8a9230..d966869779 100644
@@ -1409,6 +1409,7 @@ dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-board.dtb\
 			       k3-j721s2-common-proc-board.dtb\
 			       k3-j721s2-r5-common-proc-board.dtb
 dtb-$(CONFIG_SOC_K3_J784S4) += k3-am69-sk.dtb\
+			       k3-am69-r5-sk.dtb\
 			       k3-j784s4-evm.dtb\
 			       k3-j784s4-r5-evm.dtb
 dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
arch/arm/dts/k3-am69-r5-sk.dts new file +105 -0

105 lines not on this page · raw message

arch/arm/dts/k3-am69-sk-u-boot.dtsi new file +25 -0
new file mode 100644
index 0000000000..d1623b6bbe
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-j784s4-binman.dtsi"
+
+&mcu_udmap {
+	reg =   <0x0 0x285c0000 0x0 0x100>,
+		<0x0 0x284c0000 0x0 0x4000>,
+		<0x0 0x2a800000 0x0 0x40000>,
+		<0x0 0x284a0000 0x0 0x4000>,
+		<0x0 0x2aa00000 0x0 0x40000>,
+		<0x0 0x28400000 0x0 0x2000>;
+	reg-names = "gcfg", "rchan", "rchanrt", "tchan",
+		    "tchanrt", "rflow";
+	bootph-pre-ram;
+};
+
+&sms {
+	k3_sysreset: sysreset-controller {
+		compatible = "ti,sci-sysreset";
+		bootph-pre-ram;
+	};
+};
arch/arm/dts/k3-j784s4-binman.dtsi +89 -0

145 lines not on this page · raw message

Signature · 1 line
2.34.1
#18 lore raw

PATCH v6 13/17 arm: dts: Add bootph-all for memory node

In reply to Apurva Nandan

memory node is used by fdtdec_setup_mem_size_base() and fdtdec_setup_memory_banksize() during dram_init(), so use bootph-all to enable for all stages.

---
 arch/arm/dts/k3-am69-sk-u-boot.dtsi    | 6 ++++++
 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi | 6 ++++++
 2 files changed, 12 insertions(+)
arch/arm/dts/k3-am69-sk-u-boot.dtsi +6 -0
index d1623b6bbe..6d848ba6bc 100644
@@ -5,6 +5,12 @@
 
 #include "k3-j784s4-binman.dtsi"
 
+/ {
+	memory@80000000 {
+		bootph-all;
+	};
+};
+
 &mcu_udmap {
 	reg =   <0x0 0x285c0000 0x0 0x100>,
 		<0x0 0x284c0000 0x0 0x4000>,
arch/arm/dts/k3-j784s4-evm-u-boot.dtsi +6 -0
index 74de8a4db8..ac749782bf 100644
@@ -5,6 +5,12 @@
 
 #include "k3-j784s4-binman.dtsi"
 
+/ {
+	memory@80000000 {
+		bootph-all;
+	};
+};
+
 &mcu_udmap {
 	reg =   <0x0 0x285c0000 0x0 0x100>,
 		<0x0 0x284c0000 0x0 0x4000>,
Signature · 1 line
2.34.1
#19 lore raw

PATCH v6 14/17 configs: j784s4_evm: Add defconfig for j784s4 evm board

In reply to Apurva Nandan

Add defconfigs for building R5 U-Boot SPL and A72 U-Boot.

---
 configs/j784s4_evm_a72_defconfig | 180 +++++++++++++++++++++++++++++++
 configs/j784s4_evm_r5_defconfig  | 163 ++++++++++++++++++++++++++++
 2 files changed, 343 insertions(+)
 create mode 100644 configs/j784s4_evm_a72_defconfig
 create mode 100644 configs/j784s4_evm_r5_defconfig
configs/j784s4_evm_a72_defconfig new file +180 -0
new file mode 100644
index 0000000000..ae392f51cd
@@ -0,0 +1,180 @@
+CONFIG_ARM=y
+CONFIG_ARCH_K3=y
+CONFIG_TI_SECURE_DEVICE=y
+CONFIG_SYS_MALLOC_F_LEN=0x8000
+CONFIG_SPL_GPIO=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_NR_DRAM_BANKS=2
+CONFIG_SOC_K3_J784S4=y
+CONFIG_TARGET_J784S4_A72_EVM=y
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000
+CONFIG_SF_DEFAULT_SPEED=25000000
+CONFIG_ENV_SIZE=0x20000
+CONFIG_DM_GPIO=y
+CONFIG_SPL_DM_SPI=y
+CONFIG_DEFAULT_DEVICE_TREE="k3-j784s4-evm"
+CONFIG_SPL_TEXT_BASE=0x80080000
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_DM_RESET=y
+CONFIG_SPL_MMC=y
+CONFIG_SPL_SERIAL=y
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
+CONFIG_SPL_FS_FAT=y
+CONFIG_SPL_LIBDISK_SUPPORT=y
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI=y
+# CONFIG_PSCI_RESET is not set
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
+CONFIG_BOOTSTD_FULL=y
+CONFIG_BOOTSTD_DEFAULTS=y
+CONFIG_BOOTCOMMAND="run envboot; bootflow scan -lb"
+CONFIG_LOGLEVEL=7
+CONFIG_SPL_MAX_SIZE=0xc0000
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
+CONFIG_SPL_BSS_START_ADDR=0x80a00000
+CONFIG_SPL_BSS_MAX_SIZE=0x80000
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_STACK_R=y
+CONFIG_SYS_SPL_MALLOC=y
+CONFIG_SYS_SPL_MALLOC_SIZE=0x800000
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
+CONFIG_SPL_I2C=y
+CONFIG_SPL_DM_MAILBOX=y
+CONFIG_SPL_MTD_SUPPORT=y
+CONFIG_SPL_DM_SPI_FLASH=y
+CONFIG_SPL_DM_RESET=y
+CONFIG_SPL_POWER_DOMAIN=y
+CONFIG_SPL_RAM_SUPPORT=y
+CONFIG_SPL_RAM_DEVICE=y
+# CONFIG_SPL_SPI_FLASH_TINY is not set
+CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
+CONFIG_SPL_SPI_LOAD=y
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000
+CONFIG_SPL_THERMAL=y
+CONFIG_SPL_YMODEM_SUPPORT=y
+CONFIG_SYS_MAXARGS=64
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_DFU=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_REMOTEPROC=y
+CONFIG_CMD_UFS=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_SPL_MULTI_DTB_FIT=y
+CONFIG_OF_LIST="k3-j784s4-evm k3-am69-sk"
+CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_CLK_CCF=y
+CONFIG_CLK_TI_SCI=y
+CONFIG_DFU_MMC=y
+CONFIG_DFU_RAM=y
+CONFIG_DFU_SF=y
+CONFIG_SYS_DFU_DATA_BUF_SIZE=0x40000
+CONFIG_SYS_DFU_MAX_FILE_SIZE=0x800000
+CONFIG_DMA_CHANNELS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_TI_SCI_PROTOCOL=y
+CONFIG_DA8XX_GPIO=y
+CONFIG_DM_PCA953X=y
+CONFIG_DM_I2C=y
+CONFIG_DM_I2C_GPIO=y
+CONFIG_SYS_I2C_OMAP24XX=y
+CONFIG_DM_MAILBOX=y
+CONFIG_K3_SEC_PROXY=y
+CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_MMC_HS400_SUPPORT=y
+CONFIG_SPL_MMC_HS400_SUPPORT=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ADMA=y
+CONFIG_SPL_MMC_SDHCI_ADMA=y
+CONFIG_MMC_SDHCI_AM654=y
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_CFI_FLASH=y
+CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
+CONFIG_FLASH_CFI_MTD=y
+CONFIG_SYS_FLASH_CFI=y
+CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
+CONFIG_SPI_FLASH_SOFT_RESET=y
+CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_S28HX_T=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_MT35XU=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_MULTIPLEXER=y
+CONFIG_MUX_MMIO=y
+CONFIG_PHY_TI_DP83867=y
+CONFIG_PHY_FIXED=y
+CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_PHY=y
+CONFIG_SPL_PHY=y
+CONFIG_PHY_CADENCE_TORRENT=y
+CONFIG_PHY_J721E_WIZ=y
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_GENERIC is not set
+CONFIG_SPL_PINCTRL=y
+# CONFIG_SPL_PINCTRL_GENERIC is not set
+CONFIG_PINCTRL_SINGLE=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_TI_SCI_POWER_DOMAIN=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_RAM=y
+CONFIG_SPL_RAM=y
+CONFIG_REMOTEPROC_TI_K3_DSP=y
+CONFIG_REMOTEPROC_TI_K3_R5F=y
+CONFIG_RESET_TI_SCI=y
+CONFIG_SCSI=y
+CONFIG_DM_SCSI=y
+CONFIG_DM_SERIAL=y
+CONFIG_SOC_DEVICE=y
+CONFIG_SOC_DEVICE_TI_K3=y
+CONFIG_SOC_TI=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_CADENCE_QSPI=y
+CONFIG_SYSRESET=y
+CONFIG_SPL_SYSRESET=y
+CONFIG_SYSRESET_TI_SCI=y
+CONFIG_DM_THERMAL=y
+CONFIG_UFS=y
+CONFIG_CADENCE_UFS=y
+CONFIG_TI_J721E_UFS=y
configs/j784s4_evm_r5_defconfig new file +163 -0

163 lines not on this page · raw message

Signature · 1 line
2.34.1
#20 lore raw

PATCH v6 15/17 configs: Add am69_sk_* defconfig fragments

In reply to Apurva Nandan

From: Dasnavis Sabiya <[email protected]>

Add config fragments for am69_sk A72 and R5 configuration.

This applies on to:
j784s4_evm_a72_defconfig -> am69_sk_a72.config
j784s4_evm_r5_defconfig -> am69_sk_r5.config

The usage model (with the fragment) would be:
make j784s4_evm_a72_defconfig am69_sk_a72.config
make

OR

make j784s4_evm_r5_defconfig am69_sk_r5.config
make

---
 configs/am69_sk_a72.config | 3 +++
 configs/am69_sk_r5.config  | 3 +++
 2 files changed, 6 insertions(+)
 create mode 100644 configs/am69_sk_a72.config
 create mode 100644 configs/am69_sk_r5.config
configs/am69_sk_a72.config new file +3 -0
new file mode 100644
index 0000000000..5668e23b37
@@ -0,0 +1,3 @@
+# Defconfig fragment to apply on top of j784s4_evm_a72_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
configs/am69_sk_r5.config new file +3 -0
new file mode 100644
index 0000000000..9194694393
@@ -0,0 +1,3 @@
+# Defconfig fragment to apply on top of j784s4_evm_r5_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-r5-sk"
Signature · 1 line
2.34.1
#21 lore raw

PATCH v6 16/17 doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation

In reply to Apurva Nandan

TI K3 J784S4 and AM69 are new additions to the K3 SoC family. Add documentation about the J784S4 EVM and AM69 SK.

---
 doc/board/ti/j784s4_evm.rst | 303 ++++++++++++++++++++++++++++++++++++
 doc/board/ti/k3.rst         |   1 +
 2 files changed, 304 insertions(+)
 create mode 100644 doc/board/ti/j784s4_evm.rst
doc/board/ti/j784s4_evm.rst new file +303 -0
new file mode 100644
index 0000000000..bb7ed0b031
@@ -0,0 +1,303 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
+.. sectionauthor:: Apurva Nandan <[email protected]>
+
+J784S4 and AM69 Platforms
+=========================
+
+Introduction
+------------
+The J784S4 SoC belongs to the K3 Multicore SoC architecture
+platform, providing advanced system integration in automotive,
+ADAS and industrial applications requiring AI at the network edge.
+This SoC extends the K3 Jacinto 7 family of SoCs with focus on
+raising performance and integration while providing interfaces,
+memory architecture and compute performance for multi-sensor, high
+concurrency applications.
+
+The device is partitioned into three functional domains, each containing
+specific processing cores and peripherals:
+
+1. Wake-up (WKUP) domain
+    * ARM Cortex-M4F processor, runs TI Foundational Security (TIFS)
+
+2. Microcontroller (MCU) domain
+    * Dual core ARM Cortex-R5F processor, runs device management
+      and SoC early boot
+
+3. MAIN domain
+    * Two clusters of quad core 64-bit ARM Cortex-A72, runs HLOS
+    * Dual core ARM Cortex-R5F processor used for RTOS applications
+    * Four C7x DSPs used for Machine Learning applications.
+
+
+More info can be found in TRM: http://www.ti.com/lit/zip/spruj52
+
+Platform information:
+
+* https://www.ti.com/tool/J784S4XEVM
+* https://www.ti.com/tool/SK-AM69
+
+Boot Flow
+---------
+Below is the pictorial representation of boot flow:
+
+.. image:: img/boot_diagram_k3_current.svg
+    :alt: K3 boot flow
+
+- On this platform, "TI Foundational Security (TIFS)" functions as the
+  security enclave master. While "Device Manager (DM)", also known as the
+  "TISCI server" in TI terminology, offers all the essential services.
+
+- As illustrated in the diagram above, R5 SPL manages power and clock
+  services independently before handing over control to DM. The A72 or
+  the C7x (Aux core) software components request TIFS/DM to handle
+  security or device management services.
+
+Sources
+-------
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_boot_sources
+    :end-before: .. k3_rst_include_end_boot_sources
+
+Build procedure
+---------------
+0. Setup the environment variables:
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_common_env_vars_desc
+    :end-before: .. k3_rst_include_end_common_env_vars_desc
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_board_env_vars_desc
+    :end-before: .. k3_rst_include_end_board_env_vars_desc
+
+Set the variables corresponding to this platform:
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_common_env_vars_defn
+    :end-before: .. k3_rst_include_end_common_env_vars_defn
+.. code-block:: bash
+
+ $ export UBOOT_CFG_CORTEXR=j784s4_evm_r5_defconfig
+ $ export UBOOT_CFG_CORTEXA=j784s4_evm_a72_defconfig
+ $ export TFA_BOARD=j784s4
+ $ export TFA_EXTRA_ARGS="K3_USART=0x8"
+ $ export OPTEE_PLATFORM=k3-j784s4
+ $ export OPTEE_EXTRA_ARGS="CFG_CONSOLE_UART=0x8"
+
+.. j784s4_evm_rst_include_start_build_steps
+
+1. Trusted Firmware-A
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_build_steps_tfa
+    :end-before: .. k3_rst_include_end_build_steps_tfa
+
+
+2. OP-TEE
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_build_steps_optee
+    :end-before: .. k3_rst_include_end_build_steps_optee
+
+3. U-Boot
+
+.. _j784s4_evm_rst_u_boot_r5:
+
+* 3.1 R5
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_build_steps_spl_r5
+    :end-before: .. k3_rst_include_end_build_steps_spl_r5
+
+.. _j784s4_evm_rst_u_boot_a72:
+
+* 3.2 A72
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_build_steps_uboot
+    :end-before: .. k3_rst_include_end_build_steps_uboot
+.. j784s4_evm_rst_include_end_build_steps
+
+Target Images
+-------------
+In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
+variant (GP, HS-FS, HS-SE) requires a different source for these files.
+
+ - GP
+
+    * tiboot3-j784s4-gp-evm.bin from :ref:`step 3.1 <j784s4_evm_rst_u_boot_r5>`
+    * tispl.bin_unsigned, u-boot.img_unsigned from :ref:`step 3.2 <j784s4_evm_rst_u_boot_a72>`
+
+ - HS-FS
+
+    * tiboot3-j784s4-hs-fs-evm.bin from :ref:`step 3.1 <j784s4_evm_rst_u_boot_r5>`
+    * tispl.bin, u-boot.img from :ref:`step 3.2 <j784s4_evm_rst_u_boot_a72>`
+
+ - HS-SE
+
+    * tiboot3-j784s4-hs-evm.bin from :ref:`step 3.1 <j784s4_evm_rst_u_boot_r5>`
+    * tispl.bin, u-boot.img from :ref:`step 3.2 <j784s4_evm_rst_u_boot_a72>`
+
+Image formats
+-------------
+
+- tiboot3.bin
+
+.. image:: img/multi_cert_tiboot3.bin.svg
+    :alt: tiboot3.bin format
+
+- tispl.bin
+
+.. image:: img/dm_tispl.bin.svg
+    :alt: tispl.bin format
+
+R5 Memory Map
+-------------
+
+.. list-table::
+   :widths: 16 16 16
+   :header-rows: 1
+
+   * - Region
+     - Start Address
+     - End Address
+
+   * - SPL
+     - 0x41c00000
+     - 0x41c40000
+
+   * - EMPTY
+     - 0x41c40000
+     - 0x41c61f20
+
+   * - STACK
+     - 0x41c65f20
+     - 0x41c61f20
+
+   * - Global data
+     - 0x41c65f20
+     - 0x41c66000
+
+   * - Heap
+     - 0x41c66000
+     - 0x41c76000
+
+   * - BSS
+     - 0x41c76000
+     - 0x41c80000
+
+   * - DM DATA
+     - 0x41c80000
+     - 0x41c84130
+
+   * - EMPTY
+     - 0x41c84130
+     - 0x41cff9fc
+
+   * - MCU Scratchpad
+     - 0x41cff9fc
+     - 0x41cffbfc
+
+   * - ROM DATA
+     - 0x41cffbfc
+     - 0x41cfffff
+
+Switch Setting for Boot Mode
+----------------------------
+
+Boot Mode pins provide means to select the boot mode and options before the
+device is powered up. After every POR, they are the main source to populate
+the Boot Parameter Tables.
+
+Boot Mode Pins for J784S4-EVM
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following tables show some common boot modes used on J784S4 SoC platform.
+More details can be found in the Technical Reference Manual:
+http://www.ti.com/lit/zip/spruj52 under the `Boot Mode Pins` section.
+
+.. list-table:: J784S4 EVM Boot Modes
+   :widths: 16 16 16
+   :header-rows: 1
+
+   * - Switch Label
+     - SW9: 12345678
+     - SW8: 12345678
+
+   * - SD
+     - 00000000
+     - 10000010
+
+   * - EMMC
+     - 01000000
+     - 10000000
+
+   * - OSPI
+     - 01000000
+     - 00000110
+
+   * - UART
+     - 01110000
+     - 00000000
+
+   * - USB DFU
+     - 00100000
+     - 10000000
+
+For SW8 and SW9, the switch state in the "ON" position = 1.
+
+Boot Mode Pins for AM69-SK
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following table show some common boot modes used on AM69-SK platform.
+More details can be found in the User Guide for AM69-SK:
+https://www.ti.com/lit/ug/spruj70/spruj70.pdf under the `Bootmode Settings`
+section.
+
+.. list-table:: AM69 SK Boot Modes
+   :widths: 16 16
+   :header-rows: 1
+
+   * - Switch Label
+     - SW2: 1234
+
+   * - SD
+     - 0000
+
+   * - EMMC
+     - 0110
+
+   * - OSPI
+     - 1110
+
+   * - UART
+     - 1010
+
+For SW2, the switch state in the "ON" position = 1.
+
+Debugging U-Boot
+----------------
+
+See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
+detailed setup information.
+
+.. warning::
+
+  **Debugging the platform via JTAG requires latest OpenOCD tag**
+
+
+Debugging U-Boot on J784S4-EVM and AM69-SK
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_openocd_connect_XDS110
+    :end-before: .. k3_rst_include_end_openocd_connect_XDS110
+
+To start OpenOCD and connect to J784S4-EVM or AM69-SK board, use the
+following.
+
+.. code-block:: bash
+
+  openocd -f board/ti_j784s4evm.cfg
doc/board/ti/k3.rst +1 -0
index a127215ce5..a2f49af03f 100644
@@ -40,6 +40,7 @@ K3 Based SoCs
    ../beagle/j721e_beagleboneai64
    j721e_evm
    j721s2_evm
+   j784s4_evm
 
 Boot Flow Overview
 ------------------
Signature · 1 line
2.34.1
#22 lore raw

PATCH v6 17/17 board: ti: j784s4: Add MAINTAINERS file

In reply to Apurva Nandan

Add maintainership for new J784S4 files added.

---
 board/ti/j784s4/MAINTAINERS | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 board/ti/j784s4/MAINTAINERS
board/ti/j784s4/MAINTAINERS new file +25 -0
new file mode 100644
index 0000000000..d3f0e50391
@@ -0,0 +1,25 @@
+J784S4 BOARD
+M:	Apurva Nandan <[email protected]>
+S:	Maintained
+F:	board/ti/j784s4
+F:	arch/arm/mach-k3/j784s4
+F:	include/configs/j784s4_evm.h
+F:	configs/j784s4_evm_r5_defconfig
+F:	configs/j784s4_evm_a72_defconfig
+F:	arch/arm/dts/k3-j784s4.dtsi
+F:	arch/arm/dts/k3-j784s4-main.dtsi
+F:	arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi
+F:	arch/arm/dts/k3-j784s4-thermal.dtsi
+F:	arch/arm/dts/k3-j784s4-evm.dts
+F:	arch/arm/dts/k3-j784s4-evm-u-boot.dtsi
+F:	arch/arm/dts/k3-j784s4-r5-evm.dts
+F:	arch/arm/dts/k3-j784s4-ddr.dtsi
+F:	arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi
+F:	doc/board/ti/j784s4_evm.rst
+
+AM69 BOARD
+F:	arch/arm/dts/k3-am69-sk.dts
+F:	arch/arm/dts/k3-am69-sk-u-boot.dtsi
+F:	arch/arm/dts/k3-am69-r5-sk.dts
+F:	configs/am69_sk_r5.config
+F:	configs/am69_sk_a72.config
Signature · 1 line
2.34.1
Tested-by on the v6 series
#23 lore raw
In reply to Apurva Nandan

Hi Apurva

Thanks!

Quoted 4 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

For the whole series:

However, one thing I noticed is that with upstream TF-A I do get the following errors:

NOTICE:  BL31: v2.10.0  (release):v2.10.0-76-g02091541d
NOTICE:  BL31: Built : 18:13:08, Dec 14 2023
ERROR:   Failed to get response (-19)
ERROR:   Transfer send failed (-19)
ERROR:   Unable to query firmware capabilities (-19)

While with latest TF-A from downstream TI BSP (both 9.0 and 9.1 use the same versin) I do not get any errors:

NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3
NOTICE:  BL31: Built : 18:40:38, Dec 14 2023

Any idea?

Cheers

Marcel

Quoted 237 lines

The J784S4 SoC device tree patches are taken from kernel patch submissions and will be updated as they are accepted and merged to the kernel tree. All other patches are specific to SPL and u-boot and do not have dependency on other trees. Appreciate a review for acceptance to u-boot tree.

Here are some of the salient features of the J784S4 automotive grade application processor:

The J784S4 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications.

Some highlights of this SoC are:
* Up to 8 Cortex-A72s, four clusters of lockstep capable dual Cortex-R5F MCUs, 4 C7x floating point vector DSPs with Matrix Multiply Accelerator(MMA) for deep learning and CNN.
* 3D GPU: Automotive grade IMG BXS-4-64 MC1
* Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC)
* Three CSI2.0 4L RX plus two CSI2.0 4L TX, two DSI Tx, one eDP/DP and one DPI interface.
* Integrated gigabit ethernet switch, up to 8 ports (TDA4VH), two ports support 10Gb USXGMII; Two 4 lane PCIe-GEN3 controllers, USB3.0 Dual-role device subsystems, Up to 20 MCANs, among other peripherals.

See J784S4 Technical Reference Manual (SPRUJ52 - JUNE 2022) for further details: http://www.ti.com/lit/zip/spruj52

In addtion, the J784S4 EVM board is designed for TI J784S4 SoC. It supports the following interfaces:
* 32 GB DDR4 RAM
* x2 Gigabit Ethernet interfaces capable of working in Switch and MAC mode
* x1 Input Audio Jack, x1 Output Audio Jack
* x1 USB2.0 Hub with two Type A host and x1 USB 3.1 Type-C Port
* x2 4L PCIe connector
* x1 UHS-1 capable micro-SD card slot
* 512 Mbit OSPI flash, 1 Gbit Octal NAND flash, 512 Mbit QSPI flash, UFS flash.
* x6 UART through UART-USB bridge
* XDS110 for onboard JTAG debug using USB
* Temperature sensors, user push buttons and LEDs
* 40-pin User Expansion Connector
* x2 ENET Expansion Connector, x1 GESI expander, x2 Display connector
* x1 15-pin CSI header
* x6 MCAN instances

Schematics: https://www.ti.com/lit/zip/sprr458

eMMC UDA moode bootlog:
https://gist.githubusercontent.com/apurvanandan1997/3cffada252d50a8aa0c00a91f1f2f856/raw/

Changes in v6:
1) Move bootph-all of memory node to u-boot.dtsi
2) Used a while loop for DRAM controller init, instead of hard-coding for 4 DRAM
3) Fixed build error by adding board/ti/j784s4/Kconfig
4) Trimmed out j784s4_evm.h
5) Fixed checkpatch warnings

Link to v5:
https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Changes in v5:
1) Incorporated Andrew Davis' "Move R5 specific code into new r5/ directory" and "Move board selection to mach-k3" series changes.
2) Incorporated Neha Francis' "Move to using templated FITs" series changes.
3) Synced device tree files with Linux v6.7-rc1
4) Changed ti_mmc to mmc1 target from bootstd
5) Updated doc based on review comments
6) Removed remoteproc support from the series
7) Splitted board files patch into smaller patches
8) Trimmed j784s4.env to necessary variables
9) Used fdtdec_setup_mem_size_base fdtdec_setup_memory_banksize in evm.c
10) Trimmed down evm.c to essential header files.
11) Switched to multi-dtb fit compilation with config fragments

Link to v4:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v4:
1) Cleaned up Copyright and SPDX identifiers
2) Synced the device trees to Linux v6.6-rc1 tag
3) Added cleanup patch for sorting SoC JTAG ID entries
4) Removed EEPROM board detect from evm.c and added am69 config fragments
5) Updated MAINTAINERS files and commit messages
6) Removed struct renaming in ti_k3_r5f_rproc driver

Link to v3:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v3:
1) Added AM69 SK support in the series
2) Switched from distroboot to bootstd support
3) Added remoteproc support for J784S4
4) Added documentation for both SoCs
5) Added binman support
6) Removed unnecessarry nodes from r5-evm.dts and evm-u-boot.dtsi
7) Added HS device support
8) Added env file for environement variables
9) Removed ti-serdes-mux bindings
10) Cleaned up all files and synced with latest
11) Addressed all previous review comments

Note: The base dts files have been sync from next-20230905 linux tag as per review comment received on previous re-roll:
https://lore.kernel.org/u-boot/20230321155227.GV8135@bill-the-cat/

Link to v2:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v2:
- Refactored environement scripts to 'j784s4.env' and removed scripts not needed for basic board bootup.
- Imported the J7874S4 basic device tree files from v6.2 linux kernel.
- Moved j784s4 clock definitions and clock data into one patch/commit.
- coalesce board commits into one commit.

Apurva Nandan (14):
  arm: dts: Introduce j784s4 dts from linux kernel
  arm: mach-k3: Add basic support for J784S4 SoC definition
  arm: mach-k3: Sort SoC JTAG_ID entries
  soc: ti: k3-socinfo: Add entry for J784S4 SoC
  arm: mach-k3: j784s4: Add clk and power support
  drivers: dma: Add support for J784S4 SoC
  board: ti: j784s4: Add board support for J784S4 EVM
  board: ti: j748s4: Add board config yaml files
  board: ti: j784s4: Add boot environment variables
  arm: dts: Introduce j784s4 u-boot dts files
  arm: dts: Add bootph-all for memory node
  configs: j784s4_evm: Add defconfig for j784s4 evm board
  doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation
  board: ti: j784s4: Add MAINTAINERS file

Dasnavis Sabiya (3):
  arm: dts: Introduce am69-sk dts from linux kernel
  arm: dts: Introduce am69-sk u-boot dts files
  configs: Add am69_sk_* defconfig fragments

 arch/arm/dts/Makefile                         |    4 + arch/arm/dts/k3-am69-r5-sk.dts                |  105 + arch/arm/dts/k3-am69-sk-u-boot.dtsi           |   31 + arch/arm/dts/k3-am69-sk.dts                   |  900 ++ arch/arm/dts/k3-j784s4-binman.dtsi            |  435 + arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi  | 8757 ++++++++++++++++ arch/arm/dts/k3-j784s4-ddr.dtsi               | 8858 +++++++++++++++++ arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        |   31 + arch/arm/dts/k3-j784s4-evm.dts                |  981 ++ arch/arm/dts/k3-j784s4-main.dtsi              | 2068 ++++ arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi        |  743 ++ arch/arm/dts/k3-j784s4-r5-evm.dts             |  105 + arch/arm/dts/k3-j784s4-thermal.dtsi           |  101 + arch/arm/dts/k3-j784s4.dtsi                   |  294 + arch/arm/mach-k3/Kconfig                      |   17 +- arch/arm/mach-k3/Makefile                     |    2 + arch/arm/mach-k3/arm64-mmu.c                  |   52 + arch/arm/mach-k3/include/mach/hardware.h      |   13 +- .../mach-k3/include/mach/j784s4_hardware.h    |   60 + arch/arm/mach-k3/include/mach/j784s4_spl.h    |   47 + arch/arm/mach-k3/include/mach/spl.h           |    4 + arch/arm/mach-k3/j784s4/Kconfig               |   35 + arch/arm/mach-k3/j784s4_fdt.c                 |   15 + arch/arm/mach-k3/j784s4_init.c                |  335 + arch/arm/mach-k3/r5/Makefile                  |    1 + arch/arm/mach-k3/r5/j784s4/Makefile           |    7 + arch/arm/mach-k3/r5/j784s4/clk-data.c         |  428 + arch/arm/mach-k3/r5/j784s4/dev-data.c         |   98 + board/ti/j784s4/Kconfig                       |   37 + board/ti/j784s4/MAINTAINERS                   |   25 + board/ti/j784s4/Makefile                      |    7 + board/ti/j784s4/board-cfg.yaml                |   37 + board/ti/j784s4/evm.c                         |   38 + board/ti/j784s4/j784s4.env                    |   18 + board/ti/j784s4/pm-cfg.yaml                   |   13 + board/ti/j784s4/rm-cfg.yaml                   | 3058 ++++++ board/ti/j784s4/sec-cfg.yaml                  |  380 + board/ti/j784s4/tifs-rm-cfg.yaml              | 2656 +++++ configs/am69_sk_a72.config                    |    3 + configs/am69_sk_r5.config                     |    3 + configs/j784s4_evm_a72_defconfig              |  180 + configs/j784s4_evm_r5_defconfig               |  163 + doc/board/ti/j784s4_evm.rst                   |  303 + doc/board/ti/k3.rst                           |    1 + drivers/clk/ti/clk-k3.c                       |    6 + drivers/dma/ti/Makefile                       |    1 + drivers/dma/ti/k3-psil-j784s4.c               |  166 + drivers/dma/ti/k3-psil-priv.h                 |    1 + drivers/dma/ti/k3-psil.c                      |    2 + drivers/firmware/ti_sci_static_data.h         |   34 + drivers/power/domain/ti-power-domain.c        |    6 + drivers/ram/Kconfig                           |    2 +- drivers/soc/soc_ti_k3.c                       |    3 + include/configs/j784s4_evm.h                  |   15 + include/k3-clk.h                              |    1 + include/k3-dev.h                              |    1 +

 56 files changed, 31675 insertions(+), 12 deletions(-)

 create mode 100644 arch/arm/dts/k3-am69-r5-sk.dts create mode 100644 arch/arm/dts/k3-am69-sk-u-boot.dtsi create mode 100644 arch/arm/dts/k3-am69-sk.dts
 create mode 100644 arch/arm/dts/k3-j784s4-binman.dtsi create mode 100644 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi create mode 100644 arch/arm/dts/k3-j784s4-ddr.dtsi create mode 100644 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi create mode 100644 arch/arm/dts/k3-j784s4-evm.dts create mode 100644 arch/arm/dts/k3-j784s4-main.dtsi create mode 100644 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi create mode 100644 arch/arm/dts/k3-j784s4-r5-evm.dts create mode 100644 arch/arm/dts/k3-j784s4-thermal.dtsi create mode 100644 arch/arm/dts/k3-j784s4.dtsi
 create mode 100644 arch/arm/mach-k3/include/mach/j784s4_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/j784s4_spl.h create mode 100644 arch/arm/mach-k3/j784s4/Kconfig create mode 100644 arch/arm/mach-k3/j784s4_fdt.c
 create mode 100644 arch/arm/mach-k3/j784s4_init.c create mode 100644 arch/arm/mach-k3/r5/j784s4/Makefile create mode 100644 arch/arm/mach-k3/r5/j784s4/clk-data.c create mode 100644 arch/arm/mach-k3/r5/j784s4/dev-data.c create mode 100644 board/ti/j784s4/Kconfig
 create mode 100644 board/ti/j784s4/MAINTAINERS
 create mode 100644 board/ti/j784s4/Makefile
 create mode 100644 board/ti/j784s4/board-cfg.yaml create mode 100644 board/ti/j784s4/evm.c
 create mode 100644 board/ti/j784s4/j784s4.env
 create mode 100644 board/ti/j784s4/pm-cfg.yaml
 create mode 100644 board/ti/j784s4/rm-cfg.yaml
 create mode 100644 board/ti/j784s4/sec-cfg.yaml
 create mode 100644 board/ti/j784s4/tifs-rm-cfg.yaml create mode 100644 configs/am69_sk_a72.config
 create mode 100644 configs/am69_sk_r5.config
 create mode 100644 configs/j784s4_evm_a72_defconfig create mode 100644 configs/j784s4_evm_r5_defconfig create mode 100644 doc/board/ti/j784s4_evm.rst
 create mode 100644 drivers/dma/ti/k3-psil-j784s4.c create mode 100644 include/configs/j784s4_evm.h

#24 lore raw

On December 14, 2023 thus sayeth Marcel Ziswiler:

Quoted 22 lines

Hi Apurva

Thanks!

Quoted 4 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

For the whole series:

However, one thing I noticed is that with upstream TF-A I do get the following errors:

NOTICE:  BL31: v2.10.0  (release):v2.10.0-76-g02091541d
NOTICE:  BL31: Built : 18:13:08, Dec 14 2023
ERROR:   Failed to get response (-19)
ERROR:   Transfer send failed (-19)
ERROR:   Unable to query firmware capabilities (-19)
Quoted 5 lines

While with latest TF-A from downstream TI BSP (both 9.0 and 9.1 use the same versin) I do not get any errors:

NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3
NOTICE:  BL31: Built : 18:40:38, Dec 14 2023

What version of TIFS are you running? Not getting a response usually means firmware is dead or we're not using the right thread to talk.

~Bryan

#25 lore raw
Quoted 23 lines · On 12/14/23 2:10 PM, [email protected] wrote:

On December 14, 2023 thus sayeth Marcel Ziswiler:

Quoted 22 lines

Hi Apurva

Thanks!

Quoted 4 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

For the whole series:

However, one thing I noticed is that with upstream TF-A I do get the following errors:

NOTICE:  BL31: v2.10.0  (release):v2.10.0-76-g02091541d
NOTICE:  BL31: Built : 18:13:08, Dec 14 2023
ERROR:   Failed to get response (-19)
ERROR:   Transfer send failed (-19)
ERROR:   Unable to query firmware capabilities (-19)
Quoted 9 lines
Quoted 5 lines

While with latest TF-A from downstream TI BSP (both 9.0 and 9.1 use the same versin) I do not get any errors:

NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3
NOTICE:  BL31: Built : 18:40:38, Dec 14 2023

What version of TIFS are you running? Not getting a response usually means firmware is dead or we're not using the right thread to talk.

In this case the early versions of TIFS/DM for J784S4/AM69 had a bug where the "query firmware capabilities" API was left disabled. This is fixed in the next version of firmware, this error message is harmless today anyway (no LPM yet).

Andrew

#26 lore raw
Quoted 31 lines · Andrew Davis
Quoted 30 lines · On 12/14/23 2:10 PM, [email protected] wrote:

On December 14, 2023 thus sayeth Marcel Ziswiler:

Quoted 28 lines

Hi Apurva

Thanks!

Quoted 4 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

For the whole series:

However, one thing I noticed is that with upstream TF-A I do get the following errors:

NOTICE:  BL31: v2.10.0  (release):v2.10.0-76-g02091541d NOTICE:  BL31: Built : 18:13:08, Dec 14 2023 ERROR:   Failed to get response (-19)
ERROR:   Transfer send failed (-19)
ERROR:   Unable to query firmware capabilities (-19)

While with latest TF-A from downstream TI BSP (both 9.0 and 9.1 use the same versin) I do not get any errors:

NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3 NOTICE:  BL31: Built : 18:40:38, Dec 14 2023

Quoted 8 lines
Quoted 3 lines

What version of TIFS are you running? Not getting a response usually means firmware is dead or we're not using the right thread to talk.

In this case the early versions of TIFS/DM for J784S4/AM69 had a bug where the "query firmware capabilities" API was left disabled. This is fixed in the next version of firmware, this error message is harmless today anyway (no LPM yet).

No, I was always running the latest from the ti-linux-firmware branch:

SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')

So, it is really TF-A which seems to cause the issue here.

Quoted 1 line

Andrew

Cheers

Marcel

#27 lore raw
Quoted 41 lines · Marcel Ziswiler
Quoted 31 lines · Andrew Davis
Quoted 30 lines · On 12/14/23 2:10 PM, [email protected] wrote:

On December 14, 2023 thus sayeth Marcel Ziswiler:

Quoted 28 lines

Hi Apurva

Thanks!

Quoted 4 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

For the whole series:

However, one thing I noticed is that with upstream TF-A I do get the following errors:

NOTICE:  BL31: v2.10.0  (release):v2.10.0-76-g02091541d NOTICE:  BL31: Built : 18:13:08, Dec 14 2023 ERROR:   Failed to get response (-19)
ERROR:   Transfer send failed (-19)
ERROR:   Unable to query firmware capabilities (-19)

While with latest TF-A from downstream TI BSP (both 9.0 and 9.1 use the same versin) I do not get any errors:

NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3 NOTICE:  BL31: Built : 18:40:38, Dec 14 2023

Quoted 8 lines
Quoted 3 lines

What version of TIFS are you running? Not getting a response usually means firmware is dead or we're not using the right thread to talk.

In this case the early versions of TIFS/DM for J784S4/AM69 had a bug where the "query firmware capabilities" API was left disabled. This is fixed in the next version of firmware, this error message is harmless today anyway (no LPM yet).

Quoted 6 lines

No, I was always running the latest from the ti-linux-firmware branch:

SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')

So, it is really TF-A which seems to cause the issue here.

When I said "fixed in the next version" I meant the next to be released, as in not yet out (I'd guess out in a week or so). Sorry for any confusion here.

I added support for this new API to TF-A only recently, which is why the old TF-A versions don't print this error. Nishanth gives more details in the other thread, but as said this error is harmless and will go away in with the next firmware update.

Andrew

Quoted 5 lines
Quoted 1 line

Andrew

Cheers

Marcel

#28 lore raw
In reply to [email protected]
Quoted 26 lines · On Thu, 2023-12-14 at 14:10 -0600, [email protected] wrote:

On December 14, 2023 thus sayeth Marcel Ziswiler:

Quoted 25 lines

Hi Apurva

Thanks!

Quoted 4 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

For the whole series:

However, one thing I noticed is that with upstream TF-A I do get the following errors:

NOTICE:  BL31: v2.10.0  (release):v2.10.0-76-g02091541d NOTICE:  BL31: Built : 18:13:08, Dec 14 2023 ERROR:   Failed to get response (-19)
ERROR:   Transfer send failed (-19)
ERROR:   Unable to query firmware capabilities (-19)

While with latest TF-A from downstream TI BSP (both 9.0 and 9.1 use the same versin) I do not get any errors:

Quoted 6 lines
Quoted 3 lines

NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3 NOTICE:  BL31: Built : 18:40:38, Dec 14 2023

What version of TIFS are you running? Not getting a response usually means firmware is dead or we're not using the right thread to talk.

Yeah, sorry. I was always running the latest from the ti-linux-firmware branch:

SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')

So, it is really TF-A which seems to cause the issue.

Quoted 1 line

~Bryan

maintainer
#29 lore raw
Quoted 31 lines · Marcel Ziswiler
Quoted 30 lines · On Thu, 2023-12-14 at 14:10 -0600, [email protected] wrote:

On December 14, 2023 thus sayeth Marcel Ziswiler:

Quoted 28 lines

Hi Apurva

Thanks!

Quoted 4 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

For the whole series:

However, one thing I noticed is that with upstream TF-A I do get the following errors:

NOTICE:  BL31: v2.10.0  (release):v2.10.0-76-g02091541d NOTICE:  BL31: Built : 18:13:08, Dec 14 2023 ERROR:   Failed to get response (-19)
ERROR:   Transfer send failed (-19)
ERROR:   Unable to query firmware capabilities (-19)

While with latest TF-A from downstream TI BSP (both 9.0 and 9.1 use the same versin) I do not get any errors:

NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3 NOTICE:  BL31: Built : 18:40:38, Dec 14 2023

Quoted 8 lines
Quoted 2 lines

What version of TIFS are you running? Not getting a response usually means firmware is dead or we're not using the right thread to talk.

Yeah, sorry. I was always running the latest from the ti-linux-firmware branch:

SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')

So, it is really TF-A which seems to cause the issue.

Actually not TFA either (TFA complains correctly). we have an internal ticket that is in the middle of getting fixed for TIFS and PDK to enable this. a bit of history: A new api TISCI_MSG_QUERY_FW_CAPS[1] was introduced to help determine which version of firmware combination supports what features (such as Low power, etc). This allows for consistent TFA/Kernel implementation that can dynamically detect platforms (since LPM also involved a bit of firmware handshaking for board specific details - PMIC control and the like). This API is as fundamental as version message API that all firmware are supposed to implement. unfortunately the defconfig option for that API wasn't properly implemented for various firmware components correctly. - impacted chips are: j721e, j7200, j721s2/am68, j784s4/am69. Other K3 processor firmware have it implemented correctly. The latest 9.1.8--v09.01.08 has the bug as well - but hopefully should be fixed and released soon-ish.

[1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/general/core.html#tisci-msg-query-fw-caps

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#30 lore raw

On Fri, 2023-12-15 at 08:23 -0600, Nishanth Menon wrote:

[snip]

Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

What version of TIFS are you running? Not getting a response usually means firmware is dead or we're not using the right thread to talk.

Yeah, sorry. I was always running the latest from the ti-linux-firmware branch:

SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')

So, it is really TF-A which seems to cause the issue.

Quoted 15 lines

Actually not TFA either (TFA complains correctly). we have an internal ticket that is in the middle of getting fixed for TIFS and PDK to enable this. a bit of history: A new api TISCI_MSG_QUERY_FW_CAPS[1] was introduced to help determine which version of firmware combination supports what features (such as Low power, etc). This allows for consistent TFA/Kernel implementation that can dynamically detect platforms (since LPM also involved a bit of firmware handshaking for board specific details - PMIC control and the like). This API is as fundamental as version message API that all firmware are supposed to implement. unfortunately the defconfig option for that API wasn't properly implemented for various firmware components correctly. - impacted chips are: j721e, j7200, j721s2/am68, j784s4/am69. Other K3 processor firmware have it implemented correctly. The latest 9.1.8--v09.01.08 has the bug as well - but hopefully should be fixed and released soon-ish.

Thanks, Nishanth. Glad you guys are aware of this and I am not just seeing things (;-p).

Quoted 5 lines

[1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/general/core.html#tisci-msg-query-fw-caps
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

Cheers

Marcel

#31 lore raw
In reply to Marcel Ziswiler
Quoted 23 lines · Marcel Ziswiler

Hi Apurva

Thanks!

Quoted 4 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

For the whole series:

However, one thing I noticed is that with upstream TF-A I do get the following errors:

NOTICE:  BL31: v2.10.0  (release):v2.10.0-76-g02091541d
NOTICE:  BL31: Built : 18:13:08, Dec 14 2023
ERROR:   Failed to get response (-19)
ERROR:   Transfer send failed (-19)
ERROR:   Unable to query firmware capabilities (-19)

While with latest TF-A from downstream TI BSP (both 9.0 and 9.1 use the same versin) I do not get any errors:

Quoted 8 lines
NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3
NOTICE:  BL31: Built : 18:40:38, Dec 14 2023

Any idea?

Cheers

Marcel

thanks for pointing it out, I am looking into the bug, and will be fixed in next re-roll.

Quoted 237 lines
Quoted 237 lines

The J784S4 SoC device tree patches are taken from kernel patch submissions and will be updated as they are accepted and merged to the kernel tree. All other patches are specific to SPL and u-boot and do not have dependency on other trees. Appreciate a review for acceptance to u-boot tree.

Here are some of the salient features of the J784S4 automotive grade application processor:

The J784S4 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications.

Some highlights of this SoC are:
* Up to 8 Cortex-A72s, four clusters of lockstep capable dual Cortex-R5F MCUs, 4 C7x floating point vector DSPs with Matrix Multiply Accelerator(MMA) for deep learning and CNN.
* 3D GPU: Automotive grade IMG BXS-4-64 MC1
* Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC)
* Three CSI2.0 4L RX plus two CSI2.0 4L TX, two DSI Tx, one eDP/DP and one DPI interface.
* Integrated gigabit ethernet switch, up to 8 ports (TDA4VH), two ports support 10Gb USXGMII; Two 4 lane PCIe-GEN3 controllers, USB3.0 Dual-role device subsystems, Up to 20 MCANs, among other peripherals.

See J784S4 Technical Reference Manual (SPRUJ52 - JUNE 2022) for further details: http://www.ti.com/lit/zip/spruj52

In addtion, the J784S4 EVM board is designed for TI J784S4 SoC. It supports the following interfaces:
* 32 GB DDR4 RAM
* x2 Gigabit Ethernet interfaces capable of working in Switch and MAC mode
* x1 Input Audio Jack, x1 Output Audio Jack
* x1 USB2.0 Hub with two Type A host and x1 USB 3.1 Type-C Port
* x2 4L PCIe connector
* x1 UHS-1 capable micro-SD card slot
* 512 Mbit OSPI flash, 1 Gbit Octal NAND flash, 512 Mbit QSPI flash, UFS flash.
* x6 UART through UART-USB bridge
* XDS110 for onboard JTAG debug using USB
* Temperature sensors, user push buttons and LEDs
* 40-pin User Expansion Connector
* x2 ENET Expansion Connector, x1 GESI expander, x2 Display connector
* x1 15-pin CSI header
* x6 MCAN instances

Schematics: https://www.ti.com/lit/zip/sprr458

eMMC UDA moode bootlog:
https://gist.githubusercontent.com/apurvanandan1997/3cffada252d50a8aa0c00a91f1f2f856/raw/

Changes in v6:
1) Move bootph-all of memory node to u-boot.dtsi
2) Used a while loop for DRAM controller init, instead of hard-coding for 4 DRAM
3) Fixed build error by adding board/ti/j784s4/Kconfig
4) Trimmed out j784s4_evm.h
5) Fixed checkpatch warnings

Link to v5:
https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Changes in v5:
1) Incorporated Andrew Davis' "Move R5 specific code into new r5/ directory" and "Move board selection to mach-k3" series changes.
2) Incorporated Neha Francis' "Move to using templated FITs" series changes.
3) Synced device tree files with Linux v6.7-rc1
4) Changed ti_mmc to mmc1 target from bootstd
5) Updated doc based on review comments
6) Removed remoteproc support from the series
7) Splitted board files patch into smaller patches
8) Trimmed j784s4.env to necessary variables
9) Used fdtdec_setup_mem_size_base fdtdec_setup_memory_banksize in evm.c
10) Trimmed down evm.c to essential header files.
11) Switched to multi-dtb fit compilation with config fragments

Link to v4:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v4:
1) Cleaned up Copyright and SPDX identifiers
2) Synced the device trees to Linux v6.6-rc1 tag
3) Added cleanup patch for sorting SoC JTAG ID entries
4) Removed EEPROM board detect from evm.c and added am69 config fragments
5) Updated MAINTAINERS files and commit messages
6) Removed struct renaming in ti_k3_r5f_rproc driver

Link to v3:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v3:
1) Added AM69 SK support in the series
2) Switched from distroboot to bootstd support
3) Added remoteproc support for J784S4
4) Added documentation for both SoCs
5) Added binman support
6) Removed unnecessarry nodes from r5-evm.dts and evm-u-boot.dtsi
7) Added HS device support
8) Added env file for environement variables
9) Removed ti-serdes-mux bindings
10) Cleaned up all files and synced with latest
11) Addressed all previous review comments

Note: The base dts files have been sync from next-20230905 linux tag as per review comment received on previous re-roll:
https://lore.kernel.org/u-boot/20230321155227.GV8135@bill-the-cat/

Link to v2:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v2:
- Refactored environement scripts to 'j784s4.env' and removed scripts not needed for basic board bootup.
- Imported the J7874S4 basic device tree files from v6.2 linux kernel.
- Moved j784s4 clock definitions and clock data into one patch/commit.
- coalesce board commits into one commit.

Apurva Nandan (14):
  arm: dts: Introduce j784s4 dts from linux kernel
  arm: mach-k3: Add basic support for J784S4 SoC definition
  arm: mach-k3: Sort SoC JTAG_ID entries
  soc: ti: k3-socinfo: Add entry for J784S4 SoC
  arm: mach-k3: j784s4: Add clk and power support
  drivers: dma: Add support for J784S4 SoC
  board: ti: j784s4: Add board support for J784S4 EVM
  board: ti: j748s4: Add board config yaml files
  board: ti: j784s4: Add boot environment variables
  arm: dts: Introduce j784s4 u-boot dts files
  arm: dts: Add bootph-all for memory node
  configs: j784s4_evm: Add defconfig for j784s4 evm board
  doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation
  board: ti: j784s4: Add MAINTAINERS file

Dasnavis Sabiya (3):
  arm: dts: Introduce am69-sk dts from linux kernel
  arm: dts: Introduce am69-sk u-boot dts files
  configs: Add am69_sk_* defconfig fragments

  arch/arm/dts/Makefile                         |    4 +
  arch/arm/dts/k3-am69-r5-sk.dts                |  105 +
  arch/arm/dts/k3-am69-sk-u-boot.dtsi           |   31 +
  arch/arm/dts/k3-am69-sk.dts                   |  900 ++
  arch/arm/dts/k3-j784s4-binman.dtsi            |  435 +
  arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi  | 8757 ++++++++++++++++
  arch/arm/dts/k3-j784s4-ddr.dtsi               | 8858 +++++++++++++++++
  arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        |   31 +
  arch/arm/dts/k3-j784s4-evm.dts                |  981 ++
  arch/arm/dts/k3-j784s4-main.dtsi              | 2068 ++++
  arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi        |  743 ++
  arch/arm/dts/k3-j784s4-r5-evm.dts             |  105 +
  arch/arm/dts/k3-j784s4-thermal.dtsi           |  101 +
  arch/arm/dts/k3-j784s4.dtsi                   |  294 +
  arch/arm/mach-k3/Kconfig                      |   17 +-
  arch/arm/mach-k3/Makefile                     |    2 +
  arch/arm/mach-k3/arm64-mmu.c                  |   52 +
  arch/arm/mach-k3/include/mach/hardware.h      |   13 +-
  .../mach-k3/include/mach/j784s4_hardware.h    |   60 +
  arch/arm/mach-k3/include/mach/j784s4_spl.h    |   47 +
  arch/arm/mach-k3/include/mach/spl.h           |    4 +
  arch/arm/mach-k3/j784s4/Kconfig               |   35 +
  arch/arm/mach-k3/j784s4_fdt.c                 |   15 +
  arch/arm/mach-k3/j784s4_init.c                |  335 +
  arch/arm/mach-k3/r5/Makefile                  |    1 +
  arch/arm/mach-k3/r5/j784s4/Makefile           |    7 +
  arch/arm/mach-k3/r5/j784s4/clk-data.c         |  428 +
  arch/arm/mach-k3/r5/j784s4/dev-data.c         |   98 +
  board/ti/j784s4/Kconfig                       |   37 +
  board/ti/j784s4/MAINTAINERS                   |   25 +
  board/ti/j784s4/Makefile                      |    7 +
  board/ti/j784s4/board-cfg.yaml                |   37 +
  board/ti/j784s4/evm.c                         |   38 +
  board/ti/j784s4/j784s4.env                    |   18 +
  board/ti/j784s4/pm-cfg.yaml                   |   13 +
  board/ti/j784s4/rm-cfg.yaml                   | 3058 ++++++
  board/ti/j784s4/sec-cfg.yaml                  |  380 +
  board/ti/j784s4/tifs-rm-cfg.yaml              | 2656 +++++
  configs/am69_sk_a72.config                    |    3 +
  configs/am69_sk_r5.config                     |    3 +
  configs/j784s4_evm_a72_defconfig              |  180 +
  configs/j784s4_evm_r5_defconfig               |  163 +
  doc/board/ti/j784s4_evm.rst                   |  303 +
  doc/board/ti/k3.rst                           |    1 +
  drivers/clk/ti/clk-k3.c                       |    6 +
  drivers/dma/ti/Makefile                       |    1 +
  drivers/dma/ti/k3-psil-j784s4.c               |  166 +
  drivers/dma/ti/k3-psil-priv.h                 |    1 +
  drivers/dma/ti/k3-psil.c                      |    2 +
  drivers/firmware/ti_sci_static_data.h         |   34 +
  drivers/power/domain/ti-power-domain.c        |    6 +
  drivers/ram/Kconfig                           |    2 +-
  drivers/soc/soc_ti_k3.c                       |    3 +
  include/configs/j784s4_evm.h                  |   15 +
  include/k3-clk.h                              |    1 +
  include/k3-dev.h                              |    1 +
  56 files changed, 31675 insertions(+), 12 deletions(-)

 create mode 100644 arch/arm/dts/k3-am69-r5-sk.dts create mode 100644 arch/arm/dts/k3-am69-sk-u-boot.dtsi create mode 100644 arch/arm/dts/k3-am69-sk.dts
 create mode 100644 arch/arm/dts/k3-j784s4-binman.dtsi create mode 100644 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi create mode 100644 arch/arm/dts/k3-j784s4-ddr.dtsi create mode 100644 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi create mode 100644 arch/arm/dts/k3-j784s4-evm.dts create mode 100644 arch/arm/dts/k3-j784s4-main.dtsi create mode 100644 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi create mode 100644 arch/arm/dts/k3-j784s4-r5-evm.dts create mode 100644 arch/arm/dts/k3-j784s4-thermal.dtsi create mode 100644 arch/arm/dts/k3-j784s4.dtsi
 create mode 100644 arch/arm/mach-k3/include/mach/j784s4_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/j784s4_spl.h create mode 100644 arch/arm/mach-k3/j784s4/Kconfig create mode 100644 arch/arm/mach-k3/j784s4_fdt.c
 create mode 100644 arch/arm/mach-k3/j784s4_init.c create mode 100644 arch/arm/mach-k3/r5/j784s4/Makefile create mode 100644 arch/arm/mach-k3/r5/j784s4/clk-data.c create mode 100644 arch/arm/mach-k3/r5/j784s4/dev-data.c create mode 100644 board/ti/j784s4/Kconfig
 create mode 100644 board/ti/j784s4/MAINTAINERS
 create mode 100644 board/ti/j784s4/Makefile
 create mode 100644 board/ti/j784s4/board-cfg.yaml create mode 100644 board/ti/j784s4/evm.c
 create mode 100644 board/ti/j784s4/j784s4.env
 create mode 100644 board/ti/j784s4/pm-cfg.yaml
 create mode 100644 board/ti/j784s4/rm-cfg.yaml
 create mode 100644 board/ti/j784s4/sec-cfg.yaml
 create mode 100644 board/ti/j784s4/tifs-rm-cfg.yaml create mode 100644 configs/am69_sk_a72.config
 create mode 100644 configs/am69_sk_r5.config
 create mode 100644 configs/j784s4_evm_a72_defconfig create mode 100644 configs/j784s4_evm_r5_defconfig create mode 100644 doc/board/ti/j784s4_evm.rst
 create mode 100644 drivers/dma/ti/k3-psil-j784s4.c create mode 100644 include/configs/j784s4_evm.h

Signature · 3 lines
Thanks and regards,
Apurva Nandan,
Texas Instruments India.
Tested-by on the v6 series
#32 lore raw
In reply to Apurva Nandan

Hello Apurva,

Quoted 243 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

The J784S4 SoC device tree patches are taken from kernel patch submissions and will be updated as they are accepted and merged to the kernel tree. All other patches are specific to SPL and u-boot and do not have dependency on other trees. Appreciate a review for acceptance to u-boot tree.

Here are some of the salient features of the J784S4 automotive grade application processor:

The J784S4 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications.

Some highlights of this SoC are:
* Up to 8 Cortex-A72s, four clusters of lockstep capable dual Cortex-R5F MCUs, 4 C7x floating point vector DSPs with Matrix Multiply Accelerator(MMA) for deep learning and CNN.
* 3D GPU: Automotive grade IMG BXS-4-64 MC1
* Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC)
* Three CSI2.0 4L RX plus two CSI2.0 4L TX, two DSI Tx, one eDP/DP and one DPI interface.
* Integrated gigabit ethernet switch, up to 8 ports (TDA4VH), two ports support 10Gb USXGMII; Two 4 lane PCIe-GEN3 controllers, USB3.0 Dual-role device subsystems, Up to 20 MCANs, among other peripherals.

See J784S4 Technical Reference Manual (SPRUJ52 - JUNE 2022) for further details: http://www.ti.com/lit/zip/spruj52

In addtion, the J784S4 EVM board is designed for TI J784S4 SoC. It supports the following interfaces:
* 32 GB DDR4 RAM
* x2 Gigabit Ethernet interfaces capable of working in Switch and MAC mode
* x1 Input Audio Jack, x1 Output Audio Jack
* x1 USB2.0 Hub with two Type A host and x1 USB 3.1 Type-C Port
* x2 4L PCIe connector
* x1 UHS-1 capable micro-SD card slot
* 512 Mbit OSPI flash, 1 Gbit Octal NAND flash, 512 Mbit QSPI flash, UFS flash.
* x6 UART through UART-USB bridge
* XDS110 for onboard JTAG debug using USB
* Temperature sensors, user push buttons and LEDs
* 40-pin User Expansion Connector
* x2 ENET Expansion Connector, x1 GESI expander, x2 Display connector
* x1 15-pin CSI header
* x6 MCAN instances

Schematics: https://www.ti.com/lit/zip/sprr458

eMMC UDA moode bootlog: https://gist.githubusercontent.com/apurvanandan1997/3cffada252d50a8aa0c00a91f1f2f856/raw/

Changes in v6:
1) Move bootph-all of memory node to u-boot.dtsi
2) Used a while loop for DRAM controller init, instead of hard-coding for 4 DRAM
3) Fixed build error by adding board/ti/j784s4/Kconfig
4) Trimmed out j784s4_evm.h
5) Fixed checkpatch warnings

Link to v5:
https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Changes in v5:
1) Incorporated Andrew Davis' "Move R5 specific code into new r5/ directory" and "Move board selection to mach-k3" series changes.
2) Incorporated Neha Francis' "Move to using templated FITs" series changes.
3) Synced device tree files with Linux v6.7-rc1
4) Changed ti_mmc to mmc1 target from bootstd
5) Updated doc based on review comments
6) Removed remoteproc support from the series
7) Splitted board files patch into smaller patches
8) Trimmed j784s4.env to necessary variables
9) Used fdtdec_setup_mem_size_base fdtdec_setup_memory_banksize in evm.c
10) Trimmed down evm.c to essential header files.
11) Switched to multi-dtb fit compilation with config fragments

Link to v4:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v4:
1) Cleaned up Copyright and SPDX identifiers
2) Synced the device trees to Linux v6.6-rc1 tag
3) Added cleanup patch for sorting SoC JTAG ID entries
4) Removed EEPROM board detect from evm.c and added am69 config fragments
5) Updated MAINTAINERS files and commit messages
6) Removed struct renaming in ti_k3_r5f_rproc driver

Link to v3:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v3:
1) Added AM69 SK support in the series
2) Switched from distroboot to bootstd support
3) Added remoteproc support for J784S4
4) Added documentation for both SoCs
5) Added binman support
6) Removed unnecessarry nodes from r5-evm.dts and evm-u-boot.dtsi
7) Added HS device support
8) Added env file for environement variables
9) Removed ti-serdes-mux bindings
10) Cleaned up all files and synced with latest
11) Addressed all previous review comments

Note: The base dts files have been sync from next-20230905 linux tag as per review comment received on previous re-roll:
https://lore.kernel.org/u-boot/20230321155227.GV8135@bill-the-cat/

Link to v2:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v2:
- Refactored environement scripts to 'j784s4.env' and removed scripts not needed for basic board bootup.
- Imported the J7874S4 basic device tree files from v6.2 linux kernel.
- Moved j784s4 clock definitions and clock data into one patch/commit.
- coalesce board commits into one commit.

Apurva Nandan (14):
arm: dts: Introduce j784s4 dts from linux kernel
arm: mach-k3: Add basic support for J784S4 SoC definition
arm: mach-k3: Sort SoC JTAG_ID entries
soc: ti: k3-socinfo: Add entry for J784S4 SoC
arm: mach-k3: j784s4: Add clk and power support
drivers: dma: Add support for J784S4 SoC
board: ti: j784s4: Add board support for J784S4 EVM
board: ti: j748s4: Add board config yaml files
board: ti: j784s4: Add boot environment variables
arm: dts: Introduce j784s4 u-boot dts files
arm: dts: Add bootph-all for memory node
configs: j784s4_evm: Add defconfig for j784s4 evm board
doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation
board: ti: j784s4: Add MAINTAINERS file

Dasnavis Sabiya (3):
arm: dts: Introduce am69-sk dts from linux kernel
arm: dts: Introduce am69-sk u-boot dts files
configs: Add am69_sk_* defconfig fragments

 arch/arm/dts/Makefile                         |    4 +
 arch/arm/dts/k3-am69-r5-sk.dts                |  105 +
 arch/arm/dts/k3-am69-sk-u-boot.dtsi           |   31 +
 arch/arm/dts/k3-am69-sk.dts                   |  900 ++
 arch/arm/dts/k3-j784s4-binman.dtsi            |  435 +
 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi  | 8757 ++++++++++++++++
 arch/arm/dts/k3-j784s4-ddr.dtsi               | 8858 +++++++++++++++++
 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        |   31 +
 arch/arm/dts/k3-j784s4-evm.dts                |  981 ++
 arch/arm/dts/k3-j784s4-main.dtsi              | 2068 ++++
 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi        |  743 ++
 arch/arm/dts/k3-j784s4-r5-evm.dts             |  105 +
 arch/arm/dts/k3-j784s4-thermal.dtsi           |  101 +
 arch/arm/dts/k3-j784s4.dtsi                   |  294 +
 arch/arm/mach-k3/Kconfig                      |   17 +-
 arch/arm/mach-k3/Makefile                     |    2 +
 arch/arm/mach-k3/arm64-mmu.c                  |   52 +
 arch/arm/mach-k3/include/mach/hardware.h      |   13 +-
 .../mach-k3/include/mach/j784s4_hardware.h    |   60 +
 arch/arm/mach-k3/include/mach/j784s4_spl.h    |   47 +
 arch/arm/mach-k3/include/mach/spl.h           |    4 +
 arch/arm/mach-k3/j784s4/Kconfig               |   35 +
 arch/arm/mach-k3/j784s4_fdt.c                 |   15 +
 arch/arm/mach-k3/j784s4_init.c                |  335 +
 arch/arm/mach-k3/r5/Makefile                  |    1 +
 arch/arm/mach-k3/r5/j784s4/Makefile           |    7 +
 arch/arm/mach-k3/r5/j784s4/clk-data.c         |  428 +
 arch/arm/mach-k3/r5/j784s4/dev-data.c         |   98 +
 board/ti/j784s4/Kconfig                       |   37 +
 board/ti/j784s4/MAINTAINERS                   |   25 +
 board/ti/j784s4/Makefile                      |    7 +
 board/ti/j784s4/board-cfg.yaml                |   37 +
 board/ti/j784s4/evm.c                         |   38 +
 board/ti/j784s4/j784s4.env                    |   18 +
 board/ti/j784s4/pm-cfg.yaml                   |   13 +
 board/ti/j784s4/rm-cfg.yaml                   | 3058 ++++++
 board/ti/j784s4/sec-cfg.yaml                  |  380 +
 board/ti/j784s4/tifs-rm-cfg.yaml              | 2656 +++++
 configs/am69_sk_a72.config                    |    3 +
 configs/am69_sk_r5.config                     |    3 +
 configs/j784s4_evm_a72_defconfig              |  180 +
 configs/j784s4_evm_r5_defconfig               |  163 +
 doc/board/ti/j784s4_evm.rst                   |  303 +
 doc/board/ti/k3.rst                           |    1 +
 drivers/clk/ti/clk-k3.c                       |    6 +
 drivers/dma/ti/Makefile                       |    1 +
 drivers/dma/ti/k3-psil-j784s4.c               |  166 +
 drivers/dma/ti/k3-psil-priv.h                 |    1 +
 drivers/dma/ti/k3-psil.c                      |    2 +
 drivers/firmware/ti_sci_static_data.h         |   34 +
 drivers/power/domain/ti-power-domain.c        |    6 +
 drivers/ram/Kconfig                           |    2 +-
 drivers/soc/soc_ti_k3.c                       |    3 +
 include/configs/j784s4_evm.h                  |   15 +
 include/k3-clk.h                              |    1 +
 include/k3-dev.h                              |    1 +
 56 files changed, 31675 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/dts/k3-am69-r5-sk.dts
 create mode 100644 arch/arm/dts/k3-am69-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-am69-sk.dts
 create mode 100644 arch/arm/dts/k3-j784s4-binman.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-ddr.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-evm.dts
 create mode 100644 arch/arm/dts/k3-j784s4-main.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4-r5-evm.dts
 create mode 100644 arch/arm/dts/k3-j784s4-thermal.dtsi
 create mode 100644 arch/arm/dts/k3-j784s4.dtsi
 create mode 100644 arch/arm/mach-k3/include/mach/j784s4_hardware.h
 create mode 100644 arch/arm/mach-k3/include/mach/j784s4_spl.h
 create mode 100644 arch/arm/mach-k3/j784s4/Kconfig
 create mode 100644 arch/arm/mach-k3/j784s4_fdt.c
 create mode 100644 arch/arm/mach-k3/j784s4_init.c
 create mode 100644 arch/arm/mach-k3/r5/j784s4/Makefile
 create mode 100644 arch/arm/mach-k3/r5/j784s4/clk-data.c
 create mode 100644 arch/arm/mach-k3/r5/j784s4/dev-data.c
 create mode 100644 board/ti/j784s4/Kconfig
 create mode 100644 board/ti/j784s4/MAINTAINERS
 create mode 100644 board/ti/j784s4/Makefile
 create mode 100644 board/ti/j784s4/board-cfg.yaml
 create mode 100644 board/ti/j784s4/evm.c
 create mode 100644 board/ti/j784s4/j784s4.env
 create mode 100644 board/ti/j784s4/pm-cfg.yaml
 create mode 100644 board/ti/j784s4/rm-cfg.yaml
 create mode 100644 board/ti/j784s4/sec-cfg.yaml
 create mode 100644 board/ti/j784s4/tifs-rm-cfg.yaml
 create mode 100644 configs/am69_sk_a72.config
 create mode 100644 configs/am69_sk_r5.config
 create mode 100644 configs/j784s4_evm_a72_defconfig
 create mode 100644 configs/j784s4_evm_r5_defconfig
 create mode 100644 doc/board/ti/j784s4_evm.rst
 create mode 100644 drivers/dma/ti/k3-psil-j784s4.c
 create mode 100644 include/configs/j784s4_evm.h
Quoted 3 lines

--
2.34.1

Thanks for sending these patches, this has been tested against AM69-SK board, so for the full series you can also add:

While here, it would be really nice if you can send the required firmware (ti-sysfw and ti-dm if I'm not mistaken) to linux-firmware.

Thanks,
Enric

#33 lore raw
Quoted 252 lines · Enric Balletbo i Serra

Hello Apurva,

Quoted 242 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

The J784S4 SoC device tree patches are taken from kernel patch submissions and will be updated as they are accepted and merged to the kernel tree. All other patches are specific to SPL and u-boot and do not have dependency on other trees. Appreciate a review for acceptance to u-boot tree.

Here are some of the salient features of the J784S4 automotive grade application processor:

The J784S4 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications.

Some highlights of this SoC are:
* Up to 8 Cortex-A72s, four clusters of lockstep capable dual Cortex-R5F MCUs, 4 C7x floating point vector DSPs with Matrix Multiply Accelerator(MMA) for deep learning and CNN.
* 3D GPU: Automotive grade IMG BXS-4-64 MC1
* Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC)
* Three CSI2.0 4L RX plus two CSI2.0 4L TX, two DSI Tx, one eDP/DP and one DPI interface.
* Integrated gigabit ethernet switch, up to 8 ports (TDA4VH), two ports support 10Gb USXGMII; Two 4 lane PCIe-GEN3 controllers, USB3.0 Dual-role device subsystems, Up to 20 MCANs, among other peripherals.

See J784S4 Technical Reference Manual (SPRUJ52 - JUNE 2022) for further details: http://www.ti.com/lit/zip/spruj52

In addtion, the J784S4 EVM board is designed for TI J784S4 SoC. It supports the following interfaces:
* 32 GB DDR4 RAM
* x2 Gigabit Ethernet interfaces capable of working in Switch and MAC mode
* x1 Input Audio Jack, x1 Output Audio Jack
* x1 USB2.0 Hub with two Type A host and x1 USB 3.1 Type-C Port
* x2 4L PCIe connector
* x1 UHS-1 capable micro-SD card slot
* 512 Mbit OSPI flash, 1 Gbit Octal NAND flash, 512 Mbit QSPI flash, UFS flash.
* x6 UART through UART-USB bridge
* XDS110 for onboard JTAG debug using USB
* Temperature sensors, user push buttons and LEDs
* 40-pin User Expansion Connector
* x2 ENET Expansion Connector, x1 GESI expander, x2 Display connector
* x1 15-pin CSI header
* x6 MCAN instances

Schematics: https://www.ti.com/lit/zip/sprr458

eMMC UDA moode bootlog: https://gist.githubusercontent.com/apurvanandan1997/3cffada252d50a8aa0c00a91f1f2f856/raw/

Changes in v6:
1) Move bootph-all of memory node to u-boot.dtsi
2) Used a while loop for DRAM controller init, instead of hard-coding for 4 DRAM
3) Fixed build error by adding board/ti/j784s4/Kconfig
4) Trimmed out j784s4_evm.h
5) Fixed checkpatch warnings

Link to v5:
https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Changes in v5:
1) Incorporated Andrew Davis' "Move R5 specific code into new r5/ directory" and "Move board selection to mach-k3" series changes.
2) Incorporated Neha Francis' "Move to using templated FITs" series changes.
3) Synced device tree files with Linux v6.7-rc1
4) Changed ti_mmc to mmc1 target from bootstd
5) Updated doc based on review comments
6) Removed remoteproc support from the series
7) Splitted board files patch into smaller patches
8) Trimmed j784s4.env to necessary variables
9) Used fdtdec_setup_mem_size_base fdtdec_setup_memory_banksize in evm.c
10) Trimmed down evm.c to essential header files.
11) Switched to multi-dtb fit compilation with config fragments

Link to v4:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v4:
1) Cleaned up Copyright and SPDX identifiers
2) Synced the device trees to Linux v6.6-rc1 tag
3) Added cleanup patch for sorting SoC JTAG ID entries
4) Removed EEPROM board detect from evm.c and added am69 config fragments
5) Updated MAINTAINERS files and commit messages
6) Removed struct renaming in ti_k3_r5f_rproc driver

Link to v3:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v3:
1) Added AM69 SK support in the series
2) Switched from distroboot to bootstd support
3) Added remoteproc support for J784S4
4) Added documentation for both SoCs
5) Added binman support
6) Removed unnecessarry nodes from r5-evm.dts and evm-u-boot.dtsi
7) Added HS device support
8) Added env file for environement variables
9) Removed ti-serdes-mux bindings
10) Cleaned up all files and synced with latest
11) Addressed all previous review comments

Note: The base dts files have been sync from next-20230905 linux tag as per review comment received on previous re-roll:
https://lore.kernel.org/u-boot/20230321155227.GV8135@bill-the-cat/

Link to v2:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v2:
- Refactored environement scripts to 'j784s4.env' and removed scripts not needed for basic board bootup.
- Imported the J7874S4 basic device tree files from v6.2 linux kernel.
- Moved j784s4 clock definitions and clock data into one patch/commit.
- coalesce board commits into one commit.

Apurva Nandan (14):
arm: dts: Introduce j784s4 dts from linux kernel
arm: mach-k3: Add basic support for J784S4 SoC definition
arm: mach-k3: Sort SoC JTAG_ID entries
soc: ti: k3-socinfo: Add entry for J784S4 SoC
arm: mach-k3: j784s4: Add clk and power support
drivers: dma: Add support for J784S4 SoC
board: ti: j784s4: Add board support for J784S4 EVM
board: ti: j748s4: Add board config yaml files
board: ti: j784s4: Add boot environment variables
arm: dts: Introduce j784s4 u-boot dts files
arm: dts: Add bootph-all for memory node
configs: j784s4_evm: Add defconfig for j784s4 evm board
doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation
board: ti: j784s4: Add MAINTAINERS file

Dasnavis Sabiya (3):
arm: dts: Introduce am69-sk dts from linux kernel
arm: dts: Introduce am69-sk u-boot dts files
configs: Add am69_sk_* defconfig fragments

  arch/arm/dts/Makefile                         |    4 +
  arch/arm/dts/k3-am69-r5-sk.dts                |  105 +
  arch/arm/dts/k3-am69-sk-u-boot.dtsi           |   31 +
  arch/arm/dts/k3-am69-sk.dts                   |  900 ++
  arch/arm/dts/k3-j784s4-binman.dtsi            |  435 +
  arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi  | 8757 ++++++++++++++++
  arch/arm/dts/k3-j784s4-ddr.dtsi               | 8858 +++++++++++++++++
  arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        |   31 +
  arch/arm/dts/k3-j784s4-evm.dts                |  981 ++
  arch/arm/dts/k3-j784s4-main.dtsi              | 2068 ++++
  arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi        |  743 ++
  arch/arm/dts/k3-j784s4-r5-evm.dts             |  105 +
  arch/arm/dts/k3-j784s4-thermal.dtsi           |  101 +
  arch/arm/dts/k3-j784s4.dtsi                   |  294 +
  arch/arm/mach-k3/Kconfig                      |   17 +-
  arch/arm/mach-k3/Makefile                     |    2 +
  arch/arm/mach-k3/arm64-mmu.c                  |   52 +
  arch/arm/mach-k3/include/mach/hardware.h      |   13 +-
  .../mach-k3/include/mach/j784s4_hardware.h    |   60 +
  arch/arm/mach-k3/include/mach/j784s4_spl.h    |   47 +
  arch/arm/mach-k3/include/mach/spl.h           |    4 +
  arch/arm/mach-k3/j784s4/Kconfig               |   35 +
  arch/arm/mach-k3/j784s4_fdt.c                 |   15 +
  arch/arm/mach-k3/j784s4_init.c                |  335 +
  arch/arm/mach-k3/r5/Makefile                  |    1 +
  arch/arm/mach-k3/r5/j784s4/Makefile           |    7 +
  arch/arm/mach-k3/r5/j784s4/clk-data.c         |  428 +
  arch/arm/mach-k3/r5/j784s4/dev-data.c         |   98 +
  board/ti/j784s4/Kconfig                       |   37 +
  board/ti/j784s4/MAINTAINERS                   |   25 +
  board/ti/j784s4/Makefile                      |    7 +
  board/ti/j784s4/board-cfg.yaml                |   37 +
  board/ti/j784s4/evm.c                         |   38 +
  board/ti/j784s4/j784s4.env                    |   18 +
  board/ti/j784s4/pm-cfg.yaml                   |   13 +
  board/ti/j784s4/rm-cfg.yaml                   | 3058 ++++++
  board/ti/j784s4/sec-cfg.yaml                  |  380 +
  board/ti/j784s4/tifs-rm-cfg.yaml              | 2656 +++++
  configs/am69_sk_a72.config                    |    3 +
  configs/am69_sk_r5.config                     |    3 +
  configs/j784s4_evm_a72_defconfig              |  180 +
  configs/j784s4_evm_r5_defconfig               |  163 +
  doc/board/ti/j784s4_evm.rst                   |  303 +
  doc/board/ti/k3.rst                           |    1 +
  drivers/clk/ti/clk-k3.c                       |    6 +
  drivers/dma/ti/Makefile                       |    1 +
  drivers/dma/ti/k3-psil-j784s4.c               |  166 +
  drivers/dma/ti/k3-psil-priv.h                 |    1 +
  drivers/dma/ti/k3-psil.c                      |    2 +
  drivers/firmware/ti_sci_static_data.h         |   34 +
  drivers/power/domain/ti-power-domain.c        |    6 +
  drivers/ram/Kconfig                           |    2 +-
  drivers/soc/soc_ti_k3.c                       |    3 +
  include/configs/j784s4_evm.h                  |   15 +
  include/k3-clk.h                              |    1 +
  include/k3-dev.h                              |    1 +
  56 files changed, 31675 insertions(+), 12 deletions(-)

create mode 100644 arch/arm/dts/k3-am69-r5-sk.dts create mode 100644 arch/arm/dts/k3-am69-sk-u-boot.dtsi create mode 100644 arch/arm/dts/k3-am69-sk.dts
create mode 100644 arch/arm/dts/k3-j784s4-binman.dtsi create mode 100644 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi create mode 100644 arch/arm/dts/k3-j784s4-ddr.dtsi create mode 100644 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi create mode 100644 arch/arm/dts/k3-j784s4-evm.dts create mode 100644 arch/arm/dts/k3-j784s4-main.dtsi create mode 100644 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi create mode 100644 arch/arm/dts/k3-j784s4-r5-evm.dts create mode 100644 arch/arm/dts/k3-j784s4-thermal.dtsi create mode 100644 arch/arm/dts/k3-j784s4.dtsi
create mode 100644 arch/arm/mach-k3/include/mach/j784s4_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/j784s4_spl.h create mode 100644 arch/arm/mach-k3/j784s4/Kconfig create mode 100644 arch/arm/mach-k3/j784s4_fdt.c
create mode 100644 arch/arm/mach-k3/j784s4_init.c create mode 100644 arch/arm/mach-k3/r5/j784s4/Makefile create mode 100644 arch/arm/mach-k3/r5/j784s4/clk-data.c create mode 100644 arch/arm/mach-k3/r5/j784s4/dev-data.c create mode 100644 board/ti/j784s4/Kconfig
create mode 100644 board/ti/j784s4/MAINTAINERS
create mode 100644 board/ti/j784s4/Makefile
create mode 100644 board/ti/j784s4/board-cfg.yaml create mode 100644 board/ti/j784s4/evm.c
create mode 100644 board/ti/j784s4/j784s4.env
create mode 100644 board/ti/j784s4/pm-cfg.yaml
create mode 100644 board/ti/j784s4/rm-cfg.yaml
create mode 100644 board/ti/j784s4/sec-cfg.yaml
create mode 100644 board/ti/j784s4/tifs-rm-cfg.yaml create mode 100644 configs/am69_sk_a72.config
create mode 100644 configs/am69_sk_r5.config
create mode 100644 configs/j784s4_evm_a72_defconfig create mode 100644 configs/j784s4_evm_r5_defconfig create mode 100644 doc/board/ti/j784s4_evm.rst
create mode 100644 drivers/dma/ti/k3-psil-j784s4.c create mode 100644 include/configs/j784s4_evm.h

Quoted 3 lines

--
2.34.1

Thanks for sending these patches, this has been tested against AM69-SK board, so for the full series you can also add:

Quoted 8 lines

While here, it would be really nice if you can send the required firmware (ti-sysfw and ti-dm if I'm not mistaken) to linux-firmware.

Thanks,
Enric

Okay, sure will send firmware also. Thanks for the tested-by.

Signature · 3 lines
Thanks and regards,
Apurva Nandan,
Texas Instruments India.
#34 lore raw
Quoted 259 lines · Apurva Nandan
Quoted 257 lines · Enric Balletbo i Serra

Hello Apurva,

Quoted 236 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

The J784S4 SoC device tree patches are taken from kernel patch submissions and will be updated as they are accepted and merged to the kernel tree. All other patches are specific to SPL and u-boot and do not have dependency on other trees. Appreciate a review for acceptance to u-boot tree.

Here are some of the salient features of the J784S4 automotive grade application processor:

The J784S4 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications.

Some highlights of this SoC are:
* Up to 8 Cortex-A72s, four clusters of lockstep capable dual Cortex-R5F MCUs, 4 C7x floating point vector DSPs with Matrix Multiply Accelerator(MMA) for deep learning and CNN.
* 3D GPU: Automotive grade IMG BXS-4-64 MC1
* Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC)
* Three CSI2.0 4L RX plus two CSI2.0 4L TX, two DSI Tx, one eDP/DP and one DPI interface.
* Integrated gigabit ethernet switch, up to 8 ports (TDA4VH), two ports support 10Gb USXGMII; Two 4 lane PCIe-GEN3 controllers, USB3.0 Dual-role device subsystems, Up to 20 MCANs, among other peripherals.

See J784S4 Technical Reference Manual (SPRUJ52 - JUNE 2022) for further details: http://www.ti.com/lit/zip/spruj52

In addtion, the J784S4 EVM board is designed for TI J784S4 SoC. It supports the following interfaces:
* 32 GB DDR4 RAM
* x2 Gigabit Ethernet interfaces capable of working in Switch and MAC mode
* x1 Input Audio Jack, x1 Output Audio Jack
* x1 USB2.0 Hub with two Type A host and x1 USB 3.1 Type-C Port
* x2 4L PCIe connector
* x1 UHS-1 capable micro-SD card slot
* 512 Mbit OSPI flash, 1 Gbit Octal NAND flash, 512 Mbit QSPI flash, UFS flash.
* x6 UART through UART-USB bridge
* XDS110 for onboard JTAG debug using USB
* Temperature sensors, user push buttons and LEDs
* 40-pin User Expansion Connector
* x2 ENET Expansion Connector, x1 GESI expander, x2 Display connector
* x1 15-pin CSI header
* x6 MCAN instances

Schematics: https://www.ti.com/lit/zip/sprr458

eMMC UDA moode bootlog: https://gist.githubusercontent.com/apurvanandan1997/3cffada252d50a8aa0c00a91f1f2f856/raw/

Changes in v6:
1) Move bootph-all of memory node to u-boot.dtsi
2) Used a while loop for DRAM controller init, instead of hard-coding for 4 DRAM
3) Fixed build error by adding board/ti/j784s4/Kconfig
4) Trimmed out j784s4_evm.h
5) Fixed checkpatch warnings

Link to v5:
https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Changes in v5:
1) Incorporated Andrew Davis' "Move R5 specific code into new r5/ directory" and "Move board selection to mach-k3" series changes.
2) Incorporated Neha Francis' "Move to using templated FITs" series changes.
3) Synced device tree files with Linux v6.7-rc1
4) Changed ti_mmc to mmc1 target from bootstd
5) Updated doc based on review comments
6) Removed remoteproc support from the series
7) Splitted board files patch into smaller patches
8) Trimmed j784s4.env to necessary variables
9) Used fdtdec_setup_mem_size_base fdtdec_setup_memory_banksize in evm.c
10) Trimmed down evm.c to essential header files.
11) Switched to multi-dtb fit compilation with config fragments

Link to v4:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v4:
1) Cleaned up Copyright and SPDX identifiers
2) Synced the device trees to Linux v6.6-rc1 tag
3) Added cleanup patch for sorting SoC JTAG ID entries
4) Removed EEPROM board detect from evm.c and added am69 config fragments
5) Updated MAINTAINERS files and commit messages
6) Removed struct renaming in ti_k3_r5f_rproc driver

Link to v3:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v3:
1) Added AM69 SK support in the series
2) Switched from distroboot to bootstd support
3) Added remoteproc support for J784S4
4) Added documentation for both SoCs
5) Added binman support
6) Removed unnecessarry nodes from r5-evm.dts and evm-u-boot.dtsi
7) Added HS device support
8) Added env file for environement variables
9) Removed ti-serdes-mux bindings
10) Cleaned up all files and synced with latest
11) Addressed all previous review comments

Note: The base dts files have been sync from next-20230905 linux tag as per review comment received on previous re-roll:
https://lore.kernel.org/u-boot/20230321155227.GV8135@bill-the-cat/

Link to v2:
https://lore.kernel.org/u-boot/[email protected]/

Changes in v2:
- Refactored environement scripts to 'j784s4.env' and removed scripts not
   needed for basic board bootup.
- Imported the J7874S4 basic device tree files from v6.2 linux kernel.
- Moved j784s4 clock definitions and clock data into one patch/commit.
- coalesce board commits into one commit.

Apurva Nandan (14):
   arm: dts: Introduce j784s4 dts from linux kernel
   arm: mach-k3: Add basic support for J784S4 SoC definition
   arm: mach-k3: Sort SoC JTAG_ID entries
   soc: ti: k3-socinfo: Add entry for J784S4 SoC
   arm: mach-k3: j784s4: Add clk and power support
   drivers: dma: Add support for J784S4 SoC
   board: ti: j784s4: Add board support for J784S4 EVM
   board: ti: j748s4: Add board config yaml files
   board: ti: j784s4: Add boot environment variables
   arm: dts: Introduce j784s4 u-boot dts files
   arm: dts: Add bootph-all for memory node
   configs: j784s4_evm: Add defconfig for j784s4 evm board
   doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation
   board: ti: j784s4: Add MAINTAINERS file

Dasnavis Sabiya (3):
   arm: dts: Introduce am69-sk dts from linux kernel
   arm: dts: Introduce am69-sk u-boot dts files
   configs: Add am69_sk_* defconfig fragments

  arch/arm/dts/Makefile                         |    4 + arch/arm/dts/k3-am69-r5-sk.dts                |  105 + arch/arm/dts/k3-am69-sk-u-boot.dtsi           |   31 + arch/arm/dts/k3-am69-sk.dts                   |  900 ++ arch/arm/dts/k3-j784s4-binman.dtsi            |  435 + arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi  | 8757 ++++++++++++++++ arch/arm/dts/k3-j784s4-ddr.dtsi               | 8858
+++++++++++++++++
  arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        |   31 + arch/arm/dts/k3-j784s4-evm.dts                |  981 ++ arch/arm/dts/k3-j784s4-main.dtsi              | 2068 ++++ arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi        |  743 ++ arch/arm/dts/k3-j784s4-r5-evm.dts             |  105 + arch/arm/dts/k3-j784s4-thermal.dtsi           |  101 + arch/arm/dts/k3-j784s4.dtsi                   |  294 + arch/arm/mach-k3/Kconfig                      |   17 +- arch/arm/mach-k3/Makefile                     |    2 + arch/arm/mach-k3/arm64-mmu.c                  |   52 + arch/arm/mach-k3/include/mach/hardware.h      |   13 +- .../mach-k3/include/mach/j784s4_hardware.h    |   60 + arch/arm/mach-k3/include/mach/j784s4_spl.h    |   47 + arch/arm/mach-k3/include/mach/spl.h           |    4 + arch/arm/mach-k3/j784s4/Kconfig               |   35 + arch/arm/mach-k3/j784s4_fdt.c                 |   15 + arch/arm/mach-k3/j784s4_init.c                |  335 + arch/arm/mach-k3/r5/Makefile                  |    1 + arch/arm/mach-k3/r5/j784s4/Makefile           |    7 + arch/arm/mach-k3/r5/j784s4/clk-data.c         |  428 + arch/arm/mach-k3/r5/j784s4/dev-data.c         |   98 + board/ti/j784s4/Kconfig                       |   37 + board/ti/j784s4/MAINTAINERS                   |   25 + board/ti/j784s4/Makefile                      |    7 + board/ti/j784s4/board-cfg.yaml                |   37 + board/ti/j784s4/evm.c                         |   38 + board/ti/j784s4/j784s4.env                    |   18 + board/ti/j784s4/pm-cfg.yaml                   |   13 + board/ti/j784s4/rm-cfg.yaml                   | 3058 ++++++ board/ti/j784s4/sec-cfg.yaml                  |  380 + board/ti/j784s4/tifs-rm-cfg.yaml              | 2656 +++++ configs/am69_sk_a72.config                    |    3 + configs/am69_sk_r5.config                     |    3 + configs/j784s4_evm_a72_defconfig              |  180 + configs/j784s4_evm_r5_defconfig               |  163 + doc/board/ti/j784s4_evm.rst                   |  303 + doc/board/ti/k3.rst                           |    1 + drivers/clk/ti/clk-k3.c                       |    6 + drivers/dma/ti/Makefile                       |    1 + drivers/dma/ti/k3-psil-j784s4.c               |  166 + drivers/dma/ti/k3-psil-priv.h                 |    1 + drivers/dma/ti/k3-psil.c                      |    2 + drivers/firmware/ti_sci_static_data.h         |   34 + drivers/power/domain/ti-power-domain.c        |    6 + drivers/ram/Kconfig                           |    2 +- drivers/soc/soc_ti_k3.c                       |    3 + include/configs/j784s4_evm.h                  |   15 + include/k3-clk.h                              |    1 + include/k3-dev.h                              |    1 +

  56 files changed, 31675 insertions(+), 12 deletions(-)

  create mode 100644 arch/arm/dts/k3-am69-r5-sk.dts create mode 100644 arch/arm/dts/k3-am69-sk-u-boot.dtsi create mode 100644 arch/arm/dts/k3-am69-sk.dts
  create mode 100644 arch/arm/dts/k3-j784s4-binman.dtsi create mode 100644 arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi create mode 100644 arch/arm/dts/k3-j784s4-ddr.dtsi create mode 100644 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi create mode 100644 arch/arm/dts/k3-j784s4-evm.dts create mode 100644 arch/arm/dts/k3-j784s4-main.dtsi create mode 100644 arch/arm/dts/k3-j784s4-mcu-wakeup.dtsi create mode 100644 arch/arm/dts/k3-j784s4-r5-evm.dts create mode 100644 arch/arm/dts/k3-j784s4-thermal.dtsi create mode 100644 arch/arm/dts/k3-j784s4.dtsi
  create mode 100644 arch/arm/mach-k3/include/mach/j784s4_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/j784s4_spl.h create mode 100644 arch/arm/mach-k3/j784s4/Kconfig create mode 100644 arch/arm/mach-k3/j784s4_fdt.c
  create mode 100644 arch/arm/mach-k3/j784s4_init.c create mode 100644 arch/arm/mach-k3/r5/j784s4/Makefile create mode 100644 arch/arm/mach-k3/r5/j784s4/clk-data.c create mode 100644 arch/arm/mach-k3/r5/j784s4/dev-data.c create mode 100644 board/ti/j784s4/Kconfig
  create mode 100644 board/ti/j784s4/MAINTAINERS
  create mode 100644 board/ti/j784s4/Makefile
  create mode 100644 board/ti/j784s4/board-cfg.yaml create mode 100644 board/ti/j784s4/evm.c
  create mode 100644 board/ti/j784s4/j784s4.env
  create mode 100644 board/ti/j784s4/pm-cfg.yaml
  create mode 100644 board/ti/j784s4/rm-cfg.yaml
  create mode 100644 board/ti/j784s4/sec-cfg.yaml

Quoted 12 lines

  create mode 100644 board/ti/j784s4/tifs-rm-cfg.yaml create mode 100644 configs/am69_sk_a72.config create mode 100644 configs/am69_sk_r5.config create mode 100644 configs/j784s4_evm_a72_defconfig create mode 100644 configs/j784s4_evm_r5_defconfig create mode 100644 doc/board/ti/j784s4_evm.rst create mode 100644 drivers/dma/ti/k3-psil-j784s4.c create mode 100644 include/configs/j784s4_evm.h

Signature · 1 line
2.34.1

Thanks for sending these patches, this has been tested against AM69-SK board, so for the full series you can also add:

Quoted 8 lines
Quoted 6 lines

While here, it would be really nice if you can send the required firmware (ti-sysfw and ti-dm if I'm not mistaken) to linux-firmware.

Thanks,
   Enric

Okay, sure will send firmware also. Thanks for the tested-by.

We will work on upstreaming the firmwares to linux-firmware, in the meantime you
can use firmwares from ti-linux-firmware: https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/

Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
#35 lore raw
In reply to Apurva Nandan
Quoted 10 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

The J784S4 SoC device tree patches are taken from kernel patch submissions and will be updated as they are accepted and merged to the kernel tree. All other patches are specific to SPL and u-boot and do not have dependency on other trees. Appreciate a review for acceptance to u-boot tree.

Please rebase this on top of current -next as it doesn't apply / build, thanks.

Signature · 1 line
Tom
#36 lore raw
Quoted 7 lines · Tom Rini
Quoted 5 lines · Apurva Nandan

Hello Everyone!

This series will introduce basic support (SD and UART) support for Texas Instruments J784S4 EVM.

Quoted 7 lines
Quoted 5 lines

The J784S4 SoC device tree patches are taken from kernel patch submissions and will be updated as they are accepted and merged to the kernel tree. All other patches are specific to SPL and u-boot and do not have dependency on other trees. Appreciate a review for acceptance to u-boot tree.

Please rebase this on top of current -next as it doesn't apply / build, thanks.

Okay, sent it. Thanks!

Signature · 3 lines
Thanks and regards,
Apurva Nandan,
Texas Instruments India.