devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Initial support for LG Nexus 5 phone (hammerhead)
@ 2016-07-29  6:09 Bhushan Shah
  2016-07-29  6:09 ` [PATCH v3 1/5] ARM: dts: qcom: Add initial DTS for LG Nexus 5 Phone Bhushan Shah
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Bhushan Shah @ 2016-07-29  6:09 UTC (permalink / raw)
  Cc: Bhushan Shah, Andy Gross, Bjorn Andersson, David Brown,
	Mark Rutland, Rob Herring, Russell King, devicetree,
	linux-arm-kernel, linux-arm-msm

This patchset adds support for LG Nexus 5 phone, codenamed hammerhead.

Initial version have following supported,

    - Serial console over headphone jack
    - pm8841 and pm8941 regulator nodes
    - Hardware keys (volume_up and volume_down)

Values for the regulator nodes are taken from following files in downstream msm
kernel tree, branch android-msm-hammerhead-3.4-marshmallow-mr2

    - arch/arm/boot/dts/msm8974-regulator.dtsi
    - arch/arm/boot/dts/msm8974-hammerhead/msm8974-hammerhead.dtsi

Values are verified against kmsg from downstream kernel as well.

Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: David Brown <david.brown@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org

Changes since v2:

    - rename vph-pwr-reg node to vreg-vph-pwr
    - also move pinctrl stuff to msm8974.dtsi

Changes since v1:

    - Remove qcom,msm-id from dts file
    - Add "lge,hammerhead" to compatible
    - move vreg_boost node from honami.dts file to msm8974.dtsi
    - move vph-pwr-reg node to msm8974.dtsi

Bhushan Shah (5):
  ARM: dts: qcom: Add initial DTS for LG Nexus 5 Phone
  ARM: dts: msm8974: Move vreg_boost node from the honami to msm8974
  ARM: dts: qcom: msm8974: Add fixed regulator node for vph-pwr-reg
  ARM: dts: msm8974-hammerhead: Add regulator nodes for hammerhead
  ARM: dts: msm8974-hammerhead: Introduce gpio-keys nodes

 arch/arm/boot/dts/Makefile                         |   1 +
 .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts     | 262 +++++++++++++++++++++
 .../boot/dts/qcom-msm8974-sony-xperia-honami.dts   |  21 --
 arch/arm/boot/dts/qcom-msm8974.dtsi                |  28 +++
 arch/arm/boot/dts/qcom-pm8941.dtsi                 |   6 +
 5 files changed, 297 insertions(+), 21 deletions(-)
 create mode 100644 arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts

-- 
2.9.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/5] ARM: dts: qcom: Add initial DTS for LG Nexus 5 Phone
  2016-07-29  6:09 [PATCH v3 0/5] Initial support for LG Nexus 5 phone (hammerhead) Bhushan Shah
@ 2016-07-29  6:09 ` Bhushan Shah
       [not found] ` <20160729060910.16943-1-bshah-RoXCvvDuEio@public.gmane.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Bhushan Shah @ 2016-07-29  6:09 UTC (permalink / raw)
  Cc: Bhushan Shah, Andy Gross, Bjorn Andersson, David Brown,
	Mark Rutland, Rob Herring, Russell King, devicetree,
	linux-arm-kernel, linux-arm-msm

This DTS file have support LG Nexus 5 (codenamed hammerhead).
Initial version have support for just serial console over headphone
jack.

Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: David Brown <david.brown@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Bhushan Shah <bshah@kde.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm/boot/dts/Makefile                         |  1 +
 .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts     | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 414b427..13947ec 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -584,6 +584,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-ipq8064-ap148.dtb \
 	qcom-msm8660-surf.dtb \
 	qcom-msm8960-cdp.dtb \
+	qcom-msm8974-lge-nexus5-hammerhead.dtb \
 	qcom-msm8974-sony-xperia-honami.dtb
 dtb-$(CONFIG_ARCH_REALVIEW) += \
 	arm-realview-pb1176.dtb \
diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
new file mode 100644
index 0000000..68f3a8a
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -0,0 +1,23 @@
+#include "qcom-msm8974.dtsi"
+#include "qcom-pm8841.dtsi"
+#include "qcom-pm8941.dtsi"
+
+/ {
+	model = "LGE MSM 8974 HAMMERHEAD";
+	compatible = "lge,hammerhead", "qcom,msm8974";
+
+	aliases {
+		serial0 = &blsp1_uart1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&soc {
+	serial@f991d000 {
+		status = "ok";
+	};
+
+};
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 2/5] ARM: dts: msm8974: Move vreg_boost node from the honami to msm8974
       [not found] ` <20160729060910.16943-1-bshah-RoXCvvDuEio@public.gmane.org>
