We have devices 68, 6b and 76 connected to the downstream ports of the I2C mux. It seems like this new version of Linux has the PCA95X driver built in. I also see the following in the logs
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.128057] swimcu_i2c_init: start
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.848232] i2c /dev entries driver
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.849646] swimcu_i2c_probe: start 1
Jan 1 01:47:26 swi-mdm9x28-wp user.debug kernel: [ 0.902020] wm8944_i2c_probe
Jan 1 01:47:26 swi-mdm9x28-wp user.debug kernel: [ 0.903068] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/i2c@78b8000/ioexp-mux@71[0]'
Jan 1 01:47:26 swi-mdm9x28-wp user.debug kernel: [ 0.903078] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/i2c@78b8000/ioexp-mux@71[0]'
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.903675] i2c i2c-4: Added multiplexed i2c bus 0
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.903895] i2c i2c-4: Added multiplexed i2c bus 1
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.904105] i2c i2c-4: Added multiplexed i2c bus 2
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.904309] i2c i2c-4: Added multiplexed i2c bus 3
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.905241] i2c i2c-4: Added multiplexed i2c bus 5
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.906193] i2c i2c-4: Added multiplexed i2c bus 6
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.907101] i2c i2c-4: Added multiplexed i2c bus 7
Jan 1 01:47:26 swi-mdm9x28-wp user.info kernel: [ 0.907337] i2c i2c-4: Added multiplexed i2c bus 8
Jan 6 01:47:45 swi-mdm9x28-wp user.err Legato: =ERR= | wifiService[1431] | ERR* failed to read i2c data
Jan 6 01:47:45 swi-mdm9x28-wp user.err Legato: =ERR= | wifiService[1431] | ERR* failed to read i2c data
Jan 6 01:47:45 swi-mdm9x28-wp user.err Legato: =ERR= | wifiService[1431] | ERR* failed to read i2c data
When I rebuild the Legao image without WiFi enabled (I used kConfig to disable it) and then put the image on the BRNKL I loose access to those 3 I2C devices. You can see the output below:
Yes, I need to rebuild the legato.cwe. This has been part of our process for the last 4 years with the WP85 since 2017 and WP77 since 2021.
There are several services that are included in the prebuilt image that I don’t require and for some of WP SKUs they cause the image to be to large to fit into the RO are when combined with our firmware.
This problem is occurring without our firmware or apps being loaded onto the device. I’m just building legato from ./leaf-data/current/wp77xx-legato with Wifi disabled and this issue occurs. I don’t need or want WiFi as there isn’t any WiFi hardware on our devices.
I did try that and the I2C worked. Ideally I don’t want to modify Legato but when I try building our firmware using mksys against the unmodified Legato it fails saying that I don’t have the WiFi service.
While I need to rebuild Legato, we do this do add our on version tag, I don’t have a need to modify the configuration of Legato. I just need to build against our firmware.
@jyijyi Sorry, I wasn’t clear. Yes, the unmodified legato has the WiFi service. But when I build firmware using mksys it fails saying the WiFi service is missing as or .sdef doesn’t include the service. I don’t want to disable the WiFi service, I just want my firmware to build against unmodified Legato and it wouldn’t until I disabled that service.
Unfortunately I already tried running R14.1 on these modules but the have been locked and can’t be downgraded since they have a new memory driver not present in R14.1.
@jyijyi My device doesn’t have any WiFI hardware on it and our firmware is very close to the 8MB in size as it has several apps in it. I would have stayed with R14.1 but that wasn’t possible as these modules only support R15.1 and greater.
@jyijyi To be clear we are using 2 different WP modules. All the devices in the field are using WP7702 SKU 1104214 that have R14.1 and are using FLASH MT29F4G08ABBEA3W.
We just received a new production run of devices with WP7702 SKU 1104918, that have R15.1 and are using FLASH H27S4G8F2EKPB4. These new modules won’t let me install R14.1 on them. These also the modules I’m trying to get our firmware to run on but I can’t get the I2C to work.
@jyijyi I have spent all day continuing to troubleshoot this issue. Including the WiFi app our not including the WiFi app doesn’t make a difference as I initially thought.
It seems that R15.1is trying to communicate with something on the I2C bus at address 0x71. On our device I have a PCA9546A just like the MangOH Red and Yellow. I noticed strange access for this address on my logic analyzer. I also suspect this is why my kernel module fails to the driver for the PCA9546A.
Given the above clue I modified a PCB and changed the PCA9546A mux to address 0x73 and everything seems to work.
Any thoughts on what may be causing this conflict on 0x71?
Then did you still i2c problem with original legato image?
if you don’t see problem with the official legato image or your legato.cwe with original legato code, then that means there is no problem on the original image with i2c.
if you agree with this, then you need to figure out why you cannot compile with mksys.
then seems it is different from what you mentioned at the beginning.
it is a bit confusing here, can you list a table what is working and what is not working with the hardware/firmware you are using?
Also you can disable legato framework to see if the problem is related to legato or not.
I just tried with WP76 with latest FW R17 (kernel 4.14) in mangoh red board, no problem is found: