# Rebuilding kernel for VOXL 2 Mini to swap J10 to SPI, M0188 2 Lepton configuration

Source: https://forum.modalai.com/topic/5050/rebuilding-kernel-for-voxl-2-mini-to-swap-j10-to-spi-m0188-2-lepton-configuration
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Tags: voxl 2 mini, kernel, m0188, lepton, camera
Posted: 2026-02-10 19:58:19 UTC by Haxerus
Replies: 4 · Views: 1151

## Haxerus · 2026-02-10 19:58:19 UTC

Hello,

I am trying to get the M0188 board working with the VOXL 2 Mini to control 2 Leptons but I've hit a roadblock getting the J10 port to switch from UART to SPI. I've rebuilt the kernel with the following modifications to the DTS files on meta-voxl2-bsp.

m0104-kona.dtsi:
- added ```spi14 = &qupv3_se14_spi```

m0104-modalai-qupv3.dtsi:
- changed status of ```&qupv3_se14_2uart``` to ```"disabled"```
- changed status of ```&qupv3_se14_spi``` to ```"ok"```
- added the following to ```&qupv3_se14_spi```
```
spidev@0 {
    compatible = "spidev";
    reg = <0>;
    spi-max-frequency = <50000000>;
};
```

I am not sure these are the only modifications required as I am not familiar with Linux kernel development, I just followed the documentation and commit history in meta-voxl2-bsp.

After building and loading the kernel I run ```voxl-gpio -w 67 1``` as mentioned [here](https://docs.modalai.com/voxl2-mini-connectors/#j10-pin-out-spi-mode-gpio_67--high-kernel-rebuild-required-to-use). When I run ```ls /dev/``` I am able to see ```/dev/spidev14.0```. I tried testing it with [this tool](https://github.com/rm-hull/spidev-test/tree/master) and a loopback cable that connects MISO to MOSI but it just hangs. That tool works fine with ```spidev0.0```. 

I modified voxl-lepton-server to use the 2nd I2C channel for Lepton #2. I then tried to change ```/etc/modalai/voxl-lepton-server.conf``` to use SPI bus id 14 but it caused voxl-lepton-server to hang, seemingly not getting any data from the SPI port.

Any guidance on how to properly use J10 as an SPI port and how to get voxl-lepton-server to read from it would be greatly appreciated.

## Reply by Haxerus · 2026-02-10 21:33:38 UTC

@Alex-Kushleyev @modaltb If you have any insights that would be appreciated. Thanks.

## Reply by Haxerus · 2026-02-11 20:36:28 UTC (in reply to Haxerus)

Ok, I was actually able to get J10 to work as an SPI port by following [this thread](https://forum.modalai.com/topic/3255/voxl_spi_init-failed-to-open-dev-spidev-device-no-such-file-or-directory/30). I was also able to get video feed from the lepton on slot #2 on the M0188 with this approach. I still don't know if using the devcfg.mbn file from SDK ver 1.0.0 is really the "proper" thing to do, it feels like it could lead to issues down the road. An official answer regarding J10 in SPI mode would be greatly appreciated.

## Reply by Alex Kushleyev (ModalAI staff) · 2026-02-13 18:59:30 UTC (in reply to Haxerus)

Hi @Haxerus ,

I will double check regarding enabling J10 in spi mode on VOXL2 Mini. 

Can you please confirm that you did all 3 changes:
- the DTS changes you listed below
- used the older `devcfg.mbn` file from SDK 1.0.0
- configure the level shifters to SPI mode using `voxl-gpio -w 67 1`

Can you please clarify which second i2c channel was used in your test for the 2nd lepton?

Thanks!

Alex

## Reply by Haxerus · 2026-02-17 20:23:24 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev I made the following changes.

1. Modified the DTS files as stated prior.
2. Flashed the ```devcfg.mbn``` file from SDK 1.0.0
3. I did not need to configure the level shifter actually. The port worked in SPI mode even without running ```voxl-gpio -w 67 1```. Running the command doesn't seem to change anything.

I used Channel 1 on /dev/i2c-0 for the second lepton. I simply wrote ```TCA9543A_CHANNEL_1_ENABLE``` to ```TCA9543A_CONTROL_REGISTER``` in ```voxl-lepton-server```. I pretty much followed what was described [here](https://docs.modalai.com/M0188/).
