Memory addresses of GPIO pins
#1
Hi everyone,

I'm trying to read GPIO output and using Rock64's RPi module is too slow as it is using file system.
Does anyone know memory addresses of those pins? I'd like to map directly and hopefully it will be faster.
  Reply
#2
probably need to get the rock64 TRM. http://opensource.rock-chips.com/wiki_Main_Page
  Reply
#3
(10-22-2018, 06:01 AM)dkryder Wrote: probably need to get the rock64 TRM. http://opensource.rock-chips.com/wiki_Main_Page

Thanks a lot, that's looks like something I can use!
  Reply
#4
So, just a rundown of steps that I need to perform in order to do mmap operations on GPIO for Rock64:

1. Select which GPIO pin I want to use (I need a full name, like GPIO3_A4)
2. Look up 18.5 "GPIO interface description" for which IOMUX bit I'll need to set (In case of GPIO3_A4 - GRF_GPIO3AL_IOMUX)
3. Look that IOMUX in 3.3.3 "Detail Register Description" and GPIO3A[4] for details of which bit to set.
4.Mmap to GRF memory (I can get offset from TPM Memory Mapping section, so address is probably FF10_0000, 64K of memory)
5. Offset to memory of that IOMUX, setup IOMUX to allow writes to bits 14:12 (bits specific to GPIO3A[4])
6. Write 000 to 14:12 to set up GPIO3A[4] to be accessible for GPIO operations
7. Get the offset of GPIO bank I'm about to use (TPM Memory Mapping section, in case of GPIO3 it's probably FF24_0000, 64K of memory)

And then the last part I'm not really sure about is where exactly do I set direction and get/set value of that pin, but it has probably to do with section 18.5.

Anyone willing to tell me I'm on the right track?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Change Video Memory Amount gazhow64 0 971 12-10-2022, 04:12 PM
Last Post: gazhow64
  need a dts file to set some pins as pulldown interrupts in kernel using a DTO dkebler 0 2,233 02-05-2020, 10:58 PM
Last Post: dkebler
  Gpio error wile using GPIOtest.py Aditya Rastogi 0 2,108 01-31-2019, 02:41 AM
Last Post: Aditya Rastogi
  GPIO indicators via DTB Mentaluproar 0 1,655 07-10-2018, 04:58 PM
Last Post: Mentaluproar
  Onboard LEDs connected to the RK805-1 out1 and out2 GPIO pins prof7bit 8 7,702 03-03-2018, 02:58 PM
Last Post: prof7bit
  What is name of gpio hardware on a rock64? gene83 6 7,412 10-05-2017, 07:57 AM
Last Post: gene83

Forum Jump:


Users browsing this thread: 1 Guest(s)