I'm trying to enable and use SPI1 on a Nanopi neo core 2, using the Friendlyarm kernel.
I understand that SPI1 is multiplexed with UART3, and is disabled by default. But simply enabling SPI1 in the device tree while disabling UART3 didn't do the trick (there was no attempt to bring up spi1 during boot). Extending the DT with my device as follows (fragment of a DT overlay file):
Produces the following errors during boot:
Why does it complain that chipselect 0 is already in use? Am I missing something from SPI1 configuration?
I understand that SPI1 is multiplexed with UART3, and is disabled by default. But simply enabling SPI1 in the device tree while disabling UART3 didn't do the trick (there was no attempt to bring up spi1 during boot). Extending the DT with my device as follows (fragment of a DT overlay file):
Code: Select all
fragment@6 {
target = <&spi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
status = "okay";
eth1: spidev1@0 {
status = "okay";
compatible = "micrel,ks8851";
reg = <0>;
spi-max-frequency = <40000000>; /* 40 MHz */
reset-gpios = <&pio 6 9 1>; /* PG9 GPIO_ACTIVE_LOW */
interrupt-controller;
#interrupt-cells=<2>;
interrupt-parent = <&pio>;
interrupts = <11 11 8>; /* PL11 IRQ_TYPE_LEVEL_LOW */
};
};
};
Produces the following errors during boot:
Code: Select all
pi@NanoPi-NEO-Core2:~$ dmesg | grep spi
[ 1.278364] sun6i-spi 1c69000.spi: chipselect 0 already in use
[ 1.284211] spi_master spi1: spi_device register error /soc/spi@1c69000/spi@1
[ 1.291350] spi_master spi1: Failed to create SPI device for /soc/spi@1c69000/spi@1
[ 10.806866] ks8851 spi1.0: spi1.0 supply vdd-io not found, using dummy regulator
[ 10.806983] ks8851 spi1.0: spi1.0 supply vdd not found, using dummy regulator
[ 10.817998] ks8851 spi1.0: message enable is 0
[ 10.820343] ks8851 spi1.0: failed to get irq
[ 10.820462] ks8851: probe of spi1.0 failed with error -22
Why does it complain that chipselect 0 is already in use? Am I missing something from SPI1 configuration?