2023-01-22 14:57:43

by Stefan Hansson

[permalink] [raw]
Subject: [PATCH 0/3] Add samsung-matisselte and common matisse dtsi

This series adds a common samsung-matisse dtsi and reworks
samsung-matisse-wifi to use it, and introduces samsung-matisselte. I
choose matisselte over matisse-lte as this is how most other devices
(klte, s3ve3g) do it and it is the codename that Samsung gave the
device. See individual commits for more information.

Stefan Hansson (3):
ARM: dts: qcom: samsung-matisse-common: Add initial common device tree
dt-bindings: arm: qcom: Add MSM8926 and Samsung Galaxy Tab 4 10.1 LTE
ARM: dts: qcom: Add support for Samsung Galaxy Tab 4 10.1 LTE
(SM-T535)

.../devicetree/bindings/arm/qcom.yaml | 6 +
arch/arm/boot/dts/Makefile | 1 +
.../dts/qcom-apq8026-samsung-matisse-wifi.dts | 511 +-----------------
.../qcom-msm8226-samsung-matisse-common.dtsi | 510 +++++++++++++++++
.../dts/qcom-msm8926-samsung-matisselte.dts | 39 ++
5 files changed, 568 insertions(+), 499 deletions(-)
create mode 100644 arch/arm/boot/dts/qcom-msm8226-samsung-matisse-common.dtsi
create mode 100644 arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts

--
2.39.0



2023-01-22 14:57:45

by Stefan Hansson

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: arm: qcom: Add MSM8926 and Samsung Galaxy Tab 4 10.1 LTE

MSM8926 (also known as Snapdragon 400) is very similar to MSM8226 and
APQ8026 with the primary difference being that it features an LTE modem
unlike the former two which feature a 3G modem and a GPS-only modem,
respectively.

This also documents Samsung Galaxy Tab 4 10.1 LTE (samsung,matisselte)
which is a tablet by Samsung based on the MSM8926 SoC.

Signed-off-by: Stefan Hansson <[email protected]>
---
Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 47913a8e3eea..7a0b2088ead9 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -35,6 +35,7 @@ description: |
mdm9615
msm8226
msm8916
+ msm8926
msm8953
msm8956
msm8974
@@ -219,6 +220,11 @@ properties:
- const: qcom,msm8916-v1-qrd/9-v1
- const: qcom,msm8916

+ - items:
+ - enum:
+ - samsung,matisselte
+ - const: qcom,msm8926
+
- items:
- enum:
- motorola,potter
--
2.39.0


2023-01-22 14:57:49

by Stefan Hansson

[permalink] [raw]
Subject: [PATCH 3/3] ARM: dts: qcom: Add support for Samsung Galaxy Tab 4 10.1 LTE (SM-T535)

Add a device tree for the Samsung Galaxy Tab 4 10.1 (SM-T535) LTE tablet
based on the MSM8926 platform.

Signed-off-by: Stefan Hansson <[email protected]>
---
arch/arm/boot/dts/Makefile | 1 +
.../dts/qcom-msm8926-samsung-matisselte.dts | 39 +++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d0c07867aeab..e1fad9eb0d26 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1061,6 +1061,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-msm8916-samsung-e7.dtb \
qcom-msm8916-samsung-grandmax.dtb \
qcom-msm8916-samsung-serranove.dtb \
+ qcom-msm8926-samsung-matisselte.dtb \
qcom-msm8960-cdp.dtb \
qcom-msm8974-lge-nexus5-hammerhead.dtb \
qcom-msm8974-sony-xperia-rhine-amami.dtb \
diff --git a/arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts b/arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts
new file mode 100644
index 000000000000..6df568f1f36d
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2022, Matti Lehtimäki <[email protected]>
+ * Copyright (c) 2023, Stefan Hansson <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "qcom-msm8226-samsung-matisse-common.dtsi"
+
+/ {
+ model = "Samsung Galaxy Tab 4 10.1 LTE";
+ compatible = "samsung,matisselte", "qcom,msm8926";
+ chassis-type = "tablet";
+};
+
+&pm8226_l3 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-always-on;
+};
+
+&pm8226_s4 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2200000>;
+};
+
+&reg_tsp_3p3v {
+ gpio = <&tlmm 32 GPIO_ACTIVE_HIGH>;
+};
+
+&sdhc_2 {
+ /* SD card fails to probe with error -110 */
+ status = "disabled";
+};
+
+&tsp_en1_default_state {
+ pins = "gpio32";
+};
--
2.39.0


2023-01-22 14:57:50

by Stefan Hansson

[permalink] [raw]
Subject: [PATCH 1/3] ARM: dts: qcom: samsung-matisse-common: Add initial common device tree

According to the dts from the kernel source code released by Samsung,
matissewifi and matisselte only have minor differences in hardware, so
use a shared dtsi to reduce duplicated code. Additionally, this should
make adding support for matisse3g easier should someone want to do that
at a later point.

As such, add a common device tree for all matisse devices by Samsung
based on the matissewifi dts. Support for matisselte will be introduced
in a later patch in this series and will use the common dtsi as well.

Signed-off-by: Stefan Hansson <[email protected]>
---
.../dts/qcom-apq8026-samsung-matisse-wifi.dts | 511 +-----------------
.../qcom-msm8226-samsung-matisse-common.dtsi | 510 +++++++++++++++++
2 files changed, 522 insertions(+), 499 deletions(-)
create mode 100644 arch/arm/boot/dts/qcom-msm8226-samsung-matisse-common.dtsi

diff --git a/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
index 91b860e24681..2b03e68c8b72 100644
--- a/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
+++ b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
@@ -5,516 +5,29 @@

/dts-v1/;

-#include <dt-bindings/input/input.h>
-#include "qcom-msm8226.dtsi"
-#include "qcom-pm8226.dtsi"
-
-/delete-node/ &adsp_region;
-/delete-node/ &smem_region;
+#include "qcom-msm8226-samsung-matisse-common.dtsi"

