summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorFranklin S. Cooper Jr <fcooper@ti.com>2013-06-27 10:57:34 -0500
committerDenys Dmytriyenko <denys@ti.com>2013-07-02 12:00:43 -0400
commit0bd76f05cd384d988148d8f512cbdc342ab697c0 (patch)
tree03b1a09716e7fc10d674636e2ba0cdbb1dfa48fd /recipes-kernel
parent5649700b667afe16ec123608c33cd123c4b37f9a (diff)
downloadmeta-ti-0bd76f05cd384d988148d8f512cbdc342ab697c0.tar.gz
linux-am335x-psp: Add Beaglebone Black support
Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/linux-am335x-psp-3.2/0001-am335x-Add-minimal-support-for-Beaglebone-Black.patch110
-rw-r--r--recipes-kernel/linux/linux-am335x-psp_3.2.bb5
2 files changed, 114 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-am335x-psp-3.2/0001-am335x-Add-minimal-support-for-Beaglebone-Black.patch b/recipes-kernel/linux/linux-am335x-psp-3.2/0001-am335x-Add-minimal-support-for-Beaglebone-Black.patch
new file mode 100644
index 00000000..ec83d199
--- /dev/null
+++ b/recipes-kernel/linux/linux-am335x-psp-3.2/0001-am335x-Add-minimal-support-for-Beaglebone-Black.patch
@@ -0,0 +1,110 @@
1From cda956db2b54400c44cc8eb952276ecb058f57d8 Mon Sep 17 00:00:00 2001
2From: Steve Kipisz <s-kipisz2@ti.com>
3Date: Mon, 3 Jun 2013 04:35:51 -0500
4Subject: [PATCH] am335x:Add minimal support for Beaglebone Black
5
6- Detect Beaglebone Black and do the appropriate pin mux
7- Add pin mux for eMMC
8
9Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
10---
11 arch/arm/mach-omap2/board-am335xevm.c | 49 ++++++++++++++++++++
12 arch/arm/mach-omap2/include/mach/board-am335xevm.h | 1 +
13 2 files changed, 50 insertions(+)
14
15diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
16index 1523f33..c4a5c05 100644
17--- a/arch/arm/mach-omap2/board-am335xevm.c
18+++ b/arch/arm/mach-omap2/board-am335xevm.c
19@@ -1654,6 +1654,21 @@ static void mmc1_wl12xx_init(int evm_id, int profile)
20 am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
21 }
22
23+static void mmc1_emmc_init(int evm_id, int profile)
24+{
25+ setup_pin_mux(mmc1_common_pin_mux);
26+ setup_pin_mux(mmc1_dat4_7_pin_mux);
27+
28+ am335x_mmc[1].mmc = 2;
29+ am335x_mmc[1].caps = MMC_CAP_8_BIT_DATA;
30+ am335x_mmc[1].gpio_cd = -EINVAL;
31+ am335x_mmc[1].gpio_wp = -EINVAL;
32+ am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
33+
34+ /* mmc will be initialized when mmc0_init is called */
35+ return;
36+}
37+
38 static void mmc2_wl12xx_init(int evm_id, int profile)
39 {
40 setup_pin_mux(mmc2_wl12xx_pin_mux);
41@@ -2177,6 +2192,21 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = {
42 {NULL, 0, 0},
43 };
44
45+/* Beaglebone Black */
46+static struct evm_dev_cfg beagleboneblack_dev_cfg[] = {
47+ {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
48+ {clkout2_enable, DEV_ON_BASEBOARD, PROFILE_NONE},
49+ {tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE},
50+ {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
51+ {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
52+ {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
53+ {mmc1_emmc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
54+ {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
55+ {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
56+ {sgx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
57+ {NULL, 0, 0},
58+};
59+
60 /* EVM - Starter Kit */
61 static struct evm_dev_cfg evm_sk_dev_cfg[] = {
62 {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
63@@ -2280,6 +2310,23 @@ static void setup_beaglebone(void)
64 am33xx_cpsw_init(AM33XX_CPSW_MODE_MII, NULL, NULL);
65 }
66
67+/* BeagleBone Black */
68+static void setup_beagleboneblack(void)
69+{
70+ pr_info("The board is a AM335x Beaglebone Black.\n");
71+
72+ /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */
73+ am335x_mmc[0].gpio_wp = -EINVAL;
74+
75+ _configure_device(BEAGLE_BONE_BLACK, beagleboneblack_dev_cfg,
76+ PROFILE_NONE);
77+
78+ /* TPS65217 regulator has full constraints */
79+ regulator_has_full_constraints();
80+
81+ am33xx_cpsw_init(AM33XX_CPSW_MODE_MII, NULL, NULL);
82+}
83+
84 /* EVM - Starter Kit */
85 static void setup_starterkit(void)
86 {
87@@ -2372,6 +2419,8 @@ static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context)
88 setup_beaglebone_old();
89 else
90 setup_beaglebone();
91+ } else if (!strncmp("A335BNLT", config.name, 8)) {
92+ setup_beagleboneblack();
93 } else if (!strncmp("A335X_SK", config.name, 8)) {
94 daughter_brd_detected = false;
95 setup_starterkit();
96diff --git a/arch/arm/mach-omap2/include/mach/board-am335xevm.h b/arch/arm/mach-omap2/include/mach/board-am335xevm.h
97index e77d52c..915139a 100644
98--- a/arch/arm/mach-omap2/include/mach/board-am335xevm.h
99+++ b/arch/arm/mach-omap2/include/mach/board-am335xevm.h
100@@ -26,6 +26,7 @@
101 #define BEAGLE_BONE_A3 3
102 #define EVM_SK 4
103 #define GEN_PURP_DDR3_EVM 5
104+#define BEAGLE_BONE_BLACK 6
105
106 /* REVIST : check posibility of PROFILE_(x) syntax usage */
107 #define PROFILE_NONE -1 /* Few EVM doesn't have profiles */
108--
1091.7.9.5
110
diff --git a/recipes-kernel/linux/linux-am335x-psp_3.2.bb b/recipes-kernel/linux/linux-am335x-psp_3.2.bb
index 958bba5a..257c6dea 100644
--- a/recipes-kernel/linux/linux-am335x-psp_3.2.bb
+++ b/recipes-kernel/linux/linux-am335x-psp_3.2.bb
@@ -15,7 +15,7 @@ DEPENDS += "am33x-cm3"
15KERNEL_IMAGETYPE = "uImage" 15KERNEL_IMAGETYPE = "uImage"
16 16
17# The main PR is now using MACHINE_KERNEL_PR, for ti33x see conf/machine/include/ti33x.inc 17# The main PR is now using MACHINE_KERNEL_PR, for ti33x see conf/machine/include/ti33x.inc
18MACHINE_KERNEL_PR_append = "f+gitr${SRCPV}" 18MACHINE_KERNEL_PR_append = "g+gitr${SRCPV}"
19 19
20BRANCH = "v3.2-staging" 20BRANCH = "v3.2-staging"
21 21
@@ -87,6 +87,9 @@ PATCHES += "file://0001-am335x-enable-pullup-on-the-WLAN-enable-pin-fo.patch"
87# Update SPI flash layout. Increase space allocated for u-boot 87# Update SPI flash layout. Increase space allocated for u-boot
88PATCHES += "file://0001-ARM-OMAP2-AM335x-Update-SPI-flash-layout.patch" 88PATCHES += "file://0001-ARM-OMAP2-AM335x-Update-SPI-flash-layout.patch"
89 89
90# Add support for Beaglebone Black
91PATCHES += "file://0001-am335x-Add-minimal-support-for-Beaglebone-Black.patch"
92
90# Copy the am33x-cm3 firmware if it is available 93# Copy the am33x-cm3 firmware if it is available
91do_configure_append() { 94do_configure_append() {
92 if [ -e "${STAGING_DIR_HOST}/${base_libdir}/firmware/am335x-pm-firmware.bin" ] 95 if [ -e "${STAGING_DIR_HOST}/${base_libdir}/firmware/am335x-pm-firmware.bin" ]