Skip to contentSkip to conversation

drivers: led: led_bcm6753: initial support

PATCH In review Philippe Reynes 2 participants 8 messages Feb 17, 2022 – Mar 7, 2022 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 drivers: led: led_bcm6753: initial support

Add the support of the LED IP for bcm6357. This
LED IP supports blinking, fading and pulsating,
but for the moment, only blinking is supported.

---
 drivers/led/Kconfig       |   7 +
 drivers/led/Makefile      |   1 +
 drivers/led/led_bcm6753.c | 270 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 278 insertions(+)
 create mode 100644 drivers/led/led_bcm6753.c
drivers/led/Kconfig +7 -0
index cc87fbf395..430d0760ba 100644
@@ -28,6 +28,13 @@ config LED_BCM6358
 	  LED HW controller accessed via MMIO registers.
 	  HW has no blinking capabilities and up to 32 LEDs can be controlled.
 
+config LED_BCM6753
+	bool "LED Support for BCM6753"
+	depends on LED && ARCH_BCM6753
+	help
+	  This option enables support for LEDs connected to the BCM6753
+	  HW has blinking and fading capabilities and up to 32 LEDs can be controlled.
+
 config LED_BCM6858
 	bool "LED Support for BCM6858"
 	depends on LED && (ARCH_BCM68360 || ARCH_BCM6858 || ARCH_BCM63158)
drivers/led/Makefile +1 -0
index 8e3ae7f146..2aa2c2173a 100644
@@ -6,6 +6,7 @@
 obj-y += led-uclass.o
 obj-$(CONFIG_LED_BCM6328) += led_bcm6328.o
 obj-$(CONFIG_LED_BCM6358) += led_bcm6358.o
+obj-$(CONFIG_LED_BCM6753) += led_bcm6753.o
 obj-$(CONFIG_LED_BCM6858) += led_bcm6858.o
 obj-$(CONFIG_$(SPL_)LED_GPIO) += led_gpio.o
 obj-$(CONFIG_LED_CORTINA) += led_cortina.o
drivers/led/led_bcm6753.c new file +270 -0

270 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/4 arch: arm: dts: bcm6753: add led support

Add a node leds to support the LED IP in the
device tree of the bcm6753.

---
 arch/arm/dts/bcm6753.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/dts/bcm6753.dtsi +7 -0
index bcbb8e17da..e88ab095c2 100644
@@ -197,5 +197,12 @@
 
 			status = "disabled";
 		};
+
+		leds: led-controller@ff803000 {
+			compatible = "brcm,bcm6753-leds";
+			reg = <0xff803000 0x3480>;
+
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/4] arch: arm: dts: bcm6753: add led support

Quoted 4 lines · Philippe Reynes

Add a node leds to support the LED IP in the
device tree of the bcm6753.

Applied to u-boot/next, thanks!

Signature · 1 line
Tom
#3 lore raw

PATCH 3/4 arch: arm: dts: bcm96753ref: enable led support

In reply to Philippe Reynes

Enable the led in the device tree of the refboard bcm96753ref. It also defines two leds (led_red ad led_green).

---
 arch/arm/dts/bcm96753ref.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/dts/bcm96753ref.dts +18 -0
index e27a5b552f..ca15ca5f10 100644
@@ -78,3 +78,21 @@
 		brcm,nand-oob-sector-size = <16>;
 	};
 };
+
+&leds {
+	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
+	brcm,serial-led-en-pol;
+	brcm,serial-led-data-ppol;
+
+	led@0 {
+		reg = <0>;
+		label = "led_red";
+	};
+
+	led@1 {
+		reg = <1>;
+		label = "led_green";
+	};
+};
Signature · 1 line
2.17.1
#4 lore raw

Re: [PATCH 3/4] arch: arm: dts: bcm96753ref: enable led support

Quoted 4 lines · Philippe Reynes

Enable the led in the device tree of the refboard bcm96753ref. It also defines two leds (led_red ad led_green).

Applied to u-boot/next, thanks!

Signature · 1 line
Tom
#5 lore raw

PATCH 4/4 configs: bcm96753ref_ram_defconfig: enable led support

In reply to Philippe Reynes

Enable the led support on the refboard bcm96753ref.

---
 configs/bcm96753ref_ram_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/bcm96753ref_ram_defconfig +1 -0
index 4474797e3d..2c4408313a 100644
@@ -58,6 +58,7 @@ CONFIG_CLK=y
 CONFIG_BCM6345_GPIO=y
 # CONFIG_INPUT is not set
 CONFIG_LED=y
+CONFIG_LED_BCM6753=y
 CONFIG_LED_BLINK=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
Signature · 1 line
2.17.1
#6 lore raw

Re: [PATCH 4/4] configs: bcm96753ref_ram_defconfig: enable led support

Quoted 3 lines · Philippe Reynes

Enable the led support on the refboard bcm96753ref.

Applied to u-boot/next, thanks!

Signature · 1 line
Tom