Commit e1839f78 authored by Walter Broemeling's avatar Walter Broemeling Committed by Bjorn Andersson
Browse files

arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add initial device trees



Samsung Galaxy Core Prime and Grand Prime are phones based on MSM8916.
They are similar to the other Samsung devices based on MSM8916 with only a
few minor differences.

This initial commit adds support for:
 - fortuna3g (SM-G530H)
 - gprimeltecan (SM-G530W)
 - grandprimelte (SM-G530FZ)
 - rossa (SM-G360G)

The device trees contain initial support with:
 - GPIO keys
 - Regulator haptic
 - SDHCI (internal and external storage)
 - USB Device Mode
 - UART (on USB connector via the SM5502/SM5504 MUIC)
 - WCNSS (WiFi/BT)
 - Regulators
 - QDSP6 audio
 - Speaker/earpiece/headphones/microphones via digital/analog codec in
   MSM8916/PM8916
 - WWAN Internet via BAM-DMUX

There are different variants of Core Prime and Grand Prime, with some
differences in accelerometer, NFC and panel.
Core Prime and Grand Prime are similar, with some differences in MUIC,
panel and touchscreen.

The common parts are shared in
msm8916-samsung-fortuna-common.dtsi and msm8916-samsung-rossa-common.dtsi
to reduce duplication.

Signed-off-by: default avatarWalter Broemeling <wallebroem@gmail.com>
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
[Joe: Add audio, buttons and WiFi]
Signed-off-by: default avatarJoe Mason <buddyjojo06@outlook.com>
[Siddharth: Add fortuna3g]
Signed-off-by: default avatarSiddharth Manthan <siddharth.manthan@gmail.com>
[Raymond: Add modem, fortuna-common.dtsi, grandprimelte and rossa]
Signed-off-by: default avatarRaymond Hackley <raymondhackley@protonmail.com>
Link: https://lore.kernel.org/r/20240129143147.5058-1-raymondhackley@protonmail.com


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 2f7be4ca
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ dtb-$(CONFIG_ARCH_QCOM) += ipq9574-rdp433.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= ipq9574-rdp449.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= ipq9574-rdp453.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= ipq9574-rdp454.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8216-samsung-fortuna3g.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-acer-a1-724.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-alcatel-idol347.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-asus-z00l.dtb
@@ -35,11 +36,14 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a3u-eur.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-a5u-eur.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-e5.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-e7.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-gprimeltecan.dtb
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-j5.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5x.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-rossa.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-serranove.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-uf896.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-ufi001c.dtb
+11 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include "msm8916-samsung-fortuna-common.dtsi"

/ {
	model = "Samsung Galaxy Grand Prime (SM-G530H)";
	compatible = "samsung,fortuna3g", "qcom,msm8916";
	chassis-type = "handset";
};
+182 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only

#include "msm8916-pm8916.dtsi"
#include "msm8916-modem-qdsp6.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
	aliases {
		mmc0 = &sdhc_1; /* eMMC */
		mmc1 = &sdhc_2; /* SD card */
		serial0 = &blsp_uart2;
	};

	chosen {
		stdout-path = "serial0";
	};

	reserved-memory {
		/* Additional memory used by Samsung firmware modifications */
		tz-apps@85a00000 {
			reg = <0x0 0x85a00000 0x0 0x600000>;
			no-map;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		pinctrl-0 = <&gpio_keys_default>;
		pinctrl-names = "default";

		label = "GPIO Buttons";

		button-volume-up {
			label = "Volume Up";
			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_VOLUMEUP>;
		};

		button-home {
			label = "Home";
			gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_HOMEPAGE>;
		};
	};

	haptic {
		compatible = "regulator-haptic";
		haptic-supply = <&reg_motor_vdd>;
		min-microvolt = <3300000>;
		max-microvolt = <3300000>;
	};

	reg_motor_vdd: regulator-motor-vdd {
		compatible = "regulator-fixed";
		regulator-name = "motor_vdd";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;

		gpio = <&tlmm 72 GPIO_ACTIVE_HIGH>;
		enable-active-high;

		pinctrl-0 = <&motor_en_default>;
		pinctrl-names = "default";
	};
};

&blsp_i2c1 {
	status = "okay";

	muic: extcon@25 {
		compatible = "siliconmitus,sm5502-muic";
		reg = <0x25>;
		interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>;
		pinctrl-0 = <&muic_int_default>;
		pinctrl-names = "default";
	};
};

&blsp_uart2 {
	status = "okay";
};

&mpss_mem {
	reg = <0x0 0x86800000 0x0 0x5000000>;
};

&pm8916_resin {
	linux,code = <KEY_VOLUMEDOWN>;
	status = "okay";
};

&pm8916_rpm_regulators {
	pm8916_l17: l17 {
		regulator-min-microvolt = <2850000>;
		regulator-max-microvolt = <2850000>;
	};
};

&sdhc_1 {
	status = "okay";
};

&sdhc_2 {
	pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
	pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
	pinctrl-names = "default", "sleep";

	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;

	status = "okay";
};

&sound {
	model = "msm8916-1mic";
	audio-routing =
		"AMIC1", "MIC BIAS External1",
		"AMIC2", "MIC BIAS Internal2",
		"AMIC3", "MIC BIAS External1";
};

&usb {
	extcon = <&muic>, <&muic>;
	status = "okay";
};

&usb_hs_phy {
	extcon = <&muic>;
};

&venus {
	status = "okay";
};

&venus_mem {
	status = "okay";
};

&wcnss {
	status = "okay";
};

&wcnss_iris {
	compatible = "qcom,wcn3620";
};

&wcnss_mem {
	status = "okay";
};

&tlmm {
	gpio_keys_default: gpio-keys-default-state {
		pins = "gpio107", "gpio109";
		function = "gpio";
		drive-strength = <2>;
		bias-pull-up;
	};

	motor_en_default: motor-en-default-state {
		pins = "gpio72";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};

	muic_int_default: muic-int-default-state {
		pins = "gpio12";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};

	sdc2_cd_default: sdc2-cd-default-state {
		pins = "gpio38";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};
};
+27 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include "msm8916-samsung-fortuna-common.dtsi"

/ {
	model = "Samsung Galaxy Grand Prime (SM-G530W)";
	compatible = "samsung,gprimeltecan", "qcom,msm8916";
	chassis-type = "handset";

	reserved-memory {
		/* Firmware for gprimeltecan needs more space */
		/delete-node/ tz-apps@85a00000;

		/* Additional memory used by Samsung firmware modifications */
		tz-apps@85500000 {
			reg = <0x0 0x85500000 0x0 0xb00000>;
			no-map;
		};
	};
};

&mpss_mem {
	/* Firmware for gprimeltecan needs more space */
	reg = <0x0 0x86800000 0x0 0x5400000>;
};
+16 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include "msm8916-samsung-fortuna-common.dtsi"

/ {
	model = "Samsung Galaxy Grand Prime (SM-G530FZ)";
	compatible = "samsung,grandprimelte", "qcom,msm8916";
	chassis-type = "handset";
};

&mpss_mem {
	/* Firmware for grandprimelte needs more space */
	reg = <0x0 0x86800000 0x0 0x5400000>;
};
Loading