Skip to content

Commit

Permalink
ARM: dts: qcom: msm8909-fareastone-smart506: Add initial device tree
Browse files Browse the repository at this point in the history
Fareastone Smart 506 is a phone using the MSM8909 SoC released in 2015.

Add a device tree for with initial support for:

- GPIO keys
- GPIO LEDs
- pm8909-vibrator
- SDHCI (internal and external storage)
- USB Device Mode
- UART
- WCNSS (WiFi/BT)
- Regulators
- LBC and BMS
- Goodix GT9xx touchscreen
- PWM panel backlight
- Leedcon SL610W1D flash LED
- Bosch BMA222 Accelerometer

Signed-off-by: "Lin, Meng-Bo" <linmengbo06890@proton.me>
  • Loading branch information
bolilingmeng89006 committed Aug 27, 2024
1 parent de069af commit 4346275
Show file tree
Hide file tree
Showing 2 changed files with 343 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
342 changes: 342 additions & 0 deletions arch/arm/boot/dts/qcom/qcom-msm8909-fareastone-smart506.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,342 @@
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include "qcom-msm8909-pm8909.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>

/ {
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 = <LED_COLOR_ID_WHITE>;
};
};

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 = <KEY_VOLUMEUP>;
};
};

gpio-leds {
compatible = "gpio-leds";

led-keypad-backlight {
function = LED_FUNCTION_KBD_BACKLIGHT;
color = <LED_COLOR_ID_WHITE>;
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 = <KEY_VOLUMEDOWN>;
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 = <PM8916_MPP_VPH>;
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;
};
};
};

0 comments on commit 4346275

Please sign in to comment.