Skip to contentSkip to conversation

arm: dts: k3-am64: Sync with kernel.org and

PATCH In review Nishanth Menon 3 participants 31 messages Apr 14, 2023 – Apr 19, 2023 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

cover arm: dts: k3-am64: Sync with kernel.org and

Hi,

This is a bit painful series, so apologies in advance for the patchbomb. I did'nt see any clean way to do this, so here goes.

First: there are dts mismatches and overrides being done in u-boot in varied manner that should have been submitted to kernel.org in the first place, so, https://lore.kernel.org/linux-devicetree/[email protected]/

This series picks some of those nodes up and marks them so that merge is a lot more logical. There are still stuff like esm and cpsw that will need a little more work.

This series cleans up the dt, switches to .env mode and finally defaults to distroboot with none of the fancy stuff.

I have tried to maintain bisectability, but the r5-sk stuff is a bit too broken for me to succeed cleanly.. but it did'nt make sense to confuse review by squashing everything up. Let me know if there is a better bisect option, and I can try.

Logs are available:
(including a log with the last two patches applied for distoboot default)
https://gist.github.com/nmenon/6b09f55251225d3f3cce076c32a33bba
Tested along with the ethernet fixup I had sent earlier:
https://lore.kernel.org/u-boot/[email protected]/

Baseline for these patches:
9e804638bfe2 Merge tag 'for-v2023-07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-i2c

Nishanth Menon (23):
Revert "ARM: dts: k3-am642-sk-u-boot: add PMIC node"
arm: dts: k3-am64: Update devicetree to sync with v6.3-rc6
arm: dts: k3-am642-sk: Add a note to handle pinmux till MDIO DM
conversion is done
arm: dts: k3-am642-sk: Fix mmc1 pinmux pull polarity
arm: dts: k3-am642-sk: Add main_uart1 description
arm: dts: k3-am642-sk: Add main_i2c0 and eeprom
arm: dts: k3-am642-sk-u-boot: Drop the i2c node
arm: dts: k3-am642-sk-u-boot: Drop redundant usb dr_mode property
arm: dts: k3-am642-sk-u-boot: Mark main_uart0 to be used for spl
arm: dts: k3-am642-sk-u-boot: Document timer as missing upstream
arm: dts: k3-am642-sk-u-boot: Drop aliases and stdout
arm: dts: k3-am642-r5-sk: Use am642-sk.dts and k3-am642-sk-u-boot.dtsi
arm: dts: k3-am642-evm: Move the mdio pinmux down to evm.dts
arm: dts: k3-am642-evm: Add DDR vtt regulator
arm: dts: k3-am642-evm: Add main_uart1 description
arm: dts: k3-am642-evm: Add main_i2c0 and eeprom
arm: dts: k3-am642-evm-u-boot: Drop the i2c node
arm: dts: k3-am642-evm-u-boot: Drop stdout and cosmetic fixups
arm: dts: k3-am642-evm-u-boot: Re-organize the pinmux
arm: dts: k3-am642-evm-u-boot: Add missing pinmux notations
arm: dts: k3-am642-r5-evm: Use am642-evm.dts and

    k3-am642-evm-u-boot.dtsi

include: configs: am64x_evm: Change to using .env
configs: am64x_evm_a53_defconfig: Just use distroboot

 arch/arm/dts/k3-am642-evm-u-boot.dtsi |  52 ++++---
 arch/arm/dts/k3-am642-evm.dts         |  60 +++++++-
 arch/arm/dts/k3-am642-r5-evm.dts      | 203 ++++----------------------
 arch/arm/dts/k3-am642-r5-sk.dts       | 194 +++---------------------
 arch/arm/dts/k3-am642-sk-u-boot.dtsi  |  89 ++---------
 arch/arm/dts/k3-am642-sk.dts          |  54 ++++++-
 arch/arm/dts/k3-am642.dtsi            |   1 +
 board/ti/am64x/Kconfig                |   3 +
 board/ti/am64x/am64x.env              |  37 +++++
 configs/am64x_evm_a53_defconfig       |   2 +-
 include/configs/am64x_evm.h           | 117 ++++-----------
 11 files changed, 266 insertions(+), 546 deletions(-)
 create mode 100644 board/ti/am64x/am64x.env
Signature · 1 line
2.40.0
#12 lore raw

PATCH 8/23 arm: dts: k3-am642-sk-u-boot: Drop redundant usb dr_mode property

We do not need that property to be defined as it is already defined in am642-sk.dts

---
 arch/arm/dts/k3-am642-sk-u-boot.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/dts/k3-am642-sk-u-boot.dtsi +0 -1
index aa3551c2bb4a..57797a59e05d 100644
@@ -152,7 +152,6 @@
 };
 
 &usb0 {
-	dr_mode = "host";
 	bootph-pre-ram;
 };
 
Signature · 1 line
2.40.0
#23 lore raw

PATCH 16/23 arm: dts: k3-am642-evm: Add main_i2c0 and eeprom

In reply to Nishanth Menon

Add missing main_i2c0 node and eeprom property.

This is a pending upstream kernel updates as of v6.3-rc6.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/

 arch/arm/dts/k3-am642-evm.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/dts/k3-am642-evm.dts +22 -0
index 9cc271d9a22a..c20215b68d8f 100644
@@ -258,6 +258,14 @@
 		>;
 	};
 
+	/* XXX: Upstream kernel TODO: send upstream pinmux */
+	main_i2c0_pins_default: main-i2c0-pins-default {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
+			AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
+		>;
+	};
+
 	main_i2c1_pins_default: main-i2c1-pins-default {
 		pinctrl-single,pins = <
 			AM64X_IOPAD(0x0268, PIN_INPUT_PULLUP, 0) /* (C18) I2C1_SCL */
@@ -370,6 +378,20 @@
 	pinctrl-0 = <&main_uart1_pins_default>;
 };
 
+/* XXX: Upstream kernel TODO: send upstream pinmux */
+&main_i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_i2c0_pins_default>;
+	clock-frequency = <400000>;
+
+	eeprom@50 {
+		/* AT24CM01 */
+		compatible = "atmel,24c1024";
+		reg = <0x50>;
+	};
+};
+
 &main_i2c1 {
 	status = "okay";
 	pinctrl-names = "default";
Signature · 1 line
2.40.0
#13 lore raw

PATCH 9/23 arm: dts: k3-am642-sk-u-boot: Mark main_uart0 to be used for spl

In reply to Nishanth Menon

we need to configure the pinmux for main_uart0 to get console

---
 arch/arm/dts/k3-am642-sk-u-boot.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/k3-am642-sk-u-boot.dtsi +4 -0
index 57797a59e05d..122a304d4501 100644
@@ -48,6 +48,10 @@
 	bootph-pre-ram;
 };
 
+&main_uart0_pins_default {
+	bootph-pre-ram;
+};
+
 &main_uart0 {
 	bootph-pre-ram;
 };
Signature · 1 line
2.40.0
#1 lore raw

PATCH 1/23 Revert "ARM: dts: k3-am642-sk-u-boot: add PMIC node"

In reply to Nishanth Menon

The original patch is completely wrong.
a) https://www.ti.com/tool/SK-AM64#design-files shows no such PMIC driving the supplies.
b) This should have gone upstream to am64-sk.dts and NOT hacked into u-boot.dtsi.

This reverts commit 28a4c3113445d4400639f357fae0def007a41093.

Cc Neil Armstrong <[email protected]>
Cc Kevin Hilman <[email protected]>

---

https://www.ti.com/tool/SK-AM64B seems to be TPS6522053RHBR, but anyways, it is not this dts - revert, and when the board dts is added to kernel.org, we can see how to backport it - this just adds to all kind of confusion when syncing with kernel.org

 arch/arm/dts/k3-am642-sk-u-boot.dtsi | 61 ----------------------------
 1 file changed, 61 deletions(-)
arch/arm/dts/k3-am642-sk-u-boot.dtsi +0 -61
index 69dbe943bdf3..f6b8b887e4c1 100644
@@ -52,67 +52,6 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_i2c0_pins_default>;
 	clock-frequency = <400000>;
