Hi everyone,
Was wondering if anyone has been successful in configuring a device for the second SPI controller on r3. I made the following additions to the device tree source
&pio {
spi1_pins: spi1-pins {
pins = "PE9", "PE7", "PE10", "PE8";
function = "spi1";
};
spi1_cs_pins: spi1-cs-pins {
pins = "PE7";
function = "gpio_out";
};
};
&spi1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins &spi1_cs_pins>;
num_chipselect = <1>;
cs-gpios = <&pio 4 7 GPIO_ACTIVE_HIGH>;
spidev@0 {
compatible = "spidev";
reg = <0>;
spi-max-frequency = <0x2625a00>;
};
};
I do get the spidev device in spidev device file in /dev and loopback tests using this rm-hull’s spidev-test script on githhub and a jumper wire between PE10 & PE8 do work. But interfacing with an spi device (in my case the RFID-MFRC522) doesn’t work. My current guess is I haven’t configured the chip select i.e PE7 correctly. Am I missing something?? Is it necessary configuring PE7 for the f1c200s ?
Any help is very much appreciated.