0
sunzone

I2C control in u-boot: Orange Pi Zero

Recommended Posts

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

 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0