How to get my current device tree?

Hi,
I am looking for my current device tree so I can make a change to it to get my second standard SPI port outputs to work, as currently, I only have one. In reading the documentation is says to go to:
cp arch/arm/boot/dts/vf610-colibri-eval-v3.dts arch/arm/boot/dts/vf610-colibri-my-carrier.dts
top copy the dts file. However, I can’t seem to find any .dts files, only *.dts.xml files. And of course I am looking for a Verdiin version, not colibri. Where would I find this file? Also, in reading the documentation it mentions just doing a small add on file rather than the whole thing, but I don’t see how that works. Maybe I need to do more reading?

I do understand the basics of overwriting and such, but I need to know where to get the files to get started and to do the builds. From the documentation, it is on the device in the Torizon build. Is this correct? I just can’t seem to find it.

Any help would be appreciated.
Thanks,
Steve

dts and dtsi files can be found in the Linux source tree. Please refer to this article to get steps for Device Tree building. If you want to make small updates to Device Tree it’s simpler to use a Device tree Overlays.

Hi @alex.tx ,
Yes, That is what I need! Thanks, so much!

Steve

Hi @alex.tx ,
So, I got to the point where it calls for using dt checkout (torizoncore-builder dt checkout), but it gives this message:
The TorizonCore Builder team is re-evaluating the device tree and device tree overlays workflow, and the dt checkout command is currently not supported on TorizonCore 6. Learn how to clone the device trees and overlays repositories on Device Tree Overlays on Torizon | Toradex Developer Center

However the link it gives is the same place that told me to use that command, so at this point I can’t get the device trees to do the overlay. It is a different link, but it says to do the same thing. At this point I can’t list the overlays because I don’t have a ./devices directory.

error: missing device tree overlays directory 'device-trees/overlays

Thoughts?
Thanks,
Steve

It seems the link has changed recently, the correct section to look at is here: Device Tree Overlays on Torizon | Toradex Developer Center

Read carefully the section describing what to do if you’re using TorizonCore 6:

Make sure you’re following the instructions for the correct module so you get the correct versions of things.

Best Regards,
Jeremias

Hi @jeremias.tx,

Well, I used the torizoncore-buildinger images download --remote-host --remote-username --remote-password command, which yielded:
Downloading image from: https://artifacts.toradex.com/artifactory/torizoncore-oe-prerelease-frankfurt/kirkstone-6.x.y/monthly/6/verdin-imx8mp/torizon/torizon-core-docker/oedeploy/torizon-core-docker-verdin-imx8mp-Tezi_6.2.0-devel-202303+build.6.tar

I’m just not sure how to translate that into the correct git clone location. They have one listed there, but it points to branch toradex_5.15-2.1.x-imx and I am running 6.2, but I don’t know the name of the branch.

Thanks,
Steve

6.2 is the version of our TorizonCore OS. 5.15-2.1.x-imx refers to the version of the Linux kernel that TorizonCore uses. These numbers represent different things they are not meant to match. As the articles states if you’re using any version of TorizonCore 6 then the branch you want is “toradex_5.15-2.1.x-imx”.

Best Regards,
Jeremias

@jeremias.tx
OK, that is good to know.
Steve

@jeremias.tx, @alex.tx ,
Ok, hopefully my last question on this matter:
The last step in getting the list for the overlays for this particular board. In my case it’s a imx8mp-verdin board, but they only give the example commandline for the imx6dl-colibri:
torizoncore-builder dto list --device-tree ./linux/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
I have done some searching, but am unable to figure out what the dts filename would be for my module/board. There is nothing that has “verdin” or even imx8 in the name, using the example above.

Any help here?
Thanks,
Steve

There is a list of available device trees by module above that command in the article you are referencing:

By default Verdin’s use the dev board device tree, unless you changed it.

@jeremias.tx
OK, I get that. But I want to turn on SPI_2 (which is available according to the system docs), but where do I get the information that is in spidev_overlay.dts to turn it on? Is there a list somewhere?

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*

  • Copyright 2022 Toradex
    */

// Verdin imx8mp spidev

/dts-v1/;
/plugin/;

