QSPI1 on RZG2L DEVICE TREE

Hi everyone, 

On my rzg2l I would like to use SPI mapped to the QSPI1 dedicated pins shown below:

I'm interested in using the device as a normal SPI1, is it possible? And if so, how should I create the device in the device tree? I tried writing like this in the file rzg2l-smarc-som.dtsi

&spi1 {
   pinctrl-0 = <&qspi1_pins>;
   pinctrl-names = "default";
   status = "okay";

   adc@0 {
   compatible = "spidev";
   reg = <0>;
   spi-max-frequency = <10000000>;
   };

}

dove qspi1_pins è:

qspi1_pins: spi1 {
   qspi1-data {
   pins = "QSPI1_IO0", "QSPI1_IO1", "QSPI1_IO2", "QSPI1_IO3";
   power-source = <1800>;
   };

   qspi1-ctrl {
   pins = "QSPI1_SPCLK", "QSPI1_SSL", "QSPI_RESET#";
   power-source = <1800>;
   };
};

But when I launch the system and from the console I enter in the /dev folder, I don't find the spi1 device.

I would expect to find the SPI1 device and by echo "test" > spidev1 to see the characters come out of the SPI.

Parents
  • Hello, AndEdo

    I don't think it's possible.
    The QSPI1 dedicated pins are dedicated to the SPI multi I/O bus controller. And the SPI multi I/O bus controller functions as a bus bridge connected to the MPU bus in the system, not as an SPI communication controller.

    So even if you add a node for the SPI communication controller to the device tree, the driver for the SPI multi I/O bus controller won't refer to it.

    BR
Reply
  • Hello, AndEdo

    I don't think it's possible.
    The QSPI1 dedicated pins are dedicated to the SPI multi I/O bus controller. And the SPI multi I/O bus controller functions as a bus bridge connected to the MPU bus in the system, not as an SPI communication controller.

    So even if you add a node for the SPI communication controller to the device tree, the driver for the SPI multi I/O bus controller won't refer to it.

    BR
Children