Page 2 of 2

Re: using I2C on openwrt 19.07

Posted: Tue Mar 01, 2022 4:04 pm
by Vonger
VoCore2 has hardware I2C
You can simply apply that i2c patch for es8388 and i2c will work. ES8388 is a chip based on it.

Re: using I2C on openwrt 19.07

Posted: Sat Apr 09, 2022 12:00 am
by docbee
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

Re: using I2C on openwrt 19.07

Posted: Tue Apr 12, 2022 1:56 am
by Vonger
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.

Re: using I2C on openwrt 19.07

Posted: Sun Apr 17, 2022 10:37 am
by docbee
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)?

Re: using I2C on openwrt 19.07

Posted: Wed Apr 20, 2022 12:57 am
by Vonger
21.04.2 still need to patch, default in firmware it is not enabled.
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.

Re: using I2C on openwrt 19.07

Posted: Thu Apr 21, 2022 7:51 pm
by docbee
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.
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│ │