Giter Site home page Giter Site logo

jetsonnano_dt_spi's Introduction

Due to the release of the Jetson-IO which is the tool to simplify the configuration of the I/Os exposed by the 40‑pin expansion header, this tool is not maintained anymore. L4T release 32.3 is the initial release containing the Jetson-IO.

JetsonNano_DT_SPI

unofficial script for Jetson Nano(L4T Jetson-Nano-Tegra210_Linux_R32.1.0_aarch64) to enable SPI0 (SPI1 on Developer Kit's Pin 19, 21, 23 and 24)

Please don't forget to backup your data!
This script is tested only on L4T R32.1(not tested on > R32.1). Details: issue#5.

First, download this repository into your Ubuntu PC (not your Jetson Nano).
After downloading, just run:

./run.sh

The scripts shows the following after flashing.

*** The [DTB] has been updated successfully. ***

Usage

The script doesn't depend on the NVIDIA SDK Manager. It downloads the reqirements from the NVIDIA's server by itself. You don't have to install the NVIDIA SDK Manager to use this script.

  1. Setup the Jetson Nano to be able to boot
  2. Turn the Jetson Nano into Recovery Mode
  3. Connect the Jetson Nano and the Linux PC with a USB cable
  4. Download rt-net/JetsonNano_DT_SPI into the Linux PC (not Jetson Nano)
    • git clone https://github.com/rt-net/JetsonNano_DT_SPI
  5. Run run.sh and confirm that the file has flashed successfully
    • ./run.sh

Information

The difference between original and modified tegra210-p3448-0000-p3449-0000-a02.dts:

SPI1 on J40 of Developer Kit is available from /dev/spidev0.0. Accroding to "Jetson Nano Product Design Guide" which was published on June 10th, 2019, SPI1(Pin 19, 21, 23 and 24 on Developer Kit) is connected to SPI0 on Tegra X1, not SPI1. See section "9.2 SPI"(pp. 41).

このツールの詳細については以下の記事で紹介しています。
The details of these tools are written in Japanese on this page:
https://www.rt-shop.jp/blog/archives/11277

Acknowledgments

Special Thanks

This work was derived from jas-mx's information:

https://devtalk.nvidia.com/default/topic/1050427/jetson-nano/enabling-spidev-on-the-jetson-nano-is-hanging-when-flashing/post/5338398/#5338398

tegra210-p3448-0002-p3449-0000-a02.dts

/*
 * arch/arm64/boot/dts/tegra210-p3448-0002-p3449-0000-a02.dts
 *
 * Copyright (c) 2018-2019, NVIDIA CORPORATION.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

License

This repository is released under the GNU General Public License v2.0 because it includes the device tree source released under the GNU General Public License v2.0.

jetsonnano_dt_spi's People

Contributors

tiryoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jetsonnano_dt_spi's Issues

No graphical interface after reboot

Hi @Tiryoh ,

thanks for the helpful script.
Unfortunately I do not get a graphical user interface during the reboot. But I can access and use the board via ssh. Any suggestion why it is so?

Files Corrupted bzip2

Hi,

First of all, thanks for this repo.
I am one more that wants to configure the SPI communication of the Nano, and I am trying to use your script. But when running the ./run.sh file this error comes out:

bzip2: Data integrity error when decompressing.
	Input file = (stdin), output file = (stdout)
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Unexpected EOF in archive
tar: Linux_for_Tegra/nv_tegra: Cannot utime: Operation not permitted
tar: Linux_for_Tegra: Cannot utime: Operation not permitted
tar: Error is not recoverable: exiting now

Can you help?

MD5 hash of L4T Driver Package for R32.2.1 has changed

According to jtktchinou's post, the L4T Driver Package has been updated.

This line needs to be updated.

2d648bbc77c510c4e7e0c809996d24e8 Jetson-Nano-Tegra210_Linux_R32.2.1_aarch64.tbz2

L4T Driver Package is published at
https://developer.nvidia.com/embedded/dlc/Jetson-210_Linux_R32.2.1
which redirects to
https://developer.download.nvidia.com/embedded/L4T/r32-2-1_Release_v1.0/Nano-TX1/Jetson-210_Linux_R32.2.1_aarch64.tbz2.

The MD5 hash of the old Jetson-210_Linux_R32.2.1_aarch64.tbz2 is 2d648bbc77c510c4e7e0c809996d24e8, and the new one is e5b613bb7638863beb47c3e8ff6a2066.

The difference between the old one and the new one is the kernel package.

$ diff -rq old/Linux_for_Tegra/ new/Linux_for_Tegra/
Only in old/Linux_for_Tegra/kernel: nvidia-l4t-kernel_4.9.140-tegra-32.2.1-20190812212815_arm64.deb
Only in new/Linux_for_Tegra/kernel: nvidia-l4t-kernel_4.9.140-tegra-32.2.1-20191019160621_arm64.deb

how to enable spi2 ?

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

Step before clone the repository

Dear Tiryoh,

Thank you so much for your document and great inputs in the jetson nano forum!
I am trying to enable the SPI on Jetson Nano too, however I am not sure what to do before the steps you mentioned in the forum: https://devtalk.nvidia.com/default/topic/1050427/jetson-nano/enabling-spidev-on-the-jetson-nano-is-hanging-when-flashing/post/5339816/#5339816. Do I have to install the NVIDIA SDK Manager in another Linux computer? Any details about enabling the SPI on Jetson Nano will be greatly appreciated! Thanks!

R32.2.1 spidev_test fails

Hello,

Thanks for a helpful tool. I used it to successfully update the DTB on my Jetson Nano with L4T R32.2.1. I have confirmed that the spidev module is loaded and that /dev/spi.0.0 exists.

However the default test program spidev_test (public_sources/kernel/kernel-4.9/tools/spi/spidev_test.c) fails. The bytes transmitted are not received.

anamud@jn268:~$ ./spidev_test -v -D /dev/spidev0.0 
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D  | ......@....�..................�.
RX | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  | ................................

Do you have any tips for me to debug the problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.