rt-net / JetsonNano_DT_SPI

SPI1 enabled DTS and flash-tools for Jetson Nano
GNU General Public License v2.0
29 stars 9 forks source link

how to enable spi2 ? #8

Closed slot867 closed 4 years ago

slot867 commented 4 years ago

Hi rt-net,

Thank you for the script to enable spi1 (Pin 19, 21, 23, 24) on Jetson Nano.

However there is 2nd spi (pins of 37 22 13 18), I tried to modify the dts file but not working. It did show /dev/spidev1.0, but loopback test returns all 00's

spi@7000d600 {
           ...........
    spi1_0 {
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            compatible = "spidev";
            reg = <0x0>;
            spi-max-frequency = <0x1312d00>;
            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>;
    };

Please advise, Thanks in advance

Tiryoh commented 4 years ago

Hi @slot867, Thanks for your comment. Which version of L4T are running on the Jetson Nano? If the version of L4T is 32.2.1, editing u-boot is required. Edits of u-boot: https://github.com/Tiryoh/tegra_u-boot/commit/3f332bfa26f3c5efef940a760ba9bad46950060a

lmirel commented 4 years ago

thanks for your effort, @Tiryoh could you share the prerequisites and configuration used to build the tegra u-boot, please? I'm obviously interested in the commands used to configure and build it. thanks very much

Tiryoh commented 4 years ago

could you share the prerequisites and configuration used to build the tegra u-boot, please?

The official document is published here: https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fuboot_guide.html%23. Also, the short note for customizing u-boot for Jetson Nano which I followed is published here: https://github.com/Tiryoh/tegra_u-boot/wiki/How-to-customize-u-boot-for-Jetson-Nano.