summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-10-09 15:58:43 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-10-09 15:58:43 +0200
commit46bda0096d9114dbb961296b89dbce86672ab94c (patch)
treebdf167dd81f48892db3a0b2e1d0f82120aa69f39 /recipes-bsp
parentb4cbf191d20c503d5ded35cfc932a9937e8aea63 (diff)
downloadmeta-ti-46bda0096d9114dbb961296b89dbce86672ab94c.tar.gz
u-boot 2011.09: probe ddc bus for eeproms as well on beagleboard, add beaconboard support
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/u-boot/2011.09/0001-beagleboard-add-support-for-TCT-Beacon-board.patch39
-rw-r--r--recipes-bsp/u-boot/u-boot/2011.09/0001-beagleboard-probe-DDC-bus-for-expansionboard-EEPROMS.patch165
-rw-r--r--recipes-bsp/u-boot/u-boot_2011.09.bb3
3 files changed, 207 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0001-beagleboard-add-support-for-TCT-Beacon-board.patch b/recipes-bsp/u-boot/u-boot/2011.09/0001-beagleboard-add-support-for-TCT-Beacon-board.patch
new file mode 100644
index 00000000..bf828f69
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/2011.09/0001-beagleboard-add-support-for-TCT-Beacon-board.patch
@@ -0,0 +1,39 @@
1From f6ce74793e6341895153e43643460b7fc812dc9d Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Sat, 8 Oct 2011 21:56:35 +0200
4Subject: [PATCH] beagleboard: add support for TCT Beacon board
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 board/ti/beagle/beagle.c | 8 ++++++++
9 1 files changed, 8 insertions(+), 0 deletions(-)
10
11diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
12index 8cdceaf..be40e96 100644
13--- a/board/ti/beagle/beagle.c
14+++ b/board/ti/beagle/beagle.c
15@@ -62,6 +62,7 @@ extern volatile struct ehci_hcor *hcor;
16 #define TINCANTOOLS_ZIPPY2 0x02000100
17 #define TINCANTOOLS_TRAINER 0x04000100
18 #define TINCANTOOLS_SHOWDOG 0x03000100
19+#define TINCANTOOLS_BEACON 0x05000100
20 #define KBADC_BEAGLEFPGA 0x01000600
21 #define LW_BEAGLETOUCH 0x01000700
22 #define BRAINMUX_LCDOG 0x01000800
23@@ -290,6 +291,13 @@ int misc_init_r(void)
24 setenv("defaultdisplay", "showdoglcd");
25 setenv("buddy", "showdog");
26 break;
27+ case TINCANTOOLS_BEACON:
28+ printf("Recognized Tincantools Beacon board (rev %d %s)\n",
29+ expansion_config.revision,
30+ expansion_config.fab_revision);
31+ /* Place holder for DSS2 definition for showdog lcd */
32+ setenv("buddy", "beacon");
33+ break;
34 case KBADC_BEAGLEFPGA:
35 printf("Recognized KBADC Beagle FPGA board\n");
36 MUX_KBADC_BEAGLEFPGA();
37--
381.6.6.1
39
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0001-beagleboard-probe-DDC-bus-for-expansionboard-EEPROMS.patch b/recipes-bsp/u-boot/u-boot/2011.09/0001-beagleboard-probe-DDC-bus-for-expansionboard-EEPROMS.patch
new file mode 100644
index 00000000..4155d29a
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/2011.09/0001-beagleboard-probe-DDC-bus-for-expansionboard-EEPROMS.patch
@@ -0,0 +1,165 @@
1From 559eb0f547267df0706d283974916b88d6b9fb7d Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Sun, 9 Oct 2011 15:55:05 +0200
4Subject: [PATCH] beagleboard: probe DDC bus for expansionboard EEPROMS as well
5
6Add beacon support as well, needs to get split into a seperate patch
7
8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
9---
10 board/ti/beagle/beagle.c | 59 ++++++++++++++++++++++++++++++++++++++++
11 board/ti/beagle/beagle.h | 7 +++++
12 include/configs/omap3_beagle.h | 7 +++++
13 3 files changed, 73 insertions(+), 0 deletions(-)
14
15diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
16index 8cdceaf..f4e986c 100644
17--- a/board/ti/beagle/beagle.c
18+++ b/board/ti/beagle/beagle.c
19@@ -57,11 +57,14 @@ extern volatile struct ehci_hcor *hcor;
20 #define TWL4030_I2C_BUS 0
21 #define EXPANSION_EEPROM_I2C_BUS 1
22 #define EXPANSION_EEPROM_I2C_ADDRESS 0x50
23+#define DVI_EDID_I2C_BUS 2
24+#define DVI_EDID_I2C_ADDRESS 0x50
25
26 #define TINCANTOOLS_ZIPPY 0x01000100
27 #define TINCANTOOLS_ZIPPY2 0x02000100
28 #define TINCANTOOLS_TRAINER 0x04000100
29 #define TINCANTOOLS_SHOWDOG 0x03000100
30+#define TINCANTOOLS_BEACON 0x05000100
31 #define KBADC_BEAGLEFPGA 0x01000600
32 #define LW_BEAGLETOUCH 0x01000700
33 #define BRAINMUX_LCDOG 0x01000800
34@@ -69,6 +72,7 @@ extern volatile struct ehci_hcor *hcor;
35 #define BBTOYS_WIFI 0x01000B00
36 #define BBTOYS_VGA 0x02000B00
37 #define BBTOYS_LCD 0x03000B00
38+#define BBTOYS_ULCD 0x04000B00
39 #define BEAGLE_NO_EEPROM 0xffffffff
40
41 DECLARE_GLOBAL_DATA_PTR;
42@@ -82,6 +86,16 @@ static struct {
43 char env_setting[64];
44 } expansion_config;
45
46+static struct {
47+ unsigned int device_vendor;
48+ unsigned char revision;
49+ unsigned char content;
50+ char fab_revision[8];
51+ char env_var[16];
52+ char env_setting[64];
53+} edid_config;
54+
55+
56 /*
57 * Routine: board_init
58 * Description: Early hardware init.
59@@ -165,6 +179,33 @@ unsigned int get_expansion_id(void)
60 }
61
62 /*
63+ * Routine: get_edid
64+ * Description: This function checks for expansion board by checking I2C
65+ * bus 2 for the availability of an EEPROM
66+ * returns the device_vendor field from the EEPROM
67+ * The content can be either real EDID data or expansionboard data.
68+ * Only expansionboar data is currently supported
69+ */
70+unsigned int get_edid(void)
71+{
72+ i2c_set_bus_num(DVI_EDID_I2C_BUS);
73+
74+ /* return BEAGLE_NO_EEPROM if eeprom doesn't respond */
75+ if (i2c_probe(DVI_EDID_I2C_ADDRESS) == 1) {
76+ i2c_set_bus_num(TWL4030_I2C_BUS);
77+ return BEAGLE_NO_EEPROM;
78+ }
79+
80+ /* read EEPROM data */
81+ i2c_read(DVI_EDID_I2C_ADDRESS, 0, 1, (u8 *)&edid_config,
82+ sizeof(edid_config));
83+
84+ i2c_set_bus_num(TWL4030_I2C_BUS);
85+
86+ return edid_config.device_vendor;
87+}
88+
89+/*
90 * Configure DSS to display background color on DVID
91 * Configure VENC to display color bar on S-Video
92 */
93@@ -290,6 +331,13 @@ int misc_init_r(void)
94 setenv("defaultdisplay", "showdoglcd");
95 setenv("buddy", "showdog");
96 break;
97+ case TINCANTOOLS_BEACON:
98+ printf("Recognized Tincantools Beacon board (rev %d %s)\n",
99+ expansion_config.revision,
100+ expansion_config.fab_revision);
101+ MUX_TINCANTOOLS_BEACON();
102+ setenv("buddy", "beacon");
103+ break;
104 case KBADC_BEAGLEFPGA:
105 printf("Recognized KBADC Beagle FPGA board\n");
106 MUX_KBADC_BEAGLEFPGA();
107@@ -331,6 +379,17 @@ int misc_init_r(void)
108 if (expansion_config.content == 1)
109 setenv(expansion_config.env_var, expansion_config.env_setting);
110
111+ switch(get_edid()) {
112+ case BBTOYS_ULCD:
113+ printf("Recognized BeagleBoardToys universal LCD board on DDC bus\n");
114+ setenv("edid", "uLCD");
115+ break;
116+ default:
117+ printf("Unrecognized EEPROM content on DDC bus: %x\n",
118+ edid_config.device_vendor);
119+ setenv("edid", "unknown");
120+ }
121+
122 twl4030_power_init();
123 switch (get_board_revision()) {
124 case REVISION_XM_A:
125diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
126index 18bfaa8..6a9ad73 100644
127--- a/board/ti/beagle/beagle.h
128+++ b/board/ti/beagle/beagle.h
129@@ -456,6 +456,13 @@ const omap3_sysinfo sysinfo = {
130 MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTU | EN | M4)) /*GPIO_141*/\
131 MUX_VAL(CP(MCBSP1_CLKX), (IEN | PTU | EN | M4)) /*GPIO_162*/
132
133+#define MUX_TINCANTOOLS_BEACON() \
134+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\
135+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\
136+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\
137+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\
138+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\
139+
140 #define MUX_KBADC_BEAGLEFPGA() \
141 MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | DIS | M1)) /*MCSPI4_CLK*/\
142 MUX_VAL(CP(MCBSP1_DX), (IDIS | PTU | DIS | M1)) /*MCSPI4_SIMO*/\
143diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
144index 1369c89..73df658 100644
145--- a/include/configs/omap3_beagle.h
146+++ b/include/configs/omap3_beagle.h
147@@ -219,6 +224,7 @@
148 "console=ttyS2,115200n8\0" \
149 "mpurate=auto\0" \
150 "buddy=none "\
151+ "edid=none "\
152 "optargs=\0" \
153 "camera=none\0" \
154 "vram=12M\0" \
155@@ -235,6 +241,7 @@
156 "${optargs} " \
157 "mpurate=${mpurate} " \
158 "buddy=${buddy} "\
159+ "edid=${edid} "\
160 "camera=${camera} "\
161 "vram=${vram} " \
162 "omapfb.mode=dvi:${dvimode} " \
163--
1641.6.6.1
165
diff --git a/recipes-bsp/u-boot/u-boot_2011.09.bb b/recipes-bsp/u-boot/u-boot_2011.09.bb
index dad820f4..d250f71e 100644
--- a/recipes-bsp/u-boot/u-boot_2011.09.bb
+++ b/recipes-bsp/u-boot/u-boot_2011.09.bb
@@ -1,5 +1,7 @@
1require u-boot.inc 1require u-boot.inc
2 2
3PR = "r1"
4
3# No patches for other machines yet 5# No patches for other machines yet
4COMPATIBLE_MACHINE = "(beagleboard)" 6COMPATIBLE_MACHINE = "(beagleboard)"
5 7
@@ -7,6 +9,7 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
7 file://2011.09/0001-HACK-beagleboard-config-disable-cache-for-USB.patch \ 9 file://2011.09/0001-HACK-beagleboard-config-disable-cache-for-USB.patch \
8 file://2011.09/0002-beagleboard-config-enable-gpio-command.patch \ 10 file://2011.09/0002-beagleboard-config-enable-gpio-command.patch \
9 file://2011.09/0003-Increased-some-timeout-durations-for-MMC-and-EHCI.patch \ 11 file://2011.09/0003-Increased-some-timeout-durations-for-MMC-and-EHCI.patch \
12 file://2011.09/0001-beagleboard-probe-DDC-bus-for-expansionboard-EEPROMS.patch \
10 file://fw_env.config \ 13 file://fw_env.config \
11 " 14 "
12# v2011.09 tag -> 6ceb0135f96d73063ffbaab5be7ce23933367388 15# v2011.09 tag -> 6ceb0135f96d73063ffbaab5be7ce23933367388