I apply patch for SPI and its enable in u-boot, while giving command in u-boot > help its showing sspi and its enabled. but i need a command line for blinking LED , i try u-boot=> sspi 0:2.0 32 A
00000000
u-boot=> sspi 0:2.0 32 B
00000000
u-boot=> sspi 0:2.0 32 0
00000000
u-boot=> sspi 0:2.0 32 F
00000000 and i get this 00000000
i have one doubt only is there any led blinking or glowing process in sspi via gpio pins is it possible or what? and how its glow using command line or will anyone provided me a proper patch file for imx8mq source code for u-boot version U-Boot SPL 2020.04-5.4.70-2.3.2+g185bdaaaf5 and Linux version Linux version 5.4.70-2.3.2+ (oe-user@oe-host) (gcc version 9.2.0 (GCC)) .
I attached the patch file which i apply in my build so please take a look on it.
Thanks in advance.
Sorry, cannot do the job for you, i don't know your schematic. GPIO from userspace, if gpios are free, does not need any patch, should work quite well.
1) check your spi<->pgio converter is detected and gpios are available from userspace, seems yes
2) access them by export, supposing your led is connected to gpio24, by
echo 24 > /sys/class/gpio/export
echo out > /sys/class/gpio24/direction
echo 1 > /sys/class/gpio24/value
echo 0 > /sys/class/gpio24/value
thanks for the reply,
is there any specific patch file for this board(IMX8MQ) to access LED via spi or check whether i send you a patch file,that is correct one or not?
this is the print i get for spi and gpio.
(LED) 2023.10.13-05:54:40.811 <INFO> [LED_Init : 700] SPI-INFO : Mode(3), Bits/Word(8), Speed(10000 kHz)
(LED) 2023.10.13-05:54:40.811 <INFO> [LED_Init : 705] LED_Init_4
(GPIO) 2023.10.13-05:54:40.811 <INFO> [GPIO_Export : 118] /sys/class/gpio/export for GPIO[132]
(GPIO) 2023.10.13-05:54:40.811 <INFO> [GPIO_Export : 118] /sys/class/gpio/export for GPIO[125]
(GPIO) 2023.10.13-05:54:40.811 <INFO> [GPIO_Export : 118] /sys/class/gpio/export for GPIO[126]
(GPIO) 2023.10.13-05:54:40.811 <INFO> [GPIO_Export : 118] /sys/class/gpio/export for GPIO[11]
please verify the patchfile i provide. thanks in advance.