@ 2016-07-29  6:09   ` Bhushan Shah
  2016-07-29 16:21     ` Bjorn Andersson
  2016-07-29  6:09   ` [PATCH v3 4/5] ARM: dts: msm8974-hammerhead: Add regulator nodes for hammerhead Bhushan Shah
  1 sibling, 1 reply; 7+ messages in thread
From: Bhushan Shah @ 2016-07-29  6:09 UTC (permalink / raw)
  Cc: Bhushan Shah, Andy Gross, Bjorn Andersson, David Brown,
	Rob Herring, Mark Rutland, Russell King,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-soc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

vreg_boost is Qualcomm platform specific and is also used in hammerhead
device.

Cc: Andy Gross <andy.gross-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: David Brown <david.brown-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Bhushan Shah <bshah-RoXCvvDuEio@public.gmane.org>
---

Changes since v2:
    - Move vreg-boost node completely, along with pinctrl stuff

 .../boot/dts/qcom-msm8974-sony-xperia-honami.dts    | 21 ---------------------
 arch/arm/boot/dts/qcom-msm8974.dtsi                 | 18 ++++++++++++++++++
 arch/arm/boot/dts/qcom-pm8941.dtsi                  |  6 ++++++
 3 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
index a0398b6..a90e34c 100644
--- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
@@ -258,22 +258,6 @@
 		};
 	};
 
-	vreg_boost: vreg-boost {
-		compatible = "regulator-fixed";
-
-		regulator-name = "vreg-boost";
-		regulator-min-microvolt = <3150000>;
-		regulator-max-microvolt = <3150000>;
-
-		regulator-always-on;
-		regulator-boot-on;
-
-		gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-
-		pinctrl-names = "default";
-		pinctrl-0 = <&boost_bypass_n_pin>;
-     };
 };
 
 &soc {
@@ -383,11 +367,6 @@
 		};
 
 		gpios@c000 {
-			boost_bypass_n_pin: boost-bypass {
-				pins = "gpio21";
-				function = "normal";
-			};
-
 			gpio_keys_pin_a: gpio-keys-active {
 				pins = "gpio2", "gpio3", "gpio4", "gpio5";
 				function = "normal";
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index dc2ce00..1f9b649 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -2,6 +2,7 @@
 
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/clock/qcom,gcc-msm8974.h>
+#include <dt-bindings/gpio/gpio.h>
 #include "skeleton.dtsi"
 
 / {
@@ -604,4 +605,21 @@
 			};
 		};
 	};
+
+	vreg_boost: vreg-boost {
+		compatible = "regulator-fixed";
+
+		regulator-name = "vreg-boost";
+		regulator-min-microvolt = <3150000>;
+		regulator-max-microvolt = <3150000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+
+		gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&boost_bypass_n_pin>;
+	};
 };
diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index d95edb6..ae8e5cc 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -88,6 +88,12 @@
 				     <0 0xe1 0 IRQ_TYPE_NONE>,
 				     <0 0xe2 0 IRQ_TYPE_NONE>,
 				     <0 0xe3 0 IRQ_TYPE_NONE>;
+
+			boost_bypass_n_pin: boost-bypass {
+				pins = "gpio21";
+				function = "normal";
+			};
+
 		};
 
 		pm8941_mpps: mpps@a000 {
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 3/5] ARM: dts: qcom: msm8974: Add fixed regulator node for vph-pwr-reg
  2016-07-29  6:09 [PATCH v3 0/5] Initial support for LG Nexus 5 phone (hammerhead) Bhushan Shah
  2016-07-29  6:09 ` [PATCH v3 1/5] ARM: dts: qcom: Add initial DTS for LG Nexus 5 Phone Bhushan Shah
       [not found] ` <20160729060910.16943-1-bshah-RoXCvvDuEio@public.gmane.org>
@ 2016-07-29  6:09 ` Bhushan Shah
  2016-07-29  6:09 ` [PATCH v3 5/5] ARM: dts: msm8974-hammerhead: Introduce gpio-keys nodes Bhushan Shah
  3 siblings, 0 replies; 7+ messages in thread
From: Bhushan Shah @ 2016-07-29  6:09 UTC (permalink / raw)
  Cc: Bhushan Shah, Andy Gross, Bjorn Andersson, David Brown,
	Rob Herring, Mark Rutland, Russell King, linux-arm-msm,
	linux-soc, devicetree

Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: David Brown <david.brown@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-soc@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Bhushan Shah <bshah@kde.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Changes since v2:
    - Rename vph-pwr-reg to vreg_vph_pwr

 arch/arm/boot/dts/qcom-msm8974.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 1f9b649..b2ee2f1 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -622,4 +622,14 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&boost_bypass_n_pin>;
 	};
+
+	vreg_vph_pwr: vreg-vph-pwr {
+		compatible = "regulator-fixed";
+		regulator-name = "vph-pwr";
+
+		regulator-min-microvolt = <3600000>;
+		regulator-max-microvolt = <3600000>;
+
+		regulator-always-on;
+	};
 };
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 4/5] ARM: dts: msm8974-hammerhead: Add regulator nodes for hammerhead
       [not found] ` <20160729060910.16943-1-bshah-RoXCvvDuEio@public.gmane.org>
  2016-07-29  6:09   ` [PATCH v3 2/5] ARM: dts: msm8974: Move vreg_boost node from the honami to msm8974 Bhushan Shah
@ 2016-07-29  6:09   ` Bhushan Shah
  1 sibling, 0 replies; 7+ messages in thread
