Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 1 | /* |
Linus Walleij | a3a6c6a | 2012-10-01 09:37:39 +0200 | [diff] [blame] | 2 | * Copyright (C) 2008-2012 ST-Ericsson |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 3 | * |
| 4 | * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2, as |
| 8 | * published by the Free Software Foundation. |
| 9 | * |
| 10 | */ |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/interrupt.h> |
| 14 | #include <linux/platform_device.h> |
Lee Jones | 265c3c0 | 2013-03-27 14:13:53 +0000 | [diff] [blame] | 15 | #include <linux/clk.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 16 | #include <linux/io.h> |
hongbo.zhang | dc1956b | 2012-11-15 18:56:43 +0800 | [diff] [blame] | 17 | #include <linux/platform_data/db8500_thermal.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 18 | #include <linux/amba/bus.h> |
| 19 | #include <linux/amba/pl022.h> |
Linus Walleij | ee66e65 | 2011-12-02 14:16:33 +0100 | [diff] [blame] | 20 | #include <linux/mfd/abx500/ab8500.h> |
Bengt Jonsson | 79568b94 | 2011-03-11 11:54:46 +0100 | [diff] [blame] | 21 | #include <linux/regulator/ab8500.h> |
Lee Jones | 0b5ea1e | 2012-09-03 14:33:39 +0100 | [diff] [blame] | 22 | #include <linux/regulator/fixed.h> |
Lee Jones | cd2fa6d | 2013-01-31 11:31:16 +0000 | [diff] [blame] | 23 | #include <linux/regulator/driver.h> |
Linus Walleij | fe67dfc | 2011-03-07 11:48:15 +0100 | [diff] [blame] | 24 | #include <linux/mfd/tps6105x.h> |
Milo(Woogyom) Kim | df4094d | 2013-02-05 19:26:59 +0900 | [diff] [blame] | 25 | #include <linux/platform_data/leds-lp55xx.h> |
Philippe Langlais | a71b819 | 2011-01-14 10:53:59 +0100 | [diff] [blame] | 26 | #include <linux/input.h> |
Shreshtha Kumar Sahu | 1a7d436 | 2011-06-13 10:11:44 +0200 | [diff] [blame] | 27 | #include <linux/delay.h> |
Robert Marklund | 350abe0 | 2011-06-20 15:55:46 +0200 | [diff] [blame] | 28 | #include <linux/leds.h> |
Linus Walleij | a098066 | 2012-05-07 01:33:24 +0200 | [diff] [blame] | 29 | #include <linux/pinctrl/consumer.h> |
Linus Walleij | bb16bd9 | 2012-10-10 14:27:58 +0200 | [diff] [blame] | 30 | #include <linux/platform_data/pinctrl-nomadik.h> |
Linus Walleij | 865fab6 | 2012-10-18 14:20:16 +0200 | [diff] [blame] | 31 | #include <linux/platform_data/dma-ste-dma40.h> |
Linus Walleij | a098066 | 2012-05-07 01:33:24 +0200 | [diff] [blame] | 32 | |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 33 | #include <asm/mach-types.h> |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 34 | |
Arnd Bergmann | e657bcf | 2013-03-21 22:51:12 +0100 | [diff] [blame] | 35 | #include "setup.h" |
| 36 | #include "devices.h" |
Arnd Bergmann | eba5274 | 2013-03-21 22:51:08 +0100 | [diff] [blame] | 37 | #include "irqs.h" |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 38 | |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 39 | #include "ste-dma40-db8500.h" |
Linus Walleij | 174e779 | 2013-03-19 15:41:55 +0100 | [diff] [blame] | 40 | #include "db8500-regs.h" |
Rabin Vincent | fbf1ead | 2010-09-29 19:46:32 +0530 | [diff] [blame] | 41 | #include "devices-db8500.h" |
Hanumath Prasad | 008f8a2 | 2010-08-19 12:06:32 +0100 | [diff] [blame] | 42 | #include "board-mop500.h" |
Bengt Jonsson | a1e516e | 2010-12-10 11:08:48 +0100 | [diff] [blame] | 43 | #include "board-mop500-regulators.h" |
Rabin Vincent | ea05a57 | 2010-06-03 07:58:42 +0100 | [diff] [blame] | 44 | |
Linus Walleij | 05ec260 | 2013-02-07 10:17:31 +0100 | [diff] [blame] | 45 | struct ab8500_platform_data ab8500_platdata = { |
Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 46 | .irq_base = MOP500_AB8500_IRQ_BASE, |
Lee Jones | c4e67bb | 2013-04-02 13:24:19 +0100 | [diff] [blame] | 47 | .regulator = &ab8500_regulator_plat_data, |
Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 48 | }; |
| 49 | |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 50 | #ifdef CONFIG_STE_DMA40 |
| 51 | static struct stedma40_chan_cfg ssp0_dma_cfg_rx = { |
| 52 | .mode = STEDMA40_MODE_LOGICAL, |
Lee Jones | 98b68ab | 2013-05-15 10:51:53 +0100 | [diff] [blame] | 53 | .dir = DMA_DEV_TO_MEM, |
Lee Jones | 26955c07d | 2013-05-03 15:31:56 +0100 | [diff] [blame] | 54 | .dev_type = DB8500_DMA_DEV8_SSP0, |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 55 | }; |
| 56 | |
| 57 | static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { |
| 58 | .mode = STEDMA40_MODE_LOGICAL, |
Lee Jones | 98b68ab | 2013-05-15 10:51:53 +0100 | [diff] [blame] | 59 | .dir = DMA_MEM_TO_DEV, |
Lee Jones | 26955c07d | 2013-05-03 15:31:56 +0100 | [diff] [blame] | 60 | .dev_type = DB8500_DMA_DEV8_SSP0, |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 61 | }; |
| 62 | #endif |
| 63 | |
Lee Jones | fa86a76 | 2012-09-27 10:17:36 +0100 | [diff] [blame] | 64 | struct pl022_ssp_controller ssp0_plat = { |
Linus Walleij | 5d7b846 | 2010-10-14 13:57:59 +0200 | [diff] [blame] | 65 | .bus_id = 0, |
| 66 | #ifdef CONFIG_STE_DMA40 |
| 67 | .enable_dma = 1, |
| 68 | .dma_filter = stedma40_filter, |
| 69 | .dma_rx_param = &ssp0_dma_cfg_rx, |
| 70 | .dma_tx_param = &ssp0_dma_cfg_tx, |
| 71 | #else |
| 72 | .enable_dma = 0, |
| 73 | #endif |
| 74 | /* on this platform, gpio 31,142,144,214 & |
| 75 | * 224 are connected as chip selects |
| 76 | */ |
| 77 | .num_chipselect = 5, |
| 78 | }; |