This branch contains mostly additions and changes to platform enablement
and SoC-level drivers. Since there's sometimes a dependency on device-tree
changes, there's also a fair amount of those in this branch.
Pieces worth mentioning are:
- Mbus driver for Marvell platforms, allowing kernel configuration
and resource allocation of on-chip peripherals.
- Enablement of the mbus infrastructure from Marvell PCI-e drivers.
- Preparation of MSI support for Marvell platforms.
- Addition of new PCI-e host controller driver for Tegra platforms
- Some churn caused by sharing of macro names between i.MX 6Q and 6DL
platforms in the device tree sources and header files.
- Various suspend/PM updates for Tegra, including LP1 support.
- Versatile Express support for MCPM, part of big little support.
- Allwinner platform support for A20 and A31 SoCs (dual and quad Cortex-A7)
- OMAP2+ support for DRA7, a new Cortex-A15-based SoC.
The code that touches other architectures are patches moving
MSI arch-specific functions over to weak symbols and removal of
ARCH_SUPPORTS_MSI, acked by PCI maintainers.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJSKhYmAAoJEIwa5zzehBx322AP/1ONYs8o8f7/Gzq6lZvTN6T3
0pBTApg6Jfioi3lwKvUAEIcsW82YKQ+UZkbW66GQH6+Ri4aZJKZHuz0+JPU67OJ4
LtSLuzVWrymy2VOOUvAnS/SXkOZw/pHhU4cLNHn1dMndhUL1Uqp9/XwuiHEQyFsP
uOkpcBtIu0EWElov0PKKZ5SWBg8JJs2vy5ydiViGelWHCrZvDDZkWzIsDcBQxJLQ
juzT4+JE+KOu7vKmfw78o6iHoCS2TBRAN9YUCajRb8Wl+out1hrTahHnDWaZ5Mce
EskcQNkJROqFbjD4k3ABN4XGTv2VDmrztIwFe0SEQ7Dz/9ypCrBGT69uI9xIqTXr
GwVRIwAUFTpMupK0gy93z1ajV3N0CXV79out9+jQNUQybYE+czp8QOyhmuc1tZx0
8fn9jlBQe9Vy6yrs39gEcE7nUwrayeyQ+6UvqqwsE2pWZabNAnCMSPX5+QIu+T/3
tQ7+jYmfFeserp1sIDOHOnxfhtW9EI6U9d1h/DUCwrsuFdkL9ha4M/vh9Pwgye98
tBdz0T4yE39AJQwwFWRkv1jcQKcGu6WqJanmvS4KRBksGwuLWxy+ewOnkz2ifS25
ZYSyxAryZRBvQRqlOK11rXPfRcbGcY0MG9lkKX96rGcyWEizgE1DdjxXD8HoIleN
R8heV6GX5OzlFLGX2tKK
=fJ5x
-----END PGP SIGNATURE-----
Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform changes from Olof Johansson:
"This branch contains mostly additions and changes to platform
enablement and SoC-level drivers. Since there's sometimes a
dependency on device-tree changes, there's also a fair amount of
those in this branch.
Pieces worth mentioning are:
- Mbus driver for Marvell platforms, allowing kernel configuration
and resource allocation of on-chip peripherals.
- Enablement of the mbus infrastructure from Marvell PCI-e drivers.
- Preparation of MSI support for Marvell platforms.
- Addition of new PCI-e host controller driver for Tegra platforms
- Some churn caused by sharing of macro names between i.MX 6Q and 6DL
platforms in the device tree sources and header files.
- Various suspend/PM updates for Tegra, including LP1 support.
- Versatile Express support for MCPM, part of big little support.
- Allwinner platform support for A20 and A31 SoCs (dual and quad
Cortex-A7)
- OMAP2+ support for DRA7, a new Cortex-A15-based SoC.
The code that touches other architectures are patches moving MSI
arch-specific functions over to weak symbols and removal of
ARCH_SUPPORTS_MSI, acked by PCI maintainers"
* tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (266 commits)
tegra-cpuidle: provide stub when !CONFIG_CPU_IDLE
PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource
ARM: tegra: Drop ARCH_SUPPORTS_MSI and sort list
ARM: dts: vf610-twr: enable i2c0 device
ARM: dts: i.MX51: Add one more I2C2 pinmux entry
ARM: dts: i.MX51: Move pins configuration under "iomuxc" label
ARM: dtsi: imx6qdl-sabresd: Add USB OTG vbus pin to pinctrl_hog
ARM: dtsi: imx6qdl-sabresd: Add USB host 1 VBUS regulator
ARM: dts: imx27-phytec-phycore-som: Enable AUDMUX
ARM: dts: i.MX27: Disable AUDMUX in the template
ARM: dts: wandboard: Add support for SDIO bcm4329
ARM: i.MX5 clocks: Remove optional clock setup (CKIH1) from i.MX51 template
ARM: dts: imx53-qsb: Make USBH1 functional
ARM i.MX6Q: dts: Enable I2C1 with EEPROM and PMIC on Phytec phyFLEX-i.MX6 Ouad module
ARM i.MX6Q: dts: Enable SPI NOR flash on Phytec phyFLEX-i.MX6 Ouad module
ARM: dts: imx6qdl-sabresd: Add touchscreen support
ARM: imx: add ocram clock for imx53
ARM: dts: imx: ocram size is different between imx6q and imx6dl
ARM: dts: imx27-phytec-phycore-som: Fix regulator settings
ARM: dts: i.MX27: Remove clock name from CPU node
...
230 lines
6.4 KiB
C
230 lines
6.4 KiB
C
/*
|
|
* Neuros Technologies OSD2 board support
|
|
*
|
|
* Modified from original 644X-EVM board support.
|
|
* 2008 (c) Neuros Technology, LLC.
|
|
* 2009 (c) Jorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>
|
|
* 2009 (c) Andrey A. Porodko <Andrey.Porodko@gmail.com>
|
|
*
|
|
* The Neuros OSD 2.0 is the hardware component of the Neuros Open
|
|
* Internet Television Platform. Hardware is very close to TI
|
|
* DM644X-EVM board. It has:
|
|
* DM6446M02 module with 256MB NAND, 256MB RAM, TLV320AIC32 AIC,
|
|
* USB, Ethernet, SD/MMC, UART, THS8200, TVP7000 for video.
|
|
* Additionally realtime clock, IR remote control receiver,
|
|
* IR Blaster based on MSP430 (firmware although is different
|
|
* from used in DM644X-EVM), internal ATA-6 3.5” HDD drive
|
|
* with PATA interface, two muxed red-green leds.
|
|
*
|
|
* For more information please refer to
|
|
* http://wiki.neurostechnology.com/index.php/OSD_2.0_HD
|
|
*
|
|
* This file is licensed under the terms of the GNU General Public
|
|
* License version 2. This program is licensed "as is" without any
|
|
* warranty of any kind, whether express or implied.
|
|
*/
|
|
#include <linux/platform_device.h>
|
|
#include <linux/gpio.h>
|
|
#include <linux/mtd/partitions.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <mach/common.h>
|
|
#include <linux/platform_data/i2c-davinci.h>
|
|
#include <mach/serial.h>
|
|
#include <mach/mux.h>
|
|
#include <linux/platform_data/mtd-davinci.h>
|
|
#include <linux/platform_data/mmc-davinci.h>
|
|
#include <linux/platform_data/usb-davinci.h>
|
|
|
|
#include "davinci.h"
|
|
|
|
#define NEUROS_OSD2_PHY_ID "davinci_mdio-0:01"
|
|
#define LXT971_PHY_ID 0x001378e2
|
|
#define LXT971_PHY_MASK 0xfffffff0
|
|
|
|
#define NTOSD2_AUDIOSOC_I2C_ADDR 0x18
|
|
#define NTOSD2_MSP430_I2C_ADDR 0x59
|
|
#define NTOSD2_MSP430_IRQ 2
|
|
|
|
/* Neuros OSD2 has a Samsung 256 MByte NAND flash (Dev ID of 0xAA,
|
|
* 2048 blocks in the device, 64 pages per block, 2048 bytes per
|
|
* page.
|
|
*/
|
|
|
|
#define NAND_BLOCK_SIZE SZ_128K
|
|
|
|
static struct mtd_partition davinci_ntosd2_nandflash_partition[] = {
|
|
{
|
|
/* UBL (a few copies) plus U-Boot */
|
|
.name = "bootloader",
|
|
.offset = 0,
|
|
.size = 15 * NAND_BLOCK_SIZE,
|
|
.mask_flags = MTD_WRITEABLE, /* force read-only */
|
|
}, {
|
|
/* U-Boot environment */
|
|
.name = "params",
|
|
.offset = MTDPART_OFS_APPEND,
|
|
.size = 1 * NAND_BLOCK_SIZE,
|
|
.mask_flags = 0,
|
|
}, {
|
|
/* Kernel */
|
|
.name = "kernel",
|
|
.offset = MTDPART_OFS_APPEND,
|
|
.size = SZ_4M,
|
|
.mask_flags = 0,
|
|
}, {
|
|
/* File System */
|
|
.name = "filesystem",
|
|
.offset = MTDPART_OFS_APPEND,
|
|
.size = MTDPART_SIZ_FULL,
|
|
.mask_flags = 0,
|
|
}
|
|
/* A few blocks at end hold a flash Bad Block Table. */
|
|
};
|
|
|
|
static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = {
|
|
.parts = davinci_ntosd2_nandflash_partition,
|
|
.nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition),
|
|
.ecc_mode = NAND_ECC_HW,
|
|
.ecc_bits = 1,
|
|
.bbt_options = NAND_BBT_USE_FLASH,
|
|
};
|
|
|
|
static struct resource davinci_ntosd2_nandflash_resource[] = {
|
|
{
|
|
.start = DM644X_ASYNC_EMIF_DATA_CE0_BASE,
|
|
.end = DM644X_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
|
|
.flags = IORESOURCE_MEM,
|
|
}, {
|
|
.start = DM644X_ASYNC_EMIF_CONTROL_BASE,
|
|
.end = DM644X_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
|
.flags = IORESOURCE_MEM,
|
|
},
|
|
};
|
|
|
|
static struct platform_device davinci_ntosd2_nandflash_device = {
|
|
.name = "davinci_nand",
|
|
.id = 0,
|
|
.dev = {
|
|
.platform_data = &davinci_ntosd2_nandflash_data,
|
|
},
|
|
.num_resources = ARRAY_SIZE(davinci_ntosd2_nandflash_resource),
|
|
.resource = davinci_ntosd2_nandflash_resource,
|
|
};
|
|
|
|
static u64 davinci_fb_dma_mask = DMA_BIT_MASK(32);
|
|
|
|
static struct platform_device davinci_fb_device = {
|
|
.name = "davincifb",
|
|
.id = -1,
|
|
.dev = {
|
|
.dma_mask = &davinci_fb_dma_mask,
|
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
|
},
|
|
.num_resources = 0,
|
|
};
|
|
|
|
static struct snd_platform_data dm644x_ntosd2_snd_data;
|
|
|
|
static struct gpio_led ntosd2_leds[] = {
|
|
{ .name = "led1_green", .gpio = GPIO(10), },
|
|
{ .name = "led1_red", .gpio = GPIO(11), },
|
|
{ .name = "led2_green", .gpio = GPIO(12), },
|
|
{ .name = "led2_red", .gpio = GPIO(13), },
|
|
};
|
|
|
|
static struct gpio_led_platform_data ntosd2_leds_data = {
|
|
.num_leds = ARRAY_SIZE(ntosd2_leds),
|
|
.leds = ntosd2_leds,
|
|
};
|
|
|
|
static struct platform_device ntosd2_leds_dev = {
|
|
.name = "leds-gpio",
|
|
.id = -1,
|
|
.dev = {
|
|
.platform_data = &ntosd2_leds_data,
|
|
},
|
|
};
|
|
|
|
|
|
static struct platform_device *davinci_ntosd2_devices[] __initdata = {
|
|
&davinci_fb_device,
|
|
&ntosd2_leds_dev,
|
|
};
|
|
|
|
static void __init davinci_ntosd2_map_io(void)
|
|
{
|
|
dm644x_init();
|
|
}
|
|
|
|
static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
|
|
.wires = 4,
|
|
};
|
|
|
|
#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710)
|
|
|
|
#define HAS_NAND IS_ENABLED(CONFIG_MTD_NAND_DAVINCI)
|
|
|
|
static __init void davinci_ntosd2_init(void)
|
|
{
|
|
struct clk *aemif_clk;
|
|
struct davinci_soc_info *soc_info = &davinci_soc_info;
|
|
|
|
aemif_clk = clk_get(NULL, "aemif");
|
|
clk_prepare_enable(aemif_clk);
|
|
|
|
if (HAS_ATA) {
|
|
if (HAS_NAND)
|
|
pr_warning("WARNING: both IDE and Flash are "
|
|
"enabled, but they share AEMIF pins.\n"
|
|
"\tDisable IDE for NAND/NOR support.\n");
|
|
davinci_init_ide();
|
|
} else if (HAS_NAND) {
|
|
davinci_cfg_reg(DM644X_HPIEN_DISABLE);
|
|
davinci_cfg_reg(DM644X_ATAEN_DISABLE);
|
|
|
|
/* only one device will be jumpered and detected */
|
|
if (HAS_NAND)
|
|
platform_device_register(
|
|
&davinci_ntosd2_nandflash_device);
|
|
}
|
|
|
|
platform_add_devices(davinci_ntosd2_devices,
|
|
ARRAY_SIZE(davinci_ntosd2_devices));
|
|
|
|
davinci_serial_init(dm644x_serial_device);
|
|
dm644x_init_asp(&dm644x_ntosd2_snd_data);
|
|
|
|
soc_info->emac_pdata->phy_id = NEUROS_OSD2_PHY_ID;
|
|
|
|
davinci_setup_usb(1000, 8);
|
|
/*
|
|
* Mux the pins to be GPIOs, VLYNQEN is already done at startup.
|
|
* The AEAWx are five new AEAW pins that can be muxed by separately.
|
|
* They are a bitmask for GPIO management. According TI
|
|
* documentation (http://www.ti.com/lit/gpn/tms320dm6446) to employ
|
|
* gpio(10,11,12,13) for leds any combination of bits works except
|
|
* four last. So we are to reset all five.
|
|
*/
|
|
davinci_cfg_reg(DM644X_AEAW0);
|
|
davinci_cfg_reg(DM644X_AEAW1);
|
|
davinci_cfg_reg(DM644X_AEAW2);
|
|
davinci_cfg_reg(DM644X_AEAW3);
|
|
davinci_cfg_reg(DM644X_AEAW4);
|
|
|
|
davinci_setup_mmc(0, &davinci_ntosd2_mmc_config);
|
|
}
|
|
|
|
MACHINE_START(NEUROS_OSD2, "Neuros OSD2")
|
|
/* Maintainer: Neuros Technologies <neuros@groups.google.com> */
|
|
.atag_offset = 0x100,
|
|
.map_io = davinci_ntosd2_map_io,
|
|
.init_irq = davinci_irq_init,
|
|
.init_time = davinci_timer_init,
|
|
.init_machine = davinci_ntosd2_init,
|
|
.init_late = davinci_init_late,
|
|
.dma_zone_size = SZ_128M,
|
|
.restart = davinci_restart,
|
|
MACHINE_END
|