Skip to contentSkip to conversation

devicetree: Add DTS file to support the Nexus7 2013 (flo) device.

RFC PATCH Superseded John Stultz 2 participants 2 messages Dec 5, 2015 – Dec 11, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 devicetree: Add DTS file to support the Nexus7 2013 (flo) device.

This patch adds a dts file to support the Nexus7 2013 device. Its based off of the qcom-apq8064-ifc6410.dts which is similar hardware.

Also includes some comments and context folded in
from Vinay Simha BN <[email protected]>

This is my first DTS submission, so thoughts or feedback on would be appreciated.

Cc Rob Herring <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Kumar Gala <[email protected]>
Cc Russell King <[email protected]>
Cc Vinay Simha BN <[email protected]>
Cc Bjorn Andersson <[email protected]>
---
 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts | 306 ++++++++++++++++++++++++++
 arch/arm/boot/dts/qcom-apq8064.dtsi           |   2 +
 3 files changed, 309 insertions(+)
 create mode 100644 arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts
arch/arm/boot/dts/Makefile +1 -0
index 30bbc37..c0f9076a 100644
@@ -502,6 +502,7 @@ dtb-$(CONFIG_ARCH_PRIMA2) += \
 dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-apq8064-cm-qs600.dtb \
 	qcom-apq8064-ifc6410.dtb \
+	qcom-apq8064-nexus7-flo.dtb \
 	qcom-apq8074-dragonboard.dtb \
 	qcom-apq8084-ifc6540.dtb \
 	qcom-apq8084-mtp.dtb \
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +306 -0

306 lines not on this page · raw message

arch/arm/boot/dts/qcom-apq8064.dtsi +2 -0
index a4c1762..d541438 100644
@@ -288,6 +288,8 @@
 				clocks = <&gcc GSBI3_QUP_CLK>,
 					 <&gcc GSBI3_H_CLK>;
 				clock-names = "core", "iface";
+				#address-cells = <1>;
+				#size-cells = <0>;
 			};
 		};
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 9 lines · John Stultz

This patch adds a dts file to support the Nexus7 2013 device. Its based off of the qcom-apq8064-ifc6410.dts which is similar hardware.

Also includes some comments and context folded in
from Vinay Simha BN <[email protected]>

This is my first DTS submission, so thoughts or feedback on would be appreciated.

Please remove this from the commit message ;)

[..]

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_PRIMA2) += \ · line 505

Quoted 9 lines
arch/arm/boot/dts/Makefile +1 -0
index 30bbc37..c0f9076a 100644
@@ -502,6 +502,7 @@ dtb-$(CONFIG_ARCH_PRIMA2) += \
 dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-apq8064-cm-qs600.dtb \
 	qcom-apq8064-ifc6410.dtb \
+	qcom-apq8064-nexus7-flo.dtb \

The format for the Sony products are <platform>-sony-<product>.dts, I think we should try to follow this for other devices as well.

Quoted 9 lines
arch/arm/boot/dts/Makefile +0 -0
 	qcom-apq8074-dragonboard.dtb \
 	qcom-apq8084-ifc6540.dtb \
 	qcom-apq8084-mtp.dtb \
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +0 -0
new file mode 100644
index 0000000..5183d18

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 7

Quoted 7 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +7 -0
@@ -0,0 +1,306 @@
+#include "qcom-apq8064-v2.0.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+/ {
+	model = "Qualcomm APQ8064/Nexus7(flo)";
+	compatible = "qcom,apq8064-nexus7-flo", "qcom,apq8064";

The Nexus7 isn't a Qualcomm product, so you should omit that from the model and I believe the compatible should be "asus,something-flo", "qcom,apq8064".

