Skip to contentSkip to conversation

ARM: SPEAr600 updates

PATCH New Thomas Petazzoni 3 participants 10 messages Apr 17, 2017 – Apr 19, 2017

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

v2 cover ARM: SPEAr600 updates

Arnd, Olof, Mike, Stephen,

Here are a set of patches touching the support of the SPEAr600 platform, for which the platform maintained Viresh Kumar has Acked the patches, but would like the arm-soc and clk maintainers to pick up the patches directly, see
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-April/501653.html.

Arnd, Olof, could you pick patches 1 to 6 directly in your arm-soc tree ?

Mike, Stephen, could you pick patch 7 directly in your clk tree ?

Thanks a lot,

Thomas Petazzoni

Thomas Petazzoni (7):
arm: spear6xx: add labels to various nodes in spear600.dtsi
arm: spear6xx: use node labels in spear600-evb.dts
arm: spear6xx: fix spaces in spear600-evb.dts
arm: spear6xx: switch spear600-evb to the new flash partition DT
binding
arm: spear6xx: remove unneeded pinctrl properties in spear600-evb
arm: spear6xx: add DT description of the ADC on SPEAr600
clk: spear: fix ADC clock definition on SPEAr600

 arch/arm/boot/dts/spear600-evb.dts | 148 ++++++++++++++++++-------------------
 arch/arm/boot/dts/spear600.dtsi    |  28 ++++---
 drivers/clk/spear/spear6xx_clock.c |   2 +-
 3 files changed, 91 insertions(+), 87 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/7 arm: spear6xx: add labels to various nodes in spear600.dtsi

Having labels allows to more easily reference nodes in .dts files including spear600.dtsi.

---
 arch/arm/boot/dts/spear600.dtsi | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm/boot/dts/spear600.dtsi +10 -10
index 9f60a7b..8459286 100644
@@ -49,7 +49,7 @@
 			#interrupt-cells = <1>;
 		};
 