/ {
model = "Samsung Galaxy Tab 4 10.1";
compatible = "samsung,matisse-wifi", "qcom,apq8026";
chassis-type = "tablet";
-
- aliases {
- mmc0 = &sdhc_1; /* SDC1 eMMC slot */
- mmc1 = &sdhc_2; /* SDC2 SD card slot */
- display0 = &framebuffer0;
- };
-
- chosen {
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- stdout-path = "display0";
-
- framebuffer0: framebuffer@3200000 {
- compatible = "simple-framebuffer";
- reg = <0x03200000 0x800000>;
- width = <1280>;
- height = <800>;
- stride = <(1280 * 3)>;
- format = "r8g8b8";
- };
- };
-
- gpio-hall-sensor {
- compatible = "gpio-keys";
-
- event-hall-sensor {
- label = "Hall Effect Sensor";
- gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
- interrupts = <&tlmm 110 IRQ_TYPE_EDGE_FALLING>;
- linux,input-type = <EV_SW>;
- linux,code = <SW_LID>;
- debounce-interval = <15>;
- wakeup-source;
- };
- };
-
- gpio-keys {
- compatible = "gpio-keys";
- autorepeat;
-
- key-home {
- label = "Home";
- gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_HOMEPAGE>;
- debounce-interval = <15>;
- };
-
- key-volume-down {
- label = "Volume Down";
- gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_VOLUMEDOWN>;
- debounce-interval = <15>;
- };
-
- key-volume-up {
- label = "Volume Up";
- gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_VOLUMEUP>;
- debounce-interval = <15>;
- };
- };
-
- i2c-backlight {
- compatible = "i2c-gpio";
- sda-gpios = <&tlmm 20 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
- scl-gpios = <&tlmm 21 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
-
- pinctrl-0 = <&backlight_i2c_default_state>;
- pinctrl-names = "default";
-
- i2c-gpio,delay-us = <4>;
-
- #address-cells = <1>;
- #size-cells = <0>;
-
- backlight@2c {
- compatible = "ti,lp8556";
- reg = <0x2c>;
-
- dev-ctrl = /bits/ 8 <0x80>;
- init-brt = /bits/ 8 <0x3f>;
- pwm-period = <100000>;
-
- pwms = <&backlight_pwm 0 100000>;
- pwm-names = "lp8556";
-
- rom-a0h {
- rom-addr = /bits/ 8 <0xa0>;
- rom-val = /bits/ 8 <0x44>;
- };
-
- rom-a1h {
- rom-addr = /bits/ 8 <0xa1>;
- rom-val = /bits/ 8 <0x6c>;
- };
-
- rom-a5h {
- rom-addr = /bits/ 8 <0xa5>;
- rom-val = /bits/ 8 <0x24>;
- };
- };
- };
-
- backlight_pwm: pwm {
- compatible = "clk-pwm";
- #pwm-cells = <2>;
- clocks = <&mmcc CAMSS_GP0_CLK>;
- pinctrl-0 = <&backlight_pwm_default_state>;
- pinctrl-names = "default";
- };
-
- reg_tsp_1p8v: regulator-tsp-1p8v {
- compatible = "regulator-fixed";
- regulator-name = "tsp_1p8v";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
-
- gpio = <&tlmm 31 GPIO_ACTIVE_HIGH>;
- enable-active-high;
-
- pinctrl-names = "default";
- pinctrl-0 = <&tsp_en_default_state>;
- };
-
- reg_tsp_3p3v: regulator-tsp-3p3v {
- compatible = "regulator-fixed";
- regulator-name = "tsp_3p3v";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
-
- gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
- enable-active-high;
-
- pinctrl-names = "default";
- pinctrl-0 = <&tsp_en1_default_state>;
- };
-
- reserved-memory {
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- framebuffer@3200000 {
- reg = <0x03200000 0x800000>;
- no-map;
- };
-
- mpss@8400000 {
- reg = <0x08400000 0x1f00000>;
- no-map;
- };
-
- mba@a300000 {
- reg = <0x0a300000 0x100000>;
- no-map;
- };
-
- reserved@cb00000 {
- reg = <0x0cb00000 0x700000>;
- no-map;
- };
-
- wcnss@d200000 {
- reg = <0x0d200000 0x700000>;
- no-map;
- };
-
- adsp_region: adsp@d900000 {
- reg = <0x0d900000 0x1800000>;
- no-map;
- };
-
- venus@f100000 {
- reg = <0x0f100000 0x500000>;
- no-map;
- };
-
- smem_region: smem@fa00000 {
- reg = <0x0fa00000 0x100000>;
- no-map;
- };
-
- reserved@fb00000 {
- reg = <0x0fb00000 0x260000>;
- no-map;
- };
-
- rfsa@fd60000 {
- reg = <0x0fd60000 0x20000>;
- no-map;
- };
-
- rmtfs@fd80000 {
- compatible = "qcom,rmtfs-mem";
- reg = <0x0fd80000 0x180000>;
- no-map;
-
- qcom,client-id = <1>;
- };
- };
};

-&adsp {
- status = "okay";
+&pm8226_l3 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1337500>;
+ regulator-always-on;
};

