002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. From 6964affe65066651eca21e97247d3b7cac5153dc Mon Sep 17 00:00:00 2001
  2. From: Andre Przywara <[email protected]>
  3. Date: Mon, 31 Oct 2022 11:13:53 +0000
  4. Subject: [PATCH] dt-bindings: phy: Add special clock for Allwinner H616 PHY
  5. The USB PHY IP in the Allwinner H616 SoC requires a quirk that involves
  6. some resources from port 2's PHY and HCI IP. In particular the PMU clock
  7. for port 2 must be surely ungated before accessing the REG_HCI_PHY_CTL
  8. register of port 2. To allow each USB port to be controlled
  9. independently of port 2, we need a handle to that particular PMU clock
  10. in the *PHY* node, as the HCI and PHY part might be handled by separate
  11. drivers.
  12. Add that clock to the requirements of the H616 PHY binding, so that a
  13. PHY driver can apply the quirk in isolation, without requiring help from
  14. port 2's HCI driver.
  15. Signed-off-by: Andre Przywara <[email protected]>
  16. Reviewed-by: Rob Herring <[email protected]>
  17. Link: https://lore.kernel.org/r/[email protected]
  18. Signed-off-by: Vinod Koul <[email protected]>
  19. ---
  20. .../phy/allwinner,sun8i-h3-usb-phy.yaml | 26 +++++++++++++++++++
  21. 1 file changed, 26 insertions(+)
  22. --- a/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml
  23. +++ b/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml
  24. @@ -36,18 +36,22 @@ properties:
  25. - const: pmu3
  26. clocks:
  27. + minItems: 4
  28. items:
  29. - description: USB OTG PHY bus clock
  30. - description: USB Host 0 PHY bus clock
  31. - description: USB Host 1 PHY bus clock
  32. - description: USB Host 2 PHY bus clock
  33. + - description: PMU clock for host port 2
  34. clock-names:
  35. + minItems: 4
  36. items:
  37. - const: usb0_phy
  38. - const: usb1_phy
  39. - const: usb2_phy
  40. - const: usb3_phy
  41. + - const: pmu2_clk
  42. resets:
  43. items:
  44. @@ -96,6 +100,28 @@ required:
  45. - resets
  46. - reset-names
  47. +allOf:
  48. + - if:
  49. + properties:
  50. + compatible:
  51. + contains:
  52. + enum:
  53. + - allwinner,sun50i-h616-usb-phy
  54. + then:
  55. + properties:
  56. + clocks:
  57. + minItems: 5
  58. +
  59. + clock-names:
  60. + minItems: 5
  61. + else:
  62. + properties:
  63. + clocks:
  64. + maxItems: 4
  65. +
  66. + clock-names:
  67. + maxItems: 4
  68. +
  69. additionalProperties: false
  70. examples: