sunzone Posted July 23, 2019 Share Posted July 23, 2019 Hi. I am trying to control an i2c device at the u-boot stage. i2c 0 bus is activated through /boot/armbianEnv.txt file After settings some i2c commands at /boot/boot.cmd i checked the i2c sdk and sda pins via an oscilloscope. But neither output a signal. i2c dev 0 i2c mw 0x3c 0x00 0xae I included above commands and tested. Can I know how to activate or use i2c at u-boot level? image: ARMBIAN 5.75 stable Ubuntu 18.04.2 LTS 4.19.38-sunxi Link to comment Share on other sites More sharing options...
Igor Posted July 23, 2019 Share Posted July 23, 2019 29 minutes ago, sunzone said: Can I know how to activate or use i2c at u-boot level? I haven't tried I2C in u-boot ... but in any case you need to recompile with enabled support for it. I am not sure if its enabled by default. Try this way: ./compile.sh CREATE_PATCHES="yes" and when you will be asked for changes go to sources/u-boot/v2019.04/ and run make menuconfig ... enable i2c, go out, save config and return to the build script and proceed. Install u-boot package from output/deb Then run armbian-config -> system -> intstall & update u-boot -> choose update u-boot ... reboot into new u-boot. You can do this also on your board. Cloning sources, applying patches, default config, enabling i2c, flashing bootloader with dd following by reboot. Link to comment Share on other sites More sharing options...
Recommended Posts