[PATCH 0/3] arm: dts: k3-am6: Fix Ethernet/DMA

Hi,
Since commit [1], Ethernet is broken on TI AM62 and AM64 platforms.
The commit [1] is not the culprit. It just unearths the problem by fixing the error check in k3-udma.c. This issue was silently being ignored earlier due to wrong error check. [NULL instead of FDT_ADDR_T_NONE].
Fix the issue by adding the necessary register spaces for the u-boot K3-UDMA driver for AM62 and AM64 platforms.
[1] - 5fecea171de3dd ("treewide: use dev_read_addr_*_ptr() where appropriate")
cheers, -roger
Roger Quadros (1): arm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA/Ethernet
Siddharth Vadapalli (2): arm: dts: k3-am625-sk-u-boot.dtsi: Update main_bcdma and main_pktdma nodes arm: dts: k3-am642: Update main_bcdma and main_pktdma nodes
arch/arm/dts/k3-am625-sk-u-boot.dtsi | 27 +++++++++++++++++++ .../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi | 27 +++++++++++++++++++ arch/arm/dts/k3-am642-evm-u-boot.dtsi | 27 +++++++++++++++++++ arch/arm/dts/k3-am642-sk-u-boot.dtsi | 23 ++++++++++++++++ 4 files changed, 104 insertions(+)
base-commit: 351da15f71e3d70dbc63e90781b403415452d864

From: Siddharth Vadapalli s-vadapalli@ti.com
Update main_bcdma and main_pktdma nodes for native configuration in the absence of DM services.
Reported-by: Nishanth Menon nm@ti.com Signed-off-by: Siddharth Vadapalli s-vadapalli@ti.com Signed-off-by: Roger Quadros rogerq@kernel.org --- arch/arm/dts/k3-am625-sk-u-boot.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/arch/arm/dts/k3-am625-sk-u-boot.dtsi b/arch/arm/dts/k3-am625-sk-u-boot.dtsi index b78d34b459..7186f0830f 100644 --- a/arch/arm/dts/k3-am625-sk-u-boot.dtsi +++ b/arch/arm/dts/k3-am625-sk-u-boot.dtsi @@ -154,6 +154,33 @@ bootph-all; };
+&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"; +}; + +&main_pktdma { + bootph-all; + reg = <0x00 0x485c0000 0x00 0x100>, + <0x00 0x4a800000 0x00 0x20000>, + <0x00 0x4aa00000 0x00 0x20000>, + <0x00 0x4b800000 0x00 0x200000>, + <0x00 0x485e0000 0x00 0x10000>, + <0x00 0x484a0000 0x00 0x2000>, + <0x00 0x484c0000 0x00 0x2000>, + <0x00 0x48430000 0x00 0x1000>; + reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt", + "cfg", "tchan", "rchan", "rflow"; +}; + &cpsw3g { bootph-all; ethernet-ports {

On Fri, 2023-10-27 at 16:46 +0300, Roger Quadros wrote:
From: Siddharth Vadapalli s-vadapalli@ti.com
Update main_bcdma and main_pktdma nodes for native configuration in the absence of DM services.
Reported-by: Nishanth Menon nm@ti.com Signed-off-by: Siddharth Vadapalli s-vadapalli@ti.com Signed-off-by: Roger Quadros rogerq@kernel.org
arch/arm/dts/k3-am625-sk-u-boot.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/arch/arm/dts/k3-am625-sk-u-boot.dtsi b/arch/arm/dts/k3-am625-sk-u-boot.dtsi index b78d34b459..7186f0830f 100644 --- a/arch/arm/dts/k3-am625-sk-u-boot.dtsi +++ b/arch/arm/dts/k3-am625-sk-u-boot.dtsi @@ -154,6 +154,33 @@ bootph-all; }; +&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";
+};
+&main_pktdma {
- bootph-all;
I believe that property would usually be added as the last item of a node.
- reg = <0x00 0x485c0000 0x00 0x100>,
- <0x00 0x4a800000 0x00 0x20000>,
- <0x00 0x4aa00000 0x00 0x20000>,
- <0x00 0x4b800000 0x00 0x200000>,
- <0x00 0x485e0000 0x00 0x10000>,
- <0x00 0x484a0000 0x00 0x2000>,
- <0x00 0x484c0000 0x00 0x2000>,
- <0x00 0x48430000 0x00 0x1000>;
- reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
"cfg", "tchan", "rchan", "rflow";
+};
&cpsw3g { bootph-all; ethernet-ports {

On 28/10/2023 11:10, Marcel Ziswiler wrote:
On Fri, 2023-10-27 at 16:46 +0300, Roger Quadros wrote:
From: Siddharth Vadapalli s-vadapalli@ti.com
Update main_bcdma and main_pktdma nodes for native configuration in the absence of DM services.
Reported-by: Nishanth Menon nm@ti.com Signed-off-by: Siddharth Vadapalli s-vadapalli@ti.com Signed-off-by: Roger Quadros rogerq@kernel.org
arch/arm/dts/k3-am625-sk-u-boot.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/arch/arm/dts/k3-am625-sk-u-boot.dtsi b/arch/arm/dts/k3-am625-sk-u-boot.dtsi index b78d34b459..7186f0830f 100644 --- a/arch/arm/dts/k3-am625-sk-u-boot.dtsi +++ b/arch/arm/dts/k3-am625-sk-u-boot.dtsi @@ -154,6 +154,33 @@ bootph-all; }; +&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";
+};
+&main_pktdma {
- bootph-all;
I believe that property would usually be added as the last item of a node.
OK. I'll move it to the end. Thanks.
- reg = <0x00 0x485c0000 0x00 0x100>,
- <0x00 0x4a800000 0x00 0x20000>,
- <0x00 0x4aa00000 0x00 0x20000>,
- <0x00 0x4b800000 0x00 0x200000>,
- <0x00 0x485e0000 0x00 0x10000>,
- <0x00 0x484a0000 0x00 0x2000>,
- <0x00 0x484c0000 0x00 0x2000>,
- <0x00 0x48430000 0x00 0x1000>;
- reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
"cfg", "tchan", "rchan", "rflow";
+};
&cpsw3g { bootph-all; ethernet-ports {

Update main_bcdma and main_pktdma nodes for native configuration in the absence of DM services. u-boot k3-udma driver expects these additional register fields else probe will fail.
Reported-by: Nishanth Menon nm@ti.com Signed-off-by: Roger Quadros rogerq@kernel.org --- .../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi b/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi index afa24d07a4..730cb21ce9 100644 --- a/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi +++ b/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi @@ -42,6 +42,33 @@ bootph-all; };
+&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"; +}; + +&main_pktdma { + bootph-all; + reg = <0x00 0x485c0000 0x00 0x100>, + <0x00 0x4a800000 0x00 0x20000>, + <0x00 0x4aa00000 0x00 0x20000>, + <0x00 0x4b800000 0x00 0x200000>, + <0x00 0x485e0000 0x00 0x10000>, + <0x00 0x484a0000 0x00 0x2000>, + <0x00 0x484c0000 0x00 0x2000>, + <0x00 0x48430000 0x00 0x1000>; + reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt", + "cfg", "tchan", "rchan", "rflow"; +}; + &cpsw3g { bootph-all; };

