Skip to contentSkip to conversation

ARM: dts: qcom: Add initial IFC6540 board device tree

PATCH In review Georgi Djakov 3 participants 5 messages Sep 3, 2014 – Sep 5, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ARM: dts: qcom: Add initial IFC6540 board device tree

Add basic support for the IFC6540 single-board computer boards, that are based on the APQ8084 SoC. This patch adds the initial device tree and the neccessary nodes required for enabling the serial port and eMMC.

---
Changes since v2:
- Squashed all patches into one. (suggested by Kumar Gala)

Changes since v1:
- This time add linux-arm-msm list to the CC.
- Include a third patch for enabling the eMMC.

 arch/arm/boot/dts/Makefile                 |    1 +
 arch/arm/boot/dts/qcom-apq8084-ifc6540.dts |   23 +++++++++++++++++++++++
 arch/arm/boot/dts/qcom-apq8084.dtsi        |   23 +++++++++++++++++++++++
 3 files changed, 47 insertions(+)
 create mode 100644 arch/arm/boot/dts/qcom-apq8084-ifc6540.dts
arch/arm/boot/dts/Makefile +1 -0
index b022972..df8453a 100644
@@ -345,6 +345,7 @@ dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
 dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-apq8064-ifc6410.dtb \
 	qcom-apq8074-dragonboard.dtb \
+	qcom-apq8084-ifc6540.dtb \
 	qcom-apq8084-mtp.dtb \
 	qcom-msm8660-surf.dtb \
 	qcom-msm8960-cdp.dtb
arch/arm/boot/dts/qcom-apq8084-ifc6540.dts new file +23 -0
new file mode 100644
index 0000000..c9ff108
@@ -0,0 +1,23 @@
+#include "qcom-apq8084.dtsi"
+
+/ {
+	model = "Qualcomm APQ8084/IFC6540";
+	compatible = "qcom,apq8084-ifc6540", "qcom,apq8084";
+
+	soc {
+		serial at f995e000 {
+			status = "okay";
+		};
+
+		sdhci at f9824900 {
+			bus-width = <8>;
+			non-removable;
+			status = "okay";
+		};
+
+		sdhci at f98a4900 {
+			cd-gpios = <&tlmm 122 GPIO_ACTIVE_LOW>;
+			bus-width = <4>;
+		};
+	};
+};
arch/arm/boot/dts/qcom-apq8084.dtsi +23 -0
index 21d01e5..1f130bc 100644
@@ -3,6 +3,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/clock/qcom,gcc-apq8084.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "Qualcomm APQ 8084";
@@ -203,5 +204,27 @@
 			clock-names = "core", "iface";
 			status = "disabled";
 		};
+
+		sdhci at f9824900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 123 0>, <0 138 0>;
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};
+
+		sdhci at f98a4900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 125 0>, <0 221 0>;
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
1.7.9.5
#1 lore raw

Hi,

Am 03.09.2014 18:50, schrieb Georgi Djakov:

Quoted 73 lines

Add basic support for the IFC6540 single-board computer boards, that are based on the APQ8084 SoC. This patch adds the initial device tree and the neccessary nodes required for enabling the serial port and eMMC.

---
Changes since v2:
- Squashed all patches into one. (suggested by Kumar Gala)

Changes since v1:
- This time add linux-arm-msm list to the CC.
- Include a third patch for enabling the eMMC.

 arch/arm/boot/dts/Makefile                 |    1 +
 arch/arm/boot/dts/qcom-apq8084-ifc6540.dts |   23 +++++++++++++++++++++++
 arch/arm/boot/dts/qcom-apq8084.dtsi        |   23 +++++++++++++++++++++++
 3 files changed, 47 insertions(+)
 create mode 100644 arch/arm/boot/dts/qcom-apq8084-ifc6540.dts
arch/arm/boot/dts/Makefile +1 -0
index b022972..df8453a 100644
@@ -345,6 +345,7 @@ dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
 dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-apq8064-ifc6410.dtb \
 	qcom-apq8074-dragonboard.dtb \
+	qcom-apq8084-ifc6540.dtb \
 	qcom-apq8084-mtp.dtb \
 	qcom-msm8660-surf.dtb \
 	qcom-msm8960-cdp.dtb
