openwrt/target/linux/d1/patches-6.6/0058-riscv-dts-allwinner-d1-Add-RGB-LEDs-to-boards.patch
Zoltan HERPAI 99fcc90270 kernel/d1: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-29 17:56:28 +02:00

99 lines
2.7 KiB
Diff

From e6eb041b2099ec3d07a4ec391a06e86d7697c9d1 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Thu, 11 Aug 2022 23:03:01 -0500
Subject: [PATCH 058/117] riscv: dts: allwinner: d1: Add RGB LEDs to boards
Some D1-based boards feature an onboard RGB LED. Enable them.
Commit-changes: 5
- New patch for v5
Series-version: 5
Series-to: Pavel Machek <pavel@ucw.cz>
Series-to: Chen-Yu Tsai <wens@csie.org>
Series-to: Jernej Skrabec <jernej.skrabec@gmail.com>
Series-to: linux-leds@vger.kernel.org
Series-cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Series-cc: Rob Herring <robh+dt@kernel.org>
Series-cc: devicetree@vger.kernel.org
Series-cc: linux-arm-kernel@lists.infradead.org
Series-cc: linux-kernel@vger.kernel.org
Series-cc: linux-riscv@lists.infradead.org
Series-cc: linux-sunxi@lists.linux.dev
Cover-letter:
leds: Allwinner A100 LED controller support
This series adds bindings and a driver for the RGB LED controller found
in some Allwinner SoCs, starting with A100. The hardware in the R329 and
D1 SoCs appears to be identical.
Patch 3 is included because the LED controller binding requires the DMA
properties. That patch was sent previously[1], but never got merged.
Patches 5-6 depend on the D1 devicetree series[2], but the rest of this
series can be merged without them.
This driver was tested on the D1 Nezha board.
[1]: https://lore.kernel.org/linux-arm-kernel/20201110040553.1381-7-frank@allwinnertech.com/
[2]: https://lore.kernel.org/linux-riscv/20220815050815.22340-1-samuel@sholland.org/
END
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
.../boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dts | 12 ++++++++++++
arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts | 13 +++++++++++++
2 files changed, 25 insertions(+)
--- a/arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dts
+++ b/arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dts
@@ -58,6 +58,18 @@
status = "okay";
};
+&ledc {
+ pinctrl-0 = <&ledc_pc0_pin>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ multi-led@0 {
+ reg = <0x0>;
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+ };
+};
+
&lradc {
status = "okay";
--- a/arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts
+++ b/arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts
@@ -5,6 +5,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include "sun20i-d1.dtsi"
#include "sun20i-d1-common-regulators.dtsi"
@@ -90,6 +91,18 @@
};
};
+&ledc {
+ pinctrl-0 = <&ledc_pc0_pin>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ multi-led@0 {
+ reg = <0x0>;
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+ };
+};
+
&lradc {
status = "okay";