-		clcd at fc200000 {
+		clcd: clcd at fc200000 {
 			compatible = "arm,pl110", "arm,primecell";
 			reg = <0xfc200000 0x1000>;
 			interrupt-parent = <&vic1>;
@@ -57,7 +57,7 @@
 			status = "disabled";
 		};
 
-		dma at fc400000 {
+		dmac: dma at fc400000 {
 			compatible = "arm,pl080", "arm,primecell";
 			reg = <0xfc400000 0x1000>;
 			interrupt-parent = <&vic1>;
@@ -97,7 +97,7 @@
 			status = "disabled";
 		};
 
-		ehci at e1800000 {
+		ehci_usb0: ehci at e1800000 {
 			compatible = "st,spear600-ehci", "usb-ehci";
 			reg = <0xe1800000 0x1000>;
 			interrupt-parent = <&vic1>;
@@ -105,7 +105,7 @@
 			status = "disabled";
 		};
 
-		ehci at e2000000 {
+		ehci_usb1: ehci at e2000000 {
 			compatible = "st,spear600-ehci", "usb-ehci";
 			reg = <0xe2000000 0x1000>;
 			interrupt-parent = <&vic1>;
@@ -113,7 +113,7 @@
 			status = "disabled";
 		};
 
-		ohci at e1900000 {
+		ohci_usb0: ohci at e1900000 {
 			compatible = "st,spear600-ohci", "usb-ohci";
 			reg = <0xe1900000 0x1000>;
 			interrupt-parent = <&vic1>;
@@ -121,7 +121,7 @@
 			status = "disabled";
 		};
 
-		ohci at e2100000 {
+		ohci_usb1: ohci at e2100000 {
 			compatible = "st,spear600-ohci", "usb-ohci";
 			reg = <0xe2100000 0x1000>;
 			interrupt-parent = <&vic1>;
@@ -135,7 +135,7 @@
 			compatible = "simple-bus";
 			ranges = <0xd0000000 0xd0000000 0x30000000>;
 
-			serial at d0000000 {
+			uart0: serial at d0000000 {
 				compatible = "arm,pl011", "arm,primecell";
 				reg = <0xd0000000 0x1000>;
 				interrupt-parent = <&vic0>;
@@ -143,7 +143,7 @@
 				status = "disabled";
 			};
 
-			serial at d0080000 {
+			uart1: serial at d0080000 {
 				compatible = "arm,pl011", "arm,primecell";
 				reg = <0xd0080000 0x1000>;
 				interrupt-parent = <&vic0>;
@@ -181,7 +181,7 @@
 				interrupts = <4>;
 			};
 
-			i2c at d0200000 {
+			i2c: i2c at d0200000 {
 				#address-cells = <1>;
 				#size-cells = <0>;
 				compatible = "snps,designware-i2c";
@@ -191,7 +191,7 @@
 				status = "disabled";
 			};
 
-			rtc at fc900000 {
+			rtc: rtc at fc900000 {
 				compatible = "st,spear600-rtc";
 				reg = <0xfc900000 0x1000>;
 				interrupts = <10>;
Signature · 1 line
2.7.4
#2 lore raw

PATCH v2 2/7 arm: spear6xx: use node labels in spear600-evb.dts

In reply to Thomas Petazzoni

Now that we have introduced node labels in spear600.dtsi, we can use them for spear600-evb.dts.

---
 arch/arm/boot/dts/spear600-evb.dts | 156 ++++++++++++++++++-------------------
 1 file changed, 76 insertions(+), 80 deletions(-)
arch/arm/boot/dts/spear600-evb.dts +76 -80
index d865a89..375eb61 100644
@@ -22,95 +22,91 @@
 		device_type = "memory";
 		reg = <0 0x10000000>;
 	};
+};
 
-	ahb {
-		clcd at fc200000 {
-			status = "okay";
-		};
+&clcd {
+	status = "okay";
+};
 
-		dma at fc400000 {
-			status = "okay";
-		};
+&dmac {
+	status = "okay";
+};
 
-		ehci at e1800000 {
-			status = "okay";
-		};
+&ehci_usb0 {
+	status = "okay";
+};
 
-		ehci at e2000000 {
-			status = "okay";
-		};
+&ehci_usb1 {
+	status = "okay";
+};
 
-		gmac: ethernet at e0800000 {
-			phy-mode = "gmii";
-			status = "okay";
-		};
+&gmac {
+	phy-mode = "gmii";
+	status = "okay";
+};
 
-		ohci at e1900000 {
-			status = "okay";
-		};
+&ohci_usb0 {
+	status = "okay";
+};
 
-		ohci at e2100000 {
-			status = "okay";
-		};
+&ohci_usb1 {
+	status = "okay";
+};
 
-		smi: flash at fc000000 {
-			status = "okay";
-			clock-rate=<50000000>;
-
-			flash at f8000000 {
-				#address-cells = <1>;
-				#size-cells = <1>;
-				reg = <0xf8000000 0x800000>;
-				st,smi-fast-mode;
-
-				partition at 0 {
-					label = "xloader";
-					reg = <0x0 0x10000>;
-				};
-				partition at 10000 {
-					label = "u-boot";
-					reg = <0x10000 0x50000>;
-				};
-				partition at 60000 {
-					label = "environment";
-					reg = <0x60000 0x10000>;
-				};
-				partition at 70000 {
-					label = "dtb";
-					reg = <0x70000 0x10000>;
-				};
-				partition at 80000 {
-					label = "linux";
-					reg = <0x80000 0x310000>;
-				};
-				partition at 390000 {
-					label = "rootfs";
-					reg = <0x390000 0x0>;
-				};
-			};
-		};
+&smi {
+	status = "okay";
+	clock-rate=<50000000>;
+
+	flash at f8000000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0xf8000000 0x800000>;
+		st,smi-fast-mode;
 
-		apb {
-			serial at d0000000 {
-				status = "okay";
-				pinctrl-names = "default";
-				pinctrl-0 = <>;
-			};
-
-			serial at d0080000 {
-				status = "okay";
-				pinctrl-names = "default";
-				pinctrl-0 = <>;
-			};
-
-			rtc at fc900000 {
-			       status = "okay";
-			};
-
-			i2c at d0200000 {
-				clock-frequency = <400000>;
-				status = "okay";
-			};
+		partition at 0 {
+			label = "xloader";
+			reg = <0x0 0x10000>;
+		};
+		partition at 10000 {
+			label = "u-boot";
+			reg = <0x10000 0x50000>;
+		};
+		partition at 60000 {
+			label = "environment";
+			reg = <0x60000 0x10000>;
+		};
+		partition at 70000 {
+			label = "dtb";
+			reg = <0x70000 0x10000>;
+		};
+		partition at 80000 {
+			label = "linux";
+			reg = <0x80000 0x310000>;
+		};
+		partition at 390000 {
+			label = "rootfs";
+			reg = <0x390000 0x0>;
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <>;
+};
+
+&uart1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <>;
+};
+
+&rtc {
+	status = "okay";
+};
+
+&i2c {
+	clock-frequency = <400000>;
+	status = "okay";
+};
Signature · 1 line
2.7.4
#3 lore raw

PATCH v2 3/7 arm: spear6xx: fix spaces in spear600-evb.dts

In reply to Thomas Petazzoni

This commit fixes a minor coding style issue in spear600-evb.dts:
missing spaces around equal sign.

---
 arch/arm/boot/dts/spear600-evb.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/spear600-evb.dts +1 -1
index 375eb61..32a44b6 100644
@@ -55,7 +55,7 @@
 
 &smi {
 	status = "okay";
-	clock-rate=<50000000>;
+	clock-rate = <50000000>;
 
 	flash at f8000000 {
 		#address-cells = <1>;
Signature · 1 line
2.7.4
#4 lore raw

PATCH v2 4/7 arm: spear6xx: switch spear600-evb to the new flash partition DT binding

In reply to Thomas Petazzoni

This commit moves spear600-evb.dts to use the new flash partition Device Tree binding documented in Documentation/devicetree/bindings/mtd/partition.txt.

As this Device Tree binding document says: "For backwards compatibility partitions as direct subnodes of the mtd device are supported. This use is discouraged."

---
 arch/arm/boot/dts/spear600-evb.dts | 54 ++++++++++++++++++++------------------
 1 file changed, 29 insertions(+), 25 deletions(-)
arch/arm/boot/dts/spear600-evb.dts +29 -25
index 32a44b6..f36603f 100644
@@ -58,34 +58,38 @@
 	clock-rate = <50000000>;
 
 	flash at f8000000 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		reg = <0xf8000000 0x800000>;
 		st,smi-fast-mode;
 
-		partition at 0 {
-			label = "xloader";
-			reg = <0x0 0x10000>;
-		};
-		partition at 10000 {
-			label = "u-boot";
-			reg = <0x10000 0x50000>;
-		};
-		partition at 60000 {
-			label = "environment";
-			reg = <0x60000 0x10000>;
-		};
-		partition at 70000 {
-			label = "dtb";
-			reg = <0x70000 0x10000>;
-		};
-		partition at 80000 {
-			label = "linux";
-			reg = <0x80000 0x310000>;
-		};
-		partition at 390000 {
-			label = "rootfs";
-			reg = <0x390000 0x0>;
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "xloader";
+				reg = <0x0 0x10000>;
+			};
+			partition at 10000 {
+				label = "u-boot";
+				reg = <0x10000 0x50000>;
+			};
+			partition at 60000 {
+				label = "environment";
+				reg = <0x60000 0x10000>;
+			};
+			partition at 70000 {
+				label = "dtb";
+				reg = <0x70000 0x10000>;
+			};
+			partition at 80000 {
+				label = "linux";
+				reg = <0x80000 0x310000>;
+			};
+			partition at 390000 {
+				label = "rootfs";
+				reg = <0x390000 0x0>;
+			};
 		};
 	};
 };
Signature · 1 line
2.7.4
#5 lore raw

PATCH v2 5/7 arm: spear6xx: remove unneeded pinctrl properties in spear600-evb

In reply to Thomas Petazzoni

The spear6xx doesn't have a pinctrl driver, since the pinmux is globally defined through a single register, generally configured by the firmware/bootloader.

Therefore, the pinctrl related properties in spear600-evb.dts are not necessary.

---
 arch/arm/boot/dts/spear600-evb.dts | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/boot/dts/spear600-evb.dts +0 -4
index f36603f..c67e76c 100644
@@ -96,14 +96,10 @@
 
 &uart0 {
 	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <>;
 };
 
 &uart1 {
 	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <>;
 };
 
 &rtc {
Signature · 1 line
2.7.4
#6 lore raw

PATCH v2 6/7 arm: spear6xx: add DT description of the ADC on SPEAr600

In reply to Thomas Petazzoni

The SPEAr600 has a built-in ADC, which already has a Device Tree binding described in Documentation/devicetree/bindings/staging/iio/adc/spear-adc.txt. This commit adds the description in the SPEAr600 Device Tree of this ADC device.

---
 arch/arm/boot/dts/spear600.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/spear600.dtsi +8 -0
index 8459286..6b32d20 100644
@@ -204,6 +204,14 @@
 				interrupt-parent = <&vic0>;
 				interrupts = <16>;
 			};
+
+			adc: adc at d820b000 {
+				compatible = "st,spear600-adc";
+				reg = <0xd820b000 0x1000>;
+				interrupt-parent = <&vic1>;
+				interrupts = <6>;
+				status = "disabled";
+			};
 		};
 	};
 };
Signature · 1 line
2.7.4
#7 lore raw

PATCH v2 7/7 clk: spear: fix ADC clock definition on SPEAr600

In reply to Thomas Petazzoni

There is no SPEAr600 device named "adc". Instead, the description of the ADC was recently added to the Device Tree, and the device name is "d820b000.adc", so we should associate the ADC gatable clock to this device name.

---
 drivers/clk/spear/spear6xx_clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/spear/spear6xx_clock.c +1 -1
index 7c9383c..f911d9f 100644
@@ -313,7 +313,7 @@ void __init spear6xx_clk_init(void __iomem *misc_base)
 	/* clock derived from apb clk */
 	clk = clk_register_gate(NULL, "adc_clk", "apb_clk", 0, PERIP1_CLK_ENB,
 			ADC_CLK_ENB, 0, &_lock);
-	clk_register_clkdev(clk, NULL, "adc");
+	clk_register_clkdev(clk, NULL, "d820b000.adc");
 
 	clk = clk_register_fixed_factor(NULL, "gpio0_clk", "apb_clk", 0, 1, 1);
 	clk_register_clkdev(clk, NULL, "f0100000.gpio");
Signature · 1 line
2.7.4
Applied
#8 lore raw

PATCH v2 7/7 clk: spear: fix ADC clock definition on SPEAr600

Quoted 8 lines · Thomas Petazzoni

There is no SPEAr600 device named "adc". Instead, the description of the ADC was recently added to the Device Tree, and the device name is "d820b000.adc", so we should associate the ADC gatable clock to this device name.

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#9 lore raw

v2 cover ARM: SPEAr600 updates

In reply to Thomas Petazzoni
Quoted 11 lines · Thomas Petazzoni

Arnd, Olof, Mike, Stephen,

Here are a set of patches touching the support of the SPEAr600 platform, for which the platform maintained Viresh Kumar has Acked the patches, but would like the arm-soc and clk maintainers to pick up the patches directly, see
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-April/501653.html.

Arnd, Olof, could you pick patches 1 to 6 directly in your arm-soc tree ?

Mike, Stephen, could you pick patch 7 directly in your clk tree ?

Thanks, applied patches 1-6 to next/dt.

-Olof