devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] USB OTG on STM32H743
@ 2018-02-15 16:03 Amelie Delaunay
  2018-02-15 16:03 ` [PATCH 1/3] ARM: dts: stm32: add USB OTG HS support for STM32H743 SoC Amelie Delaunay
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Amelie Delaunay @ 2018-02-15 16:03 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Russell King, Maxime Coquelin,
	Alexandre Torgue
  Cc: devicetree, linux-arm-kernel, linux-kernel, Amelie Delaunay

This patchset adds support for USB OTG HS and FS on stm32h743 SoC.
It also enables USB OTG HS on stm32h743i-eval board in OTG (DRD) mode. It is
possible to use OTG HS in Peripheral or Host mode depending on the USB
connector.

Amelie Delaunay (3):
  ARM: dts: stm32: add USB OTG HS support for STM32H743 SoC
  ARM: dts: stm32: add USB OTG FS support for STM32H743 SoC
  ARM: dts: stm32: enable USB OTG HS on stm32h743i-eval

 arch/arm/boot/dts/stm32h743-pinctrl.dtsi | 20 ++++++++++++++++++++
 arch/arm/boot/dts/stm32h743.dtsi         | 21 +++++++++++++++++++++
 arch/arm/boot/dts/stm32h743i-eval.dts    | 16 ++++++++++++++++
 3 files changed, 57 insertions(+)

-- 
2.7.4

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

* [PATCH 1/3] ARM: dts: stm32: add USB OTG HS support for STM32H743 SoC
  2018-02-15 16:03 [PATCH 0/3] USB OTG on STM32H743 Amelie Delaunay
@ 2018-02-15 16:03 ` Amelie Delaunay
  2018-02-19  8:34   ` Amelie DELAUNAY
  2018-02-15 16:03 ` [PATCH 2/3] ARM: dts: stm32: add USB OTG FS " Amelie Delaunay
  2018-02-15 16:03 ` [PATCH 3/3] ARM: dts: stm32: enable USB OTG HS on stm32h743i-eval Amelie Delaunay
  2 siblings, 1 reply; 5+ messages in thread
From: Amelie Delaunay @ 2018-02-15 16:03 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Russell King, Maxime Coquelin,
	Alexandre Torgue
  Cc: devicetree, linux-arm-kernel, linux-kernel, Amelie Delaunay

This patch adds support for USB OTG HS on STM32H743 SoC.
USB OTG HS controller is the same than the one used on STM32F7 SoCs.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
---
 arch/arm/boot/dts/stm32h743.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/stm32h743.dtsi b/arch/arm/boot/dts/stm32h743.dtsi
index 38d7cb8..65d4509 100644
--- a/arch/arm/boot/dts/stm32h743.dtsi
+++ b/arch/arm/boot/dts/stm32h743.dtsi
@@ -217,6 +217,18 @@
 			};
 		};
 
+		usbotg_hs: usb@40040000 {
+			compatible = "st,stm32f7xx-hsotg";
+			reg = <0x40040000 0x40000>;
+			interrupts = <77>;
+			clocks = <&rcc USB1OTG_CK>;
+			clock-names = "otg";
+			g-rx-fifo-size = <256>;
+			g-np-tx-fifo-size = <32>;
+			g-tx-fifo-size = <128 128 64 64 64 64 32 32>;
+			status = "disabled";
+		};
+
 		mdma1: dma@52000000 {
 			compatible = "st,stm32h7-mdma";
 			reg = <0x52000000 0x1000>;
-- 
2.7.4

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

* [PATCH 2/3] ARM: dts: stm32: add USB OTG FS support for STM32H743 SoC
  2018-02-15 16:03 [PATCH 0/3] USB OTG on STM32H743 Amelie Delaunay
  2018-02-15 16:03 ` [PATCH 1/3] ARM: dts: stm32: add USB OTG HS support for STM32H743 SoC Amelie Delaunay
@ 2018-02-15 16:03 ` Amelie Delaunay
  2018-02-15 16:03 ` [PATCH 3/3] ARM: dts: stm32: enable USB OTG HS on stm32h743i-eval Amelie Delaunay
  2 siblings, 0 replies; 5+ messages in thread
