Skip to contentSkip to conversation

MIPS: mscc: ocelot: add MIIM1 bus

PATCH In review Quentin Schulz 3 participants 3 messages Jul 25, 2018 – Jul 26, 2018

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

PATCH 1/1 MIPS: mscc: ocelot: add MIIM1 bus

There is an additional MIIM (MDIO) bus in this SoC so let's declare it in the dtsi.

This bus requires GPIO 14 and 15 pins that need to be muxed. There is no support for internal PHY reset on this bus on the contrary of MIIM0 so there is only one register address space and not two.

---
 arch/mips/boot/dts/mscc/ocelot.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/mips/boot/dts/mscc/ocelot.dtsi +16 -0
index 7096915f26e0..d7f0e3551500 100644
@@ -178,6 +178,11 @@
 				pins = "GPIO_12", "GPIO_13";
 				function = "uart2";
 			};
+
+			miim1: miim1 {
+				pins = "GPIO_14", "GPIO_15";
+				function = "miim1";
+			};
 		};
 
 		mdio0: mdio@107009c {
@@ -201,5 +206,16 @@
 				reg = <3>;
 			};
 		};
+
+		mdio1: mdio@10700c0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "mscc,ocelot-miim";
+			reg = <0x10700c0 0x24>;
+			interrupts = <15>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&miim1>;
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
2.14.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Quentin Schulz

There is an additional MIIM (MDIO) bus in this SoC so let's declare it in the dtsi.

This bus requires GPIO 14 and 15 pins that need to be muxed. There is no support for internal PHY reset on this bus on the contrary of MIIM0 so there is only one register address space and not two.

Quoted 40 lines
---
 arch/mips/boot/dts/mscc/ocelot.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/mips/boot/dts/mscc/ocelot.dtsi +16 -0
index 7096915f26e0..d7f0e3551500 100644
@@ -178,6 +178,11 @@
 				pins = "GPIO_12", "GPIO_13";
 				function = "uart2";
 			};
+
+			miim1: miim1 {
+				pins = "GPIO_14", "GPIO_15";
+				function = "miim1";
+			};
 		};
 
 		mdio0: mdio@107009c {
@@ -201,5 +206,16 @@
 				reg = <3>;
 			};
 		};
+
+		mdio1: mdio@10700c0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "mscc,ocelot-miim";
+			reg = <0x10700c0 0x24>;
+			interrupts = <15>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&miim1>;
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
2.14.1
Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw
In reply to Quentin Schulz

Hi Quentin,

Quoted 11 lines · Quentin Schulz

There is an additional MIIM (MDIO) bus in this SoC so let's declare it in the dtsi.

This bus requires GPIO 14 and 15 pins that need to be muxed. There is no support for internal PHY reset on this bus on the contrary of MIIM0 so there is only one register address space and not two.

---
 arch/mips/boot/dts/mscc/ocelot.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Thanks - applied to mips-next for 4.19.

Paul