-
-	tps65219: pmic@30 {
-		compatible = "ti,tps65219";
-		reg = <0x30>;
-
-		regulators {
-			buck1_reg: buck1 {
-				regulator-name = "VDD_CORE";
-				regulator-min-microvolt = <750000>;
-				regulator-max-microvolt = <750000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			buck2_reg: buck2 {
-				regulator-name = "VCC1V8";
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			buck3_reg: buck3 {
-				regulator-name = "VDD_LPDDR4";
-				regulator-min-microvolt = <1100000>;
-				regulator-max-microvolt = <1100000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			ldo1_reg: ldo1 {
-				regulator-name = "VDDSHV_SD_IO_PMIC";
-				regulator-min-microvolt = <33000000>;
-				regulator-max-microvolt = <33000000>;
-			};
-
-			ldo2_reg: ldo2 {
-				regulator-name = "VDDAR_CORE";
-				regulator-min-microvolt = <850000>;
-				regulator-max-microvolt = <850000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			ldo3_reg: ldo3 {
-				regulator-name = "VDDA_1V8";
-				regulator-min-microvolt = <18000000>;
-				regulator-max-microvolt = <18000000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			ldo4_reg: ldo4 {
-				regulator-name = "VDD_PHY_2V5";
-				regulator-min-microvolt = <25000000>;
-				regulator-max-microvolt = <25000000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-		};
-	};
 };
 
 &main_uart0 {
Signature · 1 line
2.40.0
#11 lore raw

PATCH 7/23 arm: dts: k3-am642-sk-u-boot: Drop the i2c node

In reply to Nishanth Menon

Drop the i2c and mux description, since we have it on main board dts.

---

This causes a bisect break with some weird dependency on r5-sk.dts on u-boot.dtsi

 arch/arm/dts/k3-am642-sk-u-boot.dtsi | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
arch/arm/dts/k3-am642-sk-u-boot.dtsi +4 -10
index f6b8b887e4c1..aa3551c2bb4a 100644
@@ -38,20 +38,14 @@
 
 &main_pmx0 {
 	bootph-pre-ram;
-	main_i2c0_pins_default: main-i2c0-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
-			AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
-		>;
-	};
+};
+
+&main_i2c0_pins_default {
+	bootph-pre-ram;
 };
 
 &main_i2c0 {
 	bootph-pre-ram;
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_i2c0_pins_default>;
-	clock-frequency = <400000>;
 };
 
 &main_uart0 {
Signature · 1 line
2.40.0
#25 lore raw

PATCH 18/23 arm: dts: k3-am642-evm-u-boot: Drop stdout and cosmetic fixups

In reply to Nishanth Menon

stdout is provided in evm.dts, add documentation that timer needs to be fixed in upstream. While at it, fix a minor formatting error

---
 arch/arm/dts/k3-am642-evm-u-boot.dtsi | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/dts/k3-am642-evm-u-boot.dtsi +3 -2
index 6e85101f134e..83e00c3f4553 100644
@@ -5,7 +5,6 @@
 
 / {
 	chosen {
-		stdout-path = "serial2:115200n8";
 		tick-timer = &timer1;
 	};
 
@@ -14,8 +13,10 @@
 	};
 };
 
-&cbass_main{
+&cbass_main {
 	bootph-pre-ram;
+
+	/* XXX: Upstream kernel TODO: send upstream pinmux */
 	timer1: timer@2400000 {
 		compatible = "ti,omap5430-timer";
 		reg = <0x0 0x2400000 0x0 0x80>;
Signature · 1 line
2.40.0
#14 lore raw

PATCH 10/23 arm: dts: k3-am642-sk-u-boot: Document timer as missing upstream

In reply to Nishanth Menon

Mark the timer as missing in upstream kernel.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/
once the patches are merged, we can consider integrating the same in the appropriate sync, I have tried to stay off main SoC dtsi file mods in
this series.

 arch/arm/dts/k3-am642-sk-u-boot.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/dts/k3-am642-sk-u-boot.dtsi +2 -0
index 122a304d4501..4a5ab6a7c4be 100644
@@ -20,6 +20,8 @@
 
 &cbass_main{
 	bootph-pre-ram;
+
+	/* XXX: Upstream kernel TODO: send upstream */
 	timer1: timer@2400000 {
 		compatible = "ti,omap5430-timer";
 		reg = <0x0 0x2400000 0x0 0x80>;
Signature · 1 line
2.40.0
#29 lore raw

PATCH 22/23 include: configs: am64x_evm: Change to using .env

In reply to Nishanth Menon

Move to using .env file for setting up environment variables for am64x.

---

I think this was long time pending.. but anyways..

 board/ti/am64x/Kconfig      |   3 +
 board/ti/am64x/am64x.env    |  37 ++++++++++++
 include/configs/am64x_evm.h | 117 ++++++++++--------------------------
 3 files changed, 72 insertions(+), 85 deletions(-)
 create mode 100644 board/ti/am64x/am64x.env
board/ti/am64x/Kconfig +3 -0
index afb54f8cdabb..bc99b041228d 100644
@@ -37,6 +37,9 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
        default "am64x_evm"
 
+config ENV_SOURCE_FILE
+       default "am64x"
+
 source "board/ti/common/Kconfig"
 
 endif
board/ti/am64x/am64x.env new file +37 -0
new file mode 100644
index 000000000000..28ba0ac073b8
@@ -0,0 +1,37 @@
+#include <environment/ti/ti_armv7_common.env>
+#include <environment/ti/mmc.env>
+
+default_device_tree=k3-am642-evm.dtb
+findfdt=
+	setenv name_fdt ${default_device_tree};
+	if test $board_name = am64x_gpevm; then
+		setenv name_fdt k3-am642-evm.dtb; fi;
+	if test $board_name = am64x_skevm; then
+		setenv name_fdt k3-am642-sk.dtb; fi;
+	setenv fdtfile ${name_fdt}
+
+name_kern=Image
+console=ttyS2,115200n8
+args_all=setenv optargs ${optargs} ${mtdparts}
+run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
+
+boot=mmc
+mmcdev=1
+bootpart=1:2
+bootdir=/boot
+rd_spec=-
+init_mmc=run args_all args_mmc
+get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
+get_overlay_mmc=
+	fdt address ${fdtaddr};
+	fdt resize 0x100000;
+	for overlay in $name_overlays;
+	do;
+	load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} &&
+	fdt apply ${dtboaddr};
+	done;
+get_kern_mmc=load mmc ${bootpart} ${loadaddr}
+	${bootdir}/${name_kern}
+get_fit_mmc=load mmc ${bootpart} ${addr_fit}
+	${bootdir}/${name_fit}
+partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
include/configs/am64x_evm.h +32 -85

137 lines not on this page · raw message

Signature · 1 line
2.40.0
#15 lore raw

PATCH 11/23 arm: dts: k3-am642-sk-u-boot: Drop aliases and stdout

In reply to Nishanth Menon

These are inherited from am642-sk.dts itself.

While at this, fix up a minor formatting error with main_cbass.

---
 arch/arm/dts/k3-am642-sk-u-boot.dtsi | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/dts/k3-am642-sk-u-boot.dtsi +1 -6
index 4a5ab6a7c4be..25a32206a244 100644
@@ -5,20 +5,15 @@
 
 / {
 	chosen {
-		stdout-path = "serial2:115200n8";
 		tick-timer = &timer1;
 	};
 
-	aliases {
-		mmc1 = &sdhci1;
-	};
-
 	memory@80000000 {
 		bootph-pre-ram;
 	};
 };
 
-&cbass_main{
+&cbass_main {
 	bootph-pre-ram;
 
 	/* XXX: Upstream kernel TODO: send upstream */
Signature · 1 line
2.40.0
#3 lore raw

PATCH 3/23 arm: dts: k3-am642-sk: Add a note to handle pinmux till MDIO DM conversion is done

In reply to Nishanth Menon

Until MDIO is converted to DM model, it won't be possible to probe for pinmux from the MDIO node. To work around this, lets hack the board dts to set the default mux option to include MDIO. This hack is a limitation for now till we get u-boot MDIO driver into DM model.

---

Cant send this upstream.

 arch/arm/dts/k3-am642-sk.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/dts/k3-am642-sk.dts +3 -1
index 2e2d40da360a..4fb279489cfc 100644
@@ -439,7 +439,9 @@
 
 &cpsw3g {
 	pinctrl-names = "default";
-	pinctrl-0 = <&rgmii1_pins_default
+	/* XXX: U-boot HACK: mdio pinmux till MDIO DM conversion is done */
+	pinctrl-0 = <&mdio1_pins_default
+		     &rgmii1_pins_default
 		     &rgmii2_pins_default>;
 };
 
Signature · 1 line
2.40.0
#28 lore raw

PATCH 21/23 arm: dts: k3-am642-r5-evm: Use am642-evm.dts and k3-am642-evm-u-boot.dtsi

In reply to Nishanth Menon

Use am642-evm.dts to represent the Board and selectively enable/override the configurations necessary. And since am642-evm-u-boot.dtsi also needs to setup common properties, instead of re-inventing everything, just reuse the definitions.

---
 arch/arm/dts/k3-am642-r5-evm.dts | 203 +++++--------------------------
 1 file changed, 29 insertions(+), 174 deletions(-)
arch/arm/dts/k3-am642-r5-evm.dts +29 -174
index ca5ce4a35a5c..140dd90fbdf1 100644
@@ -5,29 +5,18 @@
 
 /dts-v1/;
 
-#include "k3-am642.dtsi"
+#include "k3-am642-evm.dts"
 #include "k3-am64-evm-ddr4-1600MTs.dtsi"
 #include "k3-am64-ddr.dtsi"
 
-/ {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
+#include "k3-am642-evm-u-boot.dtsi"
 
+/ {
 	aliases {
 		remoteproc0 = &sysctrler;
 		remoteproc1 = &a53_0;
 	};
 
-	memory@80000000 {
-		device_type = "memory";
-		/* 2G RAM */
-		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
-
-		bootph-pre-ram;
-	};
-
 	a53_0: a53@0 {
 		compatible = "ti,am654-rproc";
 		reg = <0x00 0x00a90000 0x00 0x10>;
@@ -44,34 +33,12 @@
 		bootph-pre-ram;
 	};
 
-	reserved-memory {
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-
-		secure_ddr: optee@9e800000 {
-			reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
-			alignment = <0x1000>;
-			no-map;
-		};
-	};
-
 	clk_200mhz: dummy-clock-200mhz {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <200000000>;
 		bootph-pre-ram;
 	};
-
-	vtt_supply: vtt-supply {
-		compatible = "regulator-gpio";
-		regulator-name = "vtt";
-		regulator-min-microvolt = <0>;
-		regulator-max-microvolt = <3300000>;
-		gpios = <&main_gpio0 12 GPIO_ACTIVE_HIGH>;
-		states = <0 0x0 3300000 0x1>;
-		bootph-pre-ram;
-	};
 };
 
 &cbass_main {
@@ -81,9 +48,8 @@
 		mbox-names = "tx", "rx";
 		bootph-pre-ram;
 	};
-};
 
-&cbass_main {
+	/* XXX: Upstream kernel TODO: send upstream */
 	main_esm: esm@420000 {
 		compatible = "ti,j721e-esm";
 		reg = <0x0 0x420000 0x0 0x1000>;
@@ -94,6 +60,8 @@
 
 &cbass_mcu {
 	bootph-pre-ram;
+
+	/* XXX: Upstream kernel TODO: send upstream */
 	mcu_esm: esm@4100000 {
 		compatible = "ti,j721e-esm";
 		reg = <0x0 0x4100000 0x0 0x1000>;
@@ -102,115 +70,8 @@
 	};
 };
 
-&main_pmx0 {
-	bootph-pre-ram;
-	main_uart0_pins_default: main-uart0-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0238, PIN_INPUT, 0)		/* (B16) UART0_CTSn */
-			AM64X_IOPAD(0x023c, PIN_OUTPUT, 0)		/* (A16) UART0_RTSn */
-			AM64X_IOPAD(0x0230, PIN_INPUT, 0)		/* (D15) UART0_RXD */
-			AM64X_IOPAD(0x0234, PIN_OUTPUT, 0)		/* (C16) UART0_TXD */
-		>;
-	};
-
-	main_uart1_pins_default: main-uart1-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0248, PIN_INPUT, 0)		/* (D16) UART1_CTSn */
-			AM64X_IOPAD(0x024c, PIN_OUTPUT, 0)		/* (E16) UART1_RTSn */
-			AM64X_IOPAD(0x0240, PIN_INPUT, 0)		/* (E15) UART1_RXD */
-			AM64X_IOPAD(0x0244, PIN_OUTPUT, 0)		/* (E14) UART1_TXD */
-		>;
-	};
-
-	main_mmc0_pins_default: main-mmc0-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0)	/* (B25) MMC0_CLK */
-			AM64X_IOPAD(0x01aC, PIN_INPUT_PULLUP, 0)	/* (B27) MMC0_CMD */
-			AM64X_IOPAD(0x01a4, PIN_INPUT_PULLUP, 0)	/* (A26) MMC0_DAT0 */
-			AM64X_IOPAD(0x01a0, PIN_INPUT_PULLUP, 0)	/* (E25) MMC0_DAT1 */
-			AM64X_IOPAD(0x019c, PIN_INPUT_PULLUP, 0)	/* (C26) MMC0_DAT2 */
-			AM64X_IOPAD(0x0198, PIN_INPUT_PULLUP, 0)	/* (A25) MMC0_DAT3 */
-			AM64X_IOPAD(0x0194, PIN_INPUT_PULLUP, 0)	/* (E24) MMC0_DAT4 */
-			AM64X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0)	/* (A24) MMC0_DAT5 */
-			AM64X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0)	/* (B26) MMC0_DAT6 */
-			AM64X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0)	/* (D25) MMC0_DAT7 */
-			AM64X_IOPAD(0x01b0, PIN_INPUT, 0)		/* (C25) MMC0_DS */
-		>;
-	};
-
-	main_mmc1_pins_default: main-mmc1-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0294, PIN_INPUT_PULLUP, 0)	/* (J19) MMC1_CMD */
-			AM64X_IOPAD(0x028c, PIN_INPUT_PULLDOWN, 0)	/* (L20) MMC1_CLK */
-			AM64X_IOPAD(0x0288, PIN_INPUT_PULLUP, 0)	/* (K21) MMC1_DAT0 */
-			AM64X_IOPAD(0x0284, PIN_INPUT_PULLUP, 0)	/* (L21) MMC1_DAT1 */
-			AM64X_IOPAD(0x0280, PIN_INPUT_PULLUP, 0)	/* (K19) MMC1_DAT2 */
-			AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0)	/* (K18) MMC1_DAT3 */
-			AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0)	/* (D19) MMC1_SDCD */
-			AM64X_IOPAD(0x029c, PIN_INPUT_PULLUP, 0)	/* (C20) MMC1_SDWP */
-		>;
-	};
-
-	ddr_vtt_pins_default: ddr-vtt-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0030, PIN_OUTPUT_PULLUP, 7)	/* (L18) OSPI0_CSN1.GPIO0_12 */
-		>;
-	};
-
-	main_usb0_pins_default: main-usb0-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */
-		>;
-	};
-
-	mdio1_pins_default: mdio1-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4) /* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
-			AM64X_IOPAD(0x01f8, PIN_INPUT, 4) /* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
-		>;
-	};
-
-	rgmii1_pins_default: rgmii1-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x01cc, PIN_INPUT, 4) /* (W5) PRG0_PRU1_GPO7.RGMII1_RD0 */
-			AM64X_IOPAD(0x01d4, PIN_INPUT, 4) /* (Y5) PRG0_PRU1_GPO9.RGMII1_RD1 */
-			AM64X_IOPAD(0x01d8, PIN_INPUT, 4) /* (V6) PRG0_PRU1_GPO10.RGMII1_RD2 */
-			AM64X_IOPAD(0x01f4, PIN_INPUT, 4) /* (V5) PRG0_PRU1_GPO17.RGMII1_RD3 */
-			AM64X_IOPAD(0x0188, PIN_INPUT, 4) /* (AA5) PRG0_PRU0_GPO10.RGMII1_RXC */
-			AM64X_IOPAD(0x0184, PIN_INPUT, 4) /* (W6) PRG0_PRU0_GPO9.RGMII1_RX_CTL */
-			AM64X_IOPAD(0x0124, PIN_OUTPUT, 4) /* (V15) PRG1_PRU1_GPO7.RGMII1_TD0 */
-			AM64X_IOPAD(0x012c, PIN_OUTPUT, 4) /* (V14) PRG1_PRU1_GPO9.RGMII1_TD1 */
-			AM64X_IOPAD(0x0130, PIN_OUTPUT, 4) /* (W14) PRG1_PRU1_GPO10.RGMII1_TD2 */
-			AM64X_IOPAD(0x014c, PIN_OUTPUT, 4) /* (AA14) PRG1_PRU1_GPO17.RGMII1_TD3 */
-			AM64X_IOPAD(0x00e0, PIN_OUTPUT, 4) /* (U14) PRG1_PRU0_GPO10.RGMII1_TXC */
-			AM64X_IOPAD(0x00dc, PIN_OUTPUT, 4) /* (U15) PRG1_PRU0_GPO9.RGMII1_TX_CTL */
-		>;
-	};
-
-       rgmii2_pins_default: rgmii2-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0108, PIN_INPUT, 4) /* (W11) PRG1_PRU1_GPO0.RGMII2_RD0 */
-			AM64X_IOPAD(0x010c, PIN_INPUT, 4) /* (V11) PRG1_PRU1_GPO1.RGMII2_RD1 */
-			AM64X_IOPAD(0x0110, PIN_INPUT, 4) /* (AA12) PRG1_PRU1_GPO2.RGMII2_RD2 */
-			AM64X_IOPAD(0x0114, PIN_INPUT, 4) /* (Y12) PRG1_PRU1_GPO3.RGMII2_RD3 */
-			AM64X_IOPAD(0x0120, PIN_INPUT, 4) /* (U11) PRG1_PRU1_GPO6.RGMII2_RXC */
-			AM64X_IOPAD(0x0118, PIN_INPUT, 4) /* (W12) PRG1_PRU1_GPO4.RGMII2_RX_CTL */
-			AM64X_IOPAD(0x0134, PIN_OUTPUT, 4) /* (AA10) PRG1_PRU1_GPO11.RGMII2_TD0 */
-			AM64X_IOPAD(0x0138, PIN_OUTPUT, 4) /* (V10) PRG1_PRU1_GPO12.RGMII2_TD1 */
-			AM64X_IOPAD(0x013c, PIN_OUTPUT, 4) /* (U10) PRG1_PRU1_GPO13.RGMII2_TD2 */
-			AM64X_IOPAD(0x0140, PIN_OUTPUT, 4) /* (AA11) PRG1_PRU1_GPO14.RGMII2_TD3 */
-			AM64X_IOPAD(0x0148, PIN_OUTPUT, 4) /* (Y10) PRG1_PRU1_GPO16.RGMII2_TXC */
-			AM64X_IOPAD(0x0144, PIN_OUTPUT, 4) /* (Y11) PRG1_PRU1_GPO15.RGMII2_TX_CTL */
-		>;
-	};
-};
-
 &dmsc {
+	bootph-pre-ram;
 	mboxes= <&secure_proxy_main 0>,
 		<&secure_proxy_main 1>,
 		<&secure_proxy_main 0>;
@@ -219,19 +80,35 @@
 	ti,secure-host;
 };
 
