0
rlu

enable i2c at u-boot for NanoPi Neo2

Recommended Posts

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";
};

 

Share this post


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

 

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0