Hey
I want to enable PPS on jetson nano for pin 18. I have read various threads on this forum, but things are a bit unclear for me.
I have e.g read this topic
just below
gpio: gpio@6000d000
(as suggested in another thread)
I made the change in
Linux_for_Tegra/sources/hardware/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi
My question is what is the further steps, like how to compile the file and where to copy the generated file and so on to make it work
Thanks!
I managed to modify Linux_for_Tegra/sources/hardware/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi and compile it and then copy it to /boot/dtb on a fresh image.
when I type the command dmesg | grep pps then I get
pps pps0: new PPS source pps.-1
pps pps0: Registered IRQ 114 as PPS source
and pps0 is showing up in /dev
so I think its okay
But in this thread
I got DTB and DTBO files from @shgarg , so I can enable mcp2515 can modules.
So here is my question I have one image where mcp2515 can modules are enabled (DTB and DTBO files from @shgarg) and works fine and I have another image with the pps what can I do so I have one image so both the mcp and the pps works because now I have one DTB where pps is enabled and another DTB and DTBO where mcp2515 can is enabled
Thanks!
First use dtc command to convert dtb to dts for pps dtb.
sudo dtc -I dtb -o pps.dts
In your current directory, you will have pps.dts file get saved.
Copy pps node contents from it and save it somewhere.
Convert final mcp dtb which got created, (you can find final dtb name in /boot/extlinux/extlinux.conf ) , same way to mcp.dts
Copy pps node contents to anywhere (may be after any spi node) in mcp.dts.
Convert final mcp.dts to final mcp-dtb :
sudo dtc -I dts mcp.dts -O dtb -o
Reboot device in such a way so that mcp dtb gets picked up.
What we did here is, we copied pps contents in mcp dtb, thus using both.
I copied it under spi node in the mcp.dts which I found under /boot/extlinux/extlinux.conf
Then I rebooted but it give me this on dmesg | grep pps
dmesg | grep pps
[ 0.599003] pps_core: LinuxPPS API ver. 1 registered
[ 0.599030] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
[ 4.936911] OF: /pps: could not get #gpio-cells for /i2c@7000d000/max77620@3c/regulators/ldo0
[ 4.945496] pps-gpio pps: failed to get GPIO from device tree
[ 4.951289] pps-gpio: probe of pps failed with error -22
and the pps is not showing up when I type ls /dev
and dmesg | grep mcp I get
dmesg | grep mcp
[ 7.430731] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[ 7.457439] mcp251x spi1.1 can1: MCP2515 successfully initialized.
[ 9.876498] mcp251x spi0.0: failed to acquire irq 0
[ 9.885470] mcp251x spi1.1: failed to acquire irq 0
[ 9.893469] mcp251x spi0.0: failed to acquire irq 0
[ 9.898811] mcp251x spi1.1: failed to acquire irq 0
[ 10.092435] mcp251x spi0.0: failed to acquire irq 0
[ 10.104904] mcp251x spi0.0: failed to acquire irq 0
[ 10.168316] mcp251x spi1.1: failed to acquire irq 0
[ 10.184133] mcp251x spi1.1: failed to acquire irq 0
I dont know if that is a problem for the mcp
Sorry I wrote wrong, its not under spi but below, as you just mentioned. According to this thread PPS On Jetson Nano - #4 by abc_ghm its pin 18. Sorry I dont think I copied som gpios content
Hi,
&gpio gives 0x56 in dts format. I don’t know how you ended up with 0x3d.
Have you updated MCP driver?
Also, I came up with new dtb for MCP use, in which you do not have to update mcp driver.
I will post those dtbs in MCP forum thread by today.
Try MCP communication with those dtbs.
For now, i think, your mcp driver change is not reflected here. Can you check once?
the mcp driver should be the modified one I always have used, because I took a copy of that image (there was working) and flashed to other sd cards and after that this happened with mcp, so maybe something went wrong. Because now im even not able to set the can1 interface up