diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile index 63dfbdeec951ca..0dc3c2c097da7e 100644 --- a/arch/arm/boot/dts/qcom/Makefile +++ b/arch/arm/boot/dts/qcom/Makefile @@ -31,6 +31,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-msm8660-surf.dtb \ qcom-msm8905-nokia-argon.dtb \ qcom-msm8909-acer-t01.dtb \ + qcom-msm8909-fareastone-smart506.dtb \ qcom-msm8909-nokia-leo.dtb \ qcom-msm8909-nokia-sparkler.dtb \ qcom-msm8916-samsung-e5.dtb \ diff --git a/arch/arm/boot/dts/qcom/qcom-msm8909-fareastone-smart506.dts b/arch/arm/boot/dts/qcom/qcom-msm8909-fareastone-smart506.dts new file mode 100644 index 00000000000000..994b891126b4ee --- /dev/null +++ b/arch/arm/boot/dts/qcom/qcom-msm8909-fareastone-smart506.dts @@ -0,0 +1,342 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "qcom-msm8909-pm8909.dtsi" + +#include +#include +#include +#include +#include + +/ { + model = "Fareastone Smart 506"; + compatible = "fareastone,smart506", "qcom,msm8909"; + chassis-type = "handset"; + + aliases { + serial0 = &blsp_uart1; + }; + + chosen { + stdout-path = "serial0"; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pm8909_pwm 0 100000>; + + brightness-levels = <0 255>; + num-interpolated-steps = <255>; + default-brightness-level = <255>; + }; + + battery: battery { + compatible = "simple-battery"; + voltage-min-design-microvolt = <3400000>; + voltage-max-design-microvolt = <4350000>; + energy-full-design-microwatt-hours = <7600000>; + charge-full-design-microamp-hours = <2000000>; + + ocv-capacity-celsius = <25>; + ocv-capacity-table-0 = <4368000 100>, <4301000 95>, + <4242000 90>, <4184000 85>, <4128000 80>, <4075000 75>, + <4026000 70>, <3978000 65>, <3932000 60>, <3882000 55>, + <3848000 50>, <3823000 45>, <3803000 40>, <3786000 35>, + <3772000 30>, <3758000 25>, <3739000 20>, <3716000 16>, + <3692000 13>, <3688000 11>, <3686000 10>, <3686000 9>, + <3684000 8>, <3682000 7>, <3676000 6>, <3656000 5>, + <3612000 4>, <3552000 3>, <3469000 2>, <3331000 1>, + <3000000 0>; + }; + + flash-led-controller { + /* Actually leedcon,sl610w1d */ + compatible = "sgmicro,sgm3140"; + enable-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>; + flash-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&camera_flash_default>; + pinctrl-names = "default"; + + flash_led: led { + function = LED_FUNCTION_FLASH; + color = ; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&gpio_keys_default>; + pinctrl-names = "default"; + + label = "GPIO Buttons"; + + button-volume-up { + label = "Volume Up"; + gpios = <&tlmm 90 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led-keypad-backlight { + function = LED_FUNCTION_KBD_BACKLIGHT; + color = ; + gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&gpio_leds_default>; + pinctrl-names = "default"; + }; + }; +}; + +&blsp_i2c1 { + status = "okay"; + + accelerometer@18 { + compatible = "bosch,bma222"; + reg = <0x18>; + + vddio-supply = <&pm8909_l6>; + vdd-supply = <&pm8909_l17>; + + interrupts-extended = <&tlmm 96 IRQ_TYPE_EDGE_RISING>, + <&tlmm 65 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "INT1", "INT2"; + + pinctrl-0 = <&accel_int_default>; + pinctrl-names = "default"; + }; +}; + +&blsp_i2c5 { + status = "okay"; + + touchscreen@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + + interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_RISING>; + + reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>; + + AVDD28-supply = <&pm8909_l17>; + VDDIO-supply = <&pm8909_l6>; + + touchscreen-size-x = <720>; + touchscreen-size-y = <1280>; + + pinctrl-0 = <&touchscreen_default>; + pinctrl-names = "default"; + }; +}; + +&blsp_uart1 { + status = "okay"; +}; + +&pm8909_bms { + monitored-battery = <&battery>; + power-supplies = <&pm8909_charger>; + status = "okay"; +}; + +&pm8909_charger { + qcom,vdd-safe = <4400000>; + qcom,ibat-safe = <360000>; + + monitored-battery = <&battery>; + + status = "okay"; +}; + +&pm8909_pwm { + pinctrl-0 = <&pwm_out>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pm8909_resin { + linux,code = ; + status = "okay"; +}; + +&pm8909_vib { + status = "okay"; +}; + +&sdhc_1 { + status = "okay"; +}; + +&sdhc_2 { + non-removable; + status = "okay"; +}; + +&usb { + extcon = <&pm8909_charger>; + status = "okay"; +}; + +&usb_hs_phy { + extcon = <&pm8909_charger>; +}; + +&wcnss { + status = "okay"; +}; + +&wcnss_iris { + compatible = "qcom,wcn3620"; +}; + +&smd_rpm_regulators { + s2 { + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <1850000>; + }; + + l1 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + }; + + l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + l4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l8 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2900000>; + }; + + l9 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + }; + + l10 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1300000>; + }; + + l11 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + regulator-allow-set-load; + regulator-system-load = <200000>; + }; + + l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + l13 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + }; + + l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + }; + + l15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + }; + + l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + l18 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; +}; + +&pm8909_mpps { + pwm_out: mpp2-state { + pins = "mpp2"; + function = "digital"; + power-source = ; + output-low; + qcom,dtest = <1>; + }; +}; + +&tlmm { + accel_int_default: accel-int-default-state { + pins = "gpio65", "gpio96"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + camera_flash_default: camera-flash-default-state { + pins = "gpio31", "gpio32"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + gpio_keys_default: gpio-keys-default-state { + pins = "gpio90"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + gpio_leds_default: gpio-leds-default-state { + pins = "gpio98"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + touchscreen_default: touchscreen-default-state { + reset-pins { + pins = "gpio12"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + touchscreen-pins { + pins = "gpio13"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; +};