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.

u-boot with I2C

Featured Replies

 

I had it and lost it: u-boot with I2C. I did not write down how I did it (was heavy) :(
Tried to build yourself again: does not work.
u-boot-mizi.bin does not want to boot.

 

For 2 days I try to find the solution. Google has already blocked me ;)

 

Can somebody help? I need i2c directly, after power on, to read FRAM and set relays. 

Programming in Linux is enjoyable but system administration is horrible.

 

Thanks

  • Author
4 hours ago, andy_n said:

 

I had it and lost it: u-boot with I2C. I did not write down how I did it (was heavy) :(
Tried to build yourself again: does not work.
u-boot-mizi.bin does not want to boot.

 

For 2 days I try to find the solution. Google has already blocked me ;)

 

Can somebody help? I need i2c directly, after power on, to read FRAM and set relays. 

Programming in Linux is enjoyable but system administration is horrible.

What am I doing:

 

git clone https://github.com/hsdenx/u-boot-i2c.git

u-boot/make orangepi_zero_defconfig

u-boot/make

 

u-boot/export card=/dev/mmcblk0
u-boot/export p=p
u-boot/dd if=u-boot-sunxi-with-spl.bin of=${card} bs=1024 seek=8

reboot = not booting

 

I'm tried this  with git://git.denx.de/u-boot.git: not working.

 

What am I doing wrong?

 

4 hours ago, andy_n said:

 

Thanks

 

18 minutes ago, andy_n said:

What am I doing wrong?

There is no I2C node in DT :  https://github.com/hsdenx/u-boot-i2c/blob/master/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts

 

Also, you probably need to add CONFIG_DM_I2C in this file : https://github.com/hsdenx/u-boot-i2c/blob/master/configs/orangepi_zero_defconfig

 

... and maybe more, such as porting i2c-sun6i-p2wi.c from Kernel into U-Boot ...

Maybe you can try to use software bitbanging using CONFIG_DM_I2C_GPIO ...

  • Author

Thanks martinayotte,

 

I2C was working (in u-boot-mizi.bin not in u-boot-i2c!!!) but SD Card can not boot with Armbian after replacing U-Boot.

18 minutes ago, andy_n said:

I2C was working ( in any .bin - I tied so many) but SD Card can not boot with Armbian after replacing U-Boot.

I'm not sure to understand you : do you mean that this "hsdenx" u-boot-i2c is incompatible with Armbian ?

Maybe you should try the Armbian build process and tweak it to met your I2C requirement ...

 

  • Author

Sorry martinayotte,

 

u-boot-i2c  is working but w/o i2c!?

u-boot-mizi.bin has i2c working but not compatible with Armbian (OpenWrt)...

 

Soft i2c in u-boot, is it possible?

 

I've build u-boot with .dts and board.c changes and didn't note how - so stupid.

 

 

 

 

33 minutes ago, andy_n said:

Soft i2c in u-boot, is it possible?

Of course, with CONFIG_DM_I2C_GPIO, although I've never tried myself ...

https://github.com/hsdenx/u-boot-i2c/blob/master/drivers/i2c/Kconfig#L66

 

But, then, the i2C DT node would be a bit different since you need to define the GPIO pins been used :

https://github.com/hsdenx/u-boot-i2c/blob/master/doc/device-tree-bindings/i2c/i2c-gpio.txt

 

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.