diff mbox series

[v2,7/7] dt-bindings: adin1100: Add binding for ADIN1100 Ethernet PHY

Message ID 20210712130631.38153-8-alexandru.tachici@analog.com
State Changes Requested, archived
Headers show
Series net: phy: adin1100: Add initial support for ADIN1100 industrial PHY | expand

Checks

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

Commit Message

alexandru.tachici@analog.com July 12, 2021, 1:06 p.m. UTC
From: Alexandru Tachici <alexandru.tachici@analog.com>

DT bindings for the ADIN1100 10BASE-T1L Ethernet PHY.

Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
---
 .../devicetree/bindings/net/adi,adin1100.yaml | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/adi,adin1100.yaml

Comments

Rob Herring July 12, 2021, 2:12 p.m. UTC | #1
On Mon, 12 Jul 2021 16:06:31 +0300, alexandru.tachici@analog.com wrote:
> From: Alexandru Tachici <alexandru.tachici@analog.com>
> 
> DT bindings for the ADIN1100 10BASE-T1L Ethernet PHY.
> 
> Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
> ---
>  .../devicetree/bindings/net/adi,adin1100.yaml | 45 +++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/adi,adin1100.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/net/adi,adin1100.example.dt.yaml:0:0: /example-0/ethernet@e000c000: failed to match any schema with compatible: ['cdns,zynq-gem', 'cdns,gem']
Documentation/devicetree/bindings/net/adi,adin1100.example.dt.yaml:0:0: /example-0/ethernet@e000c000: failed to match any schema with compatible: ['cdns,zynq-gem', 'cdns,gem']
\ndoc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1503981

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Rob Herring July 12, 2021, 5:46 p.m. UTC | #2
On Mon, Jul 12, 2021 at 08:12:53AM -0600, Rob Herring wrote:
> On Mon, 12 Jul 2021 16:06:31 +0300, alexandru.tachici@analog.com wrote:
> > From: Alexandru Tachici <alexandru.tachici@analog.com>
> > 
> > DT bindings for the ADIN1100 10BASE-T1L Ethernet PHY.
> > 
> > Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
> > ---
> >  .../devicetree/bindings/net/adi,adin1100.yaml | 45 +++++++++++++++++++
> >  1 file changed, 45 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/net/adi,adin1100.yaml
> > 
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> Documentation/devicetree/bindings/net/adi,adin1100.example.dt.yaml:0:0: /example-0/ethernet@e000c000: failed to match any schema with compatible: ['cdns,zynq-gem', 'cdns,gem']
> Documentation/devicetree/bindings/net/adi,adin1100.example.dt.yaml:0:0: /example-0/ethernet@e000c000: failed to match any schema with compatible: ['cdns,zynq-gem', 'cdns,gem']

Please either convert the above binding or use something that already 
has a schema.

Rob
Oleksij Rempel July 27, 2021, 5:53 a.m. UTC | #3
On Mon, Jul 12, 2021 at 04:06:31PM +0300, alexandru.tachici@analog.com wrote:
> From: Alexandru Tachici <alexandru.tachici@analog.com>
> 
> DT bindings for the ADIN1100 10BASE-T1L Ethernet PHY.
> 
> Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
> ---
>  .../devicetree/bindings/net/adi,adin1100.yaml | 45 +++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/adi,adin1100.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/adi,adin1100.yaml b/Documentation/devicetree/bindings/net/adi,adin1100.yaml
> new file mode 100644
> index 000000000000..14943164da7a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/adi,adin1100.yaml
> @@ -0,0 +1,45 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/adi,adin1100.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices ADIN1100 PHY
> +
> +maintainers:
> +  - Alexandru Tachici <alexandru.tachici@analog.com>
> +
> +description:
> +  Bindings for Analog Devices Industrial Low Power 10BASE-T1L Ethernet PHY
> +
> +allOf:
> +  - $ref: ethernet-phy.yaml#
> +
> +properties:
> +  adi,disable-2400mv-tx-level:
> +    description:
> +      Prevent ADIN1100 from using the 2.4 V pk-pk transmit level.
> +    type: boolean

