Yes I used that tag.
Yes, that was it. I also needed to install libssl-dev.
After successfully rebuilding the kernel without changing the device tree, I attempted to edit the device tree to further rebuild the kernel again but encountered a syntax error.
Original device tree:
I needed to change spi@3210000 from 2 chip-select to 4 chip-select, by adding the pin 22 (soc_gpio21_pq1) and pin 32 (can1_en_pbb1) to chip-select.
spi@3210000 {
iommus = <0x02 0x20>;
#address-cells = <0x01>;
dma-coherent;
clock-names = "spi\0pll_p\0clk_m";
nvidia,clk-parents = "pll_p\0clk_m";
resets = <0x04 0x5b>;
interrupts = <0x00 0x24 0x04>;
clocks = <0x04 0x87 0x04 0x66 0x04 0x0e>;
#size-cells = <0x00>;
spi-max-frequency = <0x3dfd240>;
dma-names = "rx\0tx";
compatible = "nvidia,tegra186-spi";
status = "okay";
reg = <0x00 0x3210000 0x00 0x10000>;
phandle = <0x30d>;
dmas = <0x24 0x0f 0x24 0x0f>;
reset-names = "spi";
spi@1 {
spi-max-frequency = <0x1f78a40>;
compatible = "tegra-spidev";
reg = <0x01>;
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x11>;
};
};
prod-settings {
prod_c_cs0 {
prod = <0x04 0xfff 0x11>;
};
};
spi@0 {
spi-max-frequency = <0x1f78a40>;
compatible = "tegra-spidev";
reg = <0x00>;
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x11>;
};
};
};
I need to add spi@2 and spi@3, right? I tried adding cs-gpios = <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_LOW>, <&gpio TEGRA_GPIO(Q, 1) GPIO_ACTIVE_LOW>;
and also cs-gpios = 0, 0, <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_LOW>, <&gpio TEGRA_GPIO(Q, 1) GPIO_ACTIVE_LOW>;
but got the following error in both:
Error: output.dts:1767.21-22 syntax error
FATAL ERROR: Unable to parse input tree
Custom device tree:
spi@3210000 {
...
cs-gpios = <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_LOW>, <&gpio TEGRA_GPIO(Q, 1) GPIO_ACTIVE_LOW>;
prod-settings {
prod_c_cs0 {
prod = <0x04 0xfff 0x11>;
};
};
spi@0 {
spi-max-frequency = <0x1f78a40>;
compatible = "tegra-spidev";
reg = <0x00>;
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x11>;
};
};
spi@1 {
spi-max-frequency = <0x1f78a40>;
compatible = "tegra-spidev";
reg = <0x01>;
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x11>;
};
};
};
spi@2 {
spi-max-frequency = <0x1f78a40>;
compatible = "tegra-spidev";
reg = <0x02>;
controller-data {
nvidia,rx-clk-tap-delay = <0x11>;
};
};
};
spi@3 {
spi-max-frequency = <0x1f78a40>;
compatible = "tegra-spidev";
reg = <0x03>;
controller-data {
nvidia,rx-clk-tap-delay = <0x11>;
};
};
};
What is the correct syntax to add 2 extra CS into the spi?