diff options
-rw-r--r-- | MAINTAINERS | 6 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/ts72xx.c | 136 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/ts72xx.h | 5 | ||||
-rw-r--r-- | arch/arm/tools/mach-types | 1 |
5 files changed, 155 insertions, 0 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index aa71ab52fd76..c96aacd4d9c3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1254,6 +1254,12 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |||
1254 | S: Supported | 1254 | S: Supported |
1255 | F: drivers/net/ethernet/cavium/thunder/ | 1255 | F: drivers/net/ethernet/cavium/thunder/ |
1256 | 1256 | ||
1257 | ARM/CIRRUS LOGIC BK3 MACHINE SUPPORT | ||
1258 | M: Lukasz Majewski <lukma@denx.de> | ||
1259 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1260 | S: Maintained | ||
1261 | F: arch/arm/mach-ep93xx/ts72xx.c | ||
1262 | |||
1257 | ARM/CIRRUS LOGIC CLPS711X ARM ARCHITECTURE | 1263 | ARM/CIRRUS LOGIC CLPS711X ARM ARCHITECTURE |
1258 | M: Alexander Shiyan <shc_work@mail.ru> | 1264 | M: Alexander Shiyan <shc_work@mail.ru> |
1259 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1265 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index 61a75ca3684e..c095236d7ff8 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -21,6 +21,13 @@ config MACH_ADSSPHERE | |||
21 | Say 'Y' here if you want your kernel to support the ADS | 21 | Say 'Y' here if you want your kernel to support the ADS |
22 | Sphere board. | 22 | Sphere board. |
23 | 23 | ||
24 | config MACH_BK3 | ||
25 | bool "Support Liebherr BK3.1" | ||
26 | select MACH_TS72XX | ||
27 | help | ||
28 | Say 'Y' here if you want your kernel to support the | ||
29 | Liebherr controller BK3.1. | ||
30 | |||
24 | config MACH_EDB93XX | 31 | config MACH_EDB93XX |
25 | bool | 32 | bool |
26 | 33 | ||
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 17af9d834b51..c089a2a4fe30 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -19,10 +19,15 @@ | |||
19 | #include <linux/mtd/rawnand.h> | 19 | #include <linux/mtd/rawnand.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/spi/flash.h> | ||
23 | #include <linux/spi/mmc_spi.h> | ||
24 | #include <linux/mmc/host.h> | ||
22 | #include <linux/platform_data/spi-ep93xx.h> | 25 | #include <linux/platform_data/spi-ep93xx.h> |
23 | 26 | ||
24 | #include <mach/gpio-ep93xx.h> | 27 | #include <mach/gpio-ep93xx.h> |
25 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <mach/irqs.h> | ||
30 | #include <mach/gpio-ep93xx.h> | ||
26 | 31 | ||
27 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
28 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
@@ -50,6 +55,11 @@ static struct map_desc ts72xx_io_desc[] __initdata = { | |||
50 | .pfn = __phys_to_pfn(TS72XX_OPTIONS2_PHYS_BASE), | 55 | .pfn = __phys_to_pfn(TS72XX_OPTIONS2_PHYS_BASE), |
51 | .length = TS72XX_OPTIONS2_SIZE, | 56 | .length = TS72XX_OPTIONS2_SIZE, |
52 | .type = MT_DEVICE, | 57 | .type = MT_DEVICE, |
58 | }, { | ||
59 | .virtual = (unsigned long)TS72XX_CPLDVER_VIRT_BASE, | ||
60 | .pfn = __phys_to_pfn(TS72XX_CPLDVER_PHYS_BASE), | ||
61 | .length = TS72XX_CPLDVER_SIZE, | ||
62 | .type = MT_DEVICE, | ||
53 | } | 63 | } |
54 | }; | 64 | }; |
55 | 65 | ||
@@ -212,6 +222,69 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = { | |||
212 | }; | 222 | }; |
213 | 223 | ||
214 | /************************************************************************* | 224 | /************************************************************************* |
225 | * SPI SD/MMC host | ||
226 | *************************************************************************/ | ||
227 | #define BK3_EN_SDCARD_PHYS_BASE 0x12400000 | ||
228 | #define BK3_EN_SDCARD_PWR 0x0 | ||
229 | #define BK3_DIS_SDCARD_PWR 0x0C | ||
230 | static void bk3_mmc_spi_setpower(struct device *dev, unsigned int vdd) | ||
231 | { | ||
232 | void __iomem *pwr_sd = ioremap(BK3_EN_SDCARD_PHYS_BASE, SZ_4K); | ||
233 | |||
234 | if (!pwr_sd) { | ||
235 | pr_err("Failed to enable SD card power!"); | ||
236 | return; | ||
237 | } | ||
238 | |||
239 | pr_debug("%s: SD card pwr %s VDD:0x%x\n", __func__, | ||
240 | !!vdd ? "ON" : "OFF", vdd); | ||
241 | |||
242 | if (!!vdd) | ||
243 | __raw_writeb(BK3_EN_SDCARD_PWR, pwr_sd); | ||
244 | else | ||
245 | __raw_writeb(BK3_DIS_SDCARD_PWR, pwr_sd); | ||
246 | |||
247 | iounmap(pwr_sd); | ||
248 | } | ||
249 | |||
250 | static struct mmc_spi_platform_data bk3_spi_mmc_data = { | ||
251 | .detect_delay = 500, | ||
252 | .powerup_msecs = 100, | ||
253 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
254 | .caps = MMC_CAP_NONREMOVABLE, | ||
255 | .setpower = bk3_mmc_spi_setpower, | ||
256 | }; | ||
257 | |||
258 | /************************************************************************* | ||
259 | * SPI Bus - SD card access | ||
260 | *************************************************************************/ | ||
261 | static struct spi_board_info bk3_spi_board_info[] __initdata = { | ||
262 | { | ||
263 | .modalias = "mmc_spi", | ||
264 | .platform_data = &bk3_spi_mmc_data, | ||
265 | .max_speed_hz = 7.4E6, | ||
266 | .bus_num = 0, | ||
267 | .chip_select = 0, | ||
268 | .mode = SPI_MODE_0, | ||
269 | }, | ||
270 | }; | ||
271 | |||
272 | /* | ||
273 | * This is a stub -> the FGPIO[3] pin is not connected on the schematic | ||
274 | * The all work is performed automatically by !SPI_FRAME (SFRM1) and | ||
275 | * goes through CPLD | ||
276 | */ | ||
277 | static int bk3_spi_chipselects[] __initdata = { | ||
278 | EP93XX_GPIO_LINE_F(3), | ||
279 | }; | ||
280 | |||
281 | static struct ep93xx_spi_info bk3_spi_master __initdata = { | ||
282 | .chipselect = bk3_spi_chipselects, | ||
283 | .num_chipselect = ARRAY_SIZE(bk3_spi_chipselects), | ||
284 | .use_dma = 1, | ||
285 | }; | ||
286 | |||
287 | /************************************************************************* | ||
215 | * TS72XX support code | 288 | * TS72XX support code |
216 | *************************************************************************/ | 289 | *************************************************************************/ |
217 | #if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX) | 290 | #if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX) |
@@ -285,3 +358,66 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") | |||
285 | .init_late = ep93xx_init_late, | 358 | .init_late = ep93xx_init_late, |
286 | .restart = ep93xx_restart, | 359 | .restart = ep93xx_restart, |
287 | MACHINE_END | 360 | MACHINE_END |
361 | |||
362 | /************************************************************************* | ||
363 | * EP93xx I2S audio peripheral handling | ||
364 | *************************************************************************/ | ||
365 | static struct resource ep93xx_i2s_resource[] = { | ||
366 | DEFINE_RES_MEM(EP93XX_I2S_PHYS_BASE, 0x100), | ||
367 | DEFINE_RES_IRQ_NAMED(IRQ_EP93XX_SAI, "spilink i2s slave"), | ||
368 | }; | ||
369 | |||
370 | static struct platform_device ep93xx_i2s_device = { | ||
371 | .name = "ep93xx-spilink-i2s", | ||
372 | .id = -1, | ||
373 | .num_resources = ARRAY_SIZE(ep93xx_i2s_resource), | ||
374 | .resource = ep93xx_i2s_resource, | ||
375 | }; | ||
376 | |||
377 | /************************************************************************* | ||
378 | * BK3 support code | ||
379 | *************************************************************************/ | ||
380 | static struct mtd_partition bk3_nand_parts[] = { | ||
381 | { | ||
382 | .name = "System", | ||
383 | .offset = 0x00000000, | ||
384 | .size = 0x01e00000, | ||
385 | }, { | ||
386 | .name = "Data", | ||
387 | .offset = 0x01e00000, | ||
388 | .size = 0x05f20000 | ||
389 | }, { | ||
390 | .name = "RedBoot", | ||
391 | .offset = 0x07d20000, | ||
392 | .size = 0x002e0000, | ||
393 | .mask_flags = MTD_WRITEABLE, /* force RO */ | ||
394 | }, | ||
395 | }; | ||
396 | |||
397 | static void __init bk3_init_machine(void) | ||
398 | { | ||
399 | ep93xx_init_devices(); | ||
400 | |||
401 | ts72xx_register_flash(bk3_nand_parts, ARRAY_SIZE(bk3_nand_parts), | ||
402 | EP93XX_CS6_PHYS_BASE); | ||
403 | |||
404 | ep93xx_register_eth(&ts72xx_eth_data, 1); | ||
405 | |||
406 | ep93xx_register_spi(&bk3_spi_master, bk3_spi_board_info, | ||
407 | ARRAY_SIZE(bk3_spi_board_info)); | ||
408 | |||
409 | /* Configure ep93xx's I2S to use AC97 pins */ | ||
410 | ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_I2SONAC97); | ||
411 | platform_device_register(&ep93xx_i2s_device); | ||
412 | } | ||
413 | |||
414 | MACHINE_START(BK3, "Liebherr controller BK3.1") | ||
415 | /* Maintainer: Lukasz Majewski <lukma@denx.de> */ | ||
416 | .atag_offset = 0x100, | ||
417 | .map_io = ts72xx_map_io, | ||
418 | .init_irq = ep93xx_init_irq, | ||
419 | .init_time = ep93xx_timer_init, | ||
420 | .init_machine = bk3_init_machine, | ||
421 | .init_late = ep93xx_init_late, | ||
422 | .restart = ep93xx_restart, | ||
423 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/ts72xx.h b/arch/arm/mach-ep93xx/ts72xx.h index 7b7490f10fa9..00b4941d29c9 100644 --- a/arch/arm/mach-ep93xx/ts72xx.h +++ b/arch/arm/mach-ep93xx/ts72xx.h | |||
@@ -10,6 +10,7 @@ | |||
10 | * febff000 22000000 4K model number register (bits 0-2) | 10 | * febff000 22000000 4K model number register (bits 0-2) |
11 | * febfe000 22400000 4K options register | 11 | * febfe000 22400000 4K options register |
12 | * febfd000 22800000 4K options register #2 | 12 | * febfd000 22800000 4K options register #2 |
13 | * febfc000 23400000 4K CPLD version register | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef __TS72XX_H_ | 16 | #ifndef __TS72XX_H_ |
@@ -42,6 +43,10 @@ | |||
42 | #define TS72XX_OPTIONS2_TS9420 0x04 | 43 | #define TS72XX_OPTIONS2_TS9420 0x04 |
43 | #define TS72XX_OPTIONS2_TS9420_BOOT 0x02 | 44 | #define TS72XX_OPTIONS2_TS9420_BOOT 0x02 |
44 | 45 | ||
46 | #define TS72XX_CPLDVER_PHYS_BASE 0x23400000 | ||
47 | #define TS72XX_CPLDVER_VIRT_BASE IOMEM(0xfebfc000) | ||
48 | #define TS72XX_CPLDVER_SIZE 0x00001000 | ||
49 | |||
45 | #ifndef __ASSEMBLY__ | 50 | #ifndef __ASSEMBLY__ |
46 | 51 | ||
47 | static inline int ts72xx_model(void) | 52 | static inline int ts72xx_model(void) |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index a9313b66f770..4eac94c1eb6f 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -345,6 +345,7 @@ mxlads MACH_MXLADS MXLADS 1851 | |||
345 | linkstation_mini MACH_LINKSTATION_MINI LINKSTATION_MINI 1858 | 345 | linkstation_mini MACH_LINKSTATION_MINI LINKSTATION_MINI 1858 |
346 | afeb9260 MACH_AFEB9260 AFEB9260 1859 | 346 | afeb9260 MACH_AFEB9260 AFEB9260 1859 |
347 | imx27ipcam MACH_IMX27IPCAM IMX27IPCAM 1871 | 347 | imx27ipcam MACH_IMX27IPCAM IMX27IPCAM 1871 |
348 | bk3 MACH_BK3 BK3 1880 | ||
348 | rd88f6183ap_ge MACH_RD88F6183AP_GE RD88F6183AP_GE 1894 | 349 | rd88f6183ap_ge MACH_RD88F6183AP_GE RD88F6183AP_GE 1894 |
349 | realview_pba8 MACH_REALVIEW_PBA8 REALVIEW_PBA8 1897 | 350 | realview_pba8 MACH_REALVIEW_PBA8 REALVIEW_PBA8 1897 |
350 | realview_pbx MACH_REALVIEW_PBX REALVIEW_PBX 1901 | 351 | realview_pbx MACH_REALVIEW_PBX REALVIEW_PBX 1901 |