Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,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-pd1505f.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-vivo-y21l.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-wiko-chuppito.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt86518.dtb
Expand Down
316 changes: 316 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-vivo-pd1505f.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,316 @@
// 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>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
#include <dt-bindings/leds/common.h>

/ {
model = "Vivo Y31A (PD1505F)";
compatible = "pd1505f", "qcom,msm8916";
chassis-type = "handset";

aliases {
mmc0 = &sdhc_1;
mmc1 = &sdhc_2;
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";
};

backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pm8916_pwm 0 40000>;
brightness-levels = <0 255>;
num-interpolated-steps = <255>;
default-brightness-level = <255>;
enable-gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_bl_en_default>;
Comment on lines +56 to +57
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-names always last

Suggested change
pinctrl-names = "default";
pinctrl-0 = <&lcd_bl_en_default>;
pinctrl-0 = <&lcd_bl_en_default>;
pinctrl-names = "default";

post-pwm-on-delay-ms = <10>;
pwm-off-delay-ms = <10>;
};

battery: battery-cell {
compatible = "simple-battery";
voltage-min-design-microvolt = <3450000>;
voltage-max-design-microvolt = <4350000>;
energy-full-design-microwatt-hours = <8470000>;
charge-full-design-microamp-hours = <2200000>;

ocv-capacity-celsius = <25>;
ocv-capacity-table-0 = <4350000 100>, <4300000 95>, <4250000 90>,
<4200000 85>, <4150000 80>, <4100000 75>,
<4050000 70>, <4000000 65>, <3950000 60>,
<3900000 55>, <3850000 50>, <3820000 45>,
<3800000 40>, <3780000 35>, <3760000 30>,
<3740000 25>, <3720000 20>, <3700000 16>,
<3690000 13>, <3680000 11>, <3670000 10>,
<3660000 9>, <3650000 8>, <3640000 7>,
<3600000 6>, <3550000 5>, <3500000 4>,
<3450000 3>, <3400000 2>, <3300000 1>,
<3000000 0>;
};
};

&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_i2c5 {
status = "okay";

touchscreen@14 {
compatible = "goodix,gt928";
reg = <0x14>;

interrupt-parent = <&tlmm>;
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
Comment on lines +125 to +126
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please always interrupts-extended

irq-gpios = <&tlmm 13 GPIO_ACTIVE_LOW>;
reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;

AVDD28-supply = <&pm8916_l16>;
touchscreen-size-x = <540>;
touchscreen-size-y = <960>;

pinctrl-names = "default";
pinctrl-0 = <&ts_int_default &ts_rst_default>;
Comment on lines +134 to +135
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pinctrl-names = "default";
pinctrl-0 = <&ts_int_default &ts_rst_default>;
pinctrl-0 = <&ts_int_default>, <&ts_rst_default>;
pinctrl-names = "default";

};
};

&blsp_uart2 {
status = "okay";
};

&pm8916_bms {
monitored-battery = <&battery>;
status = "okay";
};

&pm8916_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
};

&pm8916_rpm_regulators {
pm8916_l2: l2 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on; /* 可能需要保持常开 */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the comment here...

This regulator is part of reference design and is already enabled in the dtsi you include.

https://elixir.bootlin.com/linux/v6.19.11/source/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi#L95-L99

};
pm8916_l17: l17 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
};
pm8916_l16: l16 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
};
Comment on lines +159 to +166
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort please

};

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

lcd_bl_en_default: lcd-bl-en-default-state {
pins = "gpio8";
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;
};

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

ts_rst_default: ts-rst-default-state {
pins = "gpio12";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
};

&pm8916_pwm {
status = "okay";
};

&pm8916_mpps {
pwm_out: mpp4-state {
pins = "mpp4";
function = "digital";
power-source = <PM8916_MPP_VPH>;
output-low;
qcom,dtest = <1>;
};
};

&gpu {
status = "okay";
vdd-supply = <&pm8916_l2>;
vddcx-supply = <&rpmpd MSM8916_VDDCX>;
Comment on lines +279 to +280
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you actually need this? I don't think this is correct

};

&mdss {
status = "okay";
};

&mdss_dsi0 {
pinctrl-0 = <&mdss_default>;
pinctrl-1 = <&mdss_sleep>;
pinctrl-names = "default", "sleep";

panel@0 {
compatible = "vivo,pd1505f-panel";
reg = <0>;

backlight = <&backlight>;
vdd-supply = <&pm8916_l17>;
vddio-supply = <&pm8916_l6>;
reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;

port {
panel_in: endpoint {
remote-endpoint = <&mdss_dsi0_out>;
};
};
};
};

&mdss_dsi0_out {
data-lanes = <0 1>;
remote-endpoint = <&panel_in>;
};

&mdss_dsi0_phy {
qcom,dsi-phy-regulator-ldo-mode;
};
15 changes: 15 additions & 0 deletions drivers/gpu/drm/panel/msm8916-generated/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,21 @@ config DRM_PANEL_SAMSUNG_SC7798A_BV045WVM
tristate "Samsung SC7798A BV045WVM"
default DRM_PANEL_MSM8916_GENERATED

config DRM_PANEL_MSM8916_GENERATED
tristate "Select all generated MSM8916 panel drivers by default"

config DRM_PANEL_PD1505L_OTM9605A
tristate "PD1505L OTM9605A"
default DRM_PANEL_MSM8916_GENERATED

config DRM_PANEL_PD1505L_OTM9605A_BAOMING
tristate "PD1505L OTM9605A BAOMING"
default DRM_PANEL_MSM8916_GENERATED

config DRM_PANEL_PD1505L_OTM9605A_BOENEW
tristate "PD1505L OTM9605A BOEMEW"
default DRM_PANEL_MSM8916_GENERATED

config DRM_PANEL_WINGTECH_AUO_NT35521
tristate "Wingtech AUO NT35521"
default DRM_PANEL_MSM8916_GENERATED
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/panel/msm8916-generated/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3FA2_AMS549EH01) += panel-samsung-s6e3fa2-ams5
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA5X01_AMS497HY01) += panel-samsung-s6e8aa5x01-ams497hy01.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA5X01_AMS520KT01) += panel-samsung-s6e8aa5x01-ams520kt01.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_SC7798A_BV045WVM) += panel-samsung-sc7798a-bv045wvm.o
obj-$(CONFIG_DRM_PANEL_PD1505L_OTM9605A) += panel-pd1505l-otm9605a.o
obj-$(CONFIG_DRM_PANEL_PD1505L_OTM9605A_BAOMING) += panel-pd1505l-otm9605a-baoming.o
obj-$(CONFIG_DRM_PANEL_PD1505L_OTM9605A_BOENEW) += panel-pd1505l-otm9605a-boenew.o
obj-$(CONFIG_DRM_PANEL_WINGTECH_AUO_NT35521) += panel-wingtech-auo-nt35521.o
obj-$(CONFIG_DRM_PANEL_WINGTECH_AUO_R61308) += panel-wingtech-auo-r61308.o
obj-$(CONFIG_DRM_PANEL_WINGTECH_BOE_HX8394F) += panel-wingtech-boe-hx8394f.o
Expand Down
Loading
Loading