Skip to content
Open
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
66 changes: 66 additions & 0 deletions arch/arm64/boot/dts/qcom/sm7150-xiaomi-davinci.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,18 @@
"MOTOR_STEP_CLK", /* GPIO_10 */
"CAMT_VCM_2P8_EN",
"NC";

pwm_out_gpio10 {
pwm_out_gpio10_default: pwm_out_gpio10_default {
pins = "gpio10";
function = PMIC_GPIO_FUNC_FUNC1;
bias-disable;
power-source = <1>;
output-low;
qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
drive-push-pull;
};
};
};

&pm6150l_lpg {
Expand All @@ -393,6 +405,32 @@
};
};

&soc {
ti,drv8846@0 {
cell-index = <0>;
reg = <0x00 0x00 0x00 0x00>;
compatible = "ti,drv8846";
pwms = <&pm6150l_lpg 4 1000000>;
motor,mode0-gpio = <&tlmm 91 GPIO_ACTIVE_HIGH>;
motor,mode1-gpio = <&tlmm 66 GPIO_ACTIVE_HIGH>;
motor,sleep-gpio = <&tlmm 88 GPIO_ACTIVE_HIGH>;
motor,dir-gpio = <&tlmm 55 GPIO_ACTIVE_HIGH>;
motor,pwren-gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;

motor,rampup-pwm-period-ns = <625000>;
motor,rampup-duration-ms = <50>;
motor,high-pwm-period-ns = <52083>;
motor,high-duration-ms = <720>;
motor,rampdown-pwm-period-ns = <625000>;
motor,rampdown-duration-ms = <50>;
motor,step-mode = <2>;

pinctrl-names = "default";
pinctrl-0 = <&pwm_out_gpio10_default &motor_gpio_default &motor_gpio_fault>;
status = "okay";
};
};

&q6afedai {
qi2s@16 {
reg = <PRIMARY_MI2S_RX>;
Expand Down Expand Up @@ -585,6 +623,34 @@
bias-pull-up;
input-enable;
};

motor_gpio_default: motor_gpio_default {
mux {
/* DIR, M0, M1, SLEEP, EN */
pins = "gpio55", "gpio91", "gpio66", "gpio88", "gpio90";
function = "gpio";
};

config {
/* DIR, M0, M1, SLEEP, EN */
pins = "gpio55", "gpio91", "gpio66", "gpio88", "gpio90";
bias-pull-up; /* No PULL */
drive-strength = <PMIC_GPIO_STRENGTH_MED>; /* 2 MA */
};
};

motor_gpio_fault: motor_gpio_fault {
mux {
pins = "gpio43";
function = "gpio";
};

config {
pins = "gpio43";
bias-pull-up; /* No PULL */
drive-strength = <PMIC_GPIO_STRENGTH_MED>; /* 2 MA */
};
};
};

&venus {
Expand Down