+&ddr_vtt_pins_default {
+	bootph-pre-ram;
+};
+
+&vtt_supply {
+	bootph-pre-ram;
+};
+
+/* EEPROM might be read before SYSFW is available */
+&main_i2c0 {
+	/delete-property/ power-domains;
+};
+
 &main_uart0 {
+	/* Clocked by default */
 	/delete-property/ power-domains;
 	/delete-property/ clocks;
 	/delete-property/ clock-names;
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_uart0_pins_default>;
-	status = "okay";
+};
+
+&main_uart1_pins_default {
+	bootph-pre-ram;
 };
 
 &main_uart1 {
 	bootph-pre-ram;
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_uart1_pins_default>;
+	status = "okay";
 };
 
 &memorycontroller {
@@ -241,43 +118,21 @@
 };
 
 &sdhci0 {
+	/* Clocked by default */
 	/delete-property/ power-domains;
 	clocks = <&clk_200mhz>;
 	clock-names = "clk_xin";
-	ti,driver-strength-ohm = <50>;
-	disable-wp;
-	pinctrl-0 = <&main_mmc0_pins_default>;
 };
 
 &sdhci1 {
+	/* Clocked by default */
 	/delete-property/ power-domains;
 	clocks = <&clk_200mhz>;
 	clock-names = "clk_xin";
-	ti,driver-strength-ohm = <50>;
-	disable-wp;
-	pinctrl-0 = <&main_mmc1_pins_default>;
 };
 
 &main_gpio0 {
 	bootph-pre-ram;
+	/* Clocked by default */
 	/delete-property/ power-domains;
 };
-
-/* EEPROM might be read before SYSFW is available */
-&main_i2c0 {
-	/delete-property/ power-domains;
-};
-
-&usbss0 {
-	ti,vbus-divider;
-	ti,usb2-only;
-};
-
-&usb0 {
-	dr_mode = "otg";
-	maximum-speed = "high-speed";
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_usb0_pins_default>;
-};
-
-#include "k3-am642-evm-u-boot.dtsi"
Signature · 1 line
2.40.0
#10 lore raw

PATCH 6/23 arm: dts: k3-am642-sk: Add main_i2c0 and eeprom

In reply to Nishanth Menon

Add missing main_i2c0 node and eeprom property.

This is a pending upstream kernel updates as of v6.3-rc6.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/

 arch/arm/dts/k3-am642-sk.dts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm/dts/k3-am642-sk.dts +21 -0
index a0431ad374a5..5d16aa0d7596 100644
@@ -262,6 +262,14 @@
 		>;
 	};
 
+	/* XXX: Kernel-Upstream: TODO: Upstream */
+	main_i2c0_pins_default: main-i2c0-pins-default {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
+			AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
+		>;
+	};
+
 	main_i2c1_pins_default: main-i2c1-pins-default {
 		pinctrl-single,pins = <
 			AM64X_IOPAD(0x0268, PIN_INPUT_PULLUP, 0) /* (C18) I2C1_SCL */
@@ -364,6 +372,19 @@
 	pinctrl-0 = <&main_uart1_pins_default>;
 };
 
