rlu Posted November 8, 2018 Posted November 8, 2018 Hi, I tried to enable the i2c in u-boot by using the config flags shown in the Readme. But I had no success. What do I miss?
martinayotte Posted November 8, 2018 Posted November 8, 2018 49 minutes ago, rlu said: I tried to enable the i2c in u-boot Do you mean adding DT overlays in /boot/armbianEnv.txt ? Simply add a line "overlays=i2c0 i2c1" in /boot/armbianEnv.txt
rlu Posted November 8, 2018 Author Posted November 8, 2018 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"; };
martinayotte Posted November 8, 2018 Posted November 8, 2018 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
rlu Posted November 8, 2018 Author Posted November 8, 2018 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
martinayotte Posted November 8, 2018 Posted November 8, 2018 2 hours ago, rlu said: At the moment it is only an exercise to get common with u-boot. Later I want to get dual boot via u-boot But in what dual boot requires I2C ?
rlu Posted November 9, 2018 Author Posted November 9, 2018 The I2C is for enabling a Bakebit Oled for Boot, so that I later can select which OS I want to use from my dual boot
martinayotte Posted November 9, 2018 Posted November 9, 2018 7 hours ago, rlu said: The I2C is for enabling a Bakebit Oled Ah ! Ok !
Recommended Posts