diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile index e8e92e5ad4a00b..9a25b24ea119de 100644 --- a/arch/arm/boot/dts/qcom/Makefile +++ b/arch/arm/boot/dts/qcom/Makefile @@ -34,7 +34,9 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-msm8909-nokia-sparkler.dtb \ qcom-msm8916-samsung-e5.dtb \ qcom-msm8916-samsung-e7.dtb \ + qcom-msm8916-samsung-fortunaltezt.dtb \ qcom-msm8916-samsung-grandmax.dtb \ + qcom-msm8916-samsung-heatqlte.dtb \ qcom-msm8916-samsung-serranove.dtb \ qcom-msm8926-htc-memul.dtb \ qcom-msm8926-microsoft-superman-lte.dtb \ diff --git a/arch/arm/boot/dts/qcom/qcom-msm8916-samsung-fortunaltezt.dts b/arch/arm/boot/dts/qcom/qcom-msm8916-samsung-fortunaltezt.dts new file mode 100644 index 00000000000000..a1fd9588d476cb --- /dev/null +++ b/arch/arm/boot/dts/qcom/qcom-msm8916-samsung-fortunaltezt.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "arm64/qcom/msm8916-samsung-fortunaltezt.dts" +#include "qcom-msm8916-smp.dtsi" + +&tsens { + /* FIXME: The device crashes when accessing the SROT region for some reason */ + qcom,srot-locked; +}; diff --git a/arch/arm/boot/dts/qcom/qcom-msm8916-samsung-heatqlte.dts b/arch/arm/boot/dts/qcom/qcom-msm8916-samsung-heatqlte.dts new file mode 100644 index 00000000000000..c900d0af919e96 --- /dev/null +++ b/arch/arm/boot/dts/qcom/qcom-msm8916-samsung-heatqlte.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "arm64/qcom/msm8916-samsung-heatqlte.dts" +#include "qcom-msm8916-smp.dtsi" + +&tsens { + /* FIXME: The device crashes when accessing the SROT region for some reason */ + qcom,srot-locked; +}; diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 56a6cc83a8c37d..abdd57e6fc7ef5 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -48,11 +48,13 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a5-zt.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-fortunaltezt.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-heatqlte.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 diff --git a/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts b/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts index fba68bf8bf79c9..50e2aa4c64db18 100644 --- a/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts +++ b/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts @@ -6,7 +6,7 @@ / { model = "Samsung Galaxy Grand Prime (SM-G530H)"; - compatible = "samsung,fortuna3g", "qcom,msm8916"; + compatible = "samsung,fortuna3g", "samsung,fortuna", "qcom,msm8916"; chassis-type = "handset"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi index 81b3e0760154f7..2dcb429dd853f7 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi @@ -112,6 +112,21 @@ status = "disabled"; }; + + pn547_nfc: nfc@2b { + compatible = "nxp,pn547", "nxp,nxp-nci-i2c"; + reg = <0x2b>; + + interrupts-extended = <&tlmm 21 IRQ_TYPE_EDGE_RISING>; + + enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>; + firmware-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&nfc_default>; + pinctrl-names = "default"; + + status = "disabled"; + }; }; reg_motor_vdd: regulator-motor-vdd { @@ -127,6 +142,19 @@ pinctrl-names = "default"; }; + reg_vdd_lcd: regulator-vdd-lcd { + compatible = "regulator-fixed"; + regulator-name = "vdd_lcd"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&tlmm 102 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&lcd_on_default>; + pinctrl-names = "default"; + }; + reg_vdd_tsp_a: regulator-vdd-tsp-a { compatible = "regulator-fixed"; regulator-name = "vdd_tsp_a"; @@ -262,6 +290,8 @@ pinctrl-0 = <&tsp_int_default>; pinctrl-names = "default"; + + linux,keycodes = ; }; }; @@ -305,10 +335,56 @@ status = "okay"; }; +&gpu { + status = "okay"; +}; + +&mdss { + status = "okay"; +}; + +&mdss_dsi0 { + pinctrl-0 = <&mdss_default>; + pinctrl-1 = <&mdss_sleep>; + pinctrl-names = "default", "sleep"; + + panel: panel@0 { + compatible = "samsung,gprime-panel"; + reg = <0>; + + vddio-supply = <&pm8916_l6>; + vdd-supply = <®_vdd_lcd>; + + reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>; + backlight = <&clk_pwm_backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; +}; + +&mdss_dsi0_out { + data-lanes = <0 1>; + remote-endpoint = <&panel_in>; +}; + &mpss_mem { reg = <0x0 0x86800000 0x0 0x5000000>; }; +&pm8916_codec { + jack-gpios = <&tlmm 110 GPIO_ACTIVE_LOW>; + qcom,micbias-lvl = <2800>; + qcom,mbhc-vthreshold-low = <75 150 237 450 500>; + qcom,mbhc-vthreshold-high = <75 150 237 450 500>; + + pinctrl-0 = <&jack_default>; + pinctrl-names = "default"; +}; + &pm8916_resin { linux,code = ; status = "okay"; @@ -406,6 +482,34 @@ bias-pull-up; }; + jack_default: jack-default-state { + pins = "gpio110"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + lcd_on_default: lcd-on-default-state { + pins = "gpio102"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + mdss_default: mdss-default-state { + pins = "gpio25"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + + mdss_sleep: mdss-sleep-state { + pins = "gpio25"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + motor_en_default: motor-en-default-state { pins = "gpio72"; function = "gpio"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts new file mode 100644 index 00000000000000..b78019665e9e43 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-fortuna-common.dtsi" + +/* + * NOTE: The original firmware from Samsung can only boot ARM32 kernels. + * Unfortunately, the firmware is signed and cannot be replaced easily. + * There seems to be no way to boot ARM64 kernels on this device at the moment, + * even though the hardware would support it. + * + * However, it is possible to use this device tree by compiling an ARM32 kernel + * instead. For clarity and build testing this device tree is maintained next + * to the other MSM8916 device trees. However, it is actually used through + * arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts + */ + +/ { + model = "Samsung Galaxy Grand Prime (SM-G530Y)"; + compatible = "samsung,fortunaltezt", "samsung,fortuna", "qcom,msm8916"; + chassis-type = "handset"; +}; + +&battery { + charge-term-current-microamp = <200000>; + constant-charge-current-max-microamp = <1000000>; + constant-charge-voltage-max-microvolt = <4350000>; +}; + +/* On fortunaltezt backlight is controlled with MIPI DCS commands */ +&clk_pwm { + status = "disabled"; +}; + +&clk_pwm_backlight { + status = "disabled"; +}; + +&panel { + /* Actually hx8389c without PWM. There is no other variant */ + compatible = "samsung,hx8389c-gh9607501a"; + + /delete-property/ backlight; +}; + +&pn547_nfc { + status = "okay"; +}; + +&st_accel { + compatible = "st,lis2hh12"; + mount-matrix = "1", "0", "0", + "0", "-1", "0", + "0", "0", "1"; + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts index 677e4e286ac022..0e6afa6dffa99d 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts @@ -6,7 +6,7 @@ / { model = "Samsung Galaxy Grand Prime (SM-G530W)"; - compatible = "samsung,gprimeltecan", "qcom,msm8916"; + compatible = "samsung,gprimeltecan", "samsung,fortuna", "qcom,msm8916"; chassis-type = "handset"; reserved-memory { diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts index 582bfcb0968470..96ae1c3a657d8f 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts @@ -6,7 +6,7 @@ / { model = "Samsung Galaxy Grand Prime (SM-G530FZ)"; - compatible = "samsung,grandprimelte", "qcom,msm8916"; + compatible = "samsung,grandprimelte", "samsung,fortuna", "qcom,msm8916"; chassis-type = "handset"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts new file mode 100644 index 00000000000000..11cb12f48e6ff1 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-rossa-common.dtsi" + +/* + * NOTE: The original firmware from Samsung can only boot ARM32 kernels. + * Unfortunately, the firmware is signed and cannot be replaced easily. + * There seems to be no way to boot ARM64 kernels on this device at the moment, + * even though the hardware would support it. + * + * However, it is possible to use this device tree by compiling an ARM32 kernel + * instead. For clarity and build testing this device tree is maintained next + * to the other MSM8916 device trees. However, it is actually used through + * arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts + */ + +/ { + model = "Samsung Galaxy Ace 4 (SM-G357FZ)"; + compatible = "samsung,heatqlte", "qcom,msm8916"; + chassis-type = "handset"; +}; + +&battery { + charge-term-current-microamp = <150000>; + constant-charge-current-max-microamp = <700000>; + constant-charge-voltage-max-microvolt = <4350000>; +}; + +&panel { + compatible = "samsung,s6288a0"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi index e7f265e3c2ab87..42afa68ef1b1de 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi @@ -33,6 +33,10 @@ status = "disabled"; }; +&panel { + /delete-property/ backlight; +}; + &s3fwrn5_nfc { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts index 1981bb71f6a928..6dae901368dc4e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts @@ -16,7 +16,31 @@ constant-charge-voltage-max-microvolt = <4400000>; }; +&blsp_i2c5 { + touchscreen@50 { + compatible = "imagis,ist3038"; + reg = <0x50>; + + interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + + vdd-supply = <®_vdd_tsp_a>; + vddio-supply = <&pm8916_l6>; + + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + + linux,keycodes = ; + }; +}; + &mpss_mem { /* Firmware for rossa needs more space */ reg = <0x0 0x86800000 0x0 0x5800000>; }; + +&panel { + compatible = "samsung,cprime-panel"; +};