AnsweredAssumed Answered

Unable to enable DSPI0 (SPI1) on LS1021a

Question asked by macarrow on Feb 14, 2016
Latest reply on Oct 19, 2016 by Dmitriy Ivanov

I am testing SPI on LS1021a using spidev. I've enabled dspi0 in dts please see below but have no luck. The thing is that if I change configuration to dspi1 (just for a sake of testing) driver is being loaded no problem.

Here is what happens: when I enable dspi0, status is being set to "okay", I can confirm that in dtb with fdtdump. But when this dtb is being loaded by kernel, status magically changes to "disabled" (checked it in EDT through /proc/device-tree).

At the same time dspi1 does not have such problem: if I replicate the conf below but for dspi1, it works as expected, spidev pops up in devs and status of dspi1 is "okay" as expected in EDT.

I am on SDK 1.8 and since there is no earlyprintk support for ls1021a in kernel 3.12 I do not really see what happens during fdt parsing.

So here is my question: how to enable dspi0 on ls1021a?

Here is my test setup: ls1021a-iot board, silicone seems to be ver 2, SDK 1.8, board boots from sdcard.

 

&dspi0 {

        bus-num = <0>;

        status = "okay";

        spidev0_0: spidev@0 {

                compatible = "rohm,dh2228fv";

                #address-cells = <1>;

                #size-cells = <1>;

                reg = <0>;

                spi-max-frequency = <1000000>;

        };

 

        spidev0_3: spidev@3 {

                compatible = "rohm,dh2228fv";

                #address-cells = <1>;

                #size-cells = <1>;

                reg = <3>;

                spi-max-frequency = <1000000>;

        };

};

Outcomes