Skip to content

Commit

Permalink
arm64: dts: qcom: msm8916-vivo-y21l: Add initial device tree
Browse files Browse the repository at this point in the history
Vivo Y21L is a handset using the MSM8916 SoC released in 2016.

Add device tree with initial support for:
 - Accelerometer
 - Ambient Light
 - GPIO keys
 - Magnetormeter
 - SDHCI (internal and external storage)
 - UART
 - USB Device Mode
 - WCNSS (WiFi/BT)
 - Regulators

Signed-off-by: Raihan Ahamed <raihan1999ahamed@gmail.com>
  • Loading branch information
raihan2000 authored and stephan-gh committed Nov 2, 2023
1 parent 881d0b7 commit 038b2c4
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-on7.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
dtb-$(CONFIG_ARCH_QCOM) += msm8916-vivo-y21l.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt86518.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt86528.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb
Expand Down
154 changes: 154 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-vivo-y21l.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include "msm8916-pm8916.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
model = "Vivo Y21L";
compatible = "vivo,y21l", "qcom,msm8916";
chassis-type = "handset";

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

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

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

usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&usb_id_default>;
pinctrl-names = "default";
};
};

&blsp_i2c2 {
status = "okay";

accelerometer@18 {
compatible = "st,lis3dh-accel";
reg = <0x18>;
interrupts-extended = <&tlmm 21 IRQ_TYPE_EDGE_RISING>;
vdd-supply = <&pm8916_l17>;
vddio-supply = <&pm8916_l6>;
pinctrl-0 = <&accel_int_default>;
pinctrl-names = "default";
mount-matrix = "-1", "0", "0",
"0", "1", "0",
"0", "0", "1";
};

magnetormeter@2e {
compatible = "yamaha,yas533";
reg = <0x2e>;
vdd-supply = <&pm8916_l17>;
vddio-supply = <&pm8916_l6>;
};

light-sensor@39 {
compatible = "amstaos,tmd2772";
reg = <0x39>;
interrupts-extended = <&tlmm 113 IRQ_TYPE_EDGE_FALLING>;
vdd-supply = <&pm8916_l17>;
vddio-supply = <&pm8916_l6>;
pinctrl-0 = <&light_int_default>;
pinctrl-names = "default";
};
};

&blsp_uart2 {
status = "okay";
};

&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 {
non-removable;
status = "okay";
};

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

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

&wcnss {
status = "okay";
};

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

&wcnss_mem {
status = "okay";
};

&tlmm {
accel_int_default: accel-int-default-state {
pins = "gpio21";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

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

light_int_default: light-int-default-state {
pins = "gpio113";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

usb_id_default: usb-id-default-state {
pins = "gpio110";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};

0 comments on commit 038b2c4

Please sign in to comment.