Skip to contentSkip to conversation

arm64: dts: Add Qualcomm MSM8916 SoC and evaluation board dts

PATCH Superseded Kumar Gala 2 participants 5 messages Mar 12, 2015 – Mar 13, 2015

Subsystems (4)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH v4 2/4 arm64: dts: Add Qualcomm MSM8916 SoC and evaluation board dts

Add initial device tree support for Qualcomm MSM8916 SoC and MTP8916 evaluation board. At the current time we only boot up a single processor.

---
v4:
* Added chosen node so we dont need to spec everything for earlycon
* fixed up timer node to armv8, dropped clock-frequency

v3:
* Removed qcom,msm-id and qcom,board-id
* Added top level compat for "qcom,msm8916-mtp-smb1360"

v2:
* Updated to dropping CONFIG_ARCH_QCOM_MSM8916
* Updated to use qcom-ids.h

 arch/arm64/boot/dts/Makefile              |   1 +
 arch/arm64/boot/dts/qcom/Makefile         |   5 +
 arch/arm64/boot/dts/qcom/msm8916-mtp.dts  |  21 ++++
 arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi |  28 +++++
 arch/arm64/boot/dts/qcom/msm8916.dtsi     | 183 ++++++++++++++++++++++++++++++
 5 files changed, 238 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/Makefile
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-mtp.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916.dtsi
arch/arm64/boot/dts/Makefile +1 -0
index e0350ca..8517f15 100644
@@ -5,5 +5,6 @@ dts-dirs += cavium
 dts-dirs += exynos
 dts-dirs += freescale
 dts-dirs += mediatek
+dts-dirs += qcom
 
 subdir-y	:= $(dts-dirs)
