90 lines
3.1 KiB
Diff
90 lines
3.1 KiB
Diff
From 61078b677b1021e13369636fe9f3e633f48ec936 Mon Sep 17 00:00:00 2001
|
|
From: Luca Weiss <luca@z3ntu.xyz>
|
|
Date: Sat, 25 Jul 2020 13:08:12 +0200
|
|
Subject: [PATCH 107/351] arm64: dts: sun50i-a64-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: Luca Weiss <luca@z3ntu.xyz>
|
|
---
|
|
.../boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts | 5 +++++
|
|
.../boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 5 +++++
|
|
.../boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts | 5 +++++
|
|
.../boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 13 +++++++++++++
|
|
4 files changed, 28 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
|
|
index b027d09e8f87..78a84833e36a 100644
|
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
|
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
|
|
@@ -109,3 +109,8 @@ usb0_drd_sw: endpoint {
|
|
};
|
|
};
|
|
};
|
|
+
|
|
+&sgm3140 {
|
|
+ flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
|
|
+ enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
|
|
+};
|
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
|
|
index d23a35adaa54..06b9612f0d08 100644
|
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
|
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
|
|
@@ -129,3 +129,8 @@ usb0_drd_sw: endpoint {
|
|
};
|
|
};
|
|
};
|
|
+
|
|
+&sgm3140 {
|
|
+ flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
|
|
+ enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
|
|
+};
|
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
|
|
index 49fcf0f3a8e2..16fa86bc9025 100644
|
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
|
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
|
|
@@ -113,3 +113,8 @@ usb0_drd_sw: endpoint {
|
|
};
|
|
};
|
|
};
|
|
+
|
|
+&sgm3140 {
|
|
+ flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
|
|
+ enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
|
|
+};
|
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
|
index 53e24f71a5ed..c62ec2504266 100644
|
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
|
@@ -273,6 +273,17 @@ vibrator {
|
|
enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
|
|
vcc-supply = <®_dcdc1>;
|
|
};
|
|
+
|
|
+ sgm3140: led-controller {
|
|
+ compatible = "sgmicro,sgm3140";
|
|
+ vin-supply = <®_dcdc1>;
|
|
+
|
|
+ sgm3140_flash: led {
|
|
+ function = LED_FUNCTION_FLASH;
|
|
+ color = <LED_COLOR_ID_WHITE>;
|
|
+ flash-max-timeout-us = <250000>;
|
|
+ };
|
|
+ };
|
|
};
|
|
|
|
&codec {
|
|
@@ -416,6 +427,8 @@ ov5640: rear-camera@4c {
|
|
reset-gpios = <&pio 3 3 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PD3 */
|
|
powerdown-gpios = <&pio 2 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PC0 */
|
|
|
|
+ flash-leds = <&sgm3140_flash>;
|
|
+
|
|
port {
|
|
ov5640_ep: endpoint {
|
|
remote-endpoint = <&csi_ov5640_ep>;
|
|
--
|
|
2.34.0
|
|
|