Bootloader / t186ref / BCT / directory

I read this document

https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxOrinSeries.html#board-configuration

" Copy the pinmux.dtsi file to the <l4t_top>/bootloader/t186ref/BCT/ directory "

I can not find this directory in /bootloader.

After unzip Jetson_Linux_R36.3.0_aarch64.tbz2 to Linux_for_Tegra,
and extract tegra_linux_sample-root-filesystem_r36.3.0_aarch64.tbz2 to Linux_for_Tegra/rootfs,
i run apply_binaries.sh.

Now i would add pinmux dtsi files, but i can not find folder t186ref.
Folder BCT located in - Linux_for_Tegra/bootloader/generic/ directory.

Should i place pinmux.dtsi to Linux_for_Tegra/bootloader/generic/BCT?
Or am I doing something wrong?

Anower question - file board.conf. As i undestund, i should create this file.
In
https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxOrinSeries.html#flashing-the-build-image
i find example:

source “${LDK_DIR}/p3701.conf.common”;

PINMUX_CONFIG=“tegra234-mb1-bct-pinmux-p3701-0000.dtsi”;
BPFDTB_FILE=tegra234-bpmp-3701-0000-3737-0000.dtb;
DTB_FILE=tegra234-p3701-0000-p3737-0000.dtb;
TBCDTB_FILE=tegra234-p3701-0000-p3737-0000.dtb;
EMMC_BCT=tegra234-p3701-0000-p3737-0000-TE990M-sdram.dts;
MISC_CONFIG=tegra234-mb1-bct-misc-p3701-0000.dts;

I read “After copying the files, ensure that you point these files to the new board.conf file that you created for your board.”

I should change only PINMUX_CONFIG?
Or also add GPIO_CONFIG?
Should i add PMC_CONFIG?
Should I not change the remaining entries?

First thing first… you posted a document of rel-35.3.1.
But you are installing rel-36.3 release.

Thank you.
I have more questions.

In Jetson AGX Orin Platform Adaptation and Bring-Up i read -

To support a Jetson AGX Orin module with your carrier board, you must assign the module/carrier board combination with a lowercase alphanumeric name. The name can include hyphens (-) and underscores (_) but not spaces. Some examples of valid names are:

I can’t figure out how to do this - where should I assign this name?
what should I do to make this name appear in:

  • Filenames and pathnames
  • User-visible device tree filenames

This actually could be ignored. Does not really matter. If you want to use default board config, then it is also fine.

The documentation contains entries that need to be added to the device tree to connect RGMII.
But the name of this file and where it is located are not specified.
How can I find this file?

Do you have some background knowledge about device tree?

Honestly there is no need to “memorize” what file needs to be used.
What you should learn is check which device tree is in use on your board first and go to trace that code…

Quite a long time ago I worked with freescale processors, but everything was a little different there.

Now the module is connected to the board I developed, and it is in recovery mode.
I’m building Linux on the host machine, and then I’m going to flash the module.

Since the device is in recovery mode, I probably won’t be able to check which device tree is in use.

It seems you think of the issue too complicated…

You don’t need to develop this as “I must finish it 100% completed in one step”.

Just flash it …
When the host PC flashes your Jetson, it will tell you which file is the kernel dtb in its flash log… Then you can go back to develop the device tree…

You should check the issue one by one. Doing all things in just one step will just make you hard to debug… this is based on past experience from other users…

Thanks! I’ll try it.

Hello!
I have some success, I successfully reflashed the module.

Although not everything is clear.
I found a file that contains

PINMUX_CONFIG =tegra234-mb1-bct-pinmux-p3701-0000.dtsi;
PMC_CONFIG =tegra234-mb1-bct-padvoltage-p3701-0000.dtsi;

But what about the gpio.dtsi file? How do I write it - GPIO_CONFIG = gpio.dtsi ?

I have flashed the device but I still don’t know in which dts file to add entries for RGMII.
Is this mentioned anywhere?

Also, I probably need to disable other devices that are not implemented in my board, for example MGBE.

Read the default content of tegra234-mb1-bct-pinmux-p3701-0000.dtsi and you will know the answer.

I have flashed the device but I still don’t know in which dts file to add entries for RGMII.

If you don’t know where it is, attach your full flash log…

I attach log file.
Jetson_flash.log.txt (96.4 KB)

