2009-11-28 07:17:18 +00:00
|
|
|
/*
|
2012-10-01 07:37:39 +00:00
|
|
|
* Copyright (C) 2008-2012 ST-Ericsson
|
2009-11-28 07:17:18 +00: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 07:17:18 +00:00
|
|
|
#include <linux/io.h>
|
2012-11-15 10:56:43 +00:00
|
|
|
#include <linux/platform_data/db8500_thermal.h>
|
2009-11-28 07:17:18 +00:00
|
|
|
#include <linux/amba/bus.h>
|
|
|
|
#include <linux/amba/pl022.h>
|
2011-12-02 13:16:33 +00: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 10:54:46 +00:00
|
|
|
#include <linux/regulator/ab8500.h>
|
2012-09-03 13:33:39 +00:00
|
|
|
#include <linux/regulator/fixed.h>
|
2013-01-31 11:31:16 +00:00
|
|
|
#include <linux/regulator/driver.h>
|
2011-03-07 10:48:15 +00:00
|
|
|
#include <linux/mfd/tps6105x.h>
|
2013-02-05 10:26:59 +00:00
|
|
|
#include <linux/platform_data/leds-lp55xx.h>
|
2011-01-14 09:53:59 +00:00
|
|
|
#include <linux/input.h>
|
2011-06-13 08:11:44 +00:00
|
|
|
#include <linux/delay.h>
|
2011-06-20 13:55:46 +00:00
|
|
|
#include <linux/leds.h>
|
2012-05-06 23:33:24 +00:00
|
|
|
#include <linux/pinctrl/consumer.h>
|
2012-10-10 12:27:58 +00:00
|
|
|
#include <linux/platform_data/pinctrl-nomadik.h>
|
2012-10-18 12:20:16 +00:00
|
|
|
#include <linux/platform_data/dma-ste-dma40.h>
|
2012-05-06 23:33:24 +00:00
|
|
|
|
2009-11-28 07:17:18 +00:00
|
|
|
#include <asm/mach-types.h>
|
|
|
|
|
2013-03-21 21:51:12 +00:00
|
|
|
#include "setup.h"
|
|
|
|
#include "devices.h"
|
2013-03-21 21:51:08 +00:00
|
|
|
#include "irqs.h"
|
2009-11-28 07:17:18 +00:00
|
|
|
|
2010-10-14 11:57:59 +00:00
|
|
|
#include "ste-dma40-db8500.h"
|
2013-03-19 14:41:55 +00:00
|
|
|
#include "db8500-regs.h"
|
2010-09-29 14:16:32 +00:00
|
|
|
#include "devices-db8500.h"
|
2010-08-19 11:06:32 +00:00
|
|
|
#include "board-mop500.h"
|
2010-12-10 10:08:48 +00:00
|
|
|
#include "board-mop500-regulators.h"
|
2010-06-03 06:58:42 +00:00
|
|
|
|
2013-02-07 09:17:31 +00:00
|
|
|
struct ab8500_platform_data ab8500_platdata = {
|
2010-07-26 10:12:15 +00:00
|
|
|
.irq_base = MOP500_AB8500_IRQ_BASE,
|
2013-04-02 12:24:19 +00:00
|
|
|
.regulator = &ab8500_regulator_plat_data,
|
2010-07-26 10:12:15 +00:00
|
|
|
};
|
|
|
|
|
2010-10-14 11:57:59 +00:00
|
|
|
#ifdef CONFIG_STE_DMA40
|
|
|
|
static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
|
|
|
|
.mode = STEDMA40_MODE_LOGICAL,
|
2013-05-15 09:51:53 +00:00
|
|
|
.dir = DMA_DEV_TO_MEM,
|
2013-05-03 14:31:56 +00:00
|
|
|
.dev_type = DB8500_DMA_DEV8_SSP0,
|
2010-10-14 11:57:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct stedma40_chan_cfg ssp0_dma_cfg_tx = {
|
|
|
|
.mode = STEDMA40_MODE_LOGICAL,
|
2013-05-15 09:51:53 +00:00
|
|
|
.dir = DMA_MEM_TO_DEV,
|
2013-05-03 14:31:56 +00:00
|
|
|
.dev_type = DB8500_DMA_DEV8_SSP0,
|
2010-10-14 11:57:59 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2012-09-27 09:17:36 +00:00
|
|
|
struct pl022_ssp_controller ssp0_plat = {
|
2010-10-14 11:57:59 +00: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,
|
|
|
|
};
|