Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

How to set pull-up of the FirePrime's GPIOs ?

410

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
410

How to set pull-up of the FirePrime's GPIOs ?

Posted at 2/2/2018 20:43:45      View:2669 | Replies:0        Print      Only Author   [Copy Link] 1#
Hi,

I want to use the pins 23, 25, 27 and 29 of the FirePrime S as GPIO (GPIO1 A5, A4, A2 and A1). For my project, I need 2 IN and 2 OUT so I decided to use A1 and A2 as outputs and A4 and A5 as inputs.

For now, I am able to export these pins from user space (echo 33 > /sys/class/gpio/export) and the outputs work like a charm but I can't set the pull-up resistor for the inputs.

I tried to change:
  1. rockchip,pull = <VALUE_PULL_DEFAULT>;
Copy the code
to
  1. rockchip,pull = <VALUE_PULL_UP>;
Copy the code
in the pinctrl node for GPIO1_A1...GPIO1_A5 but it didn't change anything.

Then I tried to control the GPIO from user space using mmap (/dev/mem) but in the Technical Reference Manual I couldn't find the registers for setting pull up, pull down or pull none. Just, in chapiter 5 (grf), I found the registers for enable/disable pull up/down.

Is it possible to change this setting ? How to proceed ?

Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list