Clearfog CX LX2 i2c

Hi,

I am trying to access the ltc3882 sensor on the board via the /sys/class/hwmon interface on linux 5.2.21. I have added the dts file from the patches(lx2160a_build/patches at master · SolidRun/lx2160a_build · GitHub) for lx2160a-cex7 and the kernel compiles without an error.

After compilation I copied the dtb file generated to the /boot/ directory and set it to be used in the boot configuration (extlinux). I also enabled support for i2c and the said sensor in the kernel config options.

The kernel boots but I cannot see any devices listed nor any i2c buses.
How could I solve this?

Those devices are all hung off an i2cswitch so you need to have a driver for the switch and then you can access the different channels. Note that on newer CEX7 modules the ltc3882 is hard wired to read only mode.

Thank you for your reply.

I verified that the i2c and ltc3882 drivers are enabled but it still does not seem to recognize any i2c connections.

Is there any particular driver I should check for? Is there any other factor that may be causing the issue?

but do you have a driver for the i2c switch? NXP’s pca9547 needs a driver to change the channels it is accessing.

Yes, following is from my menuconfig.

  x                                                                                                                                                                                                            x
  x Symbol: I2C_MUX_PCA954x [=y]                                                                                                                                                                               x
  x Type  : tristate                                                                                                                                                                                           x
  x Prompt: NXP PCA954x and PCA984x I2C Mux/switches                                                                                                                                                           x
  x   Location:                                                                                                                                                                                                x
  x     -> Device Drivers                                                                                                                                                                                      x
  x       -> I2C support                                                                                                                                                                                       x
  x         -> I2C support (I2C [=y])                                                                                                                                                                          x
  x           -> I2C bus multiplexing support (I2C_MUX [=y])                                                                                                                                                   x
  x (7)         -> Multiplexer I2C Chip support                                                                                                                                                                x
  x   Defined at drivers/i2c/muxes/Kconfig:67                                                                                                                                                                  x
  x   Depends on: I2C [=y] && I2C_MUX [=y] && (GPIOLIB [=y] || COMPILE_TEST [=n])                    

Then each channel of the switch will be exposed as its own i2c bus. You will need to use the i2c bus device that is enumerated as third device off the mux.

I have enabled all device drivers for the devices on the i2c bus. There is still no bus or device visible under /sys/class/i2c-adapter (or i2c-dev).

The same is detected in another kernel(stock) but not here. The same config options have been enabled in both kernels in regards to I2C, which leads me to believe that the issue may be with the device tree files. However, they compile without issue as well. Checking their content, they also mention required i2c devices.

Is there anything particular I should look for?

I would check the logs to see if the drivers are failing for some reason.

The dmesg log don’t show any messages.

I compiled the drivers as modules and inserted them after booting the system separately as well, they are added successfully but there are no dmesg messages regarding that.

No connections are detected still.

Then most likely you have an issue with the device-tree you are using.

Hi,
I’m using LX2160ACEX7 and in my case I had to enable these configuration in menuconfig to use LTC3882 component:

  • Go to “Device drivers” then “Hardware Monitoring support”.
    => Include PMBus support.
  • Go to PMBus support and activate:
  • Linear Technologies LTC2978 and compatibles
  • Regulator support for LTC2978 and compatbles
  • Save and exit.

Without these configurations, lm-sensors couldn’t detect the LTC3882 component.
Hope it will help you.

Can you try it on a uefi file system.
Try it out?.

With the EFI firmware we are not exposing the devices behind the i2c mux, only a single channel with access to the eeproms. For the control you want we recommend using u-boot and device-tree.

Well so long as there is an eeprom access you can just write to those instead and the ltc388x should do what it reading from those?
Or does the regilators have headers?, that one could access instead of following that route?.

With recent revisions of the CEX7 board the LTC388x is no longer programmable. The write protection pin is hardwired to ground putting it in read only mode.

Is the ltc388x the same one that supplies to the cpu or is it the ltc 297x?.
If its the former its too bad cause the cpu is probably stock with whatever voltage you keep it at i was hoping an overvoltage and overclock would’ve been possible!.

It is the one that supplies the CPU. We only left the original early bird developer units unlocked for over-volting.

DAMN!, too bad then, but according to the ltc388x datasheet its possible to toggle its voltage output range by, using external resistors?.
Is that possible?, i really need to know.
By the way NICE FORUM, NEVER NOTICED ITS THIS FUN!

It is probably easier to remove the WP resistor. However I will need to check with the hardware team where R68 is located.

Thanks please do say when you’ve found out👍.
Its really a dream to have an arm board that does it all!.