moonki123 Posted April 29, 2017 Posted April 29, 2017 Hi martinayotte I have question ! can you reply for me? I can't use i2c in orangepi zero plus H5 My OS is Ubuntu I heard you made your own style kernel so you can detect i2c pin Can you share your method ?
martinayotte Posted April 29, 2017 Posted April 29, 2017 By default, I2C buses are not enabled in the main DT, except for the s_i2c . To enable other i2C buses, you need to add overlays in the /boot/armbianEnv.txt overlays=i2c0 i2c1 i2c2 Then, reboot. After you will have 4 buses in /dev/i2c-*. You can then scan the buses with "i2cdetect -y n", where "n" is the bus number.
moonki123 Posted April 29, 2017 Author Posted April 29, 2017 before i installed libi2c-dev, i2c-tools, python-smbus anyway i tried add overlays but it's not work and the message is Could not open file '/dev/i2c-0' or '/dev/i2c/0': NO such file or directory i can't see i2cbuses what should i do?
martinayotte Posted April 29, 2017 Posted April 29, 2017 Are you using Armbian Mainline build or a crappy BSD from manufacturer ?
moonki123 Posted April 29, 2017 Author Posted April 29, 2017 is it not good ? BSD ? now i'm using Ubuntu16.04 OS download in Orangepi Site http://www.orangepi.org/downloadresources/orangepizeroplus2H5/2017-03-30/orangepizeroplus2H5_989b97fd5964217f.html
martinayotte Posted April 29, 2017 Posted April 29, 2017 BSD is not using DeviceTree DT, it is using FEX/BIN. So, you will need to use bin2fex to decompile script.bin (after having done a backup first), edit the the resulting script.fex to enable I2C buses, and recompile using the fex2bin into script.bin. But be aware that people on Armbian forum isn't inclined to give much support of builds that are not from Armbian, we consider BSD as crappy builds !
zador.blood.stained Posted April 29, 2017 Posted April 29, 2017 17 minutes ago, martinayotte said: BSD is not using DeviceTree DT, it is using FEX/BIN. 3.10.x BSP kernel (A64 and H5) uses DT too, so editing the DT is required assuming I2C drivers and DT I2C nodes are correctly set up.
martinayotte Posted April 29, 2017 Posted April 29, 2017 I must admit that I didn't verify which kernel was present in the above mentioned BSD image, file title doesn't mentioned kernel number, and I don't want to waste download just to figure out ... Maybe @moonki123 could tell us by typing "uname -a" ...
tkaiser Posted April 30, 2017 Posted April 30, 2017 15 hours ago, moonki123 said: now i'm using Ubuntu16.04 OS download in Orangepi Site The OS images you can download there are based on Allwinner's 3.10.65 BSP kernel (not BSD, that's something different). I wouldn't expect that anything exceeding basic functionality works there (on OPi PC 2 for example still no voltage regulation functioning with this BSP kernel since the guy doing all the work seems not to be able to figure out how). In case you want to explore this stuff, take released schematics, get familiar with dtc (device-tree-compiler) and kernel configs and check what had to be done to get Pine64 BSD kernel ready for such stuff one year ago (it's the same kernel) eg. Martin's pull requests here: https://github.com/longsleep/linux-pine64/pull/17
martinayotte Posted April 30, 2017 Posted April 30, 2017 Quote BSP kernel (not BSD, that's something different) You're right, sometime, I'm suffering of dyslectic ...
Recommended Posts