Monday, June 10, 2013

Black is White is Grey

Got a BeagleBone Black and a cape for the white that uses the eMMC signals?

Bas Laarhoven has verified a fix for turning your BBB into a BBW (or perhaps that's BeagleBone Grey?).  Details are in the Google groups thread (scroll to the bottom for the fix), and summarized here:
  • Find the mmc2 section in the BeagleBone Black device tree and change
    status = "okay"
    -to-
    status = "disabled" 
  • Add "gpio set 52" to your uboot configuration to put the eMMC chip in reset at boot time
  • Enable the eMMC hardware reset pin.  This is a one-time configuration (it survives power cycles and cannot be changed once enabled) you can perform with either uboot or the mmc-utils program.
This gets the run-time behavior of your BeagleBone black matching the original BeagleBone  White, but there is still a boot-time difference.  As shipped, the Black will attempt to access the eMMC card as the first boot device, so if you cannot tolerate ANY transitions on the eMMC lines, you need to modify the boot configuration.  By moving one resistor (R68 to R93), you can pull SYS_BOOT2 low (same as pressing the uSD boot button) and the 'Black will not try to communicate with the on-board eMMC card.  It WILL, however, attempt to boot via SPI and twiddle pins on P9.

If you want to completely mimic the original BeagleBone boot behavior, you need to swap four resistors on the 'Black, or otherwise set the proper boot mode via the LCD_DATA pins on P8.  Details of what needs to be setup:
  • SYS_BOOT0 = 1: Move R95 to R70 or pull down LCD_DATA0 during reset
  • SYS_BOOT1 = 1: Move R94 to R69 or pull down LCD_DATA1 during reset
  • SYS_BOOT2 = 1: No change needed, leave R68 alone
  • SYS_BOOT3 = 0: Move R67 to R92 or pull up LCD_DATA3 during reset
So now you can turn your BeagleBone Black into a BeagleBone Grey and make it fully hardware compatible with the White (well, except for the more memory and faster CPU bits!).  All you need to do is find appropriate drivers or software to deal with the new 3.8 kernel changes.

Oh, and if you're worried about wasting money on the on-board eMMC card, don't be.  Even if you disable the  eMMC card at boot time via the resistor mods it's not gone.  You can still load a device tree overlay and start talking to it (assuming you don't have a conflicting cape plugged in).  If you are leaving 'Black booting from the on-chip eMMC, just tweak uEnv.txt and pop out your SD card and you're back to full Black, booting from the on-board flash.

2 comments:

  1. Hi,

    i have added the following to my uEnv.txt:


    optargs=capemgr.disable_partno=BB-BONE-EMMC-2G
    mmcreset=mmc dev 1; mmc rstn 1; gpio set 52
    uenvcmd=run mmcreset; ...


    but the eMMC stills show up in the slots :

    4: ff:P-O-- Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
    5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI

    how can i get rid of it (for good) ?




    ReplyDelete
  2. The eMMC driver is not loaded (no 'L' at the end of the flags string), so it is disabled as desired.

    To "get rid of it for good", you would have to remove the part from the board, then re-code the kernel logic to know that the part was removed. Both the eMMC and the HDMI "capes" always show up in the slots file because they are always physically present on a BBB, even if you don't load the driver.

    ReplyDelete