+/* XXX: Kernel-Upstream: TODO: Upstream */
+&main_i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_i2c0_pins_default>;
+	clock-frequency = <400000>;
+
+	eeprom@51 {
+		compatible = "atmel,24c512";
+		reg = <0x51>;
+	};
+};
+
 &main_i2c1 {
 	status = "okay";
 	pinctrl-names = "default";
Signature · 1 line
2.40.0
#16 lore raw

PATCH 12/23 arm: dts: k3-am642-r5-sk: Use am642-sk.dts and k3-am642-sk-u-boot.dtsi

In reply to Nishanth Menon

Use am642-sk.dts to represent the Board and selectively enable/override the configurations necessary. And since am642-sk-u-boot.dtsi also needs to setup common properties, instead of re-inventing everything, just reuse the definitions.

---
 arch/arm/dts/k3-am642-r5-sk.dts | 194 +++-----------------------------
 1 file changed, 18 insertions(+), 176 deletions(-)
arch/arm/dts/k3-am642-r5-sk.dts +18 -176
index 9ff4dd3dd365..8ac6cc77256c 100644
@@ -5,31 +5,18 @@
 
 /dts-v1/;
 
-#include <dt-bindings/mux/ti-serdes.h>
-#include <dt-bindings/phy/phy.h>
-#include <dt-bindings/net/ti-dp83867.h>
-#include "k3-am642.dtsi"
+#include "k3-am642-sk.dts"
 #include "k3-am64-sk-lp4-1600MTs.dtsi"
 #include "k3-am64-ddr.dtsi"
 
-/ {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
+#include "k3-am642-sk-u-boot.dtsi"
 
+/ {
 	aliases {
 		remoteproc0 = &sysctrler;
 		remoteproc1 = &a53_0;
 	};
 
-	memory@80000000 {
-		device_type = "memory";
-		/* 2G RAM */
-		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
-		bootph-pre-ram;
-	};
-
 	a53_0: a53@0 {
 		compatible = "ti,am654-rproc";
 		reg = <0x00 0x00a90000 0x00 0x10>;
@@ -46,18 +33,6 @@
 		bootph-pre-ram;
 	};
 
-	reserved-memory {
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-
-		secure_ddr: optee@9e800000 {
-			reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
-			alignment = <0x1000>;
-			no-map;
-		};
-	};
-
 	clk_200mhz: dummy-clock-200mhz {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
@@ -73,9 +48,8 @@
 		mbox-names = "tx", "rx";
 		bootph-pre-ram;
 	};
-};
 
-&cbass_main {
+	/* XXX: Upstream kernel TODO: send upstream */
 	main_esm: esm@420000 {
 		compatible = "ti,j721e-esm";
 		reg = <0x0 0x420000 0x0 0x1000>;
@@ -86,6 +60,8 @@
 
 &cbass_mcu {
 	bootph-pre-ram;
+
+	/* XXX: Upstream kernel TODO: send upstream */
 	mcu_esm: esm@4100000 {
 		compatible = "ti,j721e-esm";
 		reg = <0x0 0x4100000 0x0 0x1000>;
@@ -94,92 +70,8 @@
 	};
 };
 
-&main_pmx0 {
-	bootph-pre-ram;
-	main_uart0_pins_default: main-uart0-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0238, PIN_INPUT, 0)		/* (B16) UART0_CTSn */
-			AM64X_IOPAD(0x023c, PIN_OUTPUT, 0)		/* (A16) UART0_RTSn */
-			AM64X_IOPAD(0x0230, PIN_INPUT, 0)		/* (D15) UART0_RXD */
-			AM64X_IOPAD(0x0234, PIN_OUTPUT, 0)		/* (C16) UART0_TXD */
-		>;
-	};
-
-	main_uart1_pins_default: main-uart1-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0248, PIN_INPUT, 0)		/* (D16) UART1_CTSn */
-			AM64X_IOPAD(0x024c, PIN_OUTPUT, 0)		/* (E16) UART1_RTSn */
-			AM64X_IOPAD(0x0240, PIN_INPUT, 0)		/* (E15) UART1_RXD */
-			AM64X_IOPAD(0x0244, PIN_OUTPUT, 0)		/* (E14) UART1_TXD */
-		>;
-	};
-
-	main_mmc1_pins_default: main-mmc1-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0294, PIN_INPUT_PULLUP, 0)	/* (J19) MMC1_CMD */
-			AM64X_IOPAD(0x028c, PIN_INPUT_PULLDOWN, 0)	/* (L20) MMC1_CLK */
-			AM64X_IOPAD(0x0288, PIN_INPUT_PULLUP, 0)	/* (K21) MMC1_DAT0 */
-			AM64X_IOPAD(0x0284, PIN_INPUT_PULLUP, 0)	/* (L21) MMC1_DAT1 */
-			AM64X_IOPAD(0x0280, PIN_INPUT_PULLUP, 0)	/* (K19) MMC1_DAT2 */
-			AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0)	/* (K18) MMC1_DAT3 */
-			AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0)	/* (D19) MMC1_SDCD */
-			AM64X_IOPAD(0x029c, PIN_INPUT_PULLUP, 0)	/* (C20) MMC1_SDWP */
-		>;
-	};
-
-	main_usb0_pins_default: main-usb0-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */
-		>;
-	};
-
-	mdio1_pins_default: mdio1-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4) /* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
-			AM64X_IOPAD(0x01f8, PIN_INPUT, 4) /* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
-		>;
-	};
-
-	rgmii1_pins_default: rgmii1-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x011c, PIN_INPUT, 4) /* (AA13) PRG1_PRU1_GPO5.RGMII1_RD0 */
-			AM64X_IOPAD(0x0128, PIN_INPUT, 4) /* (U12) PRG1_PRU1_GPO8.RGMII1_RD1 */
-			AM64X_IOPAD(0x0150, PIN_INPUT, 4) /* (Y13) PRG1_PRU1_GPO18.RGMII1_RD2 */
-			AM64X_IOPAD(0x0154, PIN_INPUT, 4) /* (V12) PRG1_PRU1_GPO19.RGMII1_RD3 */
-			AM64X_IOPAD(0x00d8, PIN_INPUT, 4) /* (W13) PRG1_PRU0_GPO8.RGMII1_RXC */
-			AM64X_IOPAD(0x00cc, PIN_INPUT, 4) /* (V13) PRG1_PRU0_GPO5.RGMII1_RX_CTL */
-			AM64X_IOPAD(0x0124, PIN_OUTPUT, 4) /* (V15) PRG1_PRU1_GPO7.RGMII1_TD0 */
-			AM64X_IOPAD(0x012c, PIN_OUTPUT, 4) /* (V14) PRG1_PRU1_GPO9.RGMII1_TD1 */
-			AM64X_IOPAD(0x0130, PIN_OUTPUT, 4) /* (W14) PRG1_PRU1_GPO10.RGMII1_TD2 */
-			AM64X_IOPAD(0x014c, PIN_OUTPUT, 4) /* (AA14) PRG1_PRU1_GPO17.RGMII1_TD3 */
-			AM64X_IOPAD(0x00e0, PIN_OUTPUT, 4) /* (U14) PRG1_PRU0_GPO10.RGMII1_TXC */
-			AM64X_IOPAD(0x00dc, PIN_OUTPUT, 4) /* (U15) PRG1_PRU0_GPO9.RGMII1_TX_CTL */
-		>;
-	};
-
-       rgmii2_pins_default: rgmii2-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0108, PIN_INPUT, 4) /* (W11) PRG1_PRU1_GPO0.RGMII2_RD0 */
-			AM64X_IOPAD(0x010c, PIN_INPUT, 4) /* (V11) PRG1_PRU1_GPO1.RGMII2_RD1 */
-			AM64X_IOPAD(0x0110, PIN_INPUT, 4) /* (AA12) PRG1_PRU1_GPO2.RGMII2_RD2 */
-			AM64X_IOPAD(0x0114, PIN_INPUT, 4) /* (Y12) PRG1_PRU1_GPO3.RGMII2_RD3 */
-			AM64X_IOPAD(0x0120, PIN_INPUT, 4) /* (U11) PRG1_PRU1_GPO6.RGMII2_RXC */
-			AM64X_IOPAD(0x0118, PIN_INPUT, 4) /* (W12) PRG1_PRU1_GPO4.RGMII2_RX_CTL */
-			AM64X_IOPAD(0x0134, PIN_OUTPUT, 4) /* (AA10) PRG1_PRU1_GPO11.RGMII2_TD0 */
-			AM64X_IOPAD(0x0138, PIN_OUTPUT, 4) /* (V10) PRG1_PRU1_GPO12.RGMII2_TD1 */
-			AM64X_IOPAD(0x013c, PIN_OUTPUT, 4) /* (U10) PRG1_PRU1_GPO13.RGMII2_TD2 */
-			AM64X_IOPAD(0x0140, PIN_OUTPUT, 4) /* (AA11) PRG1_PRU1_GPO14.RGMII2_TD3 */
-			AM64X_IOPAD(0x0148, PIN_OUTPUT, 4) /* (Y10) PRG1_PRU1_GPO16.RGMII2_TXC */
-			AM64X_IOPAD(0x0144, PIN_OUTPUT, 4) /* (Y11) PRG1_PRU1_GPO15.RGMII2_TX_CTL */
-		>;
-	};
-};
-
 &dmsc {
+	bootph-pre-ram;
 	mboxes= <&secure_proxy_main 0>,
 		<&secure_proxy_main 1>,
 		<&secure_proxy_main 0>;
@@ -189,78 +81,28 @@
 };
 
 &main_uart0 {
+	/* Clocked by default - enable early in boot to get debug logs */
 	/delete-property/ power-domains;
 	/delete-property/ clocks;
 	/delete-property/ clock-names;
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_uart0_pins_default>;
-	status = "okay";
+};
+
+&main_uart1_pins_default {
+	bootph-pre-ram;
 };
 
 &main_uart1 {
 	bootph-pre-ram;
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_uart1_pins_default>;
+};
+
+/* EEPROM might be read before SYSFW is available */
+&main_i2c0 {
+	/delete-property/ power-domains;
 };
 
 &sdhci1 {
+	/* Clocked by default */
 	/delete-property/ power-domains;
 	clocks = <&clk_200mhz>;
 	clock-names = "clk_xin";
-	ti,driver-strength-ohm = <50>;
-	disable-wp;
-	pinctrl-0 = <&main_mmc1_pins_default>;
-};
-
-&serdes_ln_ctrl {
-	idle-states = <AM64_SERDES0_LANE0_USB>;
-};
-
-&serdes_wiz0 {
-	status = "okay";
-};
-
-&serdes0 {
-	serdes0_usb_link: link@0 {
-		reg = <0>;
-		cdns,num-lanes = <1>;
-		#phy-cells = <0>;
-		cdns,phy-type = <PHY_TYPE_USB3>;
-		resets = <&serdes_wiz0 1>;
-	};
-};
-
-&usbss0 {
-	ti,vbus-divider;
-};
-
-&usb0 {
-	dr_mode = "host";
-	maximum-speed = "super-speed";
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_usb0_pins_default>;
-	phys = <&serdes0_usb_link>;
-	phy-names = "cdns3,usb3-phy";
-};
-
-&cpsw3g {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mdio1_pins_default
-		     &rgmii1_pins_default
-		     &rgmii2_pins_default>;
 };