From: Bhushan Shah @ 2016-07-29  6:09 UTC (permalink / raw)
  Cc: Bhushan Shah, Andy Gross, Bjorn Andersson, David Brown,
	Rob Herring, Mark Rutland, Russell King,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-soc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Cc: Andy Gross <andy.gross-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: David Brown <david.brown-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Bhushan Shah <bshah-RoXCvvDuEio@public.gmane.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts     | 203 +++++++++++++++++++++
 1 file changed, 203 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
index 68f3a8a..df957cb 100644
--- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -1,6 +1,8 @@
 #include "qcom-msm8974.dtsi"
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
 	model = "LGE MSM 8974 HAMMERHEAD";
@@ -13,6 +15,207 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	smd {
+		rpm {
+			rpm_requests {
+				pm8841-regulators {
+					s1 {
+						regulator-min-microvolt = <675000>;
+						regulator-max-microvolt = <1050000>;
+					};
+
+					s2 {
+						regulator-min-microvolt = <500000>;
+						regulator-max-microvolt = <1050000>;
+					};
+
+					s3 {
+						regulator-min-microvolt = <1050000>;
+						regulator-max-microvolt = <1050000>;
+					};
+
+					s4 {
+						regulator-min-microvolt = <815000>;
+						regulator-max-microvolt = <900000>;
+					};
+				};
+
+				pm8941-regulators {
+					vdd_l1_l3-supply = <&pm8941_s1>;
+					vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
+					vdd_l4_l11-supply = <&pm8941_s1>;
+					vdd_l5_l7-supply = <&pm8941_s2>;
+					vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
+					vdd_l8_l16_l18_l19-supply = <&vreg_vph_pwr>;
+					vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
+					vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
+					vdd_l21-supply = <&vreg_boost>;
+
+					s1 {
+						regulator-min-microvolt = <1300000>;
+						regulator-max-microvolt = <1300000>;
+
+						regulator-always-on;
+						regulator-boot-on;
+					};
+
+					s2 {
+						regulator-min-microvolt = <2150000>;
+						regulator-max-microvolt = <2150000>;
+
+						regulator-boot-on;
+					};
+
+					s3 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <1800000>;
+
+						regulator-always-on;
+						regulator-boot-on;
+					};
+
+					l1 {
+						regulator-min-microvolt = <1225000>;
+						regulator-max-microvolt = <1225000>;
+
+						regulator-always-on;
+						regulator-boot-on;
+					};
+
+					l2 {
+						regulator-min-microvolt = <1200000>;
+						regulator-max-microvolt = <1200000>;
+					};
+
+					l3 {
+						regulator-min-microvolt = <1225000>;
+						regulator-max-microvolt = <1225000>;
+					};
+
+					l4 {
+						regulator-min-microvolt = <1225000>;
+						regulator-max-microvolt = <1225000>;
+					};
+
+					l5 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <1800000>;
+					};
+
+					l6 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <1800000>;
+
+						regulator-boot-on;
+					};
+
+					l7 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <1800000>;
+
+						regulator-boot-on;
+					};
+
+					l8 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <1800000>;
+					};
+
+					l9 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <2950000>;
+					};
+
+					l10 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <2950000>;
+					};
+
+					l11 {
+						regulator-min-microvolt = <1300000>;
+						regulator-max-microvolt = <1300000>;
+					};
+
+					l12 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <1800000>;
+
+						regulator-always-on;
+						regulator-boot-on;
+					};
+
+					l13 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <2950000>;
+
+						regulator-boot-on;
+					};
+
+					l14 {
+						regulator-min-microvolt = <1800000>;
+						regulator-max-microvolt = <1800000>;
+					};
+
+					l15 {
+						regulator-min-microvolt = <2050000>;
+						regulator-max-microvolt = <2050000>;
+					};
+
+					l16 {
+						regulator-min-microvolt = <2700000>;
+						regulator-max-microvolt = <2700000>;
+					};
+
+					l17 {
+						regulator-min-microvolt = <2850000>;
+						regulator-max-microvolt = <2850000>;
+					};
+
+					l18 {
+						regulator-min-microvolt = <2850000>;
+						regulator-max-microvolt = <2850000>;
+					};
+
+					l19 {
+						regulator-min-microvolt = <3000000>;
+						regulator-max-microvolt = <3300000>;
+					};
+
+					l20 {
+						regulator-min-microvolt = <2950000>;
+						regulator-max-microvolt = <2950000>;
+
+						regulator-boot-on;
+					};
+
+					l21 {
+						regulator-min-microvolt = <2950000>;
+						regulator-max-microvolt = <2950000>;
+
+						regulator-boot-on;
+					};
+
+					l22 {
+						regulator-min-microvolt = <3000000>;
+						regulator-max-microvolt = <3300000>;
+					};
+
+					l23 {
+						regulator-min-microvolt = <3000000>;
+						regulator-max-microvolt = <3000000>;
+					};
+
+					l24 {
+						regulator-min-microvolt = <3075000>;
+						regulator-max-microvolt = <3075000>;
+
+						regulator-boot-on;
+					};
+				};
+			};
+		};
+	};
 };
 
 &soc {
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 5/5] ARM: dts: msm8974-hammerhead: Introduce gpio-keys nodes
  2016-07-29  6:09 [PATCH v3 0/5] Initial support for LG Nexus 5 phone (hammerhead) Bhushan Shah
                   ` (2 preceding siblings ...)
  2016-07-29  6:09 ` [PATCH v3 3/5] ARM: dts: qcom: msm8974: Add fixed regulator node for vph-pwr-reg Bhushan Shah
