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

arm64: dts: qcom: msm8916-lenovo-phab: add device #289

Draft
wants to merge 5 commits into
base: msm8916/6.2-rc5
Choose a base branch
from
Draft
Changes from 1 commit
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
107 changes: 107 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-lenovo-phab.dts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
};
};

backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pm8916_pwm 0 100000>;
brightness-levels = <0 255>;
num-interpolated-steps = <255>;
default-brightness-level = <128>;
};

battery: battery {
compatible = "simple-battery";
voltage-min-design-microvolt = <3200000>;
Expand Down Expand Up @@ -123,23 +131,82 @@
};
};

&blsp_i2c5 {

Choose a reason for hiding this comment

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

Unlike display panels, touchscreen can be upstreamed with the driver in Torvald's tree, so you might want to split it from the display panel commit.

Copy link
Author

Choose a reason for hiding this comment

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

is there an easy way to do it?

Choose a reason for hiding this comment

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

Not known yet, I assume. You need to do this during git rebase.

Copy link
Author

Choose a reason for hiding this comment

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

Do what, delete anyway?

Choose a reason for hiding this comment

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

  1. Delete touchscreen parts, and commit with message blah blah
  2. Revert commit, and reword the revert with message arm64: dts: qcom: msm8916-lenovo-phab: add touchscreen
  3. Squash/fixup blah blah, and reword

Copy link
Member

Choose a reason for hiding this comment

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

You can probably reset the commit during the rebase, then split into two with git add --patch to only add some hunks (not sure if it would be split nicely though) and then squash the resulting touchscreen commit into the first one using another interactive rebase. Otherwise can probably interactive rebase -> edit first commit to add the TS and then fix the merge conflict when this commit applies.

status = "okay";

touchscreen@38 {
/* actually FT5336 */
compatible = "edt,edt-ft5306";
reg = <0x38>;
interrupt-parent = <&msmgpio>;
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
pinctrl-0 = <&touchscreen_default>;
pinctrl-names = "default";
vcc-supply = <&pm8916_l17>;
iovcc-supply = <&pm8916_l6>;
reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>;
touchscreen-size-x = <720>;
touchscreen-size-y = <1280>;
};
};

&blsp1_uart2 {
status = "okay";
};

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

panel@0 {
compatible = "lenovo,phab-jdi_1080p";
reg = <0>;
backlight = <&backlight>;
reset-gpios = <&msmgpio 25 GPIO_ACTIVE_LOW>;

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

&dsi0_out {
data-lanes = <0 1 2 3>;
qcom,platform-enable-gpio = <&msmgpio 109 GPIO_ACTIVE_HIGH>;
qcom,platform-reset-gpio = <&msmgpio 25 GPIO_ACTIVE_HIGH>;
Copy link
Member

Choose a reason for hiding this comment

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

remote-endpoint = <&panel_in>;
k1gen marked this conversation as resolved.
Show resolved Hide resolved
};

&dsi_phy0 {
qcom,dsi-phy-regulator-ldo-mode;
};

&lpass {
dai@3 {
reg = <MI2S_QUATERNARY>;
qcom,playback-sd-lines = <1>;
};
};

&mdss {
status = "okay";
};

&pm8916_bms {
monitored-battery = <&battery>;
//power-supplies = <&charger>;

Choose a reason for hiding this comment

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

It doesn't seem to be used or required.

Copy link
Author

Choose a reason for hiding this comment

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

It causes kernel panic, though it is the right way to use bms and charger together

status = "okay";
};

&pm8916_pwm {
pinctrl-0 = <&pwm_out>;
pinctrl-names = "default";
status = "okay";
};

&pm8916_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
Expand Down Expand Up @@ -345,6 +412,36 @@
bias-pull-up;
};

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

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

mpu_default: mpu-default-state {
k1gen marked this conversation as resolved.
Show resolved Hide resolved
pins = "gpio115";
function = "gpio";
Expand All @@ -358,3 +455,13 @@
drive-strength = <2>;
};
};

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