This property should be generic. It is defined by IEEE 802.3cg 2019 and can
be implemented on all T1L PHYs.

I assume, it should be something like:
ethernet-phy-10base-t1l-2.4vpp-enable
ethernet-phy-10base-t1l-2.4vpp-disable

To overwrite bootstrapped of fuzed values if supported. The IEEE 802.3cg
specification uses following wordings for this functionality:
"10BASE-T1L increased transmit level request ..."

"146.5.4.1 Transmitter output voltage
When tested with the test fixture shown in Figure 146–20 with the transmitter
in test mode 1, the transmitter output voltage shall be 2.4 V + 5%/ – 15%
peak-to-peak (for the 2.4 Vpp operating mode) and 1.0 V + 5%/ – 15%
peak-to-peak (for the 1.0 Vpp operating mode). Transmitter output
voltage can be set using the management interface or by hardware default set-up."

I would recommend to use similar wording if possible.


> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    ethernet@e000c000 {
> +            compatible = "cdns,zynq-gem", "cdns,gem";
> +            reg = <0xe000c000 0x1000>;
> +            status = "okay";
> +            phy-mode = "mii";
> +            interrupts = <0 45 4>;
> +            clocks = <&clkc 31>, <&clkc 31>, <&clkc 14>;
> +            clock-names = "pclk", "hclk", "tx_clk";
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            ethernet-phy@0 {
> +                    reg = <0>;
> +                    device_type = "ethernet-phy";
> +                    adi,disable-2400mv-tx-level;
> +            };
> +
> +    };
> -- 
> 2.25.1
> 
>
Rob Herring July 28, 2021, 5:23 p.m. UTC | #4
On Mon, Jul 26, 2021 at 11:53 PM Oleksij Rempel <o.rempel@pengutronix.de> wrote:
>
> On Mon, Jul 12, 2021 at 04:06:31PM +0300, alexandru.tachici@analog.com wrote:
> > From: Alexandru Tachici <alexandru.tachici@analog.com>
> >
> > DT bindings for the ADIN1100 10BASE-T1L Ethernet PHY.
> >
> > Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
> > ---
> >  .../devicetree/bindings/net/adi,adin1100.yaml | 45 +++++++++++++++++++
> >  1 file changed, 45 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/net/adi,adin1100.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/net/adi,adin1100.yaml b/Documentation/devicetree/bindings/net/adi,adin1100.yaml
> > new file mode 100644
> > index 000000000000..14943164da7a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/adi,adin1100.yaml
> > @@ -0,0 +1,45 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/adi,adin1100.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Analog Devices ADIN1100 PHY
> > +
> > +maintainers:
> > +  - Alexandru Tachici <alexandru.tachici@analog.com>
> > +
> > +description:
> > +  Bindings for Analog Devices Industrial Low Power 10BASE-T1L Ethernet PHY
> > +
> > +allOf:
> > +  - $ref: ethernet-phy.yaml#
> > +
> > +properties:
> > +  adi,disable-2400mv-tx-level:
> > +    description:
> > +      Prevent ADIN1100 from using the 2.4 V pk-pk transmit level.
> > +    type: boolean
>
> This property should be generic. It is defined by IEEE 802.3cg 2019 and can
> be implemented on all T1L PHYs.
>
> I assume, it should be something like:
> ethernet-phy-10base-t1l-2.4vpp-enable
> ethernet-phy-10base-t1l-2.4vpp-disable

'ethernet-phy-' is a bit redundant and I'd make it a tristate (not
present, 0, 1). So just '10base-t1l-2.4vpp'?

