linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: sun8i: Move A23/A33 usbphy and usb_otg nodes to common dtsi
@ 2016-09-08  3:25 Chen-Yu Tsai
  2016-09-08 20:23 ` Maxime Ripard
  0 siblings, 1 reply; 3+ messages in thread
From: Chen-Yu Tsai @ 2016-09-08  3:25 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

The usbphy and usb_otg nodes in the A23 and A33 dts files only differ
by compatible, and for the usbphy, the size of one of its register
regions.

Move all the common bits to the A23/A33 common dtsi file.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

Hi Maxime,

This patch applies on top of your A23/A33 CCU patches.

---
 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 30 +++++++++++++++++++++++++
 arch/arm/boot/dts/sun8i-a23.dtsi     | 43 +++++++++---------------------------
 arch/arm/boot/dts/sun8i-a33.dtsi     | 41 +++++++++-------------------------
 3 files changed, 50 insertions(+), 64 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
index 9cb474bf7911..2d1ad55daf2d 100644
--- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
@@ -201,6 +201,36 @@
 			#size-cells = <0>;
 		};
 
+		usb_otg: usb@01c19000 {
+			/* compatible gets set in SoC specific dtsi file */
+			reg = <0x01c19000 0x0400>;
+			clocks = <&ccu CLK_BUS_OTG>;
+			resets = <&ccu RST_BUS_OTG>;
+			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			extcon = <&usbphy 0>;
+			status = "disabled";
+		};
+
+		usbphy: phy@01c19400 {
+			/*
+			 * compatible and address regions get set in
+			 * SoC specific dtsi file
+			 */
+			clocks = <&ccu CLK_USB_PHY0>,
+				 <&ccu CLK_USB_PHY1>;
+			clock-names = "usb0_phy",
+				      "usb1_phy";
+			resets = <&ccu RST_USB_PHY0>,
+				 <&ccu RST_USB_PHY1>;
+			reset-names = "usb0_reset",
+				      "usb1_reset";
+			status = "disabled";
+			#phy-cells = <1>;
+		};
+
 		ehci0: usb@01c1a000 {
 			compatible = "allwinner,sun8i-a23-ehci", "generic-ehci";
 			reg = <0x01c1a000 0x100>;
diff --git a/arch/arm/boot/dts/sun8i-a23.dtsi b/arch/arm/boot/dts/sun8i-a23.dtsi
index a915feb3a494..54d045dab825 100644
--- a/arch/arm/boot/dts/sun8i-a23.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23.dtsi
@@ -48,39 +48,6 @@
 	memory {
 		reg = <0x40000000 0x40000000>;
 	};
-
-	soc@01c00000 {
-		usb_otg: usb@01c19000 {
-			compatible = "allwinner,sun6i-a31-musb";
-			reg = <0x01c19000 0x0400>;
-			clocks = <&ccu CLK_BUS_OTG>;
-			resets = <&ccu RST_BUS_OTG>;
-			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
-			interrupt-names = "mc";
-			phys = <&usbphy 0>;
-			phy-names = "usb";
-			extcon = <&usbphy 0>;
-			status = "disabled";
-		};
-
-		usbphy: phy@01c19400 {
-			compatible = "allwinner,sun8i-a23-usb-phy";
-			reg = <0x01c19400 0x10>,
-			      <0x01c1a800 0x4>;
-			reg-names = "phy_ctrl",
-				    "pmu1";
-			clocks = <&ccu CLK_USB_PHY0>,
-				 <&ccu CLK_USB_PHY1>;
-			clock-names = "usb0_phy",
-				      "usb1_phy";
-			resets = <&ccu RST_USB_PHY0>,
-				 <&ccu RST_USB_PHY1>;
-			reset-names = "usb0_reset",
-				      "usb1_reset";
-			status = "disabled";
-			#phy-cells = <1>;
-		};
-	};
 };
 
 &ccu {
@@ -93,3 +60,13 @@
 		     <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
 		     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
 };
+
+&usb_otg {
+	compatible = "allwinner,sun6i-a31-musb";
+};
+
+&usbphy {
+	compatible = "allwinner,sun8i-a23-usb-phy";
+	reg = <0x01c19400 0x10>, <0x01c1a800 0x4>;
+	reg-names = "phy_ctrl", "pmu1";
+};
diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index f3d91d2c96ef..bc939c0e317d 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -73,37 +73,6 @@
 			resets = <&ccu RST_BUS_SS>;
 			reset-names = "ahb";
 		};
-
-		usb_otg: usb@01c19000 {
-			compatible = "allwinner,sun8i-a33-musb";
-			reg = <0x01c19000 0x0400>;
-			clocks = <&ccu CLK_BUS_OTG>;
-			resets = <&ccu RST_BUS_OTG>;
-			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
-			interrupt-names = "mc";
-			phys = <&usbphy 0>;
-			phy-names = "usb";
-			extcon = <&usbphy 0>;
-			status = "disabled";
-		};
-
-		usbphy: phy@01c19400 {
-			compatible = "allwinner,sun8i-a33-usb-phy";
-			reg = <0x01c19400 0x14>,
-			      <0x01c1a800 0x4>;
-			reg-names = "phy_ctrl",
-				    "pmu1";
-			clocks = <&ccu CLK_USB_PHY0>,
-				 <&ccu CLK_USB_PHY1>;
-			clock-names = "usb0_phy",
-				      "usb1_phy";
-			resets = <&ccu RST_USB_PHY0>,
-				 <&ccu RST_USB_PHY1>;
-			reset-names = "usb0_reset",
-				      "usb1_reset";
-			status = "disabled";
-			#phy-cells = <1>;
-		};
 	};
 };
 
@@ -124,3 +93,13 @@
 	};
 
 };
+
+&usb_otg {
+	compatible = "allwinner,sun8i-a33-musb";
+};
+
+&usbphy {
+	compatible = "allwinner,sun8i-a33-usb-phy";
+	reg = <0x01c19400 0x14>, <0x01c1a800 0x4>;
+	reg-names = "phy_ctrl", "pmu1";
+};
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: Move A23/A33 usbphy and usb_otg nodes to common dtsi
  2016-09-08  3:25 [PATCH] ARM: dts: sun8i: Move A23/A33 usbphy and usb_otg nodes to common dtsi Chen-Yu Tsai
@ 2016-09-08 20:23 ` Maxime Ripard
  2016-09-09  3:45   ` Chen-Yu Tsai
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Ripard @ 2016-09-08 20:23 UTC (permalink / raw)
  To: Chen-Yu Tsai; +Cc: devicetree, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

Hi,

On Thu, Sep 08, 2016 at 11:25:35AM +0800, Chen-Yu Tsai wrote:
> The usbphy and usb_otg nodes in the A23 and A33 dts files only differ
> by compatible, and for the usbphy, the size of one of its register
> regions.
> 
> Move all the common bits to the A23/A33 common dtsi file.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> 
> Hi Maxime,
> 
> This patch applies on top of your A23/A33 CCU patches.

It was not applying properly. I think I did the proper fixup, but
you'll probably want to double check.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: Move A23/A33 usbphy and usb_otg nodes to common dtsi
  2016-09-08 20:23 ` Maxime Ripard
@ 2016-09-09  3:45   ` Chen-Yu Tsai
  0 siblings, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2016-09-09  3:45 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

On Fri, Sep 9, 2016 at 4:23 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Thu, Sep 08, 2016 at 11:25:35AM +0800, Chen-Yu Tsai wrote:
>> The usbphy and usb_otg nodes in the A23 and A33 dts files only differ
>> by compatible, and for the usbphy, the size of one of its register
>> regions.
>>
>> Move all the common bits to the A23/A33 common dtsi file.
>>
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> ---
>>
>> Hi Maxime,
>>
>> This patch applies on top of your A23/A33 CCU patches.
>
> It was not applying properly. I think I did the proper fixup, but
> you'll probably want to double check.

Looks correct. Thanks for the fixup.

ChenYu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-09  3:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08  3:25 [PATCH] ARM: dts: sun8i: Move A23/A33 usbphy and usb_otg nodes to common dtsi Chen-Yu Tsai
2016-09-08 20:23 ` Maxime Ripard
2016-09-09  3:45   ` Chen-Yu Tsai

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).