Messages in this thread | | | From | Yash Shah <> | Date | Tue, 19 Mar 2019 11:56:35 +0530 | Subject | Re: [PATCH v9 0/2] PWM support for HiFive Unleashed |
| |
On Mon, Mar 18, 2019 at 10:56 PM Andreas Schwab <schwab@suse.de> wrote: > > On Mär 15 2019, Yash Shah <yash.shah@sifive.com> wrote: > > > You need to make sure the period setting is passed via the > > conventional way in DT file. > > Example: > > pwmleds { > > compatible = "pwm-leds"; > > heartbeat { > > pwms = <&L45 0 10000000 0>; > > max-brightness = <255>; > > linux,default-trigger = "heartbeat"; > > }; > > }; > > I've now managed to build a working FSBL with that change, but that > didn't change anything. There is not even a heartbeat option in > /sys/class/leds/heartbeat/trigger any more.
Below is the copy of the pwm nodes in my DTS file:
L45: pwm@10020000 { compatible = "sifive,pwm0"; interrupt-parent = <&plic0>; interrupts = <42 43 44 45>; reg = <0x0 0x10020000 0x0 0x1000>; reg-names = "control"; clocks = <&prci 3>; #pwm-cells = <2>; }; L46: pwm@10021000 { compatible = "sifive,pwm0"; interrupt-parent = <&plic0>; interrupts = <46 47 48 49>; reg = <0x0 0x10021000 0x0 0x1000>; reg-names = "control"; clocks = <&prci 3>; #pwm-cells = <2>; }; pwmleds { compatible = "pwm-leds"; heartbeat { pwms = <&L45 0 10000000 0>; max-brightness = <255>; linux,default-trigger = "heartbeat"; }; };
The above works for me. I just noticed that I have been using pwm-cells = 2, instead of 3. Maybe that is the problem here. I will suggest you test it on v11 patch in which I will fix this pwm-cells issue.
Thanks for pointing it out.
> > Andreas. > > -- > Andreas Schwab, SUSE Labs, schwab@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different."
| |