Skip to contentSkip to conversation

Add Ethernet DTS for Actions Semi Owl S500 SoCs

PATCH In review Cristian Ciocaltea 3 participants 10 messages Jun 11, 2021 – Jun 28, 2021

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

v2 cover Add Ethernet DTS for Actions Semi Owl S500 SoCs

This patchset adds the required DTS changes for providing the ethernet functionality on the Actions S500 SoCs family.

For the moment I have been able to test the Ethernet MAC on the RoseaplePi SBC only.

Also, please note the patches depend on some clock changes that are currently under review:
https://lore.kernel.org/lkml/[email protected]/

Thanks,
Cristi

Changes in v2:
- Added Reviewed-by tag from Mani in patch 1/2
- Joined the groups sharing common function "eth_rmii" and switch the order of "ref_clk-pinconf" and "phy_clk-pinmux", per Mani's review, in patch 2/2

Cristian Ciocaltea (2):
ARM: dts: owl-s500: Add ethernet support
ARM: dts: owl-s500-roseapplepi: Add ethernet support

 arch/arm/boot/dts/owl-s500-roseapplepi.dts | 45 ++++++++++++++++++++++
 arch/arm/boot/dts/owl-s500.dtsi            | 10 +++++
 2 files changed, 55 insertions(+)
Signature · 1 line
2.32.0
#1 lore raw

PATCH v2 1/2 ARM: dts: owl-s500: Add ethernet support

Add Ethernet MAC device tree node for Actions Semi S500 SoC.

---
 arch/arm/boot/dts/owl-s500.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/owl-s500.dtsi +10 -0
index cd635f222d26..739b4b9cec8c 100644
@@ -324,5 +324,15 @@ mmc2: mmc@b0238000 {
 			dma-names = "mmc";
 			status = "disabled";
 		};
+
+		ethernet: ethernet@b0310000 {
+			compatible = "actions,s500-emac", "actions,owl-emac";
+			reg = <0xb0310000 0x10000>;
+			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cmu CLK_ETHERNET>, <&cmu CLK_RMII_REF>;
+			clock-names = "eth", "rmii";
+			resets = <&cmu RESET_ETHERNET>;
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
2.32.0
#2 lore raw

Re: [PATCH v2 1/2] ARM: dts: owl-s500: Add ethernet support

I love your patch! Yet something to improve:

Hi Cristian,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v5.13-rc6 next-20210615]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Cristian-Ciocaltea/Add-Ethernet-DTS-for-Actions-Semi-Owl-S500-SoCs/20210616-121106
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-randconfig-r025-20210615 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/87e17f86112592e0805d0a081914f7b2eeb2770d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cristian-Ciocaltea/Add-Ethernet-DTS-for-Actions-Semi-Owl-S500-SoCs/20210616-121106 git checkout 87e17f86112592e0805d0a081914f7b2eeb2770d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> Error: arch/arm/boot/dts/owl-s500.dtsi:332.19-20 syntax error
>> FATAL ERROR: Unable to parse input tree

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#3 lore raw

Re: [PATCH v2 1/2] ARM: dts: owl-s500: Add ethernet support

Hi Cristi,

Quoted 24 lines · kernel test robot

Hi Cristian,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v5.13-rc6 next-20210615]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Cristian-Ciocaltea/Add-Ethernet-DTS-for-Actions-Semi-Owl-S500-SoCs/20210616-121106
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-randconfig-r025-20210615 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/87e17f86112592e0805d0a081914f7b2eeb2770d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cristian-Ciocaltea/Add-Ethernet-DTS-for-Actions-Semi-Owl-S500-SoCs/20210616-121106 git checkout 87e17f86112592e0805d0a081914f7b2eeb2770d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm

Quoted 7 lines

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

Quoted 2 lines
Quoted 2 lines

Error: arch/arm/boot/dts/owl-s500.dtsi:332.19-20 syntax error FATAL ERROR: Unable to parse input tree

Did you look into this error? Looks like CLK_ETHERNET is not defined in the s500 CMU binding.

Today I saw that the clk patches are applied but then it is later for me to send the dts patches for v5.14. So please fix this error and resubmit, I'll take them for v5.15.

Thanks,
Mani

Quoted 4 lines

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#4 lore raw

Re: [PATCH v2 1/2] ARM: dts: owl-s500: Add ethernet support

Hi Mani,

Quoted 30 lines · Manivannan Sadhasivam

Hi Cristi,

Quoted 27 lines · kernel test robot

Hi Cristian,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v5.13-rc6 next-20210615]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Cristian-Ciocaltea/Add-Ethernet-DTS-for-Actions-Semi-Owl-S500-SoCs/20210616-121106
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-randconfig-r025-20210615 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/87e17f86112592e0805d0a081914f7b2eeb2770d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cristian-Ciocaltea/Add-Ethernet-DTS-for-Actions-Semi-Owl-S500-SoCs/20210616-121106 git checkout 87e17f86112592e0805d0a081914f7b2eeb2770d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate

Quoted 7 lines
Quoted 4 lines

All errors (new ones prefixed by >>):

Quoted 2 lines
Quoted 2 lines

Error: arch/arm/boot/dts/owl-s500.dtsi:332.19-20 syntax error FATAL ERROR: Unable to parse input tree

Did you look into this error? Looks like CLK_ETHERNET is not defined in the s500 CMU binding.

CLK_ETHERNET is introduced through patches 5 & 6 from the patch series:
"[PATCH v3 0/6] Improve clock support for Actions S500 SoC"

Most probably those patches were not applied to the tested kernel tree and that's why the robot reported the error.

Thanks,
Cristi

Quoted 13 lines

Today I saw that the clk patches are applied but then it is later for me to send the dts patches for v5.14. So please fix this error and resubmit, I'll take them for v5.15.

Thanks,
Mani

Quoted 4 lines

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#5 lore raw

Re: [PATCH v2 1/2] ARM: dts: owl-s500: Add ethernet support

Quoted 38 lines · Cristian Ciocaltea

Hi Mani,

Quoted 35 lines · Manivannan Sadhasivam

Hi Cristi,

Quoted 31 lines · kernel test robot

Hi Cristian,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v5.13-rc6 next-20210615]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Cristian-Ciocaltea/Add-Ethernet-DTS-for-Actions-Semi-Owl-S500-SoCs/20210616-121106
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-randconfig-r025-20210615 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/87e17f86112592e0805d0a081914f7b2eeb2770d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cristian-Ciocaltea/Add-Ethernet-DTS-for-Actions-Semi-Owl-S500-SoCs/20210616-121106 git checkout 87e17f86112592e0805d0a081914f7b2eeb2770d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

Quoted 2 lines
Quoted 2 lines

Error: arch/arm/boot/dts/owl-s500.dtsi:332.19-20 syntax error FATAL ERROR: Unable to parse input tree

Quoted 9 lines
Quoted 2 lines

Did you look into this error? Looks like CLK_ETHERNET is not defined in the s500 CMU binding.

CLK_ETHERNET is introduced through patches 5 & 6 from the patch series:
"[PATCH v3 0/6] Improve clock support for Actions S500 SoC"

Most probably those patches were not applied to the tested kernel tree and that's why the robot reported the error.

Ah, okay. I didn't see it. Then I'll just push the dts changes and see if they get applied for 5.14.

Thanks,
Mani

Quoted 16 lines

Thanks,
Cristi

Quoted 13 lines

Today I saw that the clk patches are applied but then it is later for me to send the dts patches for v5.14. So please fix this error and resubmit, I'll take them for v5.15.

Thanks,
Mani

Quoted 4 lines

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#6 lore raw

PATCH v2 2/2 ARM: dts: owl-s500-roseapplepi: Add ethernet support

In reply to Cristian Ciocaltea

Add pinctrl configuration for enabling the Ethernet MAC on RoseapplePi SBC. Additionally, provide the necessary properties for the generic S500 ethernet node in order to setup PHY and MDIO.

---
 arch/arm/boot/dts/owl-s500-roseapplepi.dts | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/owl-s500-roseapplepi.dts +45 -0
index b8c5db2344aa..eb555f385283 100644
@@ -225,6 +225,27 @@ bias1-pinconf {
 			bias-pull-down;
 		};
 	};
+
+	ethernet_pins: ethernet-pins {
+		eth_rmii-pinmux {
+			groups = "rmii_txd0_mfp", "rmii_txd1_mfp",
+				 "rmii_rxd0_mfp", "rmii_rxd1_mfp",
+				 "rmii_txen_mfp", "rmii_rxen_mfp",
+				 "rmii_crs_dv_mfp", "rmii_ref_clk_mfp";
+			function = "eth_rmii";
+		};
+
+		phy_clk-pinmux {
+			groups = "clko_25m_mfp";
+			function = "clko_25m";
+		};
+
+		ref_clk-pinconf {
+			groups = "rmii_ref_clk_drv";
+			drive-strength = <2>;
+		};
+
+	};
 };
 
 /* uSD */
@@ -241,6 +262,30 @@ &mmc0 {
 	vqmmc-supply = <&sd_vcc>;
 };
 
+&ethernet {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ethernet_pins>;
+	phy-mode = "rmii";
+	phy-handle = <&eth_phy>;
+	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reset-gpios = <&pinctrl 88 GPIO_ACTIVE_LOW>; /* GPIOC24 */
+		reset-delay-us = <10000>;
+		reset-post-delay-us = <150000>;
+
+		eth_phy: ethernet-phy@3 {
+			reg = <0x3>;
+			max-speed = <100>;
+			interrupt-parent = <&sirq>;
+			interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+		};
+	};
+};
+
 &twd_timer {
 	status = "okay";
 };
Signature · 1 line
2.32.0
maintainer Reviewed-by on v2 2/2
#7 lore raw

