If it helps, here is the device tree overlay that works for 3.8 kernel.
This will enable three PWM pins.

/dts-v1/;
/plugin/;

/ {
        compatible = "ti,beaglebone", "ti,beaglebone-black";

        /* identification */
        part-number = “pwm_enable";
        version = "00A0";

        /* state the resources this cape uses */
        exclusive-use =
                /* the pin header uses */
                "P9.14",
                /* the hardware IP uses */
                "ehrpwm1A",
                /* the pin header uses */
                "P8.13",
                /* the hardware IP uses */
                "ehrpwm2B",
                /* the pin header uses */
                "P8.19",
                /* the hardware IP uses */
                "ehrpwm2A";


        fragment@0 {
                target = <&epwmss0>;
                __overlay__ {
                        status = "okay";
                };
        };

        fragment@1 {
                target = <&ehrpwm0>;
                __overlay__ {
                        status = "okay";
                };
        };

        fragment@2 {
                target = <&ecap0>;
                __overlay__ {
                        status = "okay";
                };
        };

        fragment@3 {
                target = <&epwmss1>;
                __overlay__ {
                        status = "okay";
                };
        };

        fragment@4 {
                target = <&ehrpwm1>;
                __overlay__ {
                        status = "okay";
                };
        };

        fragment@5 {
                target = <&epwmss2>;
                __overlay__ {
                        status = "okay";
                };
        };

        fragment@6 {
                target = <&ehrpwm2>;
                __overlay__ {
                        status = "okay";
                };
        };

        fragment@7 {
                target = <&ecap2>;
                __overlay__ {
                        status = "okay";
                };
        };


    fragment@8 {
        target = <&am33xx_pinmux>;
        __overlay__ {
            bs_pwm_P9_14_0xe: pinmux_bs_pwm_P9_14_0xe {
                pinctrl-single,pins = <0x048 0xe>;
            };
            bs_pwm_P8_13_0xc: pinmux_bs_pwm_P8_13_0xc {
                pinctrl-single,pins = <0x024 0xc>;
            };
            bs_pwm_P8_19_0xc: pinmux_bs_pwm_P8_19_0xc {
                pinctrl-single,pins = <0x020 0xc>;
            };
        };
    };

    fragment@9 {
        target = <&ocp>;
        __overlay__ {
            bs_pwm_test_P9_14 {
                compatible      = "pwm_test";
                pwms            = <&ehrpwm1 0 500000 0>;
                pwm-names       = "PWM_P9_14";

                pinctrl-names   = "default";
                pinctrl-0       = <&bs_pwm_P9_14_0xe>;

                enabled         = <1>;
                duty            = <0>;
                status          = "okay";
            };
            bs_pwm_test_P8_13 {
                compatible      = "pwm_test";
                pwms            = <&ehrpwm2 1 500000 0>;
                pwm-names       = "PWM_P8_13";

                pinctrl-names   = "default";
                pinctrl-0       = <&bs_pwm_P8_13_0xc>;
    
                enabled         = <1>;
                duty            = <0>;
                status          = "okay";
            };
            bs_pwm_test_P8_19 {
                compatible      = "pwm_test";
                pwms            = <&ehrpwm2 0 500000 0>;
                pwm-names       = "PWM_P8_19";

                pinctrl-names   = "default";
                pinctrl-0       = <&bs_pwm_P8_19_0xc>;

                enabled         = <1>;
                duty            = <0>;
                status          = "okay";
            };
        };
    };

};

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to