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

dt-bindings: phy-qcom-qmp: Fix register underspecification

Add register regions for the second lane of dual-lane nodes.
This additional specification is needed so that the driver can stop
reaching beyond the tx and rx register allocations to get at the
second lane registers in a dual-lane PHY.

While in there, document #clock-cells as optional for PHYs that don't
provide a pipe clock. Also, document the pcs_misc register region, which
was being quietly supplied and used.

Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Evan Green and committed by
Kishon Vijay Abraham I
2517d09b 1a3a0927

+63 -9
+63 -9
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
··· 25 25 - For all others: 26 26 - The reg-names property shouldn't be defined. 27 27 28 - - #clock-cells: must be 1 28 + - #clock-cells: must be 1 (PCIe and USB3 PHYs only) 29 29 - Phy pll outputs a bunch of clocks for Tx, Rx and Pipe 30 30 interface (for pipe based PHYs). These clock are then gate-controlled 31 31 by gcc. ··· 82 82 - Each device node of QMP phy is required to have as many child nodes as 83 83 the number of lanes the PHY has. 84 84 85 - Required properties for child node: 85 + Required properties for child nodes of PCIe PHYs (one child per lane): 86 86 - reg: list of offset and length pairs of register sets for PHY blocks - 87 - - index 0: tx 88 - - index 1: rx 89 - - index 2: pcs 90 - - index 3: pcs_misc (optional) 91 - 87 + tx, rx, pcs, and pcs_misc (optional). 92 88 - #phy-cells: must be 0 93 89 94 - Required properties child node of pcie and usb3 qmp phys: 90 + Required properties for a single "lanes" child node of non-PCIe PHYs: 91 + - reg: list of offset and length pairs of register sets for PHY blocks 92 + For 1-lane devices: 93 + tx, rx, pcs, and (optionally) pcs_misc 94 + For 2-lane devices: 95 + tx0, rx0, pcs, tx1, rx1, and (optionally) pcs_misc 96 + - #phy-cells: must be 0 97 + 98 + Required properties for child node of PCIe and USB3 qmp phys: 95 99 - clocks: a list of phandles and clock-specifier pairs, 96 100 one for each entry in clock-names. 97 101 - clock-names: Must contain following: 98 102 "pipe<lane-number>" for pipe clock specific to each lane. 99 103 - clock-output-names: Name of the PHY clock that will be the parent for 100 104 the above pipe clock. 101 - 102 105 For "qcom,ipq8074-qmp-pcie-phy": 103 106 - "pcie20_phy0_pipe_clk" Pipe Clock parent 104 107 (or) ··· 152 149 pciephy_1: lane@36000 { 153 150 ... 154 151 ... 152 + }; 153 + 154 + phy@88eb000 { 155 + compatible = "qcom,sdm845-qmp-usb3-uni-phy"; 156 + reg = <0x88eb000 0x18c>; 157 + #clock-cells = <1>; 158 + #address-cells = <1>; 159 + #size-cells = <1>; 160 + ranges; 161 + 162 + clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>, 163 + <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, 164 + <&gcc GCC_USB3_SEC_CLKREF_CLK>, 165 + <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>; 166 + clock-names = "aux", "cfg_ahb", "ref", "com_aux"; 167 + 168 + resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>, 169 + <&gcc GCC_USB3_PHY_SEC_BCR>; 170 + reset-names = "phy", "common"; 171 + 172 + lane@88eb200 { 173 + reg = <0x88eb200 0x128>, 174 + <0x88eb400 0x1fc>, 175 + <0x88eb800 0x218>, 176 + <0x88eb600 0x70>; 177 + #phy-cells = <0>; 178 + clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; 179 + clock-names = "pipe0"; 180 + clock-output-names = "usb3_uni_phy_pipe_clk_src"; 181 + }; 182 + }; 183 + 184 + phy@1d87000 { 185 + compatible = "qcom,sdm845-qmp-ufs-phy"; 186 + reg = <0x1d87000 0x18c>; 187 + #address-cells = <1>; 188 + #size-cells = <1>; 189 + ranges; 190 + clock-names = "ref", 191 + "ref_aux"; 192 + clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>, 193 + <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; 194 + 195 + lanes@1d87400 { 196 + reg = <0x1d87400 0x108>, 197 + <0x1d87600 0x1e0>, 198 + <0x1d87c00 0x1dc>, 199 + <0x1d87800 0x108>, 200 + <0x1d87a00 0x1e0>; 201 + #phy-cells = <0>; 202 + }; 155 203 };