-
-&cpsw_port2 {
-	phy-mode = "rgmii-rxid";
-	phy-handle = <&cpsw3g_phy1>;
-};
-
-&cpsw3g_mdio {
-	cpsw3g_phy1: ethernet-phy@1 {
-		reg = <1>;
-		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
-		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
-	};
-};
-
-#include "k3-am642-sk-u-boot.dtsi"
Signature · 1 line
2.40.0
#26 lore raw

PATCH 19/23 arm: dts: k3-am642-evm-u-boot: Re-organize the pinmux

In reply to Nishanth Menon

Reorder the pinmux to place it above the interface for easier tracking.

---
 arch/arm/dts/k3-am642-evm-u-boot.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm/dts/k3-am642-evm-u-boot.dtsi +8 -8
index 83e00c3f4553..afd1fc4c0b0b 100644
@@ -49,20 +49,16 @@
 	bootph-pre-ram;
 };
 
-&usb0 {
-	dr_mode="peripheral";
-	bootph-pre-ram;
-};
-
-&usbss0 {
+&main_usb0_pins_default {
 	bootph-pre-ram;
 };
 
-&main_mmc1_pins_default {
+&usb0 {
+	dr_mode="peripheral";
 	bootph-pre-ram;
 };
 
-&main_usb0_pins_default {
+&usbss0 {
 	bootph-pre-ram;
 };
 
@@ -98,6 +94,10 @@
 	bootph-pre-ram;
 };
 
+&main_mmc1_pins_default {
+	bootph-pre-ram;
+};
+
 &sdhci1 {
 	bootph-pre-ram;
 };
Signature · 1 line
2.40.0
#20 lore raw

PATCH 13/23 arm: dts: k3-am642-evm: Move the mdio pinmux down to evm.dts

In reply to Nishanth Menon

Since networking is needed even for u-boot, lets move the MDIO pinmux hack down to evm.dts.

Until MDIO is converted to DM model, it won't be possible to probe for pinmux from the MDIO node. To work around this, hack the board dts to set the default mux option to include MDIO. This hack is a limitation for now till we get u-boot MDIO driver into DM model.

---
 arch/arm/dts/k3-am642-evm-u-boot.dtsi | 4 ----
 arch/arm/dts/k3-am642-evm.dts         | 3 ++-
 2 files changed, 2 insertions(+), 5 deletions(-)
arch/arm/dts/k3-am642-evm-u-boot.dtsi +0 -4
index 64857b09099d..c8fd08885366 100644
@@ -113,10 +113,6 @@
 	      <0x0 0x43000200 0x0 0x8>;
 	reg-names = "cpsw_nuss", "mac_efuse";
 	/delete-property/ ranges;
-	pinctrl-0 = <&mdio1_pins_default	/* HACK: as MDIO driver is not DM enabled */
-		     &rgmii1_pins_default
-		     &rgmii2_pins_default>;
-
 	cpsw-phy-sel@04044 {
 		compatible = "ti,am64-phy-gmii-sel";
 		reg = <0x0 0x43004044 0x0 0x8>;
arch/arm/dts/k3-am642-evm.dts +2 -1
index 39feea78a084..ed3a6f1341b0 100644
@@ -425,7 +425,8 @@
 
 &cpsw3g {
 	pinctrl-names = "default";
-	pinctrl-0 = <&rgmii1_pins_default
+	pinctrl-0 = <&mdio1_pins_default	/* HACK: as MDIO driver is not DM enabled */
+		     &rgmii1_pins_default
 		     &rgmii2_pins_default>;
 };
 
Signature · 1 line
2.40.0
#27 lore raw

PATCH 20/23 arm: dts: k3-am642-evm-u-boot: Add missing pinmux notations

In reply to Nishanth Menon

Add required pinmux spl notations for pinmux entries that are missing.

---
 arch/arm/dts/k3-am642-evm-u-boot.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/dts/k3-am642-evm-u-boot.dtsi +16 -0
index afd1fc4c0b0b..11a4cb5dad88 100644
@@ -45,6 +45,10 @@
 	bootph-pre-ram;
 };
 
+&main_uart0_pins_default {
+	bootph-pre-ram;
+};
+
 &main_uart0 {
 	bootph-pre-ram;
 };
@@ -102,6 +106,18 @@
 	bootph-pre-ram;
 };
 
+&mdio1_pins_default {
+	bootph-pre-ram;
+};
+
+&rgmii1_pins_default {
+	bootph-pre-ram;
+};
+
+&rgmii2_pins_default {
+	bootph-pre-ram;
+};
+
 &cpsw3g {
 	reg = <0x0 0x8000000 0x0 0x200000>,
 	      <0x0 0x43000200 0x0 0x8>;
Signature · 1 line
2.40.0
#30 lore raw

PATCH 23/23 configs: am64x_evm_a53_defconfig: Just use distroboot

In reply to Nishanth Menon

Just use distroboot when we are attempting to enable that by default.

---

we should probably do this for all other defconfigs instead of the weird hacks folks have been doing inconsistenly in am62x, j721e defconfig.

if we are distroboot, just do it.. envboot is for personal user overrides.

 configs/am64x_evm_a53_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/am64x_evm_a53_defconfig +1 -1
index 6543ae76fcb1..ea6165d8f7e1 100644
@@ -31,7 +31,7 @@ CONFIG_SPL_SPI=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
 CONFIG_DISTRO_DEFAULTS=y
-CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run run_kern"
+CONFIG_BOOTCOMMAND="run findfdt; run envboot; run distro_bootcmd"
 CONFIG_BOARD_LATE_INIT=y
 CONFIG_SPL_MAX_SIZE=0x180000
 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
Signature · 1 line
2.40.0
#2 lore raw

PATCH 2/23 arm: dts: k3-am64: Update devicetree to sync with v6.3-rc6

In reply to Nishanth Menon

Sync with Kernel.org v6.3-rc6 tag.

---
 arch/arm/dts/k3-am642.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/k3-am642.dtsi +1 -0
index 8a76f4821b11..7a6eedea3aae 100644
@@ -58,6 +58,7 @@
 	L2_0: l2-cache0 {
 		compatible = "cache";
 		cache-level = <2>;
+		cache-unified;
 		cache-size = <0x40000>;
 		cache-line-size = <64>;
 		cache-sets = <256>;
Signature · 1 line
2.40.0
#21 lore raw

PATCH 14/23 arm: dts: k3-am642-evm: Add DDR vtt regulator

In reply to Nishanth Menon

Describe the DDR vtt regulator on evm

This is a pending upstream kernel updates as of v6.3-rc6.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/
I skipped doing the regulator renaming etc, it is just churn
un-necessary for the original purpose of fixing the r5.dts

 arch/arm/dts/k3-am642-evm.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/dts/k3-am642-evm.dts +22 -0
index ed3a6f1341b0..82d356a66793 100644
@@ -148,6 +148,21 @@
 		regulator-boot-on;
 	};
 
+	/* XXX: Upstream kernel TODO: send upstream */
+	vtt_supply: regulator-5 {
+		compatible = "regulator-fixed";
+		regulator-name = "vtt";
+		pinctrl-names = "default";
+		pinctrl-0 = <&ddr_vtt_pins_default>;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpio = <&main_gpio0 12 GPIO_ACTIVE_HIGH>;
+		vin-supply = <&vsys_3v3>;
+		enable-active-high;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -322,6 +337,13 @@
 			AM64X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (C17) MCAN1_TX */
 		>;
 	};
+
+	/* XXX: Upstream kernel TODO: send upstream */
+	ddr_vtt_pins_default: ddr-vtt-pins-default {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x0030, PIN_OUTPUT_PULLUP, 7) /* (L18) OSPI0_CSN1.GPIO0_12 */
+		>;
+	};
 };
 
 &main_uart0 {
Signature · 1 line
2.40.0
#9 lore raw

PATCH 5/23 arm: dts: k3-am642-sk: Add main_uart1 description

In reply to Nishanth Menon

Add main_uart1 description in sk devicetree.

This is a pending upstream kernel updates as of v6.3-rc6.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/

 arch/arm/dts/k3-am642-sk.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/k3-am642-sk.dts +13 -0
index cc2027417e86..a0431ad374a5 100644
@@ -246,6 +246,16 @@
 		>;
 	};
 
