I need to change the default level of gpio configured in the device tree to default high. Now I have copied the newly modified device tree dtsi to Linux_for_Tegra/bootloader/tegra234-mb1-bct-gpio-p3767-hdmi-a03.dtsi。
I need to change the default level of PDD.01 and PDD.02 to high level.
*** Please note that this reply is generated by LLM automatically ***
To modify the device tree in the device without having to rewrite the entire system, you can use the dtb (Device Tree Blob) file. The dtb file is a compiled version of the device tree source files (.dtsi and .dts files).
Here are the steps to modify the device tree in the device:
Locate the dtb file: The dtb file is usually located in the /boot directory of the device. You can check the location of the dtb file by running the command find /boot -name "*.dtb".
Extract the dtb file: You can extract the dtb file from the device using the scp command or by mounting the device’s file system on your host machine.
Decompile the dtb file: Once you have the dtb file, you can decompile it using the dtc (Device Tree Compiler) tool. The dtc tool is usually available in the Linux kernel source tree.
To decompile the dtb file, run the command:
dtc -I dtb -O dts -o output.dts input.dtb
Replace `input.dtb` with the name of your `dtb` file and `output.dts` with the desired output file name.
4. **Modify the device tree**: After decompiling the `dtb` file, you can modify the device tree source file (`output.dts`) to change the default level of the GPIO configured in the device tree to default high.
5. **Recompile the device tree**: Once you have modified the device tree source file, you can recompile it using the `dtc` tool.
To recompile the device tree, run the command:
```bash
dtc -I dts -O dtb -o output.dtb input.dts
Replace input.dts with the name of your modified device tree source file and output.dtb with the desired output file name.
Replace the original dtb file: After recompiling the device tree, you can replace the original dtb file on the device with the new dtb file.
To replace the original dtb file, you can use the scp command or by mounting the device’s file system on your host machine.
Comparison with rewriting the entire system:
Rewriting the entire system involves reflashing the device with a new image, which can be time-consuming and may require additional steps such as updating the bootloader and kernel.
Modifying the device tree in the device without rewriting the entire system is a more efficient approach, as it only requires updating the dtb file. However, this approach requires more technical expertise and may not be suitable for all use cases.
Additional considerations:
Make sure to backup the original dtb file before modifying it, in case you need to revert to the original configuration.
Verify that the modified device tree is compatible with the device’s hardware and software configuration.
Test the modified device tree thoroughly to ensure that it works as expected.
In your case, since you have already modified the device tree source file (dtsi file), you can follow the steps above to modify the device tree in the device without rewriting the entire system.
*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***
I need to modify the default configuration of gpio to take effect immediately after power on. gpio defaults to high level in both bootloader and kernel. Can I burn bootloader and kernel separately without modifying other partitions?
Because I have created backup partitions for each partition, I only want to refresh and modify the MB1-BCT partitions related to the device tree(remaking the entire system will take more than a day), without modifying other partitions .
After following this instruction, I found that after about 100ms of powering on Orin, PDD.01 and PDD.02 showed a phenomenon of pulling low and pulling high. I would like to modify it to continuously pulling high. Before flashing A_MB1_BCT/B_MB1_BCT, there will be two instances of pulling low and pulling high during the entire boot process. After burning the bootloader, there will be one occurrence. Do partitions still need to be flushed again?
It is expected that the A/B slot for bootloader is enabled by default.
Please check what cause this behavior and how did you configure the pinmux for PDD.01 and PDD.02.
I would expect you to use the pinmux spreadsheet and configure them as following. (If you want to use them as Output/Default High).
Then I found that the number of times PDD.01 and PDD.02 were pulled down and up decreased, indicating that the modifications had taken effect. However, there may be other related partitions that need to be rewritten,I don’t know which partition needs to be rewritten?
You have to check what causes this behavior. (ie. what pulls the pin to LOW?)
If you have configured the pinmux correctly as I mentioned, then it should output HIGH by default.
Could you please identify where it is being pulled low? (e.g., UEFI, Kernel, or User space?)
Is there any driver using these 2 pins in your case? Or do you connect any external device?
Will Orin Nano pull down all gpio when it is first powered on?
When the Orin Nano was powered on for about 100ms, it experienced a pull low and has not yet started into the user space.
PDD.01 & PDD.02 connected to MCU, the MCU controls its functions by obtaining the high and low levels of PDD.01&PDD.02. However, the current low voltage during power on causes confusion in MCU control and prevents it from functioning properly
I don’t think so. Pinmux is configured in MB1_BCT during early boot.
What’s the pin state before power on? LOW?
Is the following your current result?
Low(power off) → High(power on) → (100ms later) → Low to High → High (booted)
Please provide a waveform (scope/LA) confirming the power-on sequence and the exact timing of the unexpected pulldown.