opy /home/jetson/Jetson_RT/Linux_for_Tegra/kernel/dtb/tegra234-p3737-0000+p3701-0004-nv.dtb to /home/jetson/Jetson_RT/Linux_for_Tegra/kernel/dtb/tegra234-p3737-0000+p3701-0004-nv.dtb.rec

This tegra234-p3737-0000+p3701-0004-nv.dtb is the one you are using on that board.


how do you suggest I edit it?

Again… back to device tree knowledge…

This file on BSP is a binary.

To check the content of it, you could

  1. Convert a binary to source code. Search DTC tool over the Internet and you could find the answer.

  2. Get the source code itself… it is provided on website.
    Jetson Linux Archive | NVIDIA Developer

I converted the dtb file to dts and added

        /* EQOS */
	ethernet0: ethernet@2310000 {
		status = "okay";
		nvidia,mac-addr-idx = <0>;
		nvidia,phy-reset-gpio = <&tegra_main_gpio TEGRA234_MAIN_GPIO(G, 5) 0>;
		phy-mode = "rgmii-id";
		//phy-handle = <&phy>;

		mdio {
			compatible = "nvidia,eqos-mdio";
			#address-cells = <1>;
			#size-cells = <0>;

			phy: phy@1 {        /* phy@1*/
				compatible = "micrel,ksz9031";
				device_type = "ethernet-phy";
				reg = <1>;     /*reg = <1>; */
				nvidia,phy-rst-pdelay-msec = <224>; /* msec */
				nvidia,phy-rst-duration-usec = <10000>; /* usec */
				interrupt-parent = <&tegra_main_gpio>; 
				interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
				micrel,copper-mode;
                		micrel,reg-init = <0x3 0x12 0x7fff 0x880>;
                		phandle = <0x21>;
			};
			
		};
	};

but I can’t convert it to dtb.
FATAL ERROR: Unable to parse input tree

This is the line:

nvidia,phy-reset-gpio = <&tegra_main_gpio TEGRA234_MAIN_GPIO(G, 5) 0>;

Also, there is an error in another line:
interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;

You need to follow method (2) to add such. DTC tool cannot recognize what is TEGRA234_MAIN_GPIO.

By sources you meant Driver Package (BSP) Sources ?
In folder kernel_src i only find tegra234-p3737-0000+p3701-0000.dts, there isn’t p3701-0004.dts
How to be in this case?

Please check kernel_oot_modules_src.tbz2

Hello.
RGMI Still won’t connect.

Here are the steps I take:

1 i change pinmux and gpio files.

2 In Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/nv-platform
i add entries to tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi file

        /* EQOS */
	ethernet0: ethernet@2310000 {
		status = "okay";
		nvidia,mac-addr-idx = <0>;
		nvidia,phy-reset-gpio = <&gpio TEGRA234_MAIN_GPIO(G, 5) 0>;
		phy-mode = "rgmii-id";
		//phy-handle = <&phy>;

		mdio {
			compatible = "nvidia,eqos-mdio";
			#address-cells = <1>;
			#size-cells = <0>;

			phy: phy@1 {        /* phy@1*/
				compatible = "micrel,ksz9131";
				device_type = "ethernet-phy";
				reg = <3>;     /*reg = <1>; */
				nvidia,phy-rst-pdelay-msec = <224>; /* msec */
				nvidia,phy-rst-duration-usec = <10000>; /* usec */
				interrupt-parent = <&gpio>; 
				interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
				micrel,copper-mode;
                		/* micrel,reg-init = <0x3 0x12 0x7fff 0x880>;*/
                		phandle = <0x21>;
			};
		};
	};

3 Then I create and rewrite DTB files

$ export CROSS_COMPILE=/bin/aarch64-buildroot-linux-gnu-
$ export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
$ make dtbs
$ cp nvidia-oot/device-tree/platform/generic-dts/dtbs/* /Linux_for_Tegra/kernel/dtb/

I checked tegra234-p3737-0000+p3701-0004-nv.dtb the added entries actually appeared in it.

After flashing the firmware, I do not find any messages about RGMII PHY in the boot log.

I add the converted one dtb, pinmux, and boot_log files.
boot_log.txt.txt (42.6 KB)
tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi.txt (63.6 KB)
tegra234-p3737-0000+p3701-0004-nv.dts.txt (316.9 KB)

I don’t understand why it doesn’t work, it seems like I’m doing everything right, but there’s no result