Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319333
b: refs/heads/master
c: 633842f
h: refs/heads/master
i:
  319331: 152530d
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jul 11, 2012
1 parent f0f985e commit da64f34
Show file tree
Hide file tree
Showing 39 changed files with 2,101 additions and 514 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f185c21485eba6aef11b9432eda97f28ed62dbc9
refs/heads/master: 633842f1734fd2c92f02acc1a0a122764d6f79c1
21 changes: 21 additions & 0 deletions trunk/arch/arm/boot/dts/r8a7740.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Device Tree Source for the r8a7740 SoC
*
* Copyright (C) 2012 Renesas Solutions Corp.
*
* 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/ "skeleton.dtsi"

/ {
compatible = "renesas,r8a7740";

cpus {
cpu@0 {
compatible = "arm,cortex-a9";
};
};
};
21 changes: 21 additions & 0 deletions trunk/arch/arm/boot/dts/sh7377.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Device Tree Source for the sh7377 SoC
*
* Copyright (C) 2012 Renesas Solutions Corp.
*
* 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/ "skeleton.dtsi"

/ {
compatible = "renesas,sh7377";

cpus {
cpu@0 {
compatible = "arm,cortex-a8";
};
};
};
25 changes: 15 additions & 10 deletions trunk/arch/arm/configs/armadillo800eva_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SLAB=y
CONFIG_MODULES=y
Expand All @@ -21,7 +18,7 @@ CONFIG_ARCH_SHMOBILE=y
CONFIG_ARCH_R8A7740=y
CONFIG_MACH_ARMADILLO800EVA=y
# CONFIG_SH_TIMER_TMU is not set
# CONFIG_ARM_THUMB is not set
CONFIG_ARM_THUMB=y
CONFIG_CPU_BPREDICT_DISABLE=y
# CONFIG_CACHE_L2X0 is not set
CONFIG_ARM_ERRATA_430973=y
Expand All @@ -39,6 +36,7 @@ CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"
CONFIG_CMDLINE_FORCE=y
CONFIG_KEXEC=y
CONFIG_VFP=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
# CONFIG_SUSPEND is not set
CONFIG_NET=y
Expand Down Expand Up @@ -89,33 +87,41 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
CONFIG_I2C=y
CONFIG_I2C_SH_MOBILE=y
# CONFIG_HWMON is not set
CONFIG_MEDIA_SUPPORT=y
CONFIG_VIDEO_DEV=y
# CONFIG_RC_CORE is not set
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
# CONFIG_V4L_USB_DRIVERS is not set
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_SOC_CAMERA=y
CONFIG_SOC_CAMERA_MT9T112=y
CONFIG_VIDEO_SH_MOBILE_CEU=y
# CONFIG_RADIO_ADAPTERS is not set
CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_SH_MOBILE_LCDC=y
CONFIG_FB_SH_MOBILE_HDMI=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_SOUND=y
CONFIG_SND=y
# CONFIG_SND_SUPPORT_OLD_API is not set
# CONFIG_SND_VERBOSE_PROCFS is not set
# CONFIG_SND_DRIVERS is not set
# CONFIG_SND_ARM is not set
CONFIG_SND_SOC=y
CONFIG_SND_SOC_SH4_FSI=y
# CONFIG_HID_SUPPORT is not set
CONFIG_USB=y
# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_RENESAS_USBHS=y
CONFIG_USB_GADGET=y
CONFIG_USB_RENESAS_USBHS_UDC=y
CONFIG_USB_ETH=m
CONFIG_MMC=y
CONFIG_MMC_SDHI=y
CONFIG_MMC_SH_MMCIF=y
CONFIG_DMADEVICES=y
CONFIG_SH_DMAE=y
CONFIG_UIO=y
CONFIG_UIO_PDRV_GENIRQ=y
# CONFIG_DNOTIFY is not set
Expand All @@ -124,7 +130,6 @@ CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/configs/kzm9g_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ CONFIG_MMC_SH_MMCIF=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_RS5C372=y
CONFIG_DMADEVICES=y
CONFIG_SH_DMAE=y
CONFIG_ASYNC_TX_DMA=y
Expand Down
13 changes: 13 additions & 0 deletions trunk/arch/arm/mach-shmobile/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ config ARCH_SH7372
select CPU_V7
select SH_CLK_CPG
select ARCH_WANT_OPTIONAL_GPIOLIB
select ARM_CPU_SUSPEND if PM || CPU_IDLE

config ARCH_SH73A0
bool "SH-Mobile AG5 (R8A73A00)"
Expand Down Expand Up @@ -58,13 +59,15 @@ config MACH_G4EVM
bool "G4EVM board"
depends on ARCH_SH7377
select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR

config MACH_AP4EVB
bool "AP4EVB board"
depends on ARCH_SH7372
select ARCH_REQUIRE_GPIOLIB
select SH_LCD_MIPI_DSI
select SND_SOC_AK4642 if SND_SIMPLE_CARD
select REGULATOR_FIXED_VOLTAGE if REGULATOR

choice
prompt "AP4EVB LCD panel selection"
Expand All @@ -83,45 +86,55 @@ config MACH_AG5EVM
bool "AG5EVM board"
select ARCH_REQUIRE_GPIOLIB
select SH_LCD_MIPI_DSI
select REGULATOR_FIXED_VOLTAGE if REGULATOR
depends on ARCH_SH73A0

config MACH_MACKEREL
bool "mackerel board"
depends on ARCH_SH7372
select ARCH_REQUIRE_GPIOLIB
select SND_SOC_AK4642 if SND_SIMPLE_CARD
select REGULATOR_FIXED_VOLTAGE if REGULATOR

config MACH_KOTA2
bool "KOTA2 board"
select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR
depends on ARCH_SH73A0

