On 1/31/24 9:06 PM, Bryan Brattlof wrote:
Include the uboot device tree files needed to boot the board.
Signed-off-by: Bryan Brattlof <b...@ti.com>
---
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
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 34ebf2b58417d..36de84287d4c2 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -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 \
diff --git a/arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi
b/arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi
new file mode 100644
index 0000000000000..f66435201530f
--- /dev/null
+++ b/arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi
@@ -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
+#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..
[...]
+&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.
+&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";
+};
diff --git a/arch/arm/mach-k3/Makefile b/arch/arm/mach-k3/Makefile
index 42161376469e2..820b313a83c23 100644
--- a/arch/arm/mach-k3/Makefile
+++ b/arch/arm/mach-k3/Makefile
@@ -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.o
diff --git a/arch/arm/mach-k3/am62p5_init.c b/arch/arm/mach-k3/am62p5_init.c
index 5b6795cc7d246..9ff877d5d26e8 100644
--- a/arch/arm/mach-k3/am62p5_init.c
+++ b/arch/arm/mach-k3/am62p5_init.c
@@ -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
ret = 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");
diff --git a/dts/arch/arm64/ti b/dts/arch/arm64/ti
new file mode 120000
index 0000000000000..5ed559a6d0849
--- /dev/null
+++ b/dts/arch/arm64/ti
@@ -0,0 +1 @@
+../../../devicetree-rebasing/src/arm64/ti/
\ No newline at end of file