db5b0ae007
Continued device tree conversion and enablement across a number of platforms; Kirkwood, tegra, i.MX, Exynos, zynq and a couple of other smaller series as well. ux500 has seen continued conversion for platforms. Several platforms have seen pinctrl-via-devicetree conversions for simpler multiplatform. Tegra is adding data for new devices/drivers, and Exynos has a bunch of new bindings and devices added as well. So, pretty much the same progression in the right direction as the last few releases. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJQySW7AAoJEIwa5zzehBx39xcP/jzEQOTOJdK4zJd1OjgrQoX/ WnhbGJT941RNjRjvDG6HmZzhpsRoE4q/zkjFEKoKELdikRW0hYoR+zPCGuB7XtN5 aF1ZQrTx4gHf4KE7doIB8slaWeOq8aG2TLFhylyy+cuaIpRK0NG0pAR0ZqWaoga9 tZFciqzplLeo50vZ+y+lVVsR40j/w29EjwPXhCV30//gGOYLyp/VDu5PRtrBdgh8 EgpcT2EWJwMCN/Upcao/q2JbQktPHPpSwnpaUAALYB20uD7k5jo7wtYE/+L9nn6B bxcCDTMVmqzNTF+y0P16hDcs5jMLVjpI0xBiyZ1G6gShpggsSZCHY5ynjAtQ19se r+2WrNfOR23k6arJuOUAQSEnLdx0T5SlW6CJeFEofKv4uoebxAbKUiNO4ShWskhd nNptX1+L3hj3zpjGcEHmL6bd+nGtyMeoG9Yekcv1oZxdVcpKhFxh0s5PEJBEeXcN M7aAWlWJkplV22Olqhpc/3INCweq6E+zBrBxZaUBW/JCzGrqBUGC0BULDPAkmC4J CKL6IqIB73jGQ4OY14IaMU20GJrIGxZ7wzXOp4aw3OUpRlxsgurfyFQeIjUvVoZL PJ8DRoAVwreVHvKfgZZVKpSAY7dwcWbxpWsYlrH3zWIC5vRJ0UFwsD0TpLJWd6Vi XA8gQcJRWKGS8E5mRY39 =Rk9v -----END PGP SIGNATURE----- Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC device tree conversions and enablement from Olof Johansson: "Continued device tree conversion and enablement across a number of platforms; Kirkwood, tegra, i.MX, Exynos, zynq and a couple of other smaller series as well. ux500 has seen continued conversion for platforms. Several platforms have seen pinctrl-via-devicetree conversions for simpler multiplatform. Tegra is adding data for new devices/drivers, and Exynos has a bunch of new bindings and devices added as well. So, pretty much the same progression in the right direction as the last few releases." Fix up conflicts as per Olof. * tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (185 commits) ARM: ux500: Rename dbx500 cpufreq code to be more generic ARM: dts: add missing ux500 device trees ARM: ux500: Stop registering the PCM driver from platform code ARM: ux500: Move board specific GPIO info out to subordinate DTS files ARM: ux500: Disable the MMCI gpio-regulator by default ARM: Kirkwood: remove kirkwood_ehci_init() from new boards ARM: Kirkwood: Add support LED of OpenBlocks A6 ARM: Kirkwood: Convert to EHCI via DT for OpenBlocks A6 ARM: kirkwood: Add NAND partiton map for OpenBlocks A6 ARM: kirkwood: Add support second I2C bus and RTC on OpenBlocks A6 ARM: kirkwood: Add support DT of second I2C bus ARM: kirkwood: Convert mplcec4 board to pinctrl ARM: Kirkwood: Convert km_kirkwood to pinctrl ARM: Kirkwood: support 98DX412x kirkwoods with pinctrl ARM: Kirkwood: Convert IX2-200 to pinctrl. ARM: Kirkwood: Convert lsxl boards to pinctrl. ARM: Kirkwood: Convert ib62x0 to pinctrl. ARM: Kirkwood: Convert GoFlex Net to pinctrl. ARM: Kirkwood: Convert dreamplug to pinctrl. ARM: Kirkwood: Convert dockstar to pinctrl. ...
179 lines
4.4 KiB
C
179 lines
4.4 KiB
C
/*
|
|
* Copyright (C) ST-Ericsson SA 2010
|
|
*
|
|
* License terms: GNU General Public License (GPL), version 2
|
|
*/
|
|
|
|
#include <linux/platform_device.h>
|
|
#include <linux/init.h>
|
|
#include <linux/gpio.h>
|
|
#include <linux/platform_data/pinctrl-nomadik.h>
|
|
|
|
#include <plat/ste_dma40.h>
|
|
|
|
#include <mach/devices.h>
|
|
#include <mach/hardware.h>
|
|
#include <mach/irqs.h>
|
|
#include <mach/msp.h>
|
|
|
|
#include "ste-dma40-db8500.h"
|
|
#include "board-mop500.h"
|
|
#include "devices-db8500.h"
|
|
#include "pins-db8500.h"
|
|
|
|
static struct stedma40_chan_cfg msp0_dma_rx = {
|
|
.high_priority = true,
|
|
.dir = STEDMA40_PERIPH_TO_MEM,
|
|
|
|
.src_dev_type = DB8500_DMA_DEV31_MSP0_RX_SLIM0_CH0_RX,
|
|
.dst_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
|
|
.src_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
.dst_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
|
|
/* data_width is set during configuration */
|
|
};
|
|
|
|
static struct stedma40_chan_cfg msp0_dma_tx = {
|
|
.high_priority = true,
|
|
.dir = STEDMA40_MEM_TO_PERIPH,
|
|
|
|
.src_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
.dst_dev_type = DB8500_DMA_DEV31_MSP0_TX_SLIM0_CH0_TX,
|
|
|
|
.src_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
.dst_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
|
|
/* data_width is set during configuration */
|
|
};
|
|
|
|
struct msp_i2s_platform_data msp0_platform_data = {
|
|
.id = MSP_I2S_0,
|
|
.msp_i2s_dma_rx = &msp0_dma_rx,
|
|
.msp_i2s_dma_tx = &msp0_dma_tx,
|
|
};
|
|
|
|
static struct stedma40_chan_cfg msp1_dma_rx = {
|
|
.high_priority = true,
|
|
.dir = STEDMA40_PERIPH_TO_MEM,
|
|
|
|
.src_dev_type = DB8500_DMA_DEV30_MSP3_RX,
|
|
.dst_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
|
|
.src_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
.dst_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
|
|
/* data_width is set during configuration */
|
|
};
|
|
|
|
static struct stedma40_chan_cfg msp1_dma_tx = {
|
|
.high_priority = true,
|
|
.dir = STEDMA40_MEM_TO_PERIPH,
|
|
|
|
.src_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
.dst_dev_type = DB8500_DMA_DEV30_MSP1_TX,
|
|
|
|
.src_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
.dst_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
|
|
/* data_width is set during configuration */
|
|
};
|
|
|
|
struct msp_i2s_platform_data msp1_platform_data = {
|
|
.id = MSP_I2S_1,
|
|
.msp_i2s_dma_rx = NULL,
|
|
.msp_i2s_dma_tx = &msp1_dma_tx,
|
|
};
|
|
|
|
static struct stedma40_chan_cfg msp2_dma_rx = {
|
|
.high_priority = true,
|
|
.dir = STEDMA40_PERIPH_TO_MEM,
|
|
|
|
.src_dev_type = DB8500_DMA_DEV14_MSP2_RX,
|
|
.dst_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
|
|
/* MSP2 DMA doesn't work with PSIZE == 4 on DB8500v2 */
|
|
.src_info.psize = STEDMA40_PSIZE_LOG_1,
|
|
.dst_info.psize = STEDMA40_PSIZE_LOG_1,
|
|
|
|
/* data_width is set during configuration */
|
|
};
|
|
|
|
static struct stedma40_chan_cfg msp2_dma_tx = {
|
|
.high_priority = true,
|
|
.dir = STEDMA40_MEM_TO_PERIPH,
|
|
|
|
.src_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
.dst_dev_type = DB8500_DMA_DEV14_MSP2_TX,
|
|
|
|
.src_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
.dst_info.psize = STEDMA40_PSIZE_LOG_4,
|
|
|
|
.use_fixed_channel = true,
|
|
.phy_channel = 1,
|
|
|
|
/* data_width is set during configuration */
|
|
};
|
|
|
|
static struct platform_device *db8500_add_msp_i2s(struct device *parent,
|
|
int id,
|
|
resource_size_t base, int irq,
|
|
struct msp_i2s_platform_data *pdata)
|
|
{
|
|
struct platform_device *pdev;
|
|
struct resource res[] = {
|
|
DEFINE_RES_MEM(base, SZ_4K),
|
|
DEFINE_RES_IRQ(irq),
|
|
};
|
|
|
|
pr_info("Register platform-device 'ux500-msp-i2s', id %d, irq %d\n",
|
|
id, irq);
|
|
pdev = platform_device_register_resndata(parent, "ux500-msp-i2s", id,
|
|
res, ARRAY_SIZE(res),
|
|
pdata, sizeof(*pdata));
|
|
if (!pdev) {
|
|
pr_err("Failed to register platform-device 'ux500-msp-i2s.%d'!\n",
|
|
id);
|
|
return NULL;
|
|
}
|
|
|
|
return pdev;
|
|
}
|
|
|
|
/* Platform device for ASoC MOP500 machine */
|
|
static struct platform_device snd_soc_mop500 = {
|
|
.name = "snd-soc-mop500",
|
|
.id = 0,
|
|
.dev = {
|
|
.platform_data = NULL,
|
|
},
|
|
};
|
|
|
|
struct msp_i2s_platform_data msp2_platform_data = {
|
|
.id = MSP_I2S_2,
|
|
.msp_i2s_dma_rx = &msp2_dma_rx,
|
|
.msp_i2s_dma_tx = &msp2_dma_tx,
|
|
};
|
|
|
|
struct msp_i2s_platform_data msp3_platform_data = {
|
|
.id = MSP_I2S_3,
|
|
.msp_i2s_dma_rx = &msp1_dma_rx,
|
|
.msp_i2s_dma_tx = NULL,
|
|
};
|
|
|
|
void mop500_audio_init(struct device *parent)
|
|
{
|
|
pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__);
|
|
platform_device_register(&snd_soc_mop500);
|
|
|
|
pr_info("Initialize MSP I2S-devices.\n");
|
|
db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0,
|
|
&msp0_platform_data);
|
|
db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1,
|
|
&msp1_platform_data);
|
|
db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2,
|
|
&msp2_platform_data);
|
|
db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1,
|
|
&msp3_platform_data);
|
|
}
|