Hello,
I have modified the device tree using JetPack 3.3 and managed to get SPI working, including talking to an actual SPI slave device from the TX2. However, I wish to use the latest JetPack 4.2 (to be up-to-date and because other features work in 4.2 that I do not have working in 3.3), but when I make the same changes to the device tree for supporting SPI with JetPack 4.2, the SPI no longer works. I see my changes to the device tree, the /dev/spidevM.N devices show up, and I can open/read/write/close the SPI devices, but nothing comes out on the actual SPI pins.
With JetPack 3.3, disassembling /proc/device-tree on the TX2 shows my changes (for example):
spi@3240000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
#stream-id-cells = <0x1>;
clock-names = "spi", "pll_p", "clk_m";
clocks = <0xd 0x4a 0xd 0x10d 0xd 0x261>;
compatible = "nvidia,tegra186-spi";
dma-names = "rx", "tx";
dmas = <0x19 0x12 0x19 0x12>;
interrupts = <0x0 0x27 0x4>;
linux,phandle = <0x7a>;
nvidia,clk-parents = "pll_p", "clk_m";
nvidia,dma-request-selector = <0x19 0x12>;
phandle = <0x7a>;
reg = <0x0 0x3240000 0x0 0x10000>;
reset-names = "spi";
resets = <0xd 0x2b>;
status = "okay";
spi@0 {
compatible = "spidev";
nvidia,cs-hold-clk-count = <0x1e>;
nvidia,cs-setup-clk-count = <0x1e>;
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x1f>;
nvidia,tx-clk-tap-delay = <0x0>;
reg = <0x0>;
spi-max-frequency = <0x3dfd240>;
};
};
With JetPack 4.2, disassembling /proc/device-tree shows a very similar SPI node:
spi@3240000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
clock-names = "spi", "pll_p", "clk_m";
clocks = <0x10 0x4a 0x10 0x10d 0x10 0x261>;
compatible = "nvidia,tegra186-spi";
dma-names = "rx", "tx";
dmas = <0x25 0x12 0x25 0x12>;
interrupts = <0x0 0x27 0x4>;
iommus = <0x11 0x20>;
linux,phandle = <0x18d>;
nvidia,clk-parents = "pll_p", "clk_m";
phandle = <0x18d>;
reg = <0x0 0x3240000 0x0 0x10000>;
reset-names = "spi";
resets = <0x10 0x2b>;
status = "okay";
spi@0 {
compatible = "spidev";
nvidia,cs-hold-clk-count = <0x1e>;
nvidia,cs-setup-clk-count = <0x1e>;
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x1f>;
nvidia,tx-clk-tap-delay = <0x0>;
reg = <0x0>;
spi-max-frequency = <0x3dfd240>;
};
};
Other than changes in the way the IOMMU is handled, I can’t really see why this doesn’t work with JetPack 4.2. Are there additional changes to the device tree that need to be made to get SPI working with JetPack 4.2?
Any help would be appreciated.
Sincerely,
Dan