Skip to end of metadata
Go to start of metadata

Connect a supported expansion board to an AM335x development kit without needing to recompile or flash the Device Tree. This is an alternative to Device Tree Overlays, which is not supported in the 3.12 kernel. 

 

The AM335x Yocto BSPs support enabling and disabling various expansion boards that may be used along with the carrier board via the bootloader. This functionality allows for certain pin configurations to be added or removed from the device tree without needing to recompile the kernel or reflash images. The following example demonstrates how to disable the LCD-018 expansion board on phyCORE-AM335x Rapid Development Kit to allow those pins to be used for a custom purpose.

Step-by-step guide

  1. Disconnect power supply before connecting the expansion board to the development kit.
  2. Once the expansion board has been connected, power on the development kit and hit any key to boot into barebox when prompted:

    Hit m for menu or any other key to stop autoboot:   3
     
    type exit to get to the menu
    barebox@Phytec_phyCORE_AM335x:/



  3. To view the available expansion boards:

    ls /env/expansions/
    . ..
    am335x-phytec-lcd-018-pba-b-01  am335x-phytec-lcd-018-pba-c-01
    am335x-phytec-lcd-018-pcm-953   am335x-phytec-lcd-018-peb-av-02
    am335x-wega-peb-av-01           am335x-wega-peb-eval-01

    Please note that not all of these will be compatible with your specific board.

  4. Edit /env/config-expansions to modify which expansions are enabled:

    edit /env/config-expansions

     

    1. You should see something similar to the following. By default, Barebox built with the phyCORE-AM335x RDK configures the kernel to enable display LCD-018:

      #!/bin/sh
      . /env/expansions/am335x-phytec-lcd-018-pcm-953 
  5. Remove the line  . /env/expansions/am335x-phytec-lcd-018-pcm-953 so that the LCD pins are not configured for LCD-018 when the kernel is booted. You may create your own custom expansion files to enable by following the format described below.
    1. The expansions make use of the barebox command of_enable_node which enables the device tree node. For example, the expansion configuration file /env/expansions/am335x-phytec-lcd-018-pcm-953 contains the following lines:

      of_enable_node /panel
      of_enable_node /backlight
      of_enable_node /ocp/lcdc@0x4830e000/
      of_enable_node /ocp/epwmss@48300000/
      of_enable_node /ocp/epwmss@48300000/ecap@48300100/
      of_enable_node /ocp/i2c@44e0b000/touchscreen@38/ 

      When using of_enable_node, you must list the full path to the node as it is implemented in the device tree.