@ 2016-07-29  6:09 ` Bhushan Shah
  3 siblings, 0 replies; 7+ messages in thread
From: Bhushan Shah @ 2016-07-29  6:09 UTC (permalink / raw)
  Cc: Bhushan Shah, Andy Gross, Bjorn Andersson, David Brown,
	Rob Herring, Mark Rutland, Russell King, linux-arm-msm,
	linux-soc, devicetree

This introduces the gpio-keys node for keys of hammerhead and pinctrl
state associated with it.

Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: David Brown <david.brown@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-soc@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Bhushan Shah <bshah@kde.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts     | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
index df957cb..c0fb4a6 100644
--- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -2,6 +2,7 @@
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
@@ -223,4 +224,39 @@
 		status = "ok";
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+		input-name = "gpio-keys";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_keys_pin_a>;
+
+		volume-up {
+			label = "volume_up";
+			gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			linux,code = <KEY_VOLUMEUP>;
+		};
+
+		volume-down {
+			label = "volume_down";
+			gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			linux,code = <KEY_VOLUMEDOWN>;
+		};
+	};
+};
+
+&spmi_bus {
+	pm8941@0 {
+		gpios@c000 {
+			gpio_keys_pin_a: gpio-keys-active {
+				pins = "gpio2", "gpio3";
+				function = "normal";
+
+				bias-pull-up;
+				power-source = <PM8941_GPIO_S3>;
+			};
+		};
+	};
 };
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 2/5] ARM: dts: msm8974: Move vreg_boost node from the honami to msm8974
  2016-07-29  6:09   ` [PATCH v3 2/5] ARM: dts: msm8974: Move vreg_boost node from the honami to msm8974 Bhushan Shah
@ 2016-07-29 16:21     ` Bjorn Andersson
  0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2016-07-29 16:21 UTC (permalink / raw)
  To: Bhushan Shah
  Cc: Andy Gross, David Brown, Rob Herring, Mark Rutland, Russell King,
	linux-arm-msm, linux-soc, devicetree

On Thu 28 Jul 23:09 PDT 2016, Bhushan Shah wrote:

> vreg_boost is Qualcomm platform specific and is also used in hammerhead
> device.
> 
> Cc: Andy Gross <andy.gross@linaro.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: David Brown <david.brown@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-soc@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Bhushan Shah <bshah@kde.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
> 
> Changes since v2:
>     - Move vreg-boost node completely, along with pinctrl stuff
> 
>  .../boot/dts/qcom-msm8974-sony-xperia-honami.dts    | 21 ---------------------
>  arch/arm/boot/dts/qcom-msm8974.dtsi                 | 18 ++++++++++++++++++
>  arch/arm/boot/dts/qcom-pm8941.dtsi                  |  6 ++++++
>  3 files changed, 24 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
> index a0398b6..a90e34c 100644
> --- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
> +++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
> @@ -258,22 +258,6 @@
>  		};
>  	};
>  
> -	vreg_boost: vreg-boost {
> -		compatible = "regulator-fixed";
> -
> -		regulator-name = "vreg-boost";
> -		regulator-min-microvolt = <3150000>;
> -		regulator-max-microvolt = <3150000>;
> -
> -		regulator-always-on;
> -		regulator-boot-on;
> -
> -		gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
> -		enable-active-high;
> -
> -		pinctrl-names = "default";
> -		pinctrl-0 = <&boost_bypass_n_pin>;
> -     };
>  };
>  
>  &soc {
> @@ -383,11 +367,6 @@
>  		};
>  
>  		gpios@c000 {
> -			boost_bypass_n_pin: boost-bypass {
> -				pins = "gpio21";
> -				function = "normal";
> -			};
> -
>  			gpio_keys_pin_a: gpio-keys-active {
>  				pins = "gpio2", "gpio3", "gpio4", "gpio5";
>  				function = "normal";
> diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
> index dc2ce00..1f9b649 100644
> --- a/arch/arm/boot/dts/qcom-msm8974.dtsi
> +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
> @@ -2,6 +2,7 @@
>  
>  #include <dt-bindings/interrupt-controller/irq.h>
>  #include <dt-bindings/clock/qcom,gcc-msm8974.h>
> +#include <dt-bindings/gpio/gpio.h>
>  #include "skeleton.dtsi"
>  
>  / {
> @@ -604,4 +605,21 @@
>  			};
>  		};
>  	};
> +
> +	vreg_boost: vreg-boost {
> +		compatible = "regulator-fixed";
> +
> +		regulator-name = "vreg-boost";
> +		regulator-min-microvolt = <3150000>;
> +		regulator-max-microvolt = <3150000>;
> +
> +		regulator-always-on;
> +		regulator-boot-on;
> +
> +		gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&boost_bypass_n_pin>;
> +	};
>  };
> diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
> index d95edb6..ae8e5cc 100644
> --- a/arch/arm/boot/dts/qcom-pm8941.dtsi
> +++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
> @@ -88,6 +88,12 @@
>  				     <0 0xe1 0 IRQ_TYPE_NONE>,
>  				     <0 0xe2 0 IRQ_TYPE_NONE>,
>  				     <0 0xe3 0 IRQ_TYPE_NONE>;
> +
> +			boost_bypass_n_pin: boost-bypass {
> +				pins = "gpio21";
> +				function = "normal";
> +			};
> +
>  		};
>  
>  		pm8941_mpps: mpps@a000 {
> -- 
> 2.9.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-29 16:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-29  6:09 [PATCH v3 0/5] Initial support for LG Nexus 5 phone (hammerhead) Bhushan Shah
2016-07-29  6:09 ` [PATCH v3 1/5] ARM: dts: qcom: Add initial DTS for LG Nexus 5 Phone Bhushan Shah
     [not found] ` <20160729060910.16943-1-bshah-RoXCvvDuEio@public.gmane.org>
2016-07-29  6:09   ` [PATCH v3 2/5] ARM: dts: msm8974: Move vreg_boost node from the honami to msm8974 Bhushan Shah
2016-07-29 16:21     ` Bjorn Andersson
2016-07-29  6:09   ` [PATCH v3 4/5] ARM: dts: msm8974-hammerhead: Add regulator nodes for hammerhead Bhushan Shah
2016-07-29  6:09 ` [PATCH v3 3/5] ARM: dts: qcom: msm8974: Add fixed regulator node for vph-pwr-reg Bhushan Shah
2016-07-29  6:09 ` [PATCH v3 5/5] ARM: dts: msm8974-hammerhead: Introduce gpio-keys nodes Bhushan Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).