Giter VIP home page Giter VIP logo

jetson-nano-support's Introduction

jetson-nano-support

SPI

The spi directory contains dtb and u-boot binaries for the DevKit with part number p3448-0000-p3449-0000-a02 as well as the patch files used to create them. Together they enable spi1 on the 40-pin connector and create a device node for /dev/spidev0.0.

Unlike earlier install methods, you can install the binaries on a running Nano without the need for any other downloads, compiling, etc.

The latest release contains a tarball which, when extracted and run on the Nano, will update the appropriate partitions.

Extract the tarball then change to the directory created. Run sudo ./flashme.sh /dev/mmcblk0 (assuming /dev/mmcblk0 contains the system partitions) Reboot and you should have the spidev0.0 device.

NOTE: This program doesn't touch any other partitions or files so it's safe to run on an existing customized filesystem. The program will also make sure that the needed partitions are already on the device before it writes anything.

You can also run this program on any other computer to update an SDCard that's not currently in a Nano. The above note still applies.

Customization

The patches that created the DTB and u-boot binaries are included here. You'll need to follow the instructions in the Nvidia documentation for customizing the DTBs and u-boot.

If you want to create your own flash package you can use the scripts in the flash directory.

  • Use the Nvidia documentation to create your DTB and u-boot images.
    Follow the instructions to copy the DTBs to your Linux_for_Tegra/kernel/dtb directory, and your u-boot.bin file to Linux_for_Tegra/bootloader/t210ref/p3450-porg/ directory.

  • Copy create-signed-partitions.sh and create-flash-package.sh to your Linux_for_Tegra directory.

  • From your Linux_for_Tegra directory, run sudo ./create-signed-partitions.sh -r 200 where "200" is the board rev id for the "a02" boards. Adjust as necessary. This command will apply the DTBs to the appropriate partition blobs and sign the partition blobs. They'll be located in bootloader/signed directory.

  • From your Linux_for_Tegra directory, run ./create-flash-package.sh. You don't need to be root for this command. When it's done (it'll be very quick) you should have a /tmp/flash-dtb-update-.tar.gz file that you can copy to any Nano and execute as above.

jetson-nano-support's People

Contributors

gtjoseph avatar

Stargazers

לְוִיִּם avatar Thomas Wang avatar  avatar Nicolas (Nick) Danowski avatar  avatar Urvashiba Parmar avatar Mark avatar Banks Troutman avatar Steve Groesz avatar  avatar Juan Jose Chong avatar Samson Li avatar Angie avatar  avatar Joe Harrison avatar zheng avatar Krishna avatar Capt. Flatus O'Flaherty avatar Victor Novak avatar  avatar Jaswanth Bandlamudi avatar  avatar JetsonHacksNano avatar  avatar  avatar Richard Osterloh avatar  avatar Matt Cragun avatar  avatar karaage avatar Brent Miller avatar  avatar Daisuke Sato avatar

Watchers

James Cloos avatar  avatar John Bugay avatar

jetson-nano-support's Issues

spidev devices still don't show up

I'm running L4T 32.x version of L4T. I tried to run the flash-partitions.sh and it did flash various partitions, but I don't see any spidev messages in the kernel startup nor are there any /dev/spi devices.

I then tried to convert the DTB files in this repo to DTS files and looked through them. I see the additions to the SPI devices. Here is an excerpt from it:
`
spi@7000d400 {
compatible = "nvidia,tegra210-spi";
reg = <0x0 0x7000d400 0x0 0x200>;
interrupts = <0x0 0x3b 0x4>;
iommus = <0x2b 0xe>;
#address-cells = <0x1>;
#size-cells = <0x0>;
dmas = <0x4c 0xf 0x4c 0xf>;
dma-names = "rx", "tx";
nvidia,clk-parents = "pll_p", "clk_m";
clocks = <0x21 0x29 0x21 0xf3 0x21 0xe9>;
clock-names = "spi", "pll_p", "clk_m";
resets = <0x21 0x29>;
reset-names = "spi";
status = "okay";
num-cs = <0x2>;
cs-gpios = <0x56 0x13 0x1 0x56 0x14 0x1>;
linux,phandle = <0x10b>;
phandle = <0x10b>;

	prod-settings {
		#prod-cells = <0x3>;

		prod {
			prod = <0x4 0xfff 0x0>;
		};

		prod_c_flash {
			status = "disabled";
			prod = <0x4 0x3f 0x7>;
		};

		prod_c_loop {
			status = "disabled";
			prod = <0x4 0xfff 0x44b>;
		};
	};

	spi@0 {
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		compatible = "spidev";
		status = "okay";
		reg = <0x0>;
		spi-max-frequency = <0x3dfd240>;

		controller-data {
			nvidia,cs-setup-clk-count = <0x1e>;
			nvidia,cs-hold-clk-count = <0x1e>;
			nvidia,rx-clk-tap-delay = <0x1f>;
			nvidia,tx-clk-tap-delay = <0x0>;
		};
	};

	spi@1 {
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		compatible = "spidev";
		status = "okay";
		reg = <0x1>;
		spi-max-frequency = <0x3dfd240>;

		controller-data {
			nvidia,cs-setup-clk-count = <0x1e>;
			nvidia,cs-hold-clk-count = <0x1e>;
			nvidia,rx-clk-tap-delay = <0x1f>;
			nvidia,tx-clk-tap-delay = <0x0>;
		};
	};
};

`

But when the Nano boots, I don't see anything additional spi devices in the /proc/devicetree. For example, here is what is in /proc/device-tree/spi@7000d400:
nlbutts@jetson:/proc/device-tree/spi@7000d400$ ls '#address-cells' clocks dma-names interrupts linux,phandle nvidia,clk-parents prod-settings reset-names '#size-cells' clock-names compatible dmas iommus name phandle reg resets status

I've tried to manually insmod spidev, but that doesn't work either. Any ideas?

One or more files are corrupt or missing.

tegwyn@tegwyn:~$ cd /home/tegwyn/flash-dtb-update-2019-12-09 && sudo ./flashme.sh /dev/mmcblk0
[sudo] password for tegwyn:
One or more files are corrupt or missing.

flashme.sh: FAILED
md5sum: WARNING: 1 computed checksum did NOT match
tegwyn@tegwyn:~/flash-dtb-update-2019-12-09$

One or more files are corrupt or missing

Following the instructions given to the repo, I cloned it to my machine. There's no flashme.sh file in the root directory, but there is one in the /flash directory. However, when I try to execute it, I get the following error:

md5sum: ./hash.md5: No such file or directory
One or more files are corrupt or missing.

md5sum: ./hash.md5: No such file or directory

I'm running JetPack 4.2, if it is of any substance to the issue.

Licensing

Hi there! The patches are pretty awesome and work great, but I can't find any license in the repository, so it's practically impossible to use for other public projects. Do you have any plans to release these files under an open source license? 🙃

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.