On Fri, 2023-10-27 at 16:46 +0300, Roger Quadros wrote:
Update main_bcdma and main_pktdma nodes for native configuration in the absence of DM services. u-boot k3-udma driver expects these additional register fields else probe will fail.
Reported-by: Nishanth Menon nm@ti.com Signed-off-by: Roger Quadros rogerq@kernel.org
With just one minor nitpick blow.
Tested-by: Marcel Ziswiler marcel.ziswiler@toradex.com
.../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi b/arch/arm/dts/k3-am625-verdin-wifi-dev-u- boot.dtsi index afa24d07a4..730cb21ce9 100644 --- a/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi +++ b/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi @@ -42,6 +42,33 @@ bootph-all; }; +&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";
+};
+&main_pktdma {
- bootph-all;
Ditto, I believe that property would usually be added as the last item of a node.
- reg = <0x00 0x485c0000 0x00 0x100>,
- <0x00 0x4a800000 0x00 0x20000>,
- <0x00 0x4aa00000 0x00 0x20000>,
- <0x00 0x4b800000 0x00 0x200000>,
- <0x00 0x485e0000 0x00 0x10000>,
- <0x00 0x484a0000 0x00 0x2000>,
- <0x00 0x484c0000 0x00 0x2000>,
- <0x00 0x48430000 0x00 0x1000>;
- reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
"cfg", "tchan", "rchan", "rflow";
+};
&cpsw3g { bootph-all; };

