linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible
@ 2022-11-13 18:47 Robert Marko
  2022-11-13 18:47 ` [PATCH 2/5] dt-bindings: net: ipq4019-mdio: add IPQ8074 compatible Robert Marko
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Robert Marko @ 2022-11-13 18:47 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, davem, edumazet, kuba, pabeni,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-msm, netdev,
	devicetree, linux-kernel
  Cc: Robert Marko

Document IPQ6018 compatible that is already being used in the DTS along
with the fallback IPQ4019 compatible as driver itself only gets probed
on IPQ4019 and IPQ5018 compatibles.

This is also required in order to specify which platform require clock to
be defined and validate it in schema.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 .../devicetree/bindings/net/qcom,ipq4019-mdio.yaml  | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
index ad8b2b41c140..2463c0bad203 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
@@ -14,9 +14,16 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - qcom,ipq4019-mdio
-      - qcom,ipq5018-mdio
+    oneOf:
+      - items:
+          - enum:
+              - qcom,ipq4019-mdio
+              - qcom,ipq5018-mdio
+
+      - items:
+          - enum:
+              - qcom,ipq6018-mdio
+          - const: qcom,ipq4019-mdio
 
   "#address-cells":
     const: 1
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] dt-bindings: net: ipq4019-mdio: add IPQ8074 compatible
  2022-11-13 18:47 [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Robert Marko
@ 2022-11-13 18:47 ` Robert Marko
  2022-11-14  8:27   ` Krzysztof Kozlowski
  2022-11-13 18:47 ` [PATCH 3/5] dt-bindings: net: ipq4019-mdio: require and validate clocks Robert Marko
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Robert Marko @ 2022-11-13 18:47 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, davem, edumazet, kuba, pabeni,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-msm, netdev,
	devicetree, linux-kernel
  Cc: Robert Marko

Allow using IPQ8074 specific compatible along with the fallback IPQ4019
one in order to be able to specify which compatibles require clocks to
be able to validate them via schema.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
index 2463c0bad203..2c85ae43d27d 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
@@ -23,6 +23,7 @@ properties:
       - items:
           - enum:
               - qcom,ipq6018-mdio
