Hi, I want to use 1-wire with Xavier AGX on Jetpack5.1. Can I now just configure this in the menuconfig or do I still need to make changes to the tegra_defconfig and the dts as suggested here ?
Hi michael.campbell,
Are you using the devkit or custom board?
Could you help to verify with the latest JP5.1.2(R35.4.1)?
Yes, you need to configure the kernel config to enable it and also the pinmux.
Please just refer that topic but notice that there should be some differences because they are from different platform and release.
May I know what’s your use case for 1-wire interface?
Hi KevinFFF,
I’m using a devkit. I’ve installed JP5.1.2 with R35.4.1. The use case is that I’m trying to get the DS18B20+ sensor working on the Xavier AGX with 1-wire.
In menuconfig, device drivers I selected the Dallas’s 1-wire support. But I wasn’t sure if that was working so I added CONFIG_W1_MASTER_GPIO=y, CONFIG_W1=y, and CONFIG_W1_SLAVE_THERM=y to tegra_defconfig
I edited tegra194-p2888-0001-p2822-0000.dts in /hardware/nvidia/platform/t19x/galen/kernel-dts. I had tried to add:
onewire@0 {
compatible = “w1-gpio”;
gpios = <&gpio TEGRA_GPIO(H, 4) 0>;
};
But I couldn’t get it to compile. So I changed it to:
onewire@0 {
compatible = "w1-gpio";
gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(H, 4) 0>;
};
And it compiled. Maybe this was the wrong thing to do? I haven’t generated the dt file from the pinmux spreadsheet as the macro has been blocked. If I can get the macro working, what would I need to change in that file?
After adding the terms to tegra_defconfig and the dts file, I followed this (NVIDIA Jetson Xavier - Compile and Build JetPack 5.0.2 - RidgeRun Developer Wiki) to build the kernel.
After flashing the Xavier, I can see a w1 directory in /sys/bus/. But I can’t see onewire in /proc/device-tree.
Thanks for you help btw. I’m just copying other peoples solutions without a 100% understanding of whats happening. Makes it v.difficult to debug when its not working. So I really appreciate your help!
You may need to know every steps so that you could port and enable it correctly.
Which pin would you like to use for 1-wire interface? (currently, you are using PH.04
)
Could you build the kernel image/dtb and update them to flash the board successfully?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.