Linux-mediatek Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] arm64: dts: mediatek: mt8516: rename usb phy
@ 2020-10-14 16:24 Fabien Parent
  2020-10-14 16:24 ` [PATCH 2/2] arm64: dts: mediatek: mt8516: add usb1 node Fabien Parent
  2020-10-19 10:26 ` [PATCH 1/2] arm64: dts: mediatek: mt8516: rename usb phy Matthias Brugger
  0 siblings, 2 replies; 4+ messages in thread
From: Fabien Parent @ 2020-10-14 16:24 UTC (permalink / raw)
  To: linux-kernel, linux-mediatek, linux-arm-kernel, devicetree
  Cc: matthias.bgg, Fabien Parent, robh+dt

The USB phy node is named usb0_phy but there is only one phy with
2 ports on MT8516. Rename the phy to make it more obvious it can
also support the usb1 node.
The usb1 node will be added in a follow-up commit.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 arch/arm64/boot/dts/mediatek/mt8516.dtsi         | 2 +-
 arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8516.dtsi b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
index 943c426e9aaf..50049b6c1ba7 100644
--- a/arch/arm64/boot/dts/mediatek/mt8516.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
@@ -455,7 +455,7 @@ usb0: usb@11100000 {
 			status = "disabled";
 		};
 
-		usb0_phy: usb@11110000 {
+		usb_phy: usb@11110000 {
 			compatible = "mediatek,generic-tphy-v1";
 			reg = <0 0x11110000 0 0x800>;
 			#address-cells = <2>;
diff --git a/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi b/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
index dfceffe6950a..8bad8faf35d2 100644
--- a/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
+++ b/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
@@ -195,7 +195,7 @@ usb_con: connector {
 	};
 };
 
-&usb0_phy {
+&usb_phy {
 	status = "okay";
 };
 
-- 
2.28.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 2/2] arm64: dts: mediatek: mt8516: add usb1 node
  2020-10-14 16:24 [PATCH 1/2] arm64: dts: mediatek: mt8516: rename usb phy Fabien Parent
@ 2020-10-14 16:24 ` Fabien Parent
  2020-10-19 10:26   ` Matthias Brugger
  2020-10-19 10:26 ` [PATCH 1/2] arm64: dts: mediatek: mt8516: rename usb phy Matthias Brugger
  1 sibling, 1 reply; 4+ messages in thread
From: Fabien Parent @ 2020-10-14 16:24 UTC (permalink / raw)
  To: linux-kernel, linux-mediatek, linux-arm-kernel, devicetree
  Cc: matthias.bgg, Fabien Parent, robh+dt

The MT8516 has 2 USB instances. Add support for the second USB instance.
usb1 can only work in host mode.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 arch/arm64/boot/dts/mediatek/mt8516.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8516.dtsi b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
index 50049b6c1ba7..eca7969e15ab 100644
--- a/arch/arm64/boot/dts/mediatek/mt8516.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
@@ -455,6 +455,20 @@ usb0: usb@11100000 {
 			status = "disabled";
 		};
 
+		usb1: usb@11190000 {
+			compatible = "mediatek,mtk-musb";
+			reg = <0 0x11190000 0 0x1000>;
+			interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-names = "mc";
+			phys = <&usb1_port PHY_TYPE_USB2>;
+			clocks = <&topckgen CLK_TOP_USB>,
+				 <&topckgen CLK_TOP_USBIF>,
+				 <&topckgen CLK_TOP_USB_1P>;
+			clock-names = "main","mcu","univpll";
+			dr_mode = "host";
+			status = "disabled";
+		};
+
 		usb_phy: usb@11110000 {
 			compatible = "mediatek,generic-tphy-v1";
 			reg = <0 0x11110000 0 0x800>;
@@ -469,6 +483,13 @@ usb0_port: usb-phy@11110800 {
 				clock-names = "ref";
 				#phy-cells = <1>;
 			};
+
+			usb1_port: usb-phy@11110900 {
+				reg = <0 0x11110900 0 0x100>;
+				clocks = <&topckgen CLK_TOP_USB_PHY48M>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+			};
 		};
 
 		auxadc: adc@11003000 {
-- 
2.28.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 1/2] arm64: dts: mediatek: mt8516: rename usb phy
  2020-10-14 16:24 [PATCH 1/2] arm64: dts: mediatek: mt8516: rename usb phy Fabien Parent
  2020-10-14 16:24 ` [PATCH 2/2] arm64: dts: mediatek: mt8516: add usb1 node Fabien Parent
@ 2020-10-19 10:26 ` Matthias Brugger
  1 sibling, 0 replies; 4+ messages in thread
From: Matthias Brugger @ 2020-10-19 10:26 UTC (permalink / raw)
  To: Fabien Parent, linux-kernel, linux-mediatek, linux-arm-kernel,
	devicetree
  Cc: robh+dt



On 14/10/2020 18:24, Fabien Parent wrote:
> The USB phy node is named usb0_phy but there is only one phy with
> 2 ports on MT8516. Rename the phy to make it more obvious it can
> also support the usb1 node.
> The usb1 node will be added in a follow-up commit.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Applied to v5.10-tmp/dts64

Thanks!

> ---
>   arch/arm64/boot/dts/mediatek/mt8516.dtsi         | 2 +-
>   arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8516.dtsi b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
> index 943c426e9aaf..50049b6c1ba7 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8516.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
> @@ -455,7 +455,7 @@ usb0: usb@11100000 {
>   			status = "disabled";
>   		};
>   
> -		usb0_phy: usb@11110000 {
> +		usb_phy: usb@11110000 {
>   			compatible = "mediatek,generic-tphy-v1";
>   			reg = <0 0x11110000 0 0x800>;
>   			#address-cells = <2>;
> diff --git a/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi b/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
> index dfceffe6950a..8bad8faf35d2 100644
> --- a/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
> @@ -195,7 +195,7 @@ usb_con: connector {
>   	};
>   };
>   
> -&usb0_phy {
> +&usb_phy {
>   	status = "okay";
>   };
>   
> 

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 2/2] arm64: dts: mediatek: mt8516: add usb1 node
  2020-10-14 16:24 ` [PATCH 2/2] arm64: dts: mediatek: mt8516: add usb1 node Fabien Parent
@ 2020-10-19 10:26   ` Matthias Brugger
  0 siblings, 0 replies; 4+ messages in thread
From: Matthias Brugger @ 2020-10-19 10:26 UTC (permalink / raw)
  To: Fabien Parent, linux-kernel, linux-mediatek, linux-arm-kernel,
	devicetree
  Cc: robh+dt



On 14/10/2020 18:24, Fabien Parent wrote:
> The MT8516 has 2 USB instances. Add support for the second USB instance.
> usb1 can only work in host mode.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Applied to v5.10-tmp/dts64

Thanks!

> ---
>   arch/arm64/boot/dts/mediatek/mt8516.dtsi | 21 +++++++++++++++++++++
>   1 file changed, 21 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8516.dtsi b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
> index 50049b6c1ba7..eca7969e15ab 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8516.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
> @@ -455,6 +455,20 @@ usb0: usb@11100000 {
>   			status = "disabled";
>   		};
>   
> +		usb1: usb@11190000 {
> +			compatible = "mediatek,mtk-musb";
> +			reg = <0 0x11190000 0 0x1000>;
> +			interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_LOW>;
> +			interrupt-names = "mc";
> +			phys = <&usb1_port PHY_TYPE_USB2>;
> +			clocks = <&topckgen CLK_TOP_USB>,
> +				 <&topckgen CLK_TOP_USBIF>,
> +				 <&topckgen CLK_TOP_USB_1P>;
> +			clock-names = "main","mcu","univpll";
> +			dr_mode = "host";
> +			status = "disabled";
> +		};
> +
>   		usb_phy: usb@11110000 {
>   			compatible = "mediatek,generic-tphy-v1";
>   			reg = <0 0x11110000 0 0x800>;
> @@ -469,6 +483,13 @@ usb0_port: usb-phy@11110800 {
>   				clock-names = "ref";
>   				#phy-cells = <1>;
>   			};
> +
> +			usb1_port: usb-phy@11110900 {
> +				reg = <0 0x11110900 0 0x100>;
> +				clocks = <&topckgen CLK_TOP_USB_PHY48M>;
> +				clock-names = "ref";
> +				#phy-cells = <1>;
> +			};
>   		};
>   
>   		auxadc: adc@11003000 {
> 

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 16:24 [PATCH 1/2] arm64: dts: mediatek: mt8516: rename usb phy Fabien Parent
2020-10-14 16:24 ` [PATCH 2/2] arm64: dts: mediatek: mt8516: add usb1 node Fabien Parent
2020-10-19 10:26   ` Matthias Brugger
2020-10-19 10:26 ` [PATCH 1/2] arm64: dts: mediatek: mt8516: rename usb phy Matthias Brugger

Linux-mediatek Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mediatek/0 linux-mediatek/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mediatek linux-mediatek/ https://lore.kernel.org/linux-mediatek \
		linux-mediatek@lists.infradead.org
	public-inbox-index linux-mediatek

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mediatek


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git