From: Amelie Delaunay @ 2018-02-15 16:03 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Russell King, Maxime Coquelin,
	Alexandre Torgue
  Cc: devicetree, linux-arm-kernel, linux-kernel, Amelie Delaunay

This patch adds support for USB OTG FS on STM32H743 SoC.
USB OTG FS controller is the same than the one used on STM32F4 SoCs.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
---
 arch/arm/boot/dts/stm32h743.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/stm32h743.dtsi b/arch/arm/boot/dts/stm32h743.dtsi
index 65d4509..eb4ba90 100644
--- a/arch/arm/boot/dts/stm32h743.dtsi
+++ b/arch/arm/boot/dts/stm32h743.dtsi
@@ -229,6 +229,15 @@
 			status = "disabled";
 		};
 
+		usbotg_fs: usb@40080000 {
+			compatible = "st,stm32f4x9-fsotg";
+			reg = <0x40080000 0x40000>;
+			interrupts = <101>;
+			clocks = <&rcc USB2OTG_CK>;
+			clock-names = "otg";
+			status = "disabled";
+		};
+
 		mdma1: dma@52000000 {
 			compatible = "st,stm32h7-mdma";
 			reg = <0x52000000 0x1000>;
-- 
2.7.4

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

* [PATCH 3/3] ARM: dts: stm32: enable USB OTG HS on stm32h743i-eval
  2018-02-15 16:03 [PATCH 0/3] USB OTG on STM32H743 Amelie Delaunay
  2018-02-15 16:03 ` [PATCH 1/3] ARM: dts: stm32: add USB OTG HS support for STM32H743 SoC Amelie Delaunay
  2018-02-15 16:03 ` [PATCH 2/3] ARM: dts: stm32: add USB OTG FS " Amelie Delaunay
@ 2018-02-15 16:03 ` Amelie Delaunay
  2 siblings, 0 replies; 5+ messages in thread
From: Amelie Delaunay @ 2018-02-15 16:03 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Russell King, Maxime Coquelin,
	Alexandre Torgue
  Cc: devicetree, linux-arm-kernel, linux-kernel, Amelie Delaunay

This patch enables USB HS on stm32h743i-eval in OTG (DRD) mode.
The USB connector used will determine the role of USB OTG controller.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
---
 arch/arm/boot/dts/stm32h743-pinctrl.dtsi | 20 ++++++++++++++++++++
 arch/arm/boot/dts/stm32h743i-eval.dts    | 16 ++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/arch/arm/boot/dts/stm32h743-pinctrl.dtsi b/arch/arm/boot/dts/stm32h743-pinctrl.dtsi
index ee5202d..0f15dfb 100644
--- a/arch/arm/boot/dts/stm32h743-pinctrl.dtsi
+++ b/arch/arm/boot/dts/stm32h743-pinctrl.dtsi
@@ -188,6 +188,26 @@
 					bias-disable;
 				};
 			};
+
+			usbotg_hs_pins_a: usbotg-hs@0 {
+				pins {
+					pinmux = <STM32_PINMUX('H', 4, AF10)>,	/* ULPI_NXT */
+							 <STM32_PINMUX('I', 11, AF10)>, /* ULPI_DIR> */
+							 <STM32_PINMUX('C', 0, AF10)>,	/* ULPI_STP> */
+							 <STM32_PINMUX('A', 5, AF10)>,	/* ULPI_CK> */
+							 <STM32_PINMUX('A', 3, AF10)>,	/* ULPI_D0> */
+							 <STM32_PINMUX('B', 0, AF10)>,	/* ULPI_D1> */
+							 <STM32_PINMUX('B', 1, AF10)>,	/* ULPI_D2> */
+							 <STM32_PINMUX('B', 10, AF10)>, /* ULPI_D3> */
+							 <STM32_PINMUX('B', 11, AF10)>, /* ULPI_D4> */
+							 <STM32_PINMUX('B', 12, AF10)>, /* ULPI_D5> */
+							 <STM32_PINMUX('B', 13, AF10)>, /* ULPI_D6> */
+							 <STM32_PINMUX('B', 5, AF10)>;	/* ULPI_D7> */
+					bias-disable;
+					drive-push-pull;
+					slew-rate = <2>;
+				};
+			};
 		};
 	};
 };
diff --git a/arch/arm/boot/dts/stm32h743i-eval.dts b/arch/arm/boot/dts/stm32h743i-eval.dts
index 9f0e72c..1c615f6 100644
--- a/arch/arm/boot/dts/stm32h743i-eval.dts
+++ b/arch/arm/boot/dts/stm32h743i-eval.dts
@@ -68,6 +68,14 @@
 		regulator-max-microvolt = <3300000>;
 		regulator-always-on;
 	};
+
+	usbotg_hs_phy: usb-phy {
+		#phy-cells = <0>;
+		compatible = "usb-nop-xceiv";
+		clocks = <&rcc USB1ULPI_CK>;
+		clock-names = "main_clk";
+	};
+
 };
 
 &adc_12 {
@@ -90,3 +98,11 @@
 	status = "okay";
 };
 
+&usbotg_hs {
+	pinctrl-0 = <&usbotg_hs_pins_a>;
+	pinctrl-names = "default";
+	phys = <&usbotg_hs_phy>;
+	phy-names = "usb2-phy";
+	dr_mode = "otg";
+	status = "okay";
+};
-- 
2.7.4

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

* Re: [PATCH 1/3] ARM: dts: stm32: add USB OTG HS support for STM32H743 SoC
  2018-02-15 16:03 ` [PATCH 1/3] ARM: dts: stm32: add USB OTG HS support for STM32H743 SoC Amelie Delaunay
@ 2018-02-19  8:34   ` Amelie DELAUNAY
  0 siblings, 0 replies; 5+ messages in thread
From: Amelie DELAUNAY @ 2018-02-19  8:34 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Russell King, Maxime Coquelin,
	Alexandre TORGUE
  Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org



On 02/15/2018 05:03 PM, Amelie Delaunay wrote:
> This patch adds support for USB OTG HS on STM32H743 SoC.
> USB OTG HS controller is the same than the one used on STM32F7 SoCs.
> 
> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
> ---
>   arch/arm/boot/dts/stm32h743.dtsi | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/stm32h743.dtsi b/arch/arm/boot/dts/stm32h743.dtsi
> index 38d7cb8..65d4509 100644
> --- a/arch/arm/boot/dts/stm32h743.dtsi
> +++ b/arch/arm/boot/dts/stm32h743.dtsi
> @@ -217,6 +217,18 @@
>   			};
>   		};
>   
> +		usbotg_hs: usb@40040000 {
> +			compatible = "st,stm32f7xx-hsotg";
Need to change the compatible and use the updated one [1]. I send a v2.

[1] https://patchwork.kernel.org/patch/10222153/
> +			reg = <0x40040000 0x40000>;
> +			interrupts = <77>;
> +			clocks = <&rcc USB1OTG_CK>;
> +			clock-names = "otg";
> +			g-rx-fifo-size = <256>;
> +			g-np-tx-fifo-size = <32>;
> +			g-tx-fifo-size = <128 128 64 64 64 64 32 32>;
> +			status = "disabled";
> +		};
> +
>   		mdma1: dma@52000000 {
>   			compatible = "st,stm32h7-mdma";
>   			reg = <0x52000000 0x1000>;
> 

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

end of thread, other threads:[~2018-02-19  8:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-15 16:03 [PATCH 0/3] USB OTG on STM32H743 Amelie Delaunay
2018-02-15 16:03 ` [PATCH 1/3] ARM: dts: stm32: add USB OTG HS support for STM32H743 SoC Amelie Delaunay
2018-02-19  8:34   ` Amelie DELAUNAY
2018-02-15 16:03 ` [PATCH 2/3] ARM: dts: stm32: add USB OTG FS " Amelie Delaunay
2018-02-15 16:03 ` [PATCH 3/3] ARM: dts: stm32: enable USB OTG HS on stm32h743i-eval Amelie Delaunay

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