Quoted 20 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +20 -0
+
+	aliases {
+		serial0 = &gsbi7_serial;
+		serial1 = &gsbi6_serial;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	soc {
+		rpm@108000 {
+			regulators {
+				vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
+				vin_lvs1_3_6-supply = <&pm8921_s4>;
+				vin_lvs4_5_7-supply = <&pm8921_s4>;
+
+
+				vdd_l24-supply = <&pm8921_s1>;
+				vdd_l25-supply = <&pm8921_s1>;

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 37

Quoted 10 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +10 -0
+				vin_lvs2-supply = <&pm8921_s1>;
+
+				vdd_l26-supply = <&pm8921_s7>;
+				vdd_l27-supply = <&pm8921_s7>;
+				vdd_l28-supply = <&pm8921_s7>;
+
+				vdd_ncp-supply = <&pm8921_l6>;
+
+				/* Buck SMPS */
+				pm8921_s1: s1 {

These nodes already have labels, from the dtsi. So please omit the labels.

Quoted 7 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +7 -0
+					regulator-always-on;
+					regulator-min-microvolt = <1225000>;
+					regulator-max-microvolt = <1225000>;
+					qcom,switch-mode-frequency = <3200000>;
+					bias-pull-down;
+				};
+

[..]

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 161

Quoted 3 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +3 -0
+		};
+
+		ext_3p3v: regulator-fixed@1 {

This regulator does not sit on the mmio bus should as such be moved outside of the soc {}.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 173

Quoted 12 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +12 -0
+			compatible = "regulator-fixed";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-name = "ext_3p3v";
+			regulator-type = "voltage";
+			startup-delay-us = <0>;
+			gpio = <&tlmm_pinmux 77 GPIO_ACTIVE_HIGH>;
+			enable-active-high;
+			regulator-boot-on;
+		};
+
+		gsbi3: gsbi@16200000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 176

Quoted 3 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +3 -0
+			status = "okay";
+			qcom,mode = <GSBI_PROT_I2C>;
+			i2c3: i2c@16280000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 182

Quoted 6 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +6 -0
+				status = "okay";
+				clock-frequency = <200000>;
+				pinctrl-0 = <&i2c3_pins>;
+				pinctrl-names = "default";
+
+				trackpad: trackpad@10 {

Please omit this label.

Quoted 7 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +7 -0
+					compatible = "elan,ekth3500";
+					reg = <0x10>;
+					interrupt-parent = <&tlmm_pinmux>;
+					interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
+				};
+			};
+		};

[..]

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 231

Quoted 3 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +3 -0
+
+		/* OTG */
+		usb1_phy: phy@12500000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 238

Quoted 7 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +7 -0
+			status		= "okay";
+			vddcx-supply	= <&pm8921_s3>;
+			v3p3-supply	= <&pm8921_l3>;
+			v1p8-supply	= <&pm8921_l4>;
+		};
+
+		usb3_phy: phy@12520000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 245

Quoted 7 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +7 -0
+			status		= "okay";
+			vddcx-supply	= <&pm8921_s3>;
+			v3p3-supply	= <&pm8921_l3>;
+			v1p8-supply	= <&pm8921_l23>;
+		};
+
+		usb4_phy: phy@12530000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 243

Quoted 5 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +5 -0
+			status		= "okay";
+			vddcx-supply	= <&pm8921_s3>;
+			v3p3-supply	= <&pm8921_l3>;
+			v1p8-supply	= <&pm8921_l23>;
+		};

Why do you have 3 USB phys enabled on this board? How is this board designed?

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts

Quoted 2 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +2 -0
+
+		gadget1: gadget@12500000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 257

Quoted 5 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +5 -0
+			status = "okay";
+		};
+
+		/* OTG */
+		usb1: usb@12500000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 261

Quoted 4 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +4 -0
+			status = "okay";
+		};
+
+		usb3: usb@12520000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 265

Quoted 4 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +4 -0
+			status = "okay";
+		};
+
+		usb4: usb@12530000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts

Quoted 2 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +2 -0
+			status = "okay";
+		};

Again, 3 usb gadgets?

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 271

Quoted 4 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +4 -0
+
+		amba {
+			/* eMMC */
+			sdcc1: sdcc@12400000 {

Please omit this label.

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 278

Quoted 7 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +7 -0
+				status = "okay";
+				vmmc-supply = <&pm8921_l5>;
+				vqmmc-supply = <&pm8921_s4>;
+			};
+
+			/* WLAN */
+			sdcc4: sdcc@121c0000 {

I believe the Nexus7 sports a Qualcomm wifi chip, if so then please remove this node entirely (it doesn't use sdio)

arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts line 285

Quoted 7 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +7 -0
+				status = "okay";
+				vmmc-supply = <&ext_3p3v>;
+				vqmmc-supply = <&pm8921_lvs1>;
+			};
+		};
+
+		gpio-keys {

gpio-keys doesn't sit on the mmio bus, so please move it outside soc {}.

Quoted 26 lines
arch/arm/boot/dts/qcom-apq8064-nexus7-flo.dts new file +21 -0
+			compatible = "gpio-keys";
+			power {
+				label = "Power";
+				gpios = <&tlmm_pinmux 26 GPIO_ACTIVE_LOW>;
+				linux,code = <KEY_POWER>;
+				gpio-key,wakeup;
+			};
+			volume_up {
+				label = "Volume Up";
+				gpios = <&pm8921_gpio 4 GPIO_ACTIVE_HIGH>;
+				linux,code = <KEY_VOLUMEUP>;
+			};
+			volume_down {
+				label = "Volume Down";
+				gpios = <&pm8921_gpio 38 GPIO_ACTIVE_HIGH>;
+				linux,code = <KEY_VOLUMEDOWN>;
+			};
+		};
+
+	};
+};
arch/arm/boot/dts/qcom-apq8064.dtsi +0 -0
index a4c1762..d541438 100644

arch/arm/boot/dts/qcom-apq8064.dtsi line 292

Quoted 5 lines
arch/arm/boot/dts/qcom-apq8064.dtsi +2 -0
@@ -288,6 +288,8 @@
 				clocks = <&gcc GSBI3_QUP_CLK>,
 					 <&gcc GSBI3_H_CLK>;
 				clock-names = "core", "iface";
+				#address-cells = <1>;
+				#size-cells = <0>;

Please send this as a separate patch, with my Ack.

Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html