Skip to contentSkip to conversation

Introduce initial TI's J784S4 and AM69 support

PATCH Superseded Apurva Nandan 6 participants 48 messages Jan 19, 2024 – Feb 19, 2024

Subsystems (7)

v8 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

v8 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/

Note: This series is dependent on the following series for removing findfdt env:
https://lore.kernel.org/u-boot/[email protected]/

Sync-up for PATCH #4 is posted on Linux:
https://lore.kernel.org/linux-arm-kernel/[email protected]/

Changes in v8:
1) Squashed Linux am69-sk and j784s4-evm dts patches into one
2) Sorted config addition of SoC in arm/mach-K3/Kconfig
3) Updated commit messages according to the reviews
4) Removed #inlcude <config.h>
5) Removed k3_mmc_stop_clock and k3_mmc_restart_clock
6) Moved board_init_f logic to separate smaller functions
7) Removed J784S4 EVM specific Kconfig options in j784s4_int.c
8) Cleaned up emmc boot flow based on commit 66459346463439c72f84cfd1f985496b8a6142d8
9) Removed the dependency of findfdt and updated to ti_set_fdt_env
10) Updated copyright messages
11) Did cleanup/formatting of yaml files, removing linting errors
12) Removed k3-am69-sk specific things from k3-j784s4-binman.dtsi
13) Changed OF_LIST to a single dtb
14) Added bootph-all tag in EVM and SK dts instead of u-boot.dtsi
15) Trimmed the defconfig files to minimal
16) Merged the MAINTAINER file in right patches
17) Updated OpenOCD tag in U-Boot doc
18) And fixed other formatting mistakes.

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

Changes in v7:
1) Moved to unified memory map in arm64-mmu.c based on
https://lore.kernel.org/all/[email protected]/
2) Used ARRAY_SIZE in clk-data.c and dev-data.c
3) Removed I2C board detect from j784s4_init.c
4) Rebased to latest next

Link to v6:
https://lore.kernel.org/all/[email protected]/

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]/

Apurva Nandan (14):
arm: mach-k3: Kconfig: Sort SOC_K3 config entries
arm: mach-k3: Add basic support for J784S4 SoC definition
arm: dts: Introduce j784s4 and am69 dts from linux kernel
arm: dts: Add bootph-all for memory node
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
configs: j784s4_evm: Add defconfig for j784s4 evm board
doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation

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

 arch/arm/dts/Makefile                         |    6 +
 arch/arm/dts/k3-am69-r5-sk.dts                |  105 +
 arch/arm/dts/k3-am69-sk-u-boot.dtsi           |   48 +
 arch/arm/dts/k3-am69-sk.dts                   |  901 ++
 arch/arm/dts/k3-j784s4-binman.dtsi            |  345 +
 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-evm.dts                |  982 ++
 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                      |   33 +-
 arch/arm/mach-k3/Makefile                     |    2 +
 arch/arm/mach-k3/include/mach/hardware.h      |   13 +-
 .../mach-k3/include/mach/j784s4_hardware.h    |   59 +
 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               |   34 +
 arch/arm/mach-k3/j784s4_fdt.c                 |   15 +
 arch/arm/mach-k3/j784s4_init.c                |  305 +
 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                         |   43 +
 board/ti/j784s4/j784s4.env                    |   17 +
 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                    |    5 +
 configs/am69_sk_r5.config                     |    5 +
 configs/j784s4_evm_a72_defconfig              |  158 +
 configs/j784s4_evm_r5_defconfig               |  153 +
 doc/board/ti/j784s4_evm.rst                   |  299 +
 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 +
 55 files changed, 31496 insertions(+), 20 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 v8 1/16 arm: mach-k3: Kconfig: Sort SOC_K3 config entries

Sort SOC_K3 config entries in alphabetical order
for clean up.

---
 arch/arm/mach-k3/Kconfig | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
arch/arm/mach-k3/Kconfig +9 -9
index 03898424c9..f0ed5c6128 100644
@@ -4,6 +4,15 @@ choice
 	prompt "Texas Instruments' K3 based SoC select"
 	optional
 
+config SOC_K3_AM625
+	bool "TI's K3 based AM625 SoC Family Support"
+
+config SOC_K3_AM62A7
+	bool "TI's K3 based AM62A7 SoC Family Support"
+
+config SOC_K3_AM642
+	bool "TI's K3 based AM642 SoC Family Support"
+
 config SOC_K3_AM654
 	bool "TI's K3 based AM654 SoC Family Support"
 
@@ -13,15 +22,6 @@ config SOC_K3_J721E
 config SOC_K3_J721S2
 	bool "TI's K3 based J721S2 SoC Family Support"
 
-config SOC_K3_AM642
-	bool "TI's K3 based AM642 SoC Family Support"
-
-config SOC_K3_AM625
-	bool "TI's K3 based AM625 SoC Family Support"
-
-config SOC_K3_AM62A7
-	bool "TI's K3 based AM62A7 SoC Family Support"
-
 endchoice
 
 if SOC_K3_J721E
Signature · 1 line
2.34.1
#3 lore raw

PATCH v8 2/16 arm: mach-k3: Add basic support for J784S4 SoC definition

In reply to Apurva Nandan

Add J784S4 initialization files for initial SPL boot.

config SYS_K3_MCU_SCRATCHPAD_BASE default value is same for J721E, J721S2, J784S4. So combined them into a single default.

