public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sergiu Moga <sergiu.moga@microchip.com>
To: <eugen.hristev@microchip.com>, <durai.manickamkr@microchip.com>,
	<sandeep.sheriker@microchip.com>, <greg@embeddedgreg.com>,
	<nicolas.ferre@microchip.com>, <ludovic.desroches@microchip.com>,
	<lukma@denx.de>, <seanga2@gmail.com>, <marex@denx.de>,
	<sergiu.moga@microchip.com>, <michael@walle.cc>, <hs@denx.de>,
	<claudiu.beznea@microchip.com>,
	<balamanikandan.gunasundar@microchip.com>,
	<michael@amarulasolutions.com>,
	<dario.binacchi@amarulasolutions.com>,
	<cristian.birsan@microchip.com>, <peng.fan@nxp.com>,
	<mihai.sain@microchip.com>, <weijie.gao@mediatek.com>,
	<sumit.garg@linaro.org>, <jim.t90615@gmail.com>,
	<michal.simek@amd.com>, <sjg@chromium.org>, <j-keerthy@ti.com>,
	<ashok.reddy.soma@xilinx.com>
Cc: <u-boot@lists.denx.de>
Subject: [PATCH v4 09/19] ARM: dts: at91: sama7: Add USB related DT nodes
Date: Mon, 19 Dec 2022 10:46:17 +0200	[thread overview]
Message-ID: <20221219084626.34606-10-sergiu.moga@microchip.com> (raw)
In-Reply-To: <20221219084626.34606-1-sergiu.moga@microchip.com>

Add the USB related DT nodes for the sama7g5ek board.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---



v1 -> v4:
- No change



 arch/arm/dts/at91-sama7g5ek.dts | 34 +++++++++++++++
 arch/arm/dts/sama7g5.dtsi       | 73 +++++++++++++++++++++++++++++++++
 2 files changed, 107 insertions(+)

diff --git a/arch/arm/dts/at91-sama7g5ek.dts b/arch/arm/dts/at91-sama7g5ek.dts
index 9b247fcaf6..31adc4d3e7 100644
--- a/arch/arm/dts/at91-sama7g5ek.dts
+++ b/arch/arm/dts/at91-sama7g5ek.dts
@@ -761,6 +761,11 @@
 		pinmux = <PIN_PB1__SPDIF_TX>;
 		bias-disable;
 	};
+
+	pinctrl_usb_default: usb_default {
+		pinmux = <PIN_PC6__GPIO>;
+		bias-disable;
+	};
 };
 
 &pwm {
@@ -837,6 +842,35 @@
 	status = "okay";
 };
 
+&usb2 {
+	num-ports = <3>;
+	atmel,vbus-gpio = <0
+			   0
+			   &pioA PIN_PC6 GPIO_ACTIVE_HIGH
+			  >;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb_default>;
+	phys = <&usb_phy2>;
+	phy-names = "usb";
+	status = "okay";
+};
+
+&usb3 {
+	status = "okay";
+};
+
+&usb_phy0 {
+	status = "okay";
+};
+
+&usb_phy1 {
+	status = "okay";
+};
+
+&usb_phy2 {
+	status = "okay";
+};
+
 &vddout25 {
 	vin-supply = <&vdd_3v3>;
 	status = "okay";
diff --git a/arch/arm/dts/sama7g5.dtsi b/arch/arm/dts/sama7g5.dtsi
index 6388a60e53..a6521aaa82 100644
--- a/arch/arm/dts/sama7g5.dtsi
+++ b/arch/arm/dts/sama7g5.dtsi
@@ -16,6 +16,8 @@
 #include <dt-bindings/dma/at91.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/mfd/at91-usart.h>
+#include <dt-bindings/reset/sama7g5-reset.h>
+#include <dt-bindings/clock/at91.h>
 
 / {
 	model = "Microchip SAMA7G5 family SoC";
@@ -103,6 +105,54 @@
 		};
 	};
 
