Gpio export

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Gpio export

2,841件の閲覧回数
latha_g
Contributor II

Hi Team,

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 .

ラベル(1)
0 件の賞賛
3 返答(返信)

2,495件の閲覧回数
latha_g
Contributor II

Hi Team,

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.

0 件の賞賛

2,494件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

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.

pastedImage_3.png

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:

pastedImage_5.png

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 > export
root@localhost:/sys/class/gpio# echo 426 > export
root@localhost:/sys/class/gpio# ls
export  gpio424  gpio426  gpiochip384  gpiochip416  gpiochip448  gpiochip480  unexport
root@localhost:/sys/class/gpio#

root@localhost:/sys/class/gpio# echo "out" > gpio424/direction
root@localhost:/sys/class/gpio# echo 1 > gpio424/value
root@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 .

Thanks,

Yiping

0 件の賞賛

2,494件の閲覧回数
latha_g
Contributor II

Hi Yiping,

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.

But we dont know the value to turn off and also what is the significance of this data(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.

0 件の賞賛