andy_n Posted December 29, 2018 Share Posted December 29, 2018 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 Link to comment Share on other sites More sharing options...
andy_n Posted December 29, 2018 Author Share Posted December 29, 2018 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 Link to comment Share on other sites More sharing options...
martinayotte Posted December 29, 2018 Share Posted December 29, 2018 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 ... Link to comment Share on other sites More sharing options...
andy_n Posted December 29, 2018 Author Share Posted December 29, 2018 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. Link to comment Share on other sites More sharing options...
martinayotte Posted December 29, 2018 Share Posted December 29, 2018 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 ... Link to comment Share on other sites More sharing options...
andy_n Posted December 29, 2018 Author Share Posted December 29, 2018 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. Link to comment Share on other sites More sharing options...
martinayotte Posted December 29, 2018 Share Posted December 29, 2018 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 Link to comment Share on other sites More sharing options...
Recommended Posts