+	/* XXX: Kernel-Upstream: TODO: Upstream */
+	main_uart1_pins_default: main-uart1-pins-default {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x0248, PIN_INPUT, 0) /* (D16) UART1_CTSn */
+			AM64X_IOPAD(0x024c, PIN_OUTPUT, 0) /* (E16) UART1_RTSn */
+			AM64X_IOPAD(0x0240, PIN_INPUT, 0) /* (E15) UART1_RXD */
+			AM64X_IOPAD(0x0244, PIN_OUTPUT, 0) /* (E14) UART1_TXD */
+		>;
+	};
+
 	main_usb0_pins_default: main-usb0-pins-default {
 		pinctrl-single,pins = <
 			AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */
@@ -349,6 +359,9 @@
 &main_uart1 {
 	/* main_uart1 is reserved for firmware usage */
 	status = "reserved";
+	/* XXX: Kernel-Upstream: TODO: Upstream pinmux */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_uart1_pins_default>;
 };
 
 &main_i2c1 {
Signature · 1 line
2.40.0
#4 lore raw

PATCH 4/23 arm: dts: k3-am642-sk: Fix mmc1 pinmux pull polarity

In reply to Nishanth Menon

Fix the pinmux pull polarity.

This is a pending upstream kernel updates as of v6.3-rc6.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/

 arch/arm/dts/k3-am642-sk.dts | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
arch/arm/dts/k3-am642-sk.dts +9 -7
index 4fb279489cfc..cc2027417e86 100644
@@ -223,15 +223,17 @@
 
 &main_pmx0 {
 	main_mmc1_pins_default: main-mmc1-pins-default {
+		/* XXX: Kernel-Upstream: TODO: Upstream (pull changes) */
 		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0294, PIN_INPUT, 0) /* (J19) MMC1_CMD */
+			AM64X_IOPAD(0x029c, PIN_INPUT_PULLUP, 0) /* (C20) MMC1_SDWP */
+			AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0) /* (D19) MMC1_SDCD */
+			AM64X_IOPAD(0x0294, PIN_INPUT_PULLUP, 0) /* (J19) MMC1_CMD */
 			AM64X_IOPAD(0x0290, PIN_INPUT, 0) /* (#N/A) MMC1_CLKLB */
-			AM64X_IOPAD(0x028c, PIN_INPUT, 0) /* (L20) MMC1_CLK */
-			AM64X_IOPAD(0x0288, PIN_INPUT, 0) /* (K21) MMC1_DAT0 */
-			AM64X_IOPAD(0x0284, PIN_INPUT, 0) /* (L21) MMC1_DAT1 */
-			AM64X_IOPAD(0x0280, PIN_INPUT, 0) /* (K19) MMC1_DAT2 */
-			AM64X_IOPAD(0x027c, PIN_INPUT, 0) /* (K18) MMC1_DAT3 */
-			AM64X_IOPAD(0x0298, PIN_INPUT, 0) /* (D19) MMC1_SDCD */
+			AM64X_IOPAD(0x028c, PIN_INPUT_PULLDOWN, 0) /* (L20) MMC1_CLK */
+			AM64X_IOPAD(0x0288, PIN_INPUT_PULLUP, 0) /* (K21) MMC1_DAT0 */
+			AM64X_IOPAD(0x0284, PIN_INPUT_PULLUP, 0) /* (L21) MMC1_DAT1 */
+			AM64X_IOPAD(0x0280, PIN_INPUT_PULLUP, 0) /* (K19) MMC1_DAT2 */
+			AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0) /* (K18) MMC1_DAT3 */
 		>;
 	};
 
Signature · 1 line
2.40.0
#22 lore raw

PATCH 15/23 arm: dts: k3-am642-evm: Add main_uart1 description

In reply to Nishanth Menon

Add main_uart1 description in evm devicetree.

This is a pending upstream kernel updates as of v6.3-rc6.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/

 arch/arm/dts/k3-am642-evm.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/k3-am642-evm.dts +13 -0
index 82d356a66793..9cc271d9a22a 100644
@@ -230,6 +230,16 @@
 		>;
 	};
 
+	/* XXX: Upstream kernel TODO: send upstream pinmux */
+	main_uart1_pins_default: main-uart1-pins-default {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x0248, PIN_INPUT, 0)		/* (D16) UART1_CTSn */
+			AM64X_IOPAD(0x024c, PIN_OUTPUT, 0)		/* (E16) UART1_RTSn */
+			AM64X_IOPAD(0x0240, PIN_INPUT, 0)		/* (E15) UART1_RXD */
+			AM64X_IOPAD(0x0244, PIN_OUTPUT, 0)		/* (E14) UART1_TXD */
+		>;
+	};
+
 	main_uart0_pins_default: main-uart0-pins-default {
 		pinctrl-single,pins = <
 			AM64X_IOPAD(0x0238, PIN_INPUT, 0) /* (B16) UART0_CTSn */
@@ -355,6 +365,9 @@
 /* main_uart1 is reserved for firmware usage */
 &main_uart1 {
 	status = "reserved";
+	/* XXX: Upstream kernel TODO: send upstream pinmux */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_uart1_pins_default>;
 };
 
 &main_i2c1 {
Signature · 1 line
2.40.0
#24 lore raw

PATCH 17/23 arm: dts: k3-am642-evm-u-boot: Drop the i2c node

In reply to Nishanth Menon

Drop the i2c and mux description, since we have it on main board dts.

---
Again causes a bisect break at this point due to some weird dependency with r5 which I could not cleanly resolve.

 arch/arm/dts/k3-am642-evm-u-boot.dtsi | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
arch/arm/dts/k3-am642-evm-u-boot.dtsi +4 -11
index c8fd08885366..6e85101f134e 100644
@@ -34,21 +34,14 @@
 
 &main_pmx0 {
 	bootph-pre-ram;
-	main_i2c0_pins_default: main-i2c0-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
-			AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
-		>;
-	};
+};
+
+&main_i2c0_pins_default {
+	bootph-pre-ram;
 };
 
 &main_i2c0 {
-	status = "okay";
 	bootph-pre-ram;
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_i2c0_pins_default>;
-	clock-frequency = <400000>;
 };
 
 &main_uart0 {
Signature · 1 line
2.40.0
#5 lore raw

Re: [PATCH 04/23] arm: dts: k3-am642-sk: Fix mmc1 pinmux pull polarity

In reply to Nishanth Menon
Quoted 7 lines · Nishanth Menon

Fix the pinmux pull polarity.

This is a pending upstream kernel updates as of v6.3-rc6.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/

Link to actual patch is
https://lore.kernel.org/linux-devicetree/[email protected]/

arch/arm/dts/k3-am642-sk.dts line 226

Quoted 13 lines
 arch/arm/dts/k3-am642-sk.dts | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
arch/arm/dts/k3-am642-sk.dts +1 -0
index 4fb279489cfc..cc2027417e86 100644
@@ -223,15 +223,17 @@
 
 &main_pmx0 {
 	main_mmc1_pins_default: main-mmc1-pins-default {
+		/* XXX: Kernel-Upstream: TODO: Upstream (pull changes) */

Do we really want to sprinkle these comments in u-boot upstream?
If we are quite sure this makes to upstream kernel we might as well pull them into u-boot as is.

Quoted 10 lines
arch/arm/dts/k3-am642-sk.dts +3 -5
 		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0294, PIN_INPUT, 0) /* (J19) MMC1_CMD */
+			AM64X_IOPAD(0x029c, PIN_INPUT_PULLUP, 0) /* (C20) MMC1_SDWP */
+			AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0) /* (D19) MMC1_SDCD */
+			AM64X_IOPAD(0x0294, PIN_INPUT_PULLUP, 0) /* (J19) MMC1_CMD */
 			AM64X_IOPAD(0x0290, PIN_INPUT, 0) /* (#N/A) MMC1_CLKLB */
-			AM64X_IOPAD(0x028c, PIN_INPUT, 0) /* (L20) MMC1_CLK */
-			AM64X_IOPAD(0x0288, PIN_INPUT, 0) /* (K21) MMC1_DAT0 */
-			AM64X_IOPAD(0x0284, PIN_INPUT, 0) /* (L21) MMC1_DAT1 */
-			AM64X_IOPAD(0x0280, PIN_INPUT, 0) /* (K19) MMC1_DAT2 */

arch/arm/dts/k3-am642-sk.dts line 239

Quoted 10 lines
arch/arm/dts/k3-am642-sk.dts +5 -2
-			AM64X_IOPAD(0x027c, PIN_INPUT, 0) /* (K18) MMC1_DAT3 */
-			AM64X_IOPAD(0x0298, PIN_INPUT, 0) /* (D19) MMC1_SDCD */
+			AM64X_IOPAD(0x028c, PIN_INPUT_PULLDOWN, 0) /* (L20) MMC1_CLK */
+			AM64X_IOPAD(0x0288, PIN_INPUT_PULLUP, 0) /* (K21) MMC1_DAT0 */
+			AM64X_IOPAD(0x0284, PIN_INPUT_PULLUP, 0) /* (L21) MMC1_DAT1 */
+			AM64X_IOPAD(0x0280, PIN_INPUT_PULLUP, 0) /* (K19) MMC1_DAT2 */
+			AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0) /* (K18) MMC1_DAT3 */
 		>;
 	};
 

cheers,
-roger

#6 lore raw

Re: [PATCH 04/23] arm: dts: k3-am642-sk: Fix mmc1 pinmux pull polarity

Quoted 24 lines · Roger Quadros
Quoted 7 lines · Nishanth Menon

Fix the pinmux pull polarity.

This is a pending upstream kernel updates as of v6.3-rc6.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/

Link to actual patch is
https://lore.kernel.org/linux-devicetree/[email protected]/

Quoted 10 lines
 arch/arm/dts/k3-am642-sk.dts | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
arch/arm/dts/k3-am642-sk.dts +0 -0
index 4fb279489cfc..cc2027417e86 100644
@@ -223,15 +223,17 @@
 
Quoted 5 lines

arch/arm/dts/k3-am642-sk.dts line 226

Quoted 3 lines
arch/arm/dts/k3-am642-sk.dts +1 -0
 &main_pmx0 {
 	main_mmc1_pins_default: main-mmc1-pins-default {
+		/* XXX: Kernel-Upstream: TODO: Upstream (pull changes) */

Do we really want to sprinkle these comments in u-boot upstream?

I have no other means to indicate that these nodes need to get to upstream kernel and when they do get into upstream kernel, what needs to be dropped from u-boot.

I am open to suggestions here.

Quoted 2 lines

If we are quite sure this makes to upstream kernel we might as well pull them into u-boot as is.

No, that has been the reason why the entire dt mismatch occurred in the first place. the subjective evaluation from various devs have been way off. if it makes it to kernel.org master, only then can we claim that the changes are in upstream.

Quoted 24 lines
Quoted 11 lines
arch/arm/dts/k3-am642-sk.dts +3 -5
 		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0294, PIN_INPUT, 0) /* (J19) MMC1_CMD */
+			AM64X_IOPAD(0x029c, PIN_INPUT_PULLUP, 0) /* (C20) MMC1_SDWP */
+			AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0) /* (D19) MMC1_SDCD */
+			AM64X_IOPAD(0x0294, PIN_INPUT_PULLUP, 0) /* (J19) MMC1_CMD */
 			AM64X_IOPAD(0x0290, PIN_INPUT, 0) /* (#N/A) MMC1_CLKLB */
-			AM64X_IOPAD(0x028c, PIN_INPUT, 0) /* (L20) MMC1_CLK */
-			AM64X_IOPAD(0x0288, PIN_INPUT, 0) /* (K21) MMC1_DAT0 */
-			AM64X_IOPAD(0x0284, PIN_INPUT, 0) /* (L21) MMC1_DAT1 */
-			AM64X_IOPAD(0x0280, PIN_INPUT, 0) /* (K19) MMC1_DAT2 */

arch/arm/dts/k3-am642-sk.dts line 239

