enable i2c at u-boot for NanoPi Neo2


rlu
 Share

0

Recommended Posts

Armbian is a community driven open source project. Do you like to contribute your code?

I’ve done this and in Linux I can access the i2c0, but I want to access it in u-boot.

And i'm stuck there.

I added the following code into the sun50i-h5-nanopi-neo2.dts, but now I see the i2c bus, but it is shown as Bus -1 and I can't access it

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins>;
	status = "okay";
};

 

Link to post
Share on other sites

16 minutes ago, rlu said:

but I want to access it in u-boot

Why do you need i2c0 in u-boot itself ?

You will need to compile a u-boot yourself with CONFIG_I2C0_ENABLE=y in the board defconfig.

 

EDIT : In the current v2018.05, I'm only seeing 2 boards that have it :

cache/sources/u-boot/v2018.05/configs/Colombus_defconfig:CONFIG_I2C0_ENABLE=y
cache/sources/u-boot/v2018.05/configs/Cubietruck_plus_defconfig:CONFIG_I2C0_ENABLE=y

 

Link to post
Share on other sites

I compiled u-boot myself and added the CONFIG_I2C0_ENABLE=y to the defconfig.

After that I wasn't able to see the i2c0 in u-boot.

then I added the code above and now I see the i2c bus. But I can't access it, because it is shown as Bus -1.

 

At the moment it is only an exercise to get common with u-boot. Later I want to get dual boot via u-boot

Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

0