Re: [RFC PATCH net-next] net: phy: marvell: support DT configurations with only two LEDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 08, 2025 at 08:30:56AM +0200, Wolfram Sang wrote:
> The Renesas RZ/N1-extension board also connects only two out of three
> LED outputs from the Marvell PHY to the actual LEDs. The already
> existing setting MARVELL_PHY_LED0_LINK_LED1_ACTIVE fits this scenario,
> but a device flag cannot be used because the PHYs use a generic MDIO bus
> on which also PHYs from other vendors reside. So, the driver is updated
> to count the number of LED nodes in DT. If the number is 2, the
> alternative LED configuration is used, otherwise the default one.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Hi Wolfram

Please make use of the LED binding:

&mdio {
        pinctrl-0 = <&mdio_pins>;
        pinctrl-names = "default";
        phy0: ethernet-phy@0 {
                reg = <0>;
                leds {
                        #address-cells = <1>;
                        #size-cells = <0>;

                        led@0 {
                                reg = <0>;
                                color = <LED_COLOR_ID_WHITE>;
                                function = LED_FUNCTION_WAN;
                                default-state = "keep";
                        };
                };
        };

Just list the two LEDs you have connected.

	Andrew




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux