We are want to export the gpio3_10 and gpio3_08 in /sys/class/gpio in kernel in ls2088ardb board ,can we know the procedure or steps to be followed. we are using LSDK 18.09 souce code .
we are using ls2088ardb board and we are able to glow the gpio3_10 and gpio0_08 through devmem command with the value 0x02a08000.
But we dont know the value to turn off and also what is the significance of this data(0x02a08000).
Also need the reply for the above question.
Hello latha G,
First gpio3_10 and gpio3_08 are multiplexed with UART1_CTS_B and UART1_RTS_B, please configure RCW[UART_BASE] as 00 to configure 6 GPIO pins.
LS2088 platform could use GPIO driver for PowerPC architecture. In Linux Kernel, please configure "CONFIG_ARCH_LAYERSCAPE=y" then configure "CONFIG_GPIO_MPC8XXX=y" in Linux Kernel configuration file and rebuild Kernel image.
After boot up Linux system, you will get similar information as the following.
root@localhost:~# ls /sys/class/gpio/export gpiochip384 gpiochip416 gpiochip448 gpiochip480 unexport
root@localhost:~# cat /sys/kernel/debug/gpio GPIOs 384-415, parent: platform/2330000.gpio, 2330000.gpio:
GPIOs 416-447, parent: platform/2320000.gpio, 2320000.gpio:
GPIOs 448-479, parent: platform/2310000.gpio, 2310000.gpio:
GPIOs 480-511, parent: platform/2300000.gpio, 2300000.gpio:
GPIO424(416+8) corresponds with GPIO3_8, GPIO426(416+10) corresponds with GPIO3_10.
root@localhost:~# cd /sys/class/gpio/root@localhost:/sys/class/gpio# echo 424 > exportroot@localhost:/sys/class/gpio# echo 426 > exportroot@localhost:/sys/class/gpio# lsexport gpio424 gpio426 gpiochip384 gpiochip416 gpiochip448 gpiochip480 unexportroot@localhost:/sys/class/gpio#
root@localhost:/sys/class/gpio# echo "out" > gpio424/directionroot@localhost:/sys/class/gpio# echo 1 > gpio424/valueroot@localhost:/sys/class/gpio# ls gpio424/active_low device direction edge subsystem uevent value
For more detailed information about GPIO on ARMv8 platforms, please refer to LS1043 GPIO support in Linux SDK .
Thank you for the reply.
We tried and we are able to control the led.
Now we are trying to control the led through devmem command.
we are using ls2088ardb board and we are able to glow the gpio3_10 and gpio3_08 through devmem command with the value 0x02a08000.
When gpio3_10 is on we are able to control single led but when both are on ,when we off one both gets off and both gets on at a time.we need to control single led.
Retrieving data ...