U-boot seems not support in u-boot (2020.7_22)

Hi Robert,

The u-boot is built and flashed with dd into BBBw. The version is
ver=U-Boot 2020.07-00442-g186529953f (Jul 22 2020 - 09:59:50 -0400)

But i2c seems not available:

i2c - I2C sub-system

Usage:
i2c bus [muxtype:muxaddr:muxchannel] - show I2C bus info
i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum
i2c dev [dev] - show or set current I2C bus
i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device
i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device
i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)
i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)
i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)
i2c probe [address] - test for and show device(s) on the I2C bus
i2c read chip address[.0, .1, .2] length memaddress - read to memory
i2c write memaddress chip address[.0, .1, .2] length [-s] - write memory
to I2C; the -s option selects bulk write in a single transaction
i2c flags chip [flags] - set or get chip flags
i2c olen chip [offset_length] - set or get chip offset length
i2c reset - re-init the I2C Controller
i2c speed [speed] - show or set I2C bus speed
=> i2c probe
No I2C bus selected

Anything I missed?

Thank You,

David

Hi @dzhou, you need to select the bus before you probe:

This is on a BeagleBone AI, so your address’s will be a little different.

=> i2c probe
No I2C bus selected
=> i2c dev 0
Setting bus to 0
=> i2c probe
Valid chip addresses: 41 47 58 59 5A 5B 78

Regards,

Hi Robert,

I did
i2c probe 0
No I2c bus selected

i2c dev 0
setting bus to 0
i2c probe 0
Valid chip addresses:

Regards,

David

Hi Robert,

I remembered there is some firmware code needed to be downloaded for u-boot?
(I rebuilt u-boot from source, and flashed with dd command. )

Regards
david

No firmware required for u-boot…

Just grabbed a BBBW testing now…

Regards,

So our version:

=> version
U-Boot 2019.04-00002-g23f263cc3f (Jul 24 2020 - 16:33:55 -0500), Build: jenkins-github_Bootloader-Builder-141

arm-linux-gnueabihf-gcc (Linaro GCC 6.5-2018.12) 6.5.0
GNU ld (Linaro_Binutils-2018.12) 2.27.0.20161229
=> i2c dev 0
Setting bus to 0
=> i2c probe 
Valid chip addresses: 24 34 50

That version is good. The build 2020-07 ( I built from source code), I have the problem.

Thank you,
David

That was just for reference. :wink:

So built top of mainline u-boot:

=> version
U-Boot 2020.10-rc1 (Aug 10 2020 - 15:07:50 -0500)

arm-linux-gnueabihf-gcc (Linaro GCC 6.5-2018.12) 6.5.0
GNU ld (Linaro_Binutils-2018.12) 2.27.0.20161229
=> i2c dev 0
Setting bus to 0
=> i2c probe
Valid chip addresses: 24 34 50

It’s just top of u-boot with the target: am335x_evm_defconfig

U-Boot SPL 2020.10-rc1 (Aug 10 2020 - 15:07:50 -0500)
Trying to boot from MMC1


U-Boot 2020.10-rc1 (Aug 10 2020 - 15:07:50 -0500)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
WDT:   Started with servicing (60s timeout)
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... Unable to use mmc 0:1... <ethaddr> not set. Validating first E-fuse MAC
Net:   Could not get PHY for ethernet@4a100000: addr 0
eth2: ethernet@4a100000, eth3: usb_ether
Hit any key to stop autoboot:  0 
=> version
U-Boot 2020.10-rc1 (Aug 10 2020 - 15:07:50 -0500)

arm-linux-gnueabihf-gcc (Linaro GCC 6.5-2018.12) 6.5.0
GNU ld (Linaro_Binutils-2018.12) 2.27.0.20161229
=> i2c dev 0
Setting bus to 0
=> i2c probe
Valid chip addresses: 24 34 50

Regards,

Hi Robert,

It may be caused by Linaro GCC 7.5?

I will try a different version.

David

Just retry with the top of the tree, it looks like Tom just tagged, v2020.10-rc2 a few minutes ago…

A quick search really doesn’t show any relevant i2c changes…

I can’t find the message, but a few years ago there was a bug hence why i’m still on gcc-6, that should be long fixed now.

Regards,

I will try U-Boot 2020.10-rc1, or 2019 one, which demonstrated working. If it still has issue, then it is related to the gcc tool or something else. But it shall not be related to the source code.

BTW: The mainline needs extlinux.conf to boot Linux Kernel. But to add extlinux.conf file needs sudo rights and some manual commands, after the image is flashed using balena Etcher. Is there a way to add extlinux/extlinux.conf into the .xz image file before flashing using Etcher. That way it can eliminate a step for production.

Thank you,

David

Hi Robert,

I checked out version 2019-04 rc2 version of u-boot, and built and loaded into the same BBBw:

image

i2c is working.
It seems to me that i2c issue may be related the source code with version dated 2020-07.

To me, I have no issue to use 2019 version.

Regards,
David