public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Dmitry Rokosov <ddrokosov@sberdevices.ru>
To: <neil.armstrong@linaro.org>, <jbrunet@baylibre.com>,
	<mturquette@baylibre.com>, <sboyd@kernel.org>,
	<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<khilman@baylibre.com>, <martin.blumenstingl@googlemail.com>,
	<conor+dt@kernel.org>
Cc: <kernel@sberdevices.ru>, <sdfw_system_team@sberdevices.ru>,
	<rockosov@gmail.com>, <linux-amlogic@lists.infradead.org>,
	<linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	Dmitry Rokosov <ddrokosov@sberdevices.ru>,
	Yue Wang <yue.wang@amlogic.com>,
	Hanjie Lin <hanjie.lin@amlogic.com>
Subject: [PATCH v2 06/15] arm64: dts: meson: a1: support USB controller in OTG mode
Date: Thu, 24 Aug 2023 00:36:21 +0300	[thread overview]
Message-ID: <20230823213630.12936-7-ddrokosov@sberdevices.ru> (raw)
In-Reply-To: <20230823213630.12936-1-ddrokosov@sberdevices.ru>

Amlogic A1 SoC family has USB2.0 controller based on dwc2 and dwc3
heads. It supports otg/host/peripheral modes.

Signed-off-by: Yue Wang <yue.wang@amlogic.com>
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 59 +++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
index a8a39eeb2581..04df5a5b563e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
@@ -8,6 +8,8 @@
 #include <dt-bindings/gpio/meson-a1-gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/power/meson-a1-power.h>
+#include <dt-bindings/reset/amlogic,meson-a1-reset.h>
 
 / {
 	compatible = "amlogic,a1";
@@ -152,6 +154,17 @@ uart_AO_B: serial@2000 {
 				status = "disabled";
 			};
 
+			usb2_phy1: phy@4000 {
+				compatible = "amlogic,a1-usb2-phy";
+				clocks = <&clkc_periphs CLKID_USB_PHY_IN>;
+				clock-names = "xtal";
+				reg = <0x0 0x4000 0x0 0x60>;
+				resets = <&reset RESET_USBPHY>;
+				reset-names = "phy";
+				#phy-cells = <0>;
+				power-domains = <&pwrc PWRC_USB_ID>;
+			};
+
 			clkc_pll: pll-clock-controller@7c80 {
 				compatible = "amlogic,a1-pll-clkc";
 				reg = <0 0x7c80 0 0x18c>;
@@ -162,6 +175,52 @@ clkc_pll: pll-clock-controller@7c80 {
 			};
 		};
 
+		usb: usb@fe004400 {
+			status = "disabled";
+			compatible = "amlogic,meson-a1-usb-ctrl";
+			reg = <0x0 0xfe004400 0x0 0xa0>;
+			interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges;
+
+			clocks = <&clkc_periphs CLKID_USB_CTRL>,
+				 <&clkc_periphs CLKID_USB_BUS>,
+				 <&clkc_periphs CLKID_USB_CTRL_IN>;
+			clock-names = "usb_ctrl", "usb_bus", "xtal_usb_ctrl";
+			resets = <&reset RESET_USBCTRL>;
+			reset-name = "usb_ctrl";
+
+			dr_mode = "otg";
+
+			phys = <&usb2_phy1>;
+			phy-names = "usb2-phy1";
+
+			dwc3: usb@ff400000 {
+				compatible = "snps,dwc3";
+				reg = <0x0 0xff400000 0x0 0x100000>;
+				interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+				dr_mode = "host";
+				snps,dis_u2_susphy_quirk;
+				snps,quirk-frame-length-adjustment = <0x20>;
+				snps,parkmode-disable-ss-quirk;
+			};
+
+			dwc2: usb@ff500000 {
+				compatible = "amlogic,meson-a1-usb", "snps,dwc2";
+				reg = <0x0 0xff500000 0x0 0x40000>;
+				interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+				phys = <&usb2_phy1>;
+				phy-names = "usb2-phy";
+				clocks = <&clkc_periphs CLKID_USB_PHY>;
+				clock-names = "otg";
+				dr_mode = "peripheral";
+				g-rx-fifo-size = <192>;
+				g-np-tx-fifo-size = <128>;
+				g-tx-fifo-size = <128 128 16 16 16>;
+			};
+		};
+
 		gic: interrupt-controller@ff901000 {
 			compatible = "arm,gic-400";
 			reg = <0x0 0xff901000 0x0 0x1000>,
-- 
2.36.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-08-23 21:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23 21:36 [PATCH v2 00/15] arm64: dts: meson: a1: introduce several peripheral IPs Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 01/15] arm64: dts: meson: a1: reorder includes to keep them sorted Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 02/15] arm64: dts: meson: a1: remove extra empty line before reset node Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 03/15] arm64: dts: meson: a1: remove the unnecessary 'okay' status pwrc value Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 04/15] arm64: dts: meson: a1: reorder gpio_intc node definition Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 05/15] arm64: dts: meson: a1: introduce PLL and Peripherals clk controllers Dmitry Rokosov
2023-08-23 21:36 ` Dmitry Rokosov [this message]
2023-08-23 21:36 ` [PATCH v2 07/15] arm64: dts: meson: a1: enable efuse controller and setup its clk Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 08/15] arm64: dts: meson: a1: introduce SPI Flash Controller Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 09/15] arm64: dts: meson: a1: introduce UART_AO mux definitions Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 10/15] arm64: dts: meson: a1: add eMMC controller and its pins Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 11/15] arm64: dts: meson: a1: add saradc definition Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 12/15] arm64: dts: meson: a1: add hw rng node Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 13/15] arm64: dts: meson: a1: add ao secure node Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 14/15] arm64: dts: introduce Amlogic AD402 reference board based on A113L SoC Dmitry Rokosov
2023-08-23 21:36 ` [PATCH v2 15/15] dt-bindings: arm: amlogic: add Amlogic AD402 bindings Dmitry Rokosov
2023-08-24 15:08   ` Conor Dooley
2023-09-08 12:34 ` [PATCH v2 00/15] arm64: dts: meson: a1: introduce several peripheral IPs neil.armstrong
2023-09-11  9:50 ` neil.armstrong

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=20230823213630.12936-7-ddrokosov@sberdevices.ru \
    --to=ddrokosov@sberdevices.ru \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hanjie.lin@amlogic.com \
    --cc=jbrunet@baylibre.com \
    --cc=kernel@sberdevices.ru \
    --cc=khilman@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mturquette@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=rockosov@gmail.com \
    --cc=sboyd@kernel.org \
    --cc=sdfw_system_team@sberdevices.ru \
    --cc=yue.wang@amlogic.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