Use BPI p2-zero pins 27,28 as gpio

I tryed to control BPI GPIOs by this code but I got some errors while setting pins 27, 28 as output. error: ValueError: The channel sent is invalid on a Raspberry Pi

Is it possible to use this pins as GPIO?

pin 27, 28 are set as i2c1 functions, two ways to change them to normal gpio,

  1. modify sunxi-pack/sun8iw7p1/configs/BPI-M2Z-720P/sys_config.fex, set property twi1_used = 0 in twi1 node. then rebuild the bsp code and update to image.

  2. Update the “twi1_used” propery in uboot command line via fdt command, please refer to this guide for how to use fdt command.

Thanks for your reply :pray: I am trying 2nd method and I read mentioned link, but now I don’t know where can I update “twi1_used”. Thanks in advance