Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: phy: vsc8531: Convert to DT schema

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>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20251025064850.393797-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Lad Prabhakar and committed by
Jakub Kicinski
19ab0a22 0ae1ac73

+132 -74
-73
Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
··· 1 - * Microsemi - vsc8531 Giga bit ethernet phy 2 - 3 - Optional properties: 4 - - vsc8531,vddmac : The vddmac in mV. Allowed values is listed 5 - in the first row of Table 1 (below). 6 - This property is only used in combination 7 - with the 'edge-slowdown' property. 8 - Default value is 3300. 9 - - vsc8531,edge-slowdown : % the edge should be slowed down relative to 10 - the fastest possible edge time. 11 - Edge rate sets the drive strength of the MAC 12 - interface output signals. Changing the 13 - drive strength will affect the edge rate of 14 - the output signal. The goal of this setting 15 - is to help reduce electrical emission (EMI) 16 - by being able to reprogram drive strength 17 - and in effect slow down the edge rate if 18 - desired. 19 - To adjust the edge-slowdown, the 'vddmac' 20 - must be specified. Table 1 lists the 21 - supported edge-slowdown values for a given 22 - 'vddmac'. 23 - Default value is 0%. 24 - Ref: Table:1 - Edge rate change (below). 25 - - vsc8531,led-[N]-mode : LED mode. Specify how the LED[N] should behave. 26 - N depends on the number of LEDs supported by a 27 - PHY. 28 - Allowed values are defined in 29 - "include/dt-bindings/net/mscc-phy-vsc8531.h". 30 - Default values are VSC8531_LINK_1000_ACTIVITY (1), 31 - VSC8531_LINK_100_ACTIVITY (2), 32 - VSC8531_LINK_ACTIVITY (0) and 33 - VSC8531_DUPLEX_COLLISION (8). 34 - - load-save-gpios : GPIO used for the load/save operation of the PTP 35 - hardware clock (PHC). 36 - 37 - 38 - Table: 1 - Edge rate change 39 - ----------------------------------------------------------------| 40 - | Edge Rate Change (VDDMAC) | 41 - | | 42 - | 3300 mV 2500 mV 1800 mV 1500 mV | 43 - |---------------------------------------------------------------| 44 - | 0% 0% 0% 0% | 45 - | (Fastest) (recommended) (recommended) | 46 - |---------------------------------------------------------------| 47 - | 2% 3% 5% 6% | 48 - |---------------------------------------------------------------| 49 - | 4% 6% 9% 14% | 50 - |---------------------------------------------------------------| 51 - | 7% 10% 16% 21% | 52 - |(recommended) (recommended) | 53 - |---------------------------------------------------------------| 54 - | 10% 14% 23% 29% | 55 - |---------------------------------------------------------------| 56 - | 17% 23% 35% 42% | 57 - |---------------------------------------------------------------| 58 - | 29% 37% 52% 58% | 59 - |---------------------------------------------------------------| 60 - | 53% 63% 76% 77% | 61 - | (slowest) | 62 - |---------------------------------------------------------------| 63 - 64 - Example: 65 - 66 - vsc8531_0: ethernet-phy@0 { 67 - compatible = "ethernet-phy-id0007.0570"; 68 - vsc8531,vddmac = <3300>; 69 - vsc8531,edge-slowdown = <7>; 70 - vsc8531,led-0-mode = <VSC8531_LINK_1000_ACTIVITY>; 71 - vsc8531,led-1-mode = <VSC8531_LINK_100_ACTIVITY>; 72 - load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; 73 - };
+131
Documentation/devicetree/bindings/net/mscc-phy-vsc8531.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Microsemi VSC8531 Gigabit Ethernet PHY 8 + 9 + maintainers: 10 + - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> 11 + 12 + description: 13 + The VSC8531 is a Gigabit Ethernet PHY with configurable MAC interface 14 + drive strength and LED modes. 15 + 16 + allOf: 17 + - $ref: ethernet-phy.yaml# 18 + 19 + select: 20 + properties: 21 + compatible: 22 + contains: 23 + enum: 24 + - ethernet-phy-id0007.0570 # VSC8531 25 + - ethernet-phy-id0007.0772 # VSC8541 26 + required: 27 + - compatible 28 + 29 + properties: 30 + compatible: 31 + items: 32 + - enum: 33 + - ethernet-phy-id0007.0570 # VSC8531 34 + - ethernet-phy-id0007.0772 # VSC8541 35 + - const: ethernet-phy-ieee802.3-c22 36 + 37 + vsc8531,vddmac: 38 + $ref: /schemas/types.yaml#/definitions/uint32 39 + description: 40 + The VDDMAC voltage in millivolts. This property is used in combination 41 + with the edge-slowdown property to control the drive strength of the 42 + MAC interface output signals. 43 + enum: [3300, 2500, 1800, 1500] 44 + default: 3300 45 + 46 + vsc8531,edge-slowdown: 47 + $ref: /schemas/types.yaml#/definitions/uint32 48 + description: > 49 + Percentage by which the edge rate should be slowed down relative to 50 + the fastest possible edge time. This setting helps reduce electromagnetic 51 + interference (EMI) by adjusting the drive strength of the MAC interface 52 + output signals. Valid values depend on the vddmac voltage setting 53 + according to the edge rate change table in the datasheet. 54 + 55 + - When vsc8531,vddmac = 3300 mV: allowed values are 0, 2, 4, 7, 10, 17, 29, and 53. 56 + (Recommended: 7) 57 + - When vsc8531,vddmac = 2500 mV: allowed values are 0, 3, 6, 10, 14, 23, 37, and 63. 58 + (Recommended: 10) 59 + - When vsc8531,vddmac = 1800 mV: allowed values are 0, 5, 9, 16, 23, 35, 52, and 76. 60 + (Recommended: 0) 61 + - When vsc8531,vddmac = 1500 mV: allowed values are 0, 6, 14, 21, 29, 42, 58, and 77. 62 + (Recommended: 0) 63 + 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] 64 + default: 0 65 + 66 + vsc8531,led-0-mode: 67 + $ref: /schemas/types.yaml#/definitions/uint32 68 + description: LED[0] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h 69 + for available modes. 70 + minimum: 0 71 + maximum: 15 72 + default: 1 73 + 74 + vsc8531,led-1-mode: 75 + $ref: /schemas/types.yaml#/definitions/uint32 76 + description: LED[1] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h 77 + for available modes. 78 + minimum: 0 79 + maximum: 15 80 + default: 2 81 + 82 + vsc8531,led-2-mode: 83 + $ref: /schemas/types.yaml#/definitions/uint32 84 + description: LED[2] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h 85 + for available modes. 86 + minimum: 0 87 + maximum: 15 88 + default: 0 89 + 90 + vsc8531,led-3-mode: 91 + $ref: /schemas/types.yaml#/definitions/uint32 92 + description: LED[3] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h 93 + for available modes. 94 + minimum: 0 95 + maximum: 15 96 + default: 8 97 + 98 + load-save-gpios: 99 + description: GPIO phandle used for the load/save operation of the PTP hardware 100 + clock (PHC). 101 + maxItems: 1 102 + 103 + dependencies: 104 + vsc8531,edge-slowdown: 105 + - vsc8531,vddmac 106 + 107 + required: 108 + - compatible 109 + - reg 110 + 111 + unevaluatedProperties: false 112 + 113 + examples: 114 + - | 115 + #include <dt-bindings/gpio/gpio.h> 116 + #include <dt-bindings/net/mscc-phy-vsc8531.h> 117 + 118 + mdio { 119 + #address-cells = <1>; 120 + #size-cells = <0>; 121 + 122 + ethernet-phy@0 { 123 + compatible = "ethernet-phy-id0007.0772", "ethernet-phy-ieee802.3-c22"; 124 + reg = <0>; 125 + vsc8531,vddmac = <3300>; 126 + vsc8531,edge-slowdown = <7>; 127 + vsc8531,led-0-mode = <VSC8531_LINK_1000_ACTIVITY>; 128 + vsc8531,led-1-mode = <VSC8531_LINK_100_ACTIVITY>; 129 + load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; 130 + }; 131 + };
+1 -1
Documentation/devicetree/bindings/vendor-prefixes.yaml
··· 20 20 "^(keypad|m25p|max8952|max8997|max8998|mpmc),.*": true 21 21 "^(pciclass|pinctrl-single|#pinctrl-single|PowerPC),.*": true 22 22 "^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*": true 23 - "^(simple-audio-card|st-plgpio|st-spics|ts),.*": true 23 + "^(simple-audio-card|st-plgpio|st-spics|ts|vsc8531),.*": true 24 24 "^pool[0-3],.*": true 25 25 26 26 # Keep list in alphabetical order.