The LAN9303 and LAN9354 select the function of all six LED pins with a single LED_FUN field. On some boards the LED straps double as configuration straps for other functions, such as the PHY address or the EEPROM size, so the desired LED mode cannot be strapped. Document an optional "smsc,led-mode" property. The value 110b is reserved on the LAN9354. Signed-off-by: Paul Louvel (Schneider Electric) --- .../devicetree/bindings/net/dsa/smsc,lan9303.yaml | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml b/Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml index 95abf043a118..f044589b643d 100644 --- a/Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml +++ b/Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml @@ -40,6 +40,18 @@ properties: default: 200 $ref: /schemas/types.yaml#/definitions/uint32 + smsc,led-mode: + description: | + LED function mode. + + This value will apply a predefined configuration to all six LED pins of + both external ports. See the "LED Operation" section of the datasheet. + + When the property is absent, the value sampled from the configuration + straps is kept. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + required: - compatible - reg @@ -48,6 +60,19 @@ unevaluatedProperties: false allOf: - $ref: dsa.yaml# + - if: + properties: + compatible: + contains: + const: microchip,lan9354-mdio + then: + properties: + smsc,led-mode: + enum: [0, 1, 2, 3, 4, 5, 7] + else: + properties: + smsc,led-mode: + maximum: 3 examples: - | -- 2.56.1