+              - qcom,ipq8074-mdio
           - const: qcom,ipq4019-mdio
 
   "#address-cells":
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] dt-bindings: net: ipq4019-mdio: require and validate clocks
  2022-11-13 18:47 [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Robert Marko
  2022-11-13 18:47 ` [PATCH 2/5] dt-bindings: net: ipq4019-mdio: add IPQ8074 compatible Robert Marko
@ 2022-11-13 18:47 ` Robert Marko
  2022-11-14  8:29   ` Krzysztof Kozlowski
  2022-11-13 18:47 ` [PATCH 4/5] dt-bindings: net: ipq4019-mdio: document required clock-names Robert Marko
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Robert Marko @ 2022-11-13 18:47 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, davem, edumazet, kuba, pabeni,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-msm, netdev,
	devicetree, linux-kernel
  Cc: Robert Marko

Now that we can match the platforms requiring clocks by compatible start
using those to allow clocks per compatible and make them required.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 .../bindings/net/qcom,ipq4019-mdio.yaml       | 28 +++++++++++++------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
index 2c85ae43d27d..b34955b0b827 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
@@ -9,9 +9,6 @@ title: Qualcomm IPQ40xx MDIO Controller
 maintainers:
   - Robert Marko <robert.marko@sartura.hr>
 
-allOf:
-  - $ref: "mdio.yaml#"
-
 properties:
   compatible:
     oneOf:
@@ -40,18 +37,31 @@ properties:
       the second Address and length of the register for ethernet LDO, this second
       address range is only required by the platform IPQ50xx.
 
-  clocks:
-    maxItems: 1
-    description: |
-      MDIO clock source frequency fixed to 100MHZ, this clock should be specified
-      by the platform IPQ807x, IPQ60xx and IPQ50xx.
-
 required:
   - compatible
   - reg
   - "#address-cells"
   - "#size-cells"
 
+allOf:
+  - $ref: "mdio.yaml#"
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,ipq5018-mdio
+              - qcom,ipq6018-mdio
+              - qcom,ipq8074-mdio
+    then:
+      properties:
+        clocks:
+          items:
+            - description: MDIO clock source frequency fixed to 100MHZ
+      required:
+        - clocks
+
 unevaluatedProperties: false
 
 examples:
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] dt-bindings: net: ipq4019-mdio: document required clock-names
  2022-11-13 18:47 [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Robert Marko
  2022-11-13 18:47 ` [PATCH 2/5] dt-bindings: net: ipq4019-mdio: add IPQ8074 compatible Robert Marko
  2022-11-13 18:47 ` [PATCH 3/5] dt-bindings: net: ipq4019-mdio: require and validate clocks Robert Marko
@ 2022-11-13 18:47 ` Robert Marko
  2022-11-14  8:30   ` Krzysztof Kozlowski
  2022-11-13 18:47 ` [PATCH 5/5] arm64: dts: qcom: ipq8074: add SoC specific compatible to MDIO Robert Marko
  2022-11-14  8:26 ` [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Krzysztof Kozlowski
  4 siblings, 1 reply; 10+ messages in thread
From: Robert Marko @ 2022-11-13 18:47 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, davem, edumazet, kuba, pabeni,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-msm, netdev,
	devicetree, linux-kernel
  Cc: Robert Marko

IPQ5018, IPQ6018 and IPQ8074 require clock-names to be set as driver is
requesting the clock based on it and not index, so document that and make
it required for the listed SoC-s.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
index b34955b0b827..d233009b0d49 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
@@ -59,8 +59,12 @@ allOf:
         clocks:
           items:
             - description: MDIO clock source frequency fixed to 100MHZ
+        clock-names:
+          items:
+            - const: gcc_mdio_ahb_clk
       required:
         - clocks
+        - clock-names
 
 unevaluatedProperties: false
 
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] arm64: dts: qcom: ipq8074: add SoC specific compatible to MDIO
  2022-11-13 18:47 [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Robert Marko
                   ` (2 preceding siblings ...)
  2022-11-13 18:47 ` [PATCH 4/5] dt-bindings: net: ipq4019-mdio: document required clock-names Robert Marko
@ 2022-11-13 18:47 ` Robert Marko
  2022-11-14  8:30   ` Krzysztof Kozlowski
  2022-11-14  8:26 ` [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Krzysztof Kozlowski
  4 siblings, 1 reply; 10+ messages in thread
From: Robert Marko @ 2022-11-13 18:47 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, davem, edumazet, kuba, pabeni,
	robh+dt, krzysztof.kozlowski+dt, linux-arm-msm, netdev,
	devicetree, linux-kernel
  Cc: Robert Marko

Add the newly documented SoC compatible to MDIO in order to be able to
validate clocks for it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index a0481c671faf..583871c29586 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -331,7 +331,7 @@ pcie_phy1: phy@8e200 {
 		};
 
 		mdio: mdio@90000 {
-			compatible = "qcom,ipq4019-mdio";
+			compatible = "qcom,ipq8074-mdio", "qcom,ipq4019-mdio";
 			reg = <0x00090000 0x64>;
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible
  2022-11-13 18:47 [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Robert Marko
                   ` (3 preceding siblings ...)
  2022-11-13 18:47 ` [PATCH 5/5] arm64: dts: qcom: ipq8074: add SoC specific compatible to MDIO Robert Marko
@ 2022-11-14  8:26 ` Krzysztof Kozlowski
  4 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-14  8:26 UTC (permalink / raw)
  To: Robert Marko, agross, andersson, konrad.dybcio, davem, edumazet,
	kuba, pabeni, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
	netdev, devicetree, linux-kernel

On 13/11/2022 19:47, Robert Marko wrote:
> Document IPQ6018 compatible that is already being used in the DTS along
> with the fallback IPQ4019 compatible as driver itself only gets probed
> on IPQ4019 and IPQ5018 compatibles.
> 
> This is also required in order to specify which platform require clock to
> be defined and validate it in schema.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
>  .../devicetree/bindings/net/qcom,ipq4019-mdio.yaml  | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> index ad8b2b41c140..2463c0bad203 100644
> --- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> @@ -14,9 +14,16 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - qcom,ipq4019-mdio
> -      - qcom,ipq5018-mdio
> +    oneOf:
> +      - items:

These are just one item, so drop "items".

> +          - enum:
> +              - qcom,ipq4019-mdio
> +              - qcom,ipq5018-mdio
> +

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/5] dt-bindings: net: ipq4019-mdio: add IPQ8074 compatible
  2022-11-13 18:47 ` [PATCH 2/5] dt-bindings: net: ipq4019-mdio: add IPQ8074 compatible Robert Marko
@ 2022-11-14  8:27   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-14  8:27 UTC (permalink / raw)
  To: Robert Marko, agross, andersson, konrad.dybcio, davem, edumazet,
	kuba, pabeni, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
	netdev, devicetree, linux-kernel

On 13/11/2022 19:47, Robert Marko wrote:
> Allow using IPQ8074 specific compatible along with the fallback IPQ4019
> one in order to be able to specify which compatibles require clocks to
> be able to validate them via schema.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/5] dt-bindings: net: ipq4019-mdio: require and validate clocks
  2022-11-13 18:47 ` [PATCH 3/5] dt-bindings: net: ipq4019-mdio: require and validate clocks Robert Marko
@ 2022-11-14  8:29   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-14  8:29 UTC (permalink / raw)
  To: Robert Marko, agross, andersson, konrad.dybcio, davem, edumazet,
	kuba, pabeni, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
	netdev, devicetree, linux-kernel

On 13/11/2022 19:47, Robert Marko wrote:
> Now that we can match the platforms requiring clocks by compatible start
> using those to allow clocks per compatible and make them required.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
>  .../bindings/net/qcom,ipq4019-mdio.yaml       | 28 +++++++++++++------
>  1 file changed, 19 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> index 2c85ae43d27d..b34955b0b827 100644
> --- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> @@ -9,9 +9,6 @@ title: Qualcomm IPQ40xx MDIO Controller
>  maintainers:
>    - Robert Marko <robert.marko@sartura.hr>
>  
> -allOf:
> -  - $ref: "mdio.yaml#"
> -
>  properties:
>    compatible:
>      oneOf:
> @@ -40,18 +37,31 @@ properties:
>        the second Address and length of the register for ethernet LDO, this second
>        address range is only required by the platform IPQ50xx.
>  
> -  clocks:
> -    maxItems: 1

Keep it here.

> -    description: |
> -      MDIO clock source frequency fixed to 100MHZ, this clock should be specified
> -      by the platform IPQ807x, IPQ60xx and IPQ50xx.
> -
>  required:
>    - compatible
>    - reg
>    - "#address-cells"
>    - "#size-cells"
>  
> +allOf:
> +  - $ref: "mdio.yaml#"
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,ipq5018-mdio
> +              - qcom,ipq6018-mdio
> +              - qcom,ipq8074-mdio
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: MDIO clock source frequency fixed to 100MHZ
> +      required:
> +        - clocks

else:
  properties:
    clocks: false

> +
>  unevaluatedProperties: false
>  
>  examples:

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/5] dt-bindings: net: ipq4019-mdio: document required clock-names
  2022-11-13 18:47 ` [PATCH 4/5] dt-bindings: net: ipq4019-mdio: document required clock-names Robert Marko
@ 2022-11-14  8:30   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-14  8:30 UTC (permalink / raw)
  To: Robert Marko, agross, andersson, konrad.dybcio, davem, edumazet,
	kuba, pabeni, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
	netdev, devicetree, linux-kernel

On 13/11/2022 19:47, Robert Marko wrote:
> IPQ5018, IPQ6018 and IPQ8074 require clock-names to be set as driver is
> requesting the clock based on it and not index, so document that and make
> it required for the listed SoC-s.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
>  Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> index b34955b0b827..d233009b0d49 100644
> --- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> @@ -59,8 +59,12 @@ allOf:
>          clocks:
>            items:
>              - description: MDIO clock source frequency fixed to 100MHZ

Similarly to clocks, define clock-names in top-level and disallow them
for other variants. Do not define properties in allOf:if:then - it makes
schema difficult to maintain and read.

> +        clock-names:
> +          items:
> +            - const: gcc_mdio_ahb_clk
>        required:
>          - clocks
> +        - clock-names
>  
>  unevaluatedProperties: false
>  

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/5] arm64: dts: qcom: ipq8074: add SoC specific compatible to MDIO
  2022-11-13 18:47 ` [PATCH 5/5] arm64: dts: qcom: ipq8074: add SoC specific compatible to MDIO Robert Marko
