Memory addresses of GPIO pins
#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


Messages In This Thread
Memory addresses of GPIO pins - by AckRite - 10-22-2018, 03:38 AM
RE: Memory addresses of GPIO pins - by dkryder - 10-22-2018, 06:01 AM
RE: Memory addresses of GPIO pins - by AckRite - 10-22-2018, 03:44 PM
RE: Memory addresses of GPIO pins - by AckRite - 10-23-2018, 03:18 PM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)