Commit ee8c4fb6c1bd8848a40b7812be99d17ef52a5d69

Authored by Eric Lee
1 parent 602e3675c4

Add support (0001-am335x-Add-minimal-support-for-Beaglebone-Black.patch) for Beaglebone Black

Showing 2 changed files with 50 additions and 0 deletions Side-by-side Diff

arch/arm/mach-omap2/board-am335xevm.c
... ... @@ -1654,6 +1654,21 @@
1654 1654 am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
1655 1655 }
1656 1656  
  1657 +static void mmc1_emmc_init(int evm_id, int profile)
  1658 +{
  1659 + setup_pin_mux(mmc1_common_pin_mux);
  1660 + setup_pin_mux(mmc1_dat4_7_pin_mux);
  1661 +
  1662 + am335x_mmc[1].mmc = 2;
  1663 + am335x_mmc[1].caps = MMC_CAP_8_BIT_DATA;
  1664 + am335x_mmc[1].gpio_cd = -EINVAL;
  1665 + am335x_mmc[1].gpio_wp = -EINVAL;
  1666 + am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
  1667 +
  1668 + /* mmc will be initialized when mmc0_init is called */
  1669 + return;
  1670 +}
  1671 +
1657 1672 static void mmc2_wl12xx_init(int evm_id, int profile)
1658 1673 {
1659 1674 setup_pin_mux(mmc2_wl12xx_pin_mux);
... ... @@ -2177,6 +2192,21 @@
2177 2192 {NULL, 0, 0},
2178 2193 };
2179 2194  
  2195 +/* Beaglebone Black */
  2196 +static struct evm_dev_cfg beagleboneblack_dev_cfg[] = {
  2197 + {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2198 + {clkout2_enable, DEV_ON_BASEBOARD, PROFILE_NONE},
  2199 + {tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2200 + {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2201 + {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2202 + {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2203 + {mmc1_emmc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2204 + {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2205 + {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2206 + {sgx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2207 + {NULL, 0, 0},
  2208 +};
  2209 +
2180 2210 /* EVM - Starter Kit */
2181 2211 static struct evm_dev_cfg evm_sk_dev_cfg[] = {
2182 2212 {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
... ... @@ -2376,6 +2406,23 @@
2376 2406 am33xx_cpsw_init(AM33XX_CPSW_MODE_MII, NULL, NULL);
2377 2407 }
2378 2408  
  2409 +/* BeagleBone Black */
  2410 +static void setup_beagleboneblack(void)
  2411 +{
  2412 + pr_info("The board is a AM335x Beaglebone Black.\n");
  2413 +
  2414 + /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */
  2415 + am335x_mmc[0].gpio_wp = -EINVAL;
  2416 +
  2417 + _configure_device(BEAGLE_BONE_BLACK, beagleboneblack_dev_cfg,
  2418 + PROFILE_NONE);
  2419 +
  2420 + /* TPS65217 regulator has full constraints */
  2421 + regulator_has_full_constraints();
  2422 +
  2423 + am33xx_cpsw_init(AM33XX_CPSW_MODE_MII, NULL, NULL);
  2424 +}
  2425 +
2379 2426 /* EVM - Starter Kit */
2380 2427 static void setup_starterkit(void)
2381 2428 {
... ... @@ -2468,6 +2515,8 @@
2468 2515 setup_beaglebone_old();
2469 2516 else
2470 2517 setup_beaglebone();
  2518 + } else if (!strncmp("A335BNLT", config.name, 8)) {
  2519 + setup_beagleboneblack();
2471 2520 } else if (!strncmp("A335X_SK", config.name, 8)) {
2472 2521 daughter_brd_detected = false;
2473 2522 setup_starterkit();
arch/arm/mach-omap2/include/mach/board-am335xevm.h
... ... @@ -26,6 +26,7 @@
26 26 #define BEAGLE_BONE_A3 3
27 27 #define EVM_SK 4
28 28 #define GEN_PURP_DDR3_EVM 5
  29 +#define BEAGLE_BONE_BLACK 6
29 30  
30 31 /* REVIST : check posibility of PROFILE_(x) syntax usage */
31 32 #define PROFILE_NONE -1 /* Few EVM doesn't have profiles */