Spidev device is ok, but now I have some questions about CS-Pin’s and more SPI devices…
-
I have 3 devices on SPI, on SPI0 one device, and on SPI1 2 devices.
-
Didn’t get the device on SPI0 “talking” we me… !!! Now I want double check my configuration.
-
As “base” dts-file, I’m currently using the “tegra210-jetson-tx1-p2597-2180-a01-devkit.dts” file.
-
Changes I did…
-
By the way, If I’m looking into the spreadsheet, There is the SPI0 = SPI4 and this is the “Touch-SPI”.
Did I need to remove the relevant touch settings, or is it enough to disable… -
Would be great, If some one can check it.
gpio@6000d000
gpio_default: default {
gpio-to-sfio = <16 17 18 19 20>;
};
This is my section for SPI0
spi@7000d400 {
compatible = "nvidia,tegra210-spi";
reg = <0x0 0x7000d400 0x0 0x200>;
interrupts = <0x0 0x3b 0x4>;
nvidia,dma-request-selector = <0x5c 0xf>;
iommus = <0x57 0xe>;
#address-cells = <0x1>;
#size-cells = <0x0>;
dmas = <0x5c 0xf 0x5c 0xf>;
dma-names = "rx", "tx";
nvidia,clk-parents = "pll_p", "clk_m";
status = "okay";
prod-settings {
prod {
prod = <0x4 0xfffff000 0x0>;
};
prod_c_flash {
status = "disabled";
prod = <0x4 0xffffffc0 0x7>;
};
prod_c_loop {
status = "disabled";
prod = <0x4 0xfffff000 0x44b>;
};
};
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>;
};
};
Here section for SPI1, on SPI1, I need to define the CS, from GPIO 19/20 for what is PIN 16/17/18 related ?
spi@7000d600 {
compatible = "nvidia,tegra210-spi";
reg = <0x0 0x7000d600 0x0 0x200>;
interrupts = <0x0 0x52 0x4>;
nvidia,dma-request-selector = <0x5c 0x10>;
iommus = <0x57 0xe>;
#address-cells = <0x1>;
#size-cells = <0x0>;
dmas = <0x5c 0x10 0x5c 0x10>;
dma-names = "rx", "tx";
nvidia,clk-parents = "pll_p", "clk_m";
status = "okay";
prod-settings {
#prod-cells = <0x3>;
prod {
prod = <0x4 0x0 0x16>;
};
prod_c_flash {
status = "disabled";
prod = <0x4 0xffffffc0 0x6>;
};
prod_c_loop {
status = "disabled";
prod = <0x4 0xfffff000 0x44b>;
};
};
spi1_0 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "spidev";
status = "okay";
reg = <0x0>;
spi-max-frequency = <20000000>;
nvidia,cs-setup-clk-count = <0x1e>;
nvidia,cs-hold-clk-count = <0x1e>;
nvidia,rx-clk-tap-delay = <0x1f>;
nvidia,tx-clk-tap-delay = <0x0>;
nvidia,chipselect-gpio = <&gpio_default 19 0>;
};
spi1_1 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "spidev";
status = "okay";
reg = <0x0>;
spi-max-frequency = <20000000>;
nvidia,cs-setup-clk-count = <0x1e>;
nvidia,cs-hold-clk-count = <0x1e>;
nvidia,rx-clk-tap-delay = <0x1f>;
nvidia,tx-clk-tap-delay = <0x0>;
nvidia,chipselect-gpio = <&gpio_default 20 0>;
};
};