-&blsp1_i2c2 {
- status = "okay";
-
- accelerometer@1d {
- compatible = "st,lis2hh12";
- reg = <0x1d>;
-
- interrupt-parent = <&tlmm>;
- interrupts = <54 IRQ_TYPE_LEVEL_HIGH>;
-
- pinctrl-names = "default";
- pinctrl-0 = <&accel_int_default_state>;
-
- st,drdy-int-pin = <1>;
-
- vdd-supply = <&pm8226_l19>;
- vddio-supply = <&pm8226_lvs1>;
- };
-};
-
-&blsp1_i2c4 {
- status = "okay";
-
- muic: usb-switch@25 {
- compatible = "siliconmitus,sm5502-muic";
- reg = <0x25>;
-
- interrupt-parent = <&tlmm>;
- interrupts = <67 IRQ_TYPE_EDGE_FALLING>;
-
- pinctrl-names = "default";
- pinctrl-0 = <&muic_int_default_state>;
- };
-};
-
-&blsp1_i2c5 {
- status = "okay";
-
- touchscreen@4a {
- compatible = "atmel,maxtouch";
- reg = <0x4a>;
-
- interrupt-parent = <&tlmm>;
- interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
-
- pinctrl-names = "default";
- pinctrl-0 = <&tsp_int_rst_default_state>;
-
- reset-gpios = <&pm8226_gpios 6 GPIO_ACTIVE_LOW>;
-
- vdd-supply = <&reg_tsp_1p8v>;
- vdda-supply = <&reg_tsp_3p3v>;
- };
-};
-
-&rpm_requests {
- regulators {
- compatible = "qcom,rpm-pm8226-regulators";
-
- pm8226_s3: s3 {
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1300000>;
- };
-
- pm8226_s4: s4 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- };
-
- pm8226_s5: s5 {
- regulator-min-microvolt = <1150000>;
- regulator-max-microvolt = <1150000>;
- };
-
- pm8226_l1: l1 {
- regulator-min-microvolt = <1225000>;
- regulator-max-microvolt = <1225000>;
- };
-
- pm8226_l2: l2 {
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
- };
-
- pm8226_l3: l3 {
- regulator-min-microvolt = <750000>;
- regulator-max-microvolt = <1337500>;
- regulator-always-on;
- };
-
- pm8226_l4: l4 {
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
- };
-
- pm8226_l5: l5 {
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
- };
-
- pm8226_l6: l6 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-always-on;
- };
-
- pm8226_l7: l7 {
- regulator-min-microvolt = <1850000>;
- regulator-max-microvolt = <1850000>;
- };
-
- pm8226_l8: l8 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-always-on;
- };
-
- pm8226_l9: l9 {
- regulator-min-microvolt = <2050000>;
- regulator-max-microvolt = <2050000>;
- };
-
- pm8226_l10: l10 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- };
-
- pm8226_l12: l12 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- };
-
- pm8226_l14: l14 {
- regulator-min-microvolt = <2750000>;
- regulator-max-microvolt = <2750000>;
- };
-
- pm8226_l15: l15 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3300000>;
- };
-
- pm8226_l16: l16 {
- regulator-min-microvolt = <3000000>;
- regulator-max-microvolt = <3350000>;
- };
-
- pm8226_l17: l17 {
- regulator-min-microvolt = <2950000>;
- regulator-max-microvolt = <2950000>;
-
- regulator-system-load = <200000>;
- regulator-allow-set-load;
- regulator-always-on;
- };
-
- pm8226_l18: l18 {
- regulator-min-microvolt = <2950000>;
- regulator-max-microvolt = <2950000>;
- };
-
- pm8226_l19: l19 {
- regulator-min-microvolt = <2850000>;
- regulator-max-microvolt = <3000000>;
- };
-
- pm8226_l20: l20 {
- regulator-min-microvolt = <3075000>;
- regulator-max-microvolt = <3075000>;
- };
-
- pm8226_l21: l21 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <2950000>;
- };
-
- pm8226_l22: l22 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3000000>;
- };
-
- pm8226_l23: l23 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3300000>;
- };
-
- pm8226_l24: l24 {
- regulator-min-microvolt = <1300000>;
- regulator-max-microvolt = <1350000>;
- };
-
- pm8226_l25: l25 {
- regulator-min-microvolt = <1775000>;
- regulator-max-microvolt = <2125000>;
- };
-
- pm8226_l26: l26 {
- regulator-min-microvolt = <1225000>;
- regulator-max-microvolt = <1300000>;
- };
-
- pm8226_l27: l27 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- };
-
- pm8226_l28: l28 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <2950000>;
- };
-
- pm8226_lvs1: lvs1 {};
- };
-};
-
-&sdhc_1 {
- vmmc-supply = <&pm8226_l17>;
- vqmmc-supply = <&pm8226_l6>;
-
- bus-width = <8>;
- non-removable;
-
- status = "okay";
-};
-
-&sdhc_2 {
- vmmc-supply = <&pm8226_l18>;
- vqmmc-supply = <&pm8226_l21>;
-
- bus-width = <4>;
- cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
-
- status = "okay";
-};
-
-&tlmm {
- accel_int_default_state: accel-int-default-state {
- pins = "gpio54";
- function = "gpio";
- drive-strength = <2>;
- bias-disable;
- };
-
- backlight_i2c_default_state: backlight-i2c-default-state {
- pins = "gpio20", "gpio21";
- function = "gpio";
- drive-strength = <2>;
- bias-disable;
- };
-
- backlight_pwm_default_state: backlight-pwm-default-state {
- pins = "gpio33";
- function = "gp0_clk";
- };
-
- muic_int_default_state: muic-int-default-state {
- pins = "gpio67";
- function = "gpio";
- drive-strength = <2>;
- bias-disable;
- };
-
- tsp_en_default_state: tsp-en-default-state {
- pins = "gpio31";
- function = "gpio";
- drive-strength = <2>;
- bias-disable;
- };
-
- tsp_en1_default_state: tsp-en1-default-state {
- pins = "gpio73";
- function = "gpio";
- drive-strength = <2>;
- bias-disable;
- };
-
- tsp_int_rst_default_state: tsp-int-rst-default-state {
- pins = "gpio17";
- function = "gpio";
- drive-strength = <10>;
- bias-pull-up;
- };
+&pm8226_s4 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
};