arch/arm/boot/dts/qcom-apq8084-ifc6540.dts new file +23 -0
new file mode 100644
index 0000000..c9ff108
@@ -0,0 +1,23 @@
+#include "qcom-apq8084.dtsi"
+
+/ {
+	model = "Qualcomm APQ8084/IFC6540";
+	compatible = "qcom,apq8084-ifc6540", "qcom,apq8084";
+
+	soc {
+		serial at f995e000 {
+			status = "okay";
+		};
+
+		sdhci at f9824900 {
+			bus-width = <8>;
+			non-removable;
+			status = "okay";
+		};
+
+		sdhci at f98a4900 {
+			cd-gpios = <&tlmm 122 GPIO_ACTIVE_LOW>;
+			bus-width = <4>;
+		};
+	};
+};
arch/arm/boot/dts/qcom-apq8084.dtsi +1 -0
index 21d01e5..1f130bc 100644
@@ -3,6 +3,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/clock/qcom,gcc-apq8084.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "Qualcomm APQ 8084";

arch/arm/boot/dts/qcom-apq8084.dtsi line 212

Quoted 9 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +6 -0
@@ -203,5 +204,27 @@
 			clock-names = "core", "iface";
 			status = "disabled";
 		};
+
+		sdhci at f9824900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 123 0>, <0 138 0>;

I see that you've used GPIO_ACTIVE_* above. Is the trailing zero here possibly IRQ_TYPE_NONE?

Quoted 6 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +6 -0
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};
+

arch/arm/boot/dts/qcom-apq8084.dtsi line 228

Quoted 10 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +10 -0
+		sdhci at f98a4900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 125 0>, <0 221 0>;
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};

If you assign labels to these two nodes, you can reference them in the .dts as &labelname {...};. Same for the uart node. That avoids duplicating the hierarchy, detects spelling mistakes at compile time and reduces indentation. Cf. the recent ifc6410 patch.

Also, is sdhci the best node name here? Usually it's not supposed to reflect the exact interface used (e.g., usb vs. ehci).

arch/arm/boot/dts/qcom-apq8084.dtsi line 230

Quoted 2 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +0 -0
 	};
 };

Otherwise looks good.

Regards,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imend?rffer; HRB 16746 AG N?rnberg
#2 lore raw
Quoted 102 lines · Andreas F?rber

Hi,

Am 03.09.2014 18:50, schrieb Georgi Djakov:

Quoted 73 lines

Add basic support for the IFC6540 single-board computer boards, that are based on the APQ8084 SoC. This patch adds the initial device tree and the neccessary nodes required for enabling the serial port and eMMC.

---
Changes since v2:
- Squashed all patches into one. (suggested by Kumar Gala)

Changes since v1:
- This time add linux-arm-msm list to the CC.
- Include a third patch for enabling the eMMC.

arch/arm/boot/dts/Makefile                 |    1 +
arch/arm/boot/dts/qcom-apq8084-ifc6540.dts |   23 +++++++++++++++++++++++
arch/arm/boot/dts/qcom-apq8084.dtsi        |   23 +++++++++++++++++++++++
3 files changed, 47 insertions(+)

create mode 100644 arch/arm/boot/dts/qcom-apq8084-ifc6540.dts

arch/arm/boot/dts/Makefile +1 -0
index b022972..df8453a 100644
@@ -345,6 +345,7 @@ dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
 dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-apq8064-ifc6410.dtb \
 	qcom-apq8074-dragonboard.dtb \
+	qcom-apq8084-ifc6540.dtb \
 	qcom-apq8084-mtp.dtb \
 	qcom-msm8660-surf.dtb \
 	qcom-msm8960-cdp.dtb
arch/arm/boot/dts/qcom-apq8084-ifc6540.dts new file +23 -0
new file mode 100644
index 0000000..c9ff108
@@ -0,0 +1,23 @@
+#include "qcom-apq8084.dtsi"
+
+/ {
+	model = "Qualcomm APQ8084/IFC6540";
+	compatible = "qcom,apq8084-ifc6540", "qcom,apq8084";
+
+	soc {
+		serial at f995e000 {
+			status = "okay";
+		};
+
+		sdhci at f9824900 {
+			bus-width = <8>;
+			non-removable;
+			status = "okay";
+		};
+
+		sdhci at f98a4900 {
+			cd-gpios = <&tlmm 122 GPIO_ACTIVE_LOW>;
+			bus-width = <4>;
+		};
+	};
+};
arch/arm/boot/dts/qcom-apq8084.dtsi +1 -0
index 21d01e5..1f130bc 100644
@@ -3,6 +3,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/clock/qcom,gcc-apq8084.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "Qualcomm APQ 8084";

arch/arm/boot/dts/qcom-apq8084.dtsi line 212

Quoted 9 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +6 -0
@@ -203,5 +204,27 @@
 			clock-names = "core", "iface";
 			status = "disabled";
 		};
+
+		sdhci at f9824900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 123 0>, <0 138 0>;

I see that you've used GPIO_ACTIVE_* above. Is the trailing zero here possibly IRQ_TYPE_NONE?

Quoted 13 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +13 -0
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};
+
+		sdhci at f98a4900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 125 0>, <0 221 0>;
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>;
Quoted 8 lines

arch/arm/boot/dts/qcom-apq8084.dtsi line 217

Quoted 3 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +3 -0
+			clock-names = "core", "iface";
+			status = "disabled";
+		};

If you assign labels to these two nodes, you can reference them in the .dts as &labelname {...};. Same for the uart node. That avoids duplicating the hierarchy, detects spelling mistakes at compile time and reduces indentation. Cf. the recent ifc6410 patch.

Got no issues with introducing the labels, but I?d like to keep the hierarchy in the .dts file.

Quoted 2 lines

Also, is sdhci the best node name here? Usually it's not supposed to reflect the exact interface used (e.g., usb vs. ehci).

probably just use sdhc

Quoted 16 lines

arch/arm/boot/dts/qcom-apq8084.dtsi line 230

Quoted 3 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +0 -0
 	};
 };

Otherwise looks good.

Regards,
Andreas

Signature · 6 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imend?rffer; HRB 16746 AG N?rnberg
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#3 lore raw

Am 05.09.2014 17:20, schrieb Kumar Gala:

Quoted 50 lines · Andreas F?rber
Quoted 40 lines

Am 03.09.2014 18:50, schrieb Georgi Djakov:

Quoted 13 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +1 -0
index 21d01e5..1f130bc 100644
@@ -3,6 +3,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/clock/qcom,gcc-apq8084.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "Qualcomm APQ 8084";

arch/arm/boot/dts/qcom-apq8084.dtsi line 212

Quoted 9 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +6 -0
@@ -203,5 +204,27 @@
 			clock-names = "core", "iface";
 			status = "disabled";
 		};
+
+		sdhci at f9824900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 123 0>, <0 138 0>;

I see that you've used GPIO_ACTIVE_* above. Is the trailing zero here possibly IRQ_TYPE_NONE?

Quoted 13 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +13 -0
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};
+
+		sdhci at f98a4900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 125 0>, <0 221 0>;
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>;
Quoted 8 lines

arch/arm/boot/dts/qcom-apq8084.dtsi line 217

Quoted 3 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +3 -0
+			clock-names = "core", "iface";
+			status = "disabled";
+		};

If you assign labels to these two nodes, you can reference them in the .dts as &labelname {...};. Same for the uart node. That avoids duplicating the hierarchy, detects spelling mistakes at compile time and reduces indentation. Cf. the recent ifc6410 patch.

Quoted 1 line

Got no issues with introducing the labels, but I?d like to keep the hierarchy in the .dts file.

Any explanation why? The Samsung guys have been very strict to adopt this new style, with inherited nodes sorted alphabetically after / {};, and the ifc6540 is a new .dts we could apply the new pattern to.

But if you don't reference the node anywhere, there's no real benefit to adding a label in the first place. It can still be done once needed.

Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imend?rffer; HRB 16746 AG N?rnberg
#4 lore raw
In reply to Andreas Färber

Hi

On 09/05/2014 05:26 PM, Andreas F?rber wrote:
<...>

Quoted 6 lines

arch/arm/boot/dts/qcom-apq8084.dtsi line 212

Quoted 2 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +2 -0
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 123 0>, <0 138 0>;

I see that you've used GPIO_ACTIVE_* above. Is the trailing zero here possibly IRQ_TYPE_NONE?

Yes, it is. Will update it. Thanks!

Quoted 13 lines
Quoted 13 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +13 -0
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};
+
+		sdhci at f98a4900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+			interrupts = <0 125 0>, <0 221 0>;
+			interrupt-names = "hc_irq", "pwr_irq";
+			clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>;
Quoted 8 lines

arch/arm/boot/dts/qcom-apq8084.dtsi line 217

Quoted 3 lines
arch/arm/boot/dts/qcom-apq8084.dtsi +3 -0
+			clock-names = "core", "iface";
+			status = "disabled";
+		};

If you assign labels to these two nodes, you can reference them in the .dts as &labelname {...};. Same for the uart node. That avoids duplicating the hierarchy, detects spelling mistakes at compile time and reduces indentation. Cf. the recent ifc6410 patch.

Sure, adding a label will not hurt.

Quoted 4 lines

Also, is sdhci the best node name here? Usually it's not supposed to reflect the exact interface used (e.g., usb vs. ehci).

Ok, I'll figure out something better.

Quoted 5 lines
Quoted 2 lines
  	};
  };

Otherwise looks good.

Thanks for reviewing!

BR,
Georgi