Commit f50f118c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'boards2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc board updates from Olof Johansson:
 "This branch contains board updates, mostly for shmobile, but also a
  couple for PXA.

  The shmobile platforms are still in the early stages of DT enablement,
  so there's a bit more updates here than we'd ideally want to see:
   - regulator updates to provide some fixed regulators on several
     boards
   - gpio support updates for multiple boards
   - misc updates for recently-introduced boards armadillo800eva and
     kzm9g
   - defconfig updates"

* tag 'boards2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits)
  ARM: shmobile: kzm9g: defconfig enable INOTIFY_USER
  ARM: mach-shmobile: armadillo800eva: defconfig Allow use of armhf userspace
  ARM: shmobile: armadillo800eva: A3SP domain includes USB
  ARM: shmobile: armadillo800eva: A4LC domain includes LCDC
  ARM: shmobile: armadillo800eva: USB Func enables external IRQ mode
  ARM: mach-shmobile: kzm9d: Add defconfig
  ARM: mach-shmobile: select the fixed regulator driver on several boards
  ARM: mach-shmobile: add SDHI2 to the 2.8V fixed regulator consumers on kzm9g
  ARM: pxa: hx4700: Use DEFINE_RES_* macros consistently
  ARM: pxa: remove eseries.h
  ARM: mach-shmobile: add fixed voltage regulators to marzen
  ARM: mach-shmobile: add fixed voltage regulators to kzm9g
  ARM: mach-shmobile: add fixed voltage regulators to kzm9d
  ARM: mach-shmobile: add fixed voltage regulators to kota2
  ARM: mach-shmobile: add fixed voltage regulators to g4evm
  ARM: mach-shmobile: add fixed voltage regulators to bonito
  ARM: mach-shmobile: add fixed voltage regulators to armadillo800eva
  ARM: mach-shmobile: add fixed voltage regulators to ap4evb
  ARM: mach-shmobile: add fixed voltage regulators to ag5evm
  ARM: mach-shmobile: add 3.3V and 1.8V fixed regulators to mackerel
  ...
