From: Fedor Ross <fedor.ross@ifm.com>
To: Woojung Huh <woojung.huh@microchip.com>,
<UNGLinuxDriver@microchip.com>, Andrew Lunn <andrew@lunn.ch>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Marek Vasut <marex@denx.de>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Woojung Huh <Woojung.Huh@microchip.com>,
<devicetree@vger.kernel.org>,
Tristram Ha <tristram.ha@microchip.com>,
Fedor Ross <fedor.ross@ifm.com>
Subject: [PATCH net-next 2/2] dt-bindings: net: dsa: microchip: Add of config for LED mode for ksz87xx and ksz88x3
Date: Mon, 9 Dec 2024 18:58:52 +0100 [thread overview]
Message-ID: <20241209-netdev-net-next-ksz8_led-mode-v1-2-c7b52c2ebf1b@ifm.com> (raw)
In-Reply-To: <20241209-netdev-net-next-ksz8_led-mode-v1-0-c7b52c2ebf1b@ifm.com>
Add support for the led-mode property for the following PHYs which have
a single LED mode configuration value.
KSZ8765, KSZ8794 and KSZ8795 use register 0x0b bits 5,4 to control the
LED configuration.
KSZ8863 and KSZ8873 use register 0xc3 bits 5,4 to control the LED
configuration.
Signed-off-by: Fedor Ross <fedor.ross@ifm.com>
---
.../devicetree/bindings/net/dsa/microchip,ksz.yaml | 89 +++++++++++++---------
1 file changed, 55 insertions(+), 34 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
index 62ca63e8a26fda0615cc254acca620f14f47cd10..2420e63d80249e533a34f992a0d3d12d926a3aa6 100644
--- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
@@ -10,9 +10,6 @@ maintainers:
- Marek Vasut <marex@denx.de>
- Woojung Huh <Woojung.Huh@microchip.com>
-allOf:
- - $ref: /schemas/spi/spi-peripheral-props.yaml#
-
properties:
# See Documentation/devicetree/bindings/net/dsa/dsa.yaml for a list of additional
# required and optional properties.
@@ -106,38 +103,62 @@ required:
- compatible
- reg
-if:
- not:
- properties:
- compatible:
- enum:
- - microchip,ksz8863
- - microchip,ksz8873
-then:
- $ref: dsa.yaml#/$defs/ethernet-ports
-else:
- patternProperties:
- "^(ethernet-)?ports$":
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - if:
+ not:
+ properties:
+ compatible:
+ enum:
+ - microchip,ksz8863
+ - microchip,ksz8873
+ then:
+ $ref: dsa.yaml#/$defs/ethernet-ports
+ else:
patternProperties:
- "^(ethernet-)?port@[0-2]$":
- $ref: dsa-port.yaml#
- unevaluatedProperties: false
- properties:
- microchip,rmii-clk-internal:
- $ref: /schemas/types.yaml#/definitions/flag
- description:
- When ksz88x3 is acting as clock provier (via REFCLKO) it
- can select between internal and external RMII reference
- clock. Internal reference clock means that the clock for
- the RMII of ksz88x3 is provided by the ksz88x3 internally
- and the REFCLKI pin is unconnected. For the external
- reference clock, the clock needs to be fed back to ksz88x3
- via REFCLKI.
- If microchip,rmii-clk-internal is set, ksz88x3 will provide
- rmii reference clock internally, otherwise reference clock
- should be provided externally.
- dependencies:
- microchip,rmii-clk-internal: [ethernet]
+ "^(ethernet-)?ports$":
+ patternProperties:
+ "^(ethernet-)?port@[0-2]$":
+ $ref: dsa-port.yaml#
+ unevaluatedProperties: false
+ properties:
+ microchip,rmii-clk-internal:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ When ksz88x3 is acting as clock provier (via REFCLKO) it
+ can select between internal and external RMII reference
+ clock. Internal reference clock means that the clock for
+ the RMII of ksz88x3 is provided by the ksz88x3 internally
+ and the REFCLKI pin is unconnected. For the external
+ reference clock, the clock needs to be fed back to ksz88x3
+ via REFCLKI.
+ If microchip,rmii-clk-internal is set, ksz88x3 will provide
+ rmii reference clock internally, otherwise reference clock
+ should be provided externally.
+ dependencies:
+ microchip,rmii-clk-internal: [ethernet]
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - microchip,ksz8765
+ - microchip,ksz8794
+ - microchip,ksz8795
+ - microchip,ksz8863
+ - microchip,ksz8873
+ then:
+ properties:
+ microchip,led-mode:
+ description:
+ Set LED mode for ksz8765, ksz8794 or ksz8795 (Register 0x0B, bits 5..4)
+ and ksz8863 or ksz8873 (Register 0xC3, bits 5..4).
+ items:
+ enum:
+ - 0 # LED0: Link/ACT, LED1: Speed
+ - 1 # LED0: Link, LED1: ACT
+ - 2 # LED0: Link/ACT, LED1: Duplex
+ - 3 # LED0: Link, LED1: Duplex
unevaluatedProperties: false
--
2.34.1
next prev parent reply other threads:[~2024-12-09 18:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 17:58 [PATCH net-next 0/2] " Fedor Ross
2024-12-09 17:58 ` [PATCH net-next 1/2] " Fedor Ross
2024-12-09 17:58 ` Fedor Ross [this message]
2024-12-09 18:22 ` [PATCH net-next 0/2] " Andrew Lunn
2024-12-09 20:26 ` Marek Vasut
2024-12-17 13:34 ` Rob Herring
2024-12-17 18:57 ` fedor.ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241209-netdev-net-next-ksz8_led-mode-v1-2-c7b52c2ebf1b@ifm.com \
--to=fedor.ross@ifm.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=tristram.ha@microchip.com \
--cc=woojung.huh@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®