the difference between /drivers/spi and /drivers/mtd

Tomek Domek tomekdomek8585 at gmail.com
Tue Dec 10 10:01:38 EST 2019


Hi
I have in device tree node:

qspi: somename at 0 {
    compatible = "nameOfDriverFrom/drivers/spi";
    reg = <someAddr size>;
    clocks = <reference to clock>;
    clock-names = "some names";
    #address-cells = <1>;
    #size-cells = <0>;
    status = "disabled";
};

and then I have such thing:
&qspi {
    pinctrl-names="default";
    pinctrl-0 = <&reference to some pin controller>;
    status = "okay";
    spi-max-frequency = <11000000>;

    flash at 0 {
        compatible = "spi-flash (this is driver from /drivers/mtd/)";
        #address-cells = <1>;
        #size-cells = <1>;
        reg = <0x0>;
        spi-max-frequency = <22000000>;
     };
};

Why just one node isn't enough? And what frequency driver have at all -
11MHz or 22MHz?
What is the difference between drivers defined in /drivers/spi and
/drivers/mtd?
Does it mean that driver in /drivers/mtd can use somehow driver or the code
from /drivers/spi?
Or maybe it works in opposite direction?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20191210/67a465c5/attachment.html>


More information about the Kernelnewbies mailing list