public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: Iskren Chernev <iskren.chernev@gmail.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	linux-arm-msm@vger.kernel.org,
	Iskren Chernev <iskren.chernev@gmail.com>
Subject: [PATCH 4/7] ARM: dts: qcom: msm8974-klte: Add support for led
Date: Tue, 30 Jun 2020 17:09:09 +0300	[thread overview]
Message-ID: <20200630140912.260294-5-iskren.chernev@gmail.com> (raw)
In-Reply-To: <20200630140912.260294-1-iskren.chernev@gmail.com>

The klte uses a Panasonic AN30259A LED controller for it's indicator
led.

Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
---
 .../boot/dts/qcom-msm8974-samsung-klte.dts    | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
index 085636f182d01..7b398da9b75ed 100644
--- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Samsung Galaxy S5";
@@ -228,6 +229,44 @@ touchkey@20 {
 		};
 	};
 
+	i2c-gpio-led {
+		compatible = "i2c-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		scl-gpios = <&msmgpio 121 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		sda-gpios = <&msmgpio 120 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2c_led_pins>;
+
+		i2c-gpio,delay-us = <2>;
+
+		led-controller@30 {
+			compatible = "panasonic,an30259a";
+			reg = <0x30>;
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led@1 {
+				reg = <1>;
+				function = LED_FUNCTION_STATUS;
+				color = <LED_COLOR_ID_RED>;
+			};
+
+			led@2 {
+				reg = <2>;
+				function = LED_FUNCTION_STATUS;
+				color = <LED_COLOR_ID_GREEN>;
+			};
+
+			led@3 {
+				reg = <3>;
+				function = LED_FUNCTION_STATUS;
+				color = <LED_COLOR_ID_BLUE>;
+			};
+		};
+	};
+
 	/delete-node/ vreg-boost;
 };
 
@@ -312,6 +351,15 @@ mux {
 				bias-pull-up;
 			};
 		};
+
+		i2c_led_pins: i2c-led {
+			mux {
+				pins = "gpio120", "gpio121";
+				function = "gpio";
+				input-enable;
+				bias-pull-down;
+			};
+		};
 	};
 
 	sdhci@f9824900 {
-- 
2.27.0


  parent reply	other threads:[~2020-06-30 14:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 14:09 [PATCH 0/7] ARM: dts: qcom: msm8974: klte: Enable some hardware Iskren Chernev
2020-06-30 14:09 ` [PATCH 1/7] ARM: dts: qcom: msm8974-klte: Merge pinctrl nodes Iskren Chernev
2020-06-30 14:09 ` [PATCH 2/7] ARM: dts: qcom: msm8974-klte: Add support for touchkey Iskren Chernev
2020-06-30 14:09 ` [PATCH 3/7] ARM: dts: qcom: msm8974-klte: Add support for touchscreen Iskren Chernev
2020-06-30 14:09 ` Iskren Chernev [this message]
2020-06-30 14:09 ` [PATCH 5/7] ARM: dts: qcom: msm8974-klte: Add gpio expander chip Iskren Chernev
2020-06-30 14:09 ` [PATCH 6/7] ARM: dts: qcom: msm8974-klte: Add support for wifi Iskren Chernev
2020-06-30 14:09 ` [PATCH 7/7] ARM: dts: qcom: msm8974-klte: Add support for SD card Iskren Chernev
2020-07-01 10:30 ` [PATCH 0/7] ARM: dts: qcom: msm8974: klte: Enable some hardware Brian Masney
2020-07-01 13:50   ` Iskren Chernev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200630140912.260294-5-iskren.chernev@gmail.com \
    --to=iskren.chernev@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox