From: Alexandre MINETTE <[email protected]>

Add a device tree for the Samsung Galaxy S4, codenamed jflte.

This has been tested on a Samsung Galaxy S4 GT-I9505. The initial support
covers UART, USB peripheral mode with USB networking, the front LED and
the physical buttons.

Signed-off-by: Alexandre MINETTE <[email protected]>
---
 arch/arm/boot/dts/qcom/Makefile                    |   1 +
 .../boot/dts/qcom/qcom-apq8064-samsung-jflte.dts   | 485 +++++++++++++++++++++
 2 files changed, 486 insertions(+)

diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
index 32a44b02d2fa..c23c961f79e3 100644
--- a/arch/arm/boot/dts/qcom/Makefile
+++ b/arch/arm/boot/dts/qcom/Makefile
@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
        qcom-apq8064-ifc6410.dtb \
        qcom-apq8064-sony-xperia-lagan-yuga.dtb \
        qcom-apq8064-asus-nexus7-flo.dtb \
+       qcom-apq8064-samsung-jflte.dtb \
        qcom-apq8064-lg-nexus4-mako.dtb \
        qcom-apq8074-dragonboard.dtb \
        qcom-ipq4018-ap120c-ac.dtb \
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064-samsung-jflte.dts 
b/arch/arm/boot/dts/qcom/qcom-apq8064-samsung-jflte.dts
new file mode 100644
index 000000000000..2f10466077c7
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064-samsung-jflte.dts
@@ -0,0 +1,485 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mfd/qcom-rpm.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
+/ {
+       model = "Samsung Galaxy S4 (jflte)";
+       compatible = "samsung,jflte", "qcom,apq8064";
+       chassis-type = "handset";
+
+       aliases {
+               serial0 = &gsbi7_serial;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               ramoops@88d00000 {
+                       compatible = "ramoops";
+                       reg = <0x88d00000 0x100000>;
+                       record-size = <0x20000>;
+                       console-size = <0x20000>;
+                       ftrace-size = <0x20000>;
+               };
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-0 = <&gpio_keys_default>;
+               pinctrl-names = "default";
+
+               key-home {
+                       label = "Home";
+                       gpios = <&pm8921_gpio 30 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <5>;
+                       linux,code = <KEY_HOME>;
+                       wakeup-source;
+               };
+
+               key-volume-up {
+                       label = "Volume Up";
+                       gpios = <&pm8921_gpio 35 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <5>;
+                       linux,code = <KEY_VOLUMEUP>;
+                       wakeup-source;
+               };
+
+               key-volume-down {
+                       label = "Volume Down";
+                       gpios = <&pm8921_gpio 37 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <5>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+                       wakeup-source;
+               };
+       };
+
+       i2c-led {
+               compatible = "i2c-gpio";
+               sda-gpios = <&tlmm_pinmux 6 (GPIO_ACTIVE_HIGH | 
GPIO_OPEN_DRAIN)>;
+               scl-gpios = <&tlmm_pinmux 7 (GPIO_ACTIVE_HIGH | 
GPIO_OPEN_DRAIN)>;
+               i2c-gpio,delay-us = <2>;
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               led-controller@30 {
+                       compatible = "panasonic,an30259a";
+                       reg = <0x30>;
+
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       led@1 {
+                               reg = <1>;
+                               function = LED_FUNCTION_STATUS;
+                               color = <LED_COLOR_ID_RED>;
+                       };
+
+                       led@2 {
+                               reg = <2>;
+                               function = LED_FUNCTION_STATUS;
+                               color = <LED_COLOR_ID_GREEN>;
+                       };
+
+                       led@3 {
+                               reg = <3>;
+                               function = LED_FUNCTION_STATUS;
+                               color = <LED_COLOR_ID_BLUE>;
+                       };
+               };
+       };
+
+       i2c-muic {
+               compatible = "i2c-gpio";
+               sda-gpios = <&tlmm_pinmux 22 GPIO_ACTIVE_HIGH>;
+               scl-gpios = <&tlmm_pinmux 23 GPIO_ACTIVE_HIGH>;
+               i2c-gpio,delay-us = <2>;
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               max77693: pmic@66 {
+                       compatible = "maxim,max77693";
+                       reg = <0x66>;
+                       interrupt-parent = <&tlmm_pinmux>;
+                       interrupts = <55 IRQ_TYPE_EDGE_FALLING>;
+                       pinctrl-0 = <&muic_int_default_state>;
+                       pinctrl-names = "default";
+
+                       muic: muic {
+                               compatible = "maxim,max77693-muic";
+                               safeout1-supply = <&esafeout1_reg>;
+                               safeout2-supply = <&esafeout2_reg>;
+                       };
+
+                       regulators {
+                               esafeout1_reg: ESAFEOUT1 {
+                                       regulator-name = "ESAFEOUT1";
+                               };
+
+                               esafeout2_reg: ESAFEOUT2 {
+                                       regulator-name = "ESAFEOUT2";
+                               };
+                       };
+               };
+       };
+};
+
+&gsbi7 {
+       qcom,mode = <GSBI_PROT_I2C_UART>;
+
+       status = "okay";
+};
+
+&gsbi7_serial {
+       pinctrl-0 = <&gsbi7_uart_pin_a>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&pm8821 {
+       interrupts-extended = <&tlmm_pinmux 76 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&pm8921 {
+       interrupts-extended = <&tlmm_pinmux 74 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&riva {
+       pinctrl-0 = <&riva_wlan_pin_a>, <&riva_bt_pin_a>, <&riva_fm_pin_a>;
+       pinctrl-names = "default";
+
+       vddcx-supply = <&pm8921_s3>;
+       vddmx-supply = <&pm8921_l24>;
+       vddpx-supply = <&pm8921_s4>;
+
+       status = "okay";
+
+       iris {
+               vddxo-supply = <&pm8921_l4>;
+               vddrfa-supply = <&pm8921_s2>;
+               vddpa-supply = <&pm8921_l10>;
+               vdddig-supply = <&pm8921_lvs2>;
+       };
+};
+
+&rpm {
+       regulators {
+               compatible = "qcom,rpm-pm8921-regulators";
+
+               vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
+               vdd_l24-supply = <&pm8921_s1>;
+               vdd_l25-supply = <&pm8921_s1>;
+               vdd_l26-supply = <&pm8921_s7>;
+               vdd_l27-supply = <&pm8921_s7>;
+               vdd_l28-supply = <&pm8921_s7>;
+               vin_lvs1_3_6-supply = <&pm8921_s4>;
+               vin_lvs2-supply = <&pm8921_s1>;
+               vin_lvs4_5_7-supply = <&pm8921_s4>;
+
+               pm8921_l1: l1 {
+                       regulator-min-microvolt = <1100000>;
+                       regulator-max-microvolt = <1100000>;
+                       regulator-always-on;
+                       bias-pull-down;
+               };
+
+               /* mipi_dsi.1-dsi1_pll_vdda */
+               pm8921_l2: l2 {
+                       regulator-min-microvolt = <1200000>;
+                       regulator-max-microvolt = <1200000>;
+                       bias-pull-down;
+               };
+
+               /* msm_otg-HSUSB_3p3 */
+               pm8921_l3: l3 {
+                       regulator-min-microvolt = <3075000>;
+                       regulator-max-microvolt = <3500000>;
+                       bias-pull-down;
+               };
+
+               /* msm_otg-HSUSB_1p8 */
+               pm8921_l4: l4 {
+                       regulator-always-on;
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+               };
+
+               /* msm_sdcc.1-sdc_vdd */
+               pm8921_l5: l5 {
+                       regulator-min-microvolt = <2950000>;
+                       regulator-max-microvolt = <2950000>;
+                       bias-pull-down;
+               };
+
+               /* earjack_debug */
+               pm8921_l6: l6 {
+                       regulator-min-microvolt = <3000000>;
+                       regulator-max-microvolt = <3000000>;
+                       bias-pull-down;
+               };
+
+               /* mipi_dsi.1-dsi_vci */
+               pm8921_l8: l8 {
+                       regulator-min-microvolt = <2800000>;
+                       regulator-max-microvolt = <3000000>;
+                       bias-pull-down;
+               };
+
+               /* wcnss_wlan.0-iris_vddpa */
+               pm8921_l10: l10 {
+                       regulator-min-microvolt = <2900000>;
+                       regulator-max-microvolt = <2900000>;
+                       bias-pull-down;
+               };
+
+               /* mipi_dsi.1-dsi1_avdd */
+               pm8921_l11: l11 {
+                       regulator-min-microvolt = <2850000>;
+                       regulator-max-microvolt = <2850000>;
+                       bias-pull-down;
+               };
+
+               /* touch_vdd */
+               pm8921_l15: l15 {
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <2950000>;
+                       bias-pull-down;
+               };
+
+               /* slimport_dvdd */
+               pm8921_l18: l18 {
+                       regulator-min-microvolt = <1100000>;
+                       regulator-max-microvolt = <1100000>;
+                       bias-pull-down;
+               };
+
+               /* touch_io */
+               pm8921_l22: l22 {
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       bias-pull-down;
+               };
+
+               /*
+                * mipi_dsi.1-dsi_vddio
+                * pil_qdsp6v4.1-pll_vdd
+                * pil_qdsp6v4.2-pll_vdd
+                * msm_ehci_host.0-HSUSB_1p8
+                * msm_ehci_host.1-HSUSB_1p8
+                */
+               pm8921_l23: l23 {
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       bias-pull-down;
+               };
+
+               /*
+                * tabla2x-slim-CDC_VDDA_A_1P2V
+                * tabla2x-slim-VDDD_CDC_D
+                */
+               pm8921_l24: l24 {
+                       regulator-min-microvolt = <750000>;
+                       regulator-max-microvolt = <1150000>;
+                       bias-pull-down;
+               };
+
+               pm8921_l25: l25 {
+                       regulator-min-microvolt = <1250000>;
+                       regulator-max-microvolt = <1250000>;
+                       regulator-always-on;
+                       bias-pull-down;
+               };
+
+               pm8921_l26: l26 {
+                       regulator-min-microvolt = <375000>;
+                       regulator-max-microvolt = <1050000>;
+                       regulator-always-on;
+                       bias-pull-down;
+               };
+
+               pm8921_l27: l27 {
+                       regulator-min-microvolt = <1100000>;
+                       regulator-max-microvolt = <1100000>;
+               };
+
+               pm8921_l28: l28 {
+                       regulator-min-microvolt = <1050000>;
+                       regulator-max-microvolt = <1050000>;
+                       bias-pull-down;
+               };
+
+               /* wcnss_wlan.0-iris_vddio */
+               pm8921_lvs1: lvs1 {
+                       bias-pull-down;
+               };
+
+               /* wcnss_wlan.0-iris_vdddig */
+               pm8921_lvs2: lvs2 {
+                       bias-pull-down;
+               };
+
+               pm8921_lvs3: lvs3 {
+                       bias-pull-down;
+               };
+
+               pm8921_lvs4: lvs4 {
+                       bias-pull-down;
+               };
+
+               pm8921_lvs5: lvs5 {
+                       bias-pull-down;
+               };
+
+               /* mipi_dsi.1-dsi_iovcc */
+               pm8921_lvs6: lvs6 {
+                       bias-pull-down;
+               };
+
+               /*
+                * pil_riva-pll_vdd
+                * lvds.0-lvds_vdda
+                * mipi_dsi.1-dsi1_vddio
+                * hdmi_msm.0-hdmi_vdda
+                */
+               pm8921_lvs7: lvs7 {
+                       bias-pull-down;
+               };
+
+               pm8921_ncp: ncp {
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       qcom,switch-mode-frequency = <1600000>;
+               };
+
+               /* Buck SMPS */
+               pm8921_s1: s1 {
+                       regulator-always-on;
+                       regulator-min-microvolt = <1225000>;
+                       regulator-max-microvolt = <1225000>;
+                       qcom,switch-mode-frequency = <3200000>;
+                       bias-pull-down;
+               };
+
+               pm8921_s2: s2 {
+                       regulator-min-microvolt = <1300000>;
+                       regulator-max-microvolt = <1300000>;
+                       qcom,switch-mode-frequency = <1600000>;
+                       bias-pull-down;
+               };
+
+               /* msm otg HSUSB_VDDCX */
+               pm8921_s3: s3 {
+                       regulator-min-microvolt = <500000>;
+                       regulator-max-microvolt = <1150000>;
+                       qcom,switch-mode-frequency = <4800000>;
+                       bias-pull-down;
+               };
+
+               /*
+                * msm_sdcc.1-sdc-vdd_io
+                * tabla2x-slim-CDC_VDDA_RX
+                * tabla2x-slim-CDC_VDDA_TX
+                * tabla2x-slim-CDC_VDD_CP
+                * tabla2x-slim-VDDIO_CDC
+                */
+               pm8921_s4: s4 {
+                       regulator-always-on;
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       qcom,switch-mode-frequency = <1600000>;
+                       bias-pull-down;
+                       qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
+               };
+
+               /*
+                * supply vdd_l26, vdd_l27, vdd_l28
+                */
+               pm8921_s7: s7 {
+                       regulator-min-microvolt = <1300000>;
+                       regulator-max-microvolt = <1300000>;
+                       qcom,switch-mode-frequency = <3200000>;
+               };
+
+               pm8921_s8: s8 {
+                       regulator-min-microvolt = <2200000>;
+                       regulator-max-microvolt = <2200000>;
+                       qcom,switch-mode-frequency = <1600000>;
+               };
+       };
+};
+
+/* eMMC */
+&sdcc1 {
+       vmmc-supply = <&pm8921_l5>;
+       vqmmc-supply = <&pm8921_s4>;
+
+       status = "okay";
+};
+
+&pm8921_gpio {
+       gpio_keys_default: gpio-keys-default-state {
+               pins = "gpio30", "gpio35", "gpio37";
+               function = PMIC_GPIO_FUNC_NORMAL;
+               input-enable;
+               bias-pull-up;
+               power-source = <PM8921_GPIO_S4>;
+       };
+};
+
+&tlmm_pinmux {
+       gsbi7_uart_pin_a: gsbi7-uart-pin-active-state {
+               rx-pins {
+                       pins = "gpio83";
+                       function = "gsbi7";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+
+               tx-pins {
+                       pins = "gpio82";
+                       function = "gsbi7";
+                       drive-strength = <4>;
+                       bias-disable;
+               };
+       };
+
+       muic_int_default_state: muic-int-default-state {
+               pins = "gpio55";
+               function = "gpio";
+               drive-strength = <2>;
+               input-enable;
+               bias-disable;
+       };
+};
+
+&usb_hs1_phy {
+       v3p3-supply = <&pm8921_l3>;
+       v1p8-supply = <&pm8921_l4>;
+       extcon = <&muic>;
+};
+
+&usb_id {
+       status = "okay";
+};
+
+&usb1 {
+       dr_mode = "otg";
+       extcon = <&muic>, <&usb_id>;
+
+       status = "okay";
+};

-- 
2.43.0



Reply via email to