The dts and dtsi add support for msm8916 variant of Samsung Galaxy J3
SM-J320YZ smartphone released in 2016.

Add a device tree for SM-J320YZ with initial support for:

- GPIO keys
- SDHCI (internal and external storage)
- USB Device Mode
- UART (on USB connector via the SM5703 MUIC)
- WCNSS (WiFi/BT)
- Regulators
- QDSP6 audio
- Speaker/earpiece/headphones/microphones via digital/analog codec in
  MSM8916/PM8916
- WWAN Internet via BAM-DMUX
- Touchscreen

There are different variants of J3, with some differences in MUIC, sensor,
NFC and touch key I2C buses.

The common parts are shared in msm8916-samsung-j3-common.dtsi to reduce
duplication.

Signed-off-by: "Lin, Meng-Bo" <linmengbo06...@proton.me>
---
 arch/arm64/boot/dts/qcom/Makefile             |  1 +
 .../dts/qcom/msm8916-samsung-j3-common.dtsi   | 53 +++++++++++++++++++
 .../boot/dts/qcom/msm8916-samsung-j3ltetw.dts | 20 +++++++
 3 files changed, 74 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-j3-common.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-j3ltetw.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile 
b/arch/arm64/boot/dts/qcom/Makefile
index e534442620a1..197ab325c0b9 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -48,6 +48,7 @@ dtb-$(CONFIG_ARCH_QCOM)       += msm8916-samsung-grandmax.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += msm8916-samsung-grandprimelte.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += msm8916-samsung-gt510.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += msm8916-samsung-gt58.dtb
+dtb-$(CONFIG_ARCH_QCOM)        += msm8916-samsung-j3ltetw.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += msm8916-samsung-j5.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += msm8916-samsung-j5x.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += msm8916-samsung-rossa.dtb
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j3-common.dtsi 
b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3-common.dtsi
new file mode 100644
index 000000000000..ce5c1ee450f1
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3-common.dtsi
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "msm8916-samsung-j5-common.dtsi"
+
+/ {
+       reserved-memory {
+               /delete-node/ tz-apps@85500000;
+
+               /* Additional memory used by Samsung firmware modifications */
+               tz-apps@85800000 {
+                       reg = <0x0 0x85800000 0x0 0x800000>;
+                       no-map;
+               };
+       };
+
+       reg_vdd_tsp_a: regulator-vdd-tsp-a {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd_tsp_a";
+               regulator-min-microvolt = <3000000>;
+               regulator-max-microvolt = <3000000>;
+
+               gpio = <&tlmm 16 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-0 = <&tsp_ldo_en_default>;
+               pinctrl-names = "default";
+       };
+};
+
+&gpio_hall_sensor {
+       status = "disabled";
+};
+
+&i2c_muic {
+       /* GPIO pins vary depending on model variant */
+};
+
+&i2c_sensors {
+       /* GPIO pins vary depending on model variant */
+};
+
+&touchscreen {
+       vdd-supply = <&reg_vdd_tsp_a>;
+};
+
+&tlmm {
+       tsp_ldo_en_default: tsp-ldo-en-default-state {
+               pins = "gpio16";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-disable;
+       };
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j3ltetw.dts 
b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3ltetw.dts
new file mode 100644
index 000000000000..344e63588531
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3ltetw.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-j3-common.dtsi"
+
+/ {
+       model = "Samsung Galaxy J3 (2016) (SM-J320YZ)";
+       compatible = "samsung,j3ltetw", "qcom,msm8916";
+       chassis-type = "handset";
+};
+
+&i2c_muic {
+       sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+       scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+};
+
+&muic_i2c_default {
+       pins = "gpio0", "gpio1";
+};
-- 
2.39.2



Reply via email to