PINE64
How to control the SOPINE UART and SPI pins as GPIO? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64-LTS / SOPINE Compute Module (https://forum.pine64.org/forumdisplay.php?fid=66)
+--- Forum: General Discussion on PINE A64-LTS / SOPINE (https://forum.pine64.org/forumdisplay.php?fid=67)
+--- Thread: How to control the SOPINE UART and SPI pins as GPIO? (/showthread.php?tid=6440)



How to control the SOPINE UART and SPI pins as GPIO? - Pine - 08-21-2018

The StackOverflow community took a look at the schematic for the 20-pin header beside the SOPINE modules on the clusterboard and said that it should be possible to configure the SOPINE hardware to use the UART and SPI pins as GPIO. One user commented:

"Most MCUs and SoCs have multiple functions on each pin. The SPI 'pins' are just one of those alternative functions. As long as you're not using SPI, and don't have it configured, those pins are just plain GPIO pins"

I'd like one of them to operate a simple low-power LED that is either on or off, controlled by software, to indicate busy status (not if the board is powered on or off). Any ideas how to get started?


RE: How to control the SOPINE UART and SPI pins as GPIO? - martinayotte - 08-22-2018

Make a backup of current DTB, decompile this DTB into a DTS using dtc compiler, edit DTS to remove any reference to unused SPIs/UARTs, not only their nodes, but also their pins in PinCtrl, save and recompile this modified DTS into DTB, and reboot. All those pins will be defaulted as GPIOs.