* [PATCH net-next] dt-bindings: net: phy: vsc8531: Convert to DT schema
@ 2025-10-24 20:18 Prabhakar
2025-10-24 21:27 ` Rob Herring (Arm)
2025-10-24 23:20 ` Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Prabhakar @ 2025-10-24 20:18 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Neil Armstrong, Heiko Stuebner, devicetree
Cc: netdev, linux-kernel, Prabhakar, Lad Prabhakar
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Convert VSC8531 Gigabit ethernet phy binding to DT schema format. While
at it add compatible string for VSC8541 PHY which is very much similar
to the VSC8531 PHY and is already supported in the kernel. VSC8541 PHY
is present on the Renesas RZ/T2H EVK.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Inspired from the DT warnings seen while running dtbs check [0],
took an opportunity to convert this binding to DT schema format.
As there was no entry in the maintainers file Ive added myself
as the maintainer for this binding.
[0] https://lore.kernel.org/all/176073765433.419659.2490051913988670515.robh@kernel.org/
Note,
1] dt_binding_check reports below warnings. But this looks like
the same for other DT bindings too which have dependencies defined.
./Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml:99:36: [warning] too few spaces after comma (commas)
<path>/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vsc8531' is a dependency of 'vsc8531,edge-slowdown'
from schema $id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml
<path>/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vddmac' is a dependency of 'vsc8531,edge-slowdown'
2] As there is no entry in maintainers file for this binding, Ive added myself
as the maintainer for this binding.
---
.../bindings/net/mscc-phy-vsc8531.txt | 73 ----------
.../bindings/net/mscc-phy-vsc8531.yaml | 125 ++++++++++++++++++
.../devicetree/bindings/vendor-prefixes.yaml | 2 +-
3 files changed, 126 insertions(+), 74 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
create mode 100644 Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml
diff --git a/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt b/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
deleted file mode 100644
index 0a3647fe331b..000000000000
--- a/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-* Microsemi - vsc8531 Giga bit ethernet phy
-
-Optional properties:
-- vsc8531,vddmac : The vddmac in mV. Allowed values is listed
- in the first row of Table 1 (below).
- This property is only used in combination
- with the 'edge-slowdown' property.
- Default value is 3300.
-- vsc8531,edge-slowdown : % the edge should be slowed down relative to
- the fastest possible edge time.
- Edge rate sets the drive strength of the MAC
- interface output signals. Changing the
- drive strength will affect the edge rate of
- the output signal. The goal of this setting
- is to help reduce electrical emission (EMI)
- by being able to reprogram drive strength
- and in effect slow down the edge rate if
- desired.
- To adjust the edge-slowdown, the 'vddmac'
- must be specified. Table 1 lists the
- supported edge-slowdown values for a given
- 'vddmac'.
- Default value is 0%.
- Ref: Table:1 - Edge rate change (below).
-- vsc8531,led-[N]-mode : LED mode. Specify how the LED[N] should behave.
- N depends on the number of LEDs supported by a
- PHY.
- Allowed values are defined in
- "include/dt-bindings/net/mscc-phy-vsc8531.h".
- Default values are VSC8531_LINK_1000_ACTIVITY (1),
- VSC8531_LINK_100_ACTIVITY (2),
- VSC8531_LINK_ACTIVITY (0) and
- VSC8531_DUPLEX_COLLISION (8).
-- load-save-gpios : GPIO used for the load/save operation of the PTP
- hardware clock (PHC).
-
-
-Table: 1 - Edge rate change
-----------------------------------------------------------------|
-| Edge Rate Change (VDDMAC) |
-| |
-| 3300 mV 2500 mV 1800 mV 1500 mV |
-|---------------------------------------------------------------|
-| 0% 0% 0% 0% |
-| (Fastest) (recommended) (recommended) |
-|---------------------------------------------------------------|
-| 2% 3% 5% 6% |
-|---------------------------------------------------------------|
-| 4% 6% 9% 14% |
-|---------------------------------------------------------------|
-| 7% 10% 16% 21% |
-|(recommended) (recommended) |
-|---------------------------------------------------------------|
-| 10% 14% 23% 29% |
-|---------------------------------------------------------------|
-| 17% 23% 35% 42% |
-|---------------------------------------------------------------|
-| 29% 37% 52% 58% |
-|---------------------------------------------------------------|
-| 53% 63% 76% 77% |
-| (slowest) |
-|---------------------------------------------------------------|
-
-Example:
-
- vsc8531_0: ethernet-phy@0 {
- compatible = "ethernet-phy-id0007.0570";
- vsc8531,vddmac = <3300>;
- vsc8531,edge-slowdown = <7>;
- vsc8531,led-0-mode = <VSC8531_LINK_1000_ACTIVITY>;
- vsc8531,led-1-mode = <VSC8531_LINK_100_ACTIVITY>;
- load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
- };
diff --git a/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml b/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml
new file mode 100644
index 000000000000..60691309b6a3
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml
@@ -0,0 +1,125 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microsemi VSC8531 Gigabit Ethernet PHY
+
+maintainers:
+ - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
+
+description:
+ The VSC8531 is a Gigabit Ethernet PHY with configurable MAC interface
+ drive strength and LED modes.
+
+allOf:
+ - $ref: ethernet-phy.yaml#
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ethernet-phy-id0007.0570 # VSC8531
+ - ethernet-phy-id0007.0772 # VSC8541
+ required:
+ - compatible
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - ethernet-phy-id0007.0570 # VSC8531
+ - ethernet-phy-id0007.0772 # VSC8541
+ - const: ethernet-phy-ieee802.3-c22
+
+ vsc8531,vddmac:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ The VDDMAC voltage in millivolts. This property is used in combination
+ with the edge-slowdown property to control the drive strength of the
+ MAC interface output signals.
+ enum: [3300, 2500, 1800, 1500]
+ default: 3300
+
+ vsc8531,edge-slowdown:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Percentage by which the edge rate should be slowed down relative to
+ the fastest possible edge time. This setting helps reduce electromagnetic
+ interference (EMI) by adjusting the drive strength of the MAC interface
+ output signals. Valid values depend on the vddmac voltage setting
+ according to the edge rate change table in the datasheet.
+ For vddmac=3300mV valid values are 0, 2, 4, 7, 10, 17, 29, 53. (7 recommended)
+ For vddmac=2500mV valid values are 0, 3, 6, 10, 14, 23, 37, 63. (10 recommended)
+ For vddmac=1800mV valid values are 0, 5, 9, 16, 23, 35, 52, 76. (0 recommended)
+ For vddmac=1500mV valid values are 0, 6, 14, 21, 29, 42, 58, 77. (0 recommended)
+ enum: [0, 2, 3, 4, 5, 6, 7, 9, 10, 14, 16, 17, 21, 23, 29, 35, 37, 42, 52, 53, 58, 63, 76, 77]
+ default: 0
+
+ vsc8531,led-0-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: LED[0] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
+ for available modes.
+ minimum: 0
+ maximum: 15
+ default: 1
+
+ vsc8531,led-1-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: LED[1] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
+ for available modes.
+ minimum: 0
+ maximum: 15
+ default: 2
+
+ vsc8531,led-2-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: LED[2] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
+ for available modes.
+ minimum: 0
+ maximum: 15
+ default: 0
+
+ vsc8531,led-3-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: LED[3] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
+ for available modes.
+ minimum: 0
+ maximum: 15
+ default: 8
+
+ load-save-gpios:
+ description: GPIO phandle used for the load/save operation of the PTP hardware
+ clock (PHC).
+ maxItems: 1
+
+dependencies:
+ vsc8531,edge-slowdown: [ vsc8531,vddmac ]
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/net/mscc-phy-vsc8531.h>
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-phy@0 {
+ compatible = "ethernet-phy-id0007.0772", "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ vsc8531,vddmac = <3300>;
+ vsc8531,edge-slowdown = <7>;
+ vsc8531,led-0-mode = <VSC8531_LINK_1000_ACTIVITY>;
+ vsc8531,led-1-mode = <VSC8531_LINK_100_ACTIVITY>;
+ load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 54ba517d7e79..1af57177a747 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -20,7 +20,7 @@ patternProperties:
"^(keypad|m25p|max8952|max8997|max8998|mpmc),.*": true
"^(pciclass|pinctrl-single|#pinctrl-single|PowerPC),.*": true
"^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*": true
- "^(simple-audio-card|st-plgpio|st-spics|ts),.*": true
+ "^(simple-audio-card|st-plgpio|st-spics|ts|vsc8531),.*": true
"^pool[0-3],.*": true
# Keep list in alphabetical order.
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: phy: vsc8531: Convert to DT schema
2025-10-24 20:18 [PATCH net-next] dt-bindings: net: phy: vsc8531: Convert to DT schema Prabhakar
@ 2025-10-24 21:27 ` Rob Herring (Arm)
2025-10-24 23:20 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2025-10-24 21:27 UTC (permalink / raw)
To: Prabhakar
Cc: netdev, Eric Dumazet, Jakub Kicinski, Andrew Lunn, Lad Prabhakar,
David S. Miller, Conor Dooley, devicetree, Neil Armstrong,
linux-kernel, Heiko Stuebner, Krzysztof Kozlowski, Paolo Abeni
On Fri, 24 Oct 2025 21:18:36 +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Convert VSC8531 Gigabit ethernet phy binding to DT schema format. While
> at it add compatible string for VSC8541 PHY which is very much similar
> to the VSC8531 PHY and is already supported in the kernel. VSC8541 PHY
> is present on the Renesas RZ/T2H EVK.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> Inspired from the DT warnings seen while running dtbs check [0],
> took an opportunity to convert this binding to DT schema format.
> As there was no entry in the maintainers file Ive added myself
> as the maintainer for this binding.
> [0] https://lore.kernel.org/all/176073765433.419659.2490051913988670515.robh@kernel.org/
>
> Note,
> 1] dt_binding_check reports below warnings. But this looks like
> the same for other DT bindings too which have dependencies defined.
> ./Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml:99:36: [warning] too few spaces after comma (commas)
> <path>/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vsc8531' is a dependency of 'vsc8531,edge-slowdown'
> from schema $id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml
> <path>/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vddmac' is a dependency of 'vsc8531,edge-slowdown'
> 2] As there is no entry in maintainers file for this binding, Ive added myself
> as the maintainer for this binding.
> ---
> .../bindings/net/mscc-phy-vsc8531.txt | 73 ----------
> .../bindings/net/mscc-phy-vsc8531.yaml | 125 ++++++++++++++++++
> .../devicetree/bindings/vendor-prefixes.yaml | 2 +-
> 3 files changed, 126 insertions(+), 74 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
> create mode 100644 Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
./Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml:99:36: [warning] too few spaces after comma (commas)
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vsc8531' is a dependency of 'vsc8531,edge-slowdown'
from schema $id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vddmac' is a dependency of 'vsc8531,edge-slowdown'
from schema $id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20251024201836.317324-1-prabhakar.mahadev-lad.rj@bp.renesas.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: phy: vsc8531: Convert to DT schema
2025-10-24 20:18 [PATCH net-next] dt-bindings: net: phy: vsc8531: Convert to DT schema Prabhakar
2025-10-24 21:27 ` Rob Herring (Arm)
@ 2025-10-24 23:20 ` Rob Herring
2025-10-25 4:20 ` Lad, Prabhakar
1 sibling, 1 reply; 4+ messages in thread
From: Rob Herring @ 2025-10-24 23:20 UTC (permalink / raw)
To: Prabhakar
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Heiko Stuebner, devicetree, netdev, linux-kernel, Lad Prabhakar
On Fri, Oct 24, 2025 at 09:18:36PM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Convert VSC8531 Gigabit ethernet phy binding to DT schema format. While
> at it add compatible string for VSC8541 PHY which is very much similar
> to the VSC8531 PHY and is already supported in the kernel. VSC8541 PHY
> is present on the Renesas RZ/T2H EVK.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> Inspired from the DT warnings seen while running dtbs check [0],
> took an opportunity to convert this binding to DT schema format.
> As there was no entry in the maintainers file Ive added myself
> as the maintainer for this binding.
> [0] https://lore.kernel.org/all/176073765433.419659.2490051913988670515.robh@kernel.org/
>
> Note,
> 1] dt_binding_check reports below warnings. But this looks like
> the same for other DT bindings too which have dependencies defined.
> ./Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml:99:36: [warning] too few spaces after comma (commas)
> <path>/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vsc8531' is a dependency of 'vsc8531,edge-slowdown'
> from schema $id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml
> <path>/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vddmac' is a dependency of 'vsc8531,edge-slowdown'
> 2] As there is no entry in maintainers file for this binding, Ive added myself
> as the maintainer for this binding.
> ---
> .../bindings/net/mscc-phy-vsc8531.txt | 73 ----------
> .../bindings/net/mscc-phy-vsc8531.yaml | 125 ++++++++++++++++++
> .../devicetree/bindings/vendor-prefixes.yaml | 2 +-
> 3 files changed, 126 insertions(+), 74 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
> create mode 100644 Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt b/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
> deleted file mode 100644
> index 0a3647fe331b..000000000000
> --- a/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
> +++ /dev/null
> @@ -1,73 +0,0 @@
> -* Microsemi - vsc8531 Giga bit ethernet phy
> -
> -Optional properties:
> -- vsc8531,vddmac : The vddmac in mV. Allowed values is listed
> - in the first row of Table 1 (below).
> - This property is only used in combination
> - with the 'edge-slowdown' property.
> - Default value is 3300.
> -- vsc8531,edge-slowdown : % the edge should be slowed down relative to
> - the fastest possible edge time.
> - Edge rate sets the drive strength of the MAC
> - interface output signals. Changing the
> - drive strength will affect the edge rate of
> - the output signal. The goal of this setting
> - is to help reduce electrical emission (EMI)
> - by being able to reprogram drive strength
> - and in effect slow down the edge rate if
> - desired.
> - To adjust the edge-slowdown, the 'vddmac'
> - must be specified. Table 1 lists the
> - supported edge-slowdown values for a given
> - 'vddmac'.
> - Default value is 0%.
> - Ref: Table:1 - Edge rate change (below).
> -- vsc8531,led-[N]-mode : LED mode. Specify how the LED[N] should behave.
> - N depends on the number of LEDs supported by a
> - PHY.
> - Allowed values are defined in
> - "include/dt-bindings/net/mscc-phy-vsc8531.h".
> - Default values are VSC8531_LINK_1000_ACTIVITY (1),
> - VSC8531_LINK_100_ACTIVITY (2),
> - VSC8531_LINK_ACTIVITY (0) and
> - VSC8531_DUPLEX_COLLISION (8).
> -- load-save-gpios : GPIO used for the load/save operation of the PTP
> - hardware clock (PHC).
> -
> -
> -Table: 1 - Edge rate change
> -----------------------------------------------------------------|
> -| Edge Rate Change (VDDMAC) |
> -| |
> -| 3300 mV 2500 mV 1800 mV 1500 mV |
> -|---------------------------------------------------------------|
> -| 0% 0% 0% 0% |
> -| (Fastest) (recommended) (recommended) |
> -|---------------------------------------------------------------|
> -| 2% 3% 5% 6% |
> -|---------------------------------------------------------------|
> -| 4% 6% 9% 14% |
> -|---------------------------------------------------------------|
> -| 7% 10% 16% 21% |
> -|(recommended) (recommended) |
> -|---------------------------------------------------------------|
> -| 10% 14% 23% 29% |
> -|---------------------------------------------------------------|
> -| 17% 23% 35% 42% |
> -|---------------------------------------------------------------|
> -| 29% 37% 52% 58% |
> -|---------------------------------------------------------------|
> -| 53% 63% 76% 77% |
> -| (slowest) |
> -|---------------------------------------------------------------|
> -
> -Example:
> -
> - vsc8531_0: ethernet-phy@0 {
> - compatible = "ethernet-phy-id0007.0570";
> - vsc8531,vddmac = <3300>;
> - vsc8531,edge-slowdown = <7>;
> - vsc8531,led-0-mode = <VSC8531_LINK_1000_ACTIVITY>;
> - vsc8531,led-1-mode = <VSC8531_LINK_100_ACTIVITY>;
> - load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
> - };
> diff --git a/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml b/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml
> new file mode 100644
> index 000000000000..60691309b6a3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml
> @@ -0,0 +1,125 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microsemi VSC8531 Gigabit Ethernet PHY
> +
> +maintainers:
> + - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> +
> +description:
> + The VSC8531 is a Gigabit Ethernet PHY with configurable MAC interface
> + drive strength and LED modes.
> +
> +allOf:
> + - $ref: ethernet-phy.yaml#
> +
> +select:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ethernet-phy-id0007.0570 # VSC8531
> + - ethernet-phy-id0007.0772 # VSC8541
> + required:
> + - compatible
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - ethernet-phy-id0007.0570 # VSC8531
> + - ethernet-phy-id0007.0772 # VSC8541
> + - const: ethernet-phy-ieee802.3-c22
> +
> + vsc8531,vddmac:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + The VDDMAC voltage in millivolts. This property is used in combination
> + with the edge-slowdown property to control the drive strength of the
> + MAC interface output signals.
> + enum: [3300, 2500, 1800, 1500]
> + default: 3300
> +
> + vsc8531,edge-slowdown:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
Use '>' if you have formatting.
> + Percentage by which the edge rate should be slowed down relative to
> + the fastest possible edge time. This setting helps reduce electromagnetic
> + interference (EMI) by adjusting the drive strength of the MAC interface
> + output signals. Valid values depend on the vddmac voltage setting
> + according to the edge rate change table in the datasheet.
> + For vddmac=3300mV valid values are 0, 2, 4, 7, 10, 17, 29, 53. (7 recommended)
> + For vddmac=2500mV valid values are 0, 3, 6, 10, 14, 23, 37, 63. (10 recommended)
> + For vddmac=1800mV valid values are 0, 5, 9, 16, 23, 35, 52, 76. (0 recommended)
> + For vddmac=1500mV valid values are 0, 6, 14, 21, 29, 42, 58, 77. (0 recommended)
Indent lists by 2 more spaces and a blank line before.
> + enum: [0, 2, 3, 4, 5, 6, 7, 9, 10, 14, 16, 17, 21, 23, 29, 35, 37, 42, 52, 53, 58, 63, 76, 77]
> + default: 0
> +
> + vsc8531,led-0-mode:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: LED[0] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
> + for available modes.
> + minimum: 0
> + maximum: 15
> + default: 1
> +
> + vsc8531,led-1-mode:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: LED[1] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
> + for available modes.
> + minimum: 0
> + maximum: 15
> + default: 2
> +
> + vsc8531,led-2-mode:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: LED[2] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
> + for available modes.
> + minimum: 0
> + maximum: 15
> + default: 0
> +
> + vsc8531,led-3-mode:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: LED[3] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
> + for available modes.
> + minimum: 0
> + maximum: 15
> + default: 8
> +
> + load-save-gpios:
> + description: GPIO phandle used for the load/save operation of the PTP hardware
> + clock (PHC).
> + maxItems: 1
> +
> +dependencies:
> + vsc8531,edge-slowdown: [ vsc8531,vddmac ]
You either need quotes on 'vsc8531,vddmac' or use this style:
vsc8531,edge-slowdown:
- vsc8531,vddmac
> +
> +required:
> + - compatible
> + - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/net/mscc-phy-vsc8531.h>
> +
> + mdio {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet-phy@0 {
> + compatible = "ethernet-phy-id0007.0772", "ethernet-phy-ieee802.3-c22";
> + reg = <0>;
> + vsc8531,vddmac = <3300>;
> + vsc8531,edge-slowdown = <7>;
> + vsc8531,led-0-mode = <VSC8531_LINK_1000_ACTIVITY>;
> + vsc8531,led-1-mode = <VSC8531_LINK_100_ACTIVITY>;
> + load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
> + };
> + };
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 54ba517d7e79..1af57177a747 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -20,7 +20,7 @@ patternProperties:
> "^(keypad|m25p|max8952|max8997|max8998|mpmc),.*": true
> "^(pciclass|pinctrl-single|#pinctrl-single|PowerPC),.*": true
> "^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*": true
> - "^(simple-audio-card|st-plgpio|st-spics|ts),.*": true
> + "^(simple-audio-card|st-plgpio|st-spics|ts|vsc8531),.*": true
> "^pool[0-3],.*": true
>
> # Keep list in alphabetical order.
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: phy: vsc8531: Convert to DT schema
2025-10-24 23:20 ` Rob Herring
@ 2025-10-25 4:20 ` Lad, Prabhakar
0 siblings, 0 replies; 4+ messages in thread
From: Lad, Prabhakar @ 2025-10-25 4:20 UTC (permalink / raw)
To: Rob Herring
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Heiko Stuebner, devicetree, netdev, linux-kernel, Lad Prabhakar
Hi Rob,
Thank you for the review.
On Sat, Oct 25, 2025 at 12:20 AM Rob Herring <robh@kernel.org> wrote:
>
> On Fri, Oct 24, 2025 at 09:18:36PM +0100, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Convert VSC8531 Gigabit ethernet phy binding to DT schema format. While
> > at it add compatible string for VSC8541 PHY which is very much similar
> > to the VSC8531 PHY and is already supported in the kernel. VSC8541 PHY
> > is present on the Renesas RZ/T2H EVK.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> > Inspired from the DT warnings seen while running dtbs check [0],
> > took an opportunity to convert this binding to DT schema format.
> > As there was no entry in the maintainers file Ive added myself
> > as the maintainer for this binding.
> > [0] https://lore.kernel.org/all/176073765433.419659.2490051913988670515.robh@kernel.org/
> >
> > Note,
> > 1] dt_binding_check reports below warnings. But this looks like
> > the same for other DT bindings too which have dependencies defined.
> > ./Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml:99:36: [warning] too few spaces after comma (commas)
> > <path>/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vsc8531' is a dependency of 'vsc8531,edge-slowdown'
> > from schema $id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml
> > <path>/mscc-phy-vsc8531.example.dtb: ethernet-phy@0 (ethernet-phy-id0007.0772): 'vddmac' is a dependency of 'vsc8531,edge-slowdown'
> > 2] As there is no entry in maintainers file for this binding, Ive added myself
> > as the maintainer for this binding.
> > ---
> > .../bindings/net/mscc-phy-vsc8531.txt | 73 ----------
> > .../bindings/net/mscc-phy-vsc8531.yaml | 125 ++++++++++++++++++
> > .../devicetree/bindings/vendor-prefixes.yaml | 2 +-
> > 3 files changed, 126 insertions(+), 74 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
> > create mode 100644 Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt b/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
> > deleted file mode 100644
> > index 0a3647fe331b..000000000000
> > --- a/Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
> > +++ /dev/null
> > @@ -1,73 +0,0 @@
> > -* Microsemi - vsc8531 Giga bit ethernet phy
> > -
<snip>
> > +$id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Microsemi VSC8531 Gigabit Ethernet PHY
> > +
> > +maintainers:
> > + - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > +
> > +description:
> > + The VSC8531 is a Gigabit Ethernet PHY with configurable MAC interface
> > + drive strength and LED modes.
> > +
> > +allOf:
> > + - $ref: ethernet-phy.yaml#
> > +
> > +select:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - ethernet-phy-id0007.0570 # VSC8531
> > + - ethernet-phy-id0007.0772 # VSC8541
> > + required:
> > + - compatible
> > +
> > +properties:
> > + compatible:
> > + items:
> > + - enum:
> > + - ethernet-phy-id0007.0570 # VSC8531
> > + - ethernet-phy-id0007.0772 # VSC8541
> > + - const: ethernet-phy-ieee802.3-c22
> > +
> > + vsc8531,vddmac:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description:
> > + The VDDMAC voltage in millivolts. This property is used in combination
> > + with the edge-slowdown property to control the drive strength of the
> > + MAC interface output signals.
> > + enum: [3300, 2500, 1800, 1500]
> > + default: 3300
> > +
> > + vsc8531,edge-slowdown:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description:
>
> Use '>' if you have formatting.
>
OK.
> > + Percentage by which the edge rate should be slowed down relative to
> > + the fastest possible edge time. This setting helps reduce electromagnetic
> > + interference (EMI) by adjusting the drive strength of the MAC interface
> > + output signals. Valid values depend on the vddmac voltage setting
> > + according to the edge rate change table in the datasheet.
> > + For vddmac=3300mV valid values are 0, 2, 4, 7, 10, 17, 29, 53. (7 recommended)
> > + For vddmac=2500mV valid values are 0, 3, 6, 10, 14, 23, 37, 63. (10 recommended)
> > + For vddmac=1800mV valid values are 0, 5, 9, 16, 23, 35, 52, 76. (0 recommended)
> > + For vddmac=1500mV valid values are 0, 6, 14, 21, 29, 42, 58, 77. (0 recommended)
>
> Indent lists by 2 more spaces and a blank line before.
>
Ok, will do.
> > + enum: [0, 2, 3, 4, 5, 6, 7, 9, 10, 14, 16, 17, 21, 23, 29, 35, 37, 42, 52, 53, 58, 63, 76, 77]
> > + default: 0
> > +
> > + vsc8531,led-0-mode:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: LED[0] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
> > + for available modes.
> > + minimum: 0
> > + maximum: 15
> > + default: 1
> > +
> > + vsc8531,led-1-mode:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: LED[1] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
> > + for available modes.
> > + minimum: 0
> > + maximum: 15
> > + default: 2
> > +
> > + vsc8531,led-2-mode:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: LED[2] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
> > + for available modes.
> > + minimum: 0
> > + maximum: 15
> > + default: 0
> > +
> > + vsc8531,led-3-mode:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: LED[3] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
> > + for available modes.
> > + minimum: 0
> > + maximum: 15
> > + default: 8
> > +
> > + load-save-gpios:
> > + description: GPIO phandle used for the load/save operation of the PTP hardware
> > + clock (PHC).
> > + maxItems: 1
> > +
> > +dependencies:
> > + vsc8531,edge-slowdown: [ vsc8531,vddmac ]
>
> You either need quotes on 'vsc8531,vddmac' or use this style:
>
If I use the quotes I get the below error, so I choose the below option instead.
mscc-phy-vsc8531.yaml:104:28: [error] string value is redundantly
quoted with any quotes (quoted-strings)
> vsc8531,edge-slowdown:
> - vsc8531,vddmac
>
Cheers,
Prabhakar
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-25 4:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24 20:18 [PATCH net-next] dt-bindings: net: phy: vsc8531: Convert to DT schema Prabhakar
2025-10-24 21:27 ` Rob Herring (Arm)
2025-10-24 23:20 ` Rob Herring
2025-10-25 4:20 ` Lad, Prabhakar
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).