Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: phy: Add special clock for Allwinner H616 PHY

The USB PHY IP in the Allwinner H616 SoC requires a quirk that involves
some resources from port 2's PHY and HCI IP. In particular the PMU clock
for port 2 must be surely ungated before accessing the REG_HCI_PHY_CTL
register of port 2. To allow each USB port to be controlled
independently of port 2, we need a handle to that particular PMU clock
in the *PHY* node, as the HCI and PHY part might be handled by separate
drivers.

Add that clock to the requirements of the H616 PHY binding, so that a
PHY driver can apply the quirk in isolation, without requiring help from
port 2's HCI driver.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221031111358.3387297-3-andre.przywara@arm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Andre Przywara and committed by
Vinod Koul
6964affe 8484199c

+26
+26
Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml
··· 36 36 - const: pmu3 37 37 38 38 clocks: 39 + minItems: 4 39 40 items: 40 41 - description: USB OTG PHY bus clock 41 42 - description: USB Host 0 PHY bus clock 42 43 - description: USB Host 1 PHY bus clock 43 44 - description: USB Host 2 PHY bus clock 45 + - description: PMU clock for host port 2 44 46 45 47 clock-names: 48 + minItems: 4 46 49 items: 47 50 - const: usb0_phy 48 51 - const: usb1_phy 49 52 - const: usb2_phy 50 53 - const: usb3_phy 54 + - const: pmu2_clk 51 55 52 56 resets: 53 57 items: ··· 99 95 - reg-names 100 96 - resets 101 97 - reset-names 98 + 99 + allOf: 100 + - if: 101 + properties: 102 + compatible: 103 + contains: 104 + enum: 105 + - allwinner,sun50i-h616-usb-phy 106 + then: 107 + properties: 108 + clocks: 109 + minItems: 5 110 + 111 + clock-names: 112 + minItems: 5 113 + else: 114 + properties: 115 + clocks: 116 + maxItems: 4 117 + 118 + clock-names: 119 + maxItems: 4 102 120 103 121 additionalProperties: false 104 122