[PATCH 5/5] ARM: dts: BCM5301X: add pinctrl pins, groups & functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Rafał Miłecki <rafal@xxxxxxxxxx>

They can now be described in DT so do that.

Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
---
 arch/arm/boot/dts/bcm4709.dtsi  |  74 +++++++++++++++++++
 arch/arm/boot/dts/bcm47094.dtsi |  11 +--
 arch/arm/boot/dts/bcm5301x.dtsi | 123 ++++++++++++++++++++++++++++++++
 3 files changed, 198 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boot/dts/bcm4709.dtsi b/arch/arm/boot/dts/bcm4709.dtsi
index cba3d910bed8..ba4700a85772 100644
--- a/arch/arm/boot/dts/bcm4709.dtsi
+++ b/arch/arm/boot/dts/bcm4709.dtsi
@@ -10,6 +10,80 @@ &uart0 {
 	status = "okay";
 };
 
+&pinctrl {
+	compatible = "brcm,bcm4709-pinmux";
+
+	pins {
+		reg@6 {
+			reg = <6>;
+			label = "mdc";
+		};
+
+		reg@7 {
+			reg = <7>;
+			label = "mdio";
+		};
+
+		reg@10 {
+			reg = <16>;
+			label = "uart2_rx";
+		};
+
+		reg@11 {
+			reg = <17>;
+			label = "uart2_tx";
+		};
+
+		/* TODO
+		 * reg@ {
+		 *	label = "xtal_out";
+		 * };
+		 */
+
+		reg@16 {
+			reg = <22>;
+			label = "sdio_pwr";
+		};
+
+		reg@17 {
+			reg = <23>;
+			label = "sdio_en_1p8v";
+		};
+	};
+
+	groups {
+		mdio_grp: mdio_grp {
+			pins = <6 7>;
+		};
+
+		uart2_grp: uart2_grp {
+			pins = <16 17>;
+		};
+
+		sdio_pwr_grp: sdio_pwr_grp {
+			pins = <22>;
+		};
+
+		sdio_1p8v_grp: sdio_1p8v_grp {
+			pins = <23>;
+		};
+	};
+
+	functions {
+		mdio {
+			groups = <&mdio_grp>;
+		};
+
+		uart2 {
+			groups = <&uart2_grp>;
+		};
+
+		sdio {
+			groups = <&sdio_pwr_grp &sdio_1p8v_grp>;
+		};
+	};
+};
+
 &srab {
 	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
 };
diff --git a/arch/arm/boot/dts/bcm47094.dtsi b/arch/arm/boot/dts/bcm47094.dtsi
index 6282363313e1..239c1c1b0268 100644
--- a/arch/arm/boot/dts/bcm47094.dtsi
+++ b/arch/arm/boot/dts/bcm47094.dtsi
@@ -3,14 +3,12 @@
  * Copyright (C) 2016 Rafał Miłecki <rafal@xxxxxxxxxx>
  */
 
-#include "bcm4708.dtsi"
+#include "bcm4709.dtsi"
 
 / {
 };
 
 &pinctrl {
-	compatible = "brcm,bcm4709-pinmux";
-
 	pinmux_mdio: mdio-pins {
 		groups = "mdio_grp";
 		function = "mdio";
@@ -21,11 +19,4 @@ &usb3_phy {
 	compatible = "brcm,ns-bx-usb3-phy";
 };
 
-&uart0 {
-	clock-frequency = <125000000>;
-	status = "okay";
-};
 
-&srab {
-	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
-};
diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index d4f355015e3c..31c6a3dbba30 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -473,6 +473,129 @@ pinmux_uart1: uart1-pins {
 					groups = "uart1_grp";
 					function = "uart1";
 				};
+
+				pins {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					pin@0 {
+						reg = <0>;
+						label = "spi_clk";
+					};
+
+					pin@1 {
+						reg = <1>;
+						label = "spi_ss";
+					};
+
+					pin@2 {
+						reg = <2>;
+						label = "spi_mosi";
+					};
+
+					pin@3 {
+						reg = <3>;
+						label = "spi_miso";
+					};
+
+					pin@4 {
+						reg = <4>;
+						label = "i2c_scl";
+					};
+
+					pin@5 {
+						reg = <5>;
+						label = "i2c_sda";
+					};
+
+					pin@8 {
+						reg = <8>;
+						label = "pwm0";
+					};
+
+					pin@9 {
+						reg = <9>;
+						label = "pwm1";
+					};
+
+					pin@a {
+						reg = <10>;
+						label = "pwm2";
+					};
+
+					pin@b {
+						reg = <11>;
+						label = "pwm3";
+					};
+
+					pin@c {
+						reg = <12>;
+						label = "uart1_rx";
+					};
+
+					pin@d {
+						reg = <13>;
+						label = "uart1_tx";
+					};
+
+					pin@e {
+						reg = <14>;
+						label = "uart1_cts";
+					};
+
+					pin@f {
+						reg = <15>;
+						label = "uart1_rts";
+					};
+				};
+
+				groups {
+					spi_grp: spi_grp {
+						pins = <0 1 2 3>;
+					};
+
+					i2c_grp: i2c_grp {
+						pins = <4 5>;
+					};
+
+					pwm0_grp: pwm0_grp {
+						pins = <8>;
+					};
+
+					pwm1_grp: pwm1_grp {
+						pins = <9>;
+					};
+
+					pwm2_grp: pwm2_grp {
+						pins = <10>;
+					};
+
+					pwm3_grp: pwm3_grp {
+						pins = <11>;
+					};
+
+					uart1_grp: uart1_grp {
+						pins = <12 13 14 15>;
+					};
+				};
+
+				functions {
+					spi {
+						groups = <&spi_grp>;
+					};
+
+					i2c {
+						groups = <&i2c_grp>;
+					};
+
+					pwm {
+						groups = <&pwm0_grp &pwm1_grp &pwm2_grp &pwm3_grp>;
+					};
+
+					uart1 {
+						groups = <&uart1_grp>;
+					};
+				};
 			};
 
 			thermal: thermal@2c0 {
-- 
2.31.1




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux