From 615467f56356a2054d3a86854d391b7a2e0d5811 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 29 Apr 2019 19:35:33 +0200 Subject: [PATCH] overlays: Add PiGlow overlay The PiGlow is a small add-on board for the Raspberry Pi that provides 18 individually controllable LEDs (SN3218) and uses the following pins: P1 & P17 (3V3) P2 (5V) P3 (SDA) P5 (SCL) P14 (GND) Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/overlays/Makefile | 1 + arch/arm/boot/dts/overlays/README | 6 ++ arch/arm/boot/dts/overlays/piglow-overlay.dts | 97 +++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/piglow-overlay.dts --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -97,6 +97,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ pi3-disable-wifi.dtbo \ pi3-miniuart-bt.dtbo \ pibell.dtbo \ + piglow.dtbo \ piscreen.dtbo \ piscreen2r.dtbo \ pisound.dtbo \ --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -1532,6 +1532,12 @@ Params: alsaname Set the "PiBell") +Name: piglow +Info: Configures the PiGlow by pimoroni.com +Load: dtoverlay=piglow +Params: + + Name: piscreen Info: PiScreen display by OzzMaker.com Load: dtoverlay=piscreen,= --- /dev/null +++ b/arch/arm/boot/dts/overlays/piglow-overlay.dts @@ -0,0 +1,97 @@ +// Definitions for SN3218 LED driver from Si-En Technology on PiGlow +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708"; + + fragment@0 { + target = <&i2c_arm>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + sn3218@54 { + compatible = "si-en,sn3218"; + reg = <0x54>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + led@1 { + reg = <1>; + label = "piglow:red:led1"; + }; + led@2 { + reg = <2>; + label = "piglow:orange:led2"; + }; + led@3 { + reg = <3>; + label = "piglow:yellow:led3"; + }; + led@4 { + reg = <4>; + label = "piglow:green:led4"; + }; + led@5 { + reg = <5>; + label = "piglow:blue:led5"; + }; + led@6 { + reg = <6>; + label = "piglow:green:led6"; + }; + led@7 { + reg = <7>; + label = "piglow:red:led7"; + }; + led@8 { + reg = <8>; + label = "piglow:orange:led8"; + }; + led@9 { + reg = <9>; + label = "piglow:yellow:led9"; + }; + led@10 { + reg = <10>; + label = "piglow:white:led10"; + }; + led@11 { + reg = <11>; + label = "piglow:white:led11"; + }; + led@12 { + reg = <12>; + label = "piglow:blue:led12"; + }; + led@13 { + reg = <13>; + label = "piglow:white:led13"; + }; + led@14 { + reg = <14>; + label = "piglow:green:led14"; + }; + led@15 { + reg = <15>; + label = "piglow:blue:led15"; + }; + led@16 { + reg = <16>; + label = "piglow:yellow:led16"; + }; + led@17 { + reg = <17>; + label = "piglow:orange:led17"; + }; + led@18 { + reg = <18>; + label = "piglow:red:led18"; + }; + }; + }; + }; +};