* [PATCH v3 0/2] phy: qualcomm: pcie2: register as clock provider
@ 2022-12-29 11:59 Dmitry Baryshkov
2022-12-29 11:59 ` [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format Dmitry Baryshkov
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2022-12-29 11:59 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski
Cc: Philipp Zabel, linux-arm-msm, linux-phy, devicetree
On Qualcomm QCS404 platform the PCIe2 PHY provides PIPE clock to the gcc
(Global Clock Controller). Register the PHY as clock provider.
Changes since v2:
- Removed extra empty line in the schema (Krzysztof),
- Dropped dtsi patch accepted by Bjorn.
Changes since v1:
- Dropped 'phandle to' from supply descriptions in schema (Krzysztof),
- Reordered clock-related property definitions in schema as suggested by
Krzysztof,
- Dropped extra empty line at the end of the schema (reported by
Krzysztof).
Dmitry Baryshkov (2):
dt-bindings: phy: qcom,pcie2-phy: convert to YAML format
phy: qualcomm: pcie2: register as clock provider
.../bindings/phy/qcom,pcie2-phy.yaml | 86 +++++++++++++++++++
.../bindings/phy/qcom-pcie2-phy.txt | 42 ---------
drivers/phy/qualcomm/phy-qcom-pcie2.c | 6 +-
3 files changed, 91 insertions(+), 43 deletions(-)
create mode 100644 Documentation/devicetree/bindings/phy/qcom,pcie2-phy.yaml
delete mode 100644 Documentation/devicetree/bindings/phy/qcom-pcie2-phy.txt
--
2.39.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format
2022-12-29 11:59 [PATCH v3 0/2] phy: qualcomm: pcie2: register as clock provider Dmitry Baryshkov
@ 2022-12-29 11:59 ` Dmitry Baryshkov
2022-12-29 14:01 ` Krzysztof Kozlowski
2022-12-30 16:34 ` Rob Herring
2022-12-29 11:59 ` [PATCH v3 2/2] phy: qualcomm: pcie2: register as clock provider Dmitry Baryshkov
` (2 subsequent siblings)
3 siblings, 2 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2022-12-29 11:59 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski
Cc: Philipp Zabel, linux-arm-msm, linux-phy, devicetree
Convert the bindings for the Qualcomm PCIe2 PHY into the YAML format
from the text description.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
.../bindings/phy/qcom,pcie2-phy.yaml | 86 +++++++++++++++++++
.../bindings/phy/qcom-pcie2-phy.txt | 42 ---------
2 files changed, 86 insertions(+), 42 deletions(-)
create mode 100644 Documentation/devicetree/bindings/phy/qcom,pcie2-phy.yaml
delete mode 100644 Documentation/devicetree/bindings/phy/qcom-pcie2-phy.txt
diff --git a/Documentation/devicetree/bindings/phy/qcom,pcie2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,pcie2-phy.yaml
new file mode 100644
index 000000000000..dbc4a4c71f05
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,pcie2-phy.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,pcie2-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm PCIe2 PHY controller
+
+maintainers:
+ - Vinod Koul <vkoul@kernel.org>
+
+description:
+ The Qualcomm PCIe2 PHY is a Synopsys based phy found in a number of Qualcomm
+ platforms.
+
+properties:
+ compatible:
+ items:
+ - const: qcom,qcs404-pcie2-phy
+ - const: qcom,pcie2-phy
+
+ reg:
+ items:
+ - description: PHY register set
+
+ clocks:
+ items:
+ - description: a clock-specifier pair for the "pipe" clock
+
+ clock-output-names:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 0
+
+ "#phy-cells":
+ const: 0
+
+ vdda-vp-supply:
+ description: low voltage regulator
+
+ vdda-vph-supply:
+ description: high voltage regulator
+
+ resets:
+ maxItems: 2
+
+ reset-names:
+ items:
+ - const: phy
+ - const: pipe
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-output-names
+ - "#clock-cells"
+ - "#phy-cells"
+ - vdda-vp-supply
+ - vdda-vph-supply
+ - resets
+ - reset-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-qcs404.h>
+ phy@7786000 {
+ compatible = "qcom,qcs404-pcie2-phy", "qcom,pcie2-phy";
+ reg = <0x07786000 0xb8>;
+
+ clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
+ resets = <&gcc GCC_PCIEPHY_0_PHY_BCR>,
+ <&gcc GCC_PCIE_0_PIPE_ARES>;
+ reset-names = "phy", "pipe";
+
+ vdda-vp-supply = <&vreg_l3_1p05>;
+ vdda-vph-supply = <&vreg_l5_1p8>;
+
+ clock-output-names = "pcie_0_pipe_clk";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+ };
+...
diff --git a/Documentation/devicetree/bindings/phy/qcom-pcie2-phy.txt b/Documentation/devicetree/bindings/phy/qcom-pcie2-phy.txt
deleted file mode 100644
index 30064253f290..000000000000
--- a/Documentation/devicetree/bindings/phy/qcom-pcie2-phy.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Qualcomm PCIe2 PHY controller
-=============================
-
-The Qualcomm PCIe2 PHY is a Synopsys based phy found in a number of Qualcomm
-platforms.
-
-Required properties:
- - compatible: compatible list, should be:
- "qcom,qcs404-pcie2-phy", "qcom,pcie2-phy"
-
- - reg: offset and length of the PHY register set.
- - #phy-cells: must be 0.
-
- - clocks: a clock-specifier pair for the "pipe" clock
-
- - vdda-vp-supply: phandle to low voltage regulator
- - vdda-vph-supply: phandle to high voltage regulator
-
- - resets: reset-specifier pairs for the "phy" and "pipe" resets
- - reset-names: list of resets, should contain:
- "phy" and "pipe"
-
- - clock-output-names: name of the outgoing clock signal from the PHY PLL
- - #clock-cells: must be 0
-
-Example:
- phy@7786000 {
- compatible = "qcom,qcs404-pcie2-phy", "qcom,pcie2-phy";
- reg = <0x07786000 0xb8>;
-
- clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
- resets = <&gcc GCC_PCIEPHY_0_PHY_BCR>,
- <&gcc GCC_PCIE_0_PIPE_ARES>;
- reset-names = "phy", "pipe";
-
- vdda-vp-supply = <&vreg_l3_1p05>;
- vdda-vph-supply = <&vreg_l5_1p8>;
-
- clock-output-names = "pcie_0_pipe_clk";
- #clock-cells = <0>;
- #phy-cells = <0>;
- };
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/2] phy: qualcomm: pcie2: register as clock provider
2022-12-29 11:59 [PATCH v3 0/2] phy: qualcomm: pcie2: register as clock provider Dmitry Baryshkov
2022-12-29 11:59 ` [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format Dmitry Baryshkov
@ 2022-12-29 11:59 ` Dmitry Baryshkov
2023-01-12 17:11 ` [PATCH v3 0/2] " Vinod Koul
2023-01-12 17:14 ` Vinod Koul
3 siblings, 0 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2022-12-29 11:59 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski
Cc: Philipp Zabel, linux-arm-msm, linux-phy, devicetree
Register pcie2 PHY as a clock provider to enable using it in the
DT-based clock lookup.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/phy/qualcomm/phy-qcom-pcie2.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-pcie2.c b/drivers/phy/qualcomm/phy-qcom-pcie2.c
index 5407e59bb185..11a2bb958681 100644
--- a/drivers/phy/qualcomm/phy-qcom-pcie2.c
+++ b/drivers/phy/qualcomm/phy-qcom-pcie2.c
@@ -243,7 +243,11 @@ static int phy_pipe_clksrc_register(struct qcom_phy *qphy)
fixed->fixed_rate = 250000000;
fixed->hw.init = &init;
- return devm_clk_hw_register(qphy->dev, &fixed->hw);
+ ret = devm_clk_hw_register(qphy->dev, &fixed->hw);
+ if (ret < 0)
+ return ret;
+
+ return devm_of_clk_add_hw_provider(qphy->dev, of_clk_hw_simple_get, &fixed->hw);
}
static int qcom_pcie2_phy_probe(struct platform_device *pdev)
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format
2022-12-29 11:59 ` [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format Dmitry Baryshkov
@ 2022-12-29 14:01 ` Krzysztof Kozlowski
2022-12-29 20:18 ` Dmitry Baryshkov
2022-12-30 16:34 ` Rob Herring
1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-29 14:01 UTC (permalink / raw)
To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
Krzysztof Kozlowski
Cc: Philipp Zabel, linux-arm-msm, linux-phy, devicetree
On 29/12/2022 12:59, Dmitry Baryshkov wrote:
> Convert the bindings for the Qualcomm PCIe2 PHY into the YAML format
> from the text description.
You got here Rob's tag.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format
2022-12-29 14:01 ` Krzysztof Kozlowski
@ 2022-12-29 20:18 ` Dmitry Baryshkov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2022-12-29 20:18 UTC (permalink / raw)
To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
Krzysztof Kozlowski
Cc: Philipp Zabel, linux-arm-msm, linux-phy, devicetree
On 29/12/2022 16:01, Krzysztof Kozlowski wrote:
> On 29/12/2022 12:59, Dmitry Baryshkov wrote:
>> Convert the bindings for the Qualcomm PCIe2 PHY into the YAML format
>> from the text description.
>
> You got here Rob's tag.
True, missed it
To save a repost:
Reviewed-by: Rob Herring <robh@kernel.org>
For the reference:
https://lore.kernel.org/all/167209187655.72399.4038954760167968816.robh@kernel.org/
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format
2022-12-29 11:59 ` [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format Dmitry Baryshkov
2022-12-29 14:01 ` Krzysztof Kozlowski
@ 2022-12-30 16:34 ` Rob Herring
2022-12-31 15:05 ` Dmitry Baryshkov
1 sibling, 1 reply; 9+ messages in thread
From: Rob Herring @ 2022-12-30 16:34 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andy Gross, linux-arm-msm, Philipp Zabel, Rob Herring, devicetree,
Konrad Dybcio, Vinod Koul, Bjorn Andersson, Krzysztof Kozlowski,
linux-phy, Kishon Vijay Abraham I
On Thu, 29 Dec 2022 13:59:31 +0200, Dmitry Baryshkov wrote:
> Convert the bindings for the Qualcomm PCIe2 PHY into the YAML format
> from the text description.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> .../bindings/phy/qcom,pcie2-phy.yaml | 86 +++++++++++++++++++
> .../bindings/phy/qcom-pcie2-phy.txt | 42 ---------
> 2 files changed, 86 insertions(+), 42 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/phy/qcom,pcie2-phy.yaml
> delete mode 100644 Documentation/devicetree/bindings/phy/qcom-pcie2-phy.txt
>
Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.
Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.
Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221229115932.3312318-2-dmitry.baryshkov@linaro.org
phy@7786000: '#clock-cells' is a required property
arch/arm64/boot/dts/qcom/qcs404-evb-1000.dtb
arch/arm64/boot/dts/qcom/qcs404-evb-4000.dtb
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format
2022-12-30 16:34 ` Rob Herring
@ 2022-12-31 15:05 ` Dmitry Baryshkov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2022-12-31 15:05 UTC (permalink / raw)
To: Rob Herring
Cc: Andy Gross, linux-arm-msm, Philipp Zabel, Rob Herring, devicetree,
Konrad Dybcio, Vinod Koul, Bjorn Andersson, Krzysztof Kozlowski,
linux-phy, Kishon Vijay Abraham I
On Fri, 30 Dec 2022 at 18:34, Rob Herring <robh@kernel.org> wrote:
>
>
> On Thu, 29 Dec 2022 13:59:31 +0200, Dmitry Baryshkov wrote:
> > Convert the bindings for the Qualcomm PCIe2 PHY into the YAML format
> > from the text description.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> > .../bindings/phy/qcom,pcie2-phy.yaml | 86 +++++++++++++++++++
> > .../bindings/phy/qcom-pcie2-phy.txt | 42 ---------
> > 2 files changed, 86 insertions(+), 42 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/phy/qcom,pcie2-phy.yaml
> > delete mode 100644 Documentation/devicetree/bindings/phy/qcom-pcie2-phy.txt
> >
>
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
>
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
>
> Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221229115932.3312318-2-dmitry.baryshkov@linaro.org
>
> phy@7786000: '#clock-cells' is a required property
> arch/arm64/boot/dts/qcom/qcs404-evb-1000.dtb
> arch/arm64/boot/dts/qcom/qcs404-evb-4000.dtb
The fix was a part of the v1 of the series and was picked by Bjorn already:
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=arm64-for-6.3&id=977e9262c3542e87b513d4dad4c57b2c85e16c8c
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/2] phy: qualcomm: pcie2: register as clock provider
2022-12-29 11:59 [PATCH v3 0/2] phy: qualcomm: pcie2: register as clock provider Dmitry Baryshkov
2022-12-29 11:59 ` [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format Dmitry Baryshkov
2022-12-29 11:59 ` [PATCH v3 2/2] phy: qualcomm: pcie2: register as clock provider Dmitry Baryshkov
@ 2023-01-12 17:11 ` Vinod Koul
2023-01-12 17:14 ` Vinod Koul
3 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2023-01-12 17:11 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Philipp Zabel, linux-arm-msm, linux-phy, devicetree
On 29-12-22, 13:59, Dmitry Baryshkov wrote:
> On Qualcomm QCS404 platform the PCIe2 PHY provides PIPE clock to the gcc
> (Global Clock Controller). Register the PHY as clock provider.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/2] phy: qualcomm: pcie2: register as clock provider
2022-12-29 11:59 [PATCH v3 0/2] phy: qualcomm: pcie2: register as clock provider Dmitry Baryshkov
` (2 preceding siblings ...)
2023-01-12 17:11 ` [PATCH v3 0/2] " Vinod Koul
@ 2023-01-12 17:14 ` Vinod Koul
3 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2023-01-12 17:14 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Philipp Zabel, linux-arm-msm, linux-phy, devicetree
On 29-12-22, 13:59, Dmitry Baryshkov wrote:
> On Qualcomm QCS404 platform the PCIe2 PHY provides PIPE clock to the gcc
> (Global Clock Controller). Register the PHY as clock provider.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-01-12 17:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-29 11:59 [PATCH v3 0/2] phy: qualcomm: pcie2: register as clock provider Dmitry Baryshkov
2022-12-29 11:59 ` [PATCH v3 1/2] dt-bindings: phy: qcom,pcie2-phy: convert to YAML format Dmitry Baryshkov
2022-12-29 14:01 ` Krzysztof Kozlowski
2022-12-29 20:18 ` Dmitry Baryshkov
2022-12-30 16:34 ` Rob Herring
2022-12-31 15:05 ` Dmitry Baryshkov
2022-12-29 11:59 ` [PATCH v3 2/2] phy: qualcomm: pcie2: register as clock provider Dmitry Baryshkov
2023-01-12 17:11 ` [PATCH v3 0/2] " Vinod Koul
2023-01-12 17:14 ` Vinod Koul
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).