How to customize device tree?

Forums Reference, Evaluation, and Development Boards OSD3358-SM-RED How to customize device tree?

Viewing 6 reply threads
  • Author
    Posts
    • #5710
      Sam Absamy03
      Participant

      Hi,

      I am working on my custom board, and have no idea on how to customize device tree for my hardware. Can anyone please help me out with the whole process on how to customize dts and then generate dtb.

      Thank you

    • #5711
      Eshtaartha Basu
      Moderator

      Hello samy03,

      The following application notes should help you with modifying Device Trees and creating/modifying Device Tree Overlays :

      1. App note on Device Tree: https://octavosystems.com/app_notes/osd335x-design-tutorial/osd335x-lesson-2-minimal-linux-boot/linux-device-tree/

      2. App note on Device Tree Overlay: https://octavosystems.com/app_notes/osd335x-design-tutorial/osd335x-lesson-2-minimal-linux-boot/linux-device-tree-overlay/

      Please let us know if you have any other concerns.

    • #6147
      Sam Absamy03
      Participant

      Hi Eshtaartha,

       

      I know this is an old post, but I lost my linux computer and had to get a new one. Now I am building device tree again and following the procedure in App note but I get the following error after executing make : “/bin/sh: 1: /usr/bin/dtc: Exec format error”

      I would really appreciate your help.

      Thank you

       

    • #6148
      Sam Absamy03
      Participant

      Sorry my bad. I was trying to execute make from my ubuntu machine, instead of running it from my RED board.

      I got it working once I ran make on RED board.

    • #6149
      Eshtaartha Basu
      Moderator

      Hello samy03,

      We’re glad to know that you were able to fix the issue.

      On an Ubuntu PC, you will have to install and configure dtc manually. We believe your original error was related to dtc path or configuration on your Ubuntu PC. But, the RED image and all BeagleBoard Debian images come preinstalled with dtc.  This is the reason you haven’t faced any dtc related issues when you switched to the RED platform.

      Please let us know if you have any other questions.

    • #8382
      Raymond WilliswillisNGC_39
      Participant

      I followed the instructions for the device tree overlay but now can’t communicate to my Octavo Redboard at all. It seems to be stuck in boot up.

      I was trying to do the following:
      -Activate I2C2
      -Activate SPI0
      -Activate mcasp0
      -Include the Sound in kernel to add a tlv320aic31xx Sound Codec.

      I need that SPI0 activated to use for special devices.
      I need the I2C2 and mcasp0 active to try and use a tlv320aic31xx development board. I want to put sound out to the codec to be amplified and cannot use the HDMI port to do this.
      I believe the codec has to be added to the kernel layers but the above sound codec seems to have been incorporated before and was just removed for the Redboard. So I did not remove it form the modified device tree and performed all the steps, including modifying the uEnv.txt file. If needed, I can add my modified files.

    • #8388
      Neeraj Dantu
      Moderator

      Willis,

      There was most likely an issue with a driver instantiation or peripheral definition in the device tree overlay.

      If you have a USB to UART converter cable, you can use a serial terminal application like Putty on your computer to look at the boot messages and determine where the board is getting stuck.

      The procedure to boot from the SD card interface and flash the eMMC is described in https://octavosystems.com/forums/topic/flash-the-emmc-of-the-octavo-red/. If you want to recover from the error with the device tree overlay without loosing your files in the eMMC, you would have to boot from the SD card, mount the eMMC and edit the boot/uEnv.txt file to disable the problematic device tree overlay by commenting the line in which it is assigned to uboot_overlay_addrx.

      Hope that helps.

      Best,

      Neeraj

Viewing 6 reply threads
  • You must be logged in to reply to this topic.