[ 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/include/mach/hardware.h      |   4 +
 .../mach-k3/include/mach/j784s4_hardware.h    |  59 ++++
 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                | 305 ++++++++++++++++++
 arch/arm/mach-k3/r5/Makefile                  |   1 +
 9 files changed, 446 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 f0ed5c6128..217def3bb4 100644
@@ -22,6 +22,9 @@ config SOC_K3_J721E
 config SOC_K3_J721S2
 	bool "TI's K3 based J721S2 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/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 +59 -0

59 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..d05ed8b991
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * J784S4: SoC specific initialization
+ *
+ * Copyright (C) 2023-2024 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 +305 -0

305 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
maintainer
#4 lore raw

Re: [PATCH v8 02/16] arm: mach-k3: Add basic support for J784S4 SoC definition

On 23:20-20240119, Apurva Nandan wrote:

[...]

Quoted 22 lines
arch/arm/mach-k3/j784s4_init.c new file +22 -0
+void k3_spl_init(void)
+{
+	struct udevice *dev;
+	int ret;
+
+	/*
+	 * 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();
+

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

Quoted 10 lines
arch/arm/mach-k3/j784s4_init.c new file +10 -0
+	/* Prepare console output */
+	preloader_console_init();
+
+	if (IS_ENABLED(CONFIG_CPU_V7R)) {
+		/*
+		 * 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

Nit pick - there is no SYSFW image anymore - it is either TIFS or DM.

Quoted 40 lines
arch/arm/mach-k3/j784s4_init.c new file +40 -0
+		 * to initialize its pin settings.
+		 */
+		ret = uclass_find_device_by_seq(UCLASS_SERIAL, 0, &dev);
+		if (!ret)
+			pinctrl_select_state(dev, "default");
+
+		/*
+		 * 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), NULL, NULL);
+
+		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();
+}
+
+void k3_mem_init(void)

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

Quoted 10 lines
arch/arm/mach-k3/j784s4_init.c new file +10 -0
+{
+	struct udevice *dev;
+	int ret, ctr = 1;
+
+	if (IS_ENABLED(CONFIG_K3_J721E_DDRSS)) {
+		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+		if (ret)
+			panic("DRAM 0 init failed: %d\n", ret);
+
+		while (dev) {

why loop on dev? is it possible to have ret != 0 and dev = 0?

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

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

What is the use of ctr++ ?? please do a limit check for instances.

[...]

Next time, please respond to the review comment questions so that I know that you have considered and decided something is not necessary or something was missed in the new version - for example what happened to mmc_stop/restart?

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

Re: [PATCH v8 02/16] arm: mach-k3: Add basic support for J784S4 SoC definition

Quoted 81 lines · Nishanth Menon

On 23:20-20240119, Apurva Nandan wrote:

[...]

Quoted 22 lines
arch/arm/mach-k3/j784s4_init.c new file +22 -0
+void k3_spl_init(void)
+{
+	struct udevice *dev;
+	int ret;
+
+	/*
+	 * 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();
+

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

Quoted 10 lines
arch/arm/mach-k3/j784s4_init.c new file +10 -0
+	/* Prepare console output */
+	preloader_console_init();
+
+	if (IS_ENABLED(CONFIG_CPU_V7R)) {
+		/*
+		 * 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

Nit pick - there is no SYSFW image anymore - it is either TIFS or DM.

Quoted 43 lines
arch/arm/mach-k3/j784s4_init.c new file +43 -0
+		 * to initialize its pin settings.
+		 */
+		ret = uclass_find_device_by_seq(UCLASS_SERIAL, 0, &dev);
+		if (!ret)
+			pinctrl_select_state(dev, "default");
+
+		/*
+		 * 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), NULL, NULL);
+
+		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();
+}
+
+void k3_mem_init(void)
+{
+	struct udevice *dev;
+	int ret, ctr = 1;
Quoted 9 lines

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

Quoted 7 lines
arch/arm/mach-k3/j784s4_init.c new file +7 -0
+
+	if (IS_ENABLED(CONFIG_K3_J721E_DDRSS)) {
+		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+		if (ret)
+			panic("DRAM 0 init failed: %d\n", ret);
+
+		while (dev) {

why loop on dev? is it possible to have ret != 0 and dev = 0?

Some variable needs to be used for loop condition, do you want it to be ret? or maybe you can suggest your idea for this please.

Quoted 7 lines

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

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

What is the use of ctr++ ?? please do a limit check for instances.

This is to keep the logic independent of board evm, so that no include of EVM config is needed. ctr is just used to notify user about how many DDR are up during boot, else it is not needed.

I can remove the ctr and printf, if you want.

For a limit check, how can we get number of DDR instances on the EVM, I don't know, can you please suggest some way?

There is no config that stores this info afaik.

Quoted 7 lines

[...]

Next time, please respond to the review comment questions so that I know that you have considered and decided something is not necessary or something was missed in the new version - for example what happened to mmc_stop/restart?

mmc_stop/restart were removed (mentioned in series changelog)

Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
maintainer
#6 lore raw

Re: [PATCH v8 02/16] arm: mach-k3: Add basic support for J784S4 SoC definition

On 20:21-20240123, Apurva Nandan wrote:
[...]

Quoted 27 lines
Quoted 4 lines
Quoted 4 lines
arch/arm/mach-k3/j784s4_init.c new file +4 -0
+void k3_mem_init(void)
+{
+	struct udevice *dev;
+	int ret, ctr = 1;
Quoted 9 lines

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

Quoted 7 lines
arch/arm/mach-k3/j784s4_init.c new file +7 -0
+
+	if (IS_ENABLED(CONFIG_K3_J721E_DDRSS)) {
+		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+		if (ret)
+			panic("DRAM 0 init failed: %d\n", ret);
+
+		while (dev) {

why loop on dev? is it possible to have ret != 0 and dev = 0?

Some variable needs to be used for loop condition, do you want it to be ret? or maybe you can suggest your idea for this please.

Quoted 7 lines

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

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

What is the use of ctr++ ?? please do a limit check for instances.

This is to keep the logic independent of board evm, so that no include of EVM config is needed.
ctr is just used to notify user about how many DDR are up during boot, else it is not needed.

Quoted 6 lines

I can remove the ctr and printf, if you want.

For a limit check, how can we get number of DDR instances on the EVM, I don't know, can you please suggest some way?

There is no config that stores this info afaik.

Why? J784s4 has only specific number of controllerns, correct?

A variant of the below -> but still have a question:

while (ctrl < J784S4_MAX_CONTROLLERS) {
	ret = uclass_next_device_err(&ret);
	if (ret) /* Question: How do we differentiate between valid
		  * failure and next instance not being present? */
		break;
	ctrl++;
}

info("Initialized %d DRAM controllers\n", ctrl - 1);

Quoted 9 lines
Quoted 8 lines

[...]

Next time, please respond to the review comment questions so that I know that you have considered and decided something is not necessary or something was missed in the new version - for example what happened to mmc_stop/restart?

mmc_stop/restart were removed (mentioned in series changelog)

Mentioning in diffstat of the patch helps give people the context of the change w.r.t the path itself.

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

Re: [PATCH v8 02/16] arm: mach-k3: Add basic support for J784S4 SoC definition

Hi,

Quoted 34 lines · Nishanth Menon

On 20:21-20240123, Apurva Nandan wrote:
[...]

Quoted 32 lines
Quoted 4 lines
Quoted 4 lines
arch/arm/mach-k3/j784s4_init.c new file +4 -0
+void k3_mem_init(void)
+{
+	struct udevice *dev;
+	int ret, ctr = 1;
Quoted 9 lines

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

Quoted 7 lines
arch/arm/mach-k3/j784s4_init.c new file +7 -0
+
+	if (IS_ENABLED(CONFIG_K3_J721E_DDRSS)) {
+		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+		if (ret)
+			panic("DRAM 0 init failed: %d\n", ret);
+
+		while (dev) {

why loop on dev? is it possible to have ret != 0 and dev = 0?

Some variable needs to be used for loop condition, do you want it to be ret? or maybe you can suggest your idea for this please.

Quoted 7 lines

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

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

What is the use of ctr++ ?? please do a limit check for instances.

This is to keep the logic independent of board evm, so that no include of EVM config is needed.
ctr is just used to notify user about how many DDR are up during boot, else it is not needed.

I can remove the ctr and printf, if you want.

For a limit check, how can we get number of DDR instances on the EVM, I don't know, can you please suggest some way?

Quoted 6 lines
Quoted 1 line

There is no config that stores this info afaik.

Why? J784s4 has only specific number of controllerns, correct?

A variant of the below -> but still have a question:

while (ctrl < J784S4_MAX_CONTROLLERS) {

Is J784S4_MAX_CONTROLLERS going to be a #define in j784s4_init.c

Or a Kconfig option like:

config DDR_MAX_CONTROLLERS
    int "Max number of DRAM controllers"
    default 4 if SOC_K3_J784S4
    default 1
    help

Quoted 4 lines
	ret = uclass_next_device_err(&ret);
	if (ret) /* Question: How do we differentiate between valid
		  * failure and next instance not being present? */
		break;

how about:

            ...
            if (ret == -ENODEV)
                break;

            if (ret)
                 panic("DRAM %d init failed: %d\n", ctrl,  ret);
            ...

Quoted 6 lines
	ctrl++;
}

info("Initialized %d DRAM controllers\n", ctrl - 1);

Quoted 2 lines
Quoted 2 lines

[...]

Quoted 7 lines
Quoted 5 lines
Quoted 4 lines

Next time, please respond to the review comment questions so that I know that you have considered and decided something is not necessary or something was missed in the new version - for example what happened to mmc_stop/restart?

mmc_stop/restart were removed (mentioned in series changelog)

Mentioning in diffstat of the patch helps give people the context of the change w.r.t the path itself.

okay

Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
maintainer
#8 lore raw

Re: [PATCH v8 02/16] arm: mach-k3: Add basic support for J784S4 SoC definition

Quoted 46 lines · Apurva Nandan

Hi,

Quoted 34 lines · Nishanth Menon

On 20:21-20240123, Apurva Nandan wrote:
[...]

Quoted 32 lines
Quoted 4 lines
Quoted 4 lines
arch/arm/mach-k3/j784s4_init.c new file +4 -0
+void k3_mem_init(void)
+{
+	struct udevice *dev;
+	int ret, ctr = 1;
Quoted 9 lines

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

Quoted 7 lines
arch/arm/mach-k3/j784s4_init.c new file +7 -0
+
+	if (IS_ENABLED(CONFIG_K3_J721E_DDRSS)) {
+		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+		if (ret)
+			panic("DRAM 0 init failed: %d\n", ret);
+
+		while (dev) {

why loop on dev? is it possible to have ret != 0 and dev = 0?

Some variable needs to be used for loop condition, do you want it to be ret? or maybe you can suggest your idea for this please.

Quoted 7 lines

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

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

What is the use of ctr++ ?? please do a limit check for instances.

This is to keep the logic independent of board evm, so that no include of EVM config is needed.
ctr is just used to notify user about how many DDR are up during boot, else it is not needed.

I can remove the ctr and printf, if you want.

For a limit check, how can we get number of DDR instances on the EVM, I don't know, can you please suggest some way?

Quoted 6 lines
Quoted 1 line

There is no config that stores this info afaik.

Why? J784s4 has only specific number of controllerns, correct?

A variant of the below -> but still have a question:

while (ctrl < J784S4_MAX_CONTROLLERS) {

Is J784S4_MAX_CONTROLLERS going to be a #define in j784s4_init.c

Quoted 8 lines

Or a Kconfig option like:

config DDR_MAX_CONTROLLERS
    int "Max number of DRAM controllers"
    default 4 if SOC_K3_J784S4
    default 1
    help

I dont see a need for Kconfig - but that is just me.

Quoted 7 lines
Quoted 4 lines
	ret = uclass_next_device_err(&ret);
	if (ret) /* Question: How do we differentiate between valid
		  * failure and next instance not being present? */
		break;

how about:

Quoted 7 lines

            ...
            if (ret == -ENODEV)
                break;

            if (ret)
                 panic("DRAM %d init failed: %d\n", ctrl,  ret);
            ...

What ever is appropriate.

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

Re: [PATCH v8 02/16] arm: mach-k3: Add basic support for J784S4 SoC definition

Quoted 48 lines · Nishanth Menon
Quoted 47 lines · Apurva Nandan

Hi,

Quoted 34 lines · Nishanth Menon

On 20:21-20240123, Apurva Nandan wrote:
[...]

Quoted 32 lines
Quoted 4 lines
Quoted 4 lines
arch/arm/mach-k3/j784s4_init.c new file +4 -0
+void k3_mem_init(void)
+{
+	struct udevice *dev;
+	int ret, ctr = 1;
Quoted 9 lines

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

Quoted 7 lines
arch/arm/mach-k3/j784s4_init.c new file +7 -0
+
+	if (IS_ENABLED(CONFIG_K3_J721E_DDRSS)) {
+		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+		if (ret)
+			panic("DRAM 0 init failed: %d\n", ret);
+
+		while (dev) {

why loop on dev? is it possible to have ret != 0 and dev = 0?

Some variable needs to be used for loop condition, do you want it to be ret? or maybe you can suggest your idea for this please.

Quoted 7 lines

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

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

What is the use of ctr++ ?? please do a limit check for instances.

This is to keep the logic independent of board evm, so that no include of EVM config is needed.
ctr is just used to notify user about how many DDR are up during boot, else it is not needed.

I can remove the ctr and printf, if you want.

For a limit check, how can we get number of DDR instances on the EVM, I don't know, can you please suggest some way?

Quoted 6 lines
Quoted 1 line

There is no config that stores this info afaik.

Why? J784s4 has only specific number of controllerns, correct?

A variant of the below -> but still have a question:

while (ctrl < J784S4_MAX_CONTROLLERS) {

Is J784S4_MAX_CONTROLLERS going to be a #define in j784s4_init.c

Or a Kconfig option like:

Quoted 7 lines
Quoted 6 lines

config DDR_MAX_CONTROLLERS
    int "Max number of DRAM controllers"
    default 4 if SOC_K3_J784S4
    default 1
    help

I dont see a need for Kconfig - but that is just me.

Ohkay, sending with #define.

Quoted 16 lines
Quoted 6 lines
Quoted 4 lines
	ret = uclass_next_device_err(&ret);
	if (ret) /* Question: How do we differentiate between valid
		  * failure and next instance not being present? */
		break;

how about:

Quoted 7 lines

            ...
            if (ret == -ENODEV)
                break;

            if (ret)
                 panic("DRAM %d init failed: %d\n", ctrl,  ret);
            ...

What ever is appropriate.

Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
#10 lore raw

PATCH v8 3/16 arm: dts: Introduce j784s4 and am69 dts from linux kernel

In reply to Apurva Nandan

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

---
 arch/arm/dts/Makefile                  |    4 +
 arch/arm/dts/k3-am69-sk.dts            |  900 +++++++++++
 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 ++++
 7 files changed, 5091 insertions(+)
 create mode 100644 arch/arm/dts/k3-am69-sk.dts
 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 +4 -0
index e9e58c5478..1462cd5a5c 100644
@@ -1410,6 +1410,10 @@ 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-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

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

1,109 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.

#11 lore raw

PATCH v8 4/16 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.dts    | 1 +
 arch/arm/dts/k3-j784s4-evm.dts | 1 +
 2 files changed, 2 insertions(+)
arch/arm/dts/k3-am69-sk.dts +1 -0
index 9868c7049b..29884097b9 100644
@@ -33,6 +33,7 @@
 
 	memory@80000000 {
 		device_type = "memory";
+		bootph-all;
 		/* 32G RAM */
 		reg = <0x00 0x80000000 0x00 0x80000000>,
 		      <0x08 0x80000000 0x07 0x80000000>;
arch/arm/dts/k3-j784s4-evm.dts +1 -0
index f1f4c8634a..662552c872 100644
@@ -31,6 +31,7 @@
 
 	memory@80000000 {
 		device_type = "memory";
+		bootph-all;
 		/* 32G RAM */
 		reg = <0x00 0x80000000 0x00 0x80000000>,
 		      <0x08 0x80000000 0x07 0x80000000>;
Signature · 1 line
2.34.1
maintainer
#12 lore raw

Re: [PATCH v8 04/16] arm: dts: Add bootph-all for memory node

On 23:20-20240119, Apurva Nandan wrote:
[...]

arch/arm/dts/k3-am69-sk.dts

Quoted 4 lines
arch/arm/dts/k3-am69-sk.dts +0 -0
index 9868c7049b..29884097b9 100644

I think you mis-interpreted
https://lore.kernel.org/u-boot/20240103175221.ovjzcwwljnjhka2n@expire/
comment to modify kernel board.dts. I meant for you to squash that correct change to the patch that introduces board-u-boot.dtsi and r5.dts

Now that i read my comment, I can see why it might have been mis-interpreted. Sorry about that - please squash your v7 patch instead to appropriate patch.

Quoted 23 lines
arch/arm/dts/k3-am69-sk.dts +1 -0
@@ -33,6 +33,7 @@
 
 	memory@80000000 {
 		device_type = "memory";
+		bootph-all;
 		/* 32G RAM */
 		reg = <0x00 0x80000000 0x00 0x80000000>,
 		      <0x08 0x80000000 0x07 0x80000000>;
arch/arm/dts/k3-j784s4-evm.dts +1 -0
index f1f4c8634a..662552c872 100644
@@ -31,6 +31,7 @@
 
 	memory@80000000 {
 		device_type = "memory";
+		bootph-all;
 		/* 32G RAM */
 		reg = <0x00 0x80000000 0x00 0x80000000>,
 		      <0x08 0x80000000 0x07 0x80000000>;
Signature · 1 line
2.34.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#13 lore raw

Re: [PATCH v8 04/16] arm: dts: Add bootph-all for memory node

Quoted 12 lines · Nishanth Menon

On 23:20-20240119, Apurva Nandan wrote:
[...]

arch/arm/dts/k3-am69-sk.dts

Quoted 4 lines
arch/arm/dts/k3-am69-sk.dts +0 -0
index 9868c7049b..29884097b9 100644

I think you mis-interpreted
https://lore.kernel.org/u-boot/20240103175221.ovjzcwwljnjhka2n@expire/
comment to modify kernel board.dts. I meant for you to squash that correct change to the patch that introduces board-u-boot.dtsi and r5.dts

Quoted 3 lines

Now that i read my comment, I can see why it might have been mis-interpreted. Sorry about that - please squash your v7 patch instead to appropriate patch.

Okay, will do.

Quoted 24 lines
Quoted 24 lines
arch/arm/dts/k3-am69-sk.dts +1 -0
@@ -33,6 +33,7 @@
 
  	memory@80000000 {
  		device_type = "memory";
+		bootph-all;
  		/* 32G RAM */
  		reg = <0x00 0x80000000 0x00 0x80000000>,
  		      <0x08 0x80000000 0x07 0x80000000>;
arch/arm/dts/k3-j784s4-evm.dts +1 -0
index f1f4c8634a..662552c872 100644
@@ -31,6 +31,7 @@
 
  	memory@80000000 {
  		device_type = "memory";
+		bootph-all;
  		/* 32G RAM */
  		reg = <0x00 0x80000000 0x00 0x80000000>,
  		      <0x08 0x80000000 0x07 0x80000000>;
Signature · 1 line
2.34.1
Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
#14 lore raw

PATCH v8 5/16 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
#16 lore raw

PATCH v8 6/16 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
#18 lore raw

PATCH v8 7/16 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..9ce88305f5
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 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 v8 7/16
#19 lore raw

Re: [PATCH v8 07/16] arm: mach-k3: j784s4: Add clk and power support

Quoted 8 lines · Apurva Nandan

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

#20 lore raw

PATCH v8 8/16 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
Reviewed-by on v8 8/16
#21 lore raw

Re: [PATCH v8 08/16] drivers: dma: Add support for J784S4 SoC

Quoted 271 lines · 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
new file mode 100644
index 0000000000..7f06a1f307
@@ -0,0 +1,166 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ *  Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com
+ */
+#include <linux/kernel.h>
+
+#include "k3-psil-priv.h"
+
+#define PSIL_PDMA_XY_TR(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_PDMA_XY,	\
+		},					\
+	}
+
+#define PSIL_PDMA_XY_PKT(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_PDMA_XY,	\
+			.pkt_mode = 1,			\
+		},					\
+	}
+
+#define PSIL_PDMA_MCASP(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_PDMA_XY,	\
+			.pdma_acc32 = 1,		\
+			.pdma_burst = 1,		\
+		},					\
+	}
+
+#define PSIL_ETHERNET(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_NATIVE,	\
+			.pkt_mode = 1,			\
+			.needs_epib = 1,		\
+			.psd_size = 16,			\
+		},					\
+	}
+
+#define PSIL_SA2UL(x, tx)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_NATIVE,	\
+			.pkt_mode = 1,			\
+			.needs_epib = 1,		\
+			.psd_size = 64,			\
+			.notdpkt = tx,			\
+		},					\
+	}
+
+/* PSI-L source thread IDs, used for RX (DMA_DEV_TO_MEM) */
+static struct psil_ep j784s4_src_ep_map[] = {
+	/* PDMA_MCASP - McASP0-4 */
+	PSIL_PDMA_MCASP(0x4400),
+	PSIL_PDMA_MCASP(0x4401),
+	PSIL_PDMA_MCASP(0x4402),
+	PSIL_PDMA_MCASP(0x4403),
+	PSIL_PDMA_MCASP(0x4404),
+	/* PDMA_SPI_G0 - SPI0-3 */
+	PSIL_PDMA_XY_PKT(0x4600),
+	PSIL_PDMA_XY_PKT(0x4601),
+	PSIL_PDMA_XY_PKT(0x4602),
+	PSIL_PDMA_XY_PKT(0x4603),
+	PSIL_PDMA_XY_PKT(0x4604),
+	PSIL_PDMA_XY_PKT(0x4605),
+	PSIL_PDMA_XY_PKT(0x4606),
+	PSIL_PDMA_XY_PKT(0x4607),
+	PSIL_PDMA_XY_PKT(0x4608),
+	PSIL_PDMA_XY_PKT(0x4609),
+	PSIL_PDMA_XY_PKT(0x460a),
+	PSIL_PDMA_XY_PKT(0x460b),
+	PSIL_PDMA_XY_PKT(0x460c),
+	PSIL_PDMA_XY_PKT(0x460d),
+	PSIL_PDMA_XY_PKT(0x460e),
+	PSIL_PDMA_XY_PKT(0x460f),
+	/* PDMA_SPI_G1 - SPI4-7 */
+	PSIL_PDMA_XY_PKT(0x4610),
+	PSIL_PDMA_XY_PKT(0x4611),
+	PSIL_PDMA_XY_PKT(0x4612),
+	PSIL_PDMA_XY_PKT(0x4613),
+	PSIL_PDMA_XY_PKT(0x4614),
+	PSIL_PDMA_XY_PKT(0x4615),
+	PSIL_PDMA_XY_PKT(0x4616),
+	PSIL_PDMA_XY_PKT(0x4617),
+	PSIL_PDMA_XY_PKT(0x4618),
+	PSIL_PDMA_XY_PKT(0x4619),
+	PSIL_PDMA_XY_PKT(0x461a),
+	PSIL_PDMA_XY_PKT(0x461b),
+	PSIL_PDMA_XY_PKT(0x461c),
+	PSIL_PDMA_XY_PKT(0x461d),
+	PSIL_PDMA_XY_PKT(0x461e),
+	PSIL_PDMA_XY_PKT(0x461f),
+	/* PDMA_USART_G0 - UART0-1 */
+	PSIL_PDMA_XY_PKT(0x4700),
+	PSIL_PDMA_XY_PKT(0x4701),
+	/* PDMA_USART_G1 - UART2-3 */
+	PSIL_PDMA_XY_PKT(0x4702),
+	PSIL_PDMA_XY_PKT(0x4703),
+	/* PDMA_USART_G2 - UART4-9 */
+	PSIL_PDMA_XY_PKT(0x4704),
+	PSIL_PDMA_XY_PKT(0x4705),
+	PSIL_PDMA_XY_PKT(0x4706),
+	PSIL_PDMA_XY_PKT(0x4707),
+	PSIL_PDMA_XY_PKT(0x4708),
+	PSIL_PDMA_XY_PKT(0x4709),
+	/* CPSW0 */
+	PSIL_ETHERNET(0x7000),
+	/* MCU_PDMA0 (MCU_PDMA_MISC_G0) - SPI0 */
+	PSIL_PDMA_XY_PKT(0x7100),
+	PSIL_PDMA_XY_PKT(0x7101),
+	PSIL_PDMA_XY_PKT(0x7102),
+	PSIL_PDMA_XY_PKT(0x7103),
+	/* MCU_PDMA1 (MCU_PDMA_MISC_G1) - SPI1-2 */
+	PSIL_PDMA_XY_PKT(0x7200),
+	PSIL_PDMA_XY_PKT(0x7201),
+	PSIL_PDMA_XY_PKT(0x7202),
+	PSIL_PDMA_XY_PKT(0x7203),
+	PSIL_PDMA_XY_PKT(0x7204),
+	PSIL_PDMA_XY_PKT(0x7205),
+	PSIL_PDMA_XY_PKT(0x7206),
+	PSIL_PDMA_XY_PKT(0x7207),
+	/* MCU_PDMA2 (MCU_PDMA_MISC_G2) - UART0 */
+	PSIL_PDMA_XY_PKT(0x7300),
+	/* MCU_PDMA_ADC - ADC0-1 */
+	PSIL_PDMA_XY_TR(0x7400),
+	PSIL_PDMA_XY_TR(0x7401),
+	PSIL_PDMA_XY_TR(0x7402),
+	PSIL_PDMA_XY_TR(0x7403),
+	/* SA2UL */
+	PSIL_SA2UL(0x7500, 0),
+	PSIL_SA2UL(0x7501, 0),
+	PSIL_SA2UL(0x7502, 0),
+	PSIL_SA2UL(0x7503, 0),
+};
+
+/* PSI-L destination thread IDs, used for TX (DMA_MEM_TO_DEV) */
+static struct psil_ep j784s4_dst_ep_map[] = {
+	/* CPSW0 */
+	PSIL_ETHERNET(0xf000),
+	PSIL_ETHERNET(0xf001),
+	PSIL_ETHERNET(0xf002),
+	PSIL_ETHERNET(0xf003),
+	PSIL_ETHERNET(0xf004),
+	PSIL_ETHERNET(0xf005),
+	PSIL_ETHERNET(0xf006),
+	PSIL_ETHERNET(0xf007),
+	/* SA2UL */
+	PSIL_SA2UL(0xf500, 1),
+	PSIL_SA2UL(0xf501, 1),
+};
+
+struct psil_ep_map j784s4_ep_map = {
+	.name = "j784s4",
+	.src = j784s4_src_ep_map,
+	.src_count = ARRAY_SIZE(j784s4_src_ep_map),
+	.dst = j784s4_dst_ep_map,
+	.dst_count = ARRAY_SIZE(j784s4_dst_ep_map),
+};
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 +0 -0
index 5b07e92030..8e9e53cbb0 100644

drivers/ram/Kconfig choice · line 65

Quoted 5 lines
drivers/ram/Kconfig +1 -1
@@ -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

Should DDR support patch be independent of DMA support?

This change should have gone in patch 2 "arm: mach-k3: Add basic support for J784S4 SoC definition"

drivers/ram/Kconfig choice · line 68

Quoted 3 lines
drivers/ram/Kconfig +0 -0
 	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 · 2 lines
cheers,
-roger
#22 lore raw

Re: [PATCH v8 08/16] drivers: dma: Add support for J784S4 SoC

Quoted 276 lines · Roger Quadros
Quoted 274 lines · 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
new file mode 100644
index 0000000000..7f06a1f307
@@ -0,0 +1,166 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ *  Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com
+ */
+#include <linux/kernel.h>
+
+#include "k3-psil-priv.h"
+
+#define PSIL_PDMA_XY_TR(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_PDMA_XY,	\
+		},					\
+	}
+
+#define PSIL_PDMA_XY_PKT(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_PDMA_XY,	\
+			.pkt_mode = 1,			\
+		},					\
+	}
+
+#define PSIL_PDMA_MCASP(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_PDMA_XY,	\
+			.pdma_acc32 = 1,		\
+			.pdma_burst = 1,		\
+		},					\
+	}
+
+#define PSIL_ETHERNET(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_NATIVE,	\
+			.pkt_mode = 1,			\
+			.needs_epib = 1,		\
+			.psd_size = 16,			\
+		},					\
+	}
+
+#define PSIL_SA2UL(x, tx)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_NATIVE,	\
+			.pkt_mode = 1,			\
+			.needs_epib = 1,		\
+			.psd_size = 64,			\
+			.notdpkt = tx,			\
+		},					\
+	}
+
+/* PSI-L source thread IDs, used for RX (DMA_DEV_TO_MEM) */
+static struct psil_ep j784s4_src_ep_map[] = {
+	/* PDMA_MCASP - McASP0-4 */
+	PSIL_PDMA_MCASP(0x4400),
+	PSIL_PDMA_MCASP(0x4401),
+	PSIL_PDMA_MCASP(0x4402),
+	PSIL_PDMA_MCASP(0x4403),
+	PSIL_PDMA_MCASP(0x4404),
+	/* PDMA_SPI_G0 - SPI0-3 */
+	PSIL_PDMA_XY_PKT(0x4600),
+	PSIL_PDMA_XY_PKT(0x4601),
+	PSIL_PDMA_XY_PKT(0x4602),
+	PSIL_PDMA_XY_PKT(0x4603),
+	PSIL_PDMA_XY_PKT(0x4604),
+	PSIL_PDMA_XY_PKT(0x4605),
+	PSIL_PDMA_XY_PKT(0x4606),
+	PSIL_PDMA_XY_PKT(0x4607),
+	PSIL_PDMA_XY_PKT(0x4608),
+	PSIL_PDMA_XY_PKT(0x4609),
+	PSIL_PDMA_XY_PKT(0x460a),
+	PSIL_PDMA_XY_PKT(0x460b),
+	PSIL_PDMA_XY_PKT(0x460c),
+	PSIL_PDMA_XY_PKT(0x460d),
+	PSIL_PDMA_XY_PKT(0x460e),
+	PSIL_PDMA_XY_PKT(0x460f),
+	/* PDMA_SPI_G1 - SPI4-7 */
+	PSIL_PDMA_XY_PKT(0x4610),
+	PSIL_PDMA_XY_PKT(0x4611),
+	PSIL_PDMA_XY_PKT(0x4612),
+	PSIL_PDMA_XY_PKT(0x4613),
+	PSIL_PDMA_XY_PKT(0x4614),
+	PSIL_PDMA_XY_PKT(0x4615),
+	PSIL_PDMA_XY_PKT(0x4616),
+	PSIL_PDMA_XY_PKT(0x4617),
+	PSIL_PDMA_XY_PKT(0x4618),
+	PSIL_PDMA_XY_PKT(0x4619),
+	PSIL_PDMA_XY_PKT(0x461a),
+	PSIL_PDMA_XY_PKT(0x461b),
+	PSIL_PDMA_XY_PKT(0x461c),
+	PSIL_PDMA_XY_PKT(0x461d),
+	PSIL_PDMA_XY_PKT(0x461e),
+	PSIL_PDMA_XY_PKT(0x461f),
+	/* PDMA_USART_G0 - UART0-1 */
+	PSIL_PDMA_XY_PKT(0x4700),
+	PSIL_PDMA_XY_PKT(0x4701),
+	/* PDMA_USART_G1 - UART2-3 */
+	PSIL_PDMA_XY_PKT(0x4702),
+	PSIL_PDMA_XY_PKT(0x4703),
+	/* PDMA_USART_G2 - UART4-9 */
+	PSIL_PDMA_XY_PKT(0x4704),
+	PSIL_PDMA_XY_PKT(0x4705),
+	PSIL_PDMA_XY_PKT(0x4706),
+	PSIL_PDMA_XY_PKT(0x4707),
+	PSIL_PDMA_XY_PKT(0x4708),
+	PSIL_PDMA_XY_PKT(0x4709),
+	/* CPSW0 */
+	PSIL_ETHERNET(0x7000),
+	/* MCU_PDMA0 (MCU_PDMA_MISC_G0) - SPI0 */
+	PSIL_PDMA_XY_PKT(0x7100),
+	PSIL_PDMA_XY_PKT(0x7101),
+	PSIL_PDMA_XY_PKT(0x7102),
+	PSIL_PDMA_XY_PKT(0x7103),
+	/* MCU_PDMA1 (MCU_PDMA_MISC_G1) - SPI1-2 */
+	PSIL_PDMA_XY_PKT(0x7200),
+	PSIL_PDMA_XY_PKT(0x7201),
+	PSIL_PDMA_XY_PKT(0x7202),
+	PSIL_PDMA_XY_PKT(0x7203),
+	PSIL_PDMA_XY_PKT(0x7204),
+	PSIL_PDMA_XY_PKT(0x7205),
+	PSIL_PDMA_XY_PKT(0x7206),
+	PSIL_PDMA_XY_PKT(0x7207),
+	/* MCU_PDMA2 (MCU_PDMA_MISC_G2) - UART0 */
+	PSIL_PDMA_XY_PKT(0x7300),
+	/* MCU_PDMA_ADC - ADC0-1 */
+	PSIL_PDMA_XY_TR(0x7400),
+	PSIL_PDMA_XY_TR(0x7401),
+	PSIL_PDMA_XY_TR(0x7402),
+	PSIL_PDMA_XY_TR(0x7403),
+	/* SA2UL */
+	PSIL_SA2UL(0x7500, 0),
+	PSIL_SA2UL(0x7501, 0),
+	PSIL_SA2UL(0x7502, 0),
+	PSIL_SA2UL(0x7503, 0),
+};
+
+/* PSI-L destination thread IDs, used for TX (DMA_MEM_TO_DEV) */
+static struct psil_ep j784s4_dst_ep_map[] = {
+	/* CPSW0 */
+	PSIL_ETHERNET(0xf000),
+	PSIL_ETHERNET(0xf001),
+	PSIL_ETHERNET(0xf002),
+	PSIL_ETHERNET(0xf003),
+	PSIL_ETHERNET(0xf004),
+	PSIL_ETHERNET(0xf005),
+	PSIL_ETHERNET(0xf006),
+	PSIL_ETHERNET(0xf007),
+	/* SA2UL */
+	PSIL_SA2UL(0xf500, 1),
+	PSIL_SA2UL(0xf501, 1),
+};
+
+struct psil_ep_map j784s4_ep_map = {
+	.name = "j784s4",
+	.src = j784s4_src_ep_map,
+	.src_count = ARRAY_SIZE(j784s4_src_ep_map),
+	.dst = j784s4_dst_ep_map,
+	.dst_count = ARRAY_SIZE(j784s4_dst_ep_map),
+};
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 +0 -0
index 5b07e92030..8e9e53cbb0 100644
@@ -62,7 +62,7 @@ choice
  	depends on K3_DDRSS
  	prompt "K3 DDRSS Arch Support"
 
Quoted 5 lines

drivers/ram/Kconfig choice · line 65

Quoted 2 lines
drivers/ram/Kconfig +1 -1
-	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

Should DDR support patch be independent of DMA support?

This change should have gone in patch 2 "arm: mach-k3: Add basic support for J784S4 SoC definition"

Will fix.

Quoted 6 lines

drivers/ram/Kconfig choice · line 68

Quoted 3 lines
drivers/ram/Kconfig +0 -0
  	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 · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
#23 lore raw

PATCH v8 9/16 board: ti: j784s4: Add board support for J784S4 EVM

In reply to Apurva Nandan

Add board files for J784S4 EVM.

SYS_DISABLE_DCACHE_OPS is selected in the Kconfig because J784S4/AM69 are a coherent architecture at A72 level by MSMC support.

[ 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 | 34 ++++++++++++++++++++++++++
 board/ti/j784s4/Kconfig         | 37 ++++++++++++++++++++++++++++
 board/ti/j784s4/MAINTAINERS     | 14 +++++++++++
 board/ti/j784s4/Makefile        |  7 ++++++
 board/ti/j784s4/evm.c           | 43 +++++++++++++++++++++++++++++++++
 include/configs/j784s4_evm.h    | 15 ++++++++++++
 7 files changed, 151 insertions(+)
 create mode 100644 arch/arm/mach-k3/j784s4/Kconfig
 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/evm.c
 create mode 100644 include/configs/j784s4_evm.h
arch/arm/mach-k3/Kconfig +1 -0
index 217def3bb4..fdde67c2d3 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 +34 -0
new file mode 100644
index 0000000000..1eadfb346a
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 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..490c7be66b
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 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/MAINTAINERS new file +14 -0
new file mode 100644
index 0000000000..9e0df11503
@@ -0,0 +1,14 @@
+J784S4 EVM 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:	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
+
+AM69 SK BOARD
+F:	arch/arm/dts/k3-am69-sk.dts
board/ti/j784s4/Makefile new file +7 -0
new file mode 100644
index 0000000000..60161a8b5c
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+#	Hari Nagalla <[email protected]>
+#
+
+obj-y += evm.o
board/ti/j784s4/evm.c new file +43 -0

43 lines not on this page · raw message

include/configs/j784s4_evm.h new file +15 -0
new file mode 100644
index 0000000000..4a2ccdce14
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Configuration header file for K3 J784S4 EVM
+ *
+ * Copyright (C) 2023-2024 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
maintainer
#24 lore raw

Re: [PATCH v8 09/16] board: ti: j784s4: Add board support for J784S4 EVM

Quoted 8 lines · Apurva Nandan

Add board files for J784S4 EVM.

SYS_DISABLE_DCACHE_OPS is selected in the Kconfig because J784S4/AM69 are a coherent architecture at A72 level by MSMC support.

[ add env and board specific yaml files for binman ]

Neither of them are part of this patch?

Quoted 2 lines
[ cleaned up the env files ]

no env file in this patch?

Quoted 4 lines

[...]

Quoted 9 lines
board/ti/j784s4/MAINTAINERS new file +3 -0
new file mode 100644
index 0000000000..9e0df11503
@@ -0,0 +1,14 @@
+J784S4 EVM BOARD
+M:	Apurva Nandan <[email protected]>
+S:	Maintained

board/ti/j784s4/MAINTAINERS line 13

Quoted 10 lines
board/ti/j784s4/MAINTAINERS new file +10 -0
+F:	board/ti/j784s4
+F:	arch/arm/mach-k3/j784s4
+F:	include/configs/j784s4_evm.h
+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
+
+AM69 SK BOARD

Don't all entries need a maintainer? I am not actually sure if the above M will fall through for SK board.

Quoted 23 lines
board/ti/j784s4/MAINTAINERS new file +1 -0
+F:	arch/arm/dts/k3-am69-sk.dts
board/ti/j784s4/Makefile new file +7 -0
new file mode 100644
index 0000000000..60161a8b5c
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+#	Hari Nagalla <[email protected]>
+#
+
+obj-y += evm.o
board/ti/j784s4/evm.c new file +3 -0
new file mode 100644
index 0000000000..5af3e21ff0
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Board specific initialization for J784S4 EVM

board/ti/j784s4/evm.c line 13

Quoted 10 lines
board/ti/j784s4/evm.c new file +10 -0
+ *
+ * Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+ *	Hari Nagalla <[email protected]>
+ *
+ */
+
+#include <image.h>
+#include <init.h>
+#include <spl.h>
+#include <stdlib.h>

Are you sure we need all the above headers?

Quoted 1 line
board/ti/j784s4/evm.c new file +1 -0
+#include "../common/fdt_ops.h"

[...]

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

Re: [PATCH v8 09/16] board: ti: j784s4: Add board support for J784S4 EVM

Hi Nishanth

Quoted 7 lines · Nishanth Menon
Quoted 6 lines · Apurva Nandan

Add board files for J784S4 EVM.

SYS_DISABLE_DCACHE_OPS is selected in the Kconfig because J784S4/AM69 are a coherent architecture at A72 level by MSMC support.

Quoted 6 lines
Quoted 2 lines
[ add env and board specific yaml files for binman ]

Neither of them are part of this patch?

Quoted 2 lines
[ cleaned up the env files ]

no env file in this patch?

Will fix.

Quoted 20 lines
Quoted 5 lines

[...]

Quoted 13 lines
board/ti/j784s4/MAINTAINERS new file +7 -0
new file mode 100644
index 0000000000..9e0df11503
@@ -0,0 +1,14 @@
+J784S4 EVM 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:	arch/arm/dts/k3-j784s4.dtsi
Quoted 8 lines

board/ti/j784s4/MAINTAINERS line 13

Quoted 6 lines
board/ti/j784s4/MAINTAINERS new file +6 -0
+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
+
+AM69 SK BOARD

Don't all entries need a maintainer? I am not actually sure if the above M will fall through for SK board.

Okay, will add M for AM69 as well.

Quoted 27 lines
Quoted 27 lines
board/ti/j784s4/MAINTAINERS new file +1 -0
+F:	arch/arm/dts/k3-am69-sk.dts
board/ti/j784s4/Makefile new file +7 -0
new file mode 100644
index 0000000000..60161a8b5c
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+#	Hari Nagalla <[email protected]>
+#
+
+obj-y += evm.o
board/ti/j784s4/evm.c new file +6 -0
new file mode 100644
index 0000000000..5af3e21ff0
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Board specific initialization for J784S4 EVM
+ *
+ * Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+ *	Hari Nagalla <[email protected]>
Quoted 8 lines

board/ti/j784s4/evm.c line 13

Quoted 7 lines
board/ti/j784s4/evm.c new file +7 -0
+ *
+ */
+
+#include <image.h>
+#include <init.h>
+#include <spl.h>
+#include <stdlib.h>

Are you sure we need all the above headers?

Ok, will cleanup

Quoted 4 lines
Quoted 2 lines
board/ti/j784s4/evm.c new file +1 -0
+#include "../common/fdt_ops.h"

[...]

Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
#26 lore raw

PATCH v8 10/16 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..38958767f4
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 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..a36b860989
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 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.

#27 lore raw

PATCH v8 11/16 board: ti: j784s4: Add boot environment variables

In reply to Apurva Nandan

Add env file with necessary boot variables.

---
 board/ti/j784s4/j784s4.env | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 board/ti/j784s4/j784s4.env
board/ti/j784s4/j784s4.env new file +17 -0
new file mode 100644
index 0000000000..7e54ca042e
@@ -0,0 +1,17 @@
+#include <env/ti/ti_common.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
#28 lore raw

PATCH v8 12/16 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           |  345 +
 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 +
 board/ti/j784s4/MAINTAINERS                  |    4 +
 7 files changed, 18096 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 1462cd5a5c..876802b88e 100644
@@ -1412,7 +1412,8 @@ dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-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 \
arch/arm/dts/k3-j784s4-binman.dtsi new file +345 -0

345 lines not on this page · raw message

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

2,646 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

board/ti/j784s4/MAINTAINERS +4 -0
index 9e0df11503..ac6db23da5 100644

Lines of this file are not shown. View the 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.

maintainer
#29 lore raw

Re: [PATCH v8 12/16] arm: dts: Introduce j784s4 u-boot dts files

On 23:20-20240119, Apurva Nandan wrote:
[...]

Quoted 13 lines
arch/arm/dts/k3-j784s4-binman.dtsi new file +7 -0
new file mode 100644
index 0000000000..d0d49b5bbe
@@ -0,0 +1,345 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-binman.dtsi"
+

arch/arm/dts/k3-j784s4-binman.dtsi line 17

Quoted 10 lines
arch/arm/dts/k3-j784s4-binman.dtsi new file +10 -0
+#ifdef CONFIG_TARGET_J784S4_R5_EVM
+
+&rcfg_yaml_tifs {
+	config = "tifs-rm-cfg.yaml";
+};
+
+&binman {
+	tiboot3-j784s4-hs-evm.bin {
+		filename = "tiboot3-j784s4-hs-evm.bin";
+

https://lore.kernel.org/u-boot/20240103174756.xa4rzbn4klk5gv2x@aware/

You haven't responded on thread why
"Prefer #1 - j784s4 binman template" is not feasible or not desirable.

Something like:

in j784s4-binman.dtsi:

 &binman {
        j784s4_tiboot3_hs_fs_template: template-9 {

and then in sk.dtsi:

&binman {
      ti-j784s4-hs-evm.bin {
         insert-template =<&j784s4_tiboot3_hs_fs_template>;
     };
};

This allows boards to readily include the template for the binaries of choice and generate just relevant output. Wont it save much confusion?

[...]

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

Re: [PATCH v8 12/16] arm: dts: Introduce j784s4 u-boot dts files

Quoted 33 lines · Nishanth Menon

On 23:20-20240119, Apurva Nandan wrote:
[...]

Quoted 13 lines
arch/arm/dts/k3-j784s4-binman.dtsi new file +7 -0
new file mode 100644
index 0000000000..d0d49b5bbe
@@ -0,0 +1,345 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2023 Texas Instruments Incorporated -https://www.ti.com/
+ */
+
+#include "k3-binman.dtsi"
+

arch/arm/dts/k3-j784s4-binman.dtsi line 17

Quoted 10 lines
arch/arm/dts/k3-j784s4-binman.dtsi new file +10 -0
+#ifdef CONFIG_TARGET_J784S4_R5_EVM
+
+&rcfg_yaml_tifs {
+	config = "tifs-rm-cfg.yaml";
+};
+
+&binman {
+	tiboot3-j784s4-hs-evm.bin {
+		filename = "tiboot3-j784s4-hs-evm.bin";
+

https://lore.kernel.org/u-boot/20240103174756.xa4rzbn4klk5gv2x@aware/

You haven't responded on thread why
"Prefer #1 - j784s4 binman template" is not feasible or not desirable.

Something like:

Quoted 7 lines

in j784s4-binman.dtsi:

  &binman {
         j784s4_tiboot3_hs_fs_template: template-9 {

and then in sk.dtsi:

sk.dtsi means sk-uboot.dtsi or sk-binman.dtsi?

Quoted 10 lines
&binman {
       ti-j784s4-hs-evm.bin {
          insert-template =<&j784s4_tiboot3_hs_fs_template>;
      };
};

This allows boards to readily include the template for the binaries of choice and generate just relevant output. Wont it save much confusion?

[...]

It is still little unclear what is the full thing that you are recommending to implement here. From what I understood, is it as follows?

- Three binman files will be there: j784s4-binman.dtsi (soc binman), j784s4-evm-binman.dtsi and am69-sk-binman.dtsi (board binman)
- j784s4-binman.dtsi will be a SoC binman, and will have only templates for all tiboot3 gp, hs, hsfs, and tispl/uboot
- The board binman files will include these templates and update the dtb files in them.
- Final board.dts will use the correct board-binman.dtsi files

Please correct wherever wrong.

Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
maintainer
#31 lore raw

Re: [PATCH v8 12/16] arm: dts: Introduce j784s4 u-boot dts files

Quoted 1 line · Apurva Nandan

[...]

Quoted 8 lines
Quoted 7 lines

in j784s4-binman.dtsi:

  &binman {
         j784s4_tiboot3_hs_fs_template: template-9 {

and then in sk.dtsi:

sk.dtsi means sk-uboot.dtsi or sk-binman.dtsi?

you wont need an sk-binman.dtsi with template. sk-u-boot.dtsi and r5-sk.dts ofcourse will instantiate the required templates!

Quoted 9 lines
Quoted 9 lines
&binman {
       ti-j784s4-hs-evm.bin {
          insert-template =<&j784s4_tiboot3_hs_fs_template>;
      };
};

This allows boards to readily include the template for the binaries of choice and generate just relevant output. Wont it save much confusion?

Quoted 7 lines
Quoted 1 line

[...]

It is still little unclear what is the full thing that you are recommending to implement here.
From what I understood, is it as follows?

- Three binman files will be there: j784s4-binman.dtsi (soc binman), j784s4-evm-binman.dtsi and am69-sk-binman.dtsi (board binman)

Nope. just j784s4-binman.dtsi with bin file templates for different kinds of devices.

Quoted 2 lines

- j784s4-binman.dtsi will be a SoC binman, and will have only templates for all tiboot3 gp, hs, hsfs, and tispl/uboot

tiboot3.bin is a an example, but you should do templates for other files (tispl, u-boot.img... )as well on similar lines. So all a board file ideally should instantiate is device types it wants and overrides of dtbs it needs.

Quoted 2 lines

- The board binman files will include these templates and update the dtb files in them.

Correct.

Quoted 1 line

- Final board.dts will use the correct board-binman.dtsi files

if the templates are abstract enough, the additional code will be so minimal that we wont need a board-binman.dtsi - just u-boot.dtsi and r5.dtsi can include the relevant templates.

Hope this helps.

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

Re: [PATCH v8 12/16] arm: dts: Introduce j784s4 u-boot dts files

Hi Nishanth

Quoted 49 lines · Nishanth Menon
Quoted 1 line · Apurva Nandan

[...]

Quoted 8 lines
Quoted 7 lines

in j784s4-binman.dtsi:

   &binman {
          j784s4_tiboot3_hs_fs_template: template-9 {

and then in sk.dtsi:

sk.dtsi means sk-uboot.dtsi or sk-binman.dtsi?

you wont need an sk-binman.dtsi with template. sk-u-boot.dtsi and r5-sk.dts ofcourse will instantiate the required templates!

Quoted 9 lines
Quoted 9 lines
&binman {
        ti-j784s4-hs-evm.bin {
           insert-template =<&j784s4_tiboot3_hs_fs_template>;
       };
};

This allows boards to readily include the template for the binaries of choice and generate just relevant output. Wont it save much confusion?

Quoted 7 lines
Quoted 1 line

[...]

It is still little unclear what is the full thing that you are recommending to implement here.
From what I understood, is it as follows?

- Three binman files will be there: j784s4-binman.dtsi (soc binman), j784s4-evm-binman.dtsi and am69-sk-binman.dtsi (board binman)

Nope. just j784s4-binman.dtsi with bin file templates for different kinds of devices.

Quoted 2 lines

- j784s4-binman.dtsi will be a SoC binman, and will have only templates for all tiboot3 gp, hs, hsfs, and tispl/uboot

tiboot3.bin is a an example, but you should do templates for other files (tispl, u-boot.img... )as well on similar lines. So all a board file ideally should instantiate is device types it wants and overrides of dtbs it needs.

Quoted 2 lines

- The board binman files will include these templates and update the dtb files in them.

Correct.

Quoted 7 lines
Quoted 1 line

- Final board.dts will use the correct board-binman.dtsi files

if the templates are abstract enough, the additional code will be so minimal that we wont need a board-binman.dtsi - just u-boot.dtsi and r5.dtsi can include the relevant templates.

Hope this helps.

So I took a stab at working on this for couple of days, a fix was needed within the tool to allow binman to handle multiple consecutive templates which is needed here etc. which is why it did not work as is; but the built binaries are still not stable for boot. I think this will need some additional work and debugging. As of now, templating is not widely used, so I'm guessing some more minor fixes would be needed to get it building as we intend.

If you are okay, I think we can take this series as is for now, I will take action to start off a series cleaning up and using templating for all the devices.

Signature · 2 lines
Thanking You
Neha Malcom Francis
maintainer
#33 lore raw

Re: [PATCH v8 12/16] arm: dts: Introduce j784s4 u-boot dts files

On 14:33-20240215, Neha Malcom Francis wrote:
[...]

Quoted 15 lines
Quoted 5 lines

if the templates are abstract enough, the additional code will be so minimal that we wont need a board-binman.dtsi - just u-boot.dtsi and r5.dtsi can include the relevant templates.

Hope this helps.

So I took a stab at working on this for couple of days, a fix was needed within the tool to allow binman to handle multiple consecutive templates which is needed here etc. which is why it did not work as is; but the built binaries are still not stable for boot. I think this will need some additional work and debugging. As of now, templating is not widely used, so I'm guessing some more minor fixes would be needed to get it building as we intend.

Quoted 3 lines

If you are okay, I think we can take this series as is for now, I will take action to start off a series cleaning up and using templating for all the devices.

Sure, as long you can do this by the next window.

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

Re: [PATCH v8 12/16] arm: dts: Introduce j784s4 u-boot dts files

Hi Nishanth

Quoted 18 lines · Nishanth Menon

On 14:33-20240215, Neha Malcom Francis wrote:
[...]

Quoted 15 lines
Quoted 5 lines

if the templates are abstract enough, the additional code will be so minimal that we wont need a board-binman.dtsi - just u-boot.dtsi and r5.dtsi can include the relevant templates.

Hope this helps.

So I took a stab at working on this for couple of days, a fix was needed within the tool to allow binman to handle multiple consecutive templates which is needed here etc. which is why it did not work as is; but the built binaries are still not stable for boot. I think this will need some additional work and debugging. As of now, templating is not widely used, so I'm guessing some more minor fixes would be needed to get it building as we intend.

Quoted 6 lines
Quoted 3 lines

If you are okay, I think we can take this series as is for now, I will take action to start off a series cleaning up and using templating for all the devices.

Sure, as long you can do this by the next window.

Will do, thanks!

Signature · 2 lines
Thanking You
Neha Malcom Francis
#35 lore raw

PATCH v8 13/16 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 |  48 +++++++++++++
 board/ti/j784s4/MAINTAINERS         |   2 +
 4 files changed, 156 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 876802b88e..1c5a6662f6 100644
@@ -1412,6 +1412,7 @@ dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-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
 
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 +48 -0

48 lines not on this page · raw message

board/ti/j784s4/MAINTAINERS +2 -0
index ac6db23da5..53bc4bab03 100644
@@ -16,3 +16,5 @@ F:	arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi
 
 AM69 SK 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
Signature · 1 line
2.34.1
#36 lore raw

Re: [PATCH v8 13/16] arm: dts: Introduce am69-sk u-boot dts files

Quoted 110 lines · 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 |  48 +++++++++++++
 board/ti/j784s4/MAINTAINERS         |   2 +
 4 files changed, 156 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 876802b88e..1c5a6662f6 100644
@@ -1412,6 +1412,7 @@ dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-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
 
arch/arm/dts/k3-am69-r5-sk.dts new file +76 -0
new file mode 100644
index 0000000000..d2e73bd1bf
@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+
+#include "k3-am69-sk.dts"
+#include "k3-j784s4-ddr-evm-lp4-4266.dtsi"
+#include "k3-j784s4-ddr.dtsi"
+#include "k3-am69-sk-u-boot.dtsi"
+
+/ {
+	chosen {
+		tick-timer = &mcu_timer0;
+	};
+
+	aliases {
+		remoteproc0 = &sysctrler;
+		remoteproc1 = &a72_0;
+	};
+
+	a72_0: a72@0 {
+		compatible = "ti,am654-rproc";
+		reg = <0x0 0x00a90000 0x0 0x10>;
+		power-domains = <&k3_pds 61 TI_SCI_PD_EXCLUSIVE>,
+				<&k3_pds 202 TI_SCI_PD_EXCLUSIVE>;
+		resets = <&k3_reset 202 0>;
+		clocks = <&k3_clks 61 0>;
+		assigned-clocks = <&k3_clks 61 0>, <&k3_clks 202 0>;
+		assigned-clock-parents = <&k3_clks 61 2>;
+		assigned-clock-rates = <200000000>, <2000000000>;
+		ti,sci = <&sms>;
+		ti,sci-proc-id = <32>;
+		ti,sci-host-id = <10>;
+		bootph-pre-ram;
+	};
+
+	dm_tifs: dm-tifs {
+		compatible = "ti,j721e-dm-sci";
+		ti,host-id = <3>;
+		ti,secure-host;
+		mbox-names = "rx", "tx";
+		mboxes= <&secure_proxy_mcu 21>, <&secure_proxy_mcu 23>;
+		bootph-pre-ram;
+	};
+};
+
+&mcu_timer0 {
+	status = "okay";
+	clock-frequency = <250000000>;
+	bootph-pre-ram;
+};
+
+&secure_proxy_sa3 {
+	status = "okay";
+	bootph-pre-ram;
+};
+
+&secure_proxy_mcu {
+	status = "okay";
+	bootph-pre-ram;
+};
+
+&cbass_mcu_wakeup {
+	sysctrler: sysctrler {
+		compatible = "ti,am654-system-controller";
+		mboxes= <&secure_proxy_mcu 4>,
+			<&secure_proxy_mcu 5>,
+			<&secure_proxy_sa3 5>;
+		mbox-names = "tx", "rx", "boot_notify";
+		bootph-pre-ram;
+	};
+};
+
+&sms {

arch/arm/dts/k3-am69-r5-sk.dts line 86

Quoted 10 lines
arch/arm/dts/k3-am69-r5-sk.dts new file +10 -0
+	mboxes= <&secure_proxy_mcu 8>, <&secure_proxy_mcu 6>, <&secure_proxy_mcu 5>;
+	mbox-names = "tx", "rx", "notify";
+	ti,host-id = <4>;
+	ti,secure-host;
+	bootph-pre-ram;
+};
+
+&wkup_uart0 {
+	bootph-pre-ram;
+	status = "okay";

In k3-am69-sk.dts this is marked as reserved. Why do you need to enable it here? Maybe a comment would help readers.

Quoted 83 lines
arch/arm/dts/k3-am69-r5-sk.dts new file +19 -0
+};
+
+&ospi0 {
+	reg = <0x0 0x47040000 0x0 0x100>,
+	      <0x0 0x50000000 0x0 0x8000000>;
+};
+
+&ospi1 {
+	reg = <0x0 0x47050000 0x0 0x100>,
+	      <0x0 0x58000000 0x0 0x8000000>;
+};
+
+&mcu_ringacc {
+	ti,sci = <&dm_tifs>;
+};
+
+&mcu_udmap {
+	ti,sci = <&dm_tifs>;
+};
arch/arm/dts/k3-am69-sk-u-boot.dtsi new file +48 -0
new file mode 100644
index 0000000000..4f8c99a1e6
@@ -0,0 +1,48 @@
+// 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;
+	};
+};
+
+#ifdef CONFIG_TARGET_J784S4_A72_EVM
+
+#define SPL_AM69_SK_DTB "spl/dts/k3-am69-sk.dtb"
+#define AM69_SK_DTB "arch/arm/dts/k3-am69-sk.dtb"
+
+&spl_j784s4_evm_dtb {
+	filename = SPL_AM69_SK_DTB;
+};
+
+&j784s4_evm_dtb {
+	filename = AM69_SK_DTB;
+};
+
+&spl_j784s4_evm_dtb_unsigned {
+	filename = SPL_AM69_SK_DTB;
+};
+
+&j784s4_evm_dtb_unsigned {
+	filename = AM69_SK_DTB;
+};
+
+#endif
board/ti/j784s4/MAINTAINERS +2 -0
index ac6db23da5..53bc4bab03 100644
@@ -16,3 +16,5 @@ F:	arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi
 
 AM69 SK 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
Signature · 2 lines
cheers,
-roger
#37 lore raw

Re: [PATCH v8 13/16] arm: dts: Introduce am69-sk u-boot dts files

Quoted 116 lines · Roger Quadros
Quoted 114 lines · 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 |  48 +++++++++++++
  board/ti/j784s4/MAINTAINERS         |   2 +
  4 files changed, 156 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 876802b88e..1c5a6662f6 100644
@@ -1412,6 +1412,7 @@ dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-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
 
arch/arm/dts/k3-am69-r5-sk.dts new file +80 -0
new file mode 100644
index 0000000000..d2e73bd1bf
@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+
+#include "k3-am69-sk.dts"
+#include "k3-j784s4-ddr-evm-lp4-4266.dtsi"
+#include "k3-j784s4-ddr.dtsi"
+#include "k3-am69-sk-u-boot.dtsi"
+
+/ {
+	chosen {
+		tick-timer = &mcu_timer0;
+	};
+
+	aliases {
+		remoteproc0 = &sysctrler;
+		remoteproc1 = &a72_0;
+	};
+
+	a72_0: a72@0 {
+		compatible = "ti,am654-rproc";
+		reg = <0x0 0x00a90000 0x0 0x10>;
+		power-domains = <&k3_pds 61 TI_SCI_PD_EXCLUSIVE>,
+				<&k3_pds 202 TI_SCI_PD_EXCLUSIVE>;
+		resets = <&k3_reset 202 0>;
+		clocks = <&k3_clks 61 0>;
+		assigned-clocks = <&k3_clks 61 0>, <&k3_clks 202 0>;
+		assigned-clock-parents = <&k3_clks 61 2>;
+		assigned-clock-rates = <200000000>, <2000000000>;
+		ti,sci = <&sms>;
+		ti,sci-proc-id = <32>;
+		ti,sci-host-id = <10>;
+		bootph-pre-ram;
+	};
+
+	dm_tifs: dm-tifs {
+		compatible = "ti,j721e-dm-sci";
+		ti,host-id = <3>;
+		ti,secure-host;
+		mbox-names = "rx", "tx";
+		mboxes= <&secure_proxy_mcu 21>, <&secure_proxy_mcu 23>;
+		bootph-pre-ram;
+	};
+};
+
+&mcu_timer0 {
+	status = "okay";
+	clock-frequency = <250000000>;
+	bootph-pre-ram;
+};
+
+&secure_proxy_sa3 {
+	status = "okay";
+	bootph-pre-ram;
+};
+
+&secure_proxy_mcu {
+	status = "okay";
+	bootph-pre-ram;
+};
+
+&cbass_mcu_wakeup {
+	sysctrler: sysctrler {
+		compatible = "ti,am654-system-controller";
+		mboxes= <&secure_proxy_mcu 4>,
+			<&secure_proxy_mcu 5>,
+			<&secure_proxy_sa3 5>;
+		mbox-names = "tx", "rx", "boot_notify";
+		bootph-pre-ram;
+	};
+};
+
+&sms {
+	mboxes= <&secure_proxy_mcu 8>, <&secure_proxy_mcu 6>, <&secure_proxy_mcu 5>;
+	mbox-names = "tx", "rx", "notify";
+	ti,host-id = <4>;
+	ti,secure-host;
Quoted 8 lines

arch/arm/dts/k3-am69-r5-sk.dts line 86

Quoted 6 lines
arch/arm/dts/k3-am69-r5-sk.dts new file +6 -0
+	bootph-pre-ram;
+};
+
+&wkup_uart0 {
+	bootph-pre-ram;
+	status = "okay";

In k3-am69-sk.dts this is marked as reserved. Why do you need to enable it here? Maybe a comment would help readers.

Ohkay will fix.

Quoted 84 lines
Quoted 84 lines
arch/arm/dts/k3-am69-r5-sk.dts new file +19 -0
+};
+
+&ospi0 {
+	reg = <0x0 0x47040000 0x0 0x100>,
+	      <0x0 0x50000000 0x0 0x8000000>;
+};
+
+&ospi1 {
+	reg = <0x0 0x47050000 0x0 0x100>,
+	      <0x0 0x58000000 0x0 0x8000000>;
+};
+
+&mcu_ringacc {
+	ti,sci = <&dm_tifs>;
+};
+
+&mcu_udmap {
+	ti,sci = <&dm_tifs>;
+};
arch/arm/dts/k3-am69-sk-u-boot.dtsi new file +48 -0
new file mode 100644
index 0000000000..4f8c99a1e6
@@ -0,0 +1,48 @@
+// 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;
+	};
+};
+
+#ifdef CONFIG_TARGET_J784S4_A72_EVM
+
+#define SPL_AM69_SK_DTB "spl/dts/k3-am69-sk.dtb"
+#define AM69_SK_DTB "arch/arm/dts/k3-am69-sk.dtb"
+
+&spl_j784s4_evm_dtb {
+	filename = SPL_AM69_SK_DTB;
+};
+
+&j784s4_evm_dtb {
+	filename = AM69_SK_DTB;
+};
+
+&spl_j784s4_evm_dtb_unsigned {
+	filename = SPL_AM69_SK_DTB;
+};
+
+&j784s4_evm_dtb_unsigned {
+	filename = AM69_SK_DTB;
+};
+
+#endif
board/ti/j784s4/MAINTAINERS +2 -0
index ac6db23da5..53bc4bab03 100644
@@ -16,3 +16,5 @@ F:	arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi
 
  AM69 SK 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
Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
#38 lore raw

PATCH v8 14/16 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.

---
 board/ti/j784s4/MAINTAINERS      |   2 +
 configs/j784s4_evm_a72_defconfig | 158 +++++++++++++++++++++++++++++++
 configs/j784s4_evm_r5_defconfig  | 153 ++++++++++++++++++++++++++++++
 3 files changed, 313 insertions(+)
 create mode 100644 configs/j784s4_evm_a72_defconfig
 create mode 100644 configs/j784s4_evm_r5_defconfig
board/ti/j784s4/MAINTAINERS +2 -0
index 53bc4bab03..4433ead66b 100644
@@ -4,6 +4,8 @@ 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
configs/j784s4_evm_a72_defconfig new file +158 -0

158 lines not on this page · raw message

configs/j784s4_evm_r5_defconfig new file +153 -0

153 lines not on this page · raw message

Signature · 1 line
2.34.1
#39 lore raw

PATCH v8 15/16 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

---
 board/ti/j784s4/MAINTAINERS | 2 ++
 configs/am69_sk_a72.config  | 5 +++++
 configs/am69_sk_r5.config   | 5 +++++
 3 files changed, 12 insertions(+)
 create mode 100644 configs/am69_sk_a72.config
 create mode 100644 configs/am69_sk_r5.config
board/ti/j784s4/MAINTAINERS +2 -0
index 4433ead66b..69be13f533 100644
@@ -20,3 +20,5 @@ AM69 SK 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
configs/am69_sk_a72.config new file +5 -0
new file mode 100644
index 0000000000..03e74a8a56
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_a72_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-sk"
+CONFIG_OF_LIST="k3-am69-sk"
configs/am69_sk_r5.config new file +5 -0
new file mode 100644
index 0000000000..c42b6f3380
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_r5_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-r5-sk"
+CONFIG_OF_LIST="k3-am69-r5-sk"
Signature · 1 line
2.34.1
#40 lore raw

Re: [PATCH v8 15/16] configs: Add am69_sk_* defconfig fragments

configs/am69_sk_a72.config

Quoted 42 lines · 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

---
  board/ti/j784s4/MAINTAINERS | 2 ++
  configs/am69_sk_a72.config  | 5 +++++
  configs/am69_sk_r5.config   | 5 +++++
  3 files changed, 12 insertions(+)

create mode 100644 configs/am69_sk_a72.config
create mode 100644 configs/am69_sk_r5.config

board/ti/j784s4/MAINTAINERS +2 -0
index 4433ead66b..69be13f533 100644
@@ -20,3 +20,5 @@ AM69 SK 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
configs/am69_sk_a72.config new file +0 -0
new file mode 100644
index 0000000000..03e74a8a56

Just going to ignore the comments on v7 about putting this in board/ti/..?

Anyway, we can now do includes in defconfigs, so no config fragments needed, you can just add configs/am69_evm_a72_defconfig with the content:

```
#include <configs/j784s4_evm_a72_defconfig>

CONFIG_ARM=y
CONFIG_ARCH_K3=y
CONFIG_SOC_K3_J784S4=y
CONFIG_TARGET_J784S4_A72_EVM=y

CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
CONFIG_SPL_OF_LIST="k3-am69-sk"
CONFIG_OF_LIST="k3-am69-sk"
```

(note we need to duplicate the _ARM/_TARGET currently to not confuse buildman which seems to directly parse the configs for arch detection).

Andrew

Quoted 17 lines
configs/am69_sk_a72.config new file +5 -0
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_a72_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-sk"
+CONFIG_OF_LIST="k3-am69-sk"
configs/am69_sk_r5.config new file +5 -0
new file mode 100644
index 0000000000..c42b6f3380
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_r5_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-r5-sk"
+CONFIG_OF_LIST="k3-am69-r5-sk"
#41 lore raw

Re: [PATCH v8 15/16] configs: Add am69_sk_* defconfig fragments

Hi Andrew,

Quoted 38 lines · Andrew Davis
Quoted 37 lines · 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

---
  board/ti/j784s4/MAINTAINERS | 2 ++
  configs/am69_sk_a72.config  | 5 +++++
  configs/am69_sk_r5.config   | 5 +++++

  3 files changed, 12 insertions(+)

  create mode 100644 configs/am69_sk_a72.config
  create mode 100644 configs/am69_sk_r5.config

board/ti/j784s4/MAINTAINERS +0 -0
index 4433ead66b..69be13f533 100644
@@ -20,3 +20,5 @@ AM69 SK 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

board/ti/j784s4/MAINTAINERS +2 -0
+F:    configs/am69_sk_r5.config
+F:    configs/am69_sk_a72.config
Quoted 9 lines

configs/am69_sk_a72.config

Quoted 5 lines
configs/am69_sk_a72.config new file +0 -0
new file mode 100644
index 0000000000..03e74a8a56

Just going to ignore the comments on v7 about putting this in board/ti/..?

Sorry, somehow this got missed. Thanks for bringing up.

Quoted 17 lines

Anyway, we can now do includes in defconfigs, so no config fragments needed, you can just add configs/am69_evm_a72_defconfig with the content:

```
#include <configs/j784s4_evm_a72_defconfig>

CONFIG_ARM=y
CONFIG_ARCH_K3=y
CONFIG_SOC_K3_J784S4=y
CONFIG_TARGET_J784S4_A72_EVM=y

CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
CONFIG_SPL_OF_LIST="k3-am69-sk"
CONFIG_OF_LIST="k3-am69-sk"
```
Quoted 4 lines

(note we need to duplicate the _ARM/_TARGET currently to not confuse buildman which seems to directly parse the configs for arch detection).

I tried it, but I don't think this works as '#' signifies a comment in defconfig, isn't that true?

Quoted 19 lines

Andrew

Quoted 17 lines
configs/am69_sk_a72.config new file +5 -0
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_a72_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-sk"
+CONFIG_OF_LIST="k3-am69-sk"
configs/am69_sk_r5.config new file +5 -0
new file mode 100644
index 0000000000..c42b6f3380
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_r5_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-r5-sk"
+CONFIG_OF_LIST="k3-am69-r5-sk"
Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
#42 lore raw

Re: [PATCH v8 15/16] configs: Add am69_sk_* defconfig fragments

Quoted 71 lines · Apurva Nandan

Hi Andrew,

Quoted 38 lines · Andrew Davis
Quoted 37 lines · 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

---
  board/ti/j784s4/MAINTAINERS | 2 ++
  configs/am69_sk_a72.config  | 5 +++++
  configs/am69_sk_r5.config   | 5 +++++

  3 files changed, 12 insertions(+)

  create mode 100644 configs/am69_sk_a72.config
  create mode 100644 configs/am69_sk_r5.config

board/ti/j784s4/MAINTAINERS +0 -0
index 4433ead66b..69be13f533 100644
@@ -20,3 +20,5 @@ AM69 SK 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

board/ti/j784s4/MAINTAINERS +2 -0
+F:    configs/am69_sk_r5.config
+F:    configs/am69_sk_a72.config
Quoted 9 lines

configs/am69_sk_a72.config

Quoted 5 lines
configs/am69_sk_a72.config new file +0 -0
new file mode 100644
index 0000000000..03e74a8a56

Just going to ignore the comments on v7 about putting this in board/ti/..?

Sorry, somehow this got missed. Thanks for bringing up.

Quoted 17 lines

Anyway, we can now do includes in defconfigs, so no config fragments needed, you can just add configs/am69_evm_a72_defconfig with the content:

```
#include <configs/j784s4_evm_a72_defconfig>

CONFIG_ARM=y
CONFIG_ARCH_K3=y
CONFIG_SOC_K3_J784S4=y
CONFIG_TARGET_J784S4_A72_EVM=y

CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
CONFIG_SPL_OF_LIST="k3-am69-sk"
CONFIG_OF_LIST="k3-am69-sk"
```
Quoted 7 lines
Quoted 4 lines

(note we need to duplicate the _ARM/_TARGET currently to not confuse buildman which seems to directly parse the configs for arch detection).

I tried it, but I don't think this works as '#' signifies a comment in defconfig, isn't that true?

The ability to do this was just added recently, try it again :)

Andrew

Quoted 21 lines
Quoted 20 lines

Andrew

Quoted 17 lines
configs/am69_sk_a72.config new file +5 -0
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_a72_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-sk"
+CONFIG_OF_LIST="k3-am69-sk"
configs/am69_sk_r5.config new file +5 -0
new file mode 100644
index 0000000000..c42b6f3380
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_r5_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-r5-sk"
+CONFIG_OF_LIST="k3-am69-r5-sk"
#43 lore raw

Re: [PATCH v8 15/16] configs: Add am69_sk_* defconfig fragments

Quoted 77 lines · Andrew Davis
Quoted 76 lines · Apurva Nandan

Hi Andrew,

Quoted 38 lines · Andrew Davis
Quoted 37 lines · 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

---
  board/ti/j784s4/MAINTAINERS | 2 ++
  configs/am69_sk_a72.config  | 5 +++++
  configs/am69_sk_r5.config   | 5 +++++

  3 files changed, 12 insertions(+)

  create mode 100644 configs/am69_sk_a72.config
  create mode 100644 configs/am69_sk_r5.config

board/ti/j784s4/MAINTAINERS +0 -0
index 4433ead66b..69be13f533 100644
@@ -20,3 +20,5 @@ AM69 SK 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

board/ti/j784s4/MAINTAINERS +2 -0
+F:    configs/am69_sk_r5.config
+F:    configs/am69_sk_a72.config
Quoted 9 lines

configs/am69_sk_a72.config

Quoted 5 lines
configs/am69_sk_a72.config new file +0 -0
new file mode 100644
index 0000000000..03e74a8a56

Just going to ignore the comments on v7 about putting this in board/ti/..?

Sorry, somehow this got missed. Thanks for bringing up.

Quoted 21 lines

Anyway, we can now do includes in defconfigs, so no config fragments needed, you can just add configs/am69_evm_a72_defconfig with the content:

```
#include <configs/j784s4_evm_a72_defconfig>

CONFIG_ARM=y
CONFIG_ARCH_K3=y
CONFIG_SOC_K3_J784S4=y
CONFIG_TARGET_J784S4_A72_EVM=y

CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
CONFIG_SPL_OF_LIST="k3-am69-sk"
CONFIG_OF_LIST="k3-am69-sk"
```

(note we need to duplicate the _ARM/_TARGET currently to not confuse buildman which seems to directly parse the configs for arch detection).

Quoted 7 lines
Quoted 2 lines

I tried it, but I don't think this works as '#' signifies a comment in defconfig, isn't that true?

The ability to do this was just added recently, try it again :)

Andrew

Actually, I tried on the latest uboot next, but I still don't see things being included from j784s4_evm_a72_defconfig

Can you point to the commit where this was introduced?

Quoted 21 lines
Quoted 21 lines
Quoted 20 lines

Andrew

Quoted 17 lines
configs/am69_sk_a72.config new file +5 -0
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_a72_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-sk"
+CONFIG_OF_LIST="k3-am69-sk"
configs/am69_sk_r5.config new file +5 -0
new file mode 100644
index 0000000000..c42b6f3380
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_r5_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-r5-sk"
+CONFIG_OF_LIST="k3-am69-r5-sk"
Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.
#44 lore raw

Re: [PATCH v8 15/16] configs: Add am69_sk_* defconfig fragments

Quoted 82 lines · Apurva Nandan
Quoted 80 lines · Andrew Davis
Quoted 78 lines · Apurva Nandan

Hi Andrew,

Quoted 38 lines · Andrew Davis
Quoted 37 lines · 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

---
  board/ti/j784s4/MAINTAINERS | 2 ++
  configs/am69_sk_a72.config  | 5 +++++
  configs/am69_sk_r5.config   | 5 +++++

  3 files changed, 12 insertions(+)

  create mode 100644 configs/am69_sk_a72.config
  create mode 100644 configs/am69_sk_r5.config

board/ti/j784s4/MAINTAINERS +0 -0
index 4433ead66b..69be13f533 100644
@@ -20,3 +20,5 @@ AM69 SK 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

board/ti/j784s4/MAINTAINERS +2 -0
+F:    configs/am69_sk_r5.config
+F:    configs/am69_sk_a72.config
Quoted 9 lines

configs/am69_sk_a72.config

Quoted 5 lines
configs/am69_sk_a72.config new file +0 -0
new file mode 100644
index 0000000000..03e74a8a56

Just going to ignore the comments on v7 about putting this in board/ti/..?

Sorry, somehow this got missed. Thanks for bringing up.

Quoted 17 lines

Anyway, we can now do includes in defconfigs, so no config fragments needed, you can just add configs/am69_evm_a72_defconfig with the content:

```
#include <configs/j784s4_evm_a72_defconfig>

CONFIG_ARM=y
CONFIG_ARCH_K3=y
CONFIG_SOC_K3_J784S4=y
CONFIG_TARGET_J784S4_A72_EVM=y

CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
CONFIG_SPL_OF_LIST="k3-am69-sk"
CONFIG_OF_LIST="k3-am69-sk"
```
Quoted 4 lines

(note we need to duplicate the _ARM/_TARGET currently to not confuse buildman which seems to directly parse the configs for arch detection).

I tried it, but I don't think this works as '#' signifies a comment in defconfig, isn't that true?

Quoted 8 lines
Quoted 4 lines

The ability to do this was just added recently, try it again :)

Andrew

Actually, I tried on the latest uboot next, but I still don't see things being included from j784s4_evm_a72_defconfig

Can you point to the commit where this was introduced?

https://source.denx.de/u-boot/u-boot/-/commit/2027e99e61aab6fd8b06e2d752e0e538cff26eb6

Andrew

Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 21 lines

Andrew

Quoted 17 lines
configs/am69_sk_a72.config new file +5 -0
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_a72_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-sk"
+CONFIG_OF_LIST="k3-am69-sk"
configs/am69_sk_r5.config new file +5 -0
new file mode 100644
index 0000000000..c42b6f3380
@@ -0,0 +1,5 @@
+# Defconfig fragment to apply on top of j784s4_evm_r5_defconfig
+
+CONFIG_DEFAULT_DEVICE_TREE="k3-am69-sk"
+CONFIG_SPL_OF_LIST="k3-am69-r5-sk"
+CONFIG_OF_LIST="k3-am69-r5-sk"
#45 lore raw

PATCH v8 16/16 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.

---
 board/ti/j784s4/MAINTAINERS |   1 +
 doc/board/ti/j784s4_evm.rst | 299 ++++++++++++++++++++++++++++++++++++
 doc/board/ti/k3.rst         |   1 +
 3 files changed, 301 insertions(+)
 create mode 100644 doc/board/ti/j784s4_evm.rst
board/ti/j784s4/MAINTAINERS +1 -0
index 69be13f533..f61ecce632 100644
@@ -15,6 +15,7 @@ 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 SK BOARD
 F:	arch/arm/dts/k3-am69-sk.dts
doc/board/ti/j784s4_evm.rst new file +299 -0

299 lines not on this page · raw message

doc/board/ti/k3.rst +1 -0
index 7dfe39c5fa..93168b9cc2 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
#46 lore raw

Re: [PATCH v8 16/16] doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation

Quoted 12 lines · Apurva Nandan

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

---
 board/ti/j784s4/MAINTAINERS |   1 +
 doc/board/ti/j784s4_evm.rst | 299 ++++++++++++++++++++++++++++++++++++
 doc/board/ti/k3.rst         |   1 +
 3 files changed, 301 insertions(+)
 create mode 100644 doc/board/ti/j784s4_evm.rst

<snip>

Quoted 12 lines
doc/board/ti/j784s4_evm.rst new file +12 -0
+
+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 EVM platform.

doc/board/ti/j784s4_evm.rst line 227

Quoted 10 lines
doc/board/ti/j784s4_evm.rst new file +10 -0
+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

According to spruj62 I think SW9 and SW8 are supposed to be SW7 and SW11 respectively?

Quoted 8 lines
doc/board/ti/j784s4_evm.rst new file +8 -0
+
+   * - SD
+     - 00000000
+     - 10000010
+
+   * - EMMC
+     - 01000000
+     - 10000000

doc/board/ti/j784s4_evm.rst line 245

Quoted 10 lines
doc/board/ti/j784s4_evm.rst new file +10 -0
+
+   * - OSPI
+     - 01000000
+     - 00000110
+
+   * - UART
+     - 01110000
+     - 00000000
+
+For SW8 and SW9, the switch state in the "ON" position = 1.

Referencing more from spruj62...

SW8 is a push button for a user defined interrupt for wake up (I think), and SW9 is the main domain warm reset push button.

I'm not sure either of those are what you're trying to highlight here.

Love the TI documentation by the way, it is very nice.

Thanks,
Andrew

#47 lore raw

Re: [PATCH v8 16/16] doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation

Quoted 60 lines · Andrew Halaney
Quoted 12 lines · Apurva Nandan

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

---
  board/ti/j784s4/MAINTAINERS |   1 +
  doc/board/ti/j784s4_evm.rst | 299 ++++++++++++++++++++++++++++++++++++
  doc/board/ti/k3.rst         |   1 +
  3 files changed, 301 insertions(+)

create mode 100644 doc/board/ti/j784s4_evm.rst

<snip>

Quoted 12 lines
doc/board/ti/j784s4_evm.rst new file +12 -0
+
+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 EVM platform.

doc/board/ti/j784s4_evm.rst line 227

Quoted 10 lines
doc/board/ti/j784s4_evm.rst new file +10 -0
+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

According to spruj62 I think SW9 and SW8 are supposed to be SW7 and SW11 respectively?

Quoted 8 lines
doc/board/ti/j784s4_evm.rst new file +8 -0
+
+   * - SD
+     - 00000000
+     - 10000010
+
+   * - EMMC
+     - 01000000
+     - 10000000

doc/board/ti/j784s4_evm.rst line 245

Quoted 10 lines
doc/board/ti/j784s4_evm.rst new file +10 -0
+
+   * - OSPI
+     - 01000000
+     - 00000110
+
+   * - UART
+     - 01110000
+     - 00000000
+
+For SW8 and SW9, the switch state in the "ON" position = 1.

Referencing more from spruj62...

Quoted 4 lines

SW8 is a push button for a user defined interrupt for wake up (I think), and SW9 is the main domain warm reset push button.

I'm not sure either of those are what you're trying to highlight here.

Thanks for highlighting, I will fix it.

Quoted 1 line

Love the TI documentation by the way, it is very nice.

Great to hear, that you found it useful :)

Quoted 2 lines

Thanks,
Andrew

Signature · 3 lines
Regards,
Apurva Nandan,
Texas Instruments.