arch/arm64/boot/dts/qcom/Makefile new file +5 -0
new file mode 100644
index 0000000..360ec4c
@@ -0,0 +1,5 @@
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-mtp.dtb
+
+always		:= $(dtb-y)
+subdir-y	:= $(dts-dirs)
+clean-files	:= *.dtb
arch/arm64/boot/dts/qcom/msm8916-mtp.dts new file +21 -0
new file mode 100644
index 0000000..784ad92
@@ -0,0 +1,21 @@
+/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 and
+* only version 2 as published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*/
+
+/dts-v1/;
+
+#include "msm8916-mtp.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. MSM 8916 MTP";
+	compatible = "qcom,msm8916-mtp", "qcom,msm8916-mtp-smb1360",
+			"qcom,msm8916", "qcom,mtp";
+};
arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi new file +28 -0
new file mode 100644
index 0000000..270ba55
@@ -0,0 +1,28 @@
+/* Copyright (c) 2014-2014, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "msm8916.dtsi"
+
+/ {
+	chosen {
+		stdout-path = &blsp1_uart2;
+	};
+
+	soc {
+		serial at 78b0000 {
+			status = "okay";
+			pinctrl-names = "default", "sleep";
+			pinctrl-0 = <&blsp1_uart2_default>;
+			pinctrl-1 = <&blsp1_uart2_sleep>;
+		};
+	};
+};
arch/arm64/boot/dts/qcom/msm8916.dtsi new file +183 -0

183 lines not on this page · raw message

Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw

arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi line 18

Quoted 4 lines
arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi new file +4 -0
+/ {
+	chosen {
+		stdout-path = &blsp1_uart2;
+	};

It would be good if we had the configuration too (see Documentation/devicetree/bindings/chosen.txt), as that avoids any reliance on kernel defaults.

You can refer to an alias, so this could be:

aliases {
	serial0 = &blsp1_uart2;
};
chosen {
	stdout-path = "serial0:115200n8";
};

...assuming that 115200n8 is correct for your UART, of course.

[...]

Quoted 1 line

+#include "skeleton.dtsi"

I'd like to get rid of skeleton.dtsi; it causes more problems than it solves (the address/size cells mismatch is confusing and hidden, people forget to fill in memory nodes appropriately, etc).

Please remove this include and place appropriate #address-cells and #size-cells here.

I'd strongly recommend going with /#size-cells = <2>; it' will save on a lot of pain if you need to add PCIe or something with large ranges later. If things all fall in 4GB within the SoC then have /soc/#size=cells = <1> and an appropriate /soc/ranges property.

I note this DT doesn't have any memory nodes. Is that an accident or does the loader fill that in?

If the latter, have an empty node with a comment to that effect.

Mark.

author
#2 lore raw
Quoted 15 lines · Mark Rutland

arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi line 18

Quoted 4 lines
arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi new file +4 -0
+/ {
+	chosen {
+		stdout-path = &blsp1_uart2;
+	};

It would be good if we had the configuration too (see Documentation/devicetree/bindings/chosen.txt), as that avoids any reliance on kernel defaults.

You can refer to an alias, so this could be:

aliases {
	serial0 = &blsp1_uart2;
};
Quoted 8 lines
chosen {
	stdout-path = "serial0:115200n8";
};

...assuming that 115200n8 is correct for your UART, of course.

[?]

Where is the code that actually handles this parsing? I?m not see it in early_init_dt_scan_chosen_serial and I don?t believe fdt_path_offset does anything special with ?:'

Quoted 9 lines
Quoted 2 lines

+#include "skeleton.dtsi"

I'd like to get rid of skeleton.dtsi; it causes more problems than it solves (the address/size cells mismatch is confusing and hidden, people forget to fill in memory nodes appropriately, etc).

Please remove this include and place appropriate #address-cells and #size-cells here.

Quoted 7 lines

I'd strongly recommend going with /#size-cells = <2>; it' will save on a lot of pain if you need to add PCIe or something with large ranges later. If things all fall in 4GB within the SoC then have /soc/#size=cells = <1> and an appropriate /soc/ranges property.

I note this DT doesn't have any memory nodes. Is that an accident or does the loader fill that in?

it was coming out of skeleton.dtsi

Quoted 2 lines

If the latter, have an empty node with a comment to that effect.

I?ll kill off usage of skeleton.dtsi

- k

Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#3 lore raw
Quoted 22 lines · Kumar Gala
Quoted 19 lines · Mark Rutland

arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi line 18

Quoted 4 lines
arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi new file +4 -0
+/ {
+	chosen {
+		stdout-path = &blsp1_uart2;
+	};

It would be good if we had the configuration too (see Documentation/devicetree/bindings/chosen.txt), as that avoids any reliance on kernel defaults.

You can refer to an alias, so this could be:

aliases {
	serial0 = &blsp1_uart2;
};
chosen {
	stdout-path = "serial0:115200n8";
};
Quoted 8 lines
Quoted 4 lines

...assuming that 115200n8 is correct for your UART, of course.

[?]

Where is the code that actually handles this parsing? I?m not see it in early_init_dt_scan_chosen_serial and I don?t believe fdt_path_offset does anything special with ?:'

Take a look at commit 7914a7c5651a5161 ("of: support passing console options with stdout-path").

Early on of_alias_scan will find the options and in of_console_check we'll call add_preferred_console as appropriate. That'll be called in uart_add_one_port.

Quoted 1 line

I?ll kill off usage of skeleton.dtsi

Cheers.

Mark.

author
#4 lore raw
Quoted 32 lines · Mark Rutland
Quoted 22 lines · Kumar Gala
Quoted 19 lines · Mark Rutland

arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi line 18

Quoted 4 lines
arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi new file +4 -0
+/ {
+	chosen {
+		stdout-path = &blsp1_uart2;
+	};

It would be good if we had the configuration too (see Documentation/devicetree/bindings/chosen.txt), as that avoids any reliance on kernel defaults.

You can refer to an alias, so this could be:

aliases {
	serial0 = &blsp1_uart2;
};
chosen {
	stdout-path = "serial0:115200n8";
};
Quoted 8 lines
Quoted 4 lines

...assuming that 115200n8 is correct for your UART, of course.

[?]

Where is the code that actually handles this parsing? I?m not see it in early_init_dt_scan_chosen_serial and I don?t believe fdt_path_offset does anything special with ?:'

Quoted 6 lines

Take a look at commit 7914a7c5651a5161 ("of: support passing console options with stdout-path").

Early on of_alias_scan will find the options and in of_console_check we'll call add_preferred_console as appropriate. That'll be called in uart_add_one_port.

Ok, but earlycon dt code doesn?t utilize this, as its setup is before we unflatten the dt.

So it breaks earlycon parsing right now, I?ll look at fixing that.

- k

Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project