/ {
compatible = “toradex,verdin-imx8mp”;
};

/* Verdin SPI_1 */
&ecspi1 {
#address-cells = <1>;
#size-cells = <0>;
status = “okay”;

    spidev@0 {
            /* Use compatible "rohm,dh2228fv" to bind spidev driver */
            compatible = "rohm,dh2228fv";
            reg = <0>;
            spi-max-frequency = <10000000>;
    };

};

Since it’s supposed to be of the same type as SPI_1, I am assuming that I can just modify (or add it here?) to create it, and then rebuild it, with this new mod?
Also, if there are conflicting pins (like it think UART2 has with this device), do I need to turn off UART2 to do the pin changes in this build as well?

Steve

@jeremias.tx ,
Where would I find the default pinout file for the current module I have (Verdin imx8mp plus V1.1)?

Steve

Regarding SPI. What you see in that overlay is an overlay to enable SPIDEV on SPI 1. By default there is no SPI 2 configured. You would need to define and configure a new 2nd SPI interface in the device tree. Then you can enable it in a fashion similar to how SPI 1 is enabled in that overlay.

For reference you should go and see how SPI 1 is setup and configured then mimic something similar for SPI 2. Of course you’ll need to assign it different suitable pins.

Where would I find the default pinout file for the current module I have (Verdin imx8mp plus V1.1)?

I’m not sure what you’re asking for here. Are you asking for the default device tree? The device tree is the source of truth for how the pins are configured.

Best Regards,
Jeremias

@jeremias.tx ,
I am talking about the using the Pinout Designer and getting the current/default pinout file that is used on the device, since I am only adding the additional SPI port, just want to modify that one thing. I’ll be using part of the I2C1 pins, since there are others if I need them, which currently I don’t.

Also, in the list of verdin dts files, there are 2 that go with the dev board (since they have _dev in the name), imx8mp-verdin-nonwifi-dev.dts, imx8mp-verdin-wifi-dev.dts. I am assuming that since this is the 1.1 dev board it is the wifi version and not the nonwifi version. Is this correct?

Additionally, the directions direct you to imx8mp-pinfunc.h file which supposed to be available using the dt checkout builder function, which doesn’t work. This file is what I need to create the correct dts file for my spi2 object.

Steve

I am talking about the using the Pinout Designer and getting the current/default pinout file that is used on the device, since I am only adding the additional SPI port, just want to modify that one thing. I’ll be using part of the I2C1 pins, since there are others if I need them, which currently I don’t.

The pinout designer doesn’t show the “default” pinouts since this is dependent on what we configure in software, which changes. The experimental Web UI version of our pinout designer can show how the pins are configured for certain carrier boards, but the Web UI version is in beta and the information may not be up-to-date. Unless I’m still misunderstanding your question.

I am assuming that since this is the 1.1 dev board it is the wifi version and not the nonwifi version. Is this correct?

Depends do you have the variant of the Verdin i.MX8M Plus module with or without WiFi & Bluetooth? It has nothing to do with the version of the dev carrier board.

Additionally, the directions direct you to imx8mp-pinfunc.h file which supposed to be available using the dt checkout builder function, which doesn’t work. This file is what I need to create the correct dts file for my spi2 object.

This file can be found in the Linux kernel source right here: imx8mp-pinfunc.h « freescale « dts « boot « arm64 « arch - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

You can find this in the source code that the directions had you clone if you search through it. Everything that was provided from the dt checkout command can be found in the code repositories that you cloned, just search through them.

Best Regards,
Jeremias

@jeremias.tx
Well, I couldn’t use the dt checkout command because it doesn’t work for Torizon 6. You have to clone the repository for Torizon 6. I was looking for it under the “device-trees” directory since that is where they say it is.

So then, the pinout designer doesn’t produce any usable output? Changes are all done in the dts files only?
Steve

So then, the pinout designer doesn’t produce any usable output? Changes are all done in the dts files only?

The pin-out designer is for looking at available hardware interfaces/options and seeing if there are any conflicts. This tool is a purely from the hardware point of view. For actual software configurations then that happens in the device tree files if you are using a Linux-based OS.

Best Regards,
Jeremias