Skip to contentSkip to conversation

Add MAC eFuse nodes to sys config areas

PATCH Applied Andrew Davis 2 participants 9 messages Jun 28, 2024 – Jul 3, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add MAC eFuse nodes to sys config areas

Hello all,

Patches are all mostly the same but split by platform, context is in the patches.

End result is fewer DTB check warnings, some platforms now have 0 :)

This series is a replacement for this patch[0].

Thanks,
Andrew

[0] https://lore.kernel.org/lkml/f589fcea70004cae1c822871023ade86723bb1e3.1719376928.git.jan.kiszka@siemens.com/

Andrew Davis (7):
arm64: dts: ti: k3-am65: Add cpsw-mac-efuse node to mcu_conf
arm64: dts: ti: k3-j7200: Add cpsw-mac-efuse node to mcu_conf
arm64: dts: ti: k3-j721e: Add cpsw-mac-efuse node to mcu_conf
arm64: dts: ti: k3-j721s2: Add cpsw-mac-efuse node to mcu_conf
arm64: dts: ti: k3-j784s4: Add cpsw-mac-efuse node to mcu_conf
arm64: dts: ti: k3-am62a: Add cpsw-mac-efuse node to wkup_conf
arm64: dts: ti: k3-am62: Add cpsw-mac-efuse node to wkup_conf

 arch/arm64/boot/dts/ti/k3-am62-main.dtsi         |  2 +-
 arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi       |  5 +++++
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi        |  2 +-
 arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi      | 10 +++++++---
 arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi          | 12 ++++++++----
 arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi  | 14 +++++++++-----
 arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi  | 12 ++++++++----
 arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 12 ++++++++----
 arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi | 14 +++++++++-----
 9 files changed, 56 insertions(+), 27 deletions(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/7 arm64: dts: ti: k3-am65: Add cpsw-mac-efuse node to mcu_conf

The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address.

Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed.

This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is.

---
 arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi +8 -4
index 8feab93176447..43c6118d2bf0f 100644
@@ -6,13 +6,17 @@
  */
 
 &cbass_mcu {
-	mcu_conf: scm-conf@40f00000 {
-		compatible = "syscon", "simple-mfd";
-		reg = <0x0 0x40f00000 0x0 0x20000>;
+	mcu_conf: bus@40f00000 {
+		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x0 0x0 0x40f00000 0x20000>;
 
+		cpsw_mac_syscon: ethernet-mac-syscon@200 {
+			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
+			reg = <0x200 0x8>;
+		};
+
 		phy_gmii_sel: phy@4040 {
 			compatible = "ti,am654-phy-gmii-sel";
 			reg = <0x4040 0x4>;
@@ -358,7 +362,7 @@ cpsw_port1: port@1 {
 				reg = <1>;
 				ti,mac-only;
 				label = "port1";
-				ti,syscon-efuse = <&mcu_conf 0x200>;
+				ti,syscon-efuse = <&cpsw_mac_syscon 0x0>;
 				phys = <&phy_gmii_sel 1>;
 			};
 		};
Signature · 1 line
2.39.2
#2 lore raw

PATCH 2/7 arm64: dts: ti: k3-j7200: Add cpsw-mac-efuse node to mcu_conf

In reply to Andrew Davis

The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address.

Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed.

This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is.

---
 arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi +9 -5
index fccaabfb13482..5097d192c2b20 100644
@@ -164,12 +164,16 @@ mcu_timer9: timer@40490000 {
 		ti,timer-pwm;
 	};
 
-	mcu_conf: syscon@40f00000 {
-		compatible = "syscon", "simple-mfd";
-		reg = <0x00 0x40f00000 0x00 0x20000>;
+	mcu_conf: bus@40f00000 {
+		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-		ranges = <0x00 0x00 0x40f00000 0x20000>;
+		ranges = <0x0 0x0 0x40f00000 0x20000>;
+
+		cpsw_mac_syscon: ethernet-mac-syscon@200 {
+			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
+			reg = <0x200 0x8>;
+		};
 
 		phy_gmii_sel: phy@4040 {
 			compatible = "ti,am654-phy-gmii-sel";
@@ -420,7 +424,7 @@ cpsw_port1: port@1 {
 				reg = <1>;
 				ti,mac-only;
 				label = "port1";
-				ti,syscon-efuse = <&mcu_conf 0x200>;
+				ti,syscon-efuse = <&cpsw_mac_syscon 0x0>;
 				phys = <&phy_gmii_sel 1>;
 			};
 		};
Signature · 1 line
2.39.2
#3 lore raw

PATCH 3/7 arm64: dts: ti: k3-j721e: Add cpsw-mac-efuse node to mcu_conf

In reply to Andrew Davis

The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address.

Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed.

This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is.

---
 arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi +8 -4
index 9349ae07c046e..6b6ef6a306142 100644
@@ -34,13 +34,17 @@ k3_reset: reset-controller {
 		};
 	};
 
-	mcu_conf: syscon@40f00000 {
-		compatible = "syscon", "simple-mfd";
-		reg = <0x0 0x40f00000 0x0 0x20000>;
+	mcu_conf: bus@40f00000 {
+		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x0 0x0 0x40f00000 0x20000>;
 
+		cpsw_mac_syscon: ethernet-mac-syscon@200 {
+			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
+			reg = <0x200 0x8>;
+		};
+
 		phy_gmii_sel: phy@4040 {
 			compatible = "ti,am654-phy-gmii-sel";
 			reg = <0x4040 0x4>;
@@ -546,7 +550,7 @@ cpsw_port1: port@1 {
 				reg = <1>;
 				ti,mac-only;
 				label = "port1";
-				ti,syscon-efuse = <&mcu_conf 0x200>;
+				ti,syscon-efuse = <&cpsw_mac_syscon 0x0>;
 				phys = <&phy_gmii_sel 1>;
 			};
 		};
Signature · 1 line
2.39.2
#4 lore raw

PATCH 4/7 arm64: dts: ti: k3-j721s2: Add cpsw-mac-efuse node to mcu_conf

In reply to Andrew Davis

The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address.

Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed.

This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is.

---
 arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi +8 -4
index 5ccb04c7c4624..8feb42c89e476 100644
@@ -139,13 +139,17 @@ wkup_gpio_intr: interrupt-controller@42200000 {
 		ti,interrupt-ranges = <16 960 16>;
 	};
 
-	mcu_conf: syscon@40f00000 {
-		compatible = "syscon", "simple-mfd";
-		reg = <0x0 0x40f00000 0x0 0x20000>;
+	mcu_conf: bus@40f00000 {
+		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x0 0x0 0x40f00000 0x20000>;
 
+		cpsw_mac_syscon: ethernet-mac-syscon@200 {
+			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
+			reg = <0x200 0x8>;
+		};
+
 		phy_gmii_sel: phy@4040 {
 			compatible = "ti,am654-phy-gmii-sel";
 			reg = <0x4040 0x4>;
@@ -544,7 +548,7 @@ cpsw_port1: port@1 {
 				reg = <1>;
 				ti,mac-only;
 				label = "port1";
-				ti,syscon-efuse = <&mcu_conf 0x200>;
+				ti,syscon-efuse = <&cpsw_mac_syscon 0x0>;
 				phys = <&phy_gmii_sel 1>;
 			};
 		};
Signature · 1 line
2.39.2
#5 lore raw

PATCH 5/7 arm64: dts: ti: k3-j784s4: Add cpsw-mac-efuse node to mcu_conf

In reply to Andrew Davis

The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address.

Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed.

This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is.

---
 arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi +9 -5
index 2e18d91ae92f8..f3a6ed1c979d0 100644
@@ -145,12 +145,16 @@ mcu_timerio_output: pinctrl@40f04280 {
 		status = "reserved";
 	};
 
-	mcu_conf: syscon@40f00000 {
-		compatible = "ti,j721e-system-controller", "syscon", "simple-mfd";
-		reg = <0x00 0x40f00000 0x00 0x20000>;
+	mcu_conf: bus@40f00000 {
+		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-		ranges = <0x00 0x00 0x40f00000 0x20000>;
+		ranges = <0x0 0x0 0x40f00000 0x20000>;
+
+		cpsw_mac_syscon: ethernet-mac-syscon@200 {
+			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
+			reg = <0x200 0x8>;
+		};
 
 		phy_gmii_sel: phy@4040 {
 			compatible = "ti,am654-phy-gmii-sel";
@@ -553,7 +557,7 @@ mcu_cpsw_port1: port@1 {
 				reg = <1>;
 				ti,mac-only;
 				label = "port1";
-				ti,syscon-efuse = <&mcu_conf 0x200>;
+				ti,syscon-efuse = <&cpsw_mac_syscon 0x0>;
 				phys = <&phy_gmii_sel 1>;
 			};
 		};
Signature · 1 line
2.39.2
#6 lore raw

PATCH 6/7 arm64: dts: ti: k3-am62a: Add cpsw-mac-efuse node to wkup_conf

In reply to Andrew Davis

The WKUP system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address.

Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed.

This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is.

---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi   |  2 +-
 arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +1 -1
index ce4a2f1056300..6b81abec8a145 100644
@@ -713,7 +713,7 @@ cpsw_port1: port@1 {
 				label = "port1";
 				phys = <&phy_gmii_sel 1>;
 				mac-address = [00 00 00 00 00 00];
-				ti,syscon-efuse = <&wkup_conf 0x200>;
+				ti,syscon-efuse = <&cpsw_mac_syscon 0x0>;
 			};
 
 			cpsw_port2: port@2 {
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +7 -3
index 5c5aca4bb9258..f5ac101a04dfa 100644
@@ -6,9 +6,8 @@
  */
 
 &cbass_wakeup {
-	wkup_conf: syscon@43000000 {
-		compatible = "ti,j721e-system-controller", "syscon", "simple-mfd";
-		reg = <0x00 0x43000000 0x00 0x20000>;
+	wkup_conf: bus@43000000 {
+		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x00 0x00 0x43000000 0x20000>;
@@ -18,6 +17,11 @@ chipid: chipid@14 {
 			reg = <0x14 0x4>;
 		};
 
+		cpsw_mac_syscon: ethernet-mac-syscon@200 {
+			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
+			reg = <0x200 0x8>;
+		};
+
 		usb0_phy_ctrl: syscon@4008 {
 			compatible = "ti,am62-usb-phy-ctrl", "syscon";
 			reg = <0x4008 0x4>;
Signature · 1 line
2.39.2
#7 lore raw

PATCH 7/7 arm64: dts: ti: k3-am62: Add cpsw-mac-efuse node to wkup_conf

In reply to Andrew Davis

The WKUP system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address.

Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed.

---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi   | 2 +-
 arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +1 -1
index 0f2722c4bcc32..9662b20d59dae 100644
@@ -739,7 +739,7 @@ cpsw_port1: port@1 {
 				label = "port1";
 				phys = <&phy_gmii_sel 1>;
 				mac-address = [00 00 00 00 00 00];
-				ti,syscon-efuse = <&wkup_conf 0x200>;
+				ti,syscon-efuse = <&cpsw_mac_syscon 0x0>;
 			};
 
 			cpsw_port2: port@2 {
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +5 -0
index 66ddf2dc51afa..e0afafd532a5c 100644
@@ -22,6 +22,11 @@ chipid: chipid@14 {
 			reg = <0x14 0x4>;
 		};
 
+		cpsw_mac_syscon: ethernet-mac-syscon@200 {
+			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
+			reg = <0x200 0x8>;
+		};
+
 		usb0_phy_ctrl: syscon@4008 {
 			compatible = "ti,am62-usb-phy-ctrl", "syscon";
 			reg = <0x4008 0x4>;
Signature · 1 line
2.39.2
maintainer Applied
#8 lore raw
In reply to Andrew Davis

Hi Andrew Davis,

Quoted 8 lines · Andrew Davis

Patches are all mostly the same but split by platform, context is in the patches.

End result is fewer DTB check warnings, some platforms now have 0 :)

This series is a replacement for this patch[0].

[...]

I have applied the following to branch ti-k3-dts-next on [1]. Thank you!

[1/7] arm64: dts: ti: k3-am65: Add cpsw-mac-efuse node to mcu_conf

      commit: 0ab18cecc806586144ea8f245d15a8da71c332eb
[2/7] arm64: dts: ti: k3-j7200: Add cpsw-mac-efuse node to mcu_conf
      commit: 3128edb3c4a8ad8f7c53d11fc5a21da5d6b597ba
[3/7] arm64: dts: ti: k3-j721e: Add cpsw-mac-efuse node to mcu_conf
      commit: 1147fa465a82db96f9883477c3351b77a48e457c
[4/7] arm64: dts: ti: k3-j721s2: Add cpsw-mac-efuse node to mcu_conf
      commit: 418291e705a9824b09f76858c374b04cf4e7a1d3
[5/7] arm64: dts: ti: k3-j784s4: Add cpsw-mac-efuse node to mcu_conf
      commit: 74e074d22a4161c86b3acc12d6fc1dbd60b177f9
[6/7] arm64: dts: ti: k3-am62a: Add cpsw-mac-efuse node to wkup_conf
      commit: 00d20114b515b4697af228cf3c01120ca1335270
[7/7] arm64: dts: ti: k3-am62: Add cpsw-mac-efuse node to wkup_conf
      commit: c870321e4317ea28443e12445f070b35089fd45e

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh