I need two simultaneous SPI connections: master + slave
Using this forum I managed to set up /dev/spidev0.0 in master mode at spi@7000d400.
But unfortunately I can not find any working solution for slave mode.
Compiled spidev.ko and spi-tegra124-slave.ko from sources of L4T R28.1 for TX1
My master settings:
spi@7000d400 {
compatible = "nvidia,tegra210-spi";
reg = <0x0 0x7000d400 0x0 0x200>;
interrupts = <0x0 0x3b 0x4>;
nvidia,dma-request-selector = <0x6e 0xf>;
iommus = <0x52 0xe>;
#address-cells = <0x1>;
#size-cells = <0x0>;
dmas = <0x6e 0xf 0x6e 0xf>;
dma-names = "rx", "tx";
nvidia,clk-parents = "pll_p", "clk_m";
clocks = <0x41 0x29 0x41 0xf3 0x41 0xe9>;
clock-names = "spi", "pll_p", "clk_m";
resets = <0x41 0x29>;
reset-names = "spi";
status = "okay";
prod-settings {
...
};
spi0_0 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "spidev";
reg = <0x0>;
spi-max-frequency = <20000000>;
nvidia,enable-hw-based-cs;
nvidia,cs-setup-clk-count = <0x1e>;
nvidia,cs-hold-clk-count = <0x1e>;
nvidia,rx-clk-tap-delay = <0x1f>;
nvidia,tx-clk-tap-delay = <0x0>;
};
My slave settings:
spi@7000d600 {
compatible = "nvidia,tegra124-spi-slave";
reg = <0x0 0x7000d600 0x0 0x200>;
interrupts = <0 82 0x04>;
nvidia,dma-request-selector = <0x5d 0xf>;
nvidia,clock-always-on;
#address-cells = <0x1>;
#size-cells = <0x0>;
status = "okay";
spi1_0 {
compatible = "spidev";
reg = <0x0>;
spi-max-frequency = <20000000>;
};
};
And in dmesg I get:
nvidia@tegra-ubuntu:~$ dmesg | grep spi
[ 0.300322] tegra-pmc 7000e400.pmc: PMC: IO pad spi voltage is 1800000
[ 0.308352] tegra-pmc 7000e400.pmc: PMC: IO pad spi-hv voltage is 1800000
[ 3.167592] spi-tegra114 7000d400.spi: Static pin configuration used
[ 3.168796] spi-tegra114 7000da00.spi: Static pin configuration used
[ 7.182762] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 7.207940] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 8.182616] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 9.383168] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 9.435190] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 9.548744] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 9.752420] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 10.104791] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 10.204343] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 10.289568] spi-tegra124-slave 7000d600.spi: Reset control is not found
[ 10.357063] spi-tegra124-slave 7000d600.spi: Reset control is not found