diff mbox series

[v7,2/2] Documentation: devictree: Add ipq806x mdio bindings

Message ID 20200224211035.16897-2-ansuelsmth@gmail.com
State Changes Requested, archived
Headers show
Series None | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema fail build log

Commit Message

Christian Marangi Feb. 24, 2020, 9:10 p.m. UTC
Add documentations for ipq806x mdio driver.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
Changes in v7:
- Fix dt_binding_check problem

 .../bindings/net/qcom,ipq8064-mdio.yaml       | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml

Comments

Andrew Lunn Feb. 25, 2020, 1:39 a.m. UTC | #1
On Mon, Feb 24, 2020 at 10:10:31PM +0100, Ansuel Smith wrote:
> Add documentations for ipq806x mdio driver.
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
> Changes in v7:
> - Fix dt_binding_check problem
> 
>  .../bindings/net/qcom,ipq8064-mdio.yaml       | 55 +++++++++++++++++++
>  1 file changed, 55 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
> new file mode 100644
> index 000000000000..3178cbfdc661
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/qcom,ipq8064-mdio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm ipq806x MDIO bus controller
> +
> +maintainers:
> +  - Ansuel Smith <ansuelsmth@gmail.com>
> +
> +description: |+
> +  The ipq806x soc have a MDIO dedicated controller that is
> +  used to comunicate with the gmac phy conntected.

used to communicate with the connected gmac phy.

     Andrew
Rob Herring Feb. 25, 2020, 4:57 p.m. UTC | #2
On Mon, Feb 24, 2020 at 3:10 PM Ansuel Smith <ansuelsmth@gmail.com> wrote:
>

typo in the subject. Use 'dt-bindings: net: ...' for the subject prefix.

> Add documentations for ipq806x mdio driver.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
> Changes in v7:
> - Fix dt_binding_check problem

Um, no you didn't...

>
>  .../bindings/net/qcom,ipq8064-mdio.yaml       | 55 +++++++++++++++++++
>  1 file changed, 55 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
> new file mode 100644
> index 000000000000..3178cbfdc661
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later

Dual license new bindings please:

(GPL-2.0-only OR BSD-2-Clause)

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/qcom,ipq8064-mdio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm ipq806x MDIO bus controller
> +
> +maintainers:
> +  - Ansuel Smith <ansuelsmth@gmail.com>
> +
> +description: |+

Don't need '|+' unless you need specific formatting.

> +  The ipq806x soc have a MDIO dedicated controller that is
> +  used to comunicate with the gmac phy conntected.
> +  Child nodes of this MDIO bus controller node are standard
> +  Ethernet PHY device nodes as described in
> +  Documentation/devicetree/bindings/net/phy.txt
> +
> +allOf:
> +  - $ref: "mdio.yaml#"
> +
> +properties:
> +  compatible:
> +    const: qcom,ipq8064-mdio

blank line between properties please.

> +  reg:
> +    maxItems: 1
> +    description: address and length of the register set for the device

That's every 'reg', you can drop this.

> +  clocks:
> +    maxItems: 1
> +    description: A reference to the clock supplying the MDIO bus controller

That's every 'clocks', you can drop this.

> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - "#address-cells"
> +  - "#size-cells"
> +
> +examples:
> +  - |
> +    mdio0: mdio@37000000 {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        compatible = "qcom,ipq8064-mdio", "syscon";

'syscon' doesn't match the schema and is wrong.

> +        reg = <0x37000000 0x200000>;

> +        resets = <&gcc GMAC_CORE1_RESET>;
> +        reset-names = "stmmaceth";

Not documented.

> +        clocks = <&gcc GMAC_CORE1_CLK>;

You need to include the header for these defines.

> +
> +        switch@10 {
> +            compatible = "qca,qca8337";
> +            /* ... */
> +        };
> +    };
> --
> 2.25.0
>
Christian Marangi Feb. 25, 2020, 6:39 p.m. UTC | #3
> On Mon, Feb 24, 2020 at 3:10 PM Ansuel Smith <ansuelsmth@gmail.com>
> wrote:
> >
> 
> typo in the subject. Use 'dt-bindings: net: ...' for the subject prefix.
> 
> > Add documentations for ipq806x mdio driver.
> >
> > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> > ---
> > Changes in v7:
> > - Fix dt_binding_check problem
> 
> Um, no you didn't...
> 

Does make dt_check_binding still gives errors? 
If yes can you give me some advice on how to test only this since it gives me
errors on checking other upstream Documentation ? 
I will fix the other problem in v8. Sorry for the mess and thanks.

