AnsweredAssumed Answered

imx6s PWM sysfs

Question asked by Markus Braitner on May 23, 2016
Latest reply on May 30, 2016 by Markus Braitner

Hello to all,

 

I'm trying to get pwm4 of imx6s running in linux. However, I don't get any "export"/"unexport" files in the sysfs ("/sys/class/pwm"), so I can't configure it via sysfs. Maybe somebody has an idea?

 

I'm using freescale kernel 3.10.17 (adapted by COM module vendor) with

CONFIG_PWM=y

CONFIG_PWM_SYSFS=y

CONFIG_PWM_IMX=y

are turned on in the kernel config.

 

In the freescale part of the device tree (imx6qdl.dtsi), it has

 

pwm4: pwm@0208c000 {

                #pwm-cells = <2>;

                compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm";

                reg = <0x0208c000 0x4000>;

                interrupts = <0 86 0x04>;

                clocks = <&clks 62>, <&clks 148>;

                clock-names = "ipg", "per";

            };

 

My device tree extension (to imx6s.dtsi) is as follows:

 

&pwm4 {

        #pwm-cells = <3>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_mabr_pwm4>;

        status = "okay";

    };

 

&iomuxc {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_mabr_gpio_test &pinctrl_mabr_pwm4>;

 

        imx6s-mabr{

            pinctrl_mabr_gpio_test: gpio_test_grp {

                fsl,pins = <

                    MX6QDL_PAD_KEY_COL2__GPIO4_IO10 0x130B0     //CAN_TX | X18:14 | 100k PD, enabled

                    MX6QDL_PAD_GPIO_8__GPIO1_IO08 0x1B0B0         //CAN_RX | X18:28 | 100k PU, enabled

                    MX6QDL_PAD_CSI0_VSYNC__GPIO5_IO21 0x130B0    //CIF_D8 | X20:13 | 100k PD, enabled

                    MX6QDL_PAD_NANDF_CS1__GPIO6_IO14 0x1B0B0     //CIF_HSYNC | X20:15 | 100k PU, enabled

                >;

        };  

 

        pinctrl_mabr_pwm4: pwm4_grp {

                fsl,pins = <

                    MX6QDL_PAD_SD1_CMD__PWM4_OUT 0x1b0b1        //CIF_D6 | X20:11

                >;

        };

};  

 

ls /sys/class/pwm gives:

 

/sys/class/pwm# ll

drwxr-xr-x    2 root     root             0 Apr  6 15:47 ./

drwxr-xr-x   44 root     root             0 Apr  6 15:47 ../

lrwxrwxrwx    1 root     root             0 Apr  6 15:47 pwmchip0 -> ../../devices/soc0/soc.1/2000000.aips-bus/2080000.pwm/pwm/pwmchip0/

lrwxrwxrwx    1 root     root             0 Apr  6 15:47 pwmchip1 -> ../../devices/soc0/soc.1/2000000.aips-bus/2084000.pwm/pwm/pwmchip1/

lrwxrwxrwx    1 root     root             0 Apr  6 15:47 pwmchip2 -> ../../devices/soc0/soc.1/2000000.aips-bus/2088000.pwm/pwm/pwmchip2/

lrwxrwxrwx    1 root     root             0 Apr  6 15:47 pwmchip3 -> ../../devices/soc0/soc.1/2000000.aips-bus/208c000.pwm/pwm/pwmchip3/

 

But no "export" / "unexport" files to export/unexport a pwm device...

 

Has anybody an idea? Any help would be much appreciated...

 

Kind regards,

 

Markus

 

PS: Does anybody know what exactly the "pwm-beeper" driver does?  https://www.kernel.org/doc/Documentation/devicetree/bindings/input/pwm-beeper.txt is not really useful here... Anybody an idea how to use it?

Outcomes