2009-11-28 08:17:18 +01:00
|
|
|
/*
|
2012-10-01 09:37:39 +02:00
|
|
|
* Copyright (C) 2008-2012 ST-Ericsson
|
2009-11-28 08:17:18 +01:00
|
|
|
*
|
|
|
|
* Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/platform_device.h>
|
2013-03-27 14:13:53 +00:00
|
|
|
#include <linux/clk.h>
|
2009-11-28 08:17:18 +01:00
|
|
|
#include <linux/io.h>
|
2012-11-15 18:56:43 +08:00
|
|
|
#include <linux/platform_data/db8500_thermal.h>
|
2009-11-28 08:17:18 +01:00
|
|
|
#include <linux/amba/bus.h>
|
|
|
|
#include <linux/amba/pl022.h>
|
2011-12-02 14:16:33 +01:00
|
|
|
#include <linux/mfd/abx500/ab8500.h>
|
regulator: initialization for ab8500 regulators
The regulators on the AB8500 have a lot of custom
hardware control settings pertaining to 8 external
signals, settings which are board-specific and need
be provided from the platform at startup.
Initialization added for regulators Vana, VextSupply1,
VextSupply2, VextSupply3, Vaux1, Vaux2, Vaux3, VTVout,
Vintcore12, Vaudio, Vdmic, Vamic1, Vamic2, VrefDDR.
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-11 11:54:46 +01:00
|
|
|
#include <linux/regulator/ab8500.h>
|
2012-09-03 14:33:39 +01:00
|
|
|
#include <linux/regulator/fixed.h>
|
2013-01-31 11:31:16 +00:00
|
|
|
#include <linux/regulator/driver.h>
|
2011-03-07 11:48:15 +01:00
|
|
|
#include <linux/mfd/tps6105x.h>
|
2013-02-05 19:26:59 +09:00
|
|
|
#include <linux/platform_data/leds-lp55xx.h>
|
2011-01-14 10:53:59 +01:00
|
|
|
#include <linux/input.h>
|
2011-06-13 10:11:44 +02:00
|
|
|
#include <linux/delay.h>
|
2011-06-20 15:55:46 +02:00
|
|
|
#include <linux/leds.h>
|
2012-05-07 01:33:24 +02:00
|
|
|
#include <linux/pinctrl/consumer.h>
|
2012-10-10 14:27:58 +02:00
|
|
|
#include <linux/platform_data/pinctrl-nomadik.h>
|
2012-10-18 14:20:16 +02:00
|
|
|
#include <linux/platform_data/dma-ste-dma40.h>
|
2012-05-07 01:33:24 +02:00
|
|
|
|
2009-11-28 08:17:18 +01:00
|
|
|
#include <asm/mach-types.h>
|
|
|
|
|
2013-03-21 22:51:12 +01:00
|
|
|
#include "setup.h"
|
|
|
|
#include "devices.h"
|
2013-03-21 22:51:08 +01:00
|
|
|
#include "irqs.h"
|
2009-11-28 08:17:18 +01:00
|
|
|
|
2010-10-14 13:57:59 +02:00
|
|
|
#include "ste-dma40-db8500.h"
|
2013-03-19 15:41:55 +01:00
|
|
|
#include "db8500-regs.h"
|
2010-09-29 19:46:32 +05:30
|
|
|
#include "devices-db8500.h"
|
2010-08-19 12:06:32 +01:00
|
|
|
#include "board-mop500.h"
|
2010-12-10 11:08:48 +01:00
|
|
|
#include "board-mop500-regulators.h"
|
2010-06-03 07:58:42 +01:00
|
|
|
|
2013-02-07 10:17:31 +01:00
|
|
|
struct ab8500_platform_data ab8500_platdata = {
|
2010-07-26 11:12:15 +01:00
|
|
|
.irq_base = MOP500_AB8500_IRQ_BASE,
|
2013-04-02 13:24:19 +01:00
|
|
|
.regulator = &ab8500_regulator_plat_data,
|
2010-07-26 11:12:15 +01:00
|
|
|
};
|
|
|
|
|
2010-10-14 13:57:59 +02:00
|
|
|
#ifdef CONFIG_STE_DMA40
|
|
|
|
static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
|
|
|
|
.mode = STEDMA40_MODE_LOGICAL,
|
2013-05-15 10:51:53 +01:00
|
|
|
.dir = DMA_DEV_TO_MEM,
|
2013-05-03 15:31:56 +01:00
|
|
|
.dev_type = DB8500_DMA_DEV8_SSP0,
|
2010-10-14 13:57:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct stedma40_chan_cfg ssp0_dma_cfg_tx = {
|
|
|
|
.mode = STEDMA40_MODE_LOGICAL,
|
2013-05-15 10:51:53 +01:00
|
|
|
.dir = DMA_MEM_TO_DEV,
|
2013-05-03 15:31:56 +01:00
|
|
|
.dev_type = DB8500_DMA_DEV8_SSP0,
|
2010-10-14 13:57:59 +02:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2012-09-27 10:17:36 +01:00
|
|
|
struct pl022_ssp_controller ssp0_plat = {
|
2010-10-14 13:57:59 +02:00
|
|
|
.bus_id = 0,
|
|
|
|
#ifdef CONFIG_STE_DMA40
|
|
|
|
.enable_dma = 1,
|
|
|
|
.dma_filter = stedma40_filter,
|
|
|
|
.dma_rx_param = &ssp0_dma_cfg_rx,
|
|
|
|
.dma_tx_param = &ssp0_dma_cfg_tx,
|
|
|
|
#else
|
|
|
|
.enable_dma = 0,
|
|
|
|
#endif
|
|
|
|
/* on this platform, gpio 31,142,144,214 &
|
|
|
|
* 224 are connected as chip selects
|
|
|
|
*/
|
|
|
|
.num_chipselect = 5,
|
|
|
|
};
|