* [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone
@ 2017-09-12 8:40 Luca Weiss
2017-09-12 8:40 ` [PATCH 2/4] ARM: dts: msm8974-FP2: Introduce gpio-keys nodes Luca Weiss
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Luca Weiss @ 2017-09-12 8:40 UTC (permalink / raw)
To: linux-arm-msm; +Cc: Luca Weiss
This DTS has support for the Fairphone 2 (codenamed FP2).
This first version of the DTS supports just the serial console via the MSM UART
pins.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
.../devicetree/bindings/vendor-prefixes.txt | 1 +
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 22 ++++++++++++++++++++++
3 files changed, 24 insertions(+)
create mode 100644 arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 69183f0fbc78..d5e423cad16a 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -113,6 +113,7 @@ everspin Everspin Technologies, Inc.
exar Exar Corporation
excito Excito
ezchip EZchip Semiconductor
+fairphone Fairphone B.V.
faraday Faraday Technology Corporation
fcs Fairchild Semiconductor
firefly Firefly
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index faf46abaa4a2..549afb6ed13c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -700,6 +700,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-ipq8064-ap148.dtb \
qcom-msm8660-surf.dtb \
qcom-msm8960-cdp.dtb \
+ qcom-msm8974-fairphone-fp2.dtb \
qcom-msm8974-lge-nexus5-hammerhead.dtb \
qcom-msm8974-sony-xperia-honami.dtb \
qcom-mdm9615-wp8548-mangoh-green.dtb
diff --git a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
new file mode 100644
index 000000000000..79a5aa8b856a
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
@@ -0,0 +1,22 @@
+#include "qcom-msm8974.dtsi"
+#include "qcom-pm8841.dtsi"
+#include "qcom-pm8941.dtsi"
+
+/ {
+ model = "Fairphone 2";
+ compatible = "fairphone,fp2", "qcom,msm8974";
+
+ aliases {
+ serial0 = &blsp1_uart2;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&soc {
+ serial@f991e000 {
+ status = "ok";
+ };
+};
--
2.14.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/4] ARM: dts: msm8974-FP2: Introduce gpio-keys nodes
2017-09-12 8:40 [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone Luca Weiss
@ 2017-09-12 8:40 ` Luca Weiss
2017-10-11 6:05 ` Bjorn Andersson
2017-09-12 8:40 ` [PATCH 3/4] ARM: dts: msm8974-FP2: Add regulator nodes for FP2 Luca Weiss
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Luca Weiss @ 2017-09-12 8:40 UTC (permalink / raw)
To: linux-arm-msm; +Cc: Luca Weiss
This introduces the gpio-keys nodes for keys of the FP2 and the
associated pinctrl state.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 50 ++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
index 79a5aa8b856a..4434c45086b8 100644
--- a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
@@ -1,6 +1,10 @@
#include "qcom-msm8974.dtsi"
#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>
+
/ {
model = "Fairphone 2";
@@ -19,4 +23,50 @@
serial@f991e000 {
status = "ok";
};
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ input-name = "gpio-keys";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio_keys_pin_a>;
+
+ camera-snapshot {
+ label = "camera_snapshot";
+ gpios = <&pm8941_gpios 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_CAMERA>;
+ wakeup-source;
+ debounce-interval = <15>;
+ };
+
+ volume-down {
+ label = "volume_down";
+ gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEDOWN>;
+ wakeup-source;
+ debounce-interval = <15>;
+ };
+
+ volume-up {
+ label = "volume_up";
+ gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ wakeup-source;
+ debounce-interval = <15>;
+ };
+ };
+};
+
+&spmi_bus {
+ pm8941@0 {
+ gpios@c000 {
+ gpio_keys_pin_a: gpio-keys-active {
+ pins = "gpio1", "gpio2", "gpio5";
+ function = "normal";
+
+ bias-pull-up;
+ power-source = <PM8941_GPIO_S3>;
+ };
+ };
+ };
};
--
2.14.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/4] ARM: dts: msm8974-FP2: Introduce gpio-keys nodes
2017-09-12 8:40 ` [PATCH 2/4] ARM: dts: msm8974-FP2: Introduce gpio-keys nodes Luca Weiss
@ 2017-10-11 6:05 ` Bjorn Andersson
0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2017-10-11 6:05 UTC (permalink / raw)
To: Luca Weiss; +Cc: linux-arm-msm
On Tue 12 Sep 01:40 PDT 2017, Luca Weiss wrote:
> This introduces the gpio-keys nodes for keys of the FP2 and the
> associated pinctrl state.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 50 ++++++++++++++++++++++++
> 1 file changed, 50 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
> index 79a5aa8b856a..4434c45086b8 100644
> --- a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
> +++ b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
> @@ -1,6 +1,10 @@
> #include "qcom-msm8974.dtsi"
> #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>
> +
>
> / {
> model = "Fairphone 2";
> @@ -19,4 +23,50 @@
> serial@f991e000 {
> status = "ok";
> };
> +
> + gpio-keys {
As this isn't a device on the "soc bus" (i.e. it doesn't have a reg=<>)
it should not be child of &soc.
Please move it to /, i.e. right after "choosen".
Regards,
Bjorn
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] ARM: dts: msm8974-FP2: Add regulator nodes for FP2
2017-09-12 8:40 [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone Luca Weiss
2017-09-12 8:40 ` [PATCH 2/4] ARM: dts: msm8974-FP2: Introduce gpio-keys nodes Luca Weiss
@ 2017-09-12 8:40 ` Luca Weiss
2017-10-11 6:06 ` Bjorn Andersson
2017-09-12 8:40 ` [PATCH 4/4] ARM: dts: msm8974-FP2: Add sdhci1 node Luca Weiss
2017-10-11 6:03 ` [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone Bjorn Andersson
3 siblings, 1 reply; 8+ messages in thread
From: Luca Weiss @ 2017-09-12 8:40 UTC (permalink / raw)
To: linux-arm-msm; +Cc: Luca Weiss
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 195 +++++++++++++++++++++++
1 file changed, 195 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
index 4434c45086b8..855b8b5144de 100644
--- a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
@@ -17,6 +17,201 @@
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>;
+ };
+ };
+
+ 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_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 = <1225000>;
+ regulator-max-microvolt = <1350000>;
+ };
+
+ 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 = <2900000>;
+ regulator-max-microvolt = <3350000>;
+ };
+
+ 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.14.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 4/4] ARM: dts: msm8974-FP2: Add sdhci1 node
2017-09-12 8:40 [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone Luca Weiss
2017-09-12 8:40 ` [PATCH 2/4] ARM: dts: msm8974-FP2: Introduce gpio-keys nodes Luca Weiss
2017-09-12 8:40 ` [PATCH 3/4] ARM: dts: msm8974-FP2: Add regulator nodes for FP2 Luca Weiss
@ 2017-09-12 8:40 ` Luca Weiss
2017-10-11 6:07 ` Bjorn Andersson
2017-10-11 6:03 ` [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone Bjorn Andersson
3 siblings, 1 reply; 8+ messages in thread
From: Luca Weiss @ 2017-09-12 8:40 UTC (permalink / raw)
To: linux-arm-msm; +Cc: Luca Weiss
This introduces the eMMC sdhci node and its pinctrl state
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 29 ++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
index 855b8b5144de..5087d47b3bcd 100644
--- a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts
@@ -219,6 +219,35 @@
status = "ok";
};
+ pinctrl@fd510000 {
+ sdhc1_pin_a: sdhc1-pin-active {
+ clk {
+ pins = "sdc1_clk";
+ drive-strength = <16>;
+ bias-disable;
+ };
+
+ cmd-data {
+ pins = "sdc1_cmd", "sdc1_data";
+ drive-strength = <10>;
+ bias-pull-up;
+ };
+ };
+ };
+
+ sdhci@f9824900 {
+ status = "ok";
+
+ vmmc-supply = <&pm8941_l20>;
+ vqmmc-supply = <&pm8941_s3>;
+
+ bus-width = <8>;
+ non-removable;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdhc1_pin_a>;
+ };
+
gpio-keys {
compatible = "gpio-keys";
input-name = "gpio-keys";
--
2.14.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone
2017-09-12 8:40 [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone Luca Weiss
` (2 preceding siblings ...)
2017-09-12 8:40 ` [PATCH 4/4] ARM: dts: msm8974-FP2: Add sdhci1 node Luca Weiss
@ 2017-10-11 6:03 ` Bjorn Andersson
3 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2017-10-11 6:03 UTC (permalink / raw)
To: Luca Weiss; +Cc: linux-arm-msm
On Tue 12 Sep 01:40 PDT 2017, Luca Weiss wrote:
> This DTS has support for the Fairphone 2 (codenamed FP2).
> This first version of the DTS supports just the serial console via the MSM UART
> pins.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-10-11 6:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-12 8:40 [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone Luca Weiss
2017-09-12 8:40 ` [PATCH 2/4] ARM: dts: msm8974-FP2: Introduce gpio-keys nodes Luca Weiss
2017-10-11 6:05 ` Bjorn Andersson
2017-09-12 8:40 ` [PATCH 3/4] ARM: dts: msm8974-FP2: Add regulator nodes for FP2 Luca Weiss
2017-10-11 6:06 ` Bjorn Andersson
2017-09-12 8:40 ` [PATCH 4/4] ARM: dts: msm8974-FP2: Add sdhci1 node Luca Weiss
2017-10-11 6:07 ` Bjorn Andersson
2017-10-11 6:03 ` [PATCH 1/4] ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone Bjorn Andersson
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).