> >
> >  .../bindings/net/qcom,ipq8064-mdio.yaml       | 55
> +++++++++++++++++++
> >  1 file changed, 55 insertions(+)
> >  create mode 100644
> Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/net/qcom,ipq8064-
> mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq8064-
> mdio.yaml
> > new file mode 100644
> > index 000000000000..3178cbfdc661
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/qcom,ipq8064-
> mdio.yaml
> > @@ -0,0 +1,55 @@
> > +# SPDX-License-Identifier: GPL-2.0-or-later
> 
> Dual license new bindings please:
> 
> (GPL-2.0-only OR BSD-2-Clause)
> 
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/qcom,ipq8064-mdio.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Qualcomm ipq806x MDIO bus controller
> > +
> > +maintainers:
> > +  - Ansuel Smith <ansuelsmth@gmail.com>
> > +
> > +description: |+
> 
> Don't need '|+' unless you need specific formatting.
> 
> > +  The ipq806x soc have a MDIO dedicated controller that is
> > +  used to comunicate with the gmac phy conntected.
> > +  Child nodes of this MDIO bus controller node are standard
> > +  Ethernet PHY device nodes as described in
> > +  Documentation/devicetree/bindings/net/phy.txt
> > +
> > +allOf:
> > +  - $ref: "mdio.yaml#"
> > +
> > +properties:
> > +  compatible:
> > +    const: qcom,ipq8064-mdio
> 
> blank line between properties please.
> 
> > +  reg:
> > +    maxItems: 1
> > +    description: address and length of the register set for the device
> 
> That's every 'reg', you can drop this.
> 
> > +  clocks:
> > +    maxItems: 1
> > +    description: A reference to the clock supplying the MDIO bus
> controller
> 
> That's every 'clocks', you can drop this.
> 
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - clocks
> > +  - "#address-cells"
> > +  - "#size-cells"
> > +
> > +examples:
> > +  - |
> > +    mdio0: mdio@37000000 {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        compatible = "qcom,ipq8064-mdio", "syscon";
> 
> 'syscon' doesn't match the schema and is wrong.
> 
> > +        reg = <0x37000000 0x200000>;
> 
> > +        resets = <&gcc GMAC_CORE1_RESET>;
> > +        reset-names = "stmmaceth";
> 
> Not documented.
> 
> > +        clocks = <&gcc GMAC_CORE1_CLK>;
> 
> You need to include the header for these defines.
> 
> > +
> > +        switch@10 {
> > +            compatible = "qca,qca8337";
> > +            /* ... */
> > +        };
> > +    };
> > --
> > 2.25.0
> >
Rob Herring Feb. 26, 2020, 1:57 p.m. UTC | #4
On Tue, Feb 25, 2020 at 12:40 PM <ansuelsmth@gmail.com> wrote:
>
> > On Mon, Feb 24, 2020 at 3:10 PM Ansuel Smith <ansuelsmth@gmail.com>
> > wrote:
> > >
> >
> > typo in the subject. Use 'dt-bindings: net: ...' for the subject prefix.
> >
> > > Add documentations for ipq806x mdio driver.
> > >
> > > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> > > ---
> > > Changes in v7:
> > > - Fix dt_binding_check problem
> >
> > Um, no you didn't...
> >
>
> Does make dt_check_binding still gives errors?
> If yes can you give me some advice on how to test only this since it gives me
> errors on checking other upstream Documentation ?

Don't use linux-next. Linus' master is only warnings. If you have
errors on that, then you may need to update dtschema.

Also, using 'make -k' helps if there are make errors.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
new file mode 100644
index 000000000000..3178cbfdc661
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
@@ -0,0 +1,55 @@ 
+# SPDX-License-Identifier: GPL-2.0-or-later
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/qcom,ipq8064-mdio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm ipq806x MDIO bus controller
+
+maintainers:
+  - Ansuel Smith <ansuelsmth@gmail.com>
+
+description: |+
+  The ipq806x soc have a MDIO dedicated controller that is
+  used to comunicate with the gmac phy conntected.
+  Child nodes of this MDIO bus controller node are standard
+  Ethernet PHY device nodes as described in
+  Documentation/devicetree/bindings/net/phy.txt
+
+allOf:
+  - $ref: "mdio.yaml#"
+
+properties:
+  compatible:
+    const: qcom,ipq8064-mdio
+  reg:
+    maxItems: 1
+    description: address and length of the register set for the device
+  clocks:
+    maxItems: 1
+    description: A reference to the clock supplying the MDIO bus controller
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - "#address-cells"
+  - "#size-cells"
+
+examples:
+  - |
+    mdio0: mdio@37000000 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        compatible = "qcom,ipq8064-mdio", "syscon";
+        reg = <0x37000000 0x200000>;
+        resets = <&gcc GMAC_CORE1_RESET>;
+        reset-names = "stmmaceth";
+        clocks = <&gcc GMAC_CORE1_CLK>;
+
+        switch@10 {
+            compatible = "qca,qca8337";
+            /* ... */
+        };
+    };