2
0

0029-ARM-dts-gemini-Enable-DNS313-FOTG210-as-periph.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 296184694ae7a4e388603c95499e98d30b21cc09 Mon Sep 17 00:00:00 2001
  2. From: Linus Walleij <[email protected]>
  3. Date: Mon, 23 Jan 2023 08:39:16 +0100
  4. Subject: [PATCH 29/29] ARM: dts: gemini: Enable DNS313 FOTG210 as periph
  5. Add the GPIO-based VBUS phy, and enable the FOTG210
  6. USB1 block for use as peripheral.
  7. Signed-off-by: Linus Walleij <[email protected]>
  8. Link: https://lore.kernel.org/r/[email protected]
  9. ---
  10. --- a/arch/arm/boot/dts/gemini-dlink-dns-313.dts
  11. +++ b/arch/arm/boot/dts/gemini-dlink-dns-313.dts
  12. @@ -80,6 +80,15 @@
  13. #cooling-cells = <2>;
  14. };
  15. + /*
  16. + * This is the type B USB connector on the device,
  17. + * a GPIO-controlled USB VBUS detect
  18. + */
  19. + usb1_phy: phy {
  20. + compatible = "gpio-usb-b-connector", "usb-b-connector";
  21. + #phy-cells = <0>;
  22. + vbus-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  23. + };
  24. /* Global Mixed-Mode Technology G751 mounted on GPIO I2C */
  25. i2c {
  26. @@ -302,5 +311,13 @@
  27. ide@63000000 {
  28. status = "okay";
  29. };
  30. +
  31. + usb@69000000 {
  32. + status = "okay";
  33. + dr_mode = "peripheral";
  34. + usb-phy = <&usb1_phy>;
  35. + pinctrl-names = "default";
  36. + pinctrl-0 = <&usb_default_pins>;
  37. + };
  38. };
  39. };
  40. --- a/arch/arm/boot/dts/gemini.dtsi
  41. +++ b/arch/arm/boot/dts/gemini.dtsi
  42. @@ -455,6 +455,8 @@
  43. */
  44. pinctrl-names = "default";
  45. pinctrl-0 = <&usb_default_pins>;
  46. + /* Default to host mode */
  47. + dr_mode = "host";
  48. syscon = <&syscon>;
  49. status = "disabled";
  50. };