Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Change GPIO boot state on OPI ONE

Featured Replies

Hello

Pin A18 is HIGH when OPI ONE boots but I want to change OPI ONE pin A18 to LOW. How could I do this?

Mainline or legacy?

 

In the legacy kernel, this is handled by the fex file during boot.

 

There are three sections in the .fex where you can set the GPIO states, I'm currently researching which one is the preferred way.

 

1)

[boot_init_gpio]
used = 1
gpio0  =  port:PL07<1><default><default><0>
gpio1  =  port:PG11<1><default><default><1>

The GPIO pin configuration is defined in the fex guide http://linux-sunxi.org/Fex_Guide#Port_Definitions

tl;dr: the first <n> is the direction, the last <n> is the value.

 

2)

[gpio_init]
pin_1 = port:PA16<1><default><default><1>
pin_2 = port:PG04<1><default><default><1>
pin_4 = port:PL07<0><default><default><default>

3)

 

[gpio_para]
gpio_used = 1
gpio_num = 2
gpio_pin_1 = port:PG00<0><default><default><default>
gpio_pin_2 = port:PG01<0><default><default><default>

This is used by the SUNXI_GPIO kernel module, which seems to be deprecated.

Interestingly, the string boot_init_gpio isn't anywhere to be found in my orangepiplus' kernel. It probably won't work.

 

edit: but then again, "gpio_init" isn't anywhere either

Sorry, I mixed my own problem with yours.

 

The answer to your question: the Orange Pi One has the I2C (twi) SCL on PA18. I don't know if the pullup resistor is internal or external. If it is internal, then disabling the I2C peripheral should also disconnect the resistor.

Otherwise you want to set that GPIO pin to low, you will have to disable the I2C device in the fex file, then somehow initialize the GPIO to a low state at boot. I don't know how to do this yet, my solutions don't work.

  • Author
On 2/14/2018 at 6:42 PM, PCBela said:

Sorry, I mixed my own problem with yours.

 

The answer to your question: the Orange Pi One has the I2C (twi) SCL on PA18. I don't know if the pullup resistor is internal or external. If it is internal, then disabling the I2C peripheral should also disconnect the resistor.

Otherwise you want to set that GPIO pin to low, you will have to disable the I2C device in the fex file, then somehow initialize the GPIO to a low state at boot. I don't know how to do this yet, my solutions don't work.

Thank you dear

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.