diff options
author | Thomas Hebb <tommyhebb@gmail.com> | 2018-05-15 00:58:15 +0300 |
---|---|---|
committer | Jisheng Zhang <Jisheng.Zhang@synaptics.com> | 2018-05-24 10:14:37 +0300 |
commit | c8e96e070378a14817ab286a9c69a2d64546f788 (patch) | |
tree | 709bb8fd242b7bd0fa0f7c4abf42e7bfef6d5d98 /arch/arm/boot/dts/berlin2cd-google-chromecast.dts | |
parent | 9fb2856f6842ae7bd6f00a43a404d4002cdbeee3 (diff) | |
download | linux-c8e96e070378a14817ab286a9c69a2d64546f788.tar.xz |
ARM: dts: chromecast: use PWM for LEDs
Control the Chromecast's two LEDs using PWM instead of GPIO pins. This
allows for variable brightness.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Diffstat (limited to 'arch/arm/boot/dts/berlin2cd-google-chromecast.dts')
-rw-r--r-- | arch/arm/boot/dts/berlin2cd-google-chromecast.dts | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/arm/boot/dts/berlin2cd-google-chromecast.dts b/arch/arm/boot/dts/berlin2cd-google-chromecast.dts index f1767c8a6826..4b46e53a2da2 100644 --- a/arch/arm/boot/dts/berlin2cd-google-chromecast.dts +++ b/arch/arm/boot/dts/berlin2cd-google-chromecast.dts @@ -66,18 +66,21 @@ }; leds { - compatible = "gpio-leds"; + compatible = "pwm-leds"; + pinctrl-0 = <&ledpwm_pmux>; + pinctrl-names = "default"; white { label = "white"; - gpios = <&portc 1 GPIO_ACTIVE_HIGH>; - default-state = "keep"; + pwms = <&pwm 0 600000 0>; + max-brightness = <255>; + linux,default-trigger = "default-on"; }; red { label = "red"; - gpios = <&portc 2 GPIO_ACTIVE_HIGH>; - default-state = "keep"; + pwms = <&pwm 1 600000 0>; + max-brightness = <255>; }; }; }; @@ -96,3 +99,10 @@ &usb_phy1 { status = "okay"; }; &usb1 { status = "okay"; }; + +&soc_pinctrl { + ledpwm_pmux: ledpwm-pmux { + groups = "G0"; + function = "pwm"; + }; +}; |