@ 2022-11-14  8:30   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-14  8:30 UTC (permalink / raw)
  To: Robert Marko, agross, andersson, konrad.dybcio, davem, edumazet,
	kuba, pabeni, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
	netdev, devicetree, linux-kernel

On 13/11/2022 19:47, Robert Marko wrote:
> Add the newly documented SoC compatible to MDIO in order to be able to
> validate clocks for it.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +-

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-14  8:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-13 18:47 [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Robert Marko
2022-11-13 18:47 ` [PATCH 2/5] dt-bindings: net: ipq4019-mdio: add IPQ8074 compatible Robert Marko
2022-11-14  8:27   ` Krzysztof Kozlowski
2022-11-13 18:47 ` [PATCH 3/5] dt-bindings: net: ipq4019-mdio: require and validate clocks Robert Marko
2022-11-14  8:29   ` Krzysztof Kozlowski
2022-11-13 18:47 ` [PATCH 4/5] dt-bindings: net: ipq4019-mdio: document required clock-names Robert Marko
2022-11-14  8:30   ` Krzysztof Kozlowski
2022-11-13 18:47 ` [PATCH 5/5] arm64: dts: qcom: ipq8074: add SoC specific compatible to MDIO Robert Marko
2022-11-14  8:30   ` Krzysztof Kozlowski
2022-11-14  8:26 ` [PATCH 1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Krzysztof Kozlowski

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).