config MACH_BONITO
bool "bonito board"
select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR
depends on ARCH_R8A7740

config MACH_ARMADILLO800EVA
bool "Armadillo-800 EVA board"
depends on ARCH_R8A7740
select ARCH_REQUIRE_GPIOLIB
select USE_OF
select REGULATOR_FIXED_VOLTAGE if REGULATOR
select SND_SOC_WM8978 if SND_SIMPLE_CARD

config MACH_MARZEN
bool "MARZEN board"
depends on ARCH_R8A7779
select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR

config MACH_KZM9D
bool "KZM9D board"
depends on ARCH_EMEV2
select USE_OF
select REGULATOR_FIXED_VOLTAGE if REGULATOR

config MACH_KZM9G
bool "KZM-A9-GT board"
depends on ARCH_SH73A0
select ARCH_REQUIRE_GPIOLIB
select USE_OF
select SND_SOC_AK4642 if SND_SIMPLE_CARD
select REGULATOR_FIXED_VOLTAGE if REGULATOR

comment "SH-Mobile System Configuration"

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-shmobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ obj-$(CONFIG_ARCH_R8A7740) += entry-intc.o
# PM objects
obj-$(CONFIG_SUSPEND) += suspend.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
obj-$(CONFIG_ARCH_SHMOBILE) += pm-rmobile.o
obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o
obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o
obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o

# Board objects
Expand Down
82 changes: 79 additions & 3 deletions trunk/arch/arm/mach-shmobile/board-ag5evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/dma-mapping.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/serial_sci.h>
#include <linux/smsc911x.h>
#include <linux/gpio.h>
Expand All @@ -52,6 +54,12 @@
#include <asm/hardware/cache-l2x0.h>
#include <asm/traps.h>

/* Dummy supplies, where voltage doesn't matter */
static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vddvario", "smsc911x"),
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
};

static struct resource smsc9220_resources[] = {
[0] = {
.start = 0x14000000,
Expand Down Expand Up @@ -142,6 +150,13 @@ static struct platform_device fsi_device = {
.resource = fsi_resources,
};

/* Fixed 1.8V regulator to be used by MMCIF */
static struct regulator_consumer_supply fixed1v8_power_consumers[] =
{
REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
};

static struct resource sh_mmcif_resources[] = {
[0] = {
.name = "MMCIF",
Expand Down Expand Up @@ -364,6 +379,13 @@ static struct platform_device mipidsi0_device = {
},
};

/* Fixed 2.8V regulators to be used by SDHI0 */
static struct regulator_consumer_supply fixed2v8_power_consumers[] =
{
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
};

/* SDHI0 */
static struct sh_mobile_sdhi_info sdhi0_info = {
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
Expand Down Expand Up @@ -408,8 +430,57 @@ static struct platform_device sdhi0_device = {
},
};

void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state)
/* Fixed 3.3V regulator to be used by SDHI1 */
static struct regulator_consumer_supply cn4_power_consumers[] =
{
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
};

static struct regulator_init_data cn4_power_init_data = {
.constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(cn4_power_consumers),
.consumer_supplies = cn4_power_consumers,
};

static struct fixed_voltage_config cn4_power_info = {
.supply_name = "CN4 SD/MMC Vdd",
.microvolts = 3300000,
.gpio = GPIO_PORT114,
.enable_high = 1,
.init_data = &cn4_power_init_data,
};

static struct platform_device cn4_power = {
.name = "reg-fixed-voltage",
.id = 2,
.dev = {
.platform_data = &cn4_power_info,
},
};

static void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state)
{
static int power_gpio = -EINVAL;

if (power_gpio < 0) {
int ret = gpio_request(GPIO_PORT114, "sdhi1_power");
if (!ret) {
power_gpio = GPIO_PORT114;
gpio_direction_output(power_gpio, 0);
}
}

/*
* If requesting the GPIO above failed, it means, that the regulator got
* probed and grabbed the GPIO, but we don't know, whether the sdhi
* driver already uses the regulator. If it doesn't, we have to toggle
* the GPIO ourselves, even though it is now owned by the fixed
* regulator driver. We have to live with the race in case the driver
* gets unloaded and the GPIO freed between these two steps.
*/
gpio_set_value(GPIO_PORT114, state);
}

Expand Down Expand Up @@ -455,6 +526,7 @@ static struct platform_device sdhi1_device = {
};

static struct platform_device *ag5evm_devices[] __initdata = {
&cn4_power,
&eth_device,
&keysc_device,
&fsi_device,
Expand All @@ -468,6 +540,12 @@ static struct platform_device *ag5evm_devices[] __initdata = {

static void __init ag5evm_init(void)
{
regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers,
ARRAY_SIZE(fixed1v8_power_consumers), 1800000);
regulator_register_always_on(1, "fixed-2.8V", fixed2v8_power_consumers,
ARRAY_SIZE(fixed2v8_power_consumers), 3300000);
regulator_register_fixed(3, dummy_supplies, ARRAY_SIZE(dummy_supplies));

sh73a0_pinmux_init();

/* enable SCIFA2 */
Expand Down Expand Up @@ -562,8 +640,6 @@ static void __init ag5evm_init(void)
gpio_request(GPIO_FN_SDHID1_2_PU, NULL);
gpio_request(GPIO_FN_SDHID1_1_PU, NULL);
gpio_request(GPIO_FN_SDHID1_0_PU, NULL);
gpio_request(GPIO_PORT114, "sdhi1_power");
gpio_direction_output(GPIO_PORT114, 0);

#ifdef CONFIG_CACHE_L2X0
/* Shared attribute override enable, 64K*8way */
Expand Down
Loading

0 comments on commit da64f34

Please sign in to comment.