arm: dts: k3-am62p5: enable the wkup i2c bus
Subsystems (8)
PATCH v2 4/13 ram: k3-ddrss: enable the am62ax's DDR controller for am62px
In reply to Bryan BrattlofThe am62px family of SoCs uses the same DDR controller as found on the am62ax family. Enable this option when building for the am62px family
--- drivers/ram/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ram/Kconfig +1 -1
@@ -65,7 +65,7 @@ choice default K3_J721E_DDRSS if SOC_K3_J721E || SOC_K3_J721S2 default K3_AM64_DDRSS if SOC_K3_AM642 default K3_AM64_DDRSS if SOC_K3_AM625 - default K3_AM62A_DDRSS if SOC_K3_AM62A7 + default K3_AM62A_DDRSS if SOC_K3_AM62A7 || SOC_K3_AM62P5 config K3_J721E_DDRSS bool "Enable J721E DDRSS support"
Signature · 1 line
2.43.0
PATCH 1/1 arm: dts: k3-am62p5: enable the wkup i2c bus
The PMIC for the am62p5-sk is connected to the i2c bus on the wakeup island. While we do not have a driver yet, enable it anyway so we can begin development of the driver and characterization of the board.
--- arch/arm/dts/k3-am62p5-sk.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/dts/k3-am62p5-sk.dts +14 -0
@@ -790,6 +790,13 @@ &mcu_pmx0 { bootph-all; + wkup_i2c0_pins_default: wkup-i2c0-default-pins { + pinctrl-single,pins = < + AM62PX_MCU_IOPAD(0x04c, PIN_INPUT, 0) /* (A13) WKUP_I2C0_SCL */ + AM62PX_MCU_IOPAD(0x050, PIN_INPUT, 0) /* (C11) WKUP_I2C0_SDA */ + >; + }; + wkup_uart0_pins_default: wkup-uart0-default-pins { pinctrl-single,pins = < AM62PX_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C7) WKUP_UART0_CTSn */
@@ -801,6 +808,13 @@ }; }; +&wkup_i2c0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&wkup_i2c0_pins_default>; + clock-frequency = <400000>; +}; + &wkup_uart0 { /* WKUP UART0 is used by DM firmware */ pinctrl-names = "default";
base-commit: b0d717b732ee28e446baf94522b3491e590f7fbb
Signature · 1 line
2.43.0
PATCH v2 12/13 configs: introduce configs needed for the am62px
Introduce the initial configs needed to support the am62px SoC family
--- configs/am62px_evm_a53_defconfig | 178 +++++++++++++++++++++++++++++++ configs/am62px_evm_r5_defconfig | 137 ++++++++++++++++++++++++ include/configs/am62px_evm.h | 14 +++ 3 files changed, 329 insertions(+) create mode 100644 configs/am62px_evm_a53_defconfig create mode 100644 configs/am62px_evm_r5_defconfig create mode 100644 include/configs/am62px_evm.h
configs/am62px_evm_a53_defconfig new file +178 -0
@@ -0,0 +1,178 @@ +CONFIG_ARM=y +CONFIG_ARCH_K3=y +CONFIG_TI_SECURE_DEVICE=y +CONFIG_SYS_MALLOC_F_LEN=0x8000 +CONFIG_SPL_GPIO=y +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_SOC_K3_AM62P5=y +CONFIG_K3_ATF_LOAD_ADDR=0x9e780000 +CONFIG_TARGET_AM62P5_A53_EVM=y +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000 +CONFIG_SF_DEFAULT_SPEED=25000000 +CONFIG_ENV_SIZE=0x40000 +CONFIG_DM_GPIO=y +CONFIG_SPL_DM_SPI=y +CONFIG_OF_UPSTREAM=y +CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am62p5-sk" +CONFIG_SPL_TEXT_BASE=0x80080000 +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_DM_RESET=y +CONFIG_SPL_MMC=y +CONFIG_SPL_SERIAL=y +CONFIG_SPL_STACK_R_ADDR=0x82000000 +CONFIG_SPL_FS_FAT=y +CONFIG_SPL_LIBDISK_SUPPORT=y +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI=y +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 +CONFIG_BOOTSTD_FULL=y +CONFIG_BOOTSTD_DEFAULTS=y +CONFIG_BOOTCOMMAND="run envboot; bootflow scan -lb" +CONFIG_SPL_MAX_SIZE=0x58000 +CONFIG_SPL_PAD_TO=0x0 +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +CONFIG_SPL_BSS_START_ADDR=0x80a00000 +CONFIG_SPL_BSS_MAX_SIZE=0x80000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_STACK_R=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 +CONFIG_SPL_DMA=y +CONFIG_SPL_ENV_SUPPORT=y +CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img" +CONFIG_SPL_I2C=y +CONFIG_SPL_DM_MAILBOX=y +CONFIG_SPL_MTD_SUPPORT=y +CONFIG_SPL_DM_SPI_FLASH=y +CONFIG_SPL_POWER_DOMAIN=y +CONFIG_SPL_RAM_SUPPORT=y +CONFIG_SPL_RAM_DEVICE=y +# CONFIG_SPL_SPI_FLASH_TINY is not set +CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPL_SPI_LOAD=y +CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000 +CONFIG_SPL_THERMAL=y +CONFIG_SPL_YMODEM_SUPPORT=y +CONFIG_SYS_MAXARGS=64 +CONFIG_CMD_CLK=y +CONFIG_CMD_DFU=y +CONFIG_CMD_DM=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_GPT=y +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +CONFIG_CMD_MTD=y +CONFIG_CMD_REMOTEPROC=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_TIME=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_MTDPARTS=y +CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_MULTI_DTB_FIT=y +CONFIG_SPL_MULTI_DTB_FIT=y +CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SPL_DM=y +CONFIG_SPL_DM_DEVICE_REMOVE=y +CONFIG_SPL_DM_SEQ_ALIAS=y +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_SPL_SYSCON=y +CONFIG_SPL_OF_TRANSLATE=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_CLK_TI_SCI=y +CONFIG_DFU_MMC=y +CONFIG_DFU_MTD=y +CONFIG_DFU_RAM=y +CONFIG_DFU_SF=y +CONFIG_SYS_DFU_DATA_BUF_SIZE=0x40000 +CONFIG_SYS_DFU_MAX_FILE_SIZE=0x800000 +CONFIG_DMA_CHANNELS=y +CONFIG_TI_K3_NAVSS_UDMA=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0xC0000000 +CONFIG_FASTBOOT_BUF_SIZE=0x2F000000 +CONFIG_TI_SCI_PROTOCOL=y +CONFIG_SPL_DM_GPIO_LOOKUP_LABEL=y +CONFIG_DA8XX_GPIO=y +CONFIG_DM_PCA953X=y +CONFIG_SPL_DM_PCA953X=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_OMAP24XX=y +CONFIG_DM_MAILBOX=y +CONFIG_K3_SEC_PROXY=y +CONFIG_I2C_EEPROM=y +CONFIG_SPL_I2C_EEPROM=y +CONFIG_FS_LOADER=y +CONFIG_SUPPORT_EMMC_BOOT=y +CONFIG_MMC_IO_VOLTAGE=y +CONFIG_SPL_MMC_IO_VOLTAGE=y +CONFIG_MMC_HS400_SUPPORT=y +CONFIG_SPL_MMC_HS400_SUPPORT=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_ADMA=y +CONFIG_SPL_MMC_SDHCI_ADMA=y +CONFIG_MMC_SDHCI_AM654=y +CONFIG_MTD=y +CONFIG_DM_MTD=y +CONFIG_MTD_SPI_NAND=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_SOFT_RESET=y +CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_S28HX_T=y +CONFIG_PHY_TI_DP83867=y +CONFIG_TI_AM65_CPSW_NUSS=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y +CONFIG_PINCTRL_SINGLE=y +CONFIG_POWER_DOMAIN=y +CONFIG_TI_SCI_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y +CONFIG_SPL_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_SPL_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_GPIO=y +CONFIG_SPL_DM_REGULATOR_GPIO=y +CONFIG_K3_SYSTEM_CONTROLLER=y +CONFIG_REMOTEPROC_TI_K3_ARM64=y +CONFIG_REMOTEPROC_TI_K3_DSP=y +CONFIG_REMOTEPROC_TI_K3_R5F=y +CONFIG_RESET_TI_SCI=y +CONFIG_DM_SERIAL=y +CONFIG_SOC_DEVICE=y +CONFIG_SOC_DEVICE_TI_K3=y +CONFIG_SOC_TI=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_CADENCE_QSPI=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_TI_SCI=y +CONFIG_DM_THERMAL=y +CONFIG_USB=y +CONFIG_DM_USB_GADGET=y +CONFIG_SPL_DM_USB_GADGET=y +CONFIG_SPL_USB_HOST=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GENERIC=y +CONFIG_SPL_USB_DWC3_GENERIC=y +CONFIG_SPL_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_SPL_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" +CONFIG_USB_GADGET_VENDOR_NUM=0x0451 +CONFIG_USB_GADGET_PRODUCT_NUM=0x6165 +CONFIG_SPL_DFU=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
configs/am62px_evm_r5_defconfig new file +137 -0
137 lines not on this page · raw message
include/configs/am62px_evm.h new file +14 -0
@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Configuration header file for K3 AM62Px SoC family +* +* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ +*/ + +#ifndef __CONFIG_AM62PX_EVM_H +#define __CONFIG_AM62PX_EVM_H + +/* Now for the remaining common defines */ +#include <configs/ti_armv7_common.h> + +#endif /* __CONFIG_AM62PX_EVM_H */
Signature · 1 line
2.43.0
PATCH v2 1/13 soc: add info to identify the am62p SoC family
In reply to Bryan BrattlofInclude the part number for TI's am62px family of SoCs so we can properly identify it during boot
--- arch/arm/mach-k3/include/mach/hardware.h | 2 ++ drivers/soc/soc_ti_k3.c | 3 +++ 2 files changed, 5 insertions(+)
arch/arm/mach-k3/include/mach/hardware.h +2 -0
@@ -46,6 +46,7 @@#define JTAG_ID_PARTNO_J721S2 0xbb75#define JTAG_ID_PARTNO_AM62X 0xbb7e#define JTAG_ID_PARTNO_AM62AX 0xbb8d +#define JTAG_ID_PARTNO_AM62PX 0xbb9d#define K3_SOC_ID (id,ID ) \ static inline bool soc_is_##id(void) \
@@ -61,6 +62,7 @@ K3_SOC_ID(am64x, AM64X) K3_SOC_ID(j721s2, J721S2) K3_SOC_ID(am62x, AM62X) K3_SOC_ID(am62ax, AM62AX) +K3_SOC_ID(am62px, AM62PX)#define K3_SEC_MGR_SYS_STATUS 0x44234100#define SYS_STATUS_DEV_TYPE_SHIFT 0
drivers/soc/soc_ti_k3.c +3 -0
@@ -45,6 +45,9 @@ static const char *get_family_string(u32 idreg)case JTAG_ID_PARTNO_AM62AX : family ="AM62AX" ;break ; +case JTAG_ID_PARTNO_AM62PX : + family ="AM62PX" ; +break ;default : family ="Unknown Silicon" ; };
Signature · 1 line
2.43.0
v2 cover Introduce basic support for TI's AM62Px SoC family
In reply to Bryan BrattlofHello Again Everyone!
**Note:** This series depends on the OF_UPSTREAM work from Sumit [0]. Patch #11 was added to fix some Makefile.spl targets to allow SPL builds to complete with the OF_UPSTREAM series.
The AM62Px is an extension of the existing Sitara AM62x low-cost family of application processors built for Automotive and Linux Application development. Scalable Arm Cortex-A53 performance and embedded features, such as: multi high-definition display support, 3D-graphics acceleration, 4K video acceleration, and extensive peripherals make the AM62Px well-suited for a broad range of automation and industrial application, including automotive digital instrumentation, automotive displays, industrial HMI, and more.
Some highlights of AM62P SoC are:
* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. Dual/Single core variants are provided in the same package to allow HW compatible designs.
* One Device manager Cortex-R5F for system power and resource management, and one Cortex-R5F for Functional Safety or general-purpose usage.
* One 3D GPU up to 50 GLFOPS
* H.264/H.265 Video Encode/Decode.
* Display support: 3x display support over OLDI/LVDS (1x OLDI-DL, 1x or 2x OLDI-SL), DSI, or DPI. Up to 3840x1080 @ 60fps resolution
* Integrated Giga-bit Ethernet switch supporting up to a total of two external ports (TSN capable).
* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3xMMC and SD, GPMC for NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, 1xCSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals.
* Dedicated Centralized Hardware Security Module with support for secure boot, debug security and crypto acceleration and trusted execution environment.
* One 32-bit DDR Subsystem that supports LPDDR4, DDR4 memory types.
* Multiple low power modes support, ex: Deep sleep, Standby, MCU-only, enabling battery powered system design.
For those interested, more details about this SoC can be found in the Technical Reference Manual here: https://www.ti.com/lit/pdf/spruj83
Proof-of-Life: https://paste.sr.ht/~bryanb/af2ac108a9362549aa326f182e87918d52bf2d71
Currently, while more peripherals are being added in Linux[0], this series will only support UART boot.
Thanks for reviewing!
~Bryan
Changes from v1: [1]
- squashed all clk and lpsc tree updates into a single commit
- corrected SOC_K3_AM642 typo with DM firmware Kconfig option
- updated RM configs and dma nodes to enable IP that need DMA
- added the dtb targets to the dts/Makefile
- rebased the series on top of v2024.01-rc1
- switched to bootstd rather than use distro boot scripts.
- enabled OF_UPSTREAM instead of using the arch/arm/dts directory
[0] https://lore.kernel.org/u-boot/[email protected]/
[1] https://lore.kernel.org/all/[email protected]/
Bryan Brattlof (11):
soc: add info to identify the am62p SoC family
power: domain: ti: use IS_ENABLED macro
arm: mach-k3: am62px: introduce clock and device files for wkup spl
ram: k3-ddrss: enable the am62ax's DDR controller for am62px
arm: mach-k3: invert logic for split DM firmware config
arch: mach-k3: introduce basic files to support the am62px SoC family
board: ti: introduce basic board files for the am62px family
arm: dts: introduce am62p5 uboot dts files
Makefile: remove hardcoded device tree source directory
configs: introduce configs needed for the am62px
doc: board: ti: introduce am62px documentation
Hari Nagalla (1):
firmware: ti_sci_static_data: add static DMA channel data
Vignesh Raghavendra (1):
dma: ti: k3-udma: Add DMA PSIL mappings for AM62P and J722S
Makefile | 18 +- arch/arm/dts/Makefile | 2 + arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi | 2800 +++++++++++++++++ arch/arm/dts/k3-am62p-sk-binman.dtsi | 173 + arch/arm/dts/k3-am62p5-r5-sk.dts | 101 + arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 49 + arch/arm/mach-k3/Kconfig | 9 +- arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/am62p5_init.c | 280 ++ arch/arm/mach-k3/am62px/Kconfig | 32 + .../arm/mach-k3/include/mach/am62p_hardware.h | 83 + arch/arm/mach-k3/include/mach/am62p_spl.h | 49 + arch/arm/mach-k3/include/mach/hardware.h | 6 + arch/arm/mach-k3/include/mach/spl.h | 4 + arch/arm/mach-k3/r5/Makefile | 1 + arch/arm/mach-k3/r5/am62px/Makefile | 6 + arch/arm/mach-k3/r5/am62px/clk-data.c | 325 ++ arch/arm/mach-k3/r5/am62px/dev-data.c | 71 + board/ti/am62px/Kconfig | 26 + board/ti/am62px/MAINTAINERS | 9 + board/ti/am62px/Makefile | 7 + board/ti/am62px/am62px.env | 16 + board/ti/am62px/board-cfg.yaml | 37 + board/ti/am62px/evm.c | 29 + board/ti/am62px/pm-cfg.yaml | 12 + board/ti/am62px/rm-cfg.yaml | 987 ++++++ board/ti/am62px/sec-cfg.yaml | 378 +++ board/ti/am62px/tifs-rm-cfg.yaml | 879 ++++++ configs/am62px_evm_a53_defconfig | 178 ++ configs/am62px_evm_r5_defconfig | 137 + doc/board/ti/am62px_sk.rst | 289 ++ doc/board/ti/k3.rst | 1 + drivers/clk/ti/clk-k3.c | 6 + drivers/dma/ti/Makefile | 2 + drivers/dma/ti/k3-psil-am62p.c | 325 ++ drivers/dma/ti/k3-psil-priv.h | 1 + drivers/dma/ti/k3-psil.c | 4 + drivers/firmware/ti_sci_static_data.h | 5 +- drivers/power/domain/ti-power-domain.c | 13 +- drivers/ram/Kconfig | 2 +- drivers/soc/soc_ti_k3.c | 3 + dts/arch/arm64/ti | 1 + include/configs/am62px_evm.h | 14 + include/k3-clk.h | 1 + include/k3-dev.h | 1 + scripts/Makefile.spl | 17 +- 46 files changed, 7374 insertions(+), 16 deletions(-) create mode 100644 arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi create mode 100644 arch/arm/dts/k3-am62p-sk-binman.dtsi create mode 100644 arch/arm/dts/k3-am62p5-r5-sk.dts create mode 100644 arch/arm/dts/k3-am62p5-sk-u-boot.dtsi create mode 100644 arch/arm/mach-k3/am62p5_init.c create mode 100644 arch/arm/mach-k3/am62px/Kconfig create mode 100644 arch/arm/mach-k3/include/mach/am62p_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/am62p_spl.h create mode 100644 arch/arm/mach-k3/r5/am62px/Makefile create mode 100644 arch/arm/mach-k3/r5/am62px/clk-data.c create mode 100644 arch/arm/mach-k3/r5/am62px/dev-data.c create mode 100644 board/ti/am62px/Kconfig create mode 100644 board/ti/am62px/MAINTAINERS create mode 100644 board/ti/am62px/Makefile create mode 100644 board/ti/am62px/am62px.env create mode 100644 board/ti/am62px/board-cfg.yaml create mode 100644 board/ti/am62px/evm.c create mode 100644 board/ti/am62px/pm-cfg.yaml create mode 100644 board/ti/am62px/rm-cfg.yaml create mode 100644 board/ti/am62px/sec-cfg.yaml create mode 100644 board/ti/am62px/tifs-rm-cfg.yaml create mode 100644 configs/am62px_evm_a53_defconfig create mode 100644 configs/am62px_evm_r5_defconfig create mode 100644 doc/board/ti/am62px_sk.rst create mode 100644 drivers/dma/ti/k3-psil-am62p.c create mode 120000 dts/arch/arm64/ti create mode 100644 include/configs/am62px_evm.h
base-commit: b6d8969bcb94321dfed1399f2eaa8768ba42caaa
prerequisite-patch-id: a2fa61937f80658611e0a2cdf88a11a6214b3645
prerequisite-patch-id: 1a31af706136646f62e98e88919802b1379feb39
prerequisite-patch-id: 54b40f9e042ef51755b4fb33ba6f8c4f6af9c17f
prerequisite-patch-id: d2199c72fa11aea6e478f5a846f8ad786b0afc38
prerequisite-patch-id: 00e954105cf966b9527bb6ea11373e3da2d4c26d
prerequisite-patch-id: bb58fb490183bfd836c492ec18590d9ec3b97457
prerequisite-patch-id: 99cb64427f3b8b401f32cd1d4cc68cd74aaa8733
prerequisite-patch-id: c461c9afad63446e824d00017c5faab7860de0e9
prerequisite-patch-id: fdc8c1c111e6329345f0b5c7609f2751e542d2fa
prerequisite-patch-id: e07cf9612f806d28af7628573d73fefdd4144e63
prerequisite-patch-id: 15ee392282a7e0d2b99bcf9cded71f965fc32a5b
prerequisite-patch-id: 91cdc33aa65dd1d205fb8fea5de2980fe2ab2f62
Signature · 1 line
2.43.0
PATCH v2 2/13 power: domain: ti: use IS_ENABLED macro
In reply to Bryan BrattlofCleanup this list and standardize on using the IS_ENABLED macro for the power domain data list.
--- drivers/power/domain/ti-power-domain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/power/domain/ti-power-domain.c +4 -3
@@ -81,19 +81,20 @@ static const struct soc_attr ti_k3_soc_pd_data[] = { .family = "J7200", .data = &j7200_pd_platdata, }, -#elif CONFIG_SOC_K3_J721S2 +#endif +#if IS_ENABLED(CONFIG_SOC_K3_J721S2) { .family = "J721S2", .data = &j721s2_pd_platdata, }, #endif -#ifdef CONFIG_SOC_K3_AM625 +#if IS_ENABLED(CONFIG_SOC_K3_AM625) { .family = "AM62X", .data = &am62x_pd_platdata, }, #endif -#ifdef CONFIG_SOC_K3_AM62A7 +#if IS_ENABLED(CONFIG_SOC_K3_AM62A7) { .family = "AM62AX", .data = &am62ax_pd_platdata,
Signature · 1 line
2.43.0
PATCH v2 13/13 doc: board: ti: introduce am62px documentation
In reply to Bryan BrattlofIntroduce basic documentation for the am62p family of SoCs.
--- doc/board/ti/am62px_sk.rst | 289 +++++++++++++++++++++++++++++++++++++ doc/board/ti/k3.rst | 1 + 2 files changed, 290 insertions(+) create mode 100644 doc/board/ti/am62px_sk.rst
doc/board/ti/am62px_sk.rst new file +289 -0
@@ -0,0 +1,289 @@ +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +.. sectionauthor:: Bryan Brattlof <[email protected]> + +AM62Px Platforms +================ + +The AM62Px is an extension of the existing Sitara AM62x low-cost family +of application processors built for Automotive and Linux Application +development. Scalable Arm Cortex-A53 performance and embedded features, +such as: multi high-definition display support, 3D-graphics +acceleration, 4K video acceleration, and extensive peripherals make the +AM62Px well-suited for a broad range of automation and industrial +application, including automotive digital instrumentation, automotive +displays, industrial HMI, and more. + +Some highlights of AM62P SoC are: + +* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. + Dual/Single core variants are provided in the same package to allow HW + compatible designs. + +* One Device manager Cortex-R5F for system power and resource + management, and one Cortex-R5F for Functional Safety or + general-purpose usage. + +* One 3D GPU up to 50 GLFOPS + +* H.264/H.265 Video Encode/Decode. + +* Display support: 3x display support over OLDI/LVDS (1x OLDI-DL, 1x or + 2x OLDI-SL), DSI, or DPI. Up to 3840x1080 @ 60fps resolution + +* Integrated Giga-bit Ethernet switch supporting up to a total of two + external ports (TSN capable). + +* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3xMMC and SD, GPMC for + NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, + 1xCSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals. + +* Dedicated Centralized Hardware Security Module with support for secure + boot, debug security and crypto acceleration and trusted execution + environment. + +* One 32-bit DDR Subsystem that supports LPDDR4, DDR4 memory types. + +* Multiple low power modes support, ex: Deep sleep, Standby, MCU-only, + enabling battery powered system design. + +For those interested, more details about this SoC can be found in the +Technical Reference Manual here: https://www.ti.com/lit/pdf/spruj83 + +Boot Flow: +---------- + +The bootflow is exactly the same as all SoCs in the am62xxx extended SoC +family. Below is the pictorial representation: + +.. image:: img/boot_diagram_k3_current.svg + :alt: Boot flow diagram + +- Here TIFS acts as master and provides all the critical services. R5/A53 + requests TIFS to get these services done as shown in the above diagram. + +Sources: +-------- + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_sources + :end-before: .. k3_rst_include_end_boot_sources + +Build procedure: +---------------- + +0. Setup the environment variables: + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_desc + :end-before: .. k3_rst_include_end_common_env_vars_desc + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_board_env_vars_desc + :end-before: .. k3_rst_include_end_board_env_vars_desc + +Set the variables corresponding to this platform: + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_defn + :end-before: .. k3_rst_include_end_common_env_vars_defn + +.. code-block:: bash + + $ export UBOOT_CFG_CORTEXR=am62px_evm_r5_defconfig + $ export UBOOT_CFG_CORTEXA=am62px_evm_a53_defconfig + $ export TFA_BOARD=lite + $ # we dont use any extra TFA parameters + $ unset TFA_EXTRA_ARGS + $ export OPTEE_PLATFORM=k3-am62x + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y" + +.. am62px_evm_rst_include_start_build_steps + +1. Trusted Firmware-A: + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_build_steps_tfa + :end-before: .. k3_rst_include_end_build_steps_tfa + + +2. OP-TEE: + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_build_steps_optee + :end-before: .. k3_rst_include_end_build_steps_optee + +3. U-Boot: + +* 3.1 R5: + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_build_steps_spl_r5 + :end-before: .. k3_rst_include_end_build_steps_spl_r5 + +* 3.2 A53: + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_build_steps_uboot + :end-before: .. k3_rst_include_end_build_steps_uboot +.. am62px_evm_rst_include_end_build_steps + +Target Images +-------------- + +In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC +variant (HS-FS, HS-SE) requires a different source for these files. + + - HS-FS + + * tiboot3-am62px-hs-fs-evm.bin from step 3.1 + * tispl.bin, u-boot.img from step 3.2 + + - HS-SE + + * tiboot3-am62px-hs-evm.bin from step 3.1 + * tispl.bin, u-boot.img from step 3.2 + +Image formats: +-------------- + +- tiboot3.bin + +.. image:: img/multi_cert_tiboot3.bin.svg + :alt: tiboot3.bin image format + +- tispl.bin + +.. image:: img/dm_tispl.bin.svg + :alt: tispl.bin image format + +A53 SPL DDR Memory Layout +------------------------- + +.. am62px_evm_rst_include_start_ddr_mem_layout + +This provides an overview memory usage in A53 SPL stage. + +.. list-table:: + :widths: 16 16 16 + :header-rows: 1 + + * - Region + - Start Address + - End Address + + * - EMPTY + - 0x80000000 + - 0x80080000 + + * - TEXT BASE + - 0x80080000 + - 0x800d8000 + + * - EMPTY + - 0x800d8000 + - 0x80200000 + + * - BMP IMAGE + - 0x80200000 + - 0x80b77660 + + * - STACK + - 0x80b77660 + - 0x80b77e60 + + * - GD + - 0x80b77e60 + - 0x80b78000 + + * - MALLOC + - 0x80b78000 + - 0x80b80000 + + * - EMPTY + - 0x80b80000 + - 0x80c80000 + + * - BSS + - 0x80c80000 + - 0x80d00000 + + * - BLOBS + - 0x80d00000 + - 0x80d00400 + + * - EMPTY + - 0x80d00400 + - 0x81000000 +.. am62px_evm_rst_include_end_ddr_mem_layout + +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. + +The following table shows some common boot modes used on AM62Px +platforms. More details can be found in the Technical Reference Manual: +https://www.ti.com/lit/pdf/spruj83 under the `Boot Mode Pins` section. + +.. note:: + + This device is very new. Currently only UART boot is available while + we continue to add support for the other bootmodes. + +.. list-table:: Boot Modes + :widths: 16 16 16 + :header-rows: 1 + + * - Switch Label + - SW2: 12345678 + - SW3: 12345678 + + * - SD + - 01000000 + - 11000010 + + * - OSPI + - 00000000 + - 11001110 + + * - EMMC + - 00000000 + - 11010010 + + * - UART + - 00000000 + - 11011100 + + * - USB DFU + - 00000000 + - 11001010 + +For SW2 and SW1, the switch state in the "ON" position = 1. + +Debugging U-Boot +---------------- + +See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for +detailed setup information. + +.. warning:: + + **OpenOCD support after**: v0.12.0 + + While support for the entire K3 generation including the am62xxx + extended family was added before v0.12.0, the tcl scripts for the + am62px have been accepted and will be available in the next release of + OpenOCD. It may be necessary to build OpenOCD from source depending on + the version your distribution has packaged. + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_openocd_connect_XDS110 + :end-before: .. k3_rst_include_end_openocd_connect_XDS110 + +To start OpenOCD and connect to the board + +.. code-block:: bash + + openocd -f board/ti_am62pevm.cfg
doc/board/ti/k3.rst +1 -0
@@ -35,6 +35,7 @@ K3 Based SoCs ../beagle/am62x_beagleplay ../phytec/phycore-am62x ../toradex/verdin-am62 + am62px_sk am64x_evm am65x_evm j7200_evm
Signature · 1 line
2.43.0
PATCH v2 9/13 dma: ti: k3-udma: Add DMA PSIL mappings for AM62P and J722S
In reply to Bryan BrattlofFrom: Vignesh Raghavendra <[email protected]>
Add PSIL data for the AM62P and the J722S SoC family. The PSIL mapping for the J722S is the same except for the extra instances of the CSI-RX. So let's reuse the same file for both the AM62P and J722S.
--- drivers/dma/ti/Makefile | 2 + drivers/dma/ti/k3-psil-am62p.c | 325 +++++++++++++++++++++++++++++++++ drivers/dma/ti/k3-psil-priv.h | 1 + drivers/dma/ti/k3-psil.c | 4 + 4 files changed, 332 insertions(+) create mode 100644 drivers/dma/ti/k3-psil-am62p.c
drivers/dma/ti/Makefile +2 -0
@@ -9,3 +9,5 @@ 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_AM62P5) += k3-psil-am62p.o +k3-psil-data-$(CONFIG_SOC_K3_J722S) += k3-psil-am62p.o
drivers/dma/ti/k3-psil-am62p.c new file +325 -0
325 lines not on this page · raw message
drivers/dma/ti/k3-psil-priv.h +1 -0
@@ -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 am62p_ep_map;#endif /* K3_PSIL_PRIV_H_ */
drivers/dma/ti/k3-psil.c +4 -0
@@ -28,6 +28,10 @@ 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_AM62P5)) + soc_ep_map = &am62p_ep_map; + else if (IS_ENABLED(CONFIG_SOC_K3_J722S)) + soc_ep_map = &am62p_ep_map; }if (thread_id &K3_PSIL_DST_THREAD_ID_OFFSET && soc_ep_map->dst) {
Signature · 1 line
2.43.0
PATCH v2 8/13 firmware: ti_sci_static_data: add static DMA channel data
In reply to Bryan BrattlofFrom: Hari Nagalla <[email protected]>
Include the static DMA channel data for ti_sci
--- drivers/firmware/ti_sci_static_data.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/firmware/ti_sci_static_data.h +3 -2
@@ -84,7 +84,8 @@ static struct ti_sci_resource_static_data rm_static_data[] = { };#endif /* CONFIG_SOC_K3_J721S2 */ -#if IS_ENABLED(CONFIG_SOC_K3_AM625) || IS_ENABLED(CONFIG_SOC_K3_AM62A7) +#if IS_ENABLED(CONFIG_SOC_K3_AM625) || IS_ENABLED(CONFIG_SOC_K3_AM62A7) || \ + IS_ENABLED(CONFIG_SOC_K3_AM62P5) static struct ti_sci_resource_static_data rm_static_data[] = { /* BC channels */ {
@@ -95,7 +96,7 @@ static struct ti_sci_resource_static_data rm_static_data[] = { }, { }, }; -#endif /* CONFIG_SOC_K3_AM625 || CONFIG_SOC_K3_AM62A7 */ +#endif /* CONFIG_SOC_K3_AM625 || CONFIG_SOC_K3_AM62A7 || CONFIG_SOC_K3_AM62P5 */ #else static struct ti_sci_resource_static_data rm_static_data[] = {
Signature · 1 line
2.43.0
PATCH v2 11/13 Makefile: remove hardcoded device tree source directory
In reply to Bryan BrattlofSome boards that choose to utilize the OF_UPSTREAM directory for their device tree files will need to specify that directory instead of the traditional arch/$(ARCH)/dts/* path.
Include the correct path to the board's dtbs depending on if OF_UPSTREAM is selected or not.
--- Makefile | 18 ++++++++++++++---- scripts/Makefile.spl | 17 +++++++++++++---- 2 files changed, 27 insertions(+), 8 deletions(-)
Makefile +14 -4
@@ -1184,6 +1184,16 @@ dt_binding_check: scripts_dtc quiet_cmd_copy = COPY $@ cmd_copy = cp $< $@ +ifeq ($(CONFIG_OF_UPSTREAM),y) +ifeq ($(CONFIG_ARM64),y) +dt_dir := dts/upstream/src/arm64 +else +dt_dir := dts/upstream/src/$(ARCH) +endif +else +dt_dir := arch/$(ARCH)/dts +endif + ifeq ($(CONFIG_MULTI_DTB_FIT),y) ifeq ($(CONFIG_MULTI_DTB_FIT_LZO),y)
@@ -1209,7 +1219,7 @@ endif MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ -a 0 -e 0 -E \ - $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null + $(patsubst %,-b $(dt_dir)/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null MKIMAGEFLAGS_fit-dtb.blob += -B 0x8
@@ -1407,9 +1417,9 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ -p $(CONFIG_FIT_EXTERNAL_OFFSET) \ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \ - $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \ - $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) \ - $(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST))) + $(patsubst %,-b $(dt_dir)/%.dtb,$(subst ",,$(DEVICE_TREE))) \ + $(patsubst %,-b $(dt_dir)/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) \ + $(patsubst %,-b $(dt_dir)/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST))) else MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
scripts/Makefile.spl +13 -4
@@ -559,9 +559,15 @@ FORCE: $(obj)/dts/dt-$(SPL_NAME).dtb: dts/dt.dtb $(Q)$(MAKE) $(build)=$(obj)/dts spl_dtbs -PHONY += dts_dir -dts_dir: - $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts) +ifeq ($(CONFIG_OF_UPSTREAM),y) +ifeq ($(CONFIG_ARM64),y) +dt_dir := dts/upstream/src/arm64 +else +dt_dir := dts/upstream/src/$(ARCH) +endif +else +dt_dir := arch/$(ARCH)/dts +endif # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends.
@@ -569,8 +575,11 @@ dts_dir: SPL_OF_LIST_TARGETS = $(patsubst %,dts/%.dtb,$(subst ",,$(CONFIG_SPL_OF_LIST))) SHRUNK_ARCH_DTB = $(addprefix $(obj)/,$(SPL_OF_LIST_TARGETS)) +$(dir $(SHRUNK_ARCH_DTB)): + $(shell [ -d $@ ] || mkdir -p $@) + .SECONDEXPANSION: -$(SHRUNK_ARCH_DTB): $$(patsubst $(obj)/dts/%, arch/$(ARCH)/dts/%, $$@) dts_dir +$(SHRUNK_ARCH_DTB): $$(patsubst $(obj)/dts/%, $(dt_dir)/%, $$@) $(dir $(SHRUNK_ARCH_DTB)) $(call if_changed,fdtgrep) targets += $(SPL_OF_LIST_TARGETS)
Signature · 1 line
2.43.0
PATCH v2 5/13 arm: mach-k3: invert logic for split DM firmware config
In reply to Bryan BrattlofCurrently, for the K3 generation of SoCs, there are more SoCs that utilize the split firmware approach than the combined DMSC firmware. Invert the logic to avoid adding more and more SoCs to this list.
--- arch/arm/mach-k3/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-k3/Kconfig +1 -1
@@ -130,7 +130,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 && ARCH_K3 && !SOC_K3_AM642 && !SOC_K3_AM654 && !CLK_TI_SCI && !TI_SCI_POWER_DOMAIN default y help Enabling this will indicate that the system has separate DM
Signature · 1 line
2.43.0
PATCH v2 7/13 board: ti: introduce basic board files for the am62px family
In reply to Bryan BrattlofIntroduce the basic files needed to support the am62px family of SoCs
--- board/ti/am62px/Kconfig | 26 + board/ti/am62px/MAINTAINERS | 9 + board/ti/am62px/Makefile | 7 + board/ti/am62px/am62px.env | 16 + board/ti/am62px/board-cfg.yaml | 37 ++ board/ti/am62px/evm.c | 29 + board/ti/am62px/pm-cfg.yaml | 12 + board/ti/am62px/rm-cfg.yaml | 987 +++++++++++++++++++++++++++++++ board/ti/am62px/sec-cfg.yaml | 378 ++++++++++++ board/ti/am62px/tifs-rm-cfg.yaml | 879 +++++++++++++++++++++++++++ 10 files changed, 2380 insertions(+) create mode 100644 board/ti/am62px/Kconfig create mode 100644 board/ti/am62px/MAINTAINERS create mode 100644 board/ti/am62px/Makefile create mode 100644 board/ti/am62px/am62px.env create mode 100644 board/ti/am62px/board-cfg.yaml create mode 100644 board/ti/am62px/evm.c create mode 100644 board/ti/am62px/pm-cfg.yaml create mode 100644 board/ti/am62px/rm-cfg.yaml create mode 100644 board/ti/am62px/sec-cfg.yaml create mode 100644 board/ti/am62px/tifs-rm-cfg.yaml
board/ti/am62px/Kconfig new file +26 -0
@@ -0,0 +1,26 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ +# + +if TARGET_AM62P5_R5_EVM || TARGET_AM62P5_A53_EVM + +config SYS_BOARD + default "am62px" + +config SYS_VENDOR + default "ti" + +config SYS_CONFIG_NAME + default "am62px_evm" + +source "board/ti/common/Kconfig" + +endif + +if TARGET_AM62P5_R5_EVM + +config SPL_LDSCRIPT + default "arch/arm/mach-omap2/u-boot-spl.lds" + +endif
board/ti/am62px/MAINTAINERS new file +9 -0
@@ -0,0 +1,9 @@ +AM62Px BOARD +M: Vignesh Raghavendra <[email protected]> +M: Bryan Brattlof <[email protected]> +M: Tom Rini <[email protected]> +S: Maintained +F: board/ti/am62px/ +F: include/configs/am62p5_evm.h +F: configs/am62px_evm_r5_defconfig +F: configs/am62px_evm_a53_defconfig
board/ti/am62px/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evm.o
board/ti/am62px/am62px.env new file +16 -0
@@ -0,0 +1,16 @@ +#include <env/ti/ti_common.env> +#include <env/ti/default_findfdt.env> +#include <env/ti/mmc.env> + +name_kern=Image +console=ttyS2,115200n8 +args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000 + ${mtdparts} +run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} + +boot_targets=mmc1 pxe dhcp +boot=mmc +mmcdev=1 +bootpart=1:2 +bootdir=/boot +rd_spec=-
board/ti/am62px/board-cfg.yaml new file +37 -0
@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ +# +# Board configuration for AM62Px SoCs +# + +--- + +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: 0x10 + debug_cfg: + subhdr: + magic: 0x020C + size: 8 + trace_dst_enables: 0x00 + trace_src_enables: 0x00
board/ti/am62px/evm.c new file +29 -0
@@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Board specific initialization for AM62Px platforms +* +* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ +* +*/ + +#include <asm/arch/hardware.h> +#include <asm/io.h> +#include <dm/uclass.h> +#include <env.h> +#include <fdt_support.h> +#include <spl.h> + +int board_init (void ) +{ +return 0 ; +} + +int dram_init (void ) +{ +return fdtdec_setup_mem_size_base (); +} + +int dram_init_banksize (void ) +{ +return fdtdec_setup_memory_banksize (); +}
board/ti/am62px/pm-cfg.yaml new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ +# +# Power management configuration for AM62Px +# +# +--- +pm-cfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/ti/am62px/rm-cfg.yaml new file +987 -0
987 lines not on this page · raw message
board/ti/am62px/sec-cfg.yaml new file +378 -0
378 lines not on this page · raw message
board/ti/am62px/tifs-rm-cfg.yaml new file +879 -0
879 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v2 6/13 arch: mach-k3: introduce basic files to support the am62px SoC family
In reply to Bryan BrattlofIntroduce the basic functions and definitions needed to properly initialize TI's am62p family of SoCs
--- arch/arm/mach-k3/Kconfig | 7 +- arch/arm/mach-k3/am62p5_init.c | 280 ++++++++++++++++++ arch/arm/mach-k3/am62px/Kconfig | 32 ++ .../arm/mach-k3/include/mach/am62p_hardware.h | 83 ++++++ arch/arm/mach-k3/include/mach/am62p_spl.h | 49 +++ arch/arm/mach-k3/include/mach/hardware.h | 4 + arch/arm/mach-k3/include/mach/spl.h | 4 + 7 files changed, 458 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-k3/am62p5_init.c create mode 100644 arch/arm/mach-k3/am62px/Kconfig create mode 100644 arch/arm/mach-k3/include/mach/am62p_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/am62p_spl.h
arch/arm/mach-k3/Kconfig +6 -1
@@ -22,6 +22,9 @@ config SOC_K3_AM625 config SOC_K3_AM62A7 bool "TI's K3 based AM62A7 SoC Family Support" +config SOC_K3_AM62P5 + bool "TI's K3 based AM62P5 SoC Family Support" + endchoice if SOC_K3_J721E
@@ -34,7 +37,7 @@ config SYS_SOC config SYS_K3_NON_SECURE_MSRAM_SIZE hex - default 0x80000 if SOC_K3_AM654 + default 0x80000 if SOC_K3_AM654 || SOC_K3_AM62P5 default 0x100000 if SOC_K3_J721E || SOC_K3_J721S2 default 0x1c0000 if SOC_K3_AM642 default 0x3c000 if SOC_K3_AM625 || SOC_K3_AM62A7
@@ -78,6 +81,7 @@ config SYS_K3_BOOT_PARAM_TABLE_INDEX default 0x43c3f290 if SOC_K3_AM625 default 0x43c3f290 if SOC_K3_AM62A7 && CPU_V7R default 0x7000f290 if SOC_K3_AM62A7 && ARM64 + default 0x43c4f290 if SOC_K3_AM62P5 help Address at which ROM stores the value which determines if SPL is booted up by primary boot media or secondary boot media.
@@ -153,6 +157,7 @@ source "arch/arm/mach-k3/am65x/Kconfig" source "arch/arm/mach-k3/am64x/Kconfig" source "arch/arm/mach-k3/am62x/Kconfig" source "arch/arm/mach-k3/am62ax/Kconfig" +source "arch/arm/mach-k3/am62px/Kconfig" source "arch/arm/mach-k3/j721e/Kconfig" source "arch/arm/mach-k3/j721s2/Kconfig"
arch/arm/mach-k3/am62p5_init.c new file +280 -0
280 lines not on this page · raw message
arch/arm/mach-k3/am62px/Kconfig new file +32 -0
@@ -0,0 +1,32 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ +# + +if SOC_K3_AM62P5 + +choice + prompt "TI K3 AM62Px based boards" + optional + +config TARGET_AM62P5_A53_EVM + bool "TI K3 based AM62P5 EVM running on A53" + select ARM64 + select BINMAN + +config TARGET_AM62P5_R5_EVM + bool "TI K3 based AM62P5 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/am62px/Kconfig" + +endif
arch/arm/mach-k3/include/mach/am62p_hardware.h new file +83 -0
83 lines not on this page · raw message
arch/arm/mach-k3/include/mach/am62p_spl.h new file +49 -0
49 lines not on this page · raw message
arch/arm/mach-k3/include/mach/hardware.h +4 -0
@@ -33,6 +33,10 @@#include "am62a_qos.h" #endif +#ifdef CONFIG_SOC_K3_AM62P5 +#include "am62p_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/spl.h +4 -0
@@ -30,4 +30,8 @@#include "am62a_spl.h" #endif +#ifdef CONFIG_SOC_K3_AM62P5 +#include "am62p_spl.h" +#endif +#endif /* _ASM_ARCH_SPL_H_ */
Signature · 1 line
2.43.0
PATCH v2 3/13 arm: mach-k3: am62px: introduce clock and device files for wkup spl
In reply to Bryan BrattlofInclude the clock and lpsc tree files needed for the wkup spl to initialize the proper PLLs and power domains to boot the SoC.
--- arch/arm/mach-k3/r5/Makefile | 1 + arch/arm/mach-k3/r5/am62px/Makefile | 6 + arch/arm/mach-k3/r5/am62px/clk-data.c | 325 +++++++++++++++++++++++++ arch/arm/mach-k3/r5/am62px/dev-data.c | 71 ++++++ 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 + 8 files changed, 417 insertions(+) create mode 100644 arch/arm/mach-k3/r5/am62px/Makefile create mode 100644 arch/arm/mach-k3/r5/am62px/clk-data.c create mode 100644 arch/arm/mach-k3/r5/am62px/dev-data.c
arch/arm/mach-k3/r5/Makefile +1 -0
@@ -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_AM62P5) += am62px/ obj-y += lowlevel_init.o obj-y += r5_mpu.o
arch/arm/mach-k3/r5/am62px/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ + +obj-y += clk-data.o +obj-y += dev-data.o
arch/arm/mach-k3/r5/am62px/clk-data.c new file +325 -0
325 lines not on this page · raw message
arch/arm/mach-k3/r5/am62px/dev-data.c new file +71 -0
71 lines not on this page · raw message
drivers/clk/ti/clk-k3.c +6 -0
@@ -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_AM62P5 + { + .family = "AM62PX", + .data = &am62px_clk_platdata, + }, #endif {/* sentinel */ } };
drivers/power/domain/ti-power-domain.c +6 -0
@@ -99,6 +99,12 @@ static const struct soc_attr ti_k3_soc_pd_data[] = { .family = "AM62AX", .data = &am62ax_pd_platdata, }, +#endif +#if IS_ENABLED (CONFIG_SOC_K3_AM62P5 ) + { + .family = "AM62PX", + .data = &am62px_pd_platdata, + }, #endif {/* sentinel */ } };
include/k3-clk.h +1 -0
@@ -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 am62px_clk_platdata;struct clk *clk_register_ti_pll (const char *name,const char *parent_name,void __iomem *reg);
include/k3-dev.h +1 -0
@@ -80,6 +80,7 @@ extern const struct ti_k3_pd_platdata j7200_pd_platdata;extern const struct ti_k3_pd_platdata j721s2_pd_platdata;extern const struct ti_k3_pd_platdata am62x_pd_platdata;extern const struct ti_k3_pd_platdata am62ax_pd_platdata; +extern const struct ti_k3_pd_platdata am62px_pd_platdata;u8 ti_pd_state (struct ti_pd *pd);u8 lpsc_get_state (struct ti_lpsc *lpsc);
Signature · 1 line
2.43.0
PATCH v2 10/13 arm: dts: introduce am62p5 uboot dts files
In reply to Bryan BrattlofInclude the uboot device tree files needed to boot the board.
--- arch/arm/dts/Makefile | 2 + arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi | 2800 ++++++++++++++++++++ arch/arm/dts/k3-am62p-sk-binman.dtsi | 173 ++ arch/arm/dts/k3-am62p5-r5-sk.dts | 101 + arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 49 + arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/am62p5_init.c | 4 +- dts/arch/arm64/ti | 1 + 8 files changed, 3129 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi create mode 100644 arch/arm/dts/k3-am62p-sk-binman.dtsi create mode 100644 arch/arm/dts/k3-am62p5-r5-sk.dts create mode 100644 arch/arm/dts/k3-am62p5-sk-u-boot.dtsi create mode 120000 dts/arch/arm64/ti
arch/arm/dts/Makefile +2 -0
@@ -1424,6 +1424,8 @@ dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \ dtb-$(CONFIG_SOC_K3_AM62A7) += k3-am62a7-sk.dtb \ k3-am62a7-r5-sk.dtb +dtb-$(CONFIG_SOC_K3_AM62P5) += k3-am62p5-r5-sk.dtb + dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7622-rfb.dtb \ mt7623a-unielec-u7623-02-emmc.dtb \
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +2800 -0
2,800 lines not on this page · raw message
arch/arm/dts/k3-am62p-sk-binman.dtsi new file +173 -0
173 lines not on this page · raw message
arch/arm/dts/k3-am62p5-r5-sk.dts new file +101 -0
19 lines not on this page · raw message
arch/arm/dts/k3-am62p5-sk-u-boot.dtsi new file +49 -0
49 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.43.0
Part of the diff is not shown here. View the raw message.
Re: [PATCH v2 01/13] soc: add info to identify the am62p SoC family
In reply to Bryan BrattlofQuoted 5 lines · Bryan Brattlof
Include the part number for TI's am62px family of SoCs so we can properly identify it during boot
Signed-off-by Bryan Brattlof <[email protected]>
Quoted 42 lines
--- arch/arm/mach-k3/include/mach/hardware.h | 2 ++ drivers/soc/soc_ti_k3.c | 3 +++ 2 files changed, 5 insertions(+)arch/arm/mach-k3/include/mach/hardware.h +2
-0@@ -46,6 +46,7 @@#define JTAG_ID_PARTNO_J721S2 0xbb75#define JTAG_ID_PARTNO_AM62X 0xbb7e#define JTAG_ID_PARTNO_AM62AX 0xbb8d +#define JTAG_ID_PARTNO_AM62PX 0xbb9d#define K3_SOC_ID (id,ID ) \ static inline bool soc_is_##id(void) \@@ -61,6 +62,7 @@ K3_SOC_ID(am64x, AM64X) K3_SOC_ID(j721s2, J721S2) K3_SOC_ID(am62x, AM62X) K3_SOC_ID(am62ax, AM62AX) +K3_SOC_ID(am62px, AM62PX)#define K3_SEC_MGR_SYS_STATUS 0x44234100#define SYS_STATUS_DEV_TYPE_SHIFT 0drivers/soc/soc_ti_k3.c +3
-1@@ -45,6 +45,9 @@ static const char *get_family_string(u32 idreg)case JTAG_ID_PARTNO_AM62AX : family ="AM62AX" ;break ; +case JTAG_ID_PARTNO_AM62PX : + family ="AM62PX" ; +break ;default : family ="Unknown Silicon" ; }; --2.43.0
Signature · 6 lines
Best regards - Freundliche Grüsse - Meilleures salutations Igor Opaniuk Senior Software Engineer, Embedded & Security E: [email protected] W: www.foundries.io
Re: [PATCH v2 02/13] power: domain: ti: use IS_ENABLED macro
In reply to Bryan BrattlofQuoted 38 lines · Bryan Brattlof
Cleanup this list and standardize on using the
IS_ENABLEDmacro for the power domain data list.Signed-off-by Bryan Brattlof <[email protected]>--- drivers/power/domain/ti-power-domain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/power/domain/ti-power-domain.c +4
-4@@ -81,19 +81,20 @@ static const struct soc_attr ti_k3_soc_pd_data[] = { .family = "J7200", .data = &j7200_pd_platdata, }, -#elif CONFIG_SOC_K3_J721S2 +#endif +#if IS_ENABLED(CONFIG_SOC_K3_J721S2) { .family = "J721S2", .data = &j721s2_pd_platdata, }, #endif -#ifdef CONFIG_SOC_K3_AM625 +#if IS_ENABLED(CONFIG_SOC_K3_AM625) { .family = "AM62X", .data = &am62x_pd_platdata, }, #endif -#ifdef CONFIG_SOC_K3_AM62A7 +#if IS_ENABLED(CONFIG_SOC_K3_AM62A7) { .family = "AM62AX", .data = &am62ax_pd_platdata, --
Quoted 2 lines
2.43.0
Signature · 6 lines
Best regards - Freundliche Grüsse - Meilleures salutations Igor Opaniuk Senior Software Engineer, Embedded & Security E: [email protected] W: www.foundries.io
Re: [PATCH v2 11/13] Makefile: remove hardcoded device tree source directory
In reply to Bryan BrattlofQuoted 5 lines · Bryan Brattlof
Some boards that choose to utilize the
OF_UPSTREAMdirectory for their device tree files will need to specify that directory instead of the traditional arch/$(ARCH)/dts/* path.
Quoted 9 lines
Include the correct path to the board's dtbs depending on if
OF_UPSTREAMis selected or not.Signed-off-by Bryan Brattlof <[email protected]>--- Makefile | 18 ++++++++++++++---- scripts/Makefile.spl | 17 +++++++++++++---- 2 files changed, 27 insertions(+), 8 deletions(-)
-Sumit
Quoted 82 lines
Makefile +14
-4@@ -1184,6 +1184,16 @@ dt_binding_check: scripts_dtc quiet_cmd_copy = COPY $@ cmd_copy = cp $< $@ +ifeq ($(CONFIG_OF_UPSTREAM),y) +ifeq ($(CONFIG_ARM64),y) +dt_dir := dts/upstream/src/arm64 +else +dt_dir := dts/upstream/src/$(ARCH) +endif +else +dt_dir := arch/$(ARCH)/dts +endif + ifeq ($(CONFIG_MULTI_DTB_FIT),y) ifeq ($(CONFIG_MULTI_DTB_FIT_LZO),y)@@ -1209,7 +1219,7 @@ endif MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ -a 0 -e 0 -E \ - $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null + $(patsubst %,-b $(dt_dir)/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null MKIMAGEFLAGS_fit-dtb.blob += -B 0x8@@ -1407,9 +1417,9 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ -p $(CONFIG_FIT_EXTERNAL_OFFSET) \ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \ - $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \ - $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) \ - $(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST))) + $(patsubst %,-b $(dt_dir)/%.dtb,$(subst ",,$(DEVICE_TREE))) \ + $(patsubst %,-b $(dt_dir)/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) \ + $(patsubst %,-b $(dt_dir)/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST))) else MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \scripts/Makefile.spl +13
-5@@ -559,9 +559,15 @@ FORCE: $(obj)/dts/dt-$(SPL_NAME).dtb: dts/dt.dtb $(Q)$(MAKE) $(build)=$(obj)/dts spl_dtbs -PHONY += dts_dir -dts_dir: - $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts) +ifeq ($(CONFIG_OF_UPSTREAM),y) +ifeq ($(CONFIG_ARM64),y) +dt_dir := dts/upstream/src/arm64 +else +dt_dir := dts/upstream/src/$(ARCH) +endif +else +dt_dir := arch/$(ARCH)/dts +endif # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends.@@ -569,8 +575,11 @@ dts_dir: SPL_OF_LIST_TARGETS = $(patsubst %,dts/%.dtb,$(subst ",,$(CONFIG_SPL_OF_LIST))) SHRUNK_ARCH_DTB = $(addprefix $(obj)/,$(SPL_OF_LIST_TARGETS)) +$(dir $(SHRUNK_ARCH_DTB)): + $(shell [ -d $@ ] || mkdir -p $@) + .SECONDEXPANSION: -$(SHRUNK_ARCH_DTB): $$(patsubst $(obj)/dts/%, arch/$(ARCH)/dts/%, $$@) dts_dir +$(SHRUNK_ARCH_DTB): $$(patsubst $(obj)/dts/%, $(dt_dir)/%, $$@) $(dir $(SHRUNK_ARCH_DTB)) $(call if_changed,fdtgrep) targets += $(SPL_OF_LIST_TARGETS) --2.43.0
Re: [PATCH v2 00/13] Introduce basic support for TI's AM62Px SoC family
In reply to Bryan BrattlofHi Bryan,
Quoted 6 lines · Bryan Brattlof
Hello Again Everyone!
**Note:** This series depends on the
OF_UPSTREAMwork from Sumit [0]. Patch #11 was added to fix some Makefile.spl targets to allow SPL builds to complete with theOF_UPSTREAMseries.
Thanks for your adoption of OF_UPSTREAM work. As evident from this series, it would be much easier to maintain U-Boot specific DT pieces rather than the full SoC specific DT copy from Linux source tree.
-Sumit
Quoted 177 lines
The AM62Px is an extension of the existing Sitara AM62x low-cost family of application processors built for Automotive and Linux Application development. Scalable Arm Cortex-A53 performance and embedded features, such as: multi high-definition display support, 3D-graphics acceleration, 4K video acceleration, and extensive peripherals make the AM62Px well-suited for a broad range of automation and industrial application, including automotive digital instrumentation, automotive displays, industrial HMI, and more.
Some highlights of AM62P SoC are:
* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. Dual/Single core variants are provided in the same package to allow HW compatible designs.
* One Device manager Cortex-R5F for system power and resource management, and one Cortex-R5F for Functional Safety or general-purpose usage.
* One 3D GPU up to 50 GLFOPS
* H.264/H.265 Video Encode/Decode.
* Display support: 3x display support over OLDI/LVDS (1x OLDI-DL, 1x or 2x OLDI-SL), DSI, or DPI. Up to 3840x1080 @ 60fps resolution
* Integrated Giga-bit Ethernet switch supporting up to a total of two external ports (TSN capable).
* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3xMMC and SD, GPMC for NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, 1xCSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals.
* Dedicated Centralized Hardware Security Module with support for secure boot, debug security and crypto acceleration and trusted execution environment.
* One 32-bit DDR Subsystem that supports LPDDR4, DDR4 memory types.
* Multiple low power modes support, ex: Deep sleep, Standby, MCU-only, enabling battery powered system design.
For those interested, more details about this SoC can be found in the Technical Reference Manual here: https://www.ti.com/lit/pdf/spruj83
Proof-of-Life: https://paste.sr.ht/~bryanb/af2ac108a9362549aa326f182e87918d52bf2d71
Currently, while more peripherals are being added in Linux[0], this series will only support UART boot.
Thanks for reviewing!
~BryanChanges from v1: [1]
- squashed all clk and lpsc tree updates into a single commit
- correctedSOC_K3_AM642typo with DM firmwareKconfigoption
- updated RM configs and dma nodes to enable IP that need DMA
- added the dtb targets to the dts/Makefile
- rebased the series on top of v2024.01-rc1
- switched to bootstd rather than use distro boot scripts.
- enabledOF_UPSTREAMinstead of using thearch/arm/dtsdirectory[0] https://lore.kernel.org/u-boot/[email protected]/
[1] https://lore.kernel.org/all/[email protected]/Bryan Brattlof (11):
soc: add info to identify the am62p SoC family
power: domain: ti: useIS_ENABLEDmacro
arm: mach-k3: am62px: introduce clock and device files for wkup spl
ram: k3-ddrss: enable the am62ax's DDR controller for am62px
arm: mach-k3: invert logic for split DM firmware config
arch: mach-k3: introduce basic files to support the am62px SoC family
board: ti: introduce basic board files for the am62px family
arm: dts: introduce am62p5 uboot dts files
Makefile: remove hardcoded device tree source directory
configs: introduce configs needed for the am62px
doc: board: ti: introduce am62px documentationHari Nagalla (1):
firmware:ti_sci_static_data: add static DMA channel dataVignesh Raghavendra (1):
dma: ti: k3-udma: Add DMA PSIL mappings for AM62P and J722SMakefile | 18 +- arch/arm/dts/Makefile | 2 + arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi | 2800 +++++++++++++++++ arch/arm/dts/k3-am62p-sk-binman.dtsi | 173 + arch/arm/dts/k3-am62p5-r5-sk.dts | 101 + arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 49 + arch/arm/mach-k3/Kconfig | 9 +- arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/am62p5_init.c | 280 ++ arch/arm/mach-k3/am62px/Kconfig | 32 + .../arm/mach-k3/include/mach/am62p_hardware.h | 83 + arch/arm/mach-k3/include/mach/am62p_spl.h | 49 + arch/arm/mach-k3/include/mach/hardware.h | 6 + arch/arm/mach-k3/include/mach/spl.h | 4 + arch/arm/mach-k3/r5/Makefile | 1 + arch/arm/mach-k3/r5/am62px/Makefile | 6 + arch/arm/mach-k3/r5/am62px/clk-data.c | 325 ++ arch/arm/mach-k3/r5/am62px/dev-data.c | 71 + board/ti/am62px/Kconfig | 26 + board/ti/am62px/MAINTAINERS | 9 + board/ti/am62px/Makefile | 7 + board/ti/am62px/am62px.env | 16 + board/ti/am62px/board-cfg.yaml | 37 + board/ti/am62px/evm.c | 29 + board/ti/am62px/pm-cfg.yaml | 12 + board/ti/am62px/rm-cfg.yaml | 987 ++++++ board/ti/am62px/sec-cfg.yaml | 378 +++ board/ti/am62px/tifs-rm-cfg.yaml | 879 ++++++ configs/am62px_evm_a53_defconfig | 178 ++ configs/am62px_evm_r5_defconfig | 137 + doc/board/ti/am62px_sk.rst | 289 ++ doc/board/ti/k3.rst | 1 + drivers/clk/ti/clk-k3.c | 6 + drivers/dma/ti/Makefile | 2 + drivers/dma/ti/k3-psil-am62p.c | 325 ++ drivers/dma/ti/k3-psil-priv.h | 1 + drivers/dma/ti/k3-psil.c | 4 + drivers/firmware/ti_sci_static_data.h | 5 +- drivers/power/domain/ti-power-domain.c | 13 +- drivers/ram/Kconfig | 2 +- drivers/soc/soc_ti_k3.c | 3 + dts/arch/arm64/ti | 1 + include/configs/am62px_evm.h | 14 + include/k3-clk.h | 1 + include/k3-dev.h | 1 + scripts/Makefile.spl | 17 +- 46 files changed, 7374 insertions(+), 16 deletions(-) create mode 100644 arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi create mode 100644 arch/arm/dts/k3-am62p-sk-binman.dtsi create mode 100644 arch/arm/dts/k3-am62p5-r5-sk.dts create mode 100644 arch/arm/dts/k3-am62p5-sk-u-boot.dtsi create mode 100644 arch/arm/mach-k3/am62p5_init.c create mode 100644 arch/arm/mach-k3/am62px/Kconfig create mode 100644 arch/arm/mach-k3/include/mach/am62p_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/am62p_spl.h create mode 100644 arch/arm/mach-k3/r5/am62px/Makefile create mode 100644 arch/arm/mach-k3/r5/am62px/clk-data.c create mode 100644 arch/arm/mach-k3/r5/am62px/dev-data.c create mode 100644 board/ti/am62px/Kconfig create mode 100644 board/ti/am62px/MAINTAINERS create mode 100644 board/ti/am62px/Makefile create mode 100644 board/ti/am62px/am62px.env create mode 100644 board/ti/am62px/board-cfg.yaml create mode 100644 board/ti/am62px/evm.c create mode 100644 board/ti/am62px/pm-cfg.yaml create mode 100644 board/ti/am62px/rm-cfg.yaml create mode 100644 board/ti/am62px/sec-cfg.yaml create mode 100644 board/ti/am62px/tifs-rm-cfg.yaml create mode 100644 configs/am62px_evm_a53_defconfig create mode 100644 configs/am62px_evm_r5_defconfig create mode 100644 doc/board/ti/am62px_sk.rst create mode 100644 drivers/dma/ti/k3-psil-am62p.c create mode 120000 dts/arch/arm64/ti create mode 100644 include/configs/am62px_evm.hbase-commit:
b6d8969bcb94321dfed1399f2eaa8768ba42caaa
prerequisite-patch-id:a2fa61937f80658611e0a2cdf88a11a6214b3645
prerequisite-patch-id:1a31af706136646f62e98e88919802b1379feb39
prerequisite-patch-id:54b40f9e042ef51755b4fb33ba6f8c4f6af9c17f
prerequisite-patch-id:d2199c72fa11aea6e478f5a846f8ad786b0afc38
prerequisite-patch-id:00e954105cf966b9527bb6ea11373e3da2d4c26d
prerequisite-patch-id:bb58fb490183bfd836c492ec18590d9ec3b97457
prerequisite-patch-id:99cb64427f3b8b401f32cd1d4cc68cd74aaa8733
prerequisite-patch-id:c461c9afad63446e824d00017c5faab7860de0e9
prerequisite-patch-id:fdc8c1c111e6329345f0b5c7609f2751e542d2fa
prerequisite-patch-id:e07cf9612f806d28af7628573d73fefdd4144e63
prerequisite-patch-id:15ee392282a7e0d2b99bcf9cded71f965fc32a5b
prerequisite-patch-id:91cdc33aa65dd1d205fb8fea5de2980fe2ab2f62--
2.43.0
Re: [PATCH v2 10/13] arm: dts: introduce am62p5 uboot dts files
In reply to Bryan BrattlofQuoted 51 lines · Bryan Brattlof
Include the uboot device tree files needed to boot the board.
Signed-off-by Bryan Brattlof <[email protected]>--- arch/arm/dts/Makefile | 2 + arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi | 2800 ++++++++++++++++++++ arch/arm/dts/k3-am62p-sk-binman.dtsi | 173 ++ arch/arm/dts/k3-am62p5-r5-sk.dts | 101 + arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 49 + arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/am62p5_init.c | 4 +- dts/arch/arm64/ti | 1 + 8 files changed, 3129 insertions(+), 2 deletions(-)create mode 100644
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsicreate mode 100644arch/arm/dts/k3-am62p-sk-binman.dtsicreate mode 100644arch/arm/dts/k3-am62p5-r5-sk.dtscreate mode 100644arch/arm/dts/k3-am62p5-sk-u-boot.dtsicreate mode 120000 dts/arch/arm64/tiarch/arm/dts/Makefile +2
-0@@ -1424,6 +1424,8 @@ dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \ dtb-$(CONFIG_SOC_K3_AM62A7) += k3-am62a7-sk.dtb \ k3-am62a7-r5-sk.dtb +dtb-$(CONFIG_SOC_K3_AM62P5) += k3-am62p5-r5-sk.dtb + dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7622-rfb.dtb \ mt7623a-unielec-u7623-02-emmc.dtb \arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +13
-0@@ -0,0 +1,2800 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * This file was generated with the + * AM62Px SysConfig DDR Subsystem Register Configuration Tool v0.10.02 + * Thu Jan 25 2024 10:43:46 GMT-0600 (Central Standard Time) + * DDR Type: LPDDR4 + * F0 = 50MHz F1 = NA F2 = 1600MHz + * Density (per channel): 16Gb + * Number of Ranks: 2 + */ + +#define DDRSS_PLL_FHS_CNT 5 +#define DDRSS_PLL_FREQUENCY_1 800000000
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi line 23
Quoted 10 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +10
-0+#define DDRSS_PLL_FREQUENCY_2 800000000 +#define DDRSS_SDRAM_IDX 17 +#define DDRSS_REGION_IDX 17 + +#define DDRSS_CTL_0_DATA 0x00000B00 +#define DDRSS_CTL_1_DATA 0x00000000 +#define DDRSS_CTL_2_DATA 0x00000000 +#define DDRSS_CTL_3_DATA 0x00000000 +#define DDRSS_CTL_4_DATA 0x00000000 +#define DDRSS_CTL_5_DATA 0x00000000
I wonder if it would be better to generate this file during build..
[...]
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi line 36
Quoted 13 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +13
-0+&main_bcdma { + reg = <0x00 0x485c0100 0x00 0x100>, + <0x00 0x4c000000 0x00 0x20000>, + <0x00 0x4a820000 0x00 0x20000>, + <0x00 0x4aa40000 0x00 0x20000>, + <0x00 0x4bc00000 0x00 0x100000>, + <0x00 0x48600000 0x00 0x8000>, + <0x00 0x484a4000 0x00 0x2000>, + <0x00 0x484c2000 0x00 0x2000>; + reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", + "ringrt", "cfg", "tchan", "rchan"; +}; +
Do we still need these? Thought they got fixed kernel side already.
Quoted 28 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +12
-0+&main_pktdma { + reg = <0x00 0x485c0000 0x00 0x100>, + <0x00 0x4a800000 0x00 0x20000>, + <0x00 0x4aa00000 0x00 0x40000>, + <0x00 0x4b800000 0x00 0x400000>, + <0x00 0x485e0000 0x00 0x20000>, + <0x00 0x484a0000 0x00 0x4000>, + <0x00 0x484c0000 0x00 0x2000>, + <0x00 0x48430000 0x00 0x4000>; + reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt", + "cfg", "tchan", "rchan", "rflow"; +};arch/arm/mach-k3/Makefile +1
-0@@ -20,5 +20,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_AM62P5) += am62p5_init.o endif obj-y += common.o security.oarch/arm/mach-k3/am62p5_init.c +0
-0
arch/arm/mach-k3/am62p5_init.c void board_init_f(ulong dummy) · line 113
Quoted 5 lines
arch/arm/mach-k3/am62p5_init.c +1
-1@@ -110,7 +110,7 @@ void board_init_f(ulong dummy)* through a SYSFW PM-init step and will need a re-init in some way * due to changing module clock frequencies. */ -if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) +if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) {
Looks like fixes for a previous patch that didn't get squashed.
Andrew
Quoted 20 lines
arch/arm/mach-k3/am62p5_init.c +1
-1ret =early_console_init ();if (ret)panic ("early_console_init() failed: %d\n" , ret);@@ -122,7 +122,7 @@ void board_init_f(ulong dummy)* callback hook, effectively switching on (or over) the console * output. */ - if (IS_ENABLED(CONFIG_K3_LOAD_SYSFW) { +if (IS_ENABLED (CONFIG_K3_LOAD_SYSFW )) { ret =is_rom_loaded_sysfw (&bootdata);if (!ret)panic ("ROM has not loaded TIFS firmware\n" );dts/arch/arm64/ti new file +1
-0@@ -0,0 +1 @@ +../../../devicetree-rebasing/src/arm64/ti/
Re: [PATCH v2 10/13] arm: dts: introduce am62p5 uboot dts files
Hi Andrew!
On February 2, 2024 thus sayeth Andrew Davis:
Quoted 20 lines · Bryan Brattlof
Quoted 19 lines
Include the uboot device tree files needed to boot the board.
Signed-off-by Bryan Brattlof <[email protected]>--- arch/arm/dts/Makefile | 2 + arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi | 2800 ++++++++++++++++++++ arch/arm/dts/k3-am62p-sk-binman.dtsi | 173 ++ arch/arm/dts/k3-am62p5-r5-sk.dts | 101 + arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 49 + arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/am62p5_init.c | 4 +- dts/arch/arm64/ti | 1 + 8 files changed, 3129 insertions(+), 2 deletions(-)create mode 100644
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsicreate mode 100644arch/arm/dts/k3-am62p-sk-binman.dtsicreate mode 100644arch/arm/dts/k3-am62p5-r5-sk.dtscreate mode 100644arch/arm/dts/k3-am62p5-sk-u-boot.dtsicreate mode 120000 dts/arch/arm64/ti
...
Quoted 25 lines
Quoted 25 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +18
-0@@ -0,0 +1,2800 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * This file was generated with the + * AM62Px SysConfig DDR Subsystem Register Configuration Tool v0.10.02 + * Thu Jan 25 2024 10:43:46 GMT-0600 (Central Standard Time) + * DDR Type: LPDDR4 + * F0 = 50MHz F1 = NA F2 = 1600MHz + * Density (per channel): 16Gb + * Number of Ranks: 2 + */ + +#define DDRSS_PLL_FHS_CNT 5 +#define DDRSS_PLL_FREQUENCY_1 800000000 +#define DDRSS_PLL_FREQUENCY_2 800000000 +#define DDRSS_SDRAM_IDX 17 +#define DDRSS_REGION_IDX 17 + +#define DDRSS_CTL_0_DATA 0x00000B00
Quoted 9 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi line 23
Quoted 5 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +5
-0+#define DDRSS_CTL_1_DATA 0x00000000 +#define DDRSS_CTL_2_DATA 0x00000000 +#define DDRSS_CTL_3_DATA 0x00000000 +#define DDRSS_CTL_4_DATA 0x00000000 +#define DDRSS_CTL_5_DATA 0x00000000I wonder if it would be better to generate this file during build..
Yeah we can save a lot of space by removing tons of these registers writing 0x0 to the reserved ranges... The section for the different PHYs is particularly aggravating.
I told Simon and Marex last year I'd get to it once I find some free cycles and then I went and had a son ;) but it's still in the backlog
Quoted 16 lines
Quoted 4 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +3
-0+&main_bcdma { + reg = <0x00 0x485c0100 0x00 0x100>, + <0x00 0x4c000000 0x00 0x20000>,arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi line 36
Quoted 10 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +10
-0+ <0x00 0x4a820000 0x00 0x20000>, + <0x00 0x4aa40000 0x00 0x20000>, + <0x00 0x4bc00000 0x00 0x100000>, + <0x00 0x48600000 0x00 0x8000>, + <0x00 0x484a4000 0x00 0x2000>, + <0x00 0x484c2000 0x00 0x2000>; + reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", + "ringrt", "cfg", "tchan", "rchan"; +}; +Do we still need these? Thought they got fixed kernel side already.
Ah you're right I missed that i'll remove this in v2
Quoted 28 lines
Quoted 28 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +12
-0+&main_pktdma { + reg = <0x00 0x485c0000 0x00 0x100>, + <0x00 0x4a800000 0x00 0x20000>, + <0x00 0x4aa00000 0x00 0x40000>, + <0x00 0x4b800000 0x00 0x400000>, + <0x00 0x485e0000 0x00 0x20000>, + <0x00 0x484a0000 0x00 0x4000>, + <0x00 0x484c0000 0x00 0x2000>, + <0x00 0x48430000 0x00 0x4000>; + reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt", + "cfg", "tchan", "rchan", "rflow"; +};arch/arm/mach-k3/Makefile +1
-0@@ -20,5 +20,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_AM62P5) += am62p5_init.o endif obj-y += common.o security.oarch/arm/mach-k3/am62p5_init.c +0
-0
Quoted 9 lines
arch/arm/mach-k3/am62p5_init.c void board_init_f(ulong dummy) · line 113
Quoted 6 lines
arch/arm/mach-k3/am62p5_init.c +1
-1@@ -110,7 +110,7 @@ void board_init_f(ulong dummy)* through a SYSFW PM-init step and will need a re-init in some way * due to changing module clock frequencies. */ -if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) +if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) {Looks like fixes for a previous patch that didn't get squashed.
haha Oops good catch.. I'll fixup this properly
Thanks for the review Andrew
~Bryan
Re: [PATCH v2 10/13] arm: dts: introduce am62p5 uboot dts files
Quoted 61 lines · Bryan Brattlof
Hi Andrew!
On February 2, 2024 thus sayeth Andrew Davis:
Quoted 20 lines · Bryan Brattlof
Quoted 19 lines
Include the uboot device tree files needed to boot the board.
Signed-off-by Bryan Brattlof <[email protected]>--- arch/arm/dts/Makefile | 2 + arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi | 2800 ++++++++++++++++++++ arch/arm/dts/k3-am62p-sk-binman.dtsi | 173 ++ arch/arm/dts/k3-am62p5-r5-sk.dts | 101 + arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 49 + arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/am62p5_init.c | 4 +- dts/arch/arm64/ti | 1 + 8 files changed, 3129 insertions(+), 2 deletions(-)create mode 100644
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsicreate mode 100644arch/arm/dts/k3-am62p-sk-binman.dtsicreate mode 100644arch/arm/dts/k3-am62p5-r5-sk.dtscreate mode 100644arch/arm/dts/k3-am62p5-sk-u-boot.dtsicreate mode 120000 dts/arch/arm64/ti...
Quoted 25 lines
Quoted 25 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +18
-0@@ -0,0 +1,2800 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * This file was generated with the + * AM62Px SysConfig DDR Subsystem Register Configuration Tool v0.10.02 + * Thu Jan 25 2024 10:43:46 GMT-0600 (Central Standard Time) + * DDR Type: LPDDR4 + * F0 = 50MHz F1 = NA F2 = 1600MHz + * Density (per channel): 16Gb + * Number of Ranks: 2 + */ + +#define DDRSS_PLL_FHS_CNT 5 +#define DDRSS_PLL_FREQUENCY_1 800000000 +#define DDRSS_PLL_FREQUENCY_2 800000000 +#define DDRSS_SDRAM_IDX 17 +#define DDRSS_REGION_IDX 17 + +#define DDRSS_CTL_0_DATA 0x00000B00Quoted 9 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi line 23
Quoted 5 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +5
-0+#define DDRSS_CTL_1_DATA 0x00000000 +#define DDRSS_CTL_2_DATA 0x00000000 +#define DDRSS_CTL_3_DATA 0x00000000 +#define DDRSS_CTL_4_DATA 0x00000000 +#define DDRSS_CTL_5_DATA 0x00000000I wonder if it would be better to generate this file during build..
Quoted 4 lines
Yeah we can save a lot of space by removing tons of these registers writing
0x0to the reserved ranges... The section for the different PHYs is particularly aggravating.
Might be a silly question, what happens if you don't write these 0x0 at all, is there a sane default of 0x0, or is it random on powerup?
Quoted 3 lines
I told Simon and Marex last year I'd get to it once I find some free cycles and then I went and had a son ;) but it's still in the backlog
Know the feeling :)
Andrew
Quoted 62 lines
Quoted 16 lines
Quoted 4 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +3
-0+&main_bcdma { + reg = <0x00 0x485c0100 0x00 0x100>, + <0x00 0x4c000000 0x00 0x20000>,arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi line 36
Quoted 10 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +10
-0+ <0x00 0x4a820000 0x00 0x20000>, + <0x00 0x4aa40000 0x00 0x20000>, + <0x00 0x4bc00000 0x00 0x100000>, + <0x00 0x48600000 0x00 0x8000>, + <0x00 0x484a4000 0x00 0x2000>, + <0x00 0x484c2000 0x00 0x2000>; + reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", + "ringrt", "cfg", "tchan", "rchan"; +}; +Do we still need these? Thought they got fixed kernel side already.
Ah you're right I missed that i'll remove this in v2
Quoted 28 lines
Quoted 28 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +12
-0+&main_pktdma { + reg = <0x00 0x485c0000 0x00 0x100>, + <0x00 0x4a800000 0x00 0x20000>, + <0x00 0x4aa00000 0x00 0x40000>, + <0x00 0x4b800000 0x00 0x400000>, + <0x00 0x485e0000 0x00 0x20000>, + <0x00 0x484a0000 0x00 0x4000>, + <0x00 0x484c0000 0x00 0x2000>, + <0x00 0x48430000 0x00 0x4000>; + reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt", + "cfg", "tchan", "rchan", "rflow"; +};arch/arm/mach-k3/Makefile +1
-0@@ -20,5 +20,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_AM62P5) += am62p5_init.o endif obj-y += common.o security.oarch/arm/mach-k3/am62p5_init.c +0
-0Quoted 9 lines
arch/arm/mach-k3/am62p5_init.c void board_init_f(ulong dummy) · line 113
Quoted 6 lines
arch/arm/mach-k3/am62p5_init.c +1
-1@@ -110,7 +110,7 @@ void board_init_f(ulong dummy)* through a SYSFW PM-init step and will need a re-init in some way * due to changing module clock frequencies. */ -if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) +if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) {Looks like fixes for a previous patch that didn't get squashed.
haha Oops good catch.. I'll fixup this properly
Thanks for the review Andrew
~Bryan
Re: [PATCH v2 00/13] Introduce basic support for TI's AM62Px SoC family
In reply to Sumit GargHi Sumit!
On February 2, 2024 thus sayeth Sumit Garg:
Quoted 6 lines
Hi Bryan,
Quoted 3 lines · Bryan Brattlof
Hello Again Everyone!
Quoted 8 lines
Quoted 3 lines
**Note:** This series depends on the
OF_UPSTREAMwork from Sumit [0]. Patch #11 was added to fix some Makefile.spl targets to allow SPL builds to complete with theOF_UPSTREAMseries.Thanks for your adoption of
OF_UPSTREAMwork. As evident from this series, it would be much easier to maintain U-Boot specific DT pieces rather than the full SoC specific DT copy from Linux source tree.
Like all good ideas we should have done this years ago. Thanks for taking up the task of making this easier for us.
Quoted 179 lines
-Sumit
Quoted 177 lines
The AM62Px is an extension of the existing Sitara AM62x low-cost family of application processors built for Automotive and Linux Application development. Scalable Arm Cortex-A53 performance and embedded features, such as: multi high-definition display support, 3D-graphics acceleration, 4K video acceleration, and extensive peripherals make the AM62Px well-suited for a broad range of automation and industrial application, including automotive digital instrumentation, automotive displays, industrial HMI, and more.
Some highlights of AM62P SoC are:
* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. Dual/Single core variants are provided in the same package to allow HW compatible designs.
* One Device manager Cortex-R5F for system power and resource management, and one Cortex-R5F for Functional Safety or general-purpose usage.
* One 3D GPU up to 50 GLFOPS
* H.264/H.265 Video Encode/Decode.
* Display support: 3x display support over OLDI/LVDS (1x OLDI-DL, 1x or 2x OLDI-SL), DSI, or DPI. Up to 3840x1080 @ 60fps resolution
* Integrated Giga-bit Ethernet switch supporting up to a total of two external ports (TSN capable).
* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3xMMC and SD, GPMC for NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, 1xCSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals.
* Dedicated Centralized Hardware Security Module with support for secure boot, debug security and crypto acceleration and trusted execution environment.
* One 32-bit DDR Subsystem that supports LPDDR4, DDR4 memory types.
* Multiple low power modes support, ex: Deep sleep, Standby, MCU-only, enabling battery powered system design.
For those interested, more details about this SoC can be found in the Technical Reference Manual here: https://www.ti.com/lit/pdf/spruj83
Proof-of-Life: https://paste.sr.ht/~bryanb/af2ac108a9362549aa326f182e87918d52bf2d71
Currently, while more peripherals are being added in Linux[0], this series will only support UART boot.
Thanks for reviewing!
~BryanChanges from v1: [1]
- squashed all clk and lpsc tree updates into a single commit
- correctedSOC_K3_AM642typo with DM firmwareKconfigoption
- updated RM configs and dma nodes to enable IP that need DMA
- added the dtb targets to the dts/Makefile
- rebased the series on top of v2024.01-rc1
- switched to bootstd rather than use distro boot scripts.
- enabledOF_UPSTREAMinstead of using thearch/arm/dtsdirectory[0] https://lore.kernel.org/u-boot/[email protected]/
[1] https://lore.kernel.org/all/[email protected]/Bryan Brattlof (11):
soc: add info to identify the am62p SoC family
power: domain: ti: useIS_ENABLEDmacro
arm: mach-k3: am62px: introduce clock and device files for wkup spl
ram: k3-ddrss: enable the am62ax's DDR controller for am62px
arm: mach-k3: invert logic for split DM firmware config
arch: mach-k3: introduce basic files to support the am62px SoC family
board: ti: introduce basic board files for the am62px family
arm: dts: introduce am62p5 uboot dts files
Makefile: remove hardcoded device tree source directory
configs: introduce configs needed for the am62px
doc: board: ti: introduce am62px documentationHari Nagalla (1):
firmware:ti_sci_static_data: add static DMA channel dataVignesh Raghavendra (1):
dma: ti: k3-udma: Add DMA PSIL mappings for AM62P and J722SMakefile | 18 +- arch/arm/dts/Makefile | 2 + arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi | 2800 +++++++++++++++++ arch/arm/dts/k3-am62p-sk-binman.dtsi | 173 + arch/arm/dts/k3-am62p5-r5-sk.dts | 101 + arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 49 + arch/arm/mach-k3/Kconfig | 9 +- arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/am62p5_init.c | 280 ++ arch/arm/mach-k3/am62px/Kconfig | 32 + .../arm/mach-k3/include/mach/am62p_hardware.h | 83 + arch/arm/mach-k3/include/mach/am62p_spl.h | 49 + arch/arm/mach-k3/include/mach/hardware.h | 6 + arch/arm/mach-k3/include/mach/spl.h | 4 + arch/arm/mach-k3/r5/Makefile | 1 + arch/arm/mach-k3/r5/am62px/Makefile | 6 + arch/arm/mach-k3/r5/am62px/clk-data.c | 325 ++ arch/arm/mach-k3/r5/am62px/dev-data.c | 71 + board/ti/am62px/Kconfig | 26 + board/ti/am62px/MAINTAINERS | 9 + board/ti/am62px/Makefile | 7 + board/ti/am62px/am62px.env | 16 + board/ti/am62px/board-cfg.yaml | 37 + board/ti/am62px/evm.c | 29 + board/ti/am62px/pm-cfg.yaml | 12 + board/ti/am62px/rm-cfg.yaml | 987 ++++++ board/ti/am62px/sec-cfg.yaml | 378 +++ board/ti/am62px/tifs-rm-cfg.yaml | 879 ++++++ configs/am62px_evm_a53_defconfig | 178 ++ configs/am62px_evm_r5_defconfig | 137 + doc/board/ti/am62px_sk.rst | 289 ++ doc/board/ti/k3.rst | 1 + drivers/clk/ti/clk-k3.c | 6 + drivers/dma/ti/Makefile | 2 + drivers/dma/ti/k3-psil-am62p.c | 325 ++ drivers/dma/ti/k3-psil-priv.h | 1 + drivers/dma/ti/k3-psil.c | 4 + drivers/firmware/ti_sci_static_data.h | 5 +- drivers/power/domain/ti-power-domain.c | 13 +- drivers/ram/Kconfig | 2 +- drivers/soc/soc_ti_k3.c | 3 + dts/arch/arm64/ti | 1 + include/configs/am62px_evm.h | 14 + include/k3-clk.h | 1 + include/k3-dev.h | 1 + scripts/Makefile.spl | 17 +- 46 files changed, 7374 insertions(+), 16 deletions(-) create mode 100644 arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi create mode 100644 arch/arm/dts/k3-am62p-sk-binman.dtsi create mode 100644 arch/arm/dts/k3-am62p5-r5-sk.dts create mode 100644 arch/arm/dts/k3-am62p5-sk-u-boot.dtsi create mode 100644 arch/arm/mach-k3/am62p5_init.c create mode 100644 arch/arm/mach-k3/am62px/Kconfig create mode 100644 arch/arm/mach-k3/include/mach/am62p_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/am62p_spl.h create mode 100644 arch/arm/mach-k3/r5/am62px/Makefile create mode 100644 arch/arm/mach-k3/r5/am62px/clk-data.c create mode 100644 arch/arm/mach-k3/r5/am62px/dev-data.c create mode 100644 board/ti/am62px/Kconfig create mode 100644 board/ti/am62px/MAINTAINERS create mode 100644 board/ti/am62px/Makefile create mode 100644 board/ti/am62px/am62px.env create mode 100644 board/ti/am62px/board-cfg.yaml create mode 100644 board/ti/am62px/evm.c create mode 100644 board/ti/am62px/pm-cfg.yaml create mode 100644 board/ti/am62px/rm-cfg.yaml create mode 100644 board/ti/am62px/sec-cfg.yaml create mode 100644 board/ti/am62px/tifs-rm-cfg.yaml create mode 100644 configs/am62px_evm_a53_defconfig create mode 100644 configs/am62px_evm_r5_defconfig create mode 100644 doc/board/ti/am62px_sk.rst create mode 100644 drivers/dma/ti/k3-psil-am62p.c create mode 120000 dts/arch/arm64/ti create mode 100644 include/configs/am62px_evm.hbase-commit:
b6d8969bcb94321dfed1399f2eaa8768ba42caaa
prerequisite-patch-id:a2fa61937f80658611e0a2cdf88a11a6214b3645
prerequisite-patch-id:1a31af706136646f62e98e88919802b1379feb39
prerequisite-patch-id:54b40f9e042ef51755b4fb33ba6f8c4f6af9c17f
prerequisite-patch-id:d2199c72fa11aea6e478f5a846f8ad786b0afc38
prerequisite-patch-id:00e954105cf966b9527bb6ea11373e3da2d4c26d
prerequisite-patch-id:bb58fb490183bfd836c492ec18590d9ec3b97457
prerequisite-patch-id:99cb64427f3b8b401f32cd1d4cc68cd74aaa8733
prerequisite-patch-id:c461c9afad63446e824d00017c5faab7860de0e9
prerequisite-patch-id:fdc8c1c111e6329345f0b5c7609f2751e542d2fa
prerequisite-patch-id:e07cf9612f806d28af7628573d73fefdd4144e63
prerequisite-patch-id:15ee392282a7e0d2b99bcf9cded71f965fc32a5b
prerequisite-patch-id:91cdc33aa65dd1d205fb8fea5de2980fe2ab2f62--
2.43.0
Re: [PATCH v2 05/13] arm: mach-k3: invert logic for split DM firmware config
In reply to Bryan BrattlofQuoted 14 lines · Bryan Brattlof
Currently, for the K3 generation of SoCs, there are more SoCs that utilize the split firmware approach than the combined DMSC firmware. Invert the logic to avoid adding more and more SoCs to this list.
Signed-off-by Bryan Brattlof <[email protected]>--- arch/arm/mach-k3/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-k3/Kconfig +0
-0
arch/arm/mach-k3/Kconfig config K3_ATF_LOAD_ADDR · line 133
Quoted 5 lines
arch/arm/mach-k3/Kconfig +1
-1@@ -130,7 +130,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 && ARCH_K3 && !SOC_K3_AM642 && !SOC_K3_AM654 && !CLK_TI_SCI && !TI_SCI_POWER_DOMAIN
Always amusing to see how many SoCs get added to these lists before someone realizes there is only one or two SoCs that are not on the list :)
BTW, this whole file is inside an "if ARCH_K3" block, so all symbols depend on ARCH_K3 automatically. You can drop that check.
Otherwise,
Quoted 3 lines
arch/arm/mach-k3/Kconfig +0
-0default y help Enabling this will indicate that the system has separate DM
Re: [PATCH v2 10/13] arm: dts: introduce am62p5 uboot dts files
In reply to Andrew DavisOn February 2, 2024 thus sayeth Andrew Davis:
Quoted 62 lines · Bryan Brattlof
Quoted 61 lines
Hi Andrew!
On February 2, 2024 thus sayeth Andrew Davis:
Quoted 20 lines · Bryan Brattlof
Quoted 19 lines
Include the uboot device tree files needed to boot the board.
Signed-off-by Bryan Brattlof <[email protected]>--- arch/arm/dts/Makefile | 2 + arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi | 2800 ++++++++++++++++++++ arch/arm/dts/k3-am62p-sk-binman.dtsi | 173 ++ arch/arm/dts/k3-am62p5-r5-sk.dts | 101 + arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 49 + arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/am62p5_init.c | 4 +- dts/arch/arm64/ti | 1 + 8 files changed, 3129 insertions(+), 2 deletions(-)create mode 100644
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsicreate mode 100644arch/arm/dts/k3-am62p-sk-binman.dtsicreate mode 100644arch/arm/dts/k3-am62p5-r5-sk.dtscreate mode 100644arch/arm/dts/k3-am62p5-sk-u-boot.dtsicreate mode 120000 dts/arch/arm64/ti...
Quoted 34 lines
Quoted 20 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +13
-0@@ -0,0 +1,2800 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * This file was generated with the + * AM62Px SysConfig DDR Subsystem Register Configuration Tool v0.10.02 + * Thu Jan 25 2024 10:43:46 GMT-0600 (Central Standard Time) + * DDR Type: LPDDR4 + * F0 = 50MHz F1 = NA F2 = 1600MHz + * Density (per channel): 16Gb + * Number of Ranks: 2 + */ + +#define DDRSS_PLL_FHS_CNT 5 +#define DDRSS_PLL_FREQUENCY_1 800000000arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi line 23
Quoted 10 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +10
-0+#define DDRSS_PLL_FREQUENCY_2 800000000 +#define DDRSS_SDRAM_IDX 17 +#define DDRSS_REGION_IDX 17 + +#define DDRSS_CTL_0_DATA 0x00000B00 +#define DDRSS_CTL_1_DATA 0x00000000 +#define DDRSS_CTL_2_DATA 0x00000000 +#define DDRSS_CTL_3_DATA 0x00000000 +#define DDRSS_CTL_4_DATA 0x00000000 +#define DDRSS_CTL_5_DATA 0x00000000I wonder if it would be better to generate this file during build..
Quoted 8 lines
Quoted 4 lines
Yeah we can save a lot of space by removing tons of these registers writing
0x0to the reserved ranges... The section for the different PHYs is particularly aggravating.Might be a silly question, what happens if you don't write these
0x0at all, is there a sane default of0x0, or is it random on powerup?
The vast majority (especially the spaces between the PHYs) are just holes in the bus that find their way to a black hole when we write to it. Nothing bad will happen. There are some shadow registers we need to be careful about but those aren't hard to work around before we start the controller.
We'd just need to refactor how these registers are copied into the controller, right now it's something dumb like
for(offset=0, offset<num_regs, offset++)
writel(rev_val, base + offset);
for the entire controller reg range.
I wanted to see if I could get this down to a memcopy plus a readl to flush the bus writes to see how fast I could make this :)
Carving out each sub reg range will really save space and time as well.
Quoted 70 lines
Quoted 3 lines
I told Simon and Marex last year I'd get to it once I find some free cycles and then I went and had a son ;) but it's still in the backlog
Know the feeling :)
Andrew
Quoted 62 lines
Quoted 16 lines
Quoted 4 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +3
-0+&main_bcdma { + reg = <0x00 0x485c0100 0x00 0x100>, + <0x00 0x4c000000 0x00 0x20000>,arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi line 36
Quoted 10 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +10
-0+ <0x00 0x4a820000 0x00 0x20000>, + <0x00 0x4aa40000 0x00 0x20000>, + <0x00 0x4bc00000 0x00 0x100000>, + <0x00 0x48600000 0x00 0x8000>, + <0x00 0x484a4000 0x00 0x2000>, + <0x00 0x484c2000 0x00 0x2000>; + reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", + "ringrt", "cfg", "tchan", "rchan"; +}; +Do we still need these? Thought they got fixed kernel side already.
Ah you're right I missed that i'll remove this in v2
Quoted 28 lines
Quoted 28 lines
arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi new file +12
-0+&main_pktdma { + reg = <0x00 0x485c0000 0x00 0x100>, + <0x00 0x4a800000 0x00 0x20000>, + <0x00 0x4aa00000 0x00 0x40000>, + <0x00 0x4b800000 0x00 0x400000>, + <0x00 0x485e0000 0x00 0x20000>, + <0x00 0x484a0000 0x00 0x4000>, + <0x00 0x484c0000 0x00 0x2000>, + <0x00 0x48430000 0x00 0x4000>; + reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt", + "cfg", "tchan", "rchan", "rflow"; +};arch/arm/mach-k3/Makefile +1
-0@@ -20,5 +20,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_AM62P5) += am62p5_init.o endif obj-y += common.o security.oarch/arm/mach-k3/am62p5_init.c +0
-0Quoted 9 lines
arch/arm/mach-k3/am62p5_init.c void board_init_f(ulong dummy) · line 113
Quoted 6 lines
arch/arm/mach-k3/am62p5_init.c +1
-1@@ -110,7 +110,7 @@ void board_init_f(ulong dummy)* through a SYSFW PM-init step and will need a re-init in some way * due to changing module clock frequencies. */ -if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) +if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) {Looks like fixes for a previous patch that didn't get squashed.
haha Oops good catch.. I'll fixup this properly
Thanks for the review Andrew
~Bryan
Re: [PATCH v2 05/13] arm: mach-k3: invert logic for split DM firmware config
In reply to Andrew DavisOn February 2, 2024 thus sayeth Andrew Davis:
Quoted 10 lines · Bryan Brattlof
Quoted 9 lines
Currently, for the K3 generation of SoCs, there are more SoCs that utilize the split firmware approach than the combined DMSC firmware. Invert the logic to avoid adding more and more SoCs to this list.
Signed-off-by Bryan Brattlof <[email protected]>--- arch/arm/mach-k3/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines
arch/arm/mach-k3/Kconfig config K3_ATF_LOAD_ADDR · line 132
Quoted 9 lines
arch/arm/mach-k3/Kconfig +1
-1@@ -130,7 +130,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 && ARCH_K3 && !SOC_K3_AM642 && !SOC_K3_AM654 && !CLK_TI_SCI && !TI_SCI_POWER_DOMAINAlways amusing to see how many SoCs get added to these lists before someone realizes there is only one or two SoCs that are not on the list :)
Haha having to resize my terminal is when I had enough :)
Quoted 4 lines
BTW, this whole file is inside an "if
ARCH_K3" block, so all symbols depend onARCH_K3automatically. You can drop that check.
Nice catch! I'll drop that in v2
Quoted 7 lines
Otherwise,
Acked-by Andrew Davis <[email protected]>Quoted 3 lines
arch/arm/mach-k3/Kconfig +0
-0default y help Enabling this will indicate that the system has separate DM