linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Unune <npcomplete13@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: "Vivek Unune" <npcomplete13@gmail.com>,
	"Hauke Mehrtens" <hauke@hauke-m.de>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com,
	"Rob Herring" <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] ARM: dts: BCM5301X: Linksys EA9500 make use of pinctrl
Date: Wed,  7 Oct 2020 15:01:50 -0400	[thread overview]
Message-ID: <6687de05226dd055ee362933d4841a12b038792d.1601655904.git.npcomplete13@gmail.com> (raw)
In-Reply-To: <cover.1601655904.git.npcomplete13@gmail.com>

Forgo the use of mmioreg mdio mux infavor of the pinctrl

Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
---
 .../boot/dts/bcm47094-linksys-panamera.dts    | 153 +++++++++---------
 arch/arm/boot/dts/bcm5301x.dtsi               |   4 +-
 2 files changed, 74 insertions(+), 83 deletions(-)

diff --git a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
index 0faae8950375..f8443d9f86b7 100644
--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
@@ -122,87 +122,6 @@ bluebar8 {
 			gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
 		};
 	};
-
-	mdio-bus-mux {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		/* BIT(9) = 1 => external mdio */
-		mdio_ext: mdio@200 {
-			reg = <0x200>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-		};
-	};
-
-	mdio-mii-mux {
-		compatible = "mdio-mux-mmioreg";
-		mdio-parent-bus = <&mdio_ext>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		reg = <0x1800c1c0 0x4>;
-
-		/* BIT(6) = mdc, BIT(7) = mdio */
-		mux-mask = <0xc0>;
-
-		mdio-mii@0 {
-			/* Enable MII function */
-			reg = <0x0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			switch@0  {
-				compatible = "brcm,bcm53125";
-				#address-cells = <1>;
-				#size-cells = <0>;
-				reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
-				reset-names = "robo_reset";
-				reg = <0>;
-				dsa,member = <1 0>;
-
-				ports {
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port@0 {
-						reg = <0>;
-						label = "lan1";
-					};
-
-					port@1 {
-						reg = <1>;
-						label = "lan5";
-					};
-
-					port@2 {
-						reg = <2>;
-						label = "lan2";
-					};
-
-					port@3 {
-						reg = <3>;
-						label = "lan6";
-					};
-
-					port@4 {
-						reg = <4>;
-						label = "lan3";
-					};
-
-					sw1_p8: port@8 {
-						reg = <8>;
-						ethernet = <&sw0_p0>;
-						label = "cpu";
-
-						fixed-link {
-							speed = <1000>;
-							full-duplex;
-						};
-					};
-				};
-			};
-		};
-	};
 };
 
 &usb2 {
@@ -265,6 +184,78 @@ fixed-link {
 	};
 };
 
+&pinctrl {
+	compatible = "brcm,bcm4709-pinmux";
+
+	pinmux_mdio: mdio {
+		groups = "mdio_grp";
+		function = "mdio";
+	};
+};
+
+&mdio_bus_mux {
+
+	/* BIT(9) = 1 => external mdio */
+	mdio@200 {
+		reg = <0x200>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		switch@0  {
+			compatible = "brcm,bcm53125";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
+			reset-names = "robo_reset";
+			reg = <0>;
+			dsa,member = <1 0>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinmux_mdio>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					label = "lan1";
+				};
+
+				port@1 {
+					reg = <1>;
+					label = "lan5";
+				};
+
+				port@2 {
+					reg = <2>;
+					label = "lan2";
+				};
+
+				port@3 {
+					reg = <3>;
+					label = "lan6";
+				};
+
+				port@4 {
+					reg = <4>;
+					label = "lan3";
+				};
+
+				sw1_p8: port@8 {
+					reg = <8>;
+					ethernet = <&sw0_p0>;
+					label = "cpu";
+
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+					};
+				};
+			};
+		};
+	};
+};
+
 &usb3_phy {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 9d9e8fe3f6ae..1476375f88bb 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -369,7 +369,7 @@ mdio: mdio@18003000 {
 		#address-cells = <1>;
 	};
 
-	mdio-bus-mux@18003000 {
+	mdio_bus_mux: mdio-bus-mux@18003000 {
 		compatible = "mdio-mux-mmioreg";
 		mdio-parent-bus = <&mdio>;
 		#address-cells = <1>;
@@ -428,7 +428,7 @@ cru@100 {
 			#address-cells = <1>;
 			#size-cells = <1>;
 
-			pin-controller@1c0 {
+			pinctrl: pin-controller@1c0 {
 				compatible = "brcm,bcm4708-pinmux";
 				reg = <0x1c0 0x24>;
 				reg-names = "cru_gpio_control";
-- 
2.25.1


  reply	other threads:[~2020-10-07 19:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 19:01 [PATCH 0/3] ARM: dts: BCM5301X: Linksys EA9500 device tree changes Vivek Unune
2020-10-07 19:01 ` Vivek Unune [this message]
2020-10-07 21:01   ` [PATCH 1/3] ARM: dts: BCM5301X: Linksys EA9500 make use of pinctrl Andrew Lunn
2020-10-07 21:46     ` Vivek Unune
2020-10-08  0:26       ` Andrew Lunn
2020-10-08 12:41         ` Vivek Unune
2020-11-04 20:29   ` [PATCH v2 0/2] " Vivek Unune
2020-11-04 20:29     ` [PATCH v2 1/2] ARM: dts: BCM5301X: pinctrl - use correct driver and define mdio pins Vivek Unune
2020-11-09 17:21       ` Rafał Miłecki
2020-11-09 17:25         ` Florian Fainelli
2020-11-04 20:29     ` [PATCH v2 2/2] ARM: dts: BCM5301X: Linksys EA9500 make use of pinctrl Vivek Unune
2020-11-04 20:37       ` Florian Fainelli
2020-11-04 20:58         ` Vivek Unune
2020-11-09 13:24           ` Vivek Unune
2020-11-09 15:54             ` Florian Fainelli
2020-11-09 17:24       ` Florian Fainelli
2020-11-10 13:17         ` Vivek Unune
2020-10-07 19:01 ` [PATCH 2/3] ARM: dts: BCM5301X: Linksys EA9500 add port 5 and port 7 Vivek Unune
2020-10-07 21:03   ` Andrew Lunn
2020-10-07 22:07     ` Vivek Unune
2020-10-08  0:32       ` Andrew Lunn
2020-10-08 14:58         ` Florian Fainelli
2020-10-08 20:20           ` Vivek Unune
2020-10-07 19:01 ` [PATCH 3/3] ARM: dts: BCM5301X: Linksys EA9500 add fixed partitions Vivek Unune

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6687de05226dd055ee362933d4841a12b038792d.1601655904.git.npcomplete13@gmail.com \
    --to=npcomplete13@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hauke@hauke-m.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).