[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <98273dd8-a5df-45bf-a46d-80fdba6cfb39@gmx.net>
Date: Tue, 23 Apr 2024 07:44:13 +0200
From: Stefan Wahren <wahrenst@....net>
To: Florian Fainelli <florian.fainelli@...adcom.com>,
linux-arm-kernel@...ts.infradead.org
Cc: andrew@...n.ch, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>,
Andre Przywara <andre.przywara@....com>,
Claudiu Beznea <claudiu.beznea@...on.dev>, Baruch Siach <baruch@...s.co.il>,
Shawn Guo <shawnguo@...nel.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Enric Balletbo i Serra <eballetbo@...il.com>,
Heiko Stuebner <heiko@...ech.de>, Viresh Kumar <viresh.kumar@...aro.org>,
Paul Barker <paul.barker@...cloud.com>,
Uwe Kleine-König <uwe@...ine-koenig.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
<linux-rpi-kernel@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] arm: dts: bcm2711: Describe Ethernet LEDs
Hi Florian,
Am 23.04.24 um 01:08 schrieb Florian Fainelli:
> Describe the Ethernet LEDs for the Raspberry Pi 4 model B board as well
> as the Raspberry Pi 4 CM board. The Raspberry Pi 400 board does not
> include RJ45 connector LEDs so the 'leds' node is deleted accordingly.
>
> Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>
> ---
> Changes in v2:
>
> - added "function = LED_FUNCTION_LAN"
>
> .../arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts | 20 +++++++++++++++++
> .../arm/boot/dts/broadcom/bcm2711-rpi-400.dts | 1 +
> .../boot/dts/broadcom/bcm2711-rpi-cm4-io.dts | 22 +++++++++++++++++++
> 3 files changed, 43 insertions(+)
>
> diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
> index cfc8cb5e10ba..7a0f495ff726 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
> +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
> @@ -5,6 +5,7 @@
> #include "bcm283x-rpi-led-deprecated.dtsi"
> #include "bcm283x-rpi-usb-peripheral.dtsi"
> #include "bcm283x-rpi-wifi-bt.dtsi"
> +#include <dt-bindings/leds/common.h>
>
> / {
> compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
> @@ -204,6 +205,25 @@ &genet_mdio {
> phy1: ethernet-phy@1 {
> /* No PHY interrupt */
> reg = <0x1>;
> +
> + leds {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + leds@0 {
> + reg = <0>;
> + color = <LED_COLOR_ID_GREEN>;
> + function = LED_FUNCTION_LAN;
> + default-state = "keep";
> + };
> +
> + leds@1 {
> + reg = <1>;
> + color = <LED_COLOR_ID_AMBER>;
> + function = LED_FUNCTION_LAN;
> + default-state = "keep";
> + };
> + };
this looks good to me, but i'm wondering about the address numbering.
This ones starts with 0 and the CM4 starts with 1. Does this come from
the PHY?
> };
> };
>
> diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts
> index 5a2869a18bd5..ca9be91b4f36 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts
> +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts
> @@ -30,6 +30,7 @@ &expgpio {
>
> &genet_mdio {
> clock-frequency = <1950000>;
> + /delete-node/ leds;
> };
>
> &led_pwr {
> diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> index 7c6a5bdf48aa..76cb20373095 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> @@ -1,5 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0
> /dts-v1/;
> +#include <dt-bindings/leds/common.h>
> #include "bcm2711-rpi-cm4.dtsi"
> #include "bcm283x-rpi-led-deprecated.dtsi"
> #include "bcm283x-rpi-usb-host.dtsi"
> @@ -110,6 +111,27 @@ rtc@51 {
> };
> };
>
> +&phy1 {
> + leds {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + leds@1 {
> + reg = <1>;
> + color = <LED_COLOR_ID_GREEN>;
> + function = LED_FUNCTION_LAN;
> + default-state = "keep";
> + };
> +
> + leds@2 {
> + reg = <2>;
> + color = <LED_COLOR_ID_AMBER>;
> + function = LED_FUNCTION_LAN;
> + default-state = "keep";
> + };
> + };
> +};
> +
> &led_act {
> gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
> };
Powered by blists - more mailing lists