phy: qcom,qmp: fix dt-bindings and deprecate lane suffix
PATCH v4 1/30 dt-bindings: phy: qcom,qmp: fix bogus clock-cells property
In reply to Johan HovoldThe QMP PHY wrapper node is not a clock provider so drop the bogus '#clock-cells' property that was added when converting to DT schema.
--- Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 5 ----- 1 file changed, 5 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +0 -5
@@ -68,9 +68,6 @@ properties: - description: Address and length of PHY's common serdes block. - description: Address and length of PHY's DP_COM control block. - "#clock-cells": - enum: [ 1, 2 ] - "#address-cells": enum: [ 1, 2 ]
@@ -118,7 +115,6 @@ patternProperties: required: - compatible - reg - - "#clock-cells" - "#address-cells" - "#size-cells" - ranges
@@ -472,7 +468,6 @@ examples: usb_2_qmpphy: phy-wrapper@88eb000 { compatible = "qcom,sdm845-qmp-usb3-uni-phy"; reg = <0x088eb000 0x18c>; - #clock-cells = <1>; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x088eb000 0x2000>;
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 5/30 dt-bindings: phy: qcom,qmp: clean up descriptions
In reply to Johan HovoldClean up the remaining descriptions by using uppercase "PHY" consistently and dropping redundant information from the register descriptions.
--- Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +3 -3
@@ -11,7 +11,7 @@ maintainers: - Vinod Koul <[email protected]> description: - QMP phy controller supports physical layer functionality for a number of + QMP PHY controller supports physical layer functionality for a number of controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB. properties:
@@ -65,8 +65,8 @@ properties: reg: minItems: 1 items: - - description: Address and length of PHY's common serdes block. - - description: Address and length of PHY's DP_COM control block. + - description: serdes + - description: DP_COM "#address-cells": enum: [ 1, 2 ]
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 2/30 dt-bindings: phy: qcom,qmp: sort compatible strings
In reply to Johan HovoldSort the compatible strings alphabetically to make it easier to look up entries and add new ones.
--- .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +7 -7
@@ -40,15 +40,18 @@ properties: - qcom,sdm845-qmp-ufs-phy - qcom,sdm845-qmp-usb3-phy - qcom,sdm845-qmp-usb3-uni-phy + - qcom,sdx55-qmp-pcie-phy + - qcom,sdx55-qmp-usb3-uni-phy + - qcom,sdx65-qmp-usb3-uni-phy - qcom,sm6115-qmp-ufs-phy - qcom,sm6350-qmp-ufs-phy - qcom,sm8150-qmp-ufs-phy - qcom,sm8150-qmp-usb3-phy - qcom,sm8150-qmp-usb3-uni-phy - - qcom,sm8250-qmp-ufs-phy - qcom,sm8250-qmp-gen3x1-pcie-phy - qcom,sm8250-qmp-gen3x2-pcie-phy - qcom,sm8250-qmp-modem-pcie-phy + - qcom,sm8250-qmp-ufs-phy - qcom,sm8250-qmp-usb3-phy - qcom,sm8250-qmp-usb3-uni-phy - qcom,sm8350-qmp-ufs-phy
@@ -58,9 +61,6 @@ properties: - qcom,sm8450-qmp-gen4x2-pcie-phy - qcom,sm8450-qmp-ufs-phy - qcom,sm8450-qmp-usb3-phy - - qcom,sdx55-qmp-pcie-phy - - qcom,sdx55-qmp-usb3-uni-phy - - qcom,sdx65-qmp-usb3-uni-phy reg: minItems: 1
@@ -279,12 +279,12 @@ allOf: contains: enum: - qcom,msm8998-qmp-ufs-phy + - qcom,sc8180x-qmp-ufs-phy + - qcom,sc8280xp-qmp-ufs-phy - qcom,sdm845-qmp-ufs-phy - qcom,sm6350-qmp-ufs-phy - qcom,sm8150-qmp-ufs-phy - qcom,sm8250-qmp-ufs-phy - - qcom,sc8180x-qmp-ufs-phy - - qcom,sc8280xp-qmp-ufs-phy then: properties: clocks:
@@ -372,11 +372,11 @@ allOf: compatible: contains: enum: + - qcom,sc8280xp-qmp-usb3-uni-phy - qcom,sm8150-qmp-usb3-phy - qcom,sm8150-qmp-usb3-uni-phy - qcom,sm8250-qmp-usb3-uni-phy - qcom,sm8350-qmp-usb3-uni-phy - - qcom,sc8280xp-qmp-usb3-uni-phy then: properties: clocks:
Signature · 1 line
2.35.1
PATCH v4 3/30 dt-bindings: phy: qcom,qmp: drop redundant descriptions
In reply to Johan HovoldDrop the redundant supply and clock descriptions which did not add much information beyond what can be inferred from the corresponding resource names.
--- .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 108 ++++-------------- 1 file changed, 25 insertions(+), 83 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +25 -83
@@ -92,17 +92,11 @@ properties: minItems: 1 maxItems: 3 - vdda-phy-supply: - description: - Phandle to a regulator supply to PHY core block. + vdda-phy-supply: true - vdda-pll-supply: - description: - Phandle to 1.8V regulator supply to PHY refclk pll block. + vdda-pll-supply: true - vddp-ref-clk-supply: - description: - Phandle to a regulator supply to any specific refclk pll block. + vddp-ref-clk-supply: true #Required nodes: patternProperties:
@@ -135,11 +129,7 @@ allOf: then: properties: clocks: - items: - - description: Phy aux clock. - - description: Phy config clock. - - description: 19.2 MHz ref clk. - - description: Phy common block aux clock. + maxItems: 4 clock-names: items: - const: aux
@@ -147,9 +137,7 @@ allOf: - const: ref - const: com_aux resets: - items: - - description: reset of phy block. - - description: phy common block reset. + maxItems: 2 reset-names: items: - const: phy
@@ -167,19 +155,14 @@ allOf: then: properties: clocks: - items: - - description: Phy aux clock. - - description: Phy config clock. - - description: 19.2 MHz ref clk. + maxItems: 3 clock-names: items: - const: aux - const: cfg_ahb - const: ref resets: - items: - - description: reset of phy block. - - description: phy common block reset. + maxItems: 2 reset-names: items: - const: phy
@@ -196,20 +179,14 @@ allOf: then: properties: clocks: - items: - - description: Phy aux clock. - - description: Phy config clock. - - description: 19.2 MHz ref clk. + maxItems: 3 clock-names: items: - const: aux - const: cfg_ahb - const: ref resets: - items: - - description: reset of phy block. - - description: phy common block reset. - - description: phy's ahb cfg block reset. + maxItems: 3 reset-names: items: - const: phy
@@ -230,19 +207,14 @@ allOf: then: properties: clocks: - items: - - description: Phy aux clock. - - description: Phy config clock. - - description: 19.2 MHz ref clk. + maxItems: 3 clock-names: items: - const: aux - const: cfg_ahb - const: ref resets: - items: - - description: reset of phy block. - - description: phy common block reset. + maxItems: 2 reset-names: items: - const: phy
@@ -259,14 +231,12 @@ allOf: then: properties: clocks: - items: - - description: 19.2 MHz ref clk. + maxItems: 1 clock-names: items: - const: ref resets: - items: - - description: PHY reset in the UFS controller. + maxItems: 1 reset-names: items: - const: ufsphy
@@ -288,16 +258,13 @@ allOf: then: properties: clocks: - items: - - description: 19.2 MHz ref clk. - - description: Phy reference aux clock. + maxItems: 2 clock-names: items: - const: ref - const: ref_aux resets: - items: - - description: PHY reset in the UFS controller. + maxItems: 1 reset-names: items: - const: ufsphy
@@ -315,17 +282,13 @@ allOf: then: properties: clocks: - items: - - description: Phy aux clock. - - description: Phy config clock. + maxItems: 2 clock-names: items: - const: aux - const: cfg_ahb resets: - items: - - description: reset of phy block. - - description: phy common block reset. + maxItems: 2 reset-names: items: - const: phy
@@ -347,11 +310,7 @@ allOf: then: properties: clocks: - items: - - description: Phy aux clock. - - description: Phy config clock. - - description: 19.2 MHz ref clk. - - description: Phy refgen clk. + maxItems: 4 clock-names: items: - const: aux
@@ -359,8 +318,7 @@ allOf: - const: ref - const: refgen resets: - items: - - description: reset of phy block. + maxItems: 1 reset-names: items: - const: phy
@@ -380,11 +338,7 @@ allOf: then: properties: clocks: - items: - - description: Phy aux clock. - - description: 19.2 MHz ref clk source. - - description: 19.2 MHz ref clk. - - description: Phy common block aux clock. + maxItems: 4 clock-names: items: - const: aux
@@ -392,9 +346,7 @@ allOf: - const: ref - const: com_aux resets: - items: - - description: reset of phy block. - - description: phy common block reset. + maxItems: 2 reset-names: items: - const: phy
@@ -412,19 +364,14 @@ allOf: then: properties: clocks: - items: - - description: Phy aux clock. - - description: 19.2 MHz ref clk. - - description: Phy common block aux clock. + maxItems: 3 clock-names: items: - const: aux - const: ref_clk_src - const: com_aux resets: - items: - - description: reset of phy block. - - description: phy common block reset. + maxItems: 2 reset-names: items: - const: phy
@@ -441,19 +388,14 @@ allOf: then: properties: clocks: - items: - - description: Phy config clock. - - description: 19.2 MHz ref clk. - - description: Phy common block aux clock. + maxItems: 3 clock-names: items: - const: cfg_ahb - const: ref - const: com_aux resets: - items: - - description: phy_phy reset. - - description: reset of phy block. + maxItems: 2 reset-names: items: - const: phy_phy
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 10/30 dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names
In reply to Johan HovoldDeprecate the PHY node 'clock-names' property which specified that the PIPE clock name should have an unnecessary "lane" suffix.
--- .../devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml +1 -4
@@ -69,6 +69,7 @@ patternProperties: - description: PIPE clock clock-names: + deprecated: true items: - enum: - pipe0
@@ -98,7 +99,6 @@ patternProperties: required: - reg - clocks - - clock-names - resets - reset-names - "#clock-cells"
@@ -151,7 +151,6 @@ examples: <0x1400 0x1dc>; clocks = <&gcc GCC_PCIE_0_PIPE_CLK>; - clock-names = "pipe0"; resets = <&gcc GCC_PCIE_0_PHY_BCR>; reset-names = "lane0";
@@ -167,7 +166,6 @@ examples: <0x2400 0x1dc>; clocks = <&gcc GCC_PCIE_1_PIPE_CLK>; - clock-names = "pipe1"; resets = <&gcc GCC_PCIE_1_PHY_BCR>; reset-names = "lane1";
@@ -183,7 +181,6 @@ examples: <0x3400 0x1dc>; clocks = <&gcc GCC_PCIE_2_PIPE_CLK>; - clock-names = "pipe2"; resets = <&gcc GCC_PCIE_2_PHY_BCR>; reset-names = "lane2";
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 11/30 dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
In reply to Johan HovoldDeprecate the PHY node 'reset-names' property which specified that the reset name should have an unnecessary "lane" suffix.
--- .../devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml +2 -5
@@ -78,9 +78,10 @@ patternProperties: resets: items: - - description: PHY (lane) reset + - description: PHY reset reset-names: + deprecated: true items: - enum: - lane0
@@ -100,7 +101,6 @@ patternProperties: - reg - clocks - resets - - reset-names - "#clock-cells" - clock-output-names - "#phy-cells"
@@ -152,7 +152,6 @@ examples: clocks = <&gcc GCC_PCIE_0_PIPE_CLK>; resets = <&gcc GCC_PCIE_0_PHY_BCR>; - reset-names = "lane0"; #clock-cells = <0>; clock-output-names = "pcie_0_pipe_clk_src";
@@ -167,7 +166,6 @@ examples: clocks = <&gcc GCC_PCIE_1_PIPE_CLK>; resets = <&gcc GCC_PCIE_1_PHY_BCR>; - reset-names = "lane1"; #clock-cells = <0>; clock-output-names = "pcie_1_pipe_clk_src";
@@ -182,7 +180,6 @@ examples: clocks = <&gcc GCC_PCIE_2_PIPE_CLK>; resets = <&gcc GCC_PCIE_2_PHY_BCR>; - reset-names = "lane2"; #clock-cells = <0>; clock-output-names = "pcie_2_pipe_clk_src";
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 6/30 dt-bindings: phy: qcom,qmp: clean up example
In reply to Johan HovoldClean up the example node somewhat by grouping consumer and provider properties in the child node.
--- Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +5 -2
@@ -430,10 +430,13 @@ examples: <0x400 0x1fc>, <0x800 0x218>, <0x600 0x70>; - #clock-cells = <0>; - #phy-cells = <0>; + clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; clock-names = "pipe0"; + + #clock-cells = <0>; clock-output-names = "usb3_uni_phy_pipe_clk_src"; + + #phy-cells = <0>; }; };
Signature · 1 line
2.35.1
PATCH v4 7/30 dt-bindings: phy: qcom,qmp: drop child-node comment
In reply to Johan HovoldDrop the redundant comment about child nodes being required that was copied from the old binding documentation.
--- Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 1 - 1 file changed, 1 deletion(-)
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +0 -1
@@ -98,7 +98,6 @@ properties: vddp-ref-clk-supply: true -#Required nodes: patternProperties: "^phy@[0-9a-f]+$": type: object
Signature · 1 line
2.35.1
PATCH v4 14/30 dt-bindings: phy: qcom,qmp-pcie: deprecate PIPE clock name
In reply to Johan HovoldDeprecate the PHY node 'clock-names' property which specified that the PIPE clock name should have a bogus "lane" suffix.
--- Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml +1 -2
@@ -78,6 +78,7 @@ patternProperties: - description: PIPE clock clock-names: + deprecated: true items: - const: pipe0
@@ -93,7 +94,6 @@ patternProperties: required: - reg - clocks - - clock-names - "#clock-cells" - clock-output-names - "#phy-cells"
@@ -287,7 +287,6 @@ examples: <0xe00 0xf4>; clocks = <&gcc GCC_PCIE_1_PIPE_CLK>; - clock-names = "pipe0"; #clock-cells = <0>; clock-output-names = "pcie_1_pipe_clk";
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 13/30 dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
In reply to Johan HovoldAdd the missing the description of the PHY-provider child node which was ignored when converting to DT schema.
--- .../bindings/phy/qcom,qmp-pcie-phy.yaml | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+)
Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml +92 -0
@@ -68,6 +68,37 @@ patternProperties: "^phy@[0-9a-f]+$": type: object description: single PHY-provider child node + properties: + reg: + minItems: 3 + maxItems: 6 + + clocks: + items: + - description: PIPE clock + + clock-names: + items: + - const: pipe0 + + "#clock-cells": + const: 0 + + clock-output-names: + maxItems: 1 + + "#phy-cells": + const: 0 + + required: + - reg + - clocks + - clock-names + - "#clock-cells" + - clock-output-names + - "#phy-cells" + + additionalProperties: false required: - compatible
@@ -164,6 +195,67 @@ allOf: - vdda-phy-supply - vdda-pll-supply + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8250-qmp-gen3x2-pcie-phy + - qcom,sm8250-qmp-modem-pcie-phy + - qcom,sm8450-qmp-gen4x2-pcie-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX lane 1 + - description: RX lane 1 + - description: PCS + - description: TX lane 2 + - description: RX lane 2 + - description: PCS_MISC + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8180x-qmp-pcie-phy + - qcom,sdm845-qmp-pcie-phy + - qcom,sdx55-qmp-pcie-phy + - qcom,sm8250-qmp-gen3x1-pcie-phy + - qcom,sm8450-qmp-gen3x1-pcie-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX + - description: RX + - description: PCS + - description: PCS_MISC + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq6018-qmp-pcie-phy + - qcom,ipq8074-qmp-pcie-phy + - qcom,msm8998-qmp-pcie-phy + - qcom,sdm845-qhp-pcie-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX + - description: RX + - description: PCS + examples: - | #include <dt-bindings/clock/qcom,gcc-sm8250.h>
Signature · 1 line
2.35.1
v4 cover phy: qcom,qmp: fix dt-bindings and deprecate lane suffix
When adding support for SC8280XP to the QMP PHY driver I noticed that the PHY provider child node was not described by the current DT schema.
The SC8280XP PHYs also need a second fixed-divider PIPE clock ("pipediv2") and I didn't want to have to add a bogus "lane" suffix to the clock name just to match the current "pipe0" name so I decided to deprecate the unnecessary suffix in the current binding instead.
To be able to add the missing child-node schema and handle device specifics like additional PIPE clocks, it quickly became obvious that the binding needs to be split up.
This series clean up and fixes some issue with the current schema before splitting it up in separate schemas for PCIe, UFS and USB and adding missing parts like the child PHY provider nodes.
The MSM8996 PCIe PHY gets its own schema as this is the only non-combo PHY that actually provides more than one PHY per IP block. Note that the "lane" suffix is still unnecessary and misleading.
The final patches add support for the updated binding to the (recently split up) PHY drivers. Included is also a related combo PHY cleanup.
Johan
Changes in v4
- rebase on phy/next from 2022-08-30 (71351b0e5646 ("phy: move from strlcpy with unused retval to strscpy")) which included a new sc8280xp USB PHY binding
- add more tags from Krzysztof and Dmitry
Changes in v3
- rebase on linux-next which has a new binding for IPQ8074
- fix git-bisect breakage due to removal of an unused variable one patch too soon (Krzysztof)
- replace one Fixes tag with reference in commit message (Krzysztof)
- drop two redundant minItems (Krzysztof)
- fix two Fixes tags that lacked the actual tag
- add more ack and review tags from Krzysztof
Changes in v2
- squash split + cleanup + example patches (Krzysztof)
- deprecate clock-names instead of dropping suffix (Krzysztof)
- deprecate reset-names instead of dropping suffix (Krzysztof)
- flatten child reg if/then schemas (Krzysztof)
- add back optional vddp-ref-clk to all bindings even though it likely only applies to MSM8996/98 UFS (Krzysztof)
- add missing sc7180 schema to USB binding
- misc clean ups
- shorten or drop descriptions
- drop quotes around $id and $schema (Krzysztof)
- use maxItems with clock-output-names
- combine two USB clock+reset schemas
- add Reviewed-by/Acked-by tags
Johan Hovold (30):
dt-bindings: phy: qcom,qmp: fix bogus clock-cells property
dt-bindings: phy: qcom,qmp: sort compatible strings
dt-bindings: phy: qcom,qmp: drop redundant descriptions
dt-bindings: phy: qcom,qmp: fix child node description
dt-bindings: phy: qcom,qmp: clean up descriptions
dt-bindings: phy: qcom,qmp: clean up example
dt-bindings: phy: qcom,qmp: drop child-node comment
dt-bindings: phy: add qcom,msm8996-qmp-pcie-phy schema
dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema
dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names
dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names
dt-bindings: phy: add QMP PCIe PHY schema
dt-bindings: phy: qcom,qmp-pcie: add missing child node schema
dt-bindings: phy: qcom,qmp-pcie: deprecate PIPE clock name
dt-bindings: phy: add QMP UFS PHY schema
dt-bindings: phy: qcom,qmp-ufs: add missing SM8450 clock
dt-bindings: phy: qcom,qmp-ufs: add missing SM8150 power domain
dt-bindings: phy: qcom,qmp-ufs: add missing child node schema
dt-bindings: phy: add QMP USB PHY schema
dt-bindings: phy: qcom,qmp-usb: add missing child node schema
dt-bindings: phy: qcom,qmp-usb: deprecate PIPE clock name
dt-bindings: phy: qcom,qmp-usb: add missing qcom,sc7180-qmp-usb3-phy
schema
dt-bindings: phy: qcom,qmp-usb3-dp: fix bogus clock-cells property
dt-bindings: phy: qcom,qmp-usb3-dp: deprecate USB PIPE clock name
phy: qcom-qmp-pcie: drop pipe clock lane suffix
phy: qcom-qmp-combo: drop unused lane reset
phy: qcom-qmp-combo: drop pipe clock lane suffix
phy: qcom-qmp-pcie-msm8996: drop pipe clock lane suffix
phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
phy: qcom-qmp-usb: drop pipe clock lane suffix
.../phy/qcom,msm8996-qmp-pcie-phy.yaml | 189 +++++++ .../bindings/phy/qcom,qmp-pcie-phy.yaml | 296 ++++++++++ .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 504 ------------------ .../bindings/phy/qcom,qmp-ufs-phy.yaml | 239 +++++++++ .../bindings/phy/qcom,qmp-usb-phy.yaml | 388 ++++++++++++++ .../bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 8 +- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 6 +- .../phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 8 +- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 4 +- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 4 +- 10 files changed, 1118 insertions(+), 528 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml delete mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
Signature · 1 line
2.35.1
PATCH v4 8/30 dt-bindings: phy: add qcom,msm8996-qmp-pcie-phy schema
The QMP PHY DT schema is getting unwieldy. Break out the odd-bird msm8996-qmp-pcie-phy which is the only QMP PHY that uses separate "per-lane" nodes.
Add an example node based on a cleaned up version of msm8996.dtsi.
--- .../phy/qcom,msm8996-qmp-pcie-phy.yaml | 146 ++++++++++++++++++ .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 26 ---- 2 files changed, 146 insertions(+), 26 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml
Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml new file +146 -0
@@ -0,0 +1,146 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QMP PHY controller (MSM8996 PCIe) + +maintainers: + - Vinod Koul <[email protected]> + +description: + QMP PHY controller supports physical layer functionality for a number of + controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB. + +properties: + compatible: + const: qcom,msm8996-qmp-pcie-phy + + reg: + items: + - description: serdes + + "#address-cells": + enum: [ 1, 2 ] + + "#size-cells": + enum: [ 1, 2 ] + + ranges: true + + clocks: + maxItems: 3 + + clock-names: + items: + - const: aux + - const: cfg_ahb + - const: ref + + resets: + maxItems: 3 + + reset-names: + items: + - const: phy + - const: common + - const: cfg + + vdda-phy-supply: true + + vdda-pll-supply: true + + vddp-ref-clk-supply: true + +patternProperties: + "^phy@[0-9a-f]+$": + type: object + description: one child node per PHY provided by this block + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + - ranges + - clocks + - clock-names + - resets + - reset-names + - vdda-phy-supply + - vdda-pll-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/qcom,gcc-msm8996.h> + pcie_phy: phy-wrapper@34000 { + compatible = "qcom,msm8996-qmp-pcie-phy"; + reg = <0x34000 0x488>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x34000 0x4000>; + + clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>, + <&gcc GCC_PCIE_PHY_CFG_AHB_CLK>, + <&gcc GCC_PCIE_CLKREF_CLK>; + clock-names = "aux", "cfg_ahb", "ref"; + + resets = <&gcc GCC_PCIE_PHY_BCR>, + <&gcc GCC_PCIE_PHY_COM_BCR>, + <&gcc GCC_PCIE_PHY_COM_NOCSR_BCR>; + reset-names = "phy", "common", "cfg"; + + vdda-phy-supply = <&vreg_l28a_0p925>; + vdda-pll-supply = <&vreg_l12a_1p8>; + + pciephy_0: phy@1000 { + reg = <0x1000 0x130>, + <0x1200 0x200>, + <0x1400 0x1dc>; + + clocks = <&gcc GCC_PCIE_0_PIPE_CLK>; + clock-names = "pipe0"; + resets = <&gcc GCC_PCIE_0_PHY_BCR>; + reset-names = "lane0"; + + #clock-cells = <0>; + clock-output-names = "pcie_0_pipe_clk_src"; + + #phy-cells = <0>; + }; + + pciephy_1: phy@2000 { + reg = <0x2000 0x130>, + <0x2200 0x200>, + <0x2400 0x1dc>; + + clocks = <&gcc GCC_PCIE_1_PIPE_CLK>; + clock-names = "pipe1"; + resets = <&gcc GCC_PCIE_1_PHY_BCR>; + reset-names = "lane1"; + + #clock-cells = <0>; + clock-output-names = "pcie_1_pipe_clk_src"; + + #phy-cells = <0>; + }; + + pciephy_2: phy@3000 { + reg = <0x3000 0x130>, + <0x3200 0x200>, + <0x3400 0x1dc>; + + clocks = <&gcc GCC_PCIE_2_PIPE_CLK>; + clock-names = "pipe2"; + resets = <&gcc GCC_PCIE_2_PHY_BCR>; + reset-names = "lane2"; + + #clock-cells = <0>; + clock-output-names = "pcie_2_pipe_clk_src"; + + #phy-cells = <0>; + }; + };
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +0 -26
@@ -22,7 +22,6 @@ properties: - qcom,ipq8074-qmp-gen3-pcie-phy - qcom,ipq8074-qmp-pcie-phy - qcom,ipq8074-qmp-usb3-phy - - qcom,msm8996-qmp-pcie-phy - qcom,msm8996-qmp-ufs-phy - qcom,msm8996-qmp-usb3-phy - qcom,msm8998-qmp-pcie-phy
@@ -167,31 +166,6 @@ allOf: required: - vdda-phy-supply - vdda-pll-supply - - if: - properties: - compatible: - contains: - enum: - - qcom,msm8996-qmp-pcie-phy - then: - properties: - clocks: - maxItems: 3 - clock-names: - items: - - const: aux - - const: cfg_ahb - - const: ref - resets: - maxItems: 3 - reset-names: - items: - - const: phy - - const: common - - const: cfg - required: - - vdda-phy-supply - - vdda-pll-supply - if: properties: compatible:
Signature · 1 line
2.35.1
PATCH v4 9/30 dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema
In reply to Johan HovoldAdd the missing the description of the PHY-provider child nodes which were ignored when converting to DT schema.
--- .../phy/qcom,msm8996-qmp-pcie-phy.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+)
Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-pcie-phy.yaml +49 -0
@@ -57,6 +57,55 @@ patternProperties: "^phy@[0-9a-f]+$": type: object description: one child node per PHY provided by this block + properties: + reg: + items: + - description: TX + - description: RX + - description: PCS + + clocks: + items: + - description: PIPE clock + + clock-names: + items: + - enum: + - pipe0 + - pipe1 + - pipe2 + + resets: + items: + - description: PHY (lane) reset + + reset-names: + items: + - enum: + - lane0 + - lane1 + - lane2 + + "#clock-cells": + const: 0 + + clock-output-names: + maxItems: 1 + + "#phy-cells": + const: 0 + + required: + - reg + - clocks + - clock-names + - resets + - reset-names + - "#clock-cells" + - clock-output-names + - "#phy-cells" + + additionalProperties: false required: - compatible
Signature · 1 line
2.35.1
PATCH v4 17/30 dt-bindings: phy: qcom,qmp-ufs: add missing SM8150 power domain
In reply to Johan HovoldAdd the missing optional power-domains property used by the SM8150 UFS QMP PHY to the binding.
--- Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml +3 -0
@@ -48,6 +48,9 @@ properties: minItems: 1 maxItems: 3 + power-domains: + maxItems: 1 + resets: maxItems: 1
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 20/30 dt-bindings: phy: qcom,qmp-usb: add missing child node schema
In reply to Johan HovoldAdd the missing the description of the PHY-provider child node which was ignored when converting to DT schema.
--- .../bindings/phy/qcom,qmp-usb-phy.yaml | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+)
Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml +115 -0
@@ -74,6 +74,37 @@ patternProperties: "^phy@[0-9a-f]+$": type: object description: single PHY-provider child node + properties: + reg: + minItems: 3 + maxItems: 6 + + clocks: + items: + - description: PIPE clock + + clock-names: + items: + - const: pipe0 + + "#clock-cells": + const: 0 + + clock-output-names: + maxItems: 1 + + "#phy-cells": + const: 0 + + required: + - reg + - clocks + - clock-names + - "#clock-cells" + - clock-output-names + - "#phy-cells" + + additionalProperties: false required: - compatible
@@ -212,6 +243,90 @@ allOf: - const: phy_phy - const: phy + - if: + properties: + compatible: + contains: + enum: + - qcom,sdm845-qmp-usb3-phy + - qcom,sm8150-qmp-usb3-phy + - qcom,sm8350-qmp-usb3-phy + - qcom,sm8450-qmp-usb3-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX lane 1 + - description: RX lane 1 + - description: PCS + - description: TX lane 2 + - description: RX lane 2 + - description: PCS_MISC + + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8998-qmp-usb3-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX lane 1 + - description: RX lane 1 + - description: PCS + - description: TX lane 2 + - description: RX lane 2 + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq6018-qmp-usb3-phy + - qcom,ipq8074-qmp-usb3-phy + - qcom,qcm2290-qmp-usb3-phy + - qcom,sc7180-qmp-usb3-phy + - qcom,sc8180x-qmp-usb3-phy + - qcom,sdx55-qmp-usb3-uni-phy + - qcom,sdx65-qmp-usb3-uni-phy + - qcom,sm8150-qmp-usb3-uni-phy + - qcom,sm8250-qmp-usb3-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX + - description: RX + - description: PCS + - description: PCS_MISC + + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8996-qmp-usb3-phy + - qcom,sc8280xp-qmp-usb3-uni-phy + - qcom,sm8250-qmp-usb3-uni-phy + - qcom,sm8350-qmp-usb3-uni-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX + - description: RX + - description: PCS + examples: - | #include <dt-bindings/clock/qcom,gcc-sdm845.h>
Signature · 1 line
2.35.1
PATCH v4 23/30 dt-bindings: phy: qcom,qmp-usb3-dp: fix bogus clock-cells property
In reply to Johan HovoldThe QMP PHY wrapper node is not a clock provider so drop the bogus '#clock-cells' property that was added when converting to DT schema.
--- .../devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 5 ----- 1 file changed, 5 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml +0 -5
@@ -31,9 +31,6 @@ properties: - const: dp_com - const: dp - "#clock-cells": - enum: [ 1, 2 ] - "#address-cells": enum: [ 1, 2 ]
@@ -150,7 +147,6 @@ patternProperties: required: - compatible - reg - - "#clock-cells" - "#address-cells" - "#size-cells" - ranges
@@ -172,7 +168,6 @@ examples: <0x088e8000 0x10>, <0x088ea000 0x40>; reg-names = "usb", "dp_com", "dp"; - #clock-cells = <1>; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x088e9000 0x2000>;
Signature · 1 line
2.35.1
PATCH v4 15/30 dt-bindings: phy: add QMP UFS PHY schema
In reply to Johan HovoldThe QMP PHY DT schema is getting unwieldy. Break out the UFS PHY binding in a separate file.
Add an example node based on a cleaned up version of sc8280xp.dtsi.
--- .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 60 ------- .../bindings/phy/qcom,qmp-ufs-phy.yaml | 148 ++++++++++++++++++ 2 files changed, 148 insertions(+), 60 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +0 -60
@@ -19,33 +19,22 @@ properties: enum: - qcom,ipq6018-qmp-usb3-phy - qcom,ipq8074-qmp-usb3-phy - - qcom,msm8996-qmp-ufs-phy - qcom,msm8996-qmp-usb3-phy - - qcom,msm8998-qmp-ufs-phy - qcom,msm8998-qmp-usb3-phy - qcom,qcm2290-qmp-usb3-phy - qcom,sc7180-qmp-usb3-phy - - qcom,sc8180x-qmp-ufs-phy - qcom,sc8180x-qmp-usb3-phy - - qcom,sc8280xp-qmp-ufs-phy - qcom,sc8280xp-qmp-usb3-uni-phy - - qcom,sdm845-qmp-ufs-phy - qcom,sdm845-qmp-usb3-phy - qcom,sdm845-qmp-usb3-uni-phy - qcom,sdx55-qmp-usb3-uni-phy - qcom,sdx65-qmp-usb3-uni-phy - - qcom,sm6115-qmp-ufs-phy - - qcom,sm6350-qmp-ufs-phy - - qcom,sm8150-qmp-ufs-phy - qcom,sm8150-qmp-usb3-phy - qcom,sm8150-qmp-usb3-uni-phy - - qcom,sm8250-qmp-ufs-phy - qcom,sm8250-qmp-usb3-phy - qcom,sm8250-qmp-usb3-uni-phy - - qcom,sm8350-qmp-ufs-phy - qcom,sm8350-qmp-usb3-phy - qcom,sm8350-qmp-usb3-uni-phy - - qcom,sm8450-qmp-ufs-phy - qcom,sm8450-qmp-usb3-phy reg:
@@ -179,55 +168,6 @@ allOf: required: - vdda-phy-supply - vdda-pll-supply - - if: - properties: - compatible: - contains: - enum: - - qcom,msm8996-qmp-ufs-phy - then: - properties: - clocks: - maxItems: 1 - clock-names: - items: - - const: ref - resets: - maxItems: 1 - reset-names: - items: - - const: ufsphy - required: - - vdda-phy-supply - - vdda-pll-supply - - if: - properties: - compatible: - contains: - enum: - - qcom,msm8998-qmp-ufs-phy - - qcom,sc8180x-qmp-ufs-phy - - qcom,sc8280xp-qmp-ufs-phy - - qcom,sdm845-qmp-ufs-phy - - qcom,sm6350-qmp-ufs-phy - - qcom,sm8150-qmp-ufs-phy - - qcom,sm8250-qmp-ufs-phy - then: - properties: - clocks: - maxItems: 2 - clock-names: - items: - - const: ref - - const: ref_aux - resets: - maxItems: 1 - reset-names: - items: - - const: ufsphy - required: - - vdda-phy-supply - - vdda-pll-supply - if: properties: compatible:
Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml new file +148 -0
148 lines not on this page · raw message
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 16/30 dt-bindings: phy: qcom,qmp-ufs: add missing SM8450 clock
In reply to Johan HovoldAdd the missing "qref" clock used by the SM8450 UFS QMP PHY to the binding.
Note that the "qref" clock was added to sm8450.dtsi by commit 07fa917a335e ("arm64: dts: qcom: sm8450: add ufs nodes") but the binding was never updated to match.
--- .../bindings/phy/qcom,qmp-ufs-phy.yaml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml +18 -2
@@ -42,11 +42,11 @@ properties: clocks: minItems: 1 - maxItems: 2 + maxItems: 3 clock-names: minItems: 1 - maxItems: 2 + maxItems: 3 resets: maxItems: 1
@@ -117,6 +117,22 @@ allOf: - const: ref - const: ref_aux + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8450-qmp-ufs-phy + then: + properties: + clocks: + maxItems: 3 + clock-names: + items: + - const: ref + - const: ref_aux + - const: qref + examples: - | #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
Signature · 1 line
2.35.1
PATCH v4 18/30 dt-bindings: phy: qcom,qmp-ufs: add missing child node schema
In reply to Johan HovoldAdd the missing the description of the PHY-provider child node which was ignored when converting to DT schema.
--- .../bindings/phy/qcom,qmp-ufs-phy.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+)
Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml +72 -0
@@ -68,6 +68,19 @@ patternProperties: "^phy@[0-9a-f]+$": type: object description: single PHY-provider child node + properties: + reg: + minItems: 3 + maxItems: 6 + + "#phy-cells": + const: 0 + + required: + - reg + - "#phy-cells" + + additionalProperties: false required: - compatible
@@ -136,6 +149,65 @@ allOf: - const: ref_aux - const: qref + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8998-qmp-ufs-phy + - qcom,sc8280xp-qmp-ufs-phy + - qcom,sdm845-qmp-ufs-phy + - qcom,sm6350-qmp-ufs-phy + - qcom,sm8150-qmp-ufs-phy + - qcom,sm8250-qmp-ufs-phy + - qcom,sm8350-qmp-ufs-phy + - qcom,sm8450-qmp-ufs-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX lane 1 + - description: RX lane 1 + - description: PCS + - description: TX lane 2 + - description: RX lane 2 + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8180x-qmp-ufs-phy + - qcom,sm6115-qmp-ufs-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX + - description: RX + - description: PCS + - description: PCS_MISC + + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8996-qmp-ufs-phy + then: + patternProperties: + "^phy@[0-9a-f]+$": + properties: + reg: + items: + - description: TX + - description: RX + - description: PCS + examples: - | #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 19/30 dt-bindings: phy: add QMP USB PHY schema
In reply to Johan HovoldThe QMP PHY DT schema is getting unwieldy. Break out the USB PHY binding in a separate file.
---
...com,qmp-phy.yaml => qcom,qmp-usb-phy.yaml} | 67 +++++--------------
1 file changed, 16 insertions(+), 51 deletions(-)
rename Documentation/devicetree/bindings/phy/{qcom,qmp-phy.yaml => qcom,qmp-usb-phy.yaml} (83%)Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml renamed from Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +16 -51
@@ -1,11 +1,10 @@ # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) - %YAML 1.2 --- -$id: "http://devicetree.org/schemas/phy/qcom,qmp-phy.yaml#" -$schema: "http://devicetree.org/meta-schemas/core.yaml#" +$id: http://devicetree.org/schemas/phy/qcom,qmp-usb-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# -title: Qualcomm QMP PHY controller +title: Qualcomm QMP PHY controller (USB) maintainers: - Vinod Koul <[email protected]>
@@ -52,20 +51,18 @@ properties: ranges: true clocks: - minItems: 1 + minItems: 3 maxItems: 4 clock-names: - minItems: 1 + minItems: 3 maxItems: 4 resets: - minItems: 1 - maxItems: 3 + maxItems: 2 reset-names: - minItems: 1 - maxItems: 3 + maxItems: 2 vdda-phy-supply: true
@@ -76,7 +73,7 @@ properties: patternProperties: "^phy@[0-9a-f]+$": type: object - description: one child node per PHY provided by this block + description: single PHY-provider child node required: - compatible
@@ -88,6 +85,8 @@ required: - clock-names - resets - reset-names + - vdda-phy-supply + - vdda-pll-supply additionalProperties: false
@@ -114,34 +113,7 @@ allOf: items: - const: phy - const: common - required: - - vdda-phy-supply - - vdda-pll-supply - - if: - properties: - compatible: - contains: - enum: - - qcom,sdx55-qmp-usb3-uni-phy - - qcom,sdx65-qmp-usb3-uni-phy - then: - properties: - clocks: - maxItems: 3 - clock-names: - items: - - const: aux - - const: cfg_ahb - - const: ref - resets: - maxItems: 2 - reset-names: - items: - - const: phy - - const: common - required: - - vdda-phy-supply - - vdda-pll-supply + - if: properties: compatible:
@@ -150,6 +122,8 @@ allOf: - qcom,ipq8074-qmp-usb3-phy - qcom,msm8996-qmp-usb3-phy - qcom,msm8998-qmp-usb3-phy + - qcom,sdx55-qmp-usb3-uni-phy + - qcom,sdx65-qmp-usb3-uni-phy then: properties: clocks:
@@ -165,9 +139,7 @@ allOf: items: - const: phy - const: common - required: - - vdda-phy-supply - - vdda-pll-supply + - if: properties: compatible:
@@ -194,9 +166,7 @@ allOf: items: - const: phy - const: common - required: - - vdda-phy-supply - - vdda-pll-supply + - if: properties: compatible:
@@ -219,9 +189,7 @@ allOf: items: - const: phy - const: common - required: - - vdda-phy-supply - - vdda-pll-supply + - if: properties: compatible:
@@ -243,9 +211,6 @@ allOf: items: - const: phy_phy - const: phy - required: - - vdda-phy-supply - - vdda-pll-supply examples: - |
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 22/30 dt-bindings: phy: qcom,qmp-usb: add missing qcom,sc7180-qmp-usb3-phy schema
In reply to Johan HovoldThe "qcom,sc7180-qmp-usb3-phy" compatible is apparently used to describe a combo PHY where only the USB part is used. Specifically, only a single reset is used.
--- .../bindings/phy/qcom,qmp-usb-phy.yaml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)
Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml +22 -0
@@ -122,6 +122,28 @@ required: additionalProperties: false allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,sc7180-qmp-usb3-phy + then: + properties: + clocks: + maxItems: 4 + clock-names: + items: + - const: aux + - const: cfg_ahb + - const: ref + - const: com_aux + resets: + maxItems: 1 + reset-names: + items: + - const: phy + - if: properties: compatible:
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 12/30 dt-bindings: phy: add QMP PCIe PHY schema
In reply to Johan HovoldThe QMP PHY DT schema is getting unwieldy. Break out the PCIe PHY binding in a separate file.
Add an example node based on a cleaned up version of sm8250.dtsi.
--- .../bindings/phy/qcom,qmp-pcie-phy.yaml | 205 ++++++++++++++++++ .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 68 ------ 2 files changed, 205 insertions(+), 68 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml new file +205 -0
@@ -0,0 +1,205 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/qcom,qmp-pcie-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QMP PHY controller (PCIe) + +maintainers: + - Vinod Koul <[email protected]> + +description: + QMP PHY controller supports physical layer functionality for a number of + controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB. + +properties: + compatible: + enum: + - qcom,ipq6018-qmp-pcie-phy + - qcom,ipq8074-qmp-gen3-pcie-phy + - qcom,ipq8074-qmp-pcie-phy + - qcom,msm8998-qmp-pcie-phy + - qcom,sc8180x-qmp-pcie-phy + - qcom,sdm845-qhp-pcie-phy + - qcom,sdm845-qmp-pcie-phy + - qcom,sdx55-qmp-pcie-phy + - qcom,sm8250-qmp-gen3x1-pcie-phy + - qcom,sm8250-qmp-gen3x2-pcie-phy + - qcom,sm8250-qmp-modem-pcie-phy + - qcom,sm8450-qmp-gen3x1-pcie-phy + - qcom,sm8450-qmp-gen4x2-pcie-phy + + reg: + items: + - description: serdes + + "#address-cells": + enum: [ 1, 2 ] + + "#size-cells": + enum: [ 1, 2 ] + + ranges: true + + clocks: + minItems: 2 + maxItems: 4 + + clock-names: + minItems: 2 + maxItems: 4 + + resets: + minItems: 1 + maxItems: 2 + + reset-names: + minItems: 1 + maxItems: 2 + + vdda-phy-supply: true + + vdda-pll-supply: true + + vddp-ref-clk-supply: true + +patternProperties: + "^phy@[0-9a-f]+$": + type: object + description: single PHY-provider child node + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + - ranges + - clocks + - clock-names + - resets + - reset-names + +additionalProperties: false + +allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8998-qmp-pcie-phy + then: + properties: + clocks: + maxItems: 3 + clock-names: + items: + - const: aux + - const: cfg_ahb + - const: ref + resets: + maxItems: 2 + reset-names: + items: + - const: phy + - const: common + required: + - vdda-phy-supply + - vdda-pll-supply + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq6018-qmp-pcie-phy + - qcom,ipq8074-qmp-gen3-pcie-phy + - qcom,ipq8074-qmp-pcie-phy + then: + properties: + clocks: + maxItems: 2 + clock-names: + items: + - const: aux + - const: cfg_ahb + resets: + maxItems: 2 + reset-names: + items: + - const: phy + - const: common + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8180x-qmp-pcie-phy + - qcom,sdm845-qhp-pcie-phy + - qcom,sdm845-qmp-pcie-phy + - qcom,sdx55-qmp-pcie-phy + - qcom,sm8250-qmp-gen3x1-pcie-phy + - qcom,sm8250-qmp-gen3x2-pcie-phy + - qcom,sm8250-qmp-modem-pcie-phy + - qcom,sm8450-qmp-gen3x1-pcie-phy + - qcom,sm8450-qmp-gen4x2-pcie-phy + then: + properties: + clocks: + maxItems: 4 + clock-names: + items: + - const: aux + - const: cfg_ahb + - const: ref + - const: refgen + resets: + maxItems: 1 + reset-names: + items: + - const: phy + required: + - vdda-phy-supply + - vdda-pll-supply + +examples: + - | + #include <dt-bindings/clock/qcom,gcc-sm8250.h> + phy-wrapper@1c0e000 { + compatible = "qcom,sm8250-qmp-gen3x2-pcie-phy"; + reg = <0x01c0e000 0x1c0>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x01c0e000 0x1000>; + + clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>, + <&gcc GCC_PCIE_1_CFG_AHB_CLK>, + <&gcc GCC_PCIE_WIGIG_CLKREF_EN>, + <&gcc GCC_PCIE1_PHY_REFGEN_CLK>; + clock-names = "aux", "cfg_ahb", "ref", "refgen"; + + resets = <&gcc GCC_PCIE_1_PHY_BCR>; + reset-names = "phy"; + + vdda-phy-supply = <&vreg_l10c_0p88>; + vdda-pll-supply = <&vreg_l6b_1p2>; + + phy@200 { + reg = <0x200 0x170>, + <0x400 0x200>, + <0xa00 0x1f0>, + <0x600 0x170>, + <0x800 0x200>, + <0xe00 0xf4>; + + clocks = <&gcc GCC_PCIE_1_PIPE_CLK>; + clock-names = "pipe0"; + + #clock-cells = <0>; + clock-output-names = "pcie_1_pipe_clk"; + + #phy-cells = <0>; + }; + };
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +0 -68
113 lines not on this page · raw message
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 21/30 dt-bindings: phy: qcom,qmp-usb: deprecate PIPE clock name
In reply to Johan HovoldDeprecate the PHY node 'clock-names' property which specified that the PIPE clock name should have a bogus "lane" suffix.
--- Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml +1 -2
@@ -84,6 +84,7 @@ patternProperties: - description: PIPE clock clock-names: + deprecated: true items: - const: pipe0
@@ -99,7 +100,6 @@ patternProperties: required: - reg - clocks - - clock-names - "#clock-cells" - clock-output-names - "#phy-cells"
@@ -357,7 +357,6 @@ examples: <0x600 0x70>; clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; - clock-names = "pipe0"; #clock-cells = <0>; clock-output-names = "usb3_uni_phy_pipe_clk_src";
Signature · 1 line
2.35.1
PATCH v4 27/30 phy: qcom-qmp-combo: drop pipe clock lane suffix
In reply to Johan HovoldThe pipe clock is defined in the "lane" node so there's no need to keep adding a redundant lane-number suffix to the clock name.
Update driver to support the new binding where the pipe clock name has been deprecated by instead requesting the clock by index.
--- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/phy/qualcomm/phy-qcom-qmp-combo.c +1 -3
@@ -2723,7 +2723,6 @@ int qcom_qmp_phy_combo_create(struct device *dev, struct device_node *np, int idstruct phy *generic_phy;struct qmp_phy *qphy;const struct phy_ops *ops; -char prop_name[MAX_PROP_NAME ];int ret; qphy =devm_kzalloc (dev,sizeof (*qphy),GFP_KERNEL );
@@ -2789,8 +2788,7 @@ int qcom_qmp_phy_combo_create(struct device *dev, struct device_node *np, int id* Otherwise, we initialize pipe clock to NULL for * all phys that don't need this. */ -snprintf (prop_name,sizeof (prop_name),"pipe%d" , id); - qphy->pipe_clk =devm_get_clk_from_child (dev, np, prop_name); + qphy->pipe_clk =devm_get_clk_from_child (dev, np,NULL );if (IS_ERR (qphy->pipe_clk)) {if (cfg->type ==PHY_TYPE_USB3 ) { ret =PTR_ERR (qphy->pipe_clk);
Signature · 1 line
2.35.1
PATCH v4 29/30 phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
In reply to Johan HovoldThe lane reset is defined in the "lane" node so there's no need to keep adding a redundant lane-number suffix to the reset name.
Update driver to support the new binding where the "lane" reset name has been deprecated by instead requesting the reset by index.
--- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +1 -4
@@ -860,7 +860,6 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,struct qcom_qmp *qmp =dev_get_drvdata (dev);struct phy *generic_phy;struct qmp_phy *qphy; -char prop_name[MAX_PROP_NAME ];int ret; qphy =devm_kzalloc (dev,sizeof (*qphy),GFP_KERNEL );
@@ -898,9 +897,7 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np, "failed to get lane%d pipe clock\n", id); } -/* Get lane reset, if any */ -snprintf (prop_name,sizeof (prop_name),"lane%d" , id); - qphy->lane_rst =of_reset_control_get_exclusive (np, prop_name); + qphy->lane_rst =of_reset_control_get_exclusive_by_index (np,0 );if (IS_ERR (qphy->lane_rst)) {dev_err (dev,"failed to get lane%d reset\n" , id);return PTR_ERR (qphy->lane_rst);
Signature · 1 line
2.35.1
PATCH v4 24/30 dt-bindings: phy: qcom,qmp-usb3-dp: deprecate USB PIPE clock name
In reply to Johan HovoldDeprecate the USB PHY node 'clock-names' property which specified that the PIPE clock name should have a bogus "lane" suffix.
--- .../devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml +1 -2
@@ -98,6 +98,7 @@ patternProperties: - description: pipe clock clock-names: + deprecated: true items: - const: pipe0
@@ -114,7 +115,6 @@ patternProperties: required: - reg - clocks - - clock-names - '#clock-cells' - '#phy-cells'
@@ -195,7 +195,6 @@ examples: #clock-cells = <0>; #phy-cells = <0>; clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; - clock-names = "pipe0"; clock-output-names = "usb3_phy_pipe_clk_src"; };
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 30/30 phy: qcom-qmp-usb: drop pipe clock lane suffix
In reply to Johan HovoldThe pipe clock is defined in the "lane" node so there's no need to keep adding a redundant lane-number suffix to the clock name.
Update driver to support the new binding where the pipe clock name has been deprecated by instead requesting the clock by index.
--- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/phy/qualcomm/phy-qcom-qmp-usb.c +1 -3
@@ -2630,7 +2630,6 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id,struct qcom_qmp *qmp =dev_get_drvdata (dev);struct phy *generic_phy;struct qmp_phy *qphy; -char prop_name[MAX_PROP_NAME ];int ret; qphy =devm_kzalloc (dev,sizeof (*qphy),GFP_KERNEL );
@@ -2689,8 +2688,7 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id,if (!qphy->pcs_misc)dev_vdbg (dev,"PHY pcs_misc-reg not used\n" ); -snprintf (prop_name,sizeof (prop_name),"pipe%d" , id); - qphy->pipe_clk =devm_get_clk_from_child (dev, np, prop_name); + qphy->pipe_clk =devm_get_clk_from_child (dev, np,NULL );if (IS_ERR (qphy->pipe_clk)) {return dev_err_probe (dev,PTR_ERR (qphy->pipe_clk),"failed to get lane%d pipe clock\n" , id);
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 4/30 dt-bindings: phy: qcom,qmp: fix child node description
In reply to Johan HovoldFix the incorrect description of the child nodes which claimed that one node is required per lane rather than per PHY.
--- Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +1 -3
@@ -102,9 +102,7 @@ properties: patternProperties: "^phy@[0-9a-f]+$": type: object - description: - Each device node of QMP phy is required to have as many child nodes as - the number of lanes the PHY has. + description: one child node per PHY provided by this block required: - compatible
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 25/30 phy: qcom-qmp-pcie: drop pipe clock lane suffix
In reply to Johan HovoldThe pipe clock is defined in the "lane" node so there's no need to keep adding a redundant lane-number suffix to the clock name.
Update driver to support the new binding where the pipe clock name has been deprecated by instead requesting the clock by index.
--- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +1 -3
@@ -2314,7 +2314,6 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,struct qcom_qmp *qmp =dev_get_drvdata (dev);struct phy *generic_phy;struct qmp_phy *qphy; -char prop_name[MAX_PROP_NAME ];int ret; qphy =devm_kzalloc (dev,sizeof (*qphy),GFP_KERNEL );
@@ -2374,8 +2373,7 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id,if (!qphy->pcs_misc)dev_vdbg (dev,"PHY pcs_misc-reg not used\n" ); -snprintf (prop_name,sizeof (prop_name),"pipe%d" , id); - qphy->pipe_clk =devm_get_clk_from_child (dev, np, prop_name); + qphy->pipe_clk =devm_get_clk_from_child (dev, np,NULL );if (IS_ERR (qphy->pipe_clk)) {return dev_err_probe (dev,PTR_ERR (qphy->pipe_clk),"failed to get lane%d pipe clock\n" , id);
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 26/30 phy: qcom-qmp-combo: drop unused lane reset
In reply to Johan HovoldDrop the unused lane reset pointer which isn't used by any combo PHY.
--- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 -- 1 file changed, 2 deletions(-)
drivers/phy/qualcomm/phy-qcom-qmp-combo.c +0 -2
@@ -926,7 +926,6 @@ struct qmp_phy_combo_cfg {* @pipe_clk: pipe clock * @index: lane index * @qmp: QMP phy to which this lane belongs -* @lane_rst: lane's reset controller * @mode: current PHY mode * @dp_aux_cfg: Display port aux config * @dp_opts: Display port optional config
@@ -946,7 +945,6 @@ struct qmp_phy {struct clk *pipe_clk;unsigned int index;struct qcom_qmp *qmp; -struct reset_control *lane_rst;enum phy_mode mode;unsigned int dp_aux_cfg;struct phy_configure_opts_dp dp_opts;
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v4 28/30 phy: qcom-qmp-pcie-msm8996: drop pipe clock lane suffix
In reply to Johan HovoldThe pipe clock is defined in the "lane" node so there's no need to keep adding a redundant lane-number suffix to the clock name.
Update driver to support the new binding where the pipe clock name has been deprecated by instead requesting the clock by index.
--- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +1 -2
@@ -892,8 +892,7 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,if (!qphy->pcs_misc)dev_vdbg (dev,"PHY pcs_misc-reg not used\n" ); -snprintf (prop_name,sizeof (prop_name),"pipe%d" , id); - qphy->pipe_clk =devm_get_clk_from_child (dev, np, prop_name); + qphy->pipe_clk =devm_get_clk_from_child (dev, np,NULL );if (IS_ERR (qphy->pipe_clk)) {return dev_err_probe (dev,PTR_ERR (qphy->pipe_clk),"failed to get lane%d pipe clock\n" , id);
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Vinod Koul
maintainerQuoted 16 lines · Johan Hovold
When adding support for SC8280XP to the QMP PHY driver I noticed that the PHY provider child node was not described by the current DT schema.
The SC8280XP PHYs also need a second fixed-divider PIPE clock ("pipediv2") and I didn't want to have to add a bogus "lane" suffix to the clock name just to match the current "pipe0" name so I decided to deprecate the unnecessary suffix in the current binding instead.
To be able to add the missing child-node schema and handle device specifics like additional PIPE clocks, it quickly became obvious that the binding needs to be split up.
This series clean up and fixes some issue with the current schema before splitting it up in separate schemas for PCIe, UFS and USB and adding missing parts like the child PHY provider nodes.
Quoted 6 lines
The MSM8996 PCIe PHY gets its own schema as this is the only non-combo PHY that actually provides more than one PHY per IP block. Note that the "lane" suffix is still unnecessary and misleading.
The final patches add support for the updated binding to the (recently split up) PHY drivers. Included is also a related combo PHY cleanup.
This applied fine, will push after tests run
Signature · 6 lines
~Vinod -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy