+LTS/SOPINE how to change for init status of gpio
#1
i use the A64(512MB).
i knew the status of gpio in testing that pin 26(pi-2) is high in boot.
i wanna change it default low in boot.

Plz tell me to find a way.

Thanks.
  Reply
#2
You can find the default hardware state of pins in the A64 datasheet, then it depends what is connected to the pins on the board (check schematics)... which pins are we talking about? The earliest point in time where you can change pin states is if you enable GPIO support in the u-boot SPL (secondary program loader)...
Come have a chat in the Pine A64 IRC channel >>
  Reply
#3
thanks for your reply.

i have a question about configuration compared the Raspberry pi.
raspberry pi can change the state of pin using the dtoverlay command in config.txt file.
Isn't it possible in A64?

In the Raspberry Pi, modify the config.txt file and it can change the state of pin high or low.
(ex. dtoverlay=lirc-rpi:gpio_out_=16,gpio_in_pin=17,gpio _in_pull=down)

if you know the way, reply plz.

Thanks.
  Reply
#4
The standard way to do it if you are ok with devicetree changes is to edit the board devicetree to override the default pin config. Keep in mind that there are two devicetrees, u-boot uses it's own and linux another - they are mostly the same, but not 100%, and you have to update both depending on how early you need your GPIO setup... check in the /boot folder for the Pine64 devicetree (dtb) file. You can convert that to text with dtc (device tree compiler), make your changes, and convert it back to dtb. The other option is to use the u-boot boot script to change the dtb on the fly - u-boot has the fdt read/write commands to do that...
Come have a chat in the Pine A64 IRC channel >>
  Reply
#5
thanks again, xalius.

Your explain mean changing the default pin config is two way.
I will do two way.

appreciate your advice.
  Reply
#6
I have two further questions.
I try to convert the dtb to dts. and check the dts file. but there is not about changing the status of default gpio.
so I didn't make it that you told me the one way.

and the other way is using a u-boot.
I have searched the way for installing a u-boot but I can't find the way.

Could you tell me the site of installing a u-boot in a64.
additionally, if you can check the first question, tell me the way plz.

Thanks.
  Reply
#7
Hi,

1.) Can you upload your dts to pastebin?

2.) For u-boot it depends which version you are using? Are you running BSP (Linux 3.10.x) or mainline (Linux 4.x.y)? What image are you using?
Come have a chat in the Pine A64 IRC channel >>
  Reply
#8
Thanks for quick answer.

1)I uploaded my dts file. I ask you to check the uploaded file.
https://pastebin.com/42YeC4yZ

2)My Linux version is 3.10.107-pine64.

Thanks.


Attached Files
.zip   sun50iw1p1-pine64.zip (Size: 13.21 KB / Downloads: 14)
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Battery status on panel? Zoidiano0 3 605 05-08-2017, 05:51 PM
Last Post: Zoidiano0

Forum Jump:


Users browsing this thread: 1 Guest(s)