mediatek,musb.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. # Copyright (c) 2020 MediaTek
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/usb/mediatek,musb.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: MediaTek MUSB DRD/OTG Controller
  8. maintainers:
  9. - Min Guo <min.guo@mediatek.com>
  10. properties:
  11. $nodename:
  12. pattern: '^usb@[0-9a-f]+$'
  13. compatible:
  14. items:
  15. - enum:
  16. - mediatek,mt8516-musb
  17. - mediatek,mt2701-musb
  18. - mediatek,mt7623-musb
  19. - const: mediatek,mtk-musb
  20. reg:
  21. maxItems: 1
  22. interrupts:
  23. maxItems: 1
  24. interrupt-names:
  25. items:
  26. - const: mc
  27. clocks:
  28. items:
  29. - description: The main/core clock
  30. - description: The system bus clock
  31. - description: The 48Mhz clock
  32. clock-names:
  33. items:
  34. - const: main
  35. - const: mcu
  36. - const: univpll
  37. phys:
  38. maxItems: 1
  39. usb-role-switch:
  40. $ref: /schemas/types.yaml#/definitions/flag
  41. description: Support role switch. See usb/generic.txt
  42. type: boolean
  43. dr_mode:
  44. enum:
  45. - host
  46. - otg
  47. - peripheral
  48. power-domains:
  49. description: A phandle to USB power domain node to control USB's MTCMOS
  50. maxItems: 1
  51. connector:
  52. $ref: /schemas/connector/usb-connector.yaml#
  53. description: Connector for dual role switch
  54. type: object
  55. dependencies:
  56. usb-role-switch: [ connector ]
  57. connector: [ usb-role-switch ]
  58. required:
  59. - compatible
  60. - reg
  61. - interrupts
  62. - interrupt-names
  63. - phys
  64. - clocks
  65. - clock-names
  66. additionalProperties: false
  67. examples:
  68. - |
  69. #include <dt-bindings/clock/mt2701-clk.h>
  70. #include <dt-bindings/gpio/gpio.h>
  71. #include <dt-bindings/interrupt-controller/arm-gic.h>
  72. #include <dt-bindings/interrupt-controller/irq.h>
  73. #include <dt-bindings/phy/phy.h>
  74. #include <dt-bindings/power/mt2701-power.h>
  75. usb@11200000 {
  76. compatible = "mediatek,mt2701-musb", "mediatek,mtk-musb";
  77. reg = <0x11200000 0x1000>;
  78. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  79. interrupt-names = "mc";
  80. phys = <&u2port2 PHY_TYPE_USB2>;
  81. dr_mode = "otg";
  82. clocks = <&pericfg CLK_PERI_USB0>,
  83. <&pericfg CLK_PERI_USB0_MCU>,
  84. <&pericfg CLK_PERI_USB_SLV>;
  85. clock-names = "main","mcu","univpll";
  86. power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
  87. usb-role-switch;
  88. connector {
  89. compatible = "gpio-usb-b-connector", "usb-b-connector";
  90. type = "micro";
  91. id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
  92. vbus-supply = <&usb_vbus>;
  93. };
  94. };
  95. ...