Unverified Commit 085d96b8 authored by Luca Weiss's avatar Luca Weiss Committed by Maxime Ripard
Browse files

arm64: dts: allwinner: pinephone: Add LED flash



All revisions of the PinePhone have an SGM3140 LED flash. The gpios were
swapped on v1.0 of the board, but this was fixed in later revisions.

Signed-off-by: default avatarLuca Weiss <luca@z3ntu.xyz>
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20201105054135.24860-4-samuel@sholland.org
parent 3cf9bf3b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -9,3 +9,8 @@ / {
	model = "Pine64 PinePhone Developer Batch (1.0)";
	compatible = "pine64,pinephone-1.0", "allwinner,sun50i-a64";
};

&sgm3140 {
	enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
	flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
};
+5 −0
Original line number Diff line number Diff line
@@ -28,3 +28,8 @@ &backlight {
	num-interpolated-steps = <50>;
	default-brightness-level = <400>;
};

&sgm3140 {
	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
};
+5 −0
Original line number Diff line number Diff line
@@ -38,3 +38,8 @@ &lis3mdl {
	interrupt-parent = <&pio>;
	interrupts = <1 1 IRQ_TYPE_EDGE_RISING>; /* PB1 */
};

&sgm3140 {
	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
};
+11 −0
Original line number Diff line number Diff line
@@ -49,6 +49,17 @@ red {
		};
	};

	sgm3140: led-controller {
		compatible = "sgmicro,sgm3140";
		vin-supply = <&reg_dcdc1>;

		sgm3140_flash: led {
			function = LED_FUNCTION_FLASH;
			color = <LED_COLOR_ID_WHITE>;
			flash-max-timeout-us = <250000>;
		};
	};

	speaker_amp: audio-amplifier {
		compatible = "simple-audio-amplifier";
		enable-gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */