Hi Paul, > Am 05.07.2019 um 18:10 schrieb Paul Boddie <p...@boddie.org.uk>: > > On Friday 14. June 2019 11.13.16 H. Nikolaus Schaller wrote: >> >> And it should not be too difficult to find the relevant patches and >> forward-port them to mainline or simply add the missing LED nodes to the >> ci20.dts. I'll give it a try in the next days. > > I looked into this with the 5.1.8 kernel. The following configuration > settings > are required: > > CONFIG_LEDS_CLASS=y > CONFIG_LEDS_GPIO=y > CONFIG_LEDS_TRIGGERS=y > CONFIG_LEDS_TRIGGER_MTD=y > CONFIG_LEDS_TRIGGER_CPU=y > > With the device tree file, the following from 3.18 seems to be necessary > under > the / node: > > leds { > compatible = "gpio-leds"; > led3 { > gpios = <&gpc 0 0>; > linux,default-trigger = "cpu0"; > }; > led2 { > gpios = <&gpc 1 0>; > linux,default-trigger = "cpu1"; > }; > led1 { > gpios = <&gpc 2 0>; > linux,default-trigger = "nand-disk"; > }; > led0 { > gpios = <&gpc 3 0>; > linux,default-trigger = "mmc0"; > }; > }; > > With this, I can get led3 (cpu0) and led0 (mmc0) working. Maybe led1 (nand- > disk) works if the NAND flash is accessed, but I don't use it. The led0 > assignment could have been done as follows: > > sudo sh -c "echo 'mmc0' > /sys/class/leds/led0/trigger"
It seems that I have forgotten to announce that I have added similar patches in 5.2-rc5 a while ago to get the LEDs blink - and (untested) Infrared support: http://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/letux/dt-ci20 http://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/letux/mips_defconfig I did not yet backport to letux-4.19.x or letux-5.1.x. It was too low prio on my to-do list to get done. So I too your mail as a reminder and just have prepared it and it will appear with the next stable release build of LetuxOS kernels. You will get a letux-5.1.17 tree soon. > > Another thing with 5.1.8 is that the second core in the CPU (cpu1) is not > active. Oh really! I think there is no cpufreq-info driver for the jz4780 so I did not yet notice. > I don't know how that got broken: it's probably the usual breaking up > of functionality into morsels that upstream might like, with the rest getting > dumped over the side. This is something to discuss on the mips-creator mailing list. BR and thanks, Nikolaus _______________________________________________ Community mailing list Community@tinkerphones.org http://lists.goldelico.com/mailman/listinfo.cgi/community http://www.tinkerphones.org