From: Siddharth Vadapalli s-vadapalli@ti.com
Update main_bcdma and main_pktdma nodes for native configuration in the absence of DM services.
Reported-by: Nishanth Menon nm@ti.com Signed-off-by: Siddharth Vadapalli s-vadapalli@ti.com Signed-off-by: Roger Quadros rogerq@kernel.org --- arch/arm/dts/k3-am642-evm-u-boot.dtsi | 27 +++++++++++++++++++++++++++ arch/arm/dts/k3-am642-sk-u-boot.dtsi | 23 +++++++++++++++++++++++ 2 files changed, 50 insertions(+)
diff --git a/arch/arm/dts/k3-am642-evm-u-boot.dtsi b/arch/arm/dts/k3-am642-evm-u-boot.dtsi index 953bbe9aaf..ce3981f26c 100644 --- a/arch/arm/dts/k3-am642-evm-u-boot.dtsi +++ b/arch/arm/dts/k3-am642-evm-u-boot.dtsi @@ -159,3 +159,30 @@ &cpsw_port2 { status = "disabled"; }; + +&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"; +}; + +&main_pktdma { + bootph-all; + 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/dts/k3-am642-sk-u-boot.dtsi b/arch/arm/dts/k3-am642-sk-u-boot.dtsi index 40a53df0b0..6213804cee 100644 --- a/arch/arm/dts/k3-am642-sk-u-boot.dtsi +++ b/arch/arm/dts/k3-am642-sk-u-boot.dtsi @@ -96,8 +96,31 @@ bootph-all; };
+&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"; +}; + &main_pktdma { bootph-all; + 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"; };
&mdio1_pins_default {

On 16:46-20231027, Roger Quadros wrote:
Hi,
Since commit [1], Ethernet is broken on TI AM62 and AM64 platforms.
The commit [1] is not the culprit. It just unearths the problem by fixing the error check in k3-udma.c. This issue was silently being ignored earlier due to wrong error check. [NULL instead of FDT_ADDR_T_NONE].
Fix the issue by adding the necessary register spaces for the u-boot K3-UDMA driver for AM62 and AM64 platforms.
[1] - 5fecea171de3dd ("treewide: use dev_read_addr_*_ptr() where appropriate")
cheers, -roger
Roger Quadros (1): arm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA/Ethernet
Siddharth Vadapalli (2): arm: dts: k3-am625-sk-u-boot.dtsi: Update main_bcdma and main_pktdma nodes arm: dts: k3-am642: Update main_bcdma and main_pktdma nodes
arch/arm/dts/k3-am625-sk-u-boot.dtsi | 27 +++++++++++++++++++ .../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi | 27 +++++++++++++++++++ arch/arm/dts/k3-am642-evm-u-boot.dtsi | 27 +++++++++++++++++++ arch/arm/dts/k3-am642-sk-u-boot.dtsi | 23 ++++++++++++++++ 4 files changed, 104 insertions(+)
base-commit: 351da15f71e3d70dbc63e90781b403415452d864
2.34.1
Thanks for this.
Reviewed-by: Nishanth Menon nm@ti.com
NOTE: These extra properties are already in discussion in Linux community.
https://lore.kernel.org/linux-arm-kernel/20230810174356.3322583-1-vigneshr@t...
Marcel, could the Toradex team confirm as well?

Hi Nishanth
On Fri, 2023-10-27 at 15:46 -0500, Nishanth Menon wrote:
On 16:46-20231027, Roger Quadros wrote:
Hi,
Since commit [1], Ethernet is broken on TI AM62 and AM64 platforms.
The commit [1] is not the culprit. It just unearths the problem by fixing the error check in k3-udma.c. This issue was silently being ignored earlier due to wrong error check. [NULL instead of FDT_ADDR_T_NONE].
Fix the issue by adding the necessary register spaces for the u-boot K3-UDMA driver for AM62 and AM64 platforms.
[1] - 5fecea171de3dd ("treewide: use dev_read_addr_*_ptr() where appropriate")
cheers, -roger
Roger Quadros (1): arm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA/Ethernet
Siddharth Vadapalli (2): arm: dts: k3-am625-sk-u-boot.dtsi: Update main_bcdma and main_pktdma nodes arm: dts: k3-am642: Update main_bcdma and main_pktdma nodes
arch/arm/dts/k3-am625-sk-u-boot.dtsi | 27 +++++++++++++++++++ .../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi | 27 +++++++++++++++++++ arch/arm/dts/k3-am642-evm-u-boot.dtsi | 27 +++++++++++++++++++ arch/arm/dts/k3-am642-sk-u-boot.dtsi | 23 ++++++++++++++++ 4 files changed, 104 insertions(+)
base-commit: 351da15f71e3d70dbc63e90781b403415452d864
2.34.1
Thanks for this.
Reviewed-by: Nishanth Menon nm@ti.com
NOTE: These extra properties are already in discussion in Linux community.
https://lore.kernel.org/linux-arm-kernel/20230810174356.3322583-1-vigneshr@t...
Marcel, could the Toradex team confirm as well?
Yes, I just successfully tested it. With what you say above I also assume eventually those properties will move to the SoC dtsi rather than having to be separately defined U-Boot-specific in each and every board.
Thanks guys.
Cheers
Marcel

On 08:16-20231028, Marcel Ziswiler wrote: [..]
https://lore.kernel.org/linux-arm-kernel/20230810174356.3322583-1-vigneshr@t...
Marcel, could the Toradex team confirm as well?
Yes, I just successfully tested it. With what you say above I also assume eventually those properties will move to the SoC dtsi rather than having to be separately defined U-Boot-specific in each and every board.
Correct, that is the plan once we get through the maintainers in upstream kernel.
participants (3)
-
Marcel Ziswiler
-
Nishanth Menon
-
Roger Quadros