Potential Issue with Lesson 2 – Device Tree Overlays

Forums Reference, Evaluation, and Development Boards Potential Issue with Lesson 2 – Device Tree Overlays

Viewing 2 reply threads
  • Author
    Posts
    • #8929
      Raymond WilliswillisNGC_39
      Participant

      I used the lesson 2 instructions at this link:

      OSD335x Lesson 2: Linux Device Tree


      It says minimal…..but if used with the current Bone Debian OS 9.5 /Kernel 4.14, you do not get eth0. In the lesson it has you remove all the CPSW and MAC configurations from your device tree overlay. In my desired use of the OS, I commented out using the PRU overlay also. The am335x-sm.dtsi does not come with everything needed to keep eth0 active (pin configurations and definitions). I created another overlay and left it all in and when I check using ifconfig in terminal, eth0 is back.
      I think with the new Bone Debian, if you use a created dtb, it will not use the default dtb for am335x-boneblack.dts, am33xx-dtsi, am335x-bone-common.dtsi, or am335x-boneblack-common.dtsi when the dtb is created using make. If I simply remove my previous dtb being defined in uEnv.txt (where eth0 wasn’t present) and reboot, it reappears.

      Not sure if this was intentional (being minimal boot lesson).

      • This topic was modified 4 years, 8 months ago by Raymond WilliswillisNGC_39.
    • #8956
      Eshtaartha Basu
      Moderator

      Hello willisNGC_39,

      Overall, the behavior you’re seeing is intentional.

      1. It says minimal…..but if used with the current Bone Debian OS 9.5 /Kernel 4.14, you do not get eth0.

      [Octavo]: By “Minimal” we mean putting together only the mandatory peripherals around the SiP to boot Linux and communicate with it. Since having an Ethernet PHY is not mandatory for Linux boot, it is not included. Please refer “Figure 5 Lesson 2 complete schematic” of https://octavosystems.com/app_notes/osd335x-design-tutorial/osd335x-lesson-2-minimal-linux-boot/osd335x-lesson-2-linux-bring-up/ to know more about the intended Lesson 2 hardware setup.

      2. The am335x-sm.dtsi does not come with everything needed to keep eth0 active (pin configurations and definitions). I created another overlay and left it all in and when I check using ifconfig in terminal, eth0 is back.

      [Octavo]: We believe you’re talking about “osd335x-sm.dtsi”. The purpose of SoC or SiP “.dtsi” files like “am33xx-dtsi” or “osd335x-sm.dtsi” is to capture all the peripherals within the SoC or SiP. However, these “dtsi” files are generic and not board specific. Hence, most of the peripherals will be “disabled” and pinmux will not be setup within these files. To describe the hardware on a specific board, it is necessary to create a main “dts” file that includes the SiP/SoC “.dtsi” file and enables board specific hardware and sets up board specific pinmux. This is what we’ve tried to explain in Section 1.3 of https://octavosystems.com/app_notes/osd335x-design-tutorial/osd335x-lesson-2-minimal-linux-boot/linux-device-tree/. This is also why all Beagle device trees consist of several files instead of just one.

      3. I think with the new Bone Debian, if you use a created dtb, it will not use the default dtb for am335x-boneblack.dts, am33xx-dtsi, am335x-bone-common.dtsi, or am335x-boneblack-common.dtsi when the dtb is created using make. If I simply remove my previous dtb being defined in uEnv.txt (where eth0 wasn’t present) and reboot, it reappears.

      [Octavo]: This is also expected behavior common to most Beagle/RED Debian images. Configuration of “uEnv.txt” is used to override the default boot parameters in U-Boot. If no “dtb” is set in uEnv.txt, U-Boot will choose a default device tree based on board specific “Board ID” present in the EEPROM. We believe you’re using one the BeagleBone Blacks. Hence, U-Boot is recognizing the board by reading the board ID and enabling the device tree corresponding to Black. Since Black has Ethernet on-board and it is enabled in its default tree, you’re able to see “eth0” when you remove your “dtb” declaration and reboot.

      We’d recommend reading the following app notes to get a better idea:

      1. All the app notes under Lesson 2 (they’re in a sequence and inter-related): https://octavosystems.com/app_notes/osd335x-design-tutorial/osd335x-lesson-2-minimal-linux-boot/

      2. EEPROM during boot (This app note explains the role of EEPROM and Board ID during Linux boot): https://octavosystems.com/app_notes/osd335x-eeprom-during-boot/

    • #9060
      Raymond WilliswillisNGC_39
      Participant

      Thanks for the feedback. That pretty much answered my question.

      FYI, by leaving in the CPSW and MAC information in the device tree overlay has Ethernet working again.

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