[April 23] Q4OS ver 2.7-r5 - 1080P Pinebook / Pinebook |[Feb 26] Recalbox beta v3.1- Rock64 |[Feb 26] Recalbox 190222- RockPro64 / Minimal Debian by mrfixit2001 - 190222 - RockPro64 |[Feb 26] Q4OS 2.7-r2 - Pinebook 1080P / Pinebook |[Feb 22] Batocera Linux 5.20-20190121- RockPro64 | [Feb 19] Manjaro KDE 19.02 / Manjaro LXQT 19.02 - Pinebook1080P / Pinebook | [Feb 19] Slackware Aarch64 Miniroot and XFCE 20190201 - RockPro

Project Inspiration | Get Started | IRC Logs | Forum Rules/Policy


Question on the RockPro64 RK3399 GPIOs...
#1
Photo 
Are the (4) groups of GPIOs A, B, C, D in the same 32-bit register?
Example:
GPIO1
3
1 0
[----D----][----C----][----B----][----A----]
7 4 1
I can toggle GPIO1A1, 4, 7 on/off but not GPIO1Bs.

TIA,
/Faradn

...Any way to set a fixed width font in this BBS?
Reply
#2
How are you planning on controlling the GPIO Devices ? Via the legacy /sys/class/gpio driver ?

I am currently trying to write a GPIO kernel driver to the new standard. There are a lot of anomalies in the documentation but I am composing a complete spreadsheet of the PMU/GRF Registers if thats how you where planning on doing it ?

I am almost finished.

There are 5 GPIO Banks supporting a total of 122 GPIO's only a few of which can be accessed by user space;
They all have PAD designation A,B,C,D each with its own IOMUX Register

gpio0 Allocated to PMU Registers as can be used for wake-up.
gpio1 Allocated to PMU Registers as can be used for wake-up.
gpio2 GRF Registers and used for SPI/12C/PMW etc as well as exposed GPIO
gpio3 GRF Registers and used for SPI/12C/PMW etc as well as exposed GPIO
gpio4 GRF Registers and used for SPI/12C/PMW etc as well as exposed GPIO
Reply
#3
Howdy,

Not using the /sys/class file IO method.
I'm mmap-ing the RK3399's IO and using address offsets
to read/write the IO. I've got the GPIO, I2C, SPI, 
I2S, & UART all mapped out. Whatever's available at
the 40-pin GPIO header is accessible via mmap'd IO.

Basically it's the methods used in the BCM2835 Library
for low-level IO. I've just translated the methods to 
work for an RK3399 instead of a BCM2835/7 that's used in 
a Pi 2/3B. 
https://www.airspayce.com/mikem/bcm2835/

So far so good...the methods work fine, I just can't get
GPIO3D[0]..[7] and GPIO4C[3]..[5] & GPIO4D[1]..[4]
to toggle. I'll have to check the schematic to verify
they're not used by any other devices.

/Faradn
Reply
#4
(04-10-2019, 06:02 PM)Faradn Wrote: Howdy,

Not using the /sys/class file IO method.
I'm mmap-ing the RK3399's IO and using address offsets
to read/write the IO. I've got the GPIO, I2C, SPI, 
I2S, & UART all mapped out. Whatever's available at
the 40-pin GPIO header is accessible via mmap'd IO.

Basically it's the methods used in the BCM2835 Library
for low-level IO. I've just translated the methods to 
work for an RK3399 instead of a BCM2835/7 that's used in 
a Pi 2/3B. 
https://www.airspayce.com/mikem/bcm2835/

So far so good...the methods work fine, I just can't get
GPIO3D[0]..[7] and GPIO4C[3]..[5] & GPIO4D[1]..[4]
to toggle. I'll have to check the schematic to verify
they're not used by any other devices.

/Faradn
I attach the spreadsheet ... its WIP as There are still a couple of anomalies that I am still looking into.


Attached Files
.xls   GPIORegisters.xls (Size: 70.5 KB / Downloads: 9)
Reply
#5
A momentous achievement!
Thank you.
Attached is what i"ve gleaned so far from 
theRK3399 Technical Reference Manual.


Now how to translate PI2/3B (BCM2835/7) GPIO pin numbers
to RK3399 GPIO pin numbers. Along with a function select
method.
/Faradn


Attached Files
.txt   rockpro64_gpio_mapping_01_032919.txt (Size: 15.47 KB / Downloads: 10)
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Need to access 4 RockPro64 UARTs via Pins. rhex 2 114 04-15-2019, 04:27 PM
Last Post: tllim
Question ROCKPro64 - power cable? skipper 2 66 04-13-2019, 06:26 AM
Last Post: skipper
  case for RockPro64 + PCI-E M.2 NVMe Card? AndyOfLinux 3 293 04-04-2019, 02:26 AM
Last Post: Hickson44
  rockpro64 13 megapixel camera Aycaramba 3 280 04-03-2019, 02:54 AM
Last Post: Vladislav
  RockPro64 UPS for in car use nJoy. 1 126 03-18-2019, 10:09 AM
Last Post: fender90
  Rockpro64 Sata Card kills itself jerry110 11 1,239 02-10-2019, 06:35 PM
Last Post: greentree
  Copper cooler for Rockpro64 battlenut 13 1,152 11-05-2018, 03:10 PM
Last Post: tuxd3v
  ROCKPro64 PCI-e to Dual SATA-II Interface Card and drive power frewind 2 563 07-28-2018, 07:47 AM
Last Post: frewind
  Available GPIOs on coming RockPro64 philw38 13 2,478 07-14-2018, 07:14 AM
Last Post: philw38
  RockPro64 and PINE64 WIFI Module Compatability sdwhwk 4 869 06-09-2018, 04:20 AM
Last Post: pfeerick

Forum Jump:


Users browsing this thread: 1 Guest(s)