SPI issue


We are having spi issue. We connected spi0 to our slave chip device. We also have the logic analyzer plugged in the pins of SPI lines (CS, CLK, MOSI, MISO).
But when we are sending data through spi0, we didn’t get anything. And logic analyzer doesn’t catch any signal on any pins. No signal on CS/CLK/MOSI/MISO.

We modified device tree so that it is handled by our driver:
status = “okay”;

    chip1: hb-slave@0 {
        compatible = "jca,hb-slave";
        spi-max-frequency = <6000000>;
        reg = <0>;

And I am pretty sure that our driver works because it was tested in a different platform.

Is my device tree modification for spi0 correct?
One thing I noticed that is it missing “cs-gpios” in device-tree? Do I need to give a gpio for chip select?
Does MB1 BCT file setup pinmux for spi0 correctly? OR I need to modify on that.


Have a reference to below topic. You may need to modify the cfg file.



Changing the pinmux .cfg does help a lot. And I can see signals on all SPI pins.
However, I saw some noise on spi clock pin. Is there a way to reduce those noise by changing .cfg setting e.g. pad?

The change I made on pinmux .cfg are:
0x0243d040 = 0x00000400
0x0243d020 = 0x00000458
0x0243d058 = 0x00000400
0x0243d010 = 0x00000400
0x0243d050 = 0x00000400


I don’t think the noise can be eliminated by sw. Better to find out the source of noise, is it from power supply or other high speed signals. The SPI port on Xavier is validated, you can check them separately to confirm if the noise is from Xavier or your SPI device and then think how to reduce it.


I the noise are from my spi device of my hardware. And I fixed it. Thank you for your guys help.