+	utmi_clk: utmi-clk {
+		compatible = "microchip,sama7g5-utmi-clk";
+		sfr-phandle = <&sfr>;
+		#clock-cells = <1>;
+		clocks = <&pmc PMC_TYPE_CORE 27>;
+		clock-names = "utmi_clk";
+		resets = <&reset_controller SAMA7G5_RESET_USB_PHY1>,
+			 <&reset_controller SAMA7G5_RESET_USB_PHY2>,
+			 <&reset_controller SAMA7G5_RESET_USB_PHY3>;
+		reset-names = "usb0_reset", "usb1_reset", "usb2_reset";
+	};
+
+	utmi {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		usb_phy0: phy@0 {
+			compatible = "microchip,sama7g5-usb-phy";
+			sfr-phandle = <&sfr>;
+			reg = <0>;
+			clocks = <&utmi_clk UTMI1>;
+			clock-names = "utmi_clk";
+			status = "disabled";
+			#phy-cells = <0>;
+		};
+
+		usb_phy1: phy@1 {
+			compatible = "microchip,sama7g5-usb-phy";
+			sfr-phandle = <&sfr>;
+			reg = <1>;
+			clocks = <&utmi_clk UTMI2>;
+			clock-names = "utmi_clk";
+			status = "disabled";
+			#phy-cells = <0>;
+		};
+
+		usb_phy2: phy@2 {
+			compatible = "microchip,sama7g5-usb-phy";
+			sfr-phandle = <&sfr>;
+			reg = <2>;
+			clocks = <&utmi_clk UTMI3>;
+			clock-names = "utmi_clk";
+			status = "disabled";
+			#phy-cells = <0>;
+		};
+	};
+
 	vddout25: fixed-regulator-vddout25 {
 		compatible = "regulator-fixed";
 
@@ -127,6 +177,24 @@
 		#size-cells = <1>;
 		ranges;
 
+		usb2: ohci@400000 {
+			compatible = "microchip,sama7g5-ohci", "usb-ohci";
+			reg = <0x00400000 0x100000>;
+			interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&pmc PMC_TYPE_PERIPHERAL 106>, <&utmi_clk UTMI1>, <&usb_clk>;
+			clock-names = "ohci_clk", "hclk", "uhpck";
+			status = "disabled";
+		};
+
+		usb3: ehci@500000 {
+			compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
+			reg = <0x00500000 0x100000>;
+			interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&usb_clk>, <&pmc PMC_TYPE_PERIPHERAL 106>;
+			clock-names = "usb_clk", "ehci_clk";
+			status = "disabled";
+		};
+
 		nfc_sram: sram@600000 {
 			compatible = "mmio-sram";
 			no-memory-wc;
@@ -559,6 +627,11 @@
 			status = "disabled";
 		};
 
+		sfr: sfr@e1624000 {
+			compatible = "microchip,sama7g5-sfr", "syscon";
+			reg = <0xe1624000 0x4000>;
+		};
+
 		eic: interrupt-controller@e1628000 {
 			compatible = "microchip,sama7g5-eic";
 			reg = <0xe1628000 0xec>;
-- 
2.34.1


  parent reply	other threads:[~2022-12-19  8:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19  8:46 [PATCH v4 00/19] Add USB on SAM9X60, SAMA7G5 and SAMA5D2 boards Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 01/19] ARM: dts: sam9x60: Add OHCI and EHCI DT nodes Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 02/19] clk: at91: Add support for sam9x60 USB clock Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 03/19] clk: at91: sam9x60: Register the required clocks for USB Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 04/19] clk: at91: pmc: export clock setup to pmc Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 05/19] clk: at91: sam9x60: Add initial setup of UPLL and USBCK rates Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 06/19] usb: ohci-at91: Enable OHCI functionality and register into DM Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 07/19] dt-bindings: reset: add sama7g5 definitions Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 08/19] dt-bindings: clk: at91: Define additional UTMI related clocks Sergiu Moga
2022-12-19  8:46 ` Sergiu Moga [this message]
2022-12-19  8:46 ` [PATCH v4 10/19] ARM: at91: add sama7 SFR definitions Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 11/19] reset: at91: Add reset driver for basic assert/deassert operations Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 12/19] phy: at91: Add support for the USB 2.0 PHY's of SAMA7 Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 13/19] usb: ohci-at91: Add USB PHY functionality Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 14/19] ARM: dts: at91: sama5d2_icp: Add pinctrl nodes for USB related DT nodes Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 15/19] ARM: dts: at91: sama5d27_wlsom1_ek: Add pinctrl nodes for USB " Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 16/19] configs: at91: sam9x60ek: Add required configs for the USB command Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 17/19] configs: at91: sama5d2: Enable OHCI/EHCI related configs Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 18/19] configs: at91: sama7: Enable USB and RESET functionality Sergiu Moga
2022-12-19  8:46 ` [PATCH v4 19/19] usb: ohci-at91: Add `ohci_t` field in `ohci_at91_priv` Sergiu Moga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221219084626.34606-10-sergiu.moga@microchip.com \
    --to=sergiu.moga@microchip.com \
    --cc=ashok.reddy.soma@xilinx.com \
    --cc=balamanikandan.gunasundar@microchip.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=cristian.birsan@microchip.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=durai.manickamkr@microchip.com \
    --cc=eugen.hristev@microchip.com \
    --cc=greg@embeddedgreg.com \
    --cc=hs@denx.de \
    --cc=j-keerthy@ti.com \
    --cc=jim.t90615@gmail.com \
    --cc=ludovic.desroches@microchip.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=michael@amarulasolutions.com \
    --cc=michael@walle.cc \
    --cc=michal.simek@amd.com \
    --cc=mihai.sain@microchip.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=peng.fan@nxp.com \
    --cc=sandeep.sheriker@microchip.com \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=sumit.garg@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=weijie.gao@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox