1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- From e6eb041b2099ec3d07a4ec391a06e86d7697c9d1 Mon Sep 17 00:00:00 2001
- From: Samuel Holland <[email protected]>
- 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 <[email protected]>
- Series-to: Chen-Yu Tsai <[email protected]>
- Series-to: Jernej Skrabec <[email protected]>
- Series-to: [email protected]
- Series-cc: Krzysztof Kozlowski <[email protected]>
- Series-cc: Rob Herring <[email protected]>
- Series-cc: [email protected]
- Series-cc: [email protected]
- Series-cc: [email protected]
- Series-cc: [email protected]
- Series-cc: [email protected]
- 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/[email protected]/
- [2]: https://lore.kernel.org/linux-riscv/[email protected]/
- END
- Signed-off-by: Samuel Holland <[email protected]>
- ---
- .../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";
-
|