Quoted 10 lines
arch/arm/dts/k3-am642-sk.dts +5 -2
-			AM64X_IOPAD(0x027c, PIN_INPUT, 0) /* (K18) MMC1_DAT3 */
-			AM64X_IOPAD(0x0298, PIN_INPUT, 0) /* (D19) MMC1_SDCD */
+			AM64X_IOPAD(0x028c, PIN_INPUT_PULLDOWN, 0) /* (L20) MMC1_CLK */
+			AM64X_IOPAD(0x0288, PIN_INPUT_PULLUP, 0) /* (K21) MMC1_DAT0 */
+			AM64X_IOPAD(0x0284, PIN_INPUT_PULLUP, 0) /* (L21) MMC1_DAT1 */
+			AM64X_IOPAD(0x0280, PIN_INPUT_PULLUP, 0) /* (K19) MMC1_DAT2 */
+			AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0) /* (K18) MMC1_DAT3 */
 		>;
 	};
 

cheers,
-roger

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

Re: [PATCH 04/23] arm: dts: k3-am642-sk: Fix mmc1 pinmux pull polarity

Quoted 37 lines · Nishanth Menon
Quoted 24 lines · Roger Quadros
Quoted 7 lines · Nishanth Menon

Fix the pinmux pull polarity.

This is a pending upstream kernel updates as of v6.3-rc6.

---
Sent to kernel.org https://lore.kernel.org/linux-devicetree/[email protected]/

Link to actual patch is
https://lore.kernel.org/linux-devicetree/[email protected]/

Quoted 10 lines
 arch/arm/dts/k3-am642-sk.dts | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
arch/arm/dts/k3-am642-sk.dts +0 -0
index 4fb279489cfc..cc2027417e86 100644
@@ -223,15 +223,17 @@
 
Quoted 5 lines

arch/arm/dts/k3-am642-sk.dts line 226

Quoted 3 lines
arch/arm/dts/k3-am642-sk.dts +1 -0
 &main_pmx0 {
 	main_mmc1_pins_default: main-mmc1-pins-default {
+		/* XXX: Kernel-Upstream: TODO: Upstream (pull changes) */

Do we really want to sprinkle these comments in u-boot upstream?

I have no other means to indicate that these nodes need to get to upstream kernel and when they do get into upstream kernel, what needs to be dropped from u-boot.

I am open to suggestions here.

Quoted 7 lines
Quoted 2 lines

If we are quite sure this makes to upstream kernel we might as well pull them into u-boot as is.

No, that has been the reason why the entire dt mismatch occurred in the first place. the subjective evaluation from various devs have been way off. if it makes it to kernel.org master, only then can we claim that the changes are in upstream.

In that case we do not accept any DT patches in u-boot till at least Acked by kernel maintainer?

#8 lore raw

Re: [PATCH 04/23] arm: dts: k3-am642-sk: Fix mmc1 pinmux pull polarity

On 14:45-20230417, Roger Quadros wrote:
[...]

Quoted 15 lines
Quoted 15 lines
Quoted 5 lines

arch/arm/dts/k3-am642-sk.dts line 226

Quoted 3 lines

&main_pmx0 {

arch/arm/dts/k3-am642-sk.dts +1 -0
 	main_mmc1_pins_default: main-mmc1-pins-default {
+		/* XXX: Kernel-Upstream: TODO: Upstream (pull changes) */

Do we really want to sprinkle these comments in u-boot upstream?

I have no other means to indicate that these nodes need to get to upstream kernel and when they do get into upstream kernel, what needs to be dropped from u-boot.

I am open to suggestions here.

Quoted 2 lines

If we are quite sure this makes to upstream kernel we might as well pull them into u-boot as is.

Quoted 7 lines
Quoted 4 lines

No, that has been the reason why the entire dt mismatch occurred in the first place. the subjective evaluation from various devs have been way off. if it makes it to kernel.org master, only then can we claim that the changes are in upstream.

In that case we do not accept any DT patches in u-boot till at least Acked by kernel maintainer?

My 2 cents:
Given that:
a) until the maintainer sends a tag to upstream merge, things are'nt really final and patches still have been dropped and/or modified (not typically, but have happened)
b) the delay between a tag and final merge is just a few weeks

We should hold the master tag as baseline at least till things settle down, prior to relaxing rules to what is reasonable.

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

Re: [PATCH 12/23] arm: dts: k3-am642-r5-sk: Use am642-sk.dts and k3-am642-sk-u-boot.dtsi

In reply to Nishanth Menon

Hi Nishanth,

Quoted 23 lines · Nishanth Menon

Use am642-sk.dts to represent the Board and selectively enable/override the configurations necessary. And since am642-sk-u-boot.dtsi also needs to setup common properties, instead of re-inventing everything, just reuse the definitions.

---
  arch/arm/dts/k3-am642-r5-sk.dts | 194 +++-----------------------------
  1 file changed, 18 insertions(+), 176 deletions(-)
arch/arm/dts/k3-am642-r5-sk.dts +1 -4
index 9ff4dd3dd365..8ac6cc77256c 100644
@@ -5,31 +5,18 @@
 
  /dts-v1/;
 
-#include <dt-bindings/mux/ti-serdes.h>
-#include <dt-bindings/phy/phy.h>
-#include <dt-bindings/net/ti-dp83867.h>
-#include "k3-am642.dtsi"
+#include "k3-am642-sk.dts"

arch/arm/dts/k3-am642-r5-sk.dts line 13

Quoted 10 lines
arch/arm/dts/k3-am642-r5-sk.dts +1 -5
  #include "k3-am64-sk-lp4-1600MTs.dtsi"
  #include "k3-am64-ddr.dtsi"
 
-/ {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
+#include "k3-am642-sk-u-boot.dtsi"
 

would changing the location of the include affect the dt nodes somehow?

Quoted 229 lines
arch/arm/dts/k3-am642-r5-sk.dts +16 -157
+/ {
  	aliases {
  		remoteproc0 = &sysctrler;
  		remoteproc1 = &a53_0;
  	};
 
-	memory@80000000 {
-		device_type = "memory";
-		/* 2G RAM */
-		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
-		bootph-pre-ram;
-	};
-
  	a53_0: a53@0 {
  		compatible = "ti,am654-rproc";
  		reg = <0x00 0x00a90000 0x00 0x10>;
@@ -46,18 +33,6 @@
  		bootph-pre-ram;
  	};
 
-	reserved-memory {
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-
-		secure_ddr: optee@9e800000 {
-			reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
-			alignment = <0x1000>;
-			no-map;
-		};
-	};
-
  	clk_200mhz: dummy-clock-200mhz {
  		compatible = "fixed-clock";
  		#clock-cells = <0>;
@@ -73,9 +48,8 @@
  		mbox-names = "tx", "rx";
  		bootph-pre-ram;
  	};
-};
 
-&cbass_main {
+	/* XXX: Upstream kernel TODO: send upstream */
  	main_esm: esm@420000 {
  		compatible = "ti,j721e-esm";
  		reg = <0x0 0x420000 0x0 0x1000>;
@@ -86,6 +60,8 @@
 
  &cbass_mcu {
  	bootph-pre-ram;
+
+	/* XXX: Upstream kernel TODO: send upstream */
  	mcu_esm: esm@4100000 {
  		compatible = "ti,j721e-esm";
  		reg = <0x0 0x4100000 0x0 0x1000>;
@@ -94,92 +70,8 @@
  	};
  };
 
-&main_pmx0 {
-	bootph-pre-ram;
-	main_uart0_pins_default: main-uart0-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0238, PIN_INPUT, 0)		/* (B16) UART0_CTSn */
-			AM64X_IOPAD(0x023c, PIN_OUTPUT, 0)		/* (A16) UART0_RTSn */
-			AM64X_IOPAD(0x0230, PIN_INPUT, 0)		/* (D15) UART0_RXD */
-			AM64X_IOPAD(0x0234, PIN_OUTPUT, 0)		/* (C16) UART0_TXD */
-		>;
-	};
-
-	main_uart1_pins_default: main-uart1-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0248, PIN_INPUT, 0)		/* (D16) UART1_CTSn */
-			AM64X_IOPAD(0x024c, PIN_OUTPUT, 0)		/* (E16) UART1_RTSn */
-			AM64X_IOPAD(0x0240, PIN_INPUT, 0)		/* (E15) UART1_RXD */
-			AM64X_IOPAD(0x0244, PIN_OUTPUT, 0)		/* (E14) UART1_TXD */
-		>;
-	};
-
-	main_mmc1_pins_default: main-mmc1-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0294, PIN_INPUT_PULLUP, 0)	/* (J19) MMC1_CMD */
-			AM64X_IOPAD(0x028c, PIN_INPUT_PULLDOWN, 0)	/* (L20) MMC1_CLK */
-			AM64X_IOPAD(0x0288, PIN_INPUT_PULLUP, 0)	/* (K21) MMC1_DAT0 */
-			AM64X_IOPAD(0x0284, PIN_INPUT_PULLUP, 0)	/* (L21) MMC1_DAT1 */
-			AM64X_IOPAD(0x0280, PIN_INPUT_PULLUP, 0)	/* (K19) MMC1_DAT2 */
-			AM64X_IOPAD(0x027c, PIN_INPUT_PULLUP, 0)	/* (K18) MMC1_DAT3 */
-			AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0)	/* (D19) MMC1_SDCD */
-			AM64X_IOPAD(0x029c, PIN_INPUT_PULLUP, 0)	/* (C20) MMC1_SDWP */
-		>;
-	};
-
-	main_usb0_pins_default: main-usb0-pins-default {
-		bootph-pre-ram;
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */
-		>;
-	};
-
-	mdio1_pins_default: mdio1-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4) /* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
-			AM64X_IOPAD(0x01f8, PIN_INPUT, 4) /* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
-		>;
-	};
-
-	rgmii1_pins_default: rgmii1-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x011c, PIN_INPUT, 4) /* (AA13) PRG1_PRU1_GPO5.RGMII1_RD0 */
-			AM64X_IOPAD(0x0128, PIN_INPUT, 4) /* (U12) PRG1_PRU1_GPO8.RGMII1_RD1 */
-			AM64X_IOPAD(0x0150, PIN_INPUT, 4) /* (Y13) PRG1_PRU1_GPO18.RGMII1_RD2 */
-			AM64X_IOPAD(0x0154, PIN_INPUT, 4) /* (V12) PRG1_PRU1_GPO19.RGMII1_RD3 */
-			AM64X_IOPAD(0x00d8, PIN_INPUT, 4) /* (W13) PRG1_PRU0_GPO8.RGMII1_RXC */
-			AM64X_IOPAD(0x00cc, PIN_INPUT, 4) /* (V13) PRG1_PRU0_GPO5.RGMII1_RX_CTL */
-			AM64X_IOPAD(0x0124, PIN_OUTPUT, 4) /* (V15) PRG1_PRU1_GPO7.RGMII1_TD0 */
-			AM64X_IOPAD(0x012c, PIN_OUTPUT, 4) /* (V14) PRG1_PRU1_GPO9.RGMII1_TD1 */
-			AM64X_IOPAD(0x0130, PIN_OUTPUT, 4) /* (W14) PRG1_PRU1_GPO10.RGMII1_TD2 */
-			AM64X_IOPAD(0x014c, PIN_OUTPUT, 4) /* (AA14) PRG1_PRU1_GPO17.RGMII1_TD3 */
-			AM64X_IOPAD(0x00e0, PIN_OUTPUT, 4) /* (U14) PRG1_PRU0_GPO10.RGMII1_TXC */
-			AM64X_IOPAD(0x00dc, PIN_OUTPUT, 4) /* (U15) PRG1_PRU0_GPO9.RGMII1_TX_CTL */
-		>;
-	};
-
-       rgmii2_pins_default: rgmii2-pins-default {
-		pinctrl-single,pins = <
-			AM64X_IOPAD(0x0108, PIN_INPUT, 4) /* (W11) PRG1_PRU1_GPO0.RGMII2_RD0 */
-			AM64X_IOPAD(0x010c, PIN_INPUT, 4) /* (V11) PRG1_PRU1_GPO1.RGMII2_RD1 */
-			AM64X_IOPAD(0x0110, PIN_INPUT, 4) /* (AA12) PRG1_PRU1_GPO2.RGMII2_RD2 */
-			AM64X_IOPAD(0x0114, PIN_INPUT, 4) /* (Y12) PRG1_PRU1_GPO3.RGMII2_RD3 */
-			AM64X_IOPAD(0x0120, PIN_INPUT, 4) /* (U11) PRG1_PRU1_GPO6.RGMII2_RXC */
-			AM64X_IOPAD(0x0118, PIN_INPUT, 4) /* (W12) PRG1_PRU1_GPO4.RGMII2_RX_CTL */
-			AM64X_IOPAD(0x0134, PIN_OUTPUT, 4) /* (AA10) PRG1_PRU1_GPO11.RGMII2_TD0 */
-			AM64X_IOPAD(0x0138, PIN_OUTPUT, 4) /* (V10) PRG1_PRU1_GPO12.RGMII2_TD1 */
-			AM64X_IOPAD(0x013c, PIN_OUTPUT, 4) /* (U10) PRG1_PRU1_GPO13.RGMII2_TD2 */
-			AM64X_IOPAD(0x0140, PIN_OUTPUT, 4) /* (AA11) PRG1_PRU1_GPO14.RGMII2_TD3 */
-			AM64X_IOPAD(0x0148, PIN_OUTPUT, 4) /* (Y10) PRG1_PRU1_GPO16.RGMII2_TXC */
-			AM64X_IOPAD(0x0144, PIN_OUTPUT, 4) /* (Y11) PRG1_PRU1_GPO15.RGMII2_TX_CTL */
-		>;
-	};
-};
-
  &dmsc {
+	bootph-pre-ram;
  	mboxes= <&secure_proxy_main 0>,
  		<&secure_proxy_main 1>,
  		<&secure_proxy_main 0>;
@@ -189,78 +81,28 @@
  };
 
  &main_uart0 {
+	/* Clocked by default - enable early in boot to get debug logs */
  	/delete-property/ power-domains;
  	/delete-property/ clocks;
  	/delete-property/ clock-names;
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_uart0_pins_default>;
-	status = "okay";
+};
+
+&main_uart1_pins_default {
+	bootph-pre-ram;
  };
 
  &main_uart1 {
  	bootph-pre-ram;
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_uart1_pins_default>;
+};
+
+/* EEPROM might be read before SYSFW is available */
+&main_i2c0 {
+	/delete-property/ power-domains;
  };
 
  &sdhci1 {
+	/* Clocked by default */
  	/delete-property/ power-domains;
  	clocks = <&clk_200mhz>;
  	clock-names = "clk_xin";
-	ti,driver-strength-ohm = <50>;
-	disable-wp;
-	pinctrl-0 = <&main_mmc1_pins_default>;
-};
-
-&serdes_ln_ctrl {
-	idle-states = <AM64_SERDES0_LANE0_USB>;
-};
-
-&serdes_wiz0 {
-	status = "okay";
-};
-
-&serdes0 {
-	serdes0_usb_link: link@0 {
-		reg = <0>;
-		cdns,num-lanes = <1>;
-		#phy-cells = <0>;
-		cdns,phy-type = <PHY_TYPE_USB3>;
-		resets = <&serdes_wiz0 1>;
-	};
-};
-
-&usbss0 {
-	ti,vbus-divider;
-};
-
-&usb0 {
-	dr_mode = "host";
-	maximum-speed = "super-speed";
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_usb0_pins_default>;
-	phys = <&serdes0_usb_link>;
-	phy-names = "cdns3,usb3-phy";
-};
-
-&cpsw3g {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mdio1_pins_default
-		     &rgmii1_pins_default
-		     &rgmii2_pins_default>;
  };
-
-&cpsw_port2 {
-	phy-mode = "rgmii-rxid";
-	phy-handle = <&cpsw3g_phy1>;
-};

arch/arm/dts/k3-am642-r5-sk.dts line 266

Quoted 10 lines
arch/arm/dts/k3-am642-r5-sk.dts +0 -10
-
-&cpsw3g_mdio {
-	cpsw3g_phy1: ethernet-phy@1 {
-		reg = <1>;
-		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
-		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
-	};
-};
-
-#include "k3-am642-sk-u-boot.dtsi"

Regards,

Manorit

#18 lore raw

Re: [PATCH 12/23] arm: dts: k3-am642-r5-sk: Use am642-sk.dts and k3-am642-sk-u-boot.dtsi

Quoted 25 lines · Manorit Chawdhry

Hi Nishanth,

Quoted 22 lines · Nishanth Menon

Use am642-sk.dts to represent the Board and selectively enable/override the configurations necessary. And since am642-sk-u-boot.dtsi also needs to setup common properties, instead of re-inventing everything, just reuse the definitions.

---
  arch/arm/dts/k3-am642-r5-sk.dts | 194 +++-----------------------------
  1 file changed, 18 insertions(+), 176 deletions(-)
arch/arm/dts/k3-am642-r5-sk.dts +1 -4
index 9ff4dd3dd365..8ac6cc77256c 100644
@@ -5,31 +5,18 @@
  /dts-v1/;
-#include <dt-bindings/mux/ti-serdes.h>
-#include <dt-bindings/phy/phy.h>
-#include <dt-bindings/net/ti-dp83867.h>
-#include "k3-am642.dtsi"
+#include "k3-am642-sk.dts"
  #include "k3-am64-sk-lp4-1600MTs.dtsi"
Quoted 8 lines

arch/arm/dts/k3-am642-r5-sk.dts line 12

Quoted 7 lines
arch/arm/dts/k3-am642-r5-sk.dts +1 -5
  #include "k3-am64-ddr.dtsi"
-/ {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
+#include "k3-am642-sk-u-boot.dtsi"

would changing the location of the include affect the dt nodes somehow?

yes, ofcourse, depends on the overlap ofcourse, in this series, I have tried to ensure the overlap occurs only where necessary.
board.dts:

&node {
	property-x = <0>;
};

board-u-boot.dts:

&node {
	property-x = <1>;
};

board-r5.dts:

&node {
	property-x = <2>;
};

Then:
case a) u-boot.dtsi included in r5.dts at the very end will make the property 1! - but then what was the point in overriding node?

case b) u-boot.dtsi included early in r5.dts will make the property 2 - which was intended when we introduced the override.

Are you seeing a specific problem in this series?

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

Re: [PATCH 12/23] arm: dts: k3-am642-r5-sk: Use am642-sk.dts and k3-am642-sk-u-boot.dtsi

Quoted 52 lines · Nishanth Menon
Quoted 25 lines · Manorit Chawdhry

Hi Nishanth,

Quoted 22 lines · Nishanth Menon

Use am642-sk.dts to represent the Board and selectively enable/override the configurations necessary. And since am642-sk-u-boot.dtsi also needs to setup common properties, instead of re-inventing everything, just reuse the definitions.

---
  arch/arm/dts/k3-am642-r5-sk.dts | 194 +++-----------------------------
  1 file changed, 18 insertions(+), 176 deletions(-)
arch/arm/dts/k3-am642-r5-sk.dts +1 -4
index 9ff4dd3dd365..8ac6cc77256c 100644
@@ -5,31 +5,18 @@
  /dts-v1/;
-#include <dt-bindings/mux/ti-serdes.h>
-#include <dt-bindings/phy/phy.h>
-#include <dt-bindings/net/ti-dp83867.h>
-#include "k3-am642.dtsi"
+#include "k3-am642-sk.dts"
  #include "k3-am64-sk-lp4-1600MTs.dtsi"
Quoted 8 lines

arch/arm/dts/k3-am642-r5-sk.dts line 12

Quoted 7 lines
arch/arm/dts/k3-am642-r5-sk.dts +1 -5
  #include "k3-am64-ddr.dtsi"
-/ {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
+#include "k3-am642-sk-u-boot.dtsi"

would changing the location of the include affect the dt nodes somehow?

yes, ofcourse, depends on the overlap ofcourse, in this series, I have tried to ensure the overlap occurs only where necessary.
board.dts:

&node {
	property-x = <0>;
};

board-u-boot.dts:

&node {
	property-x = <1>;
};

board-r5.dts:

&node {
	property-x = <2>;
};
Quoted 9 lines

Then:
case a) u-boot.dtsi included in r5.dts at the very end will make the property 1! - but then what was the point in overriding node?

case b) u-boot.dtsi included early in r5.dts will make the property 2 - which was intended when we introduced the override.

Are you seeing a specific problem in this series?

Ah no, I was just worried since you had moved this specific include from bottom of the file to top so was thinking if it could change the order of overrides, but looks like there are no common nodes as such in u-boot.dtsi and r5-sk.dtsi to change the override order. LGTM.

[override check for u-boot.dtsi and r5-sk.dtsi]

Regards,
Manorit

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