Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8e96e07 authored by Thomas Hebb's avatar Thomas Hebb Committed by Jisheng Zhang
Browse files

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: default avatarThomas Hebb <tommyhebb@gmail.com>
Signed-off-by: default avatarJisheng Zhang <Jisheng.Zhang@synaptics.com>
parent 9fb2856f
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -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";
	};
};