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"

Another thing with 5.1.8 is that the second core in the CPU (cpu1) is not 
active. 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.

Paul
_______________________________________________
Community mailing list
Community@tinkerphones.org
http://lists.goldelico.com/mailman/listinfo.cgi/community
http://www.tinkerphones.org

Reply via email to