VoCore2 has hardware I2C
You can simply apply that i2c patch for es8388 and i2c will work. ES8388 is a chip based on it.
using I2C on openwrt 19.07
- Vonger
- Posts: 885
- Joined: Sun Oct 19, 2014 6:00 am
- docbee
- Posts: 34
- Joined: Wed Nov 02, 2016 9:15 am
Re: using I2C on openwrt 19.07
Did you read my posting?
1) When I apply the two es8388 patches the resulting kernel image will be stuck in and endless loop caused by a kernel panic
- Vonger
- Posts: 885
- Joined: Sun Oct 19, 2014 6:00 am
Re: using I2C on openwrt 19.07
Just check github.com/vonger/vocore2, we have every patch for i2c and other driver for different openwrt version already, that can be a reference.
And you can ignore es8388 patch if you do not use sound card, for me it works. every patch is not related so you can apply some of them.
And you can ignore es8388 patch if you do not use sound card, for me it works. every patch is not related so you can apply some of them.
- docbee
- Posts: 34
- Joined: Wed Nov 02, 2016 9:15 am
Re: using I2C on openwrt 19.07
I would like to give 21.02 a chance. I don't see any vocore2 related patches for SPI and I2C operation. Can I assume from that that it works fine out of the box (when using the kernel modules that come along with the distro)?
- Vonger
- Posts: 885
- Joined: Sun Oct 19, 2014 6:00 am
Re: using I2C on openwrt 19.07
21.04.2 still need to patch, default in firmware it is not enabled.
in target/linux/ramips/dts/mt7628an_vocore_vocore2.dts
add
this is in order to enable i2c in device tree, so kernel can 'see' i2c device.
also need to enable driver in menuconfig, Kernel modules => I2C Support => kmod-i2c-mt7628
then after compile this firmware, you can use i2c-tools operate on your i2c device.
in target/linux/ramips/dts/mt7628an_vocore_vocore2.dts
add
- Code: Select all
&i2c {
status = "okay";
};
this is in order to enable i2c in device tree, so kernel can 'see' i2c device.
also need to enable driver in menuconfig, Kernel modules => I2C Support => kmod-i2c-mt7628
then after compile this firmware, you can use i2c-tools operate on your i2c device.
- docbee
- Posts: 34
- Joined: Wed Nov 02, 2016 9:15 am
Re: using I2C on openwrt 19.07
I can confirm that I2C hardware support is not working with 19.07.3. Puhh, that was a long journey.
It is important to have the 045-patch for 19.07 regarding I2C installed (Link: https://github.com/Vonger/vocore2/tree/ ... enwrt.1907) and to select when building the kernel as follows.
It is important to have the 045-patch for 19.07 regarding I2C installed (Link: https://github.com/Vonger/vocore2/tree/ ... enwrt.1907) and to select when building the kernel as follows.
- Code: Select all
.config - OpenWrt Configuration
> Kernel modules > I2C support ───────────────────────────────────────────────
┌────────────────────────────── I2C support ──────────────────────────────┐
│ Arrow keys navigate the menu. <Enter> selects submenus ---> (or empty │
│ submenus ----). Highlighted letters are hotkeys. Pressing <Y> │
│ includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to │
│ exit, <?> for Help, </> for Search. Legend: [*] built-in [ ] │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ <*> kmod-i2c-core................................................│ │
│ │ < > kmod-i2c-algo-bit............................. I2C bit-bang│ │
│ │ < > kmod-i2c-algo-pca................................ I2C PCA 9│ │
│ │ < > kmod-i2c-algo-pcf................................ I2C PCF 8│ │
│ │ < > kmod-i2c-gpio.................................. GPIO-based │ │
│ │ < > kmod-i2c-gpio-custom........................ Custom GPIO-base│ │
│ │ <*> kmod-i2c-mt7628................................. MT7628/88 I2│ │
│ │ < > kmod-i2c-mux................................ I2C bus multiple│ │
│ │ <*> kmod-i2c-smbus........................... SMBus-specific prot│ │
│ │ < > kmod-i2c-tiny-usb................................... I2C Tiny│ │
Who is online
Users browsing this forum: No registered users and 7 guests