Skip to contentSkip to conversation

ARM: dts: sun9i: Make sure the USB PHY resources are in the same order

PATCH In review Maxime Ripard 3 participants 11 messages Dec 19, 2019 – Dec 20, 2019

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

PATCH 1/5 ARM: dts: sun9i: Make sure the USB PHY resources are in the same order

While this is functional, it's a best practice to always have the clocks and reset lines in order, in case we ever need to have compatibility code.

---
 arch/arm/boot/dts/sun9i-a80.dtsi | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
arch/arm/boot/dts/sun9i-a80.dtsi +16 -16
index 1d900f591d5f..dd292a670921 100644
@@ -387,16 +387,16 @@
 		usbphy2: phy@a01800 {
 			compatible = "allwinner,sun9i-a80-usb-phy";
 			reg = <0x00a01800 0x4>;
-			clocks = <&usb_clocks CLK_USB1_HSIC>,
+			clocks = <&usb_clocks CLK_USB1_PHY>,
 				 <&usb_clocks CLK_USB_HSIC>,
-				 <&usb_clocks CLK_USB1_PHY>;
-			clock-names = "hsic_480M",
+				 <&usb_clocks CLK_USB1_HSIC>;
+			clock-names = "phy",
 				      "hsic_12M",
-				      "phy";
-			resets = <&usb_clocks RST_USB1_HSIC>,
-				 <&usb_clocks RST_USB1_PHY>;
-			reset-names = "hsic",
-				      "phy";
+				      "hsic_480M";
+			resets = <&usb_clocks RST_USB1_PHY>,
+				 <&usb_clocks RST_USB1_HSIC>;
+			reset-names = "phy",
+				      "hsic";
 			status = "disabled";
 			#phy-cells = <0>;
 			/* usb1 is always used with HSIC */
@@ -429,16 +429,16 @@
 		usbphy3: phy@a02800 {
 			compatible = "allwinner,sun9i-a80-usb-phy";
 			reg = <0x00a02800 0x4>;
-			clocks = <&usb_clocks CLK_USB2_HSIC>,
+			clocks = <&usb_clocks CLK_USB2_PHY>,
 				 <&usb_clocks CLK_USB_HSIC>,
-				 <&usb_clocks CLK_USB2_PHY>;
-			clock-names = "hsic_480M",
+				 <&usb_clocks CLK_USB2_HSIC>;
+			clock-names = "phy",
 				      "hsic_12M",
-				      "phy";
-			resets = <&usb_clocks RST_USB2_HSIC>,
-				 <&usb_clocks RST_USB2_PHY>;
-			reset-names = "hsic",
-				      "phy";
+				      "hsic_480M";
+			resets = <&usb_clocks RST_USB2_PHY>,
+				 <&usb_clocks RST_USB2_HSIC>;
+			reset-names = "phy",
+				      "hsic";
 			status = "disabled";
 			#phy-cells = <0>;
 		};
Signature · 7 lines
2.23.0


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

PATCH 2/5 ARM: dts: sun8i: v3s: Remove redundant assigned-clocks

The V3s mixer node has an assigned clocks property, while the driver also enforces it.

Since assigned-clocks is pretty fragile anyway, let's just remove it.

---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm/boot/dts/sun8i-v3s.dtsi +0 -2
index 23ba56df38f7..81ea50838cd5 100644
@@ -123,8 +123,6 @@
 			clock-names = "bus",
 				      "mod";
 			resets = <&display_clocks 0>;
-			assigned-clocks = <&display_clocks 6>;
-			assigned-clock-rates = <150000000>;
 
 			ports {
 				#address-cells = <1>;
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 2/5
#2 lore raw

Re: [PATCH 2/5] ARM: dts: sun8i: v3s: Remove redundant assigned-clocks

Quoted 7 lines · Maxime Ripard

The V3s mixer node has an assigned clocks property, while the driver also enforces it.

Since assigned-clocks is pretty fragile anyway, let's just remove it.

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

#3 lore raw

PATCH 3/5 ARM: dts: sunxi: Add missing dmas properties to TCON

In reply to Maxime Ripard

The TCON binding mandates a dmas phandle to the DMAengine channel used for that controller. However, since it's not used in the driver, some device trees have been missing it. Let's add it.

---
 arch/arm/boot/dts/sun5i.dtsi         | 1 +
 arch/arm/boot/dts/sun6i-a31.dtsi     | 2 ++
 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 1 +
 3 files changed, 4 insertions(+)
arch/arm/boot/dts/sun5i.dtsi +1 -0
index 6befa236ba99..9f0b645fd45e 100644
@@ -275,6 +275,7 @@
 			compatible = "allwinner,sun5i-a13-tcon";
 			reg = <0x01c0c000 0x1000>;
 			interrupts = <44>;
+			dmas = <&dma SUN4I_DMA_DEDICATED 14>;
 			resets = <&ccu RST_LCD>;
 			reset-names = "lcd";
 			clocks = <&ccu CLK_AHB_LCD>,
arch/arm/boot/dts/sun6i-a31.dtsi +2 -0
index 2cf34ae1c17b..4d622ec48b24 100644
@@ -285,6 +285,7 @@
 			compatible = "allwinner,sun6i-a31-tcon";
 			reg = <0x01c0c000 0x1000>;
 			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+			dmas = <&dma 11>;
 			resets = <&ccu RST_AHB1_LCD0>;
 			reset-names = "lcd";
 			clocks = <&ccu CLK_AHB1_LCD0>,
@@ -334,6 +335,7 @@
 			compatible = "allwinner,sun6i-a31-tcon";
 			reg = <0x01c0d000 0x1000>;
 			interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+			dmas = <&dma 12>;
 			resets = <&ccu RST_AHB1_LCD1>;
 			reset-names = "lcd";
 			clocks = <&ccu CLK_AHB1_LCD1>,
arch/arm/boot/dts/sun8i-a23-a33.dtsi +1 -0
index f292f96ab39b..70ec3493061b 100644
@@ -182,6 +182,7 @@
 			/* compatible gets set in SoC specific dtsi file */
 			reg = <0x01c0c000 0x1000>;
 			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+			dmas = <&dma 12>;
 			clocks = <&ccu CLK_BUS_LCD>,
 				 <&ccu CLK_LCD_CH0>;
 			clock-names = "ahb",
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 3/5
#4 lore raw

Re: [PATCH 3/5] ARM: dts: sunxi: Add missing dmas properties to TCON

Quoted 6 lines · Maxime Ripard

The TCON binding mandates a dmas phandle to the DMAengine channel used for that controller. However, since it's not used in the driver, some device trees have been missing it. Let's add it.

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

#5 lore raw

PATCH 4/5 ARM: dts: sun8i: nanopi-duo2: Fix GPIO regulator state array

In reply to Maxime Ripard

Even though it translates to the same thing down to the binary level, we should have an array of 2 number cells to describe each voltage state, which in turns create a validation warning.

Let's fix this.

---
 arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts +1 -2
index c73f59900975..6b149271ef13 100644
@@ -60,8 +60,7 @@
 		enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
 		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
 		gpios-states = <0x1>;
-		states = <1100000 0x0
-			  1300000 0x1>;
+		states = <1100000 0>, <1300000 1>;
 	};
 
 	reg_vcc_dram: vcc-dram {
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 4/5
#6 lore raw

Re: [PATCH 4/5] ARM: dts: sun8i: nanopi-duo2: Fix GPIO regulator state array

Quoted 8 lines · Maxime Ripard

Even though it translates to the same thing down to the binary level, we should have an array of 2 number cells to describe each voltage state, which in turns create a validation warning.

Let's fix this.

But,

Quoted 9 lines
---
 arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts +0 -0
index c73f59900975..6b149271ef13 100644

arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts line 63

Quoted 6 lines
arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts +1 -2
@@ -60,8 +60,7 @@
                enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
                gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
                gpios-states = <0x1>;
-               states = <1100000 0x0
-                         1300000 0x1>;
+               states = <1100000 0>, <1300000 1>;

I would keep the table like layout.

Quoted 6 lines
arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts +0 -1
        };
 
        reg_vcc_dram: vcc-dram {
--

2.23.0

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

#7 lore raw

Re: [PATCH 4/5] ARM: dts: sun8i: nanopi-duo2: Fix GPIO regulator state array

Hi,

Quoted 18 lines · Chen-Yu Tsai
Quoted 8 lines · Maxime Ripard

Even though it translates to the same thing down to the binary level, we should have an array of 2 number cells to describe each voltage state, which in turns create a validation warning.

Let's fix this.

But,

Quoted 4 lines
---
 arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 13 lines

arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts line 63

Quoted 11 lines
arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts +1 -2
index c73f59900975..6b149271ef13 100644
@@ -60,8 +60,7 @@
                enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
                gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
                gpios-states = <0x1>;
-               states = <1100000 0x0
-                         1300000 0x1>;
+               states = <1100000 0>, <1300000 1>;

I would keep the table like layout.

The one on a single line is the one we have on all the other boards with regulator-gpio, so if we want to fix it we should fix all of them.

I've applied the 5 patches for now

Maxime

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

#8 lore raw

PATCH 5/5 ARM: dts: sun9i: Remove useless reset and clock names

In reply to Maxime Ripard

The MMC configuration clock controller in the A80 definition has a clock-names and reset-names property, even though the binding for that controller doesn't declare it.

Remove it.

---
 arch/arm/boot/dts/sun9i-a80.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm/boot/dts/sun9i-a80.dtsi +0 -2
index dd292a670921..3b533e85da43 100644
@@ -530,9 +530,7 @@
 			compatible = "allwinner,sun9i-a80-mmc-config-clk";
 			reg = <0x01c13000 0x10>;
 			clocks = <&ccu CLK_BUS_MMC>;
-			clock-names = "ahb";
 			resets = <&ccu RST_BUS_MMC>;
-			reset-names = "ahb";
 			#clock-cells = <1>;
 			#reset-cells = <1>;
 			clock-output-names = "mmc0_config", "mmc1_config",
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v1 5/5
#9 lore raw

Re: [PATCH 5/5] ARM: dts: sun9i: Remove useless reset and clock names

Quoted 8 lines · Maxime Ripard

The MMC configuration clock controller in the A80 definition has a clock-names and reset-names property, even though the binding for that controller doesn't declare it.

Remove it.

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

maintainer Acked-by on v1 1/5
#10 lore raw
In reply to Maxime Ripard
Quoted 5 lines · Maxime Ripard

While this is functional, it's a best practice to always have the clocks and reset lines in order, in case we ever need to have compatibility code.

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