Skip to contentSkip to conversation

arm64: dts: qcom: starqltechn: add initial device tree for starqltechn

PATCH In review Dzmitry Sankouski 3 participants 5 messages Jun 17, 2022 – Oct 10, 2022

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

PATCH v2 1/1 arm64: dts: qcom: starqltechn: add initial device tree for starqltechn

New device support - Samsung S9 (SM-G9600) phone
What works:
- simple framebuffer
- storage (both main and sdcard)
- ramoops

---
Changes for v2:
- rebase on Linus's master branch

 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../dts/qcom/sdm845-samsung-starqltechn.dts   |  45 ++
 .../dts/qcom/sdm845-samsung-starqltechn.dtsi  | 448 ++++++++++++++++++
 3 files changed, 494 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 2f8aec2cc6db..85140db507b6 100644
@@ -103,6 +103,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-oneplus-enchilada.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-oneplus-fajita.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-samsung-starqltechn.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-sony-xperia-tama-akari.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-sony-xperia-tama-akatsuki.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-sony-xperia-tama-apollo.dtb
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts new file +45 -0

45 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi new file +448 -0

448 lines not on this page · raw message

Signature · 1 line
2.30.2
#1 lore raw

Hi,

Quoted 1 line

New device support - Samsung S9 (SM-G9600) phone

...

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts line 11

Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts new file +1 -0
+	model = "Samsung S9 SM-G9600";

Isn't it called "Samsung Galaxy S9" [1] and not just "Samsung S9"?

[1] https://www.gsmarena.com/samsung_galaxy_s9-8966.php

Signature · 2 lines
Regards
Alexey Minnekhanov
#2 lore raw
In reply to Dzmitry Sankouski
Quoted 38 lines · Dzmitry Sankouski

New device support - Samsung S9 (SM-G9600) phone
What works:
- simple framebuffer
- storage (both main and sdcard)
- ramoops

---
Changes for v2:
- rebase on Linus's master branch

 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../dts/qcom/sdm845-samsung-starqltechn.dts   |  45 ++
 .../dts/qcom/sdm845-samsung-starqltechn.dtsi  | 448 ++++++++++++++++++
 3 files changed, 494 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 2f8aec2cc6db..85140db507b6 100644
@@ -103,6 +103,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-oneplus-enchilada.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-oneplus-fajita.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-samsung-starqltechn.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-sony-xperia-tama-akari.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-sony-xperia-tama-akatsuki.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-sony-xperia-tama-apollo.dtb
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts new file +2 -0
new file mode 100644
index 000000000000..53bb2ebf0061
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0
+/*

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts line 12

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts new file +10 -0
+ * SDM845 Samsung S9 (SM-G9600) (starqltechn) specific device tree
+ *
+ * Copyright (c) 2020, The Linux Foundation. All rights reserved.
+ */
+
+#include "sdm845-samsung-starqltechn.dtsi"
+
+/ {
+	model = "Samsung S9 SM-G9600";
+	compatible = "samsung,starqltechn", "qcom,sdm845";

Missing documentation. I guess you should rebase on my series adding compatibles for sdm845.

Bjorn, can we get my series merged? It's really more and more DTs needing it.

https://lore.kernel.org/all/[email protected]/

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts line 18

Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts new file +6 -0
+
+	chosen {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		bootargs = "console=tty1 loglevel=15 clk_ignore_unused PMOS_NO_OUTPUT_REDIRECT";

This should not be in DTS. Especially debugging stuff... console should be selected by stdout-path.

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts line 19

Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts new file +1 -0
+		framebuffer: framebuffer@9D400000 {

lowercase addresses everywhere

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts line 29

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts new file +10 -0
+			compatible = "simple-framebuffer";
+			reg = <0 0x9D400000 0 (2960 * 1440 * 4)>;//2400000
+			width = <1440>;
+			height = <2960>;
+			stride = <(1440 * 4)>;
+			format = "a8r8g8b8";
+		};
+	};
+
+

Just one blank line.

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts line 36

Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts new file +7 -0
+	reserved-memory {
+		framebuffer_region@9d400000 {
+			reg = <0x0 0x9d400000 0x0 0x02400000>;
+			no-map;
+		};
+
+		ramoops@A1300000 {

lowercase hex. In entire file.

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi

Quoted 14 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts new file +9 -0
+			compatible = "ramoops";
+			reg = <0x0 0xa1300000 0x0 0x100000>;
+			record-size = <0x40000>;
+			console-size = <0x40000>;
+			ftrace-size = <0x40000>;
+			pmsg-size = <0x40000>;
+		};
+	};
+};
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi new file +0 -0
new file mode 100644
index 000000000000..1d640d88c61a

Why do you have DTSI for one DTS?

Quoted 19 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi new file +18 -0
@@ -0,0 +1,448 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * SDM845 Samsung S9 (SM-G9600) (starqltechn / star2qltechn) common device tree source
+ *
+ * Copyright (c) 2020, The Linux Foundation. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sdm845.dtsi"
+
+/ {
+	chassis-type = "handset";
+
+	vph_pwr: vph-pwr-regulator {
+		compatible = "regulator-fixed";

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi line 28

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi new file +10 -0
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+	};
+
+	/*
+	 * Apparently RPMh does not provide support for PM8998 S4 because it
+	 * is always-on; model it as a fixed regulator.
+	 */
+	vreg_s4a_1p8: pm8998-smps4 {

Consistent naming. Please apply all comments from your other patchset...

Quoted 4 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi new file +4 -0
+		compatible = "regulator-fixed";
+		regulator-name = "vreg_s4a_1p8";
+
+		regulator-min-microvolt = <1800000>;

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi line 42

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi new file +10 -0
+		regulator-max-microvolt = <1800000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+
+		vin-supply = <&vph_pwr>;
+	};
+};
+
+

One blank line.

arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi line 47

Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dtsi new file +5 -0
+&apps_rsc {
+	pm8998-rpmh-regulators {
+		compatible = "qcom,pm8998-rpmh-regulators";
+		qcom,pmic-id = "a";
+

Best regards,
Krzysztof

#3 lore raw

(...)

Quoted 2 lines

Why do you have DTSI for one DTS?

Samsung has several devices on sdm845 SoC (at least 3 phones:
starqltechn, starq2ltechn, crownltechn). I don't have plans to introduce support for any new Samsung sdm845 device except starqltechn, but I guess we should extract common dtsi now to make future contributions easier. I think I should rename common dtsi file to '$soc-$vendor-common.dtsi', like others device trees doing now

Quoted 1 line

(...)

Signature · 2 lines
Best regards,
Dzmitry
#4 lore raw
Quoted 9 lines · Dzmitry Sankouski

(...)

Quoted 2 lines

Why do you have DTSI for one DTS?

Samsung has several devices on sdm845 SoC (at least 3 phones:
starqltechn, starq2ltechn, crownltechn). I don't have plans to introduce support for any new Samsung sdm845 device except starqltechn, but I guess we should extract common dtsi now to make future contributions easier. I think I should rename common dtsi file to '$soc-$vendor-common.dtsi', like others device trees doing now

File can be easily renamed later, but if additional devices are not mainlined we will always need to deal with almost empty DTS.

Best regards,
Krzysztof