1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
From cda956db2b54400c44cc8eb952276ecb058f57d8 Mon Sep 17 00:00:00 2001
From: Steve Kipisz <s-kipisz2@ti.com>
Date: Mon, 3 Jun 2013 04:35:51 -0500
Subject: [PATCH] am335x:Add minimal support for Beaglebone Black
- Detect Beaglebone Black and do the appropriate pin mux
- Add pin mux for eMMC
Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
---
arch/arm/mach-omap2/board-am335xevm.c | 49 ++++++++++++++++++++
arch/arm/mach-omap2/include/mach/board-am335xevm.h | 1 +
2 files changed, 50 insertions(+)
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
index 1523f33..c4a5c05 100644
--- a/arch/arm/mach-omap2/board-am335xevm.c
+++ b/arch/arm/mach-omap2/board-am335xevm.c
@@ -1654,6 +1654,21 @@ static void mmc1_wl12xx_init(int evm_id, int profile)
am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
}
+static void mmc1_emmc_init(int evm_id, int profile)
+{
+ setup_pin_mux(mmc1_common_pin_mux);
+ setup_pin_mux(mmc1_dat4_7_pin_mux);
+
+ am335x_mmc[1].mmc = 2;
+ am335x_mmc[1].caps = MMC_CAP_8_BIT_DATA;
+ am335x_mmc[1].gpio_cd = -EINVAL;
+ am335x_mmc[1].gpio_wp = -EINVAL;
+ am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
+
+ /* mmc will be initialized when mmc0_init is called */
+ return;
+}
+
static void mmc2_wl12xx_init(int evm_id, int profile)
{
setup_pin_mux(mmc2_wl12xx_pin_mux);
@@ -2177,6 +2192,21 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = {
{NULL, 0, 0},
};
+/* Beaglebone Black */
+static struct evm_dev_cfg beagleboneblack_dev_cfg[] = {
+ {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {clkout2_enable, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {mmc1_emmc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {sgx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
+ {NULL, 0, 0},
+};
+
/* EVM - Starter Kit */
static struct evm_dev_cfg evm_sk_dev_cfg[] = {
{am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
@@ -2280,6 +2310,23 @@ static void setup_beaglebone(void)
am33xx_cpsw_init(AM33XX_CPSW_MODE_MII, NULL, NULL);
}
+/* BeagleBone Black */
+static void setup_beagleboneblack(void)
+{
+ pr_info("The board is a AM335x Beaglebone Black.\n");
+
+ /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */
+ am335x_mmc[0].gpio_wp = -EINVAL;
+
+ _configure_device(BEAGLE_BONE_BLACK, beagleboneblack_dev_cfg,
+ PROFILE_NONE);
+
+ /* TPS65217 regulator has full constraints */
+ regulator_has_full_constraints();
+
+ am33xx_cpsw_init(AM33XX_CPSW_MODE_MII, NULL, NULL);
+}
+
/* EVM - Starter Kit */
static void setup_starterkit(void)
{
@@ -2372,6 +2419,8 @@ static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context)
setup_beaglebone_old();
else
setup_beaglebone();
+ } else if (!strncmp("A335BNLT", config.name, 8)) {
+ setup_beagleboneblack();
} else if (!strncmp("A335X_SK", config.name, 8)) {
daughter_brd_detected = false;
setup_starterkit();
diff --git a/arch/arm/mach-omap2/include/mach/board-am335xevm.h b/arch/arm/mach-omap2/include/mach/board-am335xevm.h
index e77d52c..915139a 100644
--- a/arch/arm/mach-omap2/include/mach/board-am335xevm.h
+++ b/arch/arm/mach-omap2/include/mach/board-am335xevm.h
@@ -26,6 +26,7 @@
#define BEAGLE_BONE_A3 3
#define EVM_SK 4
#define GEN_PURP_DDR3_EVM 5
+#define BEAGLE_BONE_BLACK 6
/* REVIST : check posibility of PROFILE_(x) syntax usage */
#define PROFILE_NONE -1 /* Few EVM doesn't have profiles */
--
1.7.9.5
|