-&usb {
- extcon = <&muic>, <&muic>;
- status = "okay";
+&reg_tsp_3p3v {
+ gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
};

-&usb_hs_phy {
- extcon = <&muic>;
- v1p8-supply = <&pm8226_l10>;
- v3p3-supply = <&pm8226_l20>;
+&tsp_en1_default_state {
+ pins = "gpio73";
};
diff --git a/arch/arm/boot/dts/qcom-msm8226-samsung-matisse-common.dtsi b/arch/arm/boot/dts/qcom-msm8226-samsung-matisse-common.dtsi
new file mode 100644
index 000000000000..efabc03e5db5
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8226-samsung-matisse-common.dtsi
@@ -0,0 +1,510 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2022, Matti Lehtimäki <[email protected]>
+ * Copyright (c) 2023, Stefan Hansson <[email protected]>
+ */
+
+#include <dt-bindings/input/input.h>
+#include "qcom-msm8226.dtsi"
+#include "qcom-pm8226.dtsi"
+
+/delete-node/ &adsp_region;
+/delete-node/ &smem_region;
+
+/ {
+ aliases {
+ mmc0 = &sdhc_1; /* SDC1 eMMC slot */
+ mmc1 = &sdhc_2; /* SDC2 SD card slot */
+ display0 = &framebuffer0;
+ };
+
+ chosen {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ stdout-path = "display0";
+
+ framebuffer0: framebuffer@3200000 {
+ compatible = "simple-framebuffer";
+ reg = <0x03200000 0x800000>;
+ width = <1280>;
+ height = <800>;
+ stride = <(1280 * 3)>;
+ format = "r8g8b8";
+ };
+ };
+
+ gpio-hall-sensor {
+ compatible = "gpio-keys";
+
+ event-hall-sensor {
+ label = "Hall Effect Sensor";
+ gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ interrupts = <&tlmm 110 IRQ_TYPE_EDGE_FALLING>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ debounce-interval = <15>;
+ wakeup-source;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ autorepeat;
+
+ key-home {
+ label = "Home";
+ gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_HOMEPAGE>;
+ debounce-interval = <15>;
+ };
+
+ key-volume-down {
+ label = "Volume Down";
+ gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEDOWN>;
+ debounce-interval = <15>;
+ };
+
+ key-volume-up {
+ label = "Volume Up";
+ gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ debounce-interval = <15>;
+ };
+ };
+
+ i2c-backlight {
+ compatible = "i2c-gpio";
+ sda-gpios = <&tlmm 20 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&tlmm 21 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+
+ pinctrl-0 = <&backlight_i2c_default_state>;
+ pinctrl-names = "default";
+
+ i2c-gpio,delay-us = <4>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ backlight@2c {
+ compatible = "ti,lp8556";
+ reg = <0x2c>;
+
+ dev-ctrl = /bits/ 8 <0x80>;
+ init-brt = /bits/ 8 <0x3f>;
+ pwm-period = <100000>;
+
+ pwms = <&backlight_pwm 0 100000>;
+ pwm-names = "lp8556";
+
+ rom-a0h {
+ rom-addr = /bits/ 8 <0xa0>;
+ rom-val = /bits/ 8 <0x44>;
+ };
+
+ rom-a1h {
+ rom-addr = /bits/ 8 <0xa1>;
+ rom-val = /bits/ 8 <0x6c>;
+ };
+
+ rom-a5h {
+ rom-addr = /bits/ 8 <0xa5>;
+ rom-val = /bits/ 8 <0x24>;
+ };
+ };
+ };
+
+ backlight_pwm: pwm {
+ compatible = "clk-pwm";
+ #pwm-cells = <2>;
+ clocks = <&mmcc CAMSS_GP0_CLK>;
+ pinctrl-0 = <&backlight_pwm_default_state>;
+ pinctrl-names = "default";
+ };
+
+ reg_tsp_1p8v: regulator-tsp-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "tsp_1p8v";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ gpio = <&tlmm 31 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&tsp_en_default_state>;
+ pinctrl-names = "default";
+ };
+
+ reg_tsp_3p3v: regulator-tsp-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "tsp_3p3v";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ /* GPIO is board-specific */
+ enable-active-high;
+
+ pinctrl-0 = <&tsp_en1_default_state>;
+ pinctrl-names = "default";
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ framebuffer@3200000 {
+ reg = <0x03200000 0x800000>;
+ no-map;
+ };
+
+ mpss@8400000 {
+ reg = <0x08400000 0x1f00000>;
+ no-map;
+ };
+
+ mba@a300000 {
+ reg = <0x0a300000 0x100000>;
+ no-map;
+ };
+
+ reserved@cb00000 {
+ reg = <0x0cb00000 0x700000>;
+ no-map;
+ };
+
+ wcnss@d200000 {
+ reg = <0x0d200000 0x700000>;
+ no-map;
+ };
+
+ adsp_region: adsp@d900000 {
+ reg = <0x0d900000 0x1800000>;
+ no-map;
+ };
+
+ venus@f100000 {
+ reg = <0x0f100000 0x500000>;
+ no-map;
+ };
+
+ smem_region: smem@fa00000 {
+ reg = <0x0fa00000 0x100000>;
+ no-map;
+ };
+
+ reserved@fb00000 {
+ reg = <0x0fb00000 0x260000>;
+ no-map;
+ };
+
+ rfsa@fd60000 {
+ reg = <0x0fd60000 0x20000>;
+ no-map;
+ };
+
+ rmtfs@fd80000 {
+ compatible = "qcom,rmtfs-mem";
+ reg = <0x0fd80000 0x180000>;
+ no-map;
+
+ qcom,client-id = <1>;
+ };
+ };
+};
+
+&adsp {
+ status = "okay";
+};
+
+&blsp1_i2c2 {
+ status = "okay";
+
+ accelerometer@1d {
+ compatible = "st,lis2hh12";
+ reg = <0x1d>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <54 IRQ_TYPE_LEVEL_HIGH>;
+
+ pinctrl-0 = <&accel_int_default_state>;
+ pinctrl-names = "default";
+
+ st,drdy-int-pin = <1>;
+
+ vdd-supply = <&pm8226_l19>;
+ vddio-supply = <&pm8226_lvs1>;
+ };
+};
+
+&blsp1_i2c4 {
+ status = "okay";
+
+ muic: usb-switch@25 {
+ compatible = "siliconmitus,sm5502-muic";
+ reg = <0x25>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <67 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-0 = <&muic_int_default_state>;
+ pinctrl-names = "default";
+ };
+};
+
+&blsp1_i2c5 {
+ status = "okay";
+
+ touchscreen@4a {
+ compatible = "atmel,maxtouch";
+ reg = <0x4a>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
+
+ pinctrl-0 = <&tsp_int_rst_default_state>;
+ pinctrl-names = "default";
+
+ reset-gpios = <&pm8226_gpios 6 GPIO_ACTIVE_LOW>;
+
+ vdd-supply = <&reg_tsp_1p8v>;
+ vdda-supply = <&reg_tsp_3p3v>;
+ };
+};
+
+&rpm_requests {
+ regulators {
+ compatible = "qcom,rpm-pm8226-regulators";
+
+ pm8226_s3: s3 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1300000>;
+ };
+
+ /* Voltage constraints are board-specific */
+ pm8226_s4: s4 {};
+
+ pm8226_s5: s5 {
+ regulator-min-microvolt = <1150000>;
+ regulator-max-microvolt = <1150000>;
+ };
+
+ pm8226_l1: l1 {
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1225000>;
+ };
+
+ pm8226_l2: l2 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ /* Voltage constraints are board-specific */
+ pm8226_l3: l3 {};
+
+ pm8226_l4: l4 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l5: l5 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l6: l6 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ pm8226_l7: l7 {
+ regulator-min-microvolt = <1850000>;
+ regulator-max-microvolt = <1850000>;
+ };
+
+ pm8226_l8: l8 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ pm8226_l9: l9 {
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
+ };
+
+ pm8226_l10: l10 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l12: l12 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l14: l14 {
+ regulator-min-microvolt = <2750000>;
+ regulator-max-microvolt = <2750000>;
+ };
+
+ pm8226_l15: l15 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ pm8226_l16: l16 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3350000>;
+ };
+
+ pm8226_l17: l17 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+
+ regulator-system-load = <200000>;
+ regulator-allow-set-load;
+ regulator-always-on;
+ };
+
+ pm8226_l18: l18 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l19: l19 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ pm8226_l20: l20 {
+ regulator-min-microvolt = <3075000>;
+ regulator-max-microvolt = <3075000>;
+ };
+
+ pm8226_l21: l21 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l22: l22 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ pm8226_l23: l23 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ pm8226_l24: l24 {
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1350000>;
+ };
+
+ pm8226_l25: l25 {
+ regulator-min-microvolt = <1775000>;
+ regulator-max-microvolt = <2125000>;
+ };
+
+ pm8226_l26: l26 {
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1300000>;
+ };
+
+ pm8226_l27: l27 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l28: l28 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_lvs1: lvs1 {};
+ };
+};
+
+&sdhc_1 {
+ vmmc-supply = <&pm8226_l17>;
+ vqmmc-supply = <&pm8226_l6>;
+
+ bus-width = <8>;
+ non-removable;
+
+ status = "okay";
+};
+
+&sdhc_2 {
+ vmmc-supply = <&pm8226_l18>;
+ vqmmc-supply = <&pm8226_l21>;
+
+ bus-width = <4>;
+ cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+
+ status = "okay";
+};
+
+&tlmm {
+ accel_int_default_state: accel-int-default-state {
+ pins = "gpio54";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ backlight_i2c_default_state: backlight-i2c-default-state {
+ pins = "gpio20", "gpio21";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ backlight_pwm_default_state: backlight-pwm-default-state {
+ pins = "gpio33";
+ function = "gp0_clk";
+ };
+
+ muic_int_default_state: muic-int-default-state {
+ pins = "gpio67";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tsp_en_default_state: tsp-en-default-state {
+ pins = "gpio31";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tsp_en1_default_state: tsp-en1-default-state {
+ /* pins is board-specific */
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tsp_int_rst_default_state: tsp-int-rst-default-state {
+ pins = "gpio17";
+ function = "gpio";
+ drive-strength = <10>;
+ bias-pull-up;
+ };
+};
+
+&usb {
+ extcon = <&muic>, <&muic>;
+ status = "okay";
+};
+
+&usb_hs_phy {
+ extcon = <&muic>;
+ v1p8-supply = <&pm8226_l10>;
+ v3p3-supply = <&pm8226_l20>;
+};
--
2.39.0


2023-01-23 16:48:55

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: qcom: Add support for Samsung Galaxy Tab 4 10.1 LTE (SM-T535)



On 22.01.2023 15:47, Stefan Hansson wrote:
> Add a device tree for the Samsung Galaxy Tab 4 10.1 (SM-T535) LTE tablet
> based on the MSM8926 platform.
>
> Signed-off-by: Stefan Hansson <[email protected]>
> ---
> arch/arm/boot/dts/Makefile | 1 +
> .../dts/qcom-msm8926-samsung-matisselte.dts | 39 +++++++++++++++++++
> 2 files changed, 40 insertions(+)
> create mode 100644 arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index d0c07867aeab..e1fad9eb0d26 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1061,6 +1061,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
> qcom-msm8916-samsung-e7.dtb \
> qcom-msm8916-samsung-grandmax.dtb \
> qcom-msm8916-samsung-serranove.dtb \
> + qcom-msm8926-samsung-matisselte.dtb \
> qcom-msm8960-cdp.dtb \
> qcom-msm8974-lge-nexus5-hammerhead.dtb \
> qcom-msm8974-sony-xperia-rhine-amami.dtb \
> diff --git a/arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts b/arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts
> new file mode 100644
> index 000000000000..6df568f1f36d
> --- /dev/null
> +++ b/arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts
> @@ -0,0 +1,39 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2022, Matti Lehtimäki <[email protected]>
> + * Copyright (c) 2023, Stefan Hansson <[email protected]>
> + */
> +
> +/dts-v1/;
> +
> +#include "qcom-msm8226-samsung-matisse-common.dtsi"
> +
> +/ {
> + model = "Samsung Galaxy Tab 4 10.1 LTE";
> + compatible = "samsung,matisselte", "qcom,msm8926";
> + chassis-type = "tablet";
> +};
> +
> +&pm8226_l3 {
> + regulator-min-microvolt = <750000>;
This is identical as the common value.


> + regulator-max-microvolt = <1350000>;
> + regulator-always-on;
This value already exists in common.

> +};
> +
> +&pm8226_s4 {
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <2200000>;
> +};
> +
> +&reg_tsp_3p3v {
> + gpio = <&tlmm 32 GPIO_ACTIVE_HIGH>;
The indentation here seems off.

> +};
> +
> +&sdhc_2 {
> + /* SD card fails to probe with error -110 */
Maybe this SKU has some different pin properties or
needs some external GPIO/regulator?


Konrad
> + status = "disabled";
> +};
> +
> +&tsp_en1_default_state {
> + pins = "gpio32";
> +};

2023-01-23 16:50:18

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: qcom: Add support for Samsung Galaxy Tab 4 10.1 LTE (SM-T535)



On 23.01.2023 17:48, Konrad Dybcio wrote:
>
>
> On 22.01.2023 15:47, Stefan Hansson wrote:
>> Add a device tree for the Samsung Galaxy Tab 4 10.1 (SM-T535) LTE tablet
>> based on the MSM8926 platform.
>>
>> Signed-off-by: Stefan Hansson <[email protected]>
>> ---
>> arch/arm/boot/dts/Makefile | 1 +
>> .../dts/qcom-msm8926-samsung-matisselte.dts | 39 +++++++++++++++++++
>> 2 files changed, 40 insertions(+)
>> create mode 100644 arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index d0c07867aeab..e1fad9eb0d26 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -1061,6 +1061,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
>> qcom-msm8916-samsung-e7.dtb \
>> qcom-msm8916-samsung-grandmax.dtb \
>> qcom-msm8916-samsung-serranove.dtb \
>> + qcom-msm8926-samsung-matisselte.dtb \
>> qcom-msm8960-cdp.dtb \
>> qcom-msm8974-lge-nexus5-hammerhead.dtb \
>> qcom-msm8974-sony-xperia-rhine-amami.dtb \
>> diff --git a/arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts b/arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts
>> new file mode 100644
>> index 000000000000..6df568f1f36d
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/qcom-msm8926-samsung-matisselte.dts
>> @@ -0,0 +1,39 @@
>> +// SPDX-License-Identifier: BSD-3-Clause
>> +/*
>> + * Copyright (c) 2022, Matti Lehtimäki <[email protected]>
>> + * Copyright (c) 2023, Stefan Hansson <[email protected]>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "qcom-msm8226-samsung-matisse-common.dtsi"
>> +
>> +/ {
>> + model = "Samsung Galaxy Tab 4 10.1 LTE";
>> + compatible = "samsung,matisselte", "qcom,msm8926";
>> + chassis-type = "tablet";
>> +};
>> +
>> +&pm8226_l3 {
>> + regulator-min-microvolt = <750000>;
> This is identical as the common value.
>
>
>> + regulator-max-microvolt = <1350000>;
>> + regulator-always-on;
> This value already exists in common.
Nevermind, I misread the diff. That said, you can
commonize them.

Konrad
>
>> +};
>> +
>> +&pm8226_s4 {
>> + regulator-min-microvolt = <1800000>;
>> + regulator-max-microvolt = <2200000>;
>> +};
>> +
>> +&reg_tsp_3p3v {
>> + gpio = <&tlmm 32 GPIO_ACTIVE_HIGH>;
> The indentation here seems off.
>
>> +};
>> +
>> +&sdhc_2 {
>> + /* SD card fails to probe with error -110 */
> Maybe this SKU has some different pin properties or
> needs some external GPIO/regulator?
>
>
> Konrad
>> + status = "disabled";
>> +};
>> +
>> +&tsp_en1_default_state {
>> + pins = "gpio32";
>> +};

2023-01-23 17:11:01

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: arm: qcom: Add MSM8926 and Samsung Galaxy Tab 4 10.1 LTE

On 22/01/2023 15:47, Stefan Hansson wrote:
> MSM8926 (also known as Snapdragon 400) is very similar to MSM8226 and
> APQ8026 with the primary difference being that it features an LTE modem
> unlike the former two which feature a 3G modem and a GPS-only modem,
> respectively.
>
> This also documents Samsung Galaxy Tab 4 10.1 LTE (samsung,matisselte)
> which is a tablet by Samsung based on the MSM8926 SoC.
>
> Signed-off-by: Stefan Hansson <[email protected]>
> ---
> Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
> index 47913a8e3eea..7a0b2088ead9 100644
> --- a/Documentation/devicetree/bindings/arm/qcom.yaml
> +++ b/Documentation/devicetree/bindings/arm/qcom.yaml
> @@ -35,6 +35,7 @@ description: |
> mdm9615
> msm8226
> msm8916
> + msm8926
> msm8953
> msm8956
> msm8974
> @@ -219,6 +220,11 @@ properties:
> - const: qcom,msm8916-v1-qrd/9-v1
> - const: qcom,msm8916
>
> + - items:
> + - enum:
> + - samsung,matisselte

1. matisse is the code name, lte is version/suffix. I don't think they
should be together, because then it looks like "matisselte" is a name.
It actually sounds like one word.

2. You base on other SoC but you do not include its compatibles. Why? Is
it intended? None of the properties applicable to other SoC will match
here, thus I actually wonder if you run dtbs_check...

Best regards,
Krzysztof


2023-01-23 17:11:52

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: arm: qcom: Add MSM8926 and Samsung Galaxy Tab 4 10.1 LTE

On 23/01/2023 18:10, Krzysztof Kozlowski wrote:
> On 22/01/2023 15:47, Stefan Hansson wrote:
>> MSM8926 (also known as Snapdragon 400) is very similar to MSM8226 and
>> APQ8026 with the primary difference being that it features an LTE modem
>> unlike the former two which feature a 3G modem and a GPS-only modem,
>> respectively.
>>
>> This also documents Samsung Galaxy Tab 4 10.1 LTE (samsung,matisselte)
>> which is a tablet by Samsung based on the MSM8926 SoC.
>>
>> Signed-off-by: Stefan Hansson <[email protected]>
>> ---
>> Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
>> index 47913a8e3eea..7a0b2088ead9 100644
>> --- a/Documentation/devicetree/bindings/arm/qcom.yaml
>> +++ b/Documentation/devicetree/bindings/arm/qcom.yaml
>> @@ -35,6 +35,7 @@ description: |
>> mdm9615
>> msm8226
>> msm8916
>> + msm8926
>> msm8953
>> msm8956
>> msm8974
>> @@ -219,6 +220,11 @@ properties:
>> - const: qcom,msm8916-v1-qrd/9-v1
>> - const: qcom,msm8916
>>
>> + - items:
>> + - enum:
>> + - samsung,matisselte
>
> 1. matisse is the code name, lte is version/suffix. I don't think they
> should be together, because then it looks like "matisselte" is a name.
> It actually sounds like one word.

Update: there is already matisse-wifi, so please follow the same naming
convention. Version suffix should be separated with hyphen.

>
> 2. You base on other SoC but you do not include its compatibles. Why? Is
> it intended? None of the properties applicable to other SoC will match
> here, thus I actually wonder if you run dtbs_check...

Best regards,
Krzysztof


2023-01-23 17:16:24

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] ARM: dts: qcom: samsung-matisse-common: Add initial common device tree

On 22/01/2023 15:47, Stefan Hansson wrote:
> According to the dts from the kernel source code released by Samsung,
> matissewifi and matisselte only have minor differences in hardware, so
> use a shared dtsi to reduce duplicated code. Additionally, this should
> make adding support for matisse3g easier should someone want to do that
> at a later point.
>
> As such, add a common device tree for all matisse devices by Samsung
> based on the matissewifi dts. Support for matisselte will be introduced
> in a later patch in this series and will use the common dtsi as well.
>
> Signed-off-by: Stefan Hansson <[email protected]>
> ---

Decompiled DTB is the same, so:

Tested-by: Krzysztof Kozlowski <[email protected]>

(although not on a device...)

Best regards,
Krzysztof


2023-01-23 17:41:33

by Stefan Hansson

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: arm: qcom: Add MSM8926 and Samsung Galaxy Tab 4 10.1 LTE



On 2023-01-23 18:11, Krzysztof Kozlowski wrote:
> On 23/01/2023 18:10, Krzysztof Kozlowski wrote:
>> On 22/01/2023 15:47, Stefan Hansson wrote:
>>> MSM8926 (also known as Snapdragon 400) is very similar to MSM8226 and
>>> APQ8026 with the primary difference being that it features an LTE modem
>>> unlike the former two which feature a 3G modem and a GPS-only modem,
>>> respectively.
>>>
>>> This also documents Samsung Galaxy Tab 4 10.1 LTE (samsung,matisselte)
>>> which is a tablet by Samsung based on the MSM8926 SoC.
>>>
>>> Signed-off-by: Stefan Hansson <[email protected]>
>>> ---
>>> Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
>>> index 47913a8e3eea..7a0b2088ead9 100644
>>> --- a/Documentation/devicetree/bindings/arm/qcom.yaml
>>> +++ b/Documentation/devicetree/bindings/arm/qcom.yaml
>>> @@ -35,6 +35,7 @@ description: |
>>> mdm9615
>>> msm8226
>>> msm8916
>>> + msm8926
>>> msm8953
>>> msm8956
>>> msm8974
>>> @@ -219,6 +220,11 @@ properties:
>>> - const: qcom,msm8916-v1-qrd/9-v1
>>> - const: qcom,msm8916
>>>
>>> + - items:
>>> + - enum:
>>> + - samsung,matisselte
>>
>> 1. matisse is the code name, lte is version/suffix. I don't think they
>> should be together, because then it looks like "matisselte" is a name.
>> It actually sounds like one word.
>
> Update: there is already matisse-wifi, so please follow the same naming
> convention. Version suffix should be separated with hyphen.
>

I'm aware, and I've been in contact with the matisse-wifi dts author who
told me that he went with this name because you suggested it (he had
originally sent it in as matissewifi). However I don't think diverging
from how the rest of the community refers to it is a good idea.
Codenames often sound nonsensical, but they have effectively become the
de-facto universal identifier for devices in the community and so I
think retaining that consistency is more beneficial than making it sound
nice.

Additionally, while matisse-wifi has the hyphen added before the suffix,
many other Samsung devices do not (klte, jackpotlte, s3ve3g). As such, I
think the name matisse-wifi is the outlier here rather than matisselte
(but yes, I do understand that they are more related to each other than
the other devices mentioned).

Does that sound sensible?

>>
>> 2. You base on other SoC but you do not include its compatibles. Why? Is
>> it intended? None of the properties applicable to other SoC will match
>> here, thus I actually wonder if you run dtbs_check...

Sorry, I forgot about running dtbs_check. However, I'm not sure I
understand the question. What do you mean by that I don't include its
compatibles?

I ran `$ make dtbs_check DT_SCHEMA_FILES=qcom.yaml` locally just now,
and it only gave me errors from the qcom-msm8974pro-oneplus-bacon dtb.
Maybe I'm running it wrong?

>
> Best regards,
> Krzysztof
>

Thanks for the review,
Stefan Hansson

2023-01-23 18:08:24

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: arm: qcom: Add MSM8926 and Samsung Galaxy Tab 4 10.1 LTE

On 23/01/2023 18:41, Stefan Hansson wrote:
>>>
>>> 2. You base on other SoC but you do not include its compatibles. Why? Is
>>> it intended? None of the properties applicable to other SoC will match
>>> here, thus I actually wonder if you run dtbs_check...
>
> Sorry, I forgot about running dtbs_check. However, I'm not sure I
> understand the question. What do you mean by that I don't include its
> compatibles?

I understood you include the msm8226.dtsi which is a different SoC. If
you include it, you get all of its content. We do it only for compatible
devices, but your device does not indicate compatibility with msm8226.

>
> I ran `$ make dtbs_check DT_SCHEMA_FILES=qcom.yaml` locally just now,
> and it only gave me errors from the qcom-msm8974pro-oneplus-bacon dtb.
> Maybe I'm running it wrong?

No clue, I cannot test because your patches do not apply cleanly.

Best regards,
Krzysztof


2023-01-28 21:43:53

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: arm: qcom: Add MSM8926 and Samsung Galaxy Tab 4 10.1 LTE

On Montag, 23. J?nner 2023 19:08:03 CET Krzysztof Kozlowski wrote:
> On 23/01/2023 18:41, Stefan Hansson wrote:
> >>> 2. You base on other SoC but you do not include its compatibles. Why? Is
> >>> it intended? None of the properties applicable to other SoC will match
> >>> here, thus I actually wonder if you run dtbs_check...
> >
> > Sorry, I forgot about running dtbs_check. However, I'm not sure I
> > understand the question. What do you mean by that I don't include its
> > compatibles?
>
> I understood you include the msm8226.dtsi which is a different SoC. If
> you include it, you get all of its content. We do it only for compatible
> devices, but your device does not indicate compatibility with msm8226.

Hi Krzysztof,

the way the earlier Qualcomm SoCs work, especially regarding naming scheme is
the following.

There's for example the msm8x74 family which includes msm8974, msm8674,
msm8274, and the a bit differently named apq8074 where the significant
different are the RF capabilities, I think with those only 8974 had LTE, 8674
and 8274 only 3G but different band support, and the apq8074 has no mobile
radio.

The same exists for sure also for 8x16 and 8x26, probably a bunch of other
SoCs as well.

So from software side (apart from modem firmware of course) it can be treated
in practise as the same SoC so that's why we included the dtsi in this case in
msm8226 but also msm8926 and apq8026.

But the compatible on board-level is in practise (to my knowledge) not really
used for anything important other than having a nice string in the dts file. I
know some software uses compatible from user space but there for
differentiating between different devices and ignoring the SoC compatibles.

But while they are software-compatible for the most part, they *are* distinct
SoCs with different capabilities and I just don't see the point in trying to
establish some kinds of relationships between different SoCs that are somewhat
or very similar (msm8226 and msm8974 also share many components but are
obviously different SoCs).

And also e.g. (nearly) all apq* dts files we already have in mainline only
have apq compatible and not the corresponding msm* compatible. And I think
that's totally legitimate.

Regards
Luca

>
> > I ran `$ make dtbs_check DT_SCHEMA_FILES=qcom.yaml` locally just now,
> > and it only gave me errors from the qcom-msm8974pro-oneplus-bacon dtb.
> > Maybe I'm running it wrong?
>
> No clue, I cannot test because your patches do not apply cleanly.
>
> Best regards,
> Krzysztof





2023-01-29 10:55:21

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: arm: qcom: Add MSM8926 and Samsung Galaxy Tab 4 10.1 LTE

On 28/01/2023 22:43, Luca Weiss wrote:
> On Montag, 23. Jänner 2023 19:08:03 CET Krzysztof Kozlowski wrote:
>> On 23/01/2023 18:41, Stefan Hansson wrote:
>>>>> 2. You base on other SoC but you do not include its compatibles. Why? Is
>>>>> it intended? None of the properties applicable to other SoC will match
>>>>> here, thus I actually wonder if you run dtbs_check...
>>>
>>> Sorry, I forgot about running dtbs_check. However, I'm not sure I
>>> understand the question. What do you mean by that I don't include its
>>> compatibles?
>>
>> I understood you include the msm8226.dtsi which is a different SoC. If
>> you include it, you get all of its content. We do it only for compatible
>> devices, but your device does not indicate compatibility with msm8226.
>
> Hi Krzysztof,
>
> the way the earlier Qualcomm SoCs work, especially regarding naming scheme is
> the following.
>
> There's for example the msm8x74 family which includes msm8974, msm8674,
> msm8274, and the a bit differently named apq8074 where the significant
> different are the RF capabilities, I think with those only 8974 had LTE, 8674
> and 8274 only 3G but different band support, and the apq8074 has no mobile
> radio.
>
> The same exists for sure also for 8x16 and 8x26, probably a bunch of other
> SoCs as well.
>
> So from software side (apart from modem firmware of course) it can be treated
> in practise as the same SoC so that's why we included the dtsi in this case in
> msm8226 but also msm8926 and apq8026.

First, there is distinction between SoC having and not having modem. I
guess small enough that we just include the DTSI.

Second, there is distinction between different families, even if they
share a lot. All of the SoCs here share something, because Qualcomm has
versionable IP blocks which they re-use.

>
> But the compatible on board-level is in practise (to my knowledge) not really
> used for anything important other than having a nice string in the dts file. I
> know some software uses compatible from user space but there for
> differentiating between different devices and ignoring the SoC compatibles.

It's not only about board, but about all devices in the SoC.

>
> But while they are software-compatible for the most part, they *are* distinct
> SoCs with different capabilities and I just don't see the point in trying to
> establish some kinds of relationships between different SoCs that are somewhat
> or very similar (msm8226 and msm8974 also share many components but are
> obviously different SoCs).

You don't have to create such relationships. You don't have to include
other DTSI, either. What yo have to is - quoting Linux docs:
"DO make 'compatible' properties specific. DON'T use wildcards in
compatible strings. DO use fallback compatibles when devices are the
same as or a subset of prior implementations. DO add new compatibles in
case there are new features or bugs."

>
> And also e.g. (nearly) all apq* dts files we already have in mainline only
> have apq compatible and not the corresponding msm* compatible. And I think
> that's totally legitimate.

We do not talk here about apq, actually, at all. We talk about one
msm8xxx including other msm8xxx...


Best regards,
Krzysztof