Re: [PATCH v2 2/2] ARM: dts: owl-s500-roseapplepi: Add ethernet support

Quoted 5 lines · Cristian Ciocaltea

Add pinctrl configuration for enabling the Ethernet MAC on RoseapplePi SBC. Additionally, provide the necessary properties for the generic S500 ethernet node in order to setup PHY and MDIO.

Thanks,
Mani

Quoted 70 lines
---
 arch/arm/boot/dts/owl-s500-roseapplepi.dts | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/owl-s500-roseapplepi.dts +45 -0
index b8c5db2344aa..eb555f385283 100644
@@ -225,6 +225,27 @@ bias1-pinconf {
 			bias-pull-down;
 		};
 	};
+
+	ethernet_pins: ethernet-pins {
+		eth_rmii-pinmux {
+			groups = "rmii_txd0_mfp", "rmii_txd1_mfp",
+				 "rmii_rxd0_mfp", "rmii_rxd1_mfp",
+				 "rmii_txen_mfp", "rmii_rxen_mfp",
+				 "rmii_crs_dv_mfp", "rmii_ref_clk_mfp";
+			function = "eth_rmii";
+		};
+
+		phy_clk-pinmux {
+			groups = "clko_25m_mfp";
+			function = "clko_25m";
+		};
+
+		ref_clk-pinconf {
+			groups = "rmii_ref_clk_drv";
+			drive-strength = <2>;
+		};
+
+	};
 };
 
 /* uSD */
@@ -241,6 +262,30 @@ &mmc0 {
 	vqmmc-supply = <&sd_vcc>;
 };
 
+&ethernet {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ethernet_pins>;
+	phy-mode = "rmii";
+	phy-handle = <&eth_phy>;
+	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reset-gpios = <&pinctrl 88 GPIO_ACTIVE_LOW>; /* GPIOC24 */
+		reset-delay-us = <10000>;
+		reset-post-delay-us = <150000>;
+
+		eth_phy: ethernet-phy@3 {
+			reg = <0x3>;
+			max-speed = <100>;
+			interrupt-parent = <&sirq>;
+			interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+		};
+	};
+};
+
 &twd_timer {
 	status = "okay";
 };
Signature · 1 line
2.32.0

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#8 lore raw
In reply to Cristian Ciocaltea
Quoted 10 lines · Cristian Ciocaltea

This patchset adds the required DTS changes for providing the ethernet functionality on the Actions S500 SoCs family.

For the moment I have been able to test the Ethernet MAC on the RoseaplePi SBC only.

Also, please note the patches depend on some clock changes that are currently under review:
https://lore.kernel.org/lkml/[email protected]/

Waiting for the clk patches to be merged...

Thanks,
Mani

Quoted 9 lines

Thanks,
Cristi

Changes in v2:
- Added Reviewed-by tag from Mani in patch 1/2
- Joined the groups sharing common function "eth_rmii" and switch the order of "ref_clk-pinconf" and "phy_clk-pinmux", per Mani's review, in patch 2/2

Quoted 11 lines

Cristian Ciocaltea (2):
ARM: dts: owl-s500: Add ethernet support
ARM: dts: owl-s500-roseapplepi: Add ethernet support

 arch/arm/boot/dts/owl-s500-roseapplepi.dts | 45 ++++++++++++++++++++++
 arch/arm/boot/dts/owl-s500.dtsi            | 10 +++++
 2 files changed, 55 insertions(+)
Signature · 1 line
2.32.0

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#9 lore raw
Quoted 7 lines · Manivannan Sadhasivam
Quoted 6 lines · Cristian Ciocaltea

This patchset adds the required DTS changes for providing the ethernet functionality on the Actions S500 SoCs family.

For the moment I have been able to test the Ethernet MAC on the RoseaplePi SBC only.

Quoted 6 lines
Quoted 4 lines

Also, please note the patches depend on some clock changes that are currently under review:
https://lore.kernel.org/lkml/[email protected]/

Waiting for the clk patches to be merged...

Thanks, Mani!

Hopefully Stephen is going to pick them up in time..

Kind regards,
Cristi

Quoted 23 lines

Thanks,
Mani

Quoted 20 lines

Thanks,
Cristi

Changes in v2:
- Added Reviewed-by tag from Mani in patch 1/2
- Joined the groups sharing common function "eth_rmii" and switch the order of "ref_clk-pinconf" and "phy_clk-pinmux", per Mani's review, in patch 2/2

Cristian Ciocaltea (2):
ARM: dts: owl-s500: Add ethernet support
ARM: dts: owl-s500-roseapplepi: Add ethernet support

 arch/arm/boot/dts/owl-s500-roseapplepi.dts | 45 ++++++++++++++++++++++
 arch/arm/boot/dts/owl-s500.dtsi            | 10 +++++
 2 files changed, 55 insertions(+)
Signature · 1 line
2.32.0