You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform updates from Arnd Bergmann:
"These are updates for platform specific code on 32-bit ARM machines,
essentially anything that can not (yet) be expressed using DT files.
Noteworthy changes include:
- Added support for the TI DRA71x family of SoCs in mach-omap2, this
is an new variant of the the DRA72x/DRA74x automotive infotainment
chips we already supported for a while.
- Added support for the ST STM32F746 SoC, the first Cortex-M7 based
microcontroller we support, related to the smaller STM32F4 family.
- Renesas adds support for r8a7743 and r8a7745 in mach-shmobile, see
http://elinux.org/RZ-G
- SMP is now supported on the OX820 platform
- A lot of code in mach-omap2 gets removed as a follow-up to removing
support for board files in the previous release
- Davinci has some new work to improve USB support
- For i.MX, the performance monitor now supports profiling the memory
controller using 'perf'"
* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (95 commits)
ARM: davinci: da830-evm: use gpio descriptor for mmc pins
ARM: davinci: da850-evm: use gpio descriptor for mmc pins
ARM: davinci: hawk: use gpio descriptor for mmc pins
ARM: ARTPEC-6: add select MFD_SYSCON to MACH_ARTPEC6
ARM: davinci: da8xx: Fix ohci device name
ARM: oxnas: Add OX820 config and makefile entry
ARM: oxnas: Add OX820 SMP support
ARM: davinci: PM: fix build when da850 not compiled in
ARM: orion5x: remove legacy support of ls-chl
ARM: integrator: drop EBI access use syscon
ARM: BCM5301X: Add back handler ignoring external imprecise aborts
ARM: davinci: PM: support da8xx DT platforms
ARM: davinci: PM: cleanup: remove references to pdata
ARM: davinci: PM: rework init, remove platform device
ARM: Kconfig: Introduce MACH_STM32F746 flag
ARM: mach-stm32: Add a new SOC - STM32F746
ARM: shmobile: document SK-RZG1E board
ARM: shmobile: r8a7745: basic SoC support
ARM: imx: mach-imx6ul: add imx6ull support
ARM: zynq: Reserve correct amount of non-DMA RAM
...
This commit is contained in:
@@ -5,7 +5,8 @@ Introduction
|
||||
------------
|
||||
|
||||
The STMicroelectronics family of Cortex-M based MCUs are supported by the
|
||||
'STM32' platform of ARM Linux. Currently only the STM32F429 is supported.
|
||||
'STM32' platform of ARM Linux. Currently only the STM32F429 (Cortex-M4)
|
||||
and STM32F746 (Cortex-M7) are supported.
|
||||
|
||||
|
||||
Configuration
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
STM32F746 Overview
|
||||
==================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
The STM32F746 is a Cortex-M7 MCU aimed at various applications.
|
||||
It features:
|
||||
- Cortex-M7 core running up to @216MHz
|
||||
- 1MB internal flash, 320KBytes internal RAM (+4KB of backup SRAM)
|
||||
- FMC controller to connect SDRAM, NOR and NAND memories
|
||||
- Dual mode QSPI
|
||||
- SD/MMC/SDIO support
|
||||
- Ethernet controller
|
||||
- USB OTFG FS & HS controllers
|
||||
- I2C, SPI, CAN busses support
|
||||
- Several 16 & 32 bits general purpose timers
|
||||
- Serial Audio interface
|
||||
- LCD controller
|
||||
- HDMI-CEC
|
||||
- SPDIFRX
|
||||
|
||||
Resources
|
||||
---------
|
||||
Datasheet and reference manual are publicly available on ST website:
|
||||
- http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f7-series/stm32f7x6/stm32f746ng.html
|
||||
|
||||
Document Author
|
||||
---------------
|
||||
Alexandre Torgue <alexandre.torgue@st.com>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -86,6 +86,9 @@ SoCs:
|
||||
- DRA722
|
||||
compatible = "ti,dra722", "ti,dra72", "ti,dra7"
|
||||
|
||||
- DRA718
|
||||
compatible = "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"
|
||||
|
||||
- AM5728
|
||||
compatible = "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"
|
||||
|
||||
@@ -181,6 +184,9 @@ Boards:
|
||||
- DRA722 EVM: Software Development Board for DRA722
|
||||
compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7"
|
||||
|
||||
- DRA718 EVM: Software Development Board for DRA718
|
||||
compatible = "ti,dra718-evm", "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"
|
||||
|
||||
- DM3730 Logic PD Torpedo + Wireless: Commercial System on Module with WiFi and Bluetooth
|
||||
compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3630", "ti,omap3"
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@ SoCs:
|
||||
compatible = "renesas,r8a73a4"
|
||||
- R-Mobile A1 (R8A77400)
|
||||
compatible = "renesas,r8a7740"
|
||||
- RZ/G1M (R8A77430)
|
||||
compatible = "renesas,r8a7743"
|
||||
- RZ/G1E (R8A77450)
|
||||
compatible = "renesas,r8a7745"
|
||||
- R-Car M1A (R8A77781)
|
||||
compatible = "renesas,r8a7778"
|
||||
- R-Car H1 (R8A77790)
|
||||
@@ -35,7 +39,7 @@ SoCs:
|
||||
|
||||
Boards:
|
||||
|
||||
- Alt
|
||||
- Alt (RTP0RC7794SEB00010S)
|
||||
compatible = "renesas,alt", "renesas,r8a7794"
|
||||
- APE6-EVM
|
||||
compatible = "renesas,ape6evm", "renesas,r8a73a4"
|
||||
@@ -47,7 +51,7 @@ Boards:
|
||||
compatible = "renesas,bockw", "renesas,r8a7778"
|
||||
- Genmai (RTK772100BC00000BR)
|
||||
compatible = "renesas,genmai", "renesas,r7s72100"
|
||||
- Gose
|
||||
- Gose (RTP0RC7793SEB00010S)
|
||||
compatible = "renesas,gose", "renesas,r8a7793"
|
||||
- H3ULCB (RTP0RC7795SKB00010S)
|
||||
compatible = "renesas,h3ulcb", "renesas,r8a7795";
|
||||
@@ -61,7 +65,7 @@ Boards:
|
||||
compatible = "renesas,kzm9g", "renesas,sh73a0"
|
||||
- Lager (RTP0RC7790SEB00010S)
|
||||
compatible = "renesas,lager", "renesas,r8a7790"
|
||||
- Marzen
|
||||
- Marzen (R0P7779A00010S)
|
||||
compatible = "renesas,marzen", "renesas,r8a7779"
|
||||
- Porter (M2-LCDP)
|
||||
compatible = "renesas,porter", "renesas,r8a7791"
|
||||
@@ -73,5 +77,9 @@ Boards:
|
||||
compatible = "renesas,salvator-x", "renesas,r8a7796";
|
||||
- SILK (RTP0RC7794LCB00011S)
|
||||
compatible = "renesas,silk", "renesas,r8a7794"
|
||||
- SK-RZG1E (YR8A77450S000BE)
|
||||
compatible = "renesas,sk-rzg1e", "renesas,r8a7745"
|
||||
- SK-RZG1M (YR8A77430S000BE)
|
||||
compatible = "renesas,sk-rzg1m", "renesas,r8a7743"
|
||||
- Wheat
|
||||
compatible = "renesas,wheat", "renesas,r8a7792"
|
||||
|
||||
@@ -888,6 +888,11 @@ config MACH_STM32F429
|
||||
depends on ARCH_STM32
|
||||
default y
|
||||
|
||||
config MACH_STM32F746
|
||||
bool "STMicrolectronics STM32F746"
|
||||
depends on ARCH_STM32
|
||||
default y
|
||||
|
||||
config ARCH_MPS2
|
||||
bool "ARM MPS2 platform"
|
||||
depends on ARM_SINGLE_ARMV7M
|
||||
|
||||
@@ -191,6 +191,7 @@ machine-$(CONFIG_ARCH_MXS) += mxs
|
||||
machine-$(CONFIG_ARCH_NETX) += netx
|
||||
machine-$(CONFIG_ARCH_NOMADIK) += nomadik
|
||||
machine-$(CONFIG_ARCH_NSPIRE) += nspire
|
||||
machine-$(CONFIG_ARCH_OXNAS) += oxnas
|
||||
machine-$(CONFIG_ARCH_OMAP1) += omap1
|
||||
machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
|
||||
machine-$(CONFIG_ARCH_ORION5X) += orion5x
|
||||
|
||||
@@ -14,6 +14,7 @@ config MACH_ARTPEC6
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select HAVE_ARM_SCU
|
||||
select HAVE_ARM_TWD if SMP
|
||||
select MFD_SYSCON
|
||||
help
|
||||
Support for Axis ARTPEC-6 ARM Cortex A9 Platform
|
||||
|
||||
|
||||
@@ -9,14 +9,42 @@
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/siginfo.h>
|
||||
#include <asm/signal.h>
|
||||
|
||||
#define FSR_EXTERNAL (1 << 12)
|
||||
#define FSR_READ (0 << 10)
|
||||
#define FSR_IMPRECISE 0x0406
|
||||
|
||||
static const char *const bcm5301x_dt_compat[] __initconst = {
|
||||
"brcm,bcm4708",
|
||||
NULL,
|
||||
};
|
||||
|
||||
static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
/*
|
||||
* We want to ignore aborts forwarded from the PCIe bus that are
|
||||
* expected and shouldn't really be passed by the PCIe controller.
|
||||
* The biggest disadvantage is the same FSR code may be reported when
|
||||
* reading non-existing APB register and we shouldn't ignore that.
|
||||
*/
|
||||
if (fsr == (FSR_EXTERNAL | FSR_READ | FSR_IMPRECISE))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void __init bcm5301x_init_early(void)
|
||||
{
|
||||
hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR,
|
||||
"imprecise external abort");
|
||||
}
|
||||
|
||||
DT_MACHINE_START(BCM5301X, "BCM5301X")
|
||||
.l2c_aux_val = 0,
|
||||
.l2c_aux_mask = ~0,
|
||||
.dt_compat = bcm5301x_dt_compat,
|
||||
.init_early = bcm5301x_init_early,
|
||||
MACHINE_END
|
||||
|
||||
@@ -36,5 +36,7 @@ obj-$(CONFIG_MACH_OMAPL138_HAWKBOARD) += board-omapl138-hawk.o
|
||||
|
||||
# Power Management
|
||||
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
|
||||
obj-$(CONFIG_SUSPEND) += pm.o sleep.o
|
||||
obj-$(CONFIG_HAVE_CLK) += pm_domain.o
|
||||
ifeq ($(CONFIG_SUSPEND),y)
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DA850) += pm.o sleep.o
|
||||
endif
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/console.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c/pcf857x.h>
|
||||
@@ -27,6 +28,7 @@
|
||||
#include <linux/platform_data/mtd-davinci-aemif.h>
|
||||
#include <linux/platform_data/spi-davinci.h>
|
||||
#include <linux/platform_data/usb-davinci.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
@@ -106,43 +108,24 @@ static irqreturn_t da830_evm_usb_ocic_irq(int irq, void *dev_id)
|
||||
|
||||
static __init void da830_evm_usb_init(void)
|
||||
{
|
||||
u32 cfgchip2;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Set up USB clock/mode in the CFGCHIP2 register.
|
||||
* FYI: CFGCHIP2 is 0x0000ef00 initially.
|
||||
*/
|
||||
cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
|
||||
|
||||
/* USB2.0 PHY reference clock is 24 MHz */
|
||||
cfgchip2 &= ~CFGCHIP2_REFFREQ;
|
||||
cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ;
|
||||
|
||||
/*
|
||||
* Select internal reference clock for USB 2.0 PHY
|
||||
* and use it as a clock source for USB 1.1 PHY
|
||||
* (this is the default setting anyway).
|
||||
*/
|
||||
cfgchip2 &= ~CFGCHIP2_USB1PHYCLKMUX;
|
||||
cfgchip2 |= CFGCHIP2_USB2PHYCLKMUX;
|
||||
|
||||
/*
|
||||
* We have to override VBUS/ID signals when MUSB is configured into the
|
||||
* host-only mode -- ID pin will float if no cable is connected, so the
|
||||
* controller won't be able to drive VBUS thinking that it's a B-device.
|
||||
* Otherwise, we want to use the OTG mode and enable VBUS comparators.
|
||||
*/
|
||||
cfgchip2 &= ~CFGCHIP2_OTGMODE;
|
||||
#ifdef CONFIG_USB_MUSB_HOST
|
||||
cfgchip2 |= CFGCHIP2_FORCE_HOST;
|
||||
#else
|
||||
cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;
|
||||
#endif
|
||||
|
||||
__raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
|
||||
|
||||
/* USB_REFCLKIN is not used. */
|
||||
ret = da8xx_register_usb20_phy_clk(false);
|
||||
if (ret)
|
||||
pr_warn("%s: USB 2.0 PHY CLK registration failed: %d\n",
|
||||
__func__, ret);
|
||||
|
||||
ret = da8xx_register_usb11_phy_clk(false);
|
||||
if (ret)
|
||||
pr_warn("%s: USB 1.1 PHY CLK registration failed: %d\n",
|
||||
__func__, ret);
|
||||
|
||||
ret = da8xx_register_usb_phy();
|
||||
if (ret)
|
||||
pr_warn("%s: USB PHY registration failed: %d\n",
|
||||
__func__, ret);
|
||||
|
||||
ret = davinci_cfg_reg(DA830_USB0_DRVVBUS);
|
||||
if (ret)
|
||||
pr_warn("%s: USB 2.0 PinMux setup failed: %d\n", __func__, ret);
|
||||
@@ -222,22 +205,16 @@ static const short da830_evm_mmc_sd_pins[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
#define DA830_MMCSD_WP_PIN GPIO_TO_PIN(2, 1)
|
||||
#define DA830_MMCSD_CD_PIN GPIO_TO_PIN(2, 2)
|
||||
|
||||
static int da830_evm_mmc_get_ro(int index)
|
||||
{
|
||||
return gpio_get_value(DA830_MMCSD_WP_PIN);
|
||||
}
|
||||
|
||||
static int da830_evm_mmc_get_cd(int index)
|
||||
{
|
||||
return !gpio_get_value(DA830_MMCSD_CD_PIN);
|
||||
}
|
||||
static struct gpiod_lookup_table mmc_gpios_table = {
|
||||
.dev_id = "da830-mmc.0",
|
||||
.table = {
|
||||
/* gpio chip 1 contains gpio range 32-63 */
|
||||
GPIO_LOOKUP("davinci_gpio.1", 2, "cd", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.1", 1, "wp", GPIO_ACTIVE_LOW),
|
||||
},
|
||||
};
|
||||
|
||||
static struct davinci_mmc_config da830_evm_mmc_config = {
|
||||
.get_ro = da830_evm_mmc_get_ro,
|
||||
.get_cd = da830_evm_mmc_get_cd,
|
||||
.wires = 8,
|
||||
.max_freq = 50000000,
|
||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||
@@ -253,26 +230,12 @@ static inline void da830_evm_init_mmc(void)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = gpio_request(DA830_MMCSD_WP_PIN, "MMC WP");
|
||||
if (ret) {
|
||||
pr_warn("%s: can not open GPIO %d\n",
|
||||
__func__, DA830_MMCSD_WP_PIN);
|
||||
return;
|
||||
}
|
||||
gpio_direction_input(DA830_MMCSD_WP_PIN);
|
||||
|
||||
ret = gpio_request(DA830_MMCSD_CD_PIN, "MMC CD\n");
|
||||
if (ret) {
|
||||
pr_warn("%s: can not open GPIO %d\n",
|
||||
__func__, DA830_MMCSD_CD_PIN);
|
||||
return;
|
||||
}
|
||||
gpio_direction_input(DA830_MMCSD_CD_PIN);
|
||||
gpiod_add_lookup_table(&mmc_gpios_table);
|
||||
|
||||
ret = da8xx_register_mmcsd0(&da830_evm_mmc_config);
|
||||
if (ret) {
|
||||
pr_warn("%s: mmc/sd registration failed: %d\n", __func__, ret);
|
||||
gpio_free(DA830_MMCSD_WP_PIN);
|
||||
gpiod_remove_lookup_table(&mmc_gpios_table);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,6 +551,10 @@ static __init void da830_evm_init(void)
|
||||
struct davinci_soc_info *soc_info = &davinci_soc_info;
|
||||
int ret;
|
||||
|
||||
ret = da8xx_register_cfgchip();
|
||||
if (ret)
|
||||
pr_warn("%s: CFGCHIP registration failed: %d\n", __func__, ret);
|
||||
|
||||
ret = da830_register_gpio();
|
||||
if (ret)
|
||||
pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
|
||||
@@ -647,6 +614,8 @@ static __init void da830_evm_init(void)
|
||||
ret = da8xx_register_spi_bus(0, ARRAY_SIZE(da830evm_spi_info));
|
||||
if (ret)
|
||||
pr_warn("%s: spi 0 registration failed: %d\n", __func__, ret);
|
||||
|
||||
regulator_has_full_constraints();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_8250_CONSOLE
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/i2c.h>
|
||||
@@ -56,9 +57,6 @@
|
||||
#define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8)
|
||||
#define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15)
|
||||
|
||||
#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0)
|
||||
#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1)
|
||||
|
||||
#define DA850_MII_MDIO_CLKEN_PIN GPIO_TO_PIN(2, 6)
|
||||
|
||||
static struct mtd_partition da850evm_spiflash_part[] = {
|
||||
@@ -196,18 +194,6 @@ static struct platform_device da850_evm_norflash_device = {
|
||||
.resource = da850_evm_norflash_resource,
|
||||
};
|
||||
|
||||
static struct davinci_pm_config da850_pm_pdata = {
|
||||
.sleepcount = 128,
|
||||
};
|
||||
|
||||
static struct platform_device da850_pm_device = {
|
||||
.name = "pm-davinci",
|
||||
.dev = {
|
||||
.platform_data = &da850_pm_pdata,
|
||||
},
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
/* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash
|
||||
* (128K blocks). It may be used instead of the (default) SPI flash
|
||||
* to boot, using TI's tools to install the secondary boot loader
|
||||
@@ -776,19 +762,16 @@ static const short da850_evm_mcasp_pins[] __initconst = {
|
||||
-1
|
||||
};
|
||||
|
||||
static int da850_evm_mmc_get_ro(int index)
|
||||
{
|
||||
return gpio_get_value(DA850_MMCSD_WP_PIN);
|
||||
}
|
||||
|
||||
static int da850_evm_mmc_get_cd(int index)
|
||||
{
|
||||
return !gpio_get_value(DA850_MMCSD_CD_PIN);
|
||||
}
|
||||
static struct gpiod_lookup_table mmc_gpios_table = {
|
||||
.dev_id = "da830-mmc.0",
|
||||
.table = {
|
||||
/* gpio chip 2 contains gpio range 64-95 */
|
||||
GPIO_LOOKUP("davinci_gpio.2", 0, "cd", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.2", 1, "wp", GPIO_ACTIVE_LOW),
|
||||
},
|
||||
};
|
||||
|
||||
static struct davinci_mmc_config da850_mmc_config = {
|
||||
.get_ro = da850_evm_mmc_get_ro,
|
||||
.get_cd = da850_evm_mmc_get_cd,
|
||||
.wires = 4,
|
||||
.max_freq = 50000000,
|
||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||
@@ -1345,6 +1328,10 @@ static __init void da850_evm_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = da8xx_register_cfgchip();
|
||||
if (ret)
|
||||
pr_warn("%s: CFGCHIP registration failed: %d\n", __func__, ret);
|
||||
|
||||
ret = da850_register_gpio();
|
||||
if (ret)
|
||||
pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
|
||||
@@ -1379,17 +1366,7 @@ static __init void da850_evm_init(void)
|
||||
pr_warn("%s: MMCSD0 mux setup failed: %d\n",
|
||||
__func__, ret);
|
||||
|
||||
ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n");
|
||||
if (ret)
|
||||
pr_warn("%s: can not open GPIO %d\n",
|
||||
__func__, DA850_MMCSD_CD_PIN);
|
||||
gpio_direction_input(DA850_MMCSD_CD_PIN);
|
||||
|
||||
ret = gpio_request(DA850_MMCSD_WP_PIN, "MMC WP\n");
|
||||
if (ret)
|
||||
pr_warn("%s: can not open GPIO %d\n",
|
||||
__func__, DA850_MMCSD_WP_PIN);
|
||||
gpio_direction_input(DA850_MMCSD_WP_PIN);
|
||||
gpiod_add_lookup_table(&mmc_gpios_table);
|
||||
|
||||
ret = da8xx_register_mmcsd0(&da850_mmc_config);
|
||||
if (ret)
|
||||
@@ -1453,10 +1430,7 @@ static __init void da850_evm_init(void)
|
||||
if (ret)
|
||||
pr_warn("%s: cpuidle registration failed: %d\n", __func__, ret);
|
||||
|
||||
ret = da850_register_pm(&da850_pm_device);
|
||||
if (ret)
|
||||
pr_warn("%s: suspend registration failed: %d\n", __func__, ret);
|
||||
|
||||
davinci_pm_init();
|
||||
da850_vpif_init();
|
||||
|
||||
ret = spi_register_board_info(da850evm_spi_info,
|
||||
|
||||
@@ -498,22 +498,14 @@ static void __init mityomapl138_config_emac(void)
|
||||
pr_warn("emac registration failed: %d\n", ret);
|
||||
}
|
||||
|
||||
static struct davinci_pm_config da850_pm_pdata = {
|
||||
.sleepcount = 128,
|
||||
};
|
||||
|
||||
static struct platform_device da850_pm_device = {
|
||||
.name = "pm-davinci",
|
||||
.dev = {
|
||||
.platform_data = &da850_pm_pdata,
|
||||
},
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static void __init mityomapl138_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = da8xx_register_cfgchip();
|
||||
if (ret)
|
||||
pr_warn("%s: CFGCHIP registration failed: %d\n", __func__, ret);
|
||||
|
||||
/* for now, no special EDMA channels are reserved */
|
||||
ret = da850_register_edma(NULL);
|
||||
if (ret)
|
||||
@@ -555,9 +547,7 @@ static void __init mityomapl138_init(void)
|
||||
if (ret)
|
||||
pr_warn("cpuidle registration failed: %d\n", ret);
|
||||
|
||||
ret = da850_register_pm(&da850_pm_device);
|
||||
if (ret)
|
||||
pr_warn("suspend registration failed: %d\n", ret);
|
||||
davinci_pm_init();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_8250_CONSOLE
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/platform_data/gpio-davinci.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
@@ -24,8 +26,6 @@
|
||||
#include <mach/mux.h>
|
||||
|
||||
#define HAWKBOARD_PHY_ID "davinci_mdio-0:07"
|
||||
#define DA850_HAWK_MMCSD_CD_PIN GPIO_TO_PIN(3, 12)
|
||||
#define DA850_HAWK_MMCSD_WP_PIN GPIO_TO_PIN(3, 13)
|
||||
|
||||
#define DA850_USB1_VBUS_PIN GPIO_TO_PIN(2, 4)
|
||||
#define DA850_USB1_OC_PIN GPIO_TO_PIN(6, 13)
|
||||
@@ -122,19 +122,16 @@ static const short hawk_mmcsd0_pins[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
static int da850_hawk_mmc_get_ro(int index)
|
||||
{
|
||||
return gpio_get_value(DA850_HAWK_MMCSD_WP_PIN);
|
||||
}
|
||||
|
||||
static int da850_hawk_mmc_get_cd(int index)
|
||||
{
|
||||
return !gpio_get_value(DA850_HAWK_MMCSD_CD_PIN);
|
||||
}
|
||||
static struct gpiod_lookup_table mmc_gpios_table = {
|
||||
.dev_id = "da830-mmc.0",
|
||||
.table = {
|
||||
/* CD: gpio3_12: gpio60: chip 1 contains gpio range 32-63*/
|
||||
GPIO_LOOKUP("davinci_gpio.1", 28, "cd", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.1", 29, "wp", GPIO_ACTIVE_LOW),
|
||||
},
|
||||
};
|
||||
|
||||
static struct davinci_mmc_config da850_mmc_config = {
|
||||
.get_ro = da850_hawk_mmc_get_ro,
|
||||
.get_cd = da850_hawk_mmc_get_cd,
|
||||
.wires = 4,
|
||||
.max_freq = 50000000,
|
||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||
@@ -150,21 +147,7 @@ static __init void omapl138_hawk_mmc_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = gpio_request_one(DA850_HAWK_MMCSD_CD_PIN,
|
||||
GPIOF_DIR_IN, "MMC CD");
|
||||
if (ret < 0) {
|
||||
pr_warn("%s: can not open GPIO %d\n",
|
||||
__func__, DA850_HAWK_MMCSD_CD_PIN);
|
||||
return;
|
||||
}
|
||||
|
||||
ret = gpio_request_one(DA850_HAWK_MMCSD_WP_PIN,
|
||||
GPIOF_DIR_IN, "MMC WP");
|
||||
if (ret < 0) {
|
||||
pr_warn("%s: can not open GPIO %d\n",
|
||||
__func__, DA850_HAWK_MMCSD_WP_PIN);
|
||||
goto mmc_setup_wp_fail;
|
||||
}
|
||||
gpiod_add_lookup_table(&mmc_gpios_table);
|
||||
|
||||
ret = da8xx_register_mmcsd0(&da850_mmc_config);
|
||||
if (ret) {
|
||||
@@ -175,9 +158,7 @@ static __init void omapl138_hawk_mmc_init(void)
|
||||
return;
|
||||
|
||||
mmc_setup_mmcsd_fail:
|
||||
gpio_free(DA850_HAWK_MMCSD_WP_PIN);
|
||||
mmc_setup_wp_fail:
|
||||
gpio_free(DA850_HAWK_MMCSD_CD_PIN);
|
||||
gpiod_remove_lookup_table(&mmc_gpios_table);
|
||||
}
|
||||
|
||||
static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id);
|
||||
@@ -243,7 +224,6 @@ static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id)
|
||||
static __init void omapl138_hawk_usb_init(void)
|
||||
{
|
||||
int ret;
|
||||
u32 cfgchip2;
|
||||
|
||||
ret = davinci_cfg_reg_list(da850_hawk_usb11_pins);
|
||||
if (ret) {
|
||||
@@ -251,12 +231,20 @@ static __init void omapl138_hawk_usb_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Setup the Ref. clock frequency for the HAWK at 24 MHz. */
|
||||
ret = da8xx_register_usb20_phy_clk(false);
|
||||
if (ret)
|
||||
pr_warn("%s: USB 2.0 PHY CLK registration failed: %d\n",
|
||||
__func__, ret);
|
||||
|
||||
cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
|
||||
cfgchip2 &= ~CFGCHIP2_REFFREQ;
|
||||
cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ;
|
||||
__raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
|
||||
ret = da8xx_register_usb11_phy_clk(false);
|
||||
if (ret)
|
||||
pr_warn("%s: USB 1.1 PHY CLK registration failed: %d\n",
|
||||
__func__, ret);
|
||||
|
||||
ret = da8xx_register_usb_phy();
|
||||
if (ret)
|
||||
pr_warn("%s: USB PHY registration failed: %d\n",
|
||||
__func__, ret);
|
||||
|
||||
ret = gpio_request_one(DA850_USB1_VBUS_PIN,
|
||||
GPIOF_DIR_OUT, "USB1 VBUS");
|
||||
@@ -292,6 +280,10 @@ static __init void omapl138_hawk_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = da8xx_register_cfgchip();
|
||||
if (ret)
|
||||
pr_warn("%s: CFGCHIP registration failed: %d\n", __func__, ret);
|
||||
|
||||
ret = da850_register_gpio();
|
||||
if (ret)
|
||||
pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
|
||||
@@ -317,6 +309,8 @@ static __init void omapl138_hawk_init(void)
|
||||
if (ret)
|
||||
pr_warn("%s: dsp/rproc registration failed: %d\n",
|
||||
__func__, ret);
|
||||
|
||||
regulator_has_full_constraints();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_8250_CONSOLE
|
||||
|
||||
@@ -118,6 +118,5 @@ err:
|
||||
void __init davinci_init_late(void)
|
||||
{
|
||||
davinci_cpufreq_init();
|
||||
davinci_pm_init();
|
||||
davinci_clk_disable_unused();
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ static struct clk_lookup da830_clks[] = {
|
||||
CLK("davinci-mcasp.0", NULL, &mcasp0_clk),
|
||||
CLK("davinci-mcasp.1", NULL, &mcasp1_clk),
|
||||
CLK("davinci-mcasp.2", NULL, &mcasp2_clk),
|
||||
CLK(NULL, "usb20", &usb20_clk),
|
||||
CLK("musb-da8xx", "usb20", &usb20_clk),
|
||||
CLK(NULL, "aemif", &aemif_clk),
|
||||
CLK(NULL, "aintc", &aintc_clk),
|
||||
CLK(NULL, "secu_mgr", &secu_mgr_clk),
|
||||
@@ -420,7 +420,7 @@ static struct clk_lookup da830_clks[] = {
|
||||
CLK("davinci_mdio.0", "fck", &emac_clk),
|
||||
CLK(NULL, "gpio", &gpio_clk),
|
||||
CLK("i2c_davinci.2", NULL, &i2c1_clk),
|
||||
CLK(NULL, "usb11", &usb11_clk),
|
||||
CLK("ohci-da8xx", "usb11", &usb11_clk),
|
||||
CLK(NULL, "emif3", &emif3_clk),
|
||||
CLK(NULL, "arm", &arm_clk),
|
||||
CLK(NULL, "rmii", &rmii_clk),
|
||||
|
||||
@@ -538,8 +538,8 @@ static struct clk_lookup da850_clks[] = {
|
||||
CLK("da830-mmc.1", NULL, &mmcsd1_clk),
|
||||
CLK("ti-aemif", NULL, &aemif_clk),
|
||||
CLK(NULL, "aemif", &aemif_clk),
|
||||
CLK(NULL, "usb11", &usb11_clk),
|
||||
CLK(NULL, "usb20", &usb20_clk),
|
||||
CLK("ohci-da8xx", "usb11", &usb11_clk),
|
||||
CLK("musb-da8xx", "usb20", &usb20_clk),
|
||||
CLK("spi_davinci.0", NULL, &spi0_clk),
|
||||
CLK("spi_davinci.1", NULL, &spi1_clk),
|
||||
CLK("vpif", NULL, &vpif_clk),
|
||||
@@ -1214,44 +1214,6 @@ static int da850_round_armrate(struct clk *clk, unsigned long rate)
|
||||
}
|
||||
#endif
|
||||
|
||||
int __init da850_register_pm(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
struct davinci_pm_config *pdata = pdev->dev.platform_data;
|
||||
|
||||
ret = davinci_cfg_reg(DA850_RTC_ALARM);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pdata->ddr2_ctlr_base = da8xx_get_mem_ctlr();
|
||||
pdata->deepsleep_reg = DA8XX_SYSCFG1_VIRT(DA8XX_DEEPSLEEP_REG);
|
||||
pdata->ddrpsc_num = DA8XX_LPSC1_EMIF3C;
|
||||
|
||||
pdata->cpupll_reg_base = ioremap(DA8XX_PLL0_BASE, SZ_4K);
|
||||
if (!pdata->cpupll_reg_base)
|
||||
return -ENOMEM;
|
||||
|
||||
pdata->ddrpll_reg_base = ioremap(DA850_PLL1_BASE, SZ_4K);
|
||||
if (!pdata->ddrpll_reg_base) {
|
||||
ret = -ENOMEM;
|
||||
goto no_ddrpll_mem;
|
||||
}
|
||||
|
||||
pdata->ddrpsc_reg_base = ioremap(DA8XX_PSC1_BASE, SZ_4K);
|
||||
if (!pdata->ddrpsc_reg_base) {
|
||||
ret = -ENOMEM;
|
||||
goto no_ddrpsc_mem;
|
||||
}
|
||||
|
||||
return platform_device_register(pdev);
|
||||
|
||||
no_ddrpsc_mem:
|
||||
iounmap(pdata->ddrpll_reg_base);
|
||||
no_ddrpll_mem:
|
||||
iounmap(pdata->cpupll_reg_base);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VPIF resource, platform data */
|
||||
static u64 da850_vpif_dma_mask = DMA_BIT_MASK(32);
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
|
||||
NULL),
|
||||
OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL),
|
||||
OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", NULL),
|
||||
OF_DEV_AUXDATA("ti,da850-tilcdc", 0x01e13000, "da8xx_lcdc.0", NULL),
|
||||
OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL),
|
||||
OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL),
|
||||
OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL),
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -45,7 +49,19 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
|
||||
|
||||
static void __init da850_init_machine(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = da8xx_register_usb20_phy_clk(false);
|
||||
if (ret)
|
||||
pr_warn("%s: registering USB 2.0 PHY clock failed: %d",
|
||||
__func__, ret);
|
||||
ret = da8xx_register_usb11_phy_clk(false);
|
||||
if (ret)
|
||||
pr_warn("%s: registering USB 1.1 PHY clock failed: %d",
|
||||
__func__, ret);
|
||||
|
||||
of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
|
||||
davinci_pm_init();
|
||||
}
|
||||
|
||||
static const char *const da850_boards_compat[] __initconst = {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_data/syscon.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-contiguous.h>
|
||||
#include <linux/serial_8250.h>
|
||||
@@ -57,15 +58,6 @@
|
||||
#define DA8XX_EMAC_RAM_OFFSET 0x0000
|
||||
#define DA8XX_EMAC_CTRL_RAM_SIZE SZ_8K
|
||||
|
||||
#define DA8XX_DMA_SPI0_RX EDMA_CTLR_CHAN(0, 14)
|
||||
#define DA8XX_DMA_SPI0_TX EDMA_CTLR_CHAN(0, 15)
|
||||
#define DA8XX_DMA_MMCSD0_RX EDMA_CTLR_CHAN(0, 16)
|
||||
#define DA8XX_DMA_MMCSD0_TX EDMA_CTLR_CHAN(0, 17)
|
||||
#define DA8XX_DMA_SPI1_RX EDMA_CTLR_CHAN(0, 18)
|
||||
#define DA8XX_DMA_SPI1_TX EDMA_CTLR_CHAN(0, 19)
|
||||
#define DA850_DMA_MMCSD1_RX EDMA_CTLR_CHAN(1, 28)
|
||||
#define DA850_DMA_MMCSD1_TX EDMA_CTLR_CHAN(1, 29)
|
||||
|
||||
void __iomem *da8xx_syscfg0_base;
|
||||
void __iomem *da8xx_syscfg1_base;
|
||||
|
||||
@@ -964,16 +956,6 @@ static struct resource da8xx_spi0_resources[] = {
|
||||
.end = IRQ_DA8XX_SPINT0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
.start = DA8XX_DMA_SPI0_RX,
|
||||
.end = DA8XX_DMA_SPI0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[3] = {
|
||||
.start = DA8XX_DMA_SPI0_TX,
|
||||
.end = DA8XX_DMA_SPI0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource da8xx_spi1_resources[] = {
|
||||
@@ -987,16 +969,6 @@ static struct resource da8xx_spi1_resources[] = {
|
||||
.end = IRQ_DA8XX_SPINT1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
.start = DA8XX_DMA_SPI1_RX,
|
||||
.end = DA8XX_DMA_SPI1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[3] = {
|
||||
.start = DA8XX_DMA_SPI1_TX,
|
||||
.end = DA8XX_DMA_SPI1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct davinci_spi_platform_data da8xx_spi_pdata[] = {
|
||||
@@ -1089,3 +1061,30 @@ int __init da850_register_sata(unsigned long refclkpn)
|
||||
return platform_device_register(&da850_sata_device);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct syscon_platform_data da8xx_cfgchip_platform_data = {
|
||||
.label = "cfgchip",
|
||||
};
|
||||
|
||||
static struct resource da8xx_cfgchip_resources[] = {
|
||||
{
|
||||
.start = DA8XX_SYSCFG0_BASE + DA8XX_CFGCHIP0_REG,
|
||||
.end = DA8XX_SYSCFG0_BASE + DA8XX_CFGCHIP4_REG + 3,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device da8xx_cfgchip_device = {
|
||||
.name = "syscon",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &da8xx_cfgchip_platform_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(da8xx_cfgchip_resources),
|
||||
.resource = da8xx_cfgchip_resources,
|
||||
};
|
||||
|
||||
int __init da8xx_register_cfgchip(void)
|
||||
{
|
||||
return platform_device_register(&da8xx_cfgchip_device);
|
||||
}
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
#define DM365_MMCSD0_BASE 0x01D11000
|
||||
#define DM365_MMCSD1_BASE 0x01D00000
|
||||
|
||||
#define DAVINCI_DMA_MMCRXEVT 26
|
||||
#define DAVINCI_DMA_MMCTXEVT 27
|
||||
|
||||
void __iomem *davinci_sysmod_base;
|
||||
|
||||
void davinci_map_sysmod(void)
|
||||
|
||||
@@ -397,14 +397,6 @@ static struct resource dm355_spi0_resources[] = {
|
||||
.start = IRQ_DM355_SPINT0_0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = 17,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.start = 16,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct davinci_spi_platform_data dm355_spi0_pdata = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user