From: Johan Hovold <johan@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
Johan Hovold <johan+linaro@kernel.org>
Subject: Re: [PATCH 02/41] dt-bindings: phy: migrate combo QMP PHY bindings to qcom,sc8280xp-qmp-usb43dp-phy.yaml
Date: Fri, 24 Mar 2023 08:54:29 +0100 [thread overview]
Message-ID: <ZB1XNV7YNGtrygao@hovoldconsulting.com> (raw)
In-Reply-To: <20230324022514.1800382-3-dmitry.baryshkov@linaro.org>
On Fri, Mar 24, 2023 at 05:24:35AM +0300, Dmitry Baryshkov wrote:
> Migrate legacy bindings (described in qcom,sc7180-qmp-usb3-dp-phy.yaml)
> to qcom,sc8280xp-qmp-usb43dp-phy.yaml. This removes a need to declare
> the child PHY node or split resource regions.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> .../phy/qcom,sc7180-qmp-usb3-dp-phy.yaml | 276 ------------------
> .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 124 +++++++-
> 2 files changed, 111 insertions(+), 289 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml
> deleted file mode 100644
> index 0ef2c9b9d466..000000000000
> --- a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml
> +++ /dev/null
> @@ -1,276 +0,0 @@
> -# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> -
> -%YAML 1.2
> ----
> -$id: http://devicetree.org/schemas/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml#
> -$schema: http://devicetree.org/meta-schemas/core.yaml#
> -
> -title: Qualcomm QMP USB3 DP PHY controller (SC7180)
> -
> -description:
> - The QMP PHY controller supports physical layer functionality for a number of
> - controllers on Qualcomm chipsets, such as, PCIe, UFS and USB.
> -
> - Note that these bindings are for SoCs up to SC8180X. For newer SoCs, see
> - qcom,sc8280xp-qmp-usb43dp-phy.yaml.
> -
> -maintainers:
> - - Wesley Cheng <quic_wcheng@quicinc.com>
> -
> -properties:
> - compatible:
> - oneOf:
> - - enum:
> - - qcom,sc7180-qmp-usb3-dp-phy
> - - qcom,sc8180x-qmp-usb3-dp-phy
> - - qcom,sdm845-qmp-usb3-dp-phy
> - - qcom,sm8250-qmp-usb3-dp-phy
> - - items:
> - - enum:
> - - qcom,sc7280-qmp-usb3-dp-phy
> - - const: qcom,sm8250-qmp-usb3-dp-phy
> -
> - reg:
> - items:
> - - description: Address and length of PHY's USB serdes block.
> - - description: Address and length of the DP_COM control block.
> - - description: Address and length of PHY's DP serdes block.
> -
> - reg-names:
> - items:
> - - const: usb
> - - const: dp_com
> - - const: dp
> -
> - "#address-cells":
> - enum: [ 1, 2 ]
> -
> - "#size-cells":
> - enum: [ 1, 2 ]
> -
> - ranges: true
> -
> - clocks:
> - minItems: 3
> - maxItems: 4
> -
> - clock-names:
> - minItems: 3
> - maxItems: 4
> -
> - power-domains:
> - maxItems: 1
> -
> - resets:
> - items:
> - - description: reset of phy block.
> - - description: phy common block reset.
> -
> - reset-names:
> - items:
> - - const: phy
> - - const: common
> -
> - vdda-phy-supply:
> - description:
> - Phandle to a regulator supply to PHY core block.
> -
> - vdda-pll-supply:
> - description:
> - Phandle to 1.8V regulator supply to PHY refclk pll block.
> -
> - vddp-ref-clk-supply:
> - description:
> - Phandle to a regulator supply to any specific refclk pll block.
> -
> -# Required nodes:
> -patternProperties:
> - "^usb3-phy@[0-9a-f]+$":
> - type: object
> - additionalProperties: false
> - description:
> - The USB3 PHY.
> -
> - properties:
> - reg:
> - items:
> - - description: Address and length of TX.
> - - description: Address and length of RX.
> - - description: Address and length of PCS.
> - - description: Address and length of TX2.
> - - description: Address and length of RX2.
> - - description: Address and length of pcs_misc.
> -
> - clocks:
> - items:
> - - description: pipe clock
> -
> - clock-names:
> - deprecated: true
> - items:
> - - const: pipe0
> -
> - clock-output-names:
> - items:
> - - const: usb3_phy_pipe_clk_src
> -
> - '#clock-cells':
> - const: 0
> -
> - '#phy-cells':
> - const: 0
> -
> - required:
> - - reg
> - - clocks
> - - '#clock-cells'
> - - '#phy-cells'
> -
> - "^dp-phy@[0-9a-f]+$":
> - type: object
> - additionalProperties: false
> - description:
> - The DP PHY.
> -
> - properties:
> - reg:
> - items:
> - - description: Address and length of TX.
> - - description: Address and length of RX.
> - - description: Address and length of PCS.
> - - description: Address and length of TX2.
> - - description: Address and length of RX2.
> -
> - '#clock-cells':
> - const: 1
> -
> - '#phy-cells':
> - const: 0
> -
> - required:
> - - reg
> - - '#clock-cells'
> - - '#phy-cells'
> -
> -required:
> - - compatible
> - - reg
> - - "#address-cells"
> - - "#size-cells"
> - - ranges
> - - clocks
> - - clock-names
> - - resets
> - - reset-names
> - - vdda-phy-supply
> - - vdda-pll-supply
> -
> -allOf:
> - - if:
> - properties:
> - compatible:
> - enum:
> - - qcom,sc7180-qmp-usb3-dp-phy
> - - qcom,sdm845-qmp-usb3-dp-phy
> - then:
> - properties:
> - clocks:
> - items:
> - - description: Phy aux clock
> - - description: Phy config clock
> - - description: 19.2 MHz ref clk
> - - description: Phy common block aux clock
> - clock-names:
> - items:
> - - const: aux
> - - const: cfg_ahb
> - - const: ref
> - - const: com_aux
> -
> - - if:
> - properties:
> - compatible:
> - enum:
> - - qcom,sc8180x-qmp-usb3-dp-phy
> - then:
> - properties:
> - clocks:
> - items:
> - - description: Phy aux clock
> - - description: 19.2 MHz ref clk
> - - description: Phy common block aux clock
> - clock-names:
> - items:
> - - const: aux
> - - const: ref
> - - const: com_aux
> -
> - - if:
> - properties:
> - compatible:
> - enum:
> - - qcom,sm8250-qmp-usb3-dp-phy
> - then:
> - properties:
> - clocks:
> - items:
> - - description: Phy aux clock
> - - description: Board XO source
> - - description: Phy common block aux clock
> - clock-names:
> - items:
> - - const: aux
> - - const: ref_clk_src
> - - const: com_aux
> -
> -additionalProperties: false
> -
> -examples:
> - - |
> - #include <dt-bindings/clock/qcom,gcc-sdm845.h>
> - usb_1_qmpphy: phy-wrapper@88e9000 {
> - compatible = "qcom,sdm845-qmp-usb3-dp-phy";
> - reg = <0x088e9000 0x18c>,
> - <0x088e8000 0x10>,
> - <0x088ea000 0x40>;
> - reg-names = "usb", "dp_com", "dp";
> - #address-cells = <1>;
> - #size-cells = <1>;
> - ranges = <0x0 0x088e9000 0x2000>;
> -
> - clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
> - <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
> - <&gcc GCC_USB3_PRIM_CLKREF_CLK>,
> - <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
> - clock-names = "aux", "cfg_ahb", "ref", "com_aux";
> -
> - resets = <&gcc GCC_USB3_PHY_PRIM_BCR>,
> - <&gcc GCC_USB3_DP_PHY_PRIM_BCR>;
> - reset-names = "phy", "common";
> -
> - vdda-phy-supply = <&vdda_usb2_ss_1p2>;
> - vdda-pll-supply = <&vdda_usb2_ss_core>;
> -
> - usb3-phy@200 {
> - reg = <0x200 0x128>,
> - <0x400 0x200>,
> - <0xc00 0x218>,
> - <0x600 0x128>,
> - <0x800 0x200>,
> - <0xa00 0x100>;
> - #clock-cells = <0>;
> - #phy-cells = <0>;
> - clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
> - clock-output-names = "usb3_phy_pipe_clk_src";
> - };
> -
> - dp-phy@88ea200 {
> - reg = <0xa200 0x200>,
> - <0xa400 0x200>,
> - <0xaa00 0x200>,
> - <0xa600 0x200>,
> - <0xa800 0x200>;
> - #clock-cells = <1>;
> - #phy-cells = <0>;
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> index 3cd5fc3e8fab..484f321aefce 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> @@ -15,25 +15,32 @@ description:
>
> properties:
> compatible:
> - enum:
> - - qcom,sc8280xp-qmp-usb43dp-phy
> - - qcom,sm6350-qmp-usb3-dp-phy
> - - qcom,sm8350-qmp-usb3-dp-phy
> - - qcom,sm8450-qmp-usb3-dp-phy
> - - qcom,sm8550-qmp-usb3-dp-phy
> + oneOf:
> + - enum:
> + - qcom,sc7180-qmp-usb3-dp-phy
> + - qcom,sc8180x-qmp-usb3-dp-phy
> + - qcom,sc8280xp-qmp-usb43dp-phy
> + - qcom,sdm845-qmp-usb3-dp-phy
> + - qcom,sm6350-qmp-usb3-dp-phy
> + - qcom,sm8250-qmp-usb3-dp-phy
> + - qcom,sm8350-qmp-usb3-dp-phy
> + - qcom,sm8450-qmp-usb3-dp-phy
> + - qcom,sm8550-qmp-usb3-dp-phy
> + - items:
> + - enum:
> + - qcom,sc7280-qmp-usb3-dp-phy
> + - const: qcom,sm8250-qmp-usb3-dp-phy
Why are you carrying over this mess to a new binding? Again, this is the
time to get rid of legacy cruft.
> reg:
> maxItems: 1
>
> clocks:
> - maxItems: 4
> + minItems: 3
> + maxItems: 5
>
> clock-names:
> - items:
> - - const: aux
> - - const: ref
> - - const: com_aux
> - - const: usb3_pipe
> + minItems: 3
> + maxItems: 5
>
> power-domains:
> maxItems: 1
> @@ -50,6 +57,8 @@ properties:
>
> vdda-pll-supply: true
>
> + vddp-ref-clk-supply: true
> +
> "#clock-cells":
> const: 1
> description:
> @@ -65,7 +74,6 @@ required:
> - reg
> - clocks
> - clock-names
> - - power-domains
> - resets
> - reset-names
> - vdda-phy-supply
> @@ -73,6 +81,71 @@ required:
> - "#clock-cells"
> - "#phy-cells"
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + enum:
> + - qcom,sc7180-qmp-usb3-dp-phy
> + - qcom,sdm845-qmp-usb3-dp-phy
> + then:
> + properties:
> + clocks:
> + items:
> + - description: Phy aux clock
> + - description: Phy config clock
> + - description: 19.2 MHz ref clk
> + - description: Phy common block aux clock
> + - description: USB3 PIPE clock
These descriptions don't add anything and should not be carried over.
> + clock-names:
> + items:
> + - const: aux
> + - const: cfg_ahb
> + - const: ref
> + - const: com_aux
> + - const: usb3_pipe
Should the cfg_ahb clock be moved last so that you could unify with the
next set?
> +
> + - if:
> + properties:
> + compatible:
> + enum:
> + - qcom,sc8180x-qmp-usb3-dp-phy
> + - qcom,sc8280xp-qmp-usb3-dp-phy
> + then:
> + properties:
> + clocks:
> + items:
> + - description: Phy aux clock
> + - description: 19.2 MHz ref clk
> + - description: Phy common block aux clock
> + - description: USB3 PIPE clock
Please do not add these either.
> + clock-names:
> + items:
> + - const: aux
> + - const: ref
> + - const: com_aux
> + - const: usb3_pipe
> +
> + - if:
> + properties:
> + compatible:
> + enum:
> + - qcom,sm8250-qmp-usb3-dp-phy
> + then:
> + properties:
> + clocks:
> + items:
> + - description: Phy aux clock
> + - description: Board XO source
> + - description: Phy common block aux clock
> + - description: USB3 PIPE clock
> + clock-names:
> + items:
> + - const: aux
> + - const: ref_clk_src
Again, no 'src' clock belong in the binding.
> + - const: com_aux
> + - const: usb3_pipe
> +
> additionalProperties: false
>
> examples:
> @@ -101,3 +174,28 @@ examples:
> #clock-cells = <1>;
> #phy-cells = <1>;
> };
> + - |
> + #define GCC_USB3_PRIM_CLKREF_CLK 151
> + #define GCC_USB_PHY_CFG_AHB2PHY_CLK 161
> +
> + phy@88e8000 {
> + compatible = "qcom,sdm845-qmp-usb3-dp-phy";
> + reg = <0x088e8000 0x3000>;
> +
> + clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
> + <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
> + <&gcc GCC_USB3_PRIM_CLKREF_CLK>,
> + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
> + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
> + clock-names = "aux", "cfg_ahb", "ref", "com_aux", "usb3_pipe";
> +
> + resets = <&gcc GCC_USB3_PHY_PRIM_BCR>,
> + <&gcc GCC_USB3_DP_PHY_PRIM_BCR>;
> + reset-names = "phy", "common";
> +
> + vdda-phy-supply = <&vdda_usb2_ss_1p2>;
> + vdda-pll-supply = <&vdda_usb2_ss_core>;
> +
> + #clock-cells = <1>;
> + #phy-cells = <1>;
> + };
I see no point in adding this example either.
Johan
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2023-03-24 7:54 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 2:24 [PATCH 00/41] phy: qcom-qmp: convert to newer style of bindings Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 01/41] dt-bindings: phy: migrate QMP USB PHY bindings to qcom,sc8280xp-qmp-usb3-uni-phy.yaml Dmitry Baryshkov
2023-03-24 7:48 ` Johan Hovold
2023-03-24 12:12 ` Dmitry Baryshkov
2023-03-24 9:43 ` Krzysztof Kozlowski
2023-03-24 11:45 ` Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 02/41] dt-bindings: phy: migrate combo QMP PHY bindings to qcom,sc8280xp-qmp-usb43dp-phy.yaml Dmitry Baryshkov
2023-03-24 7:54 ` Johan Hovold [this message]
2023-03-24 2:24 ` [PATCH 03/41] dt-bindings: phy: migrate QMP UFS PHY bindings to qcom,sc8280xp-qmp-ufs-phy.yaml Dmitry Baryshkov
2023-03-24 7:56 ` Johan Hovold
2023-03-24 2:24 ` [PATCH 04/41] dt-bindings: phy: migrate QMP PCIe PHY bindings to qcom,sc8280xp-qmp-pcie-phy.yaml Dmitry Baryshkov
2023-03-24 8:04 ` Johan Hovold
2023-03-24 12:16 ` Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 05/41] phy: qcom-qmp-usb: make QPHY_PCS_MISC_CLAMP_ENABLE access conditional Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 06/41] phy: qcom-qmp: move PCS MISC V4 registers to separate header Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 07/41] phy: qcom-qmp-usb: populate offsets configuration Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 08/41] phy: qcom-qmp-ufs: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 09/41] phy: qcom-qmp-pcie: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 10/41] arm64: dts: qcom: ipq6018: switch USB QMP PHY to new style of bindings Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 11/41] arm64: dts: qcom: ipq8074: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 12/41] arm64: dts: qcom: msm8996: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 13/41] arm64: dts: qcom: msm8998: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 14/41] arm64: dts: qcom: sdm845: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 15/41] arm64: dts: qcom: sm8150: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 16/41] arm64: dts: qcom: sm8250: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 17/41] arm64: dts: qcom: sm8350: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 18/41] arm64: dts: qcom: sc7180: switch USB+DP " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 19/41] arm64: dts: qcom: sc7280: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 20/41] arm64: dts: qcom: sdm845: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 21/41] arm64: dts: qcom: sm8250: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 22/41] arm64: dts: qcom: msm8996: switch UFS " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 23/41] arm64: dts: qcom: msm8998: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 24/41] arm64: dts: qcom: sdm845: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 25/41] arm64: dts: qcom: sm6115: " Dmitry Baryshkov
2023-03-24 2:24 ` [PATCH 26/41] arm64: dts: qcom: sm6350: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 27/41] arm64: dts: qcom: sm8150: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 28/41] arm64: dts: qcom: sm8250: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 29/41] arm64: dts: qcom: sm8350: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 30/41] arm64: dts: qcom: sm8450: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 31/41] arm64: dts: qcom: ipq6018: switch PCIe " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 32/41] arm64: dts: qcom: ipq8074: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 33/41] arm64: dts: qcom: msm8998: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 34/41] arm64: dts: qcom: sc7280: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 35/41] arm64: dts: qcom: sdm845: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 36/41] arm64: dts: qcom: sm8150: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 37/41] arm64: dts: qcom: sm8250: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 38/41] arm64: dts: qcom: sm8450: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 39/41] ARM: dts: qcom-sdx55: switch USB " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 40/41] ARM: dts: qcom-sdx65: " Dmitry Baryshkov
2023-03-24 2:25 ` [PATCH 41/41] ARM: dts: qcom-sdx55: switch PCIe " Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZB1XNV7YNGtrygao@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=johan+linaro@kernel.org \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).