How to use mpp4 as pwm in DB410


#1

Hi Support Team,

I am using Linaro18.01 release. i want to enable pwm for mpp4 pin. I refer below link but it look like for android.

i can’t find below node in device tree

    pm8916@1 {
	    pm8916_pwm: pwm {
		    compatible = "qcom,pm8916-pwm";
		    qcom,dtest = <1 1>; // see 96boards issue #3732
		    #pwm-cells = <2>;
	    };
    };

so please help me how to enable pwm for mpp4 in linaro18.01 linux release.

Thanks,
Arjun


#2

Hi @arjun.salariya,

Have you looked into this guide? https://github.com/96boards/documentation/blob/master/consumer/dragonboard/dragonboard410c/guides/pmic-pwm.md

Thanks,
Mani


#3

Btw, you can find the PWM node here: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/tree/arch/arm64/boot/dts/qcom/pm8916.dtsi?h=debian-qcom-dragonboard410c-19.01#n122


#4

Hi Mani,

Thanks for your respond i have look into guide which you share but in linaro18.01 i am not found drivers/leds/leds-qcom-lpg.c driver , /sys/class/pwm/pwmchip0/ sysentry and also not found any node

pm8916_pwm: pwm@bc00 {
   		compatible = "qcom,pm8916-pwm";

   		#pwm-cells = <2>;

   		status = "disabled";
   	};

in arch/arm64/boot/dts/qcom/pm8916.dtsi.

i have also search “qcom,pm8916-pwm” compatible driver in source code but there no any driver found in linaro18.01 please tell me which release you have used.

Thanks,
Arjun


#5

@arjun.salariya Please try the latest 19.01 release which has the PWM support enabled by default.

Thanks,
Mani