0020-arm64-dts-mediatek-add-xHCI-usb-phy-for-mt8173.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. From 645465d4c6dd46c5e6c9ac25cd42608b4201fde0 Mon Sep 17 00:00:00 2001
  2. From: "chunfeng.yun@mediatek.com" <chunfeng.yun@mediatek.com>
  3. Date: Tue, 17 Nov 2015 17:18:41 +0800
  4. Subject: [PATCH 020/102] arm64: dts: mediatek: add xHCI & usb phy for mt8173
  5. add xHCI and phy drivers for MT8173-EVB
  6. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
  7. ---
  8. arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 16 ++++++++++
  9. arch/arm64/boot/dts/mediatek/mt8173.dtsi | 42 +++++++++++++++++++++++++++
  10. 2 files changed, 58 insertions(+)
  11. --- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
  12. +++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
  13. @@ -13,6 +13,7 @@
  14. */
  15. /dts-v1/;
  16. +#include <dt-bindings/gpio/gpio.h>
  17. #include "mt8173.dtsi"
  18. / {
  19. @@ -32,6 +33,15 @@
  20. };
  21. chosen { };
  22. +
  23. + usb_p1_vbus: regulator@0 {
  24. + compatible = "regulator-fixed";
  25. + regulator-name = "usb_vbus";
  26. + regulator-min-microvolt = <5000000>;
  27. + regulator-max-microvolt = <5000000>;
  28. + gpio = <&pio 130 GPIO_ACTIVE_HIGH>;
  29. + enable-active-high;
  30. + };
  31. };
  32. &i2c1 {
  33. @@ -408,3 +418,9 @@
  34. &uart0 {
  35. status = "okay";
  36. };
  37. +
  38. +&usb30 {
  39. + vusb33-supply = <&mt6397_vusb_reg>;
  40. + vbus-supply = <&usb_p1_vbus>;
  41. + mediatek,wakeup-src = <1>;
  42. +};
  43. --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
  44. +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
  45. @@ -14,6 +14,7 @@
  46. #include <dt-bindings/clock/mt8173-clk.h>
  47. #include <dt-bindings/interrupt-controller/irq.h>
  48. #include <dt-bindings/interrupt-controller/arm-gic.h>
  49. +#include <dt-bindings/phy/phy.h>
  50. #include <dt-bindings/power/mt8173-power.h>
  51. #include <dt-bindings/reset-controller/mt8173-resets.h>
  52. #include "mt8173-pinfunc.h"
  53. @@ -510,6 +511,47 @@
  54. status = "disabled";
  55. };
  56. + usb30: usb@11270000 {
  57. + compatible = "mediatek,mt8173-xhci";
  58. + reg = <0 0x11270000 0 0x1000>,
  59. + <0 0x11280700 0 0x0100>;
  60. + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
  61. + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
  62. + clocks = <&topckgen CLK_TOP_USB30_SEL>,
  63. + <&pericfg CLK_PERI_USB0>,
  64. + <&pericfg CLK_PERI_USB1>;
  65. + clock-names = "sys_ck",
  66. + "wakeup_deb_p0",
  67. + "wakeup_deb_p1";
  68. + phys = <&phy_port0 PHY_TYPE_USB3>,
  69. + <&phy_port1 PHY_TYPE_USB2>;
  70. + mediatek,syscon-wakeup = <&pericfg>;
  71. + status = "okay";
  72. + };
  73. +
  74. + u3phy: usb-phy@11290000 {
  75. + compatible = "mediatek,mt8173-u3phy";
  76. + reg = <0 0x11290000 0 0x800>;
  77. + clocks = <&apmixedsys CLK_APMIXED_REF2USB_TX>;
  78. + clock-names = "u3phya_ref";
  79. + #address-cells = <2>;
  80. + #size-cells = <2>;
  81. + ranges;
  82. + status = "okay";
  83. +
  84. + phy_port0: port@11290800 {
  85. + reg = <0 0x11290800 0 0x800>;
  86. + #phy-cells = <1>;
  87. + status = "okay";
  88. + };
  89. +
  90. + phy_port1: port@11291000 {
  91. + reg = <0 0x11291000 0 0x800>;
  92. + #phy-cells = <1>;
  93. + status = "okay";
  94. + };
  95. + };
  96. +
  97. mmsys: clock-controller@14000000 {
  98. compatible = "mediatek,mt8173-mmsys", "syscon";
  99. reg = <0 0x14000000 0 0x1000>;