Hi TJF, thanks for your note. Are you saying that the only way to get PWM 
in a 4.x kernel is by modifying am33xx-clocks.dtsi? Also, how can I verify 
whether the register is set correctly? 
Thanks,
Justin

On Friday, March 31, 2017 at 9:48:33 AM UTC-7, TJF wrote:
>
> Hi Justin!
>
> The initial device tree changed between kernel 3.8 and 4.x. In 4.x the 
> Control Module register *pwmss_ctrl* (@664h) gets cleared at boot. This 
> register can get used to sychronize several PWM subsystems. A feature that 
> isn't supported by the kernel nor by any of it's drivers. So no reason to 
> change the initial state and clear that register. This just disables all 
> PWM subsystems and makes kernel versions incompatible. (You may call it an 
> official kernel virus).
>
> Anyway, in order to get the PWM subsystems working in kernel 4.x you have 
> to make sure that the register doesn't get cleared at boot. Ie. you can 
> invert the bit-logic. Therefor download the device tree sources, edit file 
> *am33xx-clocks.dtsi*, find the following nodes and make them look like (= 
> add tag *ti,set-bit-to-disable)*
>
>     ehrpwm0_tbclk: ehrpwm0_tbclk@44e10664 {
>         #clock-cells = <0>;
>         compatible = "ti,gate-clock";
>         clocks = <&l4ls_gclk>;
>         ti,bit-shift = <0>;
>         ti,set-bit-to-disable;
>         reg = <0x0664>;
>     };
>
>     ehrpwm1_tbclk: ehrpwm1_tbclk@44e10664 {
>         #clock-cells = <0>;
>         compatible = "ti,gate-clock";
>         clocks = <&l4ls_gclk>;
>         ti,bit-shift = <1>;
>         ti,set-bit-to-disable;
>         reg = <0x0664>;
>     };
>
>     ehrpwm2_tbclk: ehrpwm2_tbclk@44e10664 {
>         #clock-cells = <0>;
>         compatible = "ti,gate-clock";
>         clocks = <&l4ls_gclk>;
>         ti,bit-shift = <2>;
>         ti,set-bit-to-disable;
>         reg = <0x0664>;
>     };
>
> Then compile and install the binary trees. PWM subsystems will work after 
> reboot.
>
> Regards
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/0c5efa6d-0b91-4c45-a595-072eedc54c43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to