Hello,
I am trying to set a PIN (GPIO9) as PWM-Clock Output. Below, the nodes on .dts according to Documentation/devicetree/bindings/clock/pwm-clock.txt :
On SoC.dtsi file:
...
pwm1: pwm@02080000 {
#pwm-cells = <2>;
compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm";
reg = <0x02080000 0x4000>;
interrupts = <0 83 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_IPG>,
<&clks IMX6QDL_CLK_PWM1>;
clock-names = "ipg", "per";
status = "disabled";
};
on SoM.dtsi file:
/*
*
* PWM-Clock
* 8,25MHz SIgnal on GPIO09 (PWM1)
*
*/
clock {
compatible = "pwm-clock";
#clock-cells = <0>;
clock-frequency = <8250000>;
clock-output-names = "pwm_clk";
pwms = <&pwm1 0 121>;
};
...
/*
*
* PWM1
*
*/
&pwm1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm1>;
status = "okay";
};
...
pinctrl_pwm1: pwm1grp {
fsl,pins = <
MX6QDL_PAD_GPIO_9__PWM1_OUT 0x0001b0b0
>;
};
I would like to set and enable the PWM1 on kernel stage, not on user-space via (/sys/class/pwm). The output value of the pin is always 0... no signal on it :smileysad: What am I doing wrong ? Did I miss something? AFAIK it should be possible, actually it would be the objective of pwm-clock driver...
Thank you :smileyhappy: