public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arm: dts: bcm2711: Describe Ethernet LEDs
@ 2024-04-22 23:07 Florian Fainelli
  2024-04-23 14:15 ` Rob Herring
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2024-04-22 23:07 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: andrew, Florian Fainelli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Broadcom internal kernel review list,
	Andre Przywara, Geert Uytterhoeven, Viresh Kumar,
	Laurent Pinchart, Heiko Stuebner, Kunihiko Hayashi, Stefan Wahren,
	Uwe Kleine-König, Tony Lindgren,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	open list

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@broadcom.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";
+			};
+		};
 	};
 };
 
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>;
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] arm: dts: bcm2711: Describe Ethernet LEDs
@ 2024-04-22 23:08 Florian Fainelli
  2024-04-23  5:44 ` Stefan Wahren
  2024-04-23 14:15 ` Rob Herring
  0 siblings, 2 replies; 6+ messages in thread
From: Florian Fainelli @ 2024-04-22 23:08 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: andrew, Florian Fainelli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Broadcom internal kernel review list,
	Andre Przywara, Claudiu Beznea, Baruch Siach, Shawn Guo,
	Laurent Pinchart, Enric Balletbo i Serra, Heiko Stuebner,
	Viresh Kumar, Stefan Wahren, Paul Barker, Uwe Kleine-König,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	open list

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@broadcom.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";
+			};
+		};
 	};
 };
 
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>;
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm: dts: bcm2711: Describe Ethernet LEDs
  2024-04-22 23:08 Florian Fainelli
@ 2024-04-23  5:44 ` Stefan Wahren
  2024-04-23 16:38   ` Florian Fainelli
  2024-04-23 14:15 ` Rob Herring
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Wahren @ 2024-04-23  5:44 UTC (permalink / raw)
  To: Florian Fainelli, linux-arm-kernel
  Cc: andrew, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Broadcom internal kernel review list, Andre Przywara,
	Claudiu Beznea, Baruch Siach, Shawn Guo, Laurent Pinchart,
	Enric Balletbo i Serra, Heiko Stuebner, Viresh Kumar, Paul Barker,
	Uwe Kleine-König,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	open list

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@broadcom.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>;
>   };


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm: dts: bcm2711: Describe Ethernet LEDs
  2024-04-22 23:07 [PATCH v2] arm: dts: bcm2711: Describe Ethernet LEDs Florian Fainelli
@ 2024-04-23 14:15 ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2024-04-23 14:15 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Viresh Kumar, Uwe Kleine-König, Krzysztof Kozlowski,
	Heiko Stuebner, Kunihiko Hayashi, Stefan Wahren, devicetree,
	andrew, linux-rpi-kernel, linux-arm-kernel,
	Broadcom internal kernel review list, Andre Przywara,
	Laurent Pinchart, Geert Uytterhoeven, linux-arm-kernel,
	Tony Lindgren, Conor Dooley, linux-kernel


On Mon, 22 Apr 2024 16:07:31 -0700, Florian Fainelli wrote:
> 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@broadcom.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(+)
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y broadcom/bcm2711-rpi-4-b.dtb broadcom/bcm2711-rpi-400.dtb broadcom/bcm2711-rpi-cm4-io.dtb' for 20240422230733.1284055-1-florian.fainelli@broadcom.com:

arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dtb: ethernet-phy@0: leds: 'leds@1', 'leds@2' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/net/ethernet-phy.yaml#
arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dtb: ethernet-phy@1: leds: 'leds@0', 'leds@1' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/net/ethernet-phy.yaml#
arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dtb: ethernet-phy@1: leds: 'leds@0', 'leds@1' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/net/ethernet-phy.yaml#






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm: dts: bcm2711: Describe Ethernet LEDs
  2024-04-22 23:08 Florian Fainelli
  2024-04-23  5:44 ` Stefan Wahren
@ 2024-04-23 14:15 ` Rob Herring
  1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2024-04-23 14:15 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Baruch Siach, Enric Balletbo i Serra, Stefan Wahren, devicetree,
	Claudiu Beznea, Shawn Guo, linux-kernel, Uwe Kleine-König,
	Andre Przywara, Conor Dooley, Viresh Kumar, linux-arm-kernel,
	Broadcom internal kernel review list, linux-rpi-kernel,
	Heiko Stuebner, Krzysztof Kozlowski, Paul Barker, andrew,
	Laurent Pinchart


On Mon, 22 Apr 2024 16:08:09 -0700, Florian Fainelli wrote:
> 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@broadcom.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(+)
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y broadcom/bcm2711-rpi-4-b.dtb broadcom/bcm2711-rpi-400.dtb broadcom/bcm2711-rpi-cm4-io.dtb' for 20240422230811.1284092-1-florian.fainelli@broadcom.com:

arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dtb: ethernet-phy@1: leds: 'leds@0', 'leds@1' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/net/ethernet-phy.yaml#
arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dtb: ethernet-phy@1: leds: 'leds@0', 'leds@1' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/net/ethernet-phy.yaml#
arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dtb: ethernet-phy@0: leds: 'leds@1', 'leds@2' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/net/ethernet-phy.yaml#






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm: dts: bcm2711: Describe Ethernet LEDs
  2024-04-23  5:44 ` Stefan Wahren
@ 2024-04-23 16:38   ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2024-04-23 16:38 UTC (permalink / raw)
  To: Stefan Wahren, linux-arm-kernel
  Cc: andrew, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Broadcom internal kernel review list, Andre Przywara,
	Claudiu Beznea, Baruch Siach, Shawn Guo, Laurent Pinchart,
	Enric Balletbo i Serra, Heiko Stuebner, Viresh Kumar, Paul Barker,
	Uwe Kleine-König,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	open list

[-- Attachment #1: Type: text/plain, Size: 2658 bytes --]

On 4/22/24 22:44, Stefan Wahren wrote:
> 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@broadcom.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?

Yes the PHY numbering is local to the PHY, reg = 0 maps to LED1, reg = 1 
maps to LED2 and so on and so forth. There is no LED0 in the PHY 
datasheet, so I expect people writing DTSs to subtract by 1 when 
defining their "reg" property.

Will re-submit with the DT issues spotted by Rob's bot fixed.
-- 
Florian


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-23 16:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-22 23:07 [PATCH v2] arm: dts: bcm2711: Describe Ethernet LEDs Florian Fainelli
2024-04-23 14:15 ` Rob Herring
  -- strict thread matches above, loose matches on Subject: below --
2024-04-22 23:08 Florian Fainelli
2024-04-23  5:44 ` Stefan Wahren
2024-04-23 16:38   ` Florian Fainelli
2024-04-23 14:15 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox