Alireza Posted February 8, 2018 Posted February 8, 2018 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?
DjangoFingers Posted February 14, 2018 Posted February 14, 2018 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.
DjangoFingers Posted February 14, 2018 Posted February 14, 2018 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
DjangoFingers Posted February 14, 2018 Posted February 14, 2018 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.
Alireza Posted February 22, 2018 Author Posted February 22, 2018 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
Recommended Posts