Custom board driver request

I am in the procces of creating a custom carier board with multiple i2c components and some SPI devices of wicht i need the drivers build/enabled in the Torizon 6.x kernel:

Our board is using the following devices:
M41T0M6 → already present (CONFIG_RTC_DRV_M41T80=y)
KSZ9897RTXI → there are a few common ones pressent so i think one of those should work (CONFIG_NET_DSA_TAG_KSZ=m / CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON=m)
TCA9548APWR → havent found this one so i would like to have this added (if available)
USB7206CT → havent found this one so i would like to have this added (if available)
USB5806C → havent found this one so i would like to have this added (if available)
HD3SS3220IRNHT → already present (CONFIG_TYPEC_HD3SS3220=m)
SLM9670AQ20FW1311XTMA1 → havent found this one so i would like to have this added (if available)

This brings me also to an issue of SPI usage with the Verdin IMX8mp. Usaly you can have multiple CS pins to a single SPI bus however by default the verdin imx8mp wich i use has one CS pin. How can I re-use regular GPIO pins for (in this case) a secondary and even third CS pin (the native CS pin will be used for the TPM but i need a second for the KSZ9897RTXI ethernet switch (third will be future use).

I hope this can be clarified and the drivers requested be added :stuck_out_tongue:

Greetings @Lightscape,

Our board is using the following devices:
M41T0M6 → already present (CONFIG_RTC_DRV_M41T80=y)
KSZ9897RTXI → there are a few common ones pressent so i think one of those should work (CONFIG_NET_DSA_TAG_KSZ=m / CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON=m)
TCA9548APWR → havent found this one so i would like to have this added (if available)
USB7206CT → havent found this one so i would like to have this added (if available)
USB5806C → havent found this one so i would like to have this added (if available)
HD3SS3220IRNHT → already present (CONFIG_TYPEC_HD3SS3220=m)
SLM9670AQ20FW1311XTMA1 → havent found this one so i would like to have this added (if available)

Could you please provide which kernel configs must be enabled for each device in your list here? I mean we could probably determine this ourselves. But, there’s a risk we make the wrong assumption for your devices and enable something that isn’t helpful to you. Therefore it’s better if you tell us what to enable rather than us try and assume what you need.

How can I re-use regular GPIO pins for (in this case) a secondary and even third CS pin

You just need to modify the device tree node for the SPI you want to add more CS pins too. The verdin i.MX8M plus uses the eCSPI framework from NXP. You can see an example of how to add more gpio pins as CS here: https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt

Just make sure whatever pins you use as additional CS aren’t being used by anything else in the system.

Best Regards,
Jeremias

Ok ive verified and found the folluowing configs to be enabled for the devices described above:
CONFIG_I2C_MUX_PCA954x → TCA9548APWR (as its a drop-in replacement of the PCA9548)

I havent found any config for the following two devices:
USB7206CT (Slave) → havent found this one so think i need to build this one myself
USB5806C (Slave) → havent found this one so think i need to build this one myself
A double check would be nice on these but i think im out of luck here :smiley:

The TPM module is the one refferenced in the Verdin Mallow Carier V1.1 board and after investigation it i found out it was already in the builds :stuck_out_tongue:

The TPM module is the one refferenced in the Verdin Mallow Carier V1.1 board and after investigation it i found out it was already in the builds

Ahh yes I just I noticed the part here is the reference TPM. Though what do you mean by “you found out it was already in the builds”? What exactly did you see/find here? I don’t believe we have this TPM enabled in our kernel by default yet, but I may be wrong.

Best Regards,
Jeremias

I imaged the Verdin IMX8mp module with the last nightly build and found the following with

torizon@verdin-imx8mp-xxxxxxxx:~$ zcat /proc/config.gz | grep TCG
CONFIG_TCG_TPM=m
CONFIG_TCG_TIS_CORE=m
CONFIG_TCG_TIS=m
CONFIG_TCG_TIS_SPI=m
# CONFIG_TCG_TIS_SPI_CR50 is not set
# CONFIG_TCG_TIS_I2C_CR50 is not set
CONFIG_TCG_TIS_I2C_ATMEL=m
CONFIG_TCG_TIS_I2C_INFINEON=m
CONFIG_TCG_TIS_I2C_NUVOTON=m
CONFIG_TCG_ATMEL=m
# CONFIG_TCG_INFINEON is not set
# CONFIG_TCG_XEN is not set
# CONFIG_TCG_CRB is not set
CONFIG_TCG_VTPM_PROXY=m
CONFIG_TCG_FTPM_TEE=m
CONFIG_TCG_TIS_ST33ZP24=m
CONFIG_TCG_TIS_ST33ZP24_I2C=m
CONFIG_TCG_TIS_ST33ZP24_SPI=m

If i may believe the infineon forums enough is already enabled to have the SLM/SLB9670 functioning:

Can there please be arranged that the following config can be enabled for the TCA9548:

CONFIG_I2C_MUX_PCA954x

For the following modules i think im out of luck or is there something available what i missed??
USB7206CT (Slave)
USB5806C (Slave)

Hello @Lightscape ,

Whicj Torizon OS version are you using?
I checked on version 6.4.0 and it is enabled:

torizon@verdin-imx8mp-14777631:~$ sudo tdx-info

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.15.129-6.4.0+git.67c3153d20ff #1-TorizonCore SMP PREEMPT Wed Sep 27 12:30:36 UTC 2023
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/460c0c1dde52ce6a4fd14e6ff7399ad1c879175a9ffa047acbb97523d9376591/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.4.0-build.5
Hostname:                 verdin-imx8mp-14777631
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version:          0058 V1.1A
Serial number:            14777631
Processor arch:           aarch64
------------------------------------------------------------


torizon@verdin-imx8mp-14777631:~$ zcat /proc/config.gz |grep I2C_MUX_PCA954x
CONFIG_I2C_MUX_PCA954x=y

According to Mocrochip, these hubs should work with the standard hub drivers
https://microchip.my.site.com/s/article/Driver-for-Microchip-USB-HUBs+

Best regards,
Josep

Just to summarize then, all the configs you need are already enabled on the latest Torizon OS then? Nothing needs to be done here then?

Best Regards,
Jeremias