Configuring PM GPIO 5 as PWM output for backlight

Hi,

We are using Debian kernel 4.14 and pwm_bl.c driver for controlling a MIPI backlight. We are facing issue in configuring the PM GPIO 5 pin as PWM pin for MIPI panel.
The driver is getting initiated successfully, but there is no effect/change in the brightness even after changing the brightness entries in driver and sysfs. Besides, there isn’t a PWM signal on the GPIO 5 (checked at the oscilloscope).

We tried to configure a PWM that outputs its signal on the MPP4 dtest-line 1 and have the GPIO 5 configured on this line. Configuring the GPIO on this line is what we’re struggling right now.

Here’s the actual device-tree configuration we tried:

//apq8096-db820c-pmic-pins.dtsi
&pm8994_gpios {

	pinctrl-names = "default";
	pinctrl-0 = <&ls_exp_gpio_f &bt_en_gpios>;

	ls_exp_gpio_f: pm8994_gpio5 {
		pinconf {
			pins = "gpio5";
			function = "dtest1";
			output-low;
			power-source = <PM8994_GPIO_S4>; // 1.8V
		};
	};
[...]
};

&pm8994_mpps {
	pm8994_mpp2_wifi_led: mpp2-wifi-led-active {
		pins = "mpp2";
		function = "sink";

		output-low;
		qcom,dtest = <2>;
	};

	pm8994_mpp4_backlight: mpp4-backlight {
		pins = "mpp4";
		function = "digital";

		output-low;
		qcom,dtest = <1>;
	};
[...]
};

//pm8994.dtsi
&spmi_bus {
[...]
	pmic@1 {
		compatible = "qcom,pm8994", "qcom,spmi-pmic";
		reg = <0x1 SPMI_USID>;
		#address-cells = <1>;
		#size-cells = <0>;

		pwm {
			compatible = "qcom,pm8916-pwm";
			#pwm-cells = <2>;
 			status = "disabled";
 		};
	};
};

//apq8096-db820c.dtsi
backlight: backlight {
	status = "okay";
	compatible = "pwm-backlight";
	pwms = <&pm8994_pwm 0 10000>;
	brightness-levels = <0 4 8 16 32 64 128 255>;
	default-brightness-level = <6>;
	power-supply = <&pm8994_l28>;
	enable-gpios = <&msmgpio 135 0>;
};
[...]
&spmi_bus {
	pmic@1 {
		pm8994_pwm: pwm {
			status = "okay";
			qcom,power-source = <2>;
			qcom,dtest = <1 1>;
			pinctrl-names = "default";
			pinctrl-0 = <&pm8994_mpp4_backlight>;
		};
	};
};

So, I would require some help on configuring the GPIO pin as PWM output.

Thanks.