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