ACT Led and SDC1


#1

Hey there,
I would like to have an Act Led on my Lichee PI Zero, like on the Raspberry PI, how can I implement that?
And I would like to connect a second SD-Card to my Lichee PI Zero on SDC1, does Linux automaticly recognizes the second SD-Card?


#2

Did you ever figure these out? I am interested in doing the same, please let me know if you solve it =)


#3

I got the second SD card working, it wasn’t that hard, thanks to the device tree.
But I’m still struggling with the act led…
I successfully compiled the kernel to feature a led under /sys/class/leds , but I don’t know how to assign the correct GPIO Port. I would like to change the GPIO Pin from PG0 to PB4 but how do I do that?

Snippet from sun8i-v3s-licheepi-zero.dts:

leds {
	compatible = "gpio-leds";

	act_led {
		label = "act_led:green:usr";
		gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
		linux,default-trigger = "ide-disk";
		default-state = "off";
	};

#4

I don’t know if someone still needs this information, but I finally figured it out:

gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */

The 6 stands for the GPIO Bank G and the 0 for the specific GPIO on that GPIO Bank
GPIO Bank B = 1
GPIO Bank C = 2
GPIO Bank D = 3
GPIO Bank E = 4
GPIO Bank F = 5
GPIO Bank G = 6