Skip to content

Commit bfcce47

Browse files
Chunfeng Yungregkh
authored andcommitted
arm64: dts: mediatek: add xHCI & usb phy for mt8173
add xHCI and phy drivers for MT8173-EVB Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0cbd4b3 commit bfcce47

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

arch/arm64/boot/dts/mediatek/mt8173-evb.dts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414

1515
/dts-v1/;
16+
#include <dt-bindings/gpio/gpio.h>
1617
#include "mt8173.dtsi"
1718

1819
/ {
@@ -32,6 +33,15 @@
3233
};
3334

3435
chosen { };
36+
37+
usb_p1_vbus: regulator@0 {
38+
compatible = "regulator-fixed";
39+
regulator-name = "usb_vbus";
40+
regulator-min-microvolt = <5000000>;
41+
regulator-max-microvolt = <5000000>;
42+
gpio = <&pio 130 GPIO_ACTIVE_HIGH>;
43+
enable-active-high;
44+
};
3545
};
3646

3747
&i2c1 {
@@ -408,3 +418,9 @@
408418
&uart0 {
409419
status = "okay";
410420
};
421+
422+
&usb30 {
423+
vusb33-supply = <&mt6397_vusb_reg>;
424+
vbus-supply = <&usb_p1_vbus>;
425+
mediatek,wakeup-src = <1>;
426+
};

arch/arm64/boot/dts/mediatek/mt8173.dtsi

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <dt-bindings/clock/mt8173-clk.h>
1515
#include <dt-bindings/interrupt-controller/irq.h>
1616
#include <dt-bindings/interrupt-controller/arm-gic.h>
17+
#include <dt-bindings/phy/phy.h>
1718
#include <dt-bindings/power/mt8173-power.h>
1819
#include <dt-bindings/reset-controller/mt8173-resets.h>
1920
#include "mt8173-pinfunc.h"
@@ -510,6 +511,47 @@
510511
status = "disabled";
511512
};
512513

514+
usb30: usb@11270000 {
515+
compatible = "mediatek,mt8173-xhci";
516+
reg = <0 0x11270000 0 0x1000>,
517+
<0 0x11280700 0 0x0100>;
518+
interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
519+
power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
520+
clocks = <&topckgen CLK_TOP_USB30_SEL>,
521+
<&pericfg CLK_PERI_USB0>,
522+
<&pericfg CLK_PERI_USB1>;
523+
clock-names = "sys_ck",
524+
"wakeup_deb_p0",
525+
"wakeup_deb_p1";
526+
phys = <&phy_port0 PHY_TYPE_USB3>,
527+
<&phy_port1 PHY_TYPE_USB2>;
528+
mediatek,syscon-wakeup = <&pericfg>;
529+
status = "okay";
530+
};
531+
532+
u3phy: usb-phy@11290000 {
533+
compatible = "mediatek,mt8173-u3phy";
534+
reg = <0 0x11290000 0 0x800>;
535+
clocks = <&apmixedsys CLK_APMIXED_REF2USB_TX>;
536+
clock-names = "u3phya_ref";
537+
#address-cells = <2>;
538+
#size-cells = <2>;
539+
ranges;
540+
status = "okay";
541+
542+
phy_port0: port@11290800 {
543+
reg = <0 0x11290800 0 0x800>;
544+
#phy-cells = <1>;
545+
status = "okay";
546+
};
547+
548+
phy_port1: port@11291000 {
549+
reg = <0 0x11291000 0 0x800>;
550+
#phy-cells = <1>;
551+
status = "okay";
552+
};
553+
};
554+
513555
mmsys: clock-controller@14000000 {
514556
compatible = "mediatek,mt8173-mmsys", "syscon";
515557
reg = <0 0x14000000 0 0x1000>;

0 commit comments

Comments
 (0)