PINE64
+LTS/SOPINE Clusterboard, U-Boot, PL7 LED - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Pine A64 Hardware, Accessories and POT (https://forum.pine64.org/forumdisplay.php?fid=32)
+---- Forum: Pi2, Euler and Exp GPIO Ports (https://forum.pine64.org/forumdisplay.php?fid=34)
+---- Thread: +LTS/SOPINE Clusterboard, U-Boot, PL7 LED (/showthread.php?tid=13359)



Clusterboard, U-Boot, PL7 LED - Pine - 03-09-2021

Greetings,

U-Boot has a board-specific method with signature

Code:
void show_boot_progress(int val);

Various stages of U-Boot SPL and full U-Boot call this method with a known int to signal the current boot stage.

I would like to activate PL7 on the SOPINE clusterboard which has an LED attached on certain checkpoints in booting.

My question is, does anyone have experience with low-level GPIO registers/memory and knows how to achieve this? We can't use syntactic sugar like the following

Code:
gpio_direction_output(PL7_GPIO, 1);
gpio_set_value(PL7_GPIO, 1);

because the GPIO and DM (driver model) systems are not initialized at power-on yet (and I encounter an infinite loop deep in U-Boot trying to enumerate non-initialized hardware).

I understand the pin number for PL7 is 359 from ([L - A] * 32) + 7.

A solution using one of

Code:
writel(...); or
setbits_le32(...)

would be a probable goal. Any ideas?