Debian 9 / Kernel 4.19 - Spi writes doesn't work

I’m using image and source for the kernel from 4.19.5 kernel based Debian snapshot image release for HiKey960.
With a few patches on top to get I2S0 working, but I SPI2 doesn’t work. Only half of spi writes go through.

I enabled a few traces:

echo 1 > /sys/kernel/debug/tracing/events/regmap/regmap_hw_write_start/enable
echo 1 > /sys/kernel/debug/tracing/events/regmap/regmap_hw_write_done/enable
echo 1 > /sys/kernel/debug/tracing/events/regmap/regmap_async_write_start/enable

But I can see that any regmap_async_write_start is not in the BUS using my logic saleae.
There is also this bug about SPI on HIKEY960 : https://bugs.96boards.org/show_bug.cgi?id=555

It also seems that john.stultz is working on a main line version of Hikey, but the DTS for hikey960 on this branch doesn’t have DMA too.

Help?

Thanks
Lucas

Debugging printk/pr_info doesn’t work because this is a timing issue, to many prints makes everything work.

A mdelay(30) on the begging of _regmap_raw_write_impl makes SPI2 work.

Hi @jstultz,

For HiKey960, in kernel v4.19, sound card capture (pcmC0D0c) is missing. It only listed pcmC0D0p.

hikey960:/ # cat /proc/asound/cards
0 [hikeyhdmi ]: hikey-hdmi - hikey-hdmi
hikey-hdmi

Under /dev/snd/, I have the following devices,

controlC0
pcmC0D0p
timer

Do you have any idea on how to bring up the capture device?

Thanks in Advance.

The board is discontinued and does not appear to be supported any more by the vendor. Don’t expect much help with this. Either use an older kernel, or find the missing pieces that haven’t been included in the newer kernel.