> To overwrite bootstrapped of fuzed values if supported. The IEEE 802.3cg
> specification uses following wordings for this functionality:
> "10BASE-T1L increased transmit level request ..."
Oleksij Rempel July 29, 2021, 5:02 a.m. UTC | #5
On Wed, Jul 28, 2021 at 11:23:12AM -0600, Rob Herring wrote:
> On Mon, Jul 26, 2021 at 11:53 PM Oleksij Rempel <o.rempel@pengutronix.de> wrote:
> >
> > On Mon, Jul 12, 2021 at 04:06:31PM +0300, alexandru.tachici@analog.com wrote:
> > > From: Alexandru Tachici <alexandru.tachici@analog.com>
> > >
> > > DT bindings for the ADIN1100 10BASE-T1L Ethernet PHY.
> > >
> > > Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
> > > ---
> > >  .../devicetree/bindings/net/adi,adin1100.yaml | 45 +++++++++++++++++++
> > >  1 file changed, 45 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/net/adi,adin1100.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/net/adi,adin1100.yaml b/Documentation/devicetree/bindings/net/adi,adin1100.yaml
> > > new file mode 100644
> > > index 000000000000..14943164da7a
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/net/adi,adin1100.yaml
> > > @@ -0,0 +1,45 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/net/adi,adin1100.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Analog Devices ADIN1100 PHY
> > > +
> > > +maintainers:
> > > +  - Alexandru Tachici <alexandru.tachici@analog.com>
> > > +
> > > +description:
> > > +  Bindings for Analog Devices Industrial Low Power 10BASE-T1L Ethernet PHY
> > > +
> > > +allOf:
> > > +  - $ref: ethernet-phy.yaml#
> > > +
> > > +properties:
> > > +  adi,disable-2400mv-tx-level:
> > > +    description:
> > > +      Prevent ADIN1100 from using the 2.4 V pk-pk transmit level.
> > > +    type: boolean
> >
> > This property should be generic. It is defined by IEEE 802.3cg 2019 and can
> > be implemented on all T1L PHYs.
> >
> > I assume, it should be something like:
> > ethernet-phy-10base-t1l-2.4vpp-enable
> > ethernet-phy-10base-t1l-2.4vpp-disable
> 
> 'ethernet-phy-' is a bit redundant and I'd make it a tristate (not
> present, 0, 1). So just '10base-t1l-2.4vpp'?
> 
> > To overwrite bootstrapped of fuzed values if supported. The IEEE 802.3cg
> > specification uses following wordings for this functionality:
> > "10BASE-T1L increased transmit level request ..."

sounds ok for me.

Regards,
Oleksij
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/adi,adin1100.yaml b/Documentation/devicetree/bindings/net/adi,adin1100.yaml
new file mode 100644
index 000000000000..14943164da7a
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/adi,adin1100.yaml
@@ -0,0 +1,45 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/adi,adin1100.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices ADIN1100 PHY
+
+maintainers:
+  - Alexandru Tachici <alexandru.tachici@analog.com>
+
+description:
+  Bindings for Analog Devices Industrial Low Power 10BASE-T1L Ethernet PHY
+
+allOf:
+  - $ref: ethernet-phy.yaml#
+
+properties:
+  adi,disable-2400mv-tx-level:
+    description:
+      Prevent ADIN1100 from using the 2.4 V pk-pk transmit level.
+    type: boolean
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    ethernet@e000c000 {
+            compatible = "cdns,zynq-gem", "cdns,gem";
+            reg = <0xe000c000 0x1000>;
+            status = "okay";
+            phy-mode = "mii";
+            interrupts = <0 45 4>;
+            clocks = <&clkc 31>, <&clkc 31>, <&clkc 14>;
+            clock-names = "pclk", "hclk", "tx_clk";
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            ethernet-phy@0 {
+                    reg = <0>;
+                    device_type = "ethernet-phy";
+                    adi,disable-2400mv-tx-level;
+            };
+
+    };