Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SM-G6000: Add Samsung S6D7AA0X62 BV050HDM panel #230

Draft
wants to merge 5 commits into
base: wip/msm8916/6.10
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
187 changes: 169 additions & 18 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-on7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -50,39 +50,148 @@
};
};

i2c-muic {
i2c-bl {
compatible = "i2c-gpio";
sda-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
sda-gpios = <&tlmm 101 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&tlmm 102 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;

pinctrl-0 = <&muic_i2c_default>;
pinctrl-names = "default";
pinctrl-0 = <&bl_i2c_default>;

#address-cells = <1>;
#size-cells = <0>;

muic: extcon@25 {
compatible = "siliconmitus,sm5703-muic";
reg = <0x25>;
lm3632@11 {
compatible = "ti,lm3632";
reg = <0x11>;

enable-gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>;

regulators {
compatible = "ti,lm363x-regulator";

enable-gpios = <&tlmm 97 GPIO_ACTIVE_HIGH>,
<&tlmm 98 GPIO_ACTIVE_HIGH>,
<&tlmm 120 GPIO_ACTIVE_HIGH>;

pinctrl-names = "default";
pinctrl-0 = <&bl_default>;

reg_lcd_vboost: vboost {
regulator-name = "lcd_boost";
regulator-min-microvolt = <6000000>;
regulator-max-microvolt = <6000000>;
regulator-always-on;
};

reg_lcd_vpos: vpos {
regulator-name = "lcd_vpos";
regulator-min-microvolt = <5500000>;
regulator-max-microvolt = <5500000>;
};

reg_lcd_vneg: vneg {
regulator-name = "lcd_vneg";
regulator-min-microvolt = <5500000>;
regulator-max-microvolt = <5500000>;
};
};

backlight {
compatible = "ti,lm3632-backlight";

pwm-names = "lmu-backlight";

lcd {
led-sources = <0 1>;
pwm-period = <10000>;
};
};
};
};

interrupt-parent = <&tlmm>;
interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
// i2c-muic {
// compatible = "i2c-gpio";
// sda-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
// scl-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;

pinctrl-0 = <&muic_int_default>;
pinctrl-names = "default";
};
// pinctrl-0 = <&muic_i2c_default>;
// pinctrl-names = "default";

// #address-cells = <1>;
// #size-cells = <0>;

// muic: extcon@25 {
// compatible = "siliconmitus,sm5703-muic";
// reg = <0x25>;

// interrupt-parent = <&tlmm>;
// interrupts = <12 IRQ_TYPE_EDGE_FALLING>;

// pinctrl-0 = <&muic_int_default>;
// pinctrl-names = "default";
// };
// };

reg_lcd: regulator-lcd {
compatible = "regulator-fixed";
regulator-name = "lcd";
regulator-min-microvolt = <2100000>;
regulator-max-microvolt = <2100000>;

gpio = <&tlmm 16 GPIO_ACTIVE_HIGH>;
enable-active-high;

pinctrl-names = "default";
pinctrl-0 = <&lcd_en_default>;
};
};

&blsp_uart2 {
status = "okay";
};

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

panel@0 {
compatible = "samsung,s6d7aa0x62-bv050hdm";
reg = <0>;

lcd-supply = <&reg_lcd>;
vpos-supply = <&reg_lcd_vpos>;
vneg-supply = <&reg_lcd_vneg>;
reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;

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

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

&mdss {
status = "okay";
};

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

/* FIXME: Replace with SM5703 MUIC when driver is fixed */
&pm8916_usbin {
status = "okay";
};

&sdhc_1 {
status = "okay";
};
Expand All @@ -98,12 +207,13 @@
};

&usb {
extcon = <&muic>, <&muic>;
dr_mode = "peripheral";
extcon = <&pm8916_usbin>;
status = "okay";
};

&usb_hs_phy {
extcon = <&muic>;
extcon = <&pm8916_usbin>;
};

&venus {
Expand Down Expand Up @@ -134,20 +244,61 @@
bias-pull-up;
};

muic_i2c_default: muic-i2c-default-state {
pins = "gpio105", "gpio106";
bl_default: bl-default {
pins = "gpio97", "gpio98", "gpio120";
function = "gpio";

drive-strength = <2>;
bias-disable;
};

bl_i2c_default: bl-i2c-default {
pins = "gpio101", "gpio102";
function = "gpio";

drive-strength = <2>;
bias-disable;
};

muic_int_default: muic-int-default-state {
pins = "gpio12";
lcd_en_default: lcd-en-default {
pins = "gpio16";
function = "gpio";

drive-strength = <2>;
bias-disable;
};

mdss {
mdss_default: mdss-default {
pins = "gpio25";
function = "gpio";

drive-strength = <8>;
bias-disable;
};
mdss_sleep: mdss-sleep {
pins = "gpio25";
function = "gpio";

drive-strength = <2>;
bias-pull-down;
};
};

// muic_i2c_default: muic-i2c-default-state {
// pins = "gpio105", "gpio106";
// function = "gpio";
// drive-strength = <2>;
// bias-disable;
// };

// muic_int_default: muic-int-default-state {
// pins = "gpio12";
// function = "gpio";
// drive-strength = <2>;
// bias-disable;
// };

sdc2_cd_default: sdc2-cd-default-state {
pins = "gpio38";
function = "gpio";
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/configs/msm8916_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ CONFIG_QCOM_WDT=y
CONFIG_PM8916_WATCHDOG=y
CONFIG_MFD_SPMI_PMIC=y
CONFIG_MFD_RT5033=m
CONFIG_MFD_TI_LMU=m
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_QCOM_SMD_RPM=y
CONFIG_REGULATOR_QCOM_SPMI=y
Expand All @@ -278,6 +279,8 @@ CONFIG_DRM_MSM=m
# CONFIG_DRM_MSM_DSI_10NM_PHY is not set
# CONFIG_DRM_MSM_DSI_7NM_PHY is not set
# CONFIG_DRM_MSM_HDMI is not set
CONFIG_DRM_PANEL_SIMPLE=m
CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0X62_BV050HDM=m
CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01=m
CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0=m
CONFIG_DRM_PANEL_SIMPLE=m
Expand Down
7 changes: 7 additions & 0 deletions drivers/gpu/drm/panel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,13 @@ config DRM_PANEL_SAMSUNG_LD9040
depends on BACKLIGHT_CLASS_DEVICE
select VIDEOMODE_HELPERS

config DRM_PANEL_SAMSUNG_S6D7AA0X62_BV050HDM
tristate "Samsung S6D7AA0X62 BV050HDM DSI video mode panel"
depends on OF
depends on DRM_MIPI_DSI
depends on BACKLIGHT_CLASS_DEVICE
select VIDEOMODE_HELPERS

config DRM_PANEL_SAMSUNG_S6E3FA7
tristate "Samsung S6E3FA7 panel driver"
depends on OF
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/panel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0X62_BV050HDM) += panel-samsung-s6d7aa0x62-bv050hdm.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D27A1) += panel-samsung-s6d27a1.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0) += panel-samsung-s6d7aa0.o
Expand Down
Loading