parents b7574a22 43cb4a02
...@@ -5,10 +5,7 @@ CONFIG_IKCONFIG_PROC=y ...@@ -5,10 +5,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16 CONFIG_LOG_BUF_SHIFT=16
# CONFIG_UTS_NS is not set # CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set # CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_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_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SLAB=y CONFIG_SLAB=y
CONFIG_MODULES=y CONFIG_MODULES=y
...@@ -21,7 +18,7 @@ CONFIG_ARCH_SHMOBILE=y ...@@ -21,7 +18,7 @@ CONFIG_ARCH_SHMOBILE=y
CONFIG_ARCH_R8A7740=y CONFIG_ARCH_R8A7740=y
CONFIG_MACH_ARMADILLO800EVA=y CONFIG_MACH_ARMADILLO800EVA=y
# CONFIG_SH_TIMER_TMU is not set # CONFIG_SH_TIMER_TMU is not set
# CONFIG_ARM_THUMB is not set CONFIG_ARM_THUMB=y
CONFIG_CPU_BPREDICT_DISABLE=y CONFIG_CPU_BPREDICT_DISABLE=y
# CONFIG_CACHE_L2X0 is not set # CONFIG_CACHE_L2X0 is not set
CONFIG_ARM_ERRATA_430973=y CONFIG_ARM_ERRATA_430973=y
...@@ -39,6 +36,7 @@ CONFIG_ZBOOT_ROM_BSS=0x0 ...@@ -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="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_CMDLINE_FORCE=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_VFP=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
# CONFIG_SUSPEND is not set # CONFIG_SUSPEND is not set
CONFIG_NET=y CONFIG_NET=y
...@@ -89,26 +87,32 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y ...@@ -89,26 +87,32 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
CONFIG_I2C=y CONFIG_I2C=y
CONFIG_I2C_SH_MOBILE=y CONFIG_I2C_SH_MOBILE=y
# CONFIG_HWMON is not set # 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=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_SH_MOBILE_LCDC=y CONFIG_FB_SH_MOBILE_LCDC=y
CONFIG_FB_SH_MOBILE_HDMI=y
CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_CLASS_DEVICE=y
CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_LOGO=y CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set # CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 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_SUPPORT_OLD_API is not set
# CONFIG_SND_VERBOSE_PROCFS is not set # CONFIG_SND_VERBOSE_PROCFS is not set
# CONFIG_SND_DRIVERS is not set # CONFIG_SND_DRIVERS is not set
# CONFIG_SND_ARM is not set # CONFIG_SND_ARM is not set
CONFIG_SND_SOC=y
CONFIG_SND_SOC_SH4_FSI=y CONFIG_SND_SOC_SH4_FSI=y
# CONFIG_HID_SUPPORT is not set # CONFIG_HID_SUPPORT is not set
CONFIG_USB=y CONFIG_USB=y
# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_RENESAS_USBHS=y CONFIG_USB_RENESAS_USBHS=y
CONFIG_USB_GADGET=y CONFIG_USB_GADGET=y
CONFIG_USB_RENESAS_USBHS_UDC=y CONFIG_USB_RENESAS_USBHS_UDC=y
...@@ -116,6 +120,8 @@ CONFIG_USB_ETH=m ...@@ -116,6 +120,8 @@ CONFIG_USB_ETH=m
CONFIG_MMC=y CONFIG_MMC=y
CONFIG_MMC_SDHI=y CONFIG_MMC_SDHI=y
CONFIG_MMC_SH_MMCIF=y CONFIG_MMC_SH_MMCIF=y
CONFIG_DMADEVICES=y
CONFIG_SH_DMAE=y
CONFIG_UIO=y CONFIG_UIO=y
CONFIG_UIO_PDRV_GENIRQ=y CONFIG_UIO_PDRV_GENIRQ=y
# CONFIG_DNOTIFY is not set # CONFIG_DNOTIFY is not set
...@@ -124,7 +130,6 @@ CONFIG_VFAT_FS=y ...@@ -124,7 +130,6 @@ CONFIG_VFAT_FS=y
CONFIG_TMPFS=y CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set # CONFIG_MISC_FILESYSTEMS is not set
CONFIG_NFS_FS=y CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y CONFIG_NFS_V4_1=y
......
# CONFIG_ARM_PATCH_PHYS_VIRT is not set
CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_SHMOBILE=y
CONFIG_ARCH_EMEV2=y
CONFIG_MACH_KZM9D=y
CONFIG_MEMORY_START=0x40000000
CONFIG_MEMORY_SIZE=0x10000000
# CONFIG_SH_TIMER_TMU is not set
# CONFIG_SWP_EMULATE is not set
# CONFIG_CACHE_L2X0 is not set
CONFIG_SMP=y
CONFIG_NR_CPUS=2
CONFIG_HOTPLUG_CPU=y
# CONFIG_LOCAL_TIMERS is not set
CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_FORCE_MAX_ZONEORDER=13
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_ARM_APPENDED_DTB=y
CONFIG_CMDLINE="console=tty0 console=ttyS1,115200n81 earlyprintk=serial8250-em.1,115200n81 mem=128M@0x40000000 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"
CONFIG_CMDLINE_FORCE=y
CONFIG_VFP=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
# CONFIG_SUSPEND is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
# CONFIG_WIRELESS is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
# CONFIG_BLK_DEV is not set
CONFIG_NETDEVICES=y
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_CHELSIO is not set
# CONFIG_NET_VENDOR_CIRRUS is not set
# CONFIG_NET_VENDOR_FARADAY is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_SEEQ is not set
CONFIG_SMSC911X=y
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_WIZNET is not set
# CONFIG_WLAN is not set
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_DEVKMEM is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_EM=y
# CONFIG_HW_RANDOM is not set
CONFIG_GPIOLIB=y
CONFIG_GPIO_EM=y
# CONFIG_HWMON is not set
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
# CONFIG_IOMMU_SUPPORT is not set
# CONFIG_DNOTIFY is not set
CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
# CONFIG_FTRACE is not set
...@@ -100,7 +100,12 @@ CONFIG_SND_SOC_SH4_FSI=y ...@@ -100,7 +100,12 @@ CONFIG_SND_SOC_SH4_FSI=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_DEVICEFS=y CONFIG_USB_DEVICEFS=y
CONFIG_USB_R8A66597_HCD=y CONFIG_USB_R8A66597_HCD=y
CONFIG_USB_RENESAS_USBHS=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_USB_RENESAS_USBHS_UDC=y
CONFIG_USB_ETH=m
CONFIG_USB_MASS_STORAGE=m
CONFIG_MMC=y CONFIG_MMC=y
# CONFIG_MMC_BLOCK_BOUNCE is not set # CONFIG_MMC_BLOCK_BOUNCE is not set
CONFIG_MMC_SDHI=y CONFIG_MMC_SDHI=y
...@@ -108,12 +113,13 @@ CONFIG_MMC_SH_MMCIF=y ...@@ -108,12 +113,13 @@ CONFIG_MMC_SH_MMCIF=y
CONFIG_NEW_LEDS=y CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y CONFIG_LEDS_CLASS=y
CONFIG_RTC_CLASS=y CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_RS5C372=y
CONFIG_DMADEVICES=y CONFIG_DMADEVICES=y
CONFIG_SH_DMAE=y CONFIG_SH_DMAE=y
CONFIG_ASYNC_TX_DMA=y CONFIG_ASYNC_TX_DMA=y
CONFIG_STAGING=y CONFIG_STAGING=y
# CONFIG_DNOTIFY is not set # CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY_USER is not set CONFIG_INOTIFY_USER=y
CONFIG_VFAT_FS=y CONFIG_VFAT_FS=y
CONFIG_TMPFS=y CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set # CONFIG_MISC_FILESYSTEMS is not set
......
void __init eseries_fixup(struct tag *tags, char **cmdline, struct meminfo *mi);
extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info;
extern struct pxaficp_platform_data e7xx_ficp_platform_data;
extern int e7xx_irda_init(void);
extern int eseries_tmio_enable(struct platform_device *dev);
extern int eseries_tmio_disable(struct platform_device *dev);
extern int eseries_tmio_suspend(struct platform_device *dev);
extern int eseries_tmio_resume(struct platform_device *dev);
extern void eseries_get_tmio_gpios(void);
extern struct resource eseries_tmio_resources[];
extern struct platform_device e300_tc6387xb_device;
...@@ -296,27 +296,11 @@ static struct asic3_led asic3_leds[ASIC3_NUM_LEDS] = { ...@@ -296,27 +296,11 @@ static struct asic3_led asic3_leds[ASIC3_NUM_LEDS] = {
static struct resource asic3_resources[] = { static struct resource asic3_resources[] = {
/* GPIO part */ /* GPIO part */
[0] = { [0] = DEFINE_RES_MEM(ASIC3_PHYS, ASIC3_MAP_SIZE_16BIT),
.start = ASIC3_PHYS, [1] = DEFINE_RES_IRQ(PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ)),
.end = ASIC3_PHYS + ASIC3_MAP_SIZE_16BIT - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ),
.end = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ),
.flags = IORESOURCE_IRQ,
},
/* SD part */ /* SD part */
[2] = { [2] = DEFINE_RES_MEM(ASIC3_SD_PHYS, ASIC3_MAP_SIZE_16BIT),
.start = ASIC3_SD_PHYS, [3] = DEFINE_RES_IRQ(PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ)),
.end = ASIC3_SD_PHYS + ASIC3_MAP_SIZE_16BIT - 1,
.flags = IORESOURCE_MEM,
},
[3] = {
.start = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ),
.end = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ),
.flags = IORESOURCE_IRQ,
},
}; };
static struct asic3_platform_data asic3_platform_data = { static struct asic3_platform_data asic3_platform_data = {
...@@ -343,11 +327,7 @@ static struct platform_device asic3 = { ...@@ -343,11 +327,7 @@ static struct platform_device asic3 = {
*/ */
static struct resource egpio_resources[] = { static struct resource egpio_resources[] = {
[0] = { [0] = DEFINE_RES_MEM(PXA_CS5_PHYS, 0x4),
.start = PXA_CS5_PHYS,
.end = PXA_CS5_PHYS + 0x4 - 1,
.flags = IORESOURCE_MEM,
},
}; };
static struct htc_egpio_chip egpio_chips[] = { static struct htc_egpio_chip egpio_chips[] = {
...@@ -537,11 +517,7 @@ static struct w100fb_mach_info w3220_info = { ...@@ -537,11 +517,7 @@ static struct w100fb_mach_info w3220_info = {
}; };
static struct resource w3220_resources[] = { static struct resource w3220_resources[] = {
[0] = { [0] = DEFINE_RES_MEM(ATI_W3220_PHYS, SZ_16M),
.start = ATI_W3220_PHYS,
.end = ATI_W3220_PHYS + 0x00ffffff,
.flags = IORESOURCE_MEM,
},
}; };
static struct platform_device w3220 = { static struct platform_device w3220 = {
...@@ -683,20 +659,12 @@ static struct pda_power_pdata power_supply_info = { ...@@ -683,20 +659,12 @@ static struct pda_power_pdata power_supply_info = {
}; };
static struct resource power_supply_resources[] = { static struct resource power_supply_resources[] = {
[0] = { [0] = DEFINE_RES_NAMED(PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), 1, "ac",
.name = "ac", IORESOURCE_IRQ |
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE),
IORESOURCE_IRQ_LOWEDGE, [1] = DEFINE_RES_NAMED(PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT), 1, "usb",
.start = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), IORESOURCE_IRQ |
.end = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE),
},
[1] = {
.name = "usb",
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
IORESOURCE_IRQ_LOWEDGE,
.start = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT),
.end = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT),
},
}; };
static struct platform_device power_supply = { static struct platform_device power_supply = {
......
...@@ -59,6 +59,7 @@ config MACH_G4EVM ...@@ -59,6 +59,7 @@ config MACH_G4EVM
bool "G4EVM board" bool "G4EVM board"
depends on ARCH_SH7377 depends on ARCH_SH7377
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR
config MACH_AP4EVB config MACH_AP4EVB
bool "AP4EVB board" bool "AP4EVB board"
...@@ -66,6 +67,7 @@ config MACH_AP4EVB ...@@ -66,6 +67,7 @@ config MACH_AP4EVB
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select SH_LCD_MIPI_DSI select SH_LCD_MIPI_DSI
select SND_SOC_AK4642 if SND_SIMPLE_CARD select SND_SOC_AK4642 if SND_SIMPLE_CARD
select REGULATOR_FIXED_VOLTAGE if REGULATOR
choice choice
prompt "AP4EVB LCD panel selection" prompt "AP4EVB LCD panel selection"
...@@ -84,6 +86,7 @@ config MACH_AG5EVM ...@@ -84,6 +86,7 @@ config MACH_AG5EVM
bool "AG5EVM board" bool "AG5EVM board"
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select SH_LCD_MIPI_DSI select SH_LCD_MIPI_DSI
select REGULATOR_FIXED_VOLTAGE if REGULATOR
depends on ARCH_SH73A0 depends on ARCH_SH73A0
config MACH_MACKEREL config MACH_MACKEREL
...@@ -91,15 +94,18 @@ config MACH_MACKEREL ...@@ -91,15 +94,18 @@ config MACH_MACKEREL
depends on ARCH_SH7372 depends on ARCH_SH7372
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select SND_SOC_AK4642 if SND_SIMPLE_CARD select SND_SOC_AK4642 if SND_SIMPLE_CARD
select REGULATOR_FIXED_VOLTAGE if REGULATOR
config MACH_KOTA2 config MACH_KOTA2
bool "KOTA2 board" bool "KOTA2 board"
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR
depends on ARCH_SH73A0 depends on ARCH_SH73A0
config MACH_BONITO config MACH_BONITO
bool "bonito board" bool "bonito board"
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR
depends on ARCH_R8A7740 depends on ARCH_R8A7740
config MACH_ARMADILLO800EVA config MACH_ARMADILLO800EVA
...@@ -107,22 +113,28 @@ config MACH_ARMADILLO800EVA ...@@ -107,22 +113,28 @@ config MACH_ARMADILLO800EVA
depends on ARCH_R8A7740 depends on ARCH_R8A7740
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select USE_OF select USE_OF
select REGULATOR_FIXED_VOLTAGE if REGULATOR
select SND_SOC_WM8978 if SND_SIMPLE_CARD
config MACH_MARZEN config MACH_MARZEN
bool "MARZEN board" bool "MARZEN board"
depends on ARCH_R8A7779 depends on ARCH_R8A7779
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR
config MACH_KZM9D config MACH_KZM9D
bool "KZM9D board" bool "KZM9D board"
depends on ARCH_EMEV2 depends on ARCH_EMEV2
select USE_OF select USE_OF
select REGULATOR_FIXED_VOLTAGE if REGULATOR
config MACH_KZM9G config MACH_KZM9G
bool "KZM-A9-GT board" bool "KZM-A9-GT board"
depends on ARCH_SH73A0 depends on ARCH_SH73A0
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select USE_OF select USE_OF
select SND_SOC_AK4642 if SND_SIMPLE_CARD
select REGULATOR_FIXED_VOLTAGE if REGULATOR
comment "SH-Mobile System Configuration" comment "SH-Mobile System Configuration"
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/serial_sci.h> #include <linux/serial_sci.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/gpio.h> #include <linux/gpio.h>
...@@ -52,6 +54,12 @@ ...@@ -52,6 +54,12 @@
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include <asm/traps.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[] = { static struct resource smsc9220_resources[] = {
[0] = { [0] = {
.start = 0x14000000, .start = 0x14000000,
...@@ -142,6 +150,13 @@ static struct platform_device fsi_device = { ...@@ -142,6 +150,13 @@ static struct platform_device fsi_device = {
.resource = fsi_resources, .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[] = { static struct resource sh_mmcif_resources[] = {
[0] = { [0] = {
.name = "MMCIF", .name = "MMCIF",
...@@ -364,6 +379,13 @@ static struct platform_device mipidsi0_device = { ...@@ -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 */ /* SDHI0 */
static struct sh_mobile_sdhi_info sdhi0_info = { static struct sh_mobile_sdhi_info sdhi0_info = {
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
...@@ -408,8 +430,57 @@ static struct platform_device sdhi0_device = { ...@@ -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); gpio_set_value(GPIO_PORT114, state);
} }
...@@ -455,6 +526,7 @@ static struct platform_device sdhi1_device = { ...@@ -455,6 +526,7 @@ static struct platform_device sdhi1_device = {
}; };
static struct platform_device *ag5evm_devices[] __initdata = { static struct platform_device *ag5evm_devices[] __initdata = {
&cn4_power,
&eth_device, &eth_device,
&keysc_device, &keysc_device,
&fsi_device, &fsi_device,
...@@ -468,6 +540,12 @@ static struct platform_device *ag5evm_devices[] __initdata = { ...@@ -468,6 +540,12 @@ static struct platform_device *ag5evm_devices[] __initdata = {
static void __init ag5evm_init(void) 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(); sh73a0_pinmux_init();
/* enable SCIFA2 */ /* enable SCIFA2 */
...@@ -562,8 +640,6 @@ static void __init ag5evm_init(void) ...@@ -562,8 +640,6 @@ static void __init ag5evm_init(void)
gpio_request(GPIO_FN_SDHID1_2_PU, NULL); gpio_request(GPIO_FN_SDHID1_2_PU, NULL);
gpio_request(GPIO_FN_SDHID1_1_PU, NULL); gpio_request(GPIO_FN_SDHID1_1_PU, NULL);
gpio_request(GPIO_FN_SDHID1_0_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 #ifdef CONFIG_CACHE_L2X0
/* Shared attribute override enable, 64K*8way */ /* Shared attribute override enable, 64K*8way */
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c/tsc2007.h> #include <linux/i2c/tsc2007.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/sh_intc.h> #include <linux/sh_intc.h>
#include <linux/sh_clk.h> #include <linux/sh_clk.h>
...@@ -159,6 +161,27 @@ ...@@ -159,6 +161,27 @@
* CN12: 3.3v * CN12: 3.3v
*/ */
/* Dummy supplies, where voltage doesn't matter */
static struct regulator_consumer_supply fixed1v8_power_consumers[] =
{
/* J22 default position: 1.8V */
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
};
static struct regulator_consumer_supply fixed3v3_power_consumers[] =
{
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
};
static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vddvario", "smsc911x"),
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
};
/* MTD */ /* MTD */
static struct mtd_partition nor_flash_partitions[] = { static struct mtd_partition nor_flash_partitions[] = {
{ {
...@@ -1138,21 +1161,6 @@ static void __init fsi_init_pm_clock(void) ...@@ -1138,21 +1161,6 @@ static void __init fsi_init_pm_clock(void)
clk_put(fsia_ick); clk_put(fsia_ick);
} }
/*
* FIXME !!
*
* gpio_no_direction
* are quick_hack.
*
* current gpio frame work doesn't have
* the method to control only pull up/down/free.
* this function should be replaced by correct gpio function
*/
static void __init gpio_no_direction(u32 addr)
{
__raw_writeb(0x00, addr);
}
/* TouchScreen */ /* TouchScreen */
#ifdef CONFIG_AP4EVB_QHD #ifdef CONFIG_AP4EVB_QHD
# define GPIO_TSC_IRQ GPIO_FN_IRQ28_123 # define GPIO_TSC_IRQ GPIO_FN_IRQ28_123
...@@ -1224,6 +1232,12 @@ static void __init ap4evb_init(void) ...@@ -1224,6 +1232,12 @@ static void __init ap4evb_init(void)
u32 srcr4; u32 srcr4;
struct clk *clk; struct clk *clk;
regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers,
ARRAY_SIZE(fixed1v8_power_consumers), 1800000);
regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers,
ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
/* External clock source */ /* External clock source */
clk_set_rate(&sh7372_dv_clki_clk, 27000000); clk_set_rate(&sh7372_dv_clki_clk, 27000000);
...@@ -1302,8 +1316,8 @@ static void __init ap4evb_init(void) ...@@ -1302,8 +1316,8 @@ static void __init ap4evb_init(void)
gpio_request(GPIO_PORT9, NULL); gpio_request(GPIO_PORT9, NULL);
gpio_request(GPIO_PORT10, NULL); gpio_request(GPIO_PORT10, NULL);
gpio_no_direction(GPIO_PORT9CR); /* FSIAOBT needs no direction */ gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */
gpio_no_direction(GPIO_PORT10CR); /* FSIAOLR needs no direction */ gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */
/* card detect pin for MMC slot (CN7) */ /* card detect pin for MMC slot (CN7) */
gpio_request(GPIO_PORT41, NULL); gpio_request(GPIO_PORT41, NULL);
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <mach/common.h> #include <mach/common.h>
...@@ -75,6 +77,12 @@ ...@@ -75,6 +77,12 @@
* S38.2 = OFF * S38.2 = OFF
*/ */
/* Dummy supplies, where voltage doesn't matter */
static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vddvario", "smsc911x"),
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
};
/* /*
* FPGA * FPGA
*/ */
...@@ -360,6 +368,8 @@ static void __init bonito_init(void) ...@@ -360,6 +368,8 @@ static void __init bonito_init(void)
{ {
u16 val; u16 val;
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
r8a7740_pinmux_init(); r8a7740_pinmux_init();
bonito_fpga_init(); bonito_fpga_init();
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/usb/r8a66597.h> #include <linux/usb/r8a66597.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/input.h> #include <linux/input.h>
...@@ -196,6 +198,15 @@ static struct platform_device keysc_device = { ...@@ -196,6 +198,15 @@ static struct platform_device keysc_device = {
}, },
}; };
/* Fixed 3.3V regulator to be used by SDHI0 and SDHI1 */
static struct regulator_consumer_supply fixed3v3_power_consumers[] =
{
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
};
/* SDHI */ /* SDHI */
static struct sh_mobile_sdhi_info sdhi0_info = { static struct sh_mobile_sdhi_info sdhi0_info = {
.tmio_caps = MMC_CAP_SDIO_IRQ, .tmio_caps = MMC_CAP_SDIO_IRQ,
...@@ -271,26 +282,11 @@ static struct platform_device *g4evm_devices[] __initdata = { ...@@ -271,26 +282,11 @@ static struct platform_device *g4evm_devices[] __initdata = {
#define GPIO_SDHID1_D3 0xe6052106 #define GPIO_SDHID1_D3 0xe6052106
#define GPIO_SDHICMD1 0xe6052107 #define GPIO_SDHICMD1 0xe6052107
/*
* FIXME !!
*
* gpio_pull_up is quick_hack.
*
* current gpio frame work doesn't have
* the method to control only pull up/down/free.
* this function should be replaced by correct gpio function
*/
static void __init gpio_pull_up(u32 addr)
{
u8 data = __raw_readb(addr);
data &= 0x0F;
data |= 0xC0;
__raw_writeb(data, addr);
}
static void __init g4evm_init(void) static void __init g4evm_init(void)
{ {
regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
sh7377_pinmux_init(); sh7377_pinmux_init();
/* Lit DS14 LED */ /* Lit DS14 LED */
...@@ -351,11 +347,11 @@ static void __init g4evm_init(void) ...@@ -351,11 +347,11 @@ static void __init g4evm_init(void)
gpio_request(GPIO_FN_SDHID0_3, NULL); gpio_request(GPIO_FN_SDHID0_3, NULL);
gpio_request(GPIO_FN_SDHICMD0, NULL); gpio_request(GPIO_FN_SDHICMD0, NULL);
gpio_request(GPIO_FN_SDHIWP0, NULL); gpio_request(GPIO_FN_SDHIWP0, NULL);
gpio_pull_up(GPIO_SDHID0_D0); gpio_request_pullup(GPIO_SDHID0_D0);
gpio_pull_up(GPIO_SDHID0_D1); gpio_request_pullup(GPIO_SDHID0_D1);
gpio_pull_up(GPIO_SDHID0_D2); gpio_request_pullup(GPIO_SDHID0_D2);
gpio_pull_up(GPIO_SDHID0_D3); gpio_request_pullup(GPIO_SDHID0_D3);
gpio_pull_up(GPIO_SDHICMD0); gpio_request_pullup(GPIO_SDHICMD0);
/* SDHI1 */ /* SDHI1 */
gpio_request(GPIO_FN_SDHICLK1, NULL); gpio_request(GPIO_FN_SDHICLK1, NULL);
...@@ -364,11 +360,11 @@ static void __init g4evm_init(void) ...@@ -364,11 +360,11 @@ static void __init g4evm_init(void)
gpio_request(GPIO_FN_SDHID1_2, NULL); gpio_request(GPIO_FN_SDHID1_2, NULL);
gpio_request(GPIO_FN_SDHID1_3, NULL); gpio_request(GPIO_FN_SDHID1_3, NULL);
gpio_request(GPIO_FN_SDHICMD1, NULL); gpio_request(GPIO_FN_SDHICMD1, NULL);
gpio_pull_up(GPIO_SDHID1_D0); gpio_request_pullup(GPIO_SDHID1_D0);
gpio_pull_up(GPIO_SDHID1_D1); gpio_request_pullup(GPIO_SDHID1_D1);
gpio_pull_up(GPIO_SDHID1_D2); gpio_request_pullup(GPIO_SDHID1_D2);
gpio_pull_up(GPIO_SDHID1_D3); gpio_request_pullup(GPIO_SDHID1_D3);
gpio_pull_up(GPIO_SDHICMD1); gpio_request_pullup(GPIO_SDHICMD1);
sh7377_add_standard_devices(); sh7377_add_standard_devices();
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/input.h> #include <linux/input.h>
...@@ -49,6 +51,12 @@ ...@@ -49,6 +51,12 @@
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include <asm/traps.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"),
};
/* SMSC 9220 */ /* SMSC 9220 */
static struct resource smsc9220_resources[] = { static struct resource smsc9220_resources[] = {
[0] = { [0] = {
...@@ -288,6 +296,13 @@ static struct platform_device leds_tpu30_device = { ...@@ -288,6 +296,13 @@ static struct platform_device leds_tpu30_device = {
.resource = tpu30_resources, .resource = tpu30_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"),
};
/* MMCIF */ /* MMCIF */
static struct resource mmcif_resources[] = { static struct resource mmcif_resources[] = {
[0] = { [0] = {
...@@ -321,6 +336,15 @@ static struct platform_device mmcif_device = { ...@@ -321,6 +336,15 @@ static struct platform_device mmcif_device = {
.resource = mmcif_resources, .resource = mmcif_resources,
}; };
/* Fixed 3.3V regulator to be used by SDHI0 and SDHI1 */
static struct regulator_consumer_supply fixed3v3_power_consumers[] =
{
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
};
/* SDHI0 */ /* SDHI0 */
static struct sh_mobile_sdhi_info sdhi0_info = { static struct sh_mobile_sdhi_info sdhi0_info = {
.tmio_caps = MMC_CAP_SD_HIGHSPEED, .tmio_caps = MMC_CAP_SD_HIGHSPEED,
...@@ -411,6 +435,12 @@ static struct platform_device *kota2_devices[] __initdata = { ...@@ -411,6 +435,12 @@ static struct platform_device *kota2_devices[] __initdata = {
static void __init kota2_init(void) static void __init kota2_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-3.3V", fixed3v3_power_consumers,
ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
sh73a0_pinmux_init(); sh73a0_pinmux_init();
/* SCIFA2 (UART2) */ /* SCIFA2 (UART2) */
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/emev2.h> #include <mach/emev2.h>
...@@ -28,6 +30,12 @@ ...@@ -28,6 +30,12 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
/* Dummy supplies, where voltage doesn't matter */
static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vddvario", "smsc911x"),
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
};
/* Ether */ /* Ether */
static struct resource smsc911x_resources[] = { static struct resource smsc911x_resources[] = {
[0] = { [0] = {
...@@ -63,6 +71,8 @@ static struct platform_device *kzm9d_devices[] __initdata = { ...@@ -63,6 +71,8 @@ static struct platform_device *kzm9d_devices[] __initdata = {
void __init kzm9d_add_standard_devices(void) void __init kzm9d_add_standard_devices(void)
{ {
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
emev2_add_standard_devices(); emev2_add_standard_devices();
platform_add_devices(kzm9d_devices, ARRAY_SIZE(kzm9d_devices)); platform_add_devices(kzm9d_devices, ARRAY_SIZE(kzm9d_devices));
......
This diff is collapsed.
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/mtd/sh_flctl.h> #include <linux/mtd/sh_flctl.h>
#include <linux/pm_clock.h> #include <linux/pm_clock.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/sh_intc.h> #include <linux/sh_intc.h>
#include <linux/tca6416_keypad.h> #include <linux/tca6416_keypad.h>
...@@ -203,31 +205,32 @@ ...@@ -203,31 +205,32 @@
* amixer set "HPOUTR Mixer DACH" on * amixer set "HPOUTR Mixer DACH" on
*/ */
/* /* Fixed 3.3V and 1.8V regulators to be used by multiple devices */
* FIXME !! static struct regulator_consumer_supply fixed1v8_power_consumers[] =
*
* gpio_no_direction
* gpio_pull_down
* are quick_hack.
*
* current gpio frame work doesn't have
* the method to control only pull up/down/free.
* this function should be replaced by correct gpio function
*/
static void __init gpio_no_direction(u32 addr)
{ {
__raw_writeb(0x00, addr); /*
} * J22 on mackerel switches mmcif.0 and sdhi.1 between 1.8V and 3.3V
* Since we cannot support both voltages, we support the default 1.8V
*/
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
};
static void __init gpio_pull_down(u32 addr) static struct regulator_consumer_supply fixed3v3_power_consumers[] =
{ {
u8 data = __raw_readb(addr); REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
data &= 0x0F; REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.2"),
data |= 0xA0; REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.2"),
};
__raw_writeb(data, addr); /* Dummy supplies, where voltage doesn't matter */
} static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vddvario", "smsc911x"),
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
};
/* MTD */ /* MTD */
static struct mtd_partition nor_flash_partitions[] = { static struct mtd_partition nor_flash_partitions[] = {
...@@ -1409,6 +1412,12 @@ static void __init mackerel_init(void) ...@@ -1409,6 +1412,12 @@ static void __init mackerel_init(void)
u32 srcr4; u32 srcr4;
struct clk *clk; struct clk *clk;
regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers,
ARRAY_SIZE(fixed1v8_power_consumers), 1800000);
regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers,
ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
/* External clock source */ /* External clock source */
clk_set_rate(&sh7372_dv_clki_clk, 27000000); clk_set_rate(&sh7372_dv_clki_clk, 27000000);
...@@ -1458,11 +1467,11 @@ static void __init mackerel_init(void) ...@@ -1458,11 +1467,11 @@ static void __init mackerel_init(void)
/* USBHS0 */ /* USBHS0 */
gpio_request(GPIO_FN_VBUS0_0, NULL); gpio_request(GPIO_FN_VBUS0_0, NULL);
gpio_pull_down(GPIO_PORT168CR); /* VBUS0_0 pull down */ gpio_request_pulldown(GPIO_PORT168CR); /* VBUS0_0 pull down */
/* USBHS1 */ /* USBHS1 */
gpio_request(GPIO_FN_VBUS0_1, NULL); gpio_request(GPIO_FN_VBUS0_1, NULL);
gpio_pull_down(GPIO_PORT167CR); /* VBUS0_1 pull down */ gpio_request_pulldown(GPIO_PORT167CR); /* VBUS0_1 pull down */
gpio_request(GPIO_FN_IDIN_1_113, NULL); gpio_request(GPIO_FN_IDIN_1_113, NULL);
/* enable FSI2 port A (ak4643) */ /* enable FSI2 port A (ak4643) */
...@@ -1475,8 +1484,8 @@ static void __init mackerel_init(void) ...@@ -1475,8 +1484,8 @@ static void __init mackerel_init(void)
gpio_request(GPIO_PORT9, NULL); gpio_request(GPIO_PORT9, NULL);
gpio_request(GPIO_PORT10, NULL); gpio_request(GPIO_PORT10, NULL);
gpio_no_direction(GPIO_PORT9CR); /* FSIAOBT needs no direction */ gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */
gpio_no_direction(GPIO_PORT10CR); /* FSIAOLR needs no direction */ gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */
intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */ intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/r8a7779.h> #include <mach/r8a7779.h>
...@@ -37,6 +39,12 @@ ...@@ -37,6 +39,12 @@
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
#include <asm/traps.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"),
};
/* SMSC LAN89218 */ /* SMSC LAN89218 */
static struct resource smsc911x_resources[] = { static struct resource smsc911x_resources[] = {
[0] = { [0] = {
...@@ -73,6 +81,8 @@ static struct platform_device *marzen_devices[] __initdata = { ...@@ -73,6 +81,8 @@ static struct platform_device *marzen_devices[] __initdata = {
static void __init marzen_init(void) static void __init marzen_init(void)
{ {
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
r8a7779_pinmux_init(); r8a7779_pinmux_init();
/* SCIF2 (CN18: DEBUG0) */ /* SCIF2 (CN18: DEBUG0) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment