Commit 1bfecd93 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull "ARM: board specific updates" from Arnd Bergmann/Olof Johansson:
 "These changes are all specific to one board only.  We're trying to
  keep the number of board files low, but generally board level updates
  are ok on platforms that are working on moving towards DT based
  probing, which will eventually lead to removing them.

  The board-ams-delta.c board file gets a conflict between the removal
  of ams_delta_config and the addition of a lot of other data.  The
  Kconfig file has two changes in the same line, and in exynos, the
  power domain cleanup conflicts with the addition of the image sensor
  device.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
  [olof: Amended a fix for a mismerge to board-omap4panda.c]
  Signed-off-by: Olof Johansson <olof@lixom.net>"

Fixed up some fairly trivial conflicts manually.

* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (82 commits)
  i.MX35-PDK: Add Camera support
  ARM : mx35: 3ds-board: add framebuffer device
  pxa/hx4700: Remove pcmcia platform_device structure
  ARM: pxa/hx4700: Reduce sleep mode battery discharge by 35%
  ARM: pxa/hx4700: Remove unwanted request for GPIO105
  ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board
  ARM: EXYNOS: Register JPEG on nuri
  ARM: EXYNOS: Register JPEG on universal_c210
  ARM: S5PV210: Enable JPEG on SMDKV210
  ARM: S5PV210: Add JPEG board definition
  ARM: EXYNOS: Enable JPEG on Origen
  ARM: EXYNOS: Enable JPEG on SMDKV310
  ARM: EXYNOS: Add __init attribute to universal_camera_init()
  ARM: EXYNOS: Add __init attribute to nuri_camera_init()
  ARM: S5PV210: Enable FIMC on SMDKC110
  ARM: S5PV210: Enable FIMC on SMDKV210
  ARM: S5PV210: Enable MFC on SMDKC110
  ARM: S5PV210: Enable MFC on SMDKV210
  ARM: EXYNOS: Enable G2D on SMDKV310
  ARM: tegra: update defconfig
  ...
parents 281b0539 a754a87c
...@@ -1583,6 +1583,7 @@ config ARCH_NR_GPIO ...@@ -1583,6 +1583,7 @@ config ARCH_NR_GPIO
int int
default 1024 if ARCH_SHMOBILE || ARCH_TEGRA default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
default 355 if ARCH_U8500 default 355 if ARCH_U8500
default 264 if MACH_H4700
default 0 default 0
help help
Maximum number of GPIOs in the system. Maximum number of GPIOs in the system.
......
/dts-v1/;
/include/ "kirkwood.dtsi"
/ {
model = "Globalscale Technologies Dreamplug";
compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x20000000>;
};
chosen {
bootargs = "console=ttyS0,115200n8 earlyprintk";
};
serial@f1012000 {
compatible = "ns16550a";
reg = <0xf1012000 0xff>;
reg-shift = <2>;
interrupts = <33>;
clock-frequency = <200000000>;
};
};
/include/ "skeleton.dtsi"
/ {
compatible = "marvell,kirkwood";
};
...@@ -35,6 +35,11 @@ nvec@7000c500 { ...@@ -35,6 +35,11 @@ nvec@7000c500 {
i2c@7000d000 { i2c@7000d000 {
clock-frequency = <400000>; clock-frequency = <400000>;
adt7461@4c {
compatible = "adi,adt7461";
reg = <0x4c>;
};
}; };
serial@70006000 { serial@70006000 {
...@@ -74,4 +79,25 @@ sdhci@c8000400 { ...@@ -74,4 +79,25 @@ sdhci@c8000400 {
sdhci@c8000600 { sdhci@c8000600 {
support-8bit; support-8bit;
}; };
gpio-keys {
compatible = "gpio-keys";
power {
label = "Power";
gpios = <&gpio 79 1>; /* gpio PJ7, active low */
linux,code = <116>; /* KEY_POWER */
gpio-key,wakeup;
};
};
gpio-leds {
compatible = "gpio-leds";
wifi {
label = "wifi-led";
gpios = <&gpio 24 0>;
linux,default-trigger = "rfkill0";
};
};
}; };
...@@ -11,11 +11,14 @@ CONFIG_RT_GROUP_SCHED=y ...@@ -11,11 +11,14 @@ CONFIG_RT_GROUP_SCHED=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_ELF_CORE is not set # CONFIG_ELF_CORE is not set
CONFIG_EMBEDDED=y CONFIG_EMBEDDED=y
CONFIG_PERF_EVENTS=y
CONFIG_SLAB=y CONFIG_SLAB=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
CONFIG_PARTITION_ADVANCED=y
CONFIG_EFI_PARTITION=y
# CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set # CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_TEGRA=y CONFIG_ARCH_TEGRA=y
...@@ -27,18 +30,20 @@ CONFIG_MACH_PAZ00=y ...@@ -27,18 +30,20 @@ CONFIG_MACH_PAZ00=y
CONFIG_MACH_TRIMSLICE=y CONFIG_MACH_TRIMSLICE=y
CONFIG_MACH_WARIO=y CONFIG_MACH_WARIO=y
CONFIG_MACH_VENTANA=y CONFIG_MACH_VENTANA=y
CONFIG_TEGRA_DEBUG_UARTD=y CONFIG_TEGRA_EMC_SCALING_ENABLE=y
CONFIG_ARM_ERRATA_742230=y
CONFIG_NO_HZ=y CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y
CONFIG_SMP=y CONFIG_SMP=y
CONFIG_NR_CPUS=2
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
CONFIG_AEABI=y CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set # CONFIG_OABI_COMPAT is not set
CONFIG_HIGHMEM=y CONFIG_HIGHMEM=y
CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_AUTO_ZRELADDR=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_CPU_IDLE=y
CONFIG_VFP=y CONFIG_VFP=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
...@@ -68,7 +73,6 @@ CONFIG_IPV6_MULTIPLE_TABLES=y ...@@ -68,7 +73,6 @@ CONFIG_IPV6_MULTIPLE_TABLES=y
# CONFIG_FIRMWARE_IN_KERNEL is not set # CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_PROC_DEVICETREE=y CONFIG_PROC_DEVICETREE=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_MISC_DEVICES=y
CONFIG_AD525X_DPOT=y CONFIG_AD525X_DPOT=y
CONFIG_AD525X_DPOT_I2C=y CONFIG_AD525X_DPOT_I2C=y
CONFIG_ICS932S401=y CONFIG_ICS932S401=y
...@@ -76,6 +80,7 @@ CONFIG_APDS9802ALS=y ...@@ -76,6 +80,7 @@ CONFIG_APDS9802ALS=y
CONFIG_ISL29003=y CONFIG_ISL29003=y
CONFIG_SCSI=y CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=y
# CONFIG_SCSI_LOWLEVEL is not set # CONFIG_SCSI_LOWLEVEL is not set
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
CONFIG_DUMMY=y CONFIG_DUMMY=y
...@@ -85,8 +90,7 @@ CONFIG_USB_USBNET=y ...@@ -85,8 +90,7 @@ CONFIG_USB_USBNET=y
CONFIG_USB_NET_SMSC75XX=y CONFIG_USB_NET_SMSC75XX=y
CONFIG_USB_NET_SMSC95XX=y CONFIG_USB_NET_SMSC95XX=y
# CONFIG_WLAN is not set # CONFIG_WLAN is not set
# CONFIG_INPUT is not set CONFIG_INPUT_EVDEV=y
# CONFIG_SERIO is not set
# CONFIG_VT is not set # CONFIG_VT is not set
# CONFIG_LEGACY_PTYS is not set # CONFIG_LEGACY_PTYS is not set
# CONFIG_DEVKMEM is not set # CONFIG_DEVKMEM is not set
...@@ -96,13 +100,15 @@ CONFIG_SERIAL_OF_PLATFORM=y ...@@ -96,13 +100,15 @@ CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_HW_RANDOM is not set # CONFIG_HW_RANDOM is not set
CONFIG_I2C=y CONFIG_I2C=y
# CONFIG_I2C_COMPAT is not set # CONFIG_I2C_COMPAT is not set
# CONFIG_I2C_HELPER_AUTO is not set
CONFIG_I2C_TEGRA=y CONFIG_I2C_TEGRA=y
CONFIG_SPI=y CONFIG_SPI=y
CONFIG_SPI_TEGRA=y CONFIG_SPI_TEGRA=y
CONFIG_SENSORS_LM90=y CONFIG_SENSORS_LM90=y
CONFIG_MFD_TPS6586X=y CONFIG_MFD_TPS6586X=y
CONFIG_REGULATOR=y CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_VIRTUAL_CONSUMER=y
CONFIG_REGULATOR_GPIO=y
CONFIG_REGULATOR_TPS6586X=y CONFIG_REGULATOR_TPS6586X=y
CONFIG_SOUND=y CONFIG_SOUND=y
CONFIG_SND=y CONFIG_SND=y
...@@ -116,11 +122,13 @@ CONFIG_SND_SOC=y ...@@ -116,11 +122,13 @@ CONFIG_SND_SOC=y
CONFIG_SND_SOC_TEGRA=y CONFIG_SND_SOC_TEGRA=y
CONFIG_SND_SOC_TEGRA_WM8903=y CONFIG_SND_SOC_TEGRA_WM8903=y
CONFIG_SND_SOC_TEGRA_TRIMSLICE=y CONFIG_SND_SOC_TEGRA_TRIMSLICE=y
CONFIG_SND_SOC_TEGRA_ALC5632=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_EHCI_TEGRA=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_MMC=y CONFIG_MMC=y
CONFIG_MMC_BLOCK_MINORS=16
CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_TEGRA=y CONFIG_MMC_SDHCI_TEGRA=y
...@@ -130,6 +138,11 @@ CONFIG_STAGING=y ...@@ -130,6 +138,11 @@ CONFIG_STAGING=y
CONFIG_IIO=y CONFIG_IIO=y
CONFIG_SENSORS_ISL29018=y CONFIG_SENSORS_ISL29018=y
CONFIG_SENSORS_AK8975=y CONFIG_SENSORS_AK8975=y
CONFIG_MFD_NVEC=y
CONFIG_KEYBOARD_NVEC=y
CONFIG_SERIO_NVEC_PS2=y
CONFIG_TEGRA_IOMMU_GART=y
CONFIG_TEGRA_IOMMU_SMMU=y
CONFIG_EXT2_FS=y CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y CONFIG_EXT2_FS_POSIX_ACL=y
...@@ -138,13 +151,12 @@ CONFIG_EXT3_FS=y ...@@ -138,13 +151,12 @@ CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4_FS=y
# CONFIG_DNOTIFY is not set # CONFIG_DNOTIFY is not set
CONFIG_VFAT_FS=y CONFIG_VFAT_FS=y
CONFIG_TMPFS=y CONFIG_TMPFS=y
CONFIG_NFS_FS=y CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y CONFIG_ROOT_NFS=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_EFI_PARTITION=y
CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_1=y
CONFIG_PRINTK_TIME=y CONFIG_PRINTK_TIME=y
...@@ -162,9 +174,8 @@ CONFIG_DEBUG_SG=y ...@@ -162,9 +174,8 @@ CONFIG_DEBUG_SG=y
CONFIG_DEBUG_LL=y CONFIG_DEBUG_LL=y
CONFIG_EARLY_PRINTK=y CONFIG_EARLY_PRINTK=y
CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_ARC4=y CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_TWOFISH=y CONFIG_CRYPTO_TWOFISH=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_TEGRA_AES=y
CONFIG_CRC_CCITT=y CONFIG_CRC_CCITT=y
CONFIG_CRC16=y
...@@ -179,7 +179,9 @@ config MACH_SMDKV310 ...@@ -179,7 +179,9 @@ config MACH_SMDKV310
select S5P_DEV_FIMC1 select S5P_DEV_FIMC1
select S5P_DEV_FIMC2 select S5P_DEV_FIMC2
select S5P_DEV_FIMC3 select S5P_DEV_FIMC3
select S5P_DEV_G2D
select S5P_DEV_I2C_HDMIPHY select S5P_DEV_I2C_HDMIPHY
select S5P_DEV_JPEG
select S5P_DEV_MFC select S5P_DEV_MFC
select S5P_DEV_TV select S5P_DEV_TV
select S5P_DEV_USB_EHCI select S5P_DEV_USB_EHCI
...@@ -225,7 +227,9 @@ config MACH_UNIVERSAL_C210 ...@@ -225,7 +227,9 @@ config MACH_UNIVERSAL_C210
select S5P_DEV_FIMC1 select S5P_DEV_FIMC1
select S5P_DEV_FIMC2 select S5P_DEV_FIMC2
select S5P_DEV_FIMC3 select S5P_DEV_FIMC3
select S5P_DEV_G2D
select S5P_DEV_CSIS0 select S5P_DEV_CSIS0
select S5P_DEV_JPEG
select S5P_DEV_FIMD0 select S5P_DEV_FIMD0
select S3C_DEV_HSMMC select S3C_DEV_HSMMC
select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC2
...@@ -262,11 +266,14 @@ config MACH_NURI ...@@ -262,11 +266,14 @@ config MACH_NURI
select S3C_DEV_I2C1 select S3C_DEV_I2C1
select S3C_DEV_I2C3 select S3C_DEV_I2C3
select S3C_DEV_I2C5 select S3C_DEV_I2C5
select S3C_DEV_I2C6
select S5P_DEV_CSIS0 select S5P_DEV_CSIS0
select S5P_DEV_JPEG
select S5P_DEV_FIMC0 select S5P_DEV_FIMC0
select S5P_DEV_FIMC1 select S5P_DEV_FIMC1
select S5P_DEV_FIMC2 select S5P_DEV_FIMC2
select S5P_DEV_FIMC3 select S5P_DEV_FIMC3
select S5P_DEV_G2D
select S5P_DEV_MFC select S5P_DEV_MFC
select S5P_DEV_USB_EHCI select S5P_DEV_USB_EHCI
select S5P_SETUP_MIPIPHY select S5P_SETUP_MIPIPHY
...@@ -276,6 +283,7 @@ config MACH_NURI ...@@ -276,6 +283,7 @@ config MACH_NURI
select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C1
select EXYNOS4_SETUP_I2C3 select EXYNOS4_SETUP_I2C3
select EXYNOS4_SETUP_I2C5 select EXYNOS4_SETUP_I2C5
select EXYNOS4_SETUP_I2C6
select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_SDHCI
select EXYNOS4_SETUP_USB_PHY select EXYNOS4_SETUP_USB_PHY
select S5P_SETUP_MIPIPHY select S5P_SETUP_MIPIPHY
...@@ -296,7 +304,9 @@ config MACH_ORIGEN ...@@ -296,7 +304,9 @@ config MACH_ORIGEN
select S5P_DEV_FIMC2 select S5P_DEV_FIMC2
select S5P_DEV_FIMC3 select S5P_DEV_FIMC3
select S5P_DEV_FIMD0 select S5P_DEV_FIMD0
select S5P_DEV_G2D
select S5P_DEV_I2C_HDMIPHY select S5P_DEV_I2C_HDMIPHY
select S5P_DEV_JPEG
select S5P_DEV_MFC select S5P_DEV_MFC
select S5P_DEV_TV select S5P_DEV_TV
select S5P_DEV_USB_EHCI select S5P_DEV_USB_EHCI
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <video/platform_lcd.h> #include <video/platform_lcd.h>
#include <media/m5mols.h> #include <media/m5mols.h>
#include <media/s5k6aa.h>
#include <media/s5p_fimc.h> #include <media/s5p_fimc.h>
#include <media/v4l2-mediabus.h> #include <media/v4l2-mediabus.h>
...@@ -75,6 +76,7 @@ enum fixed_regulator_id { ...@@ -75,6 +76,7 @@ enum fixed_regulator_id {
FIXED_REG_ID_MAX8903, FIXED_REG_ID_MAX8903,
FIXED_REG_ID_CAM_A28V, FIXED_REG_ID_CAM_A28V,
FIXED_REG_ID_CAM_12V, FIXED_REG_ID_CAM_12V,
FIXED_REG_ID_CAM_VT_15V,
}; };
static struct s3c2410_uartcfg nuri_uartcfgs[] __initdata = { static struct s3c2410_uartcfg nuri_uartcfgs[] __initdata = {
...@@ -399,6 +401,9 @@ static struct regulator_consumer_supply __initdata max8997_ldo4_[] = { ...@@ -399,6 +401,9 @@ static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
static struct regulator_consumer_supply __initdata max8997_ldo5_[] = { static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */ REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
}; };
static struct regulator_consumer_supply nuri_max8997_ldo6_consumer[] = {
REGULATOR_SUPPLY("vdd_reg", "6-003c"), /* S5K6AA camera */
};
static struct regulator_consumer_supply __initdata max8997_ldo7_[] = { static struct regulator_consumer_supply __initdata max8997_ldo7_[] = {
REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */ REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */
}; };
...@@ -431,7 +436,7 @@ static struct regulator_consumer_supply __initdata max8997_buck1_[] = { ...@@ -431,7 +436,7 @@ static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */ REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
}; };
static struct regulator_consumer_supply __initdata max8997_buck2_[] = { static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */ REGULATOR_SUPPLY("vdd_int", "exynos4210-busfreq.0"), /* CPUFREQ */
}; };
static struct regulator_consumer_supply __initdata max8997_buck3_[] = { static struct regulator_consumer_supply __initdata max8997_buck3_[] = {
REGULATOR_SUPPLY("vdd", "mali_dev.0"), /* G3D of Exynos 4 */ REGULATOR_SUPPLY("vdd", "mali_dev.0"), /* G3D of Exynos 4 */
...@@ -546,6 +551,8 @@ static struct regulator_init_data __initdata max8997_ldo6_data = { ...@@ -546,6 +551,8 @@ static struct regulator_init_data __initdata max8997_ldo6_data = {
.enabled = 1, .enabled = 1,
}, },
}, },
.num_consumer_supplies = ARRAY_SIZE(nuri_max8997_ldo6_consumer),
.consumer_supplies = nuri_max8997_ldo6_consumer,
}; };
static struct regulator_init_data __initdata max8997_ldo7_data = { static struct regulator_init_data __initdata max8997_ldo7_data = {
...@@ -742,7 +749,7 @@ static struct regulator_init_data __initdata max8997_buck2_data = { ...@@ -742,7 +749,7 @@ static struct regulator_init_data __initdata max8997_buck2_data = {
.constraints = { .constraints = {
.name = "VINT_1.1V_C210", .name = "VINT_1.1V_C210",
.min_uV = 900000, .min_uV = 900000,
.max_uV = 1100000, .max_uV = 1200000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
.always_on = 1, .always_on = 1,
.state_mem = { .state_mem = {
...@@ -957,7 +964,6 @@ static struct max8997_platform_data __initdata nuri_max8997_pdata = { ...@@ -957,7 +964,6 @@ static struct max8997_platform_data __initdata nuri_max8997_pdata = {
.regulators = nuri_max8997_regulators, .regulators = nuri_max8997_regulators,
.buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6), EXYNOS4_GPL0(0) }, .buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6), EXYNOS4_GPL0(0) },
.buck2_gpiodvs = true,
.buck1_voltage[0] = 1350000, /* 1.35V */ .buck1_voltage[0] = 1350000, /* 1.35V */
.buck1_voltage[1] = 1300000, /* 1.3V */ .buck1_voltage[1] = 1300000, /* 1.3V */
...@@ -1116,7 +1122,30 @@ static void __init nuri_ehci_init(void) ...@@ -1116,7 +1122,30 @@ static void __init nuri_ehci_init(void)
} }
/* CAMERA */ /* CAMERA */
static struct regulator_consumer_supply cam_vt_cam15_supply =
REGULATOR_SUPPLY("vdd_core", "6-003c");
static struct regulator_init_data cam_vt_cam15_reg_init_data = {
.constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
.num_consumer_supplies = 1,
.consumer_supplies = &cam_vt_cam15_supply,
};
static struct fixed_voltage_config cam_vt_cam15_fixed_voltage_cfg = {
.supply_name = "VT_CAM_1.5V",
.microvolts = 1500000,
.gpio = EXYNOS4_GPE2(2), /* VT_CAM_1.5V_EN */
.enable_high = 1,
.init_data = &cam_vt_cam15_reg_init_data,
};
static struct platform_device cam_vt_cam15_fixed_rdev = {
.name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_VT_15V,
.dev = { .platform_data = &cam_vt_cam15_fixed_voltage_cfg },
};
static struct regulator_consumer_supply cam_vdda_supply[] = { static struct regulator_consumer_supply cam_vdda_supply[] = {
REGULATOR_SUPPLY("vdda", "6-003c"),
REGULATOR_SUPPLY("a_sensor", "0-001f"), REGULATOR_SUPPLY("a_sensor", "0-001f"),
}; };
...@@ -1173,6 +1202,21 @@ static struct s5p_platform_mipi_csis mipi_csis_platdata = { ...@@ -1173,6 +1202,21 @@ static struct s5p_platform_mipi_csis mipi_csis_platdata = {
#define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */ #define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */
#define GPIO_CAM_8M_ISP_INT EXYNOS4_GPL2(5) #define GPIO_CAM_8M_ISP_INT EXYNOS4_GPL2(5)
#define GPIO_CAM_VT_NSTBY EXYNOS4_GPL2(0)
#define GPIO_CAM_VT_NRST EXYNOS4_GPL2(1)
static struct s5k6aa_platform_data s5k6aa_pldata = {
.mclk_frequency = 24000000UL,
.gpio_reset = { GPIO_CAM_VT_NRST, 0 },
.gpio_stby = { GPIO_CAM_VT_NSTBY, 0 },
.bus_type = V4L2_MBUS_PARALLEL,
.horiz_flip = 1,
};
static struct i2c_board_info s5k6aa_board_info = {
I2C_BOARD_INFO("S5K6AA", 0x3c),
.platform_data = &s5k6aa_pldata,
};
static struct m5mols_platform_data m5mols_platdata = { static struct m5mols_platform_data m5mols_platdata = {
.gpio_reset = GPIO_CAM_MEGA_RST, .gpio_reset = GPIO_CAM_MEGA_RST,
...@@ -1185,6 +1229,13 @@ static struct i2c_board_info m5mols_board_info = { ...@@ -1185,6 +1229,13 @@ static struct i2c_board_info m5mols_board_info = {
static struct s5p_fimc_isp_info nuri_camera_sensors[] = { static struct s5p_fimc_isp_info nuri_camera_sensors[] = {
{ {
.flags = V4L2_MBUS_PCLK_SAMPLE_RISING |
V4L2_MBUS_VSYNC_ACTIVE_LOW,
.bus_type = FIMC_ITU_601,
.board_info = &s5k6aa_board_info,
.clk_frequency = 24000000UL,
.i2c_bus_num = 6,
}, {
.flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
V4L2_MBUS_VSYNC_ACTIVE_LOW, V4L2_MBUS_VSYNC_ACTIVE_LOW,
.bus_type = FIMC_MIPI_CSI2, .bus_type = FIMC_MIPI_CSI2,
...@@ -1200,11 +1251,13 @@ static struct s5p_platform_fimc fimc_md_platdata = { ...@@ -1200,11 +1251,13 @@ static struct s5p_platform_fimc fimc_md_platdata = {
}; };
static struct gpio nuri_camera_gpios[] = { static struct gpio nuri_camera_gpios[] = {
{ GPIO_CAM_VT_NSTBY, GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" },
{ GPIO_CAM_VT_NRST, GPIOF_OUT_INIT_LOW, "CAM_VGA_NRST" },
{ GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" }, { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" },
{ GPIO_CAM_MEGA_RST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" }, { GPIO_CAM_MEGA_RST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" },
}; };
static void nuri_camera_init(void) static void __init nuri_camera_init(void)
{ {
s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata), s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
&s5p_device_mipi_csis0); &s5p_device_mipi_csis0);
...@@ -1224,6 +1277,8 @@ static void nuri_camera_init(void) ...@@ -1224,6 +1277,8 @@ static void nuri_camera_init(void)
pr_err("%s: Failed to configure 8M_ISP_INT GPIO\n", __func__); pr_err("%s: Failed to configure 8M_ISP_INT GPIO\n", __func__);
/* Free GPIOs controlled directly by the sensor drivers. */ /* Free GPIOs controlled directly by the sensor drivers. */
gpio_free(GPIO_CAM_VT_NRST);
gpio_free(GPIO_CAM_VT_NSTBY);
gpio_free(GPIO_CAM_MEGA_RST); gpio_free(GPIO_CAM_MEGA_RST);
if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) { if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) {
...@@ -1234,15 +1289,27 @@ static void nuri_camera_init(void) ...@@ -1234,15 +1289,27 @@ static void nuri_camera_init(void)
s5p_gpio_set_drvstr(EXYNOS4_GPJ1(3), S5P_GPIO_DRVSTR_LV4); s5p_gpio_set_drvstr(EXYNOS4_GPJ1(3), S5P_GPIO_DRVSTR_LV4);
} }
static struct s3c2410_platform_i2c nuri_i2c6_platdata __initdata = {
.frequency = 400000U,
.sda_delay = 200,
.bus_num = 6,
};
static struct s3c2410_platform_i2c nuri_i2c0_platdata __initdata = { static struct s3c2410_platform_i2c nuri_i2c0_platdata __initdata = {
.frequency = 400000U, .frequency = 400000U,
.sda_delay = 200, .sda_delay = 200,
}; };
/* DEVFREQ controlling memory/bus */
static struct platform_device exynos4_bus_devfreq = {
.name = "exynos4210-busfreq",
};
static struct platform_device *nuri_devices[] __initdata = { static struct platform_device *nuri_devices[] __initdata = {
/* Samsung Platform Devices */ /* Samsung Platform Devices */
&s3c_device_i2c5, /* PMIC should initialize first */ &s3c_device_i2c5, /* PMIC should initialize first */
&s3c_device_i2c0, &s3c_device_i2c0,
&s3c_device_i2c6,
&emmc_fixed_voltage, &emmc_fixed_voltage,
&s5p_device_mipi_csis0, &s5p_device_mipi_csis0,
&s5p_device_fimc0, &s5p_device_fimc0,
...@@ -1259,6 +1326,8 @@ static struct platform_device *nuri_devices[] __initdata = { ...@@ -1259,6 +1326,8 @@ static struct platform_device *nuri_devices[] __initdata = {
&s3c_device_i2c3, &s3c_device_i2c3,
&i2c9_gpio, &i2c9_gpio,
&s3c_device_adc, &s3c_device_adc,
&s5p_device_g2d,
&s5p_device_jpeg,
&s3c_device_rtc, &s3c_device_rtc,
&s5p_device_mfc, &s5p_device_mfc,
&s5p_device_mfc_l, &s5p_device_mfc_l,
...@@ -1271,8 +1340,10 @@ static struct platform_device *nuri_devices[] __initdata = { ...@@ -1271,8 +1340,10 @@ static struct platform_device *nuri_devices[] __initdata = {
&nuri_backlight_device, &nuri_backlight_device,
&max8903_fixed_reg_dev, &max8903_fixed_reg_dev,
&nuri_max8903_device, &nuri_max8903_device,
&cam_vt_cam15_fixed_rdev,
&cam_vdda_fixed_rdev, &cam_vdda_fixed_rdev,
&cam_8m_12v_fixed_rdev, &cam_8m_12v_fixed_rdev,
&exynos4_bus_devfreq,
}; };
static void __init nuri_map_io(void) static void __init nuri_map_io(void)
...@@ -1302,6 +1373,7 @@ static void __init nuri_machine_init(void) ...@@ -1302,6 +1373,7 @@ static void __init nuri_machine_init(void)
i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3)); i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs)); i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
s3c_i2c6_set_platdata(&nuri_i2c6_platdata);
s5p_fimd0_set_platdata(&nuri_fb_pdata); s5p_fimd0_set_platdata(&nuri_fb_pdata);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/mfd/max8997.h> #include <linux/mfd/max8997.h>
#include <linux/lcd.h> #include <linux/lcd.h>
#include <linux/rfkill-gpio.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
...@@ -235,6 +236,7 @@ static struct regulator_init_data __initdata max8997_ldo9_data = { ...@@ -235,6 +236,7 @@ static struct regulator_init_data __initdata max8997_ldo9_data = {
.min_uV = 2800000, .min_uV = 2800000,
.max_uV = 2800000, .max_uV = 2800000,
.apply_uV = 1, .apply_uV = 1,
.always_on = 1,
.valid_ops_mask = REGULATOR_CHANGE_STATUS, .valid_ops_mask = REGULATOR_CHANGE_STATUS,
.state_mem = { .state_mem = {
.disabled = 1, .disabled = 1,
...@@ -278,6 +280,7 @@ static struct regulator_init_data __initdata max8997_ldo14_data = { ...@@ -278,6 +280,7 @@ static struct regulator_init_data __initdata max8997_ldo14_data = {
.min_uV = 1800000, .min_uV = 1800000,
.max_uV = 1800000, .max_uV = 1800000,
.apply_uV = 1, .apply_uV = 1,
.always_on = 1,
.valid_ops_mask = REGULATOR_CHANGE_STATUS, .valid_ops_mask = REGULATOR_CHANGE_STATUS,
.state_mem = { .state_mem = {
.disabled = 1, .disabled = 1,
...@@ -293,6 +296,7 @@ static struct regulator_init_data __initdata max8997_ldo17_data = { ...@@ -293,6 +296,7 @@ static struct regulator_init_data __initdata max8997_ldo17_data = {
.min_uV = 3300000, .min_uV = 3300000,
.max_uV = 3300000, .max_uV = 3300000,
.apply_uV = 1, .apply_uV = 1,
.always_on = 1,
.valid_ops_mask = REGULATOR_CHANGE_STATUS, .valid_ops_mask = REGULATOR_CHANGE_STATUS,
.state_mem = { .state_mem = {
.disabled = 1, .disabled = 1,
...@@ -602,6 +606,23 @@ static struct s3c_fb_platdata origen_lcd_pdata __initdata = { ...@@ -602,6 +606,23 @@ static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
.setup_gpio = exynos4_fimd0_gpio_setup_24bpp, .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
}; };
/* Bluetooth rfkill gpio platform data */
struct rfkill_gpio_platform_data origen_bt_pdata = {
.reset_gpio = EXYNOS4_GPX2(2),
.shutdown_gpio = -1,
.type = RFKILL_TYPE_BLUETOOTH,
.name = "origen-bt",
};
/* Bluetooth Platform device */
static struct platform_device origen_device_bluetooth = {
.name = "rfkill_gpio",
.id = -1,
.dev = {
.platform_data = &origen_bt_pdata,
},
};
static struct platform_device *origen_devices[] __initdata = { static struct platform_device *origen_devices[] __initdata = {
&s3c_device_hsmmc2, &s3c_device_hsmmc2,
&s3c_device_hsmmc0, &s3c_device_hsmmc0,
...@@ -613,9 +634,12 @@ static struct platform_device *origen_devices[] __initdata = { ...@@ -613,9 +634,12 @@ static struct platform_device *origen_devices[] __initdata = {
&s5p_device_fimc1, &s5p_device_fimc1,
&s5p_device_fimc2, &s5p_device_fimc2,
&s5p_device_fimc3, &s5p_device_fimc3,
&s5p_device_fimc_md,
&s5p_device_fimd0, &s5p_device_fimd0,
&s5p_device_g2d,
&s5p_device_hdmi, &s5p_device_hdmi,
&s5p_device_i2c_hdmiphy, &s5p_device_i2c_hdmiphy,
&s5p_device_jpeg,
&s5p_device_mfc, &s5p_device_mfc,
&s5p_device_mfc_l, &s5p_device_mfc_l,
&s5p_device_mfc_r, &s5p_device_mfc_r,
...@@ -623,6 +647,7 @@ static struct platform_device *origen_devices[] __initdata = { ...@@ -623,6 +647,7 @@ static struct platform_device *origen_devices[] __initdata = {
&exynos4_device_ohci, &exynos4_device_ohci,
&origen_device_gpiokeys, &origen_device_gpiokeys,
&origen_lcd_hv070wsa, &origen_lcd_hv070wsa,
&origen_device_bluetooth,
}; };
/* LCD Backlight data */ /* LCD Backlight data */
...@@ -636,6 +661,16 @@ static struct platform_pwm_backlight_data origen_bl_data = { ...@@ -636,6 +661,16 @@ static struct platform_pwm_backlight_data origen_bl_data = {
.pwm_period_ns = 1000, .pwm_period_ns = 1000,
}; };
static void __init origen_bt_setup(void)
{
gpio_request(EXYNOS4_GPA0(0), "GPIO BT_UART");
/* 4 UART Pins configuration */
s3c_gpio_cfgrange_nopull(EXYNOS4_GPA0(0), 4, S3C_GPIO_SFN(2));
/* Setup BT Reset, this gpio will be requesed by rfkill-gpio */
s3c_gpio_cfgpin(EXYNOS4_GPX2(2), S3C_GPIO_OUTPUT);
s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
}
static void s5p_tv_setup(void) static void s5p_tv_setup(void)
{ {
/* Direct HPD to HDMI chip */ /* Direct HPD to HDMI chip */
...@@ -689,6 +724,8 @@ static void __init origen_machine_init(void) ...@@ -689,6 +724,8 @@ static void __init origen_machine_init(void)
platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
origen_bt_setup();
} }
MACHINE_START(ORIGEN, "ORIGEN") MACHINE_START(ORIGEN, "ORIGEN")
......
...@@ -270,6 +270,9 @@ static struct platform_device *smdkv310_devices[] __initdata = { ...@@ -270,6 +270,9 @@ static struct platform_device *smdkv310_devices[] __initdata = {
&s5p_device_fimc1, &s5p_device_fimc1,
&s5p_device_fimc2, &s5p_device_fimc2,
&s5p_device_fimc3, &s5p_device_fimc3,
&s5p_device_fimc_md,
&s5p_device_g2d,
&s5p_device_jpeg,
&exynos4_device_ac97, &exynos4_device_ac97,
&exynos4_device_i2s0, &exynos4_device_i2s0,
&exynos4_device_ohci, &exynos4_device_ohci,
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <media/v4l2-mediabus.h> #include <media/v4l2-mediabus.h>
#include <media/s5p_fimc.h> #include <media/s5p_fimc.h>
#include <media/m5mols.h> #include <media/m5mols.h>
#include <media/s5k6aa.h>
#include "common.h" #include "common.h"
...@@ -123,8 +124,10 @@ static struct regulator_consumer_supply lp3974_buck1_consumer = ...@@ -123,8 +124,10 @@ static struct regulator_consumer_supply lp3974_buck1_consumer =
static struct regulator_consumer_supply lp3974_buck2_consumer = static struct regulator_consumer_supply lp3974_buck2_consumer =
REGULATOR_SUPPLY("vddg3d", NULL); REGULATOR_SUPPLY("vddg3d", NULL);
static struct regulator_consumer_supply lp3974_buck3_consumer = static struct regulator_consumer_supply lp3974_buck3_consumer[] = {
REGULATOR_SUPPLY("vdet", "s5p-sdo"); REGULATOR_SUPPLY("vdet", "s5p-sdo"),
REGULATOR_SUPPLY("vdd_reg", "0-003c"),
};
static struct regulator_init_data lp3974_buck1_data = { static struct regulator_init_data lp3974_buck1_data = {
.constraints = { .constraints = {
...@@ -169,8 +172,8 @@ static struct regulator_init_data lp3974_buck3_data = { ...@@ -169,8 +172,8 @@ static struct regulator_init_data lp3974_buck3_data = {
.enabled = 1, .enabled = 1,
}, },
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(lp3974_buck3_consumer),
.consumer_supplies = &lp3974_buck3_consumer, .consumer_supplies = lp3974_buck3_consumer,
}; };
static struct regulator_init_data lp3974_buck4_data = { static struct regulator_init_data lp3974_buck4_data = {
...@@ -303,6 +306,9 @@ static struct regulator_init_data lp3974_ldo8_data = { ...@@ -303,6 +306,9 @@ static struct regulator_init_data lp3974_ldo8_data = {
.consumer_supplies = lp3974_ldo8_consumer, .consumer_supplies = lp3974_ldo8_consumer,
}; };
static struct regulator_consumer_supply lp3974_ldo9_consumer =
REGULATOR_SUPPLY("vddio", "0-003c");
static struct regulator_init_data lp3974_ldo9_data = { static struct regulator_init_data lp3974_ldo9_data = {
.constraints = { .constraints = {
.name = "VCC_2.8V", .name = "VCC_2.8V",
...@@ -314,6 +320,8 @@ static struct regulator_init_data lp3974_ldo9_data = { ...@@ -314,6 +320,8 @@ static struct regulator_init_data lp3974_ldo9_data = {
.enabled = 1, .enabled = 1,
}, },
}, },
.num_consumer_supplies = 1,
.consumer_supplies = &lp3974_ldo9_consumer,
}; };
static struct regulator_init_data lp3974_ldo10_data = { static struct regulator_init_data lp3974_ldo10_data = {
...@@ -412,6 +420,7 @@ static struct regulator_init_data lp3974_ldo15_data = { ...@@ -412,6 +420,7 @@ static struct regulator_init_data lp3974_ldo15_data = {
}; };
static struct regulator_consumer_supply lp3974_ldo16_consumer[] = { static struct regulator_consumer_supply lp3974_ldo16_consumer[] = {
REGULATOR_SUPPLY("vdda", "0-003c"),
REGULATOR_SUPPLY("a_sensor", "0-001f"), REGULATOR_SUPPLY("a_sensor", "0-001f"),
}; };
...@@ -819,6 +828,8 @@ static struct s3c_fb_pd_win universal_fb_win0 = { ...@@ -819,6 +828,8 @@ static struct s3c_fb_pd_win universal_fb_win0 = {
}, },
.max_bpp = 32, .max_bpp = 32,
.default_bpp = 16, .default_bpp = 16,
.virtual_x = 480,
.virtual_y = 2 * 800,
}; };
static struct s3c_fb_platdata universal_lcd_pdata __initdata = { static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
...@@ -830,6 +841,28 @@ static struct s3c_fb_platdata universal_lcd_pdata __initdata = { ...@@ -830,6 +841,28 @@ static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
.setup_gpio = exynos4_fimd0_gpio_setup_24bpp, .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
}; };
static struct regulator_consumer_supply cam_vt_dio_supply =
REGULATOR_SUPPLY("vdd_core", "0-003c");
static struct regulator_init_data cam_vt_dio_reg_init_data = {
.constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
.num_consumer_supplies = 1,
.consumer_supplies = &cam_vt_dio_supply,
};
static struct fixed_voltage_config cam_vt_dio_fixed_voltage_cfg = {
.supply_name = "CAM_VT_D_IO",
.microvolts = 2800000,
.gpio = EXYNOS4_GPE2(1), /* CAM_PWR_EN2 */
.enable_high = 1,
.init_data = &cam_vt_dio_reg_init_data,
};
static struct platform_device cam_vt_dio_fixed_reg_dev = {
.name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_VT_DIO,
.dev = { .platform_data = &cam_vt_dio_fixed_voltage_cfg },
};
static struct regulator_consumer_supply cam_i_core_supply = static struct regulator_consumer_supply cam_i_core_supply =
REGULATOR_SUPPLY("core", "0-001f"); REGULATOR_SUPPLY("core", "0-001f");
...@@ -885,6 +918,28 @@ static struct s5p_platform_mipi_csis mipi_csis_platdata = { ...@@ -885,6 +918,28 @@ static struct s5p_platform_mipi_csis mipi_csis_platdata = {
#define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3) #define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3)
#define GPIO_CAM_8M_ISP_INT EXYNOS4_GPX1(5) /* XEINT_13 */ #define GPIO_CAM_8M_ISP_INT EXYNOS4_GPX1(5) /* XEINT_13 */
#define GPIO_CAM_MEGA_nRST EXYNOS4_GPE2(5) #define GPIO_CAM_MEGA_nRST EXYNOS4_GPE2(5)
#define GPIO_CAM_VGA_NRST EXYNOS4_GPE4(7)
#define GPIO_CAM_VGA_NSTBY EXYNOS4_GPE4(6)
static int s5k6aa_set_power(int on)
{
gpio_set_value(GPIO_CAM_LEVEL_EN(2), !!on);
return 0;
}
static struct s5k6aa_platform_data s5k6aa_platdata = {
.mclk_frequency = 21600000UL,
.gpio_reset = { GPIO_CAM_VGA_NRST, 0 },
.gpio_stby = { GPIO_CAM_VGA_NSTBY, 0 },
.bus_type = V4L2_MBUS_PARALLEL,
.horiz_flip = 1,
.set_power = s5k6aa_set_power,
};
static struct i2c_board_info s5k6aa_board_info = {
I2C_BOARD_INFO("S5K6AA", 0x3C),
.platform_data = &s5k6aa_platdata,
};
static int m5mols_set_power(struct device *dev, int on) static int m5mols_set_power(struct device *dev, int on)
{ {
...@@ -906,6 +961,14 @@ static struct i2c_board_info m5mols_board_info = { ...@@ -906,6 +961,14 @@ static struct i2c_board_info m5mols_board_info = {
static struct s5p_fimc_isp_info universal_camera_sensors[] = { static struct s5p_fimc_isp_info universal_camera_sensors[] = {
{ {
.mux_id = 0,
.flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
V4L2_MBUS_VSYNC_ACTIVE_LOW,
.bus_type = FIMC_ITU_601,
.board_info = &s5k6aa_board_info,
.i2c_bus_num = 0,
.clk_frequency = 24000000UL,
}, {
.mux_id = 0, .mux_id = 0,
.flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
V4L2_MBUS_VSYNC_ACTIVE_LOW, V4L2_MBUS_VSYNC_ACTIVE_LOW,
...@@ -927,9 +990,11 @@ static struct gpio universal_camera_gpios[] = { ...@@ -927,9 +990,11 @@ static struct gpio universal_camera_gpios[] = {
{ GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW, "CAM_LVL_EN2" }, { GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW, "CAM_LVL_EN2" },
{ GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" }, { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" },
{ GPIO_CAM_MEGA_nRST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" }, { GPIO_CAM_MEGA_nRST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" },
{ GPIO_CAM_VGA_NRST, GPIOF_OUT_INIT_LOW, "CAM_VGA_NRST" },
{ GPIO_CAM_VGA_NSTBY, GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" },
}; };
static void universal_camera_init(void) static void __init universal_camera_init(void)
{ {
s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata), s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
&s5p_device_mipi_csis0); &s5p_device_mipi_csis0);
...@@ -950,6 +1015,8 @@ static void universal_camera_init(void) ...@@ -950,6 +1015,8 @@ static void universal_camera_init(void)
/* Free GPIOs controlled directly by the sensor drivers. */ /* Free GPIOs controlled directly by the sensor drivers. */
gpio_free(GPIO_CAM_MEGA_nRST); gpio_free(GPIO_CAM_MEGA_nRST);
gpio_free(GPIO_CAM_8M_ISP_INT); gpio_free(GPIO_CAM_8M_ISP_INT);
gpio_free(GPIO_CAM_VGA_NRST);
gpio_free(GPIO_CAM_VGA_NSTBY);
if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A))
pr_err("Camera port A setup failed\n"); pr_err("Camera port A setup failed\n");
...@@ -962,6 +1029,7 @@ static struct platform_device *universal_devices[] __initdata = { ...@@ -962,6 +1029,7 @@ static struct platform_device *universal_devices[] __initdata = {
&s5p_device_fimc1, &s5p_device_fimc1,
&s5p_device_fimc2, &s5p_device_fimc2,
&s5p_device_fimc3, &s5p_device_fimc3,
&s5p_device_g2d,
&mmc0_fixed_voltage, &mmc0_fixed_voltage,
&s3c_device_hsmmc0, &s3c_device_hsmmc0,
&s3c_device_hsmmc2, &s3c_device_hsmmc2,
...@@ -980,9 +1048,11 @@ static struct platform_device *universal_devices[] __initdata = { ...@@ -980,9 +1048,11 @@ static struct platform_device *universal_devices[] __initdata = {
&universal_gpio_keys, &universal_gpio_keys,
&s5p_device_onenand, &s5p_device_onenand,
&s5p_device_fimd0, &s5p_device_fimd0,
&s5p_device_jpeg,
&s5p_device_mfc, &s5p_device_mfc,
&s5p_device_mfc_l, &s5p_device_mfc_l,
&s5p_device_mfc_r, &s5p_device_mfc_r,
&cam_vt_dio_fixed_reg_dev,
&cam_i_core_fixed_reg_dev, &cam_i_core_fixed_reg_dev,
&cam_s_if_fixed_reg_dev, &cam_s_if_fixed_reg_dev,
&s5p_device_fimc_md, &s5p_device_fimc_md,
......
...@@ -314,8 +314,10 @@ config MACH_IMX27_VISSTRIM_M10 ...@@ -314,8 +314,10 @@ config MACH_IMX27_VISSTRIM_M10
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_SSI select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_MMC select IMX_HAVE_PLATFORM_MX2_CAMERA
select IMX_HAVE_PLATFORM_MXC_EHCI select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select LEDS_GPIO_REGISTER
help help
Include support for Visstrim_m10 platform and its different variants. Include support for Visstrim_m10 platform and its different variants.
This includes specific configurations for the board and its This includes specific configurations for the board and its
...@@ -486,6 +488,7 @@ config MACH_MX31MOBOARD ...@@ -486,6 +488,7 @@ config MACH_MX31MOBOARD
bool "Support mx31moboard platforms (EPFL Mobots group)" bool "Support mx31moboard platforms (EPFL Mobots group)"
select SOC_IMX31 select SOC_IMX31
select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IPU_CORE select IMX_HAVE_PLATFORM_IPU_CORE
......
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/leds.h>
#include <linux/memblock.h>
#include <media/soc_camera.h>
#include <sound/tlv320aic32x4.h> #include <sound/tlv320aic32x4.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -39,6 +43,8 @@ ...@@ -39,6 +43,8 @@
#include "devices-imx27.h" #include "devices-imx27.h"
#define TVP5150_RSTN (GPIO_PORTC + 18)
#define TVP5150_PWDN (GPIO_PORTC + 19)
#define OTG_PHY_CS_GPIO (GPIO_PORTF + 17) #define OTG_PHY_CS_GPIO (GPIO_PORTF + 17)
#define SDHC1_IRQ IRQ_GPIOB(25) #define SDHC1_IRQ IRQ_GPIOB(25)
...@@ -100,8 +106,99 @@ static const int visstrim_m10_pins[] __initconst = { ...@@ -100,8 +106,99 @@ static const int visstrim_m10_pins[] __initconst = {
PE1_PF_USBOTG_STP, PE1_PF_USBOTG_STP,
PB23_PF_USB_PWR, PB23_PF_USB_PWR,
PB24_PF_USB_OC, PB24_PF_USB_OC,
/* CSI */
PB10_PF_CSI_D0,
PB11_PF_CSI_D1,
PB12_PF_CSI_D2,
PB13_PF_CSI_D3,
PB14_PF_CSI_D4,
PB15_PF_CSI_MCLK,
PB16_PF_CSI_PIXCLK,
PB17_PF_CSI_D5,
PB18_PF_CSI_D6,
PB19_PF_CSI_D7,
PB20_PF_CSI_VSYNC,
PB21_PF_CSI_HSYNC,
}; };
/* Camera */
static int visstrim_camera_power(struct device *dev, int on)
{
gpio_set_value(TVP5150_PWDN, on);
return 0;
};
static int visstrim_camera_reset(struct device *dev)
{
gpio_set_value(TVP5150_RSTN, 0);
ndelay(500);
gpio_set_value(TVP5150_RSTN, 1);
return 0;
};
static struct i2c_board_info visstrim_i2c_camera = {
I2C_BOARD_INFO("tvp5150", 0x5d),
};
static struct soc_camera_link iclink_tvp5150 = {
.bus_id = 0,
.board_info = &visstrim_i2c_camera,
.i2c_adapter_id = 0,
.power = visstrim_camera_power,
.reset = visstrim_camera_reset,
};
static struct mx2_camera_platform_data visstrim_camera = {
.flags = MX2_CAMERA_CCIR | MX2_CAMERA_CCIR_INTERLACE |
MX2_CAMERA_SWAP16 | MX2_CAMERA_PCLK_SAMPLE_RISING,
.clk = 100000,
};
static phys_addr_t mx2_camera_base __initdata;
#define MX2_CAMERA_BUF_SIZE SZ_8M
static void __init visstrim_camera_init(void)
{
struct platform_device *pdev;
int dma;
/* Initialize tvp5150 gpios */
mxc_gpio_mode(TVP5150_RSTN | GPIO_GPIO | GPIO_OUT);
mxc_gpio_mode(TVP5150_PWDN | GPIO_GPIO | GPIO_OUT);
gpio_set_value(TVP5150_RSTN, 1);
gpio_set_value(TVP5150_PWDN, 0);
ndelay(1);
gpio_set_value(TVP5150_PWDN, 1);
ndelay(1);
gpio_set_value(TVP5150_RSTN, 0);
ndelay(500);
gpio_set_value(TVP5150_RSTN, 1);
ndelay(200000);
pdev = imx27_add_mx2_camera(&visstrim_camera);
if (IS_ERR(pdev))
return;
dma = dma_declare_coherent_memory(&pdev->dev,
mx2_camera_base, mx2_camera_base,
MX2_CAMERA_BUF_SIZE,
DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
if (!(dma & DMA_MEMORY_MAP))
return;
}
static void __init visstrim_reserve(void)
{
/* reserve 4 MiB for mx2-camera */
mx2_camera_base = memblock_alloc(MX2_CAMERA_BUF_SIZE,
MX2_CAMERA_BUF_SIZE);
memblock_free(mx2_camera_base, MX2_CAMERA_BUF_SIZE);
memblock_remove(mx2_camera_base, MX2_CAMERA_BUF_SIZE);
}
/* GPIOs used as events for applications */ /* GPIOs used as events for applications */
static struct gpio_keys_button visstrim_gpio_keys[] = { static struct gpio_keys_button visstrim_gpio_keys[] = {
{ {
...@@ -136,6 +233,35 @@ static const struct gpio_keys_platform_data ...@@ -136,6 +233,35 @@ static const struct gpio_keys_platform_data
.nbuttons = ARRAY_SIZE(visstrim_gpio_keys), .nbuttons = ARRAY_SIZE(visstrim_gpio_keys),
}; };
/* led */
static const struct gpio_led visstrim_m10_leds[] __initconst = {
{
.name = "visstrim:ld0",
.default_trigger = "nand-disk",
.gpio = (GPIO_PORTC + 29),
},
{
.name = "visstrim:ld1",
.default_trigger = "nand-disk",
.gpio = (GPIO_PORTC + 24),
},
{
.name = "visstrim:ld2",
.default_trigger = "nand-disk",
.gpio = (GPIO_PORTC + 28),
},
{
.name = "visstrim:ld3",
.default_trigger = "nand-disk",
.gpio = (GPIO_PORTC + 25),
},
};
static const struct gpio_led_platform_data visstrim_m10_led_data __initconst = {
.leds = visstrim_m10_leds,
.num_leds = ARRAY_SIZE(visstrim_m10_leds),
};
/* Visstrim_SM10 has a microSD slot connected to sdhc1 */ /* Visstrim_SM10 has a microSD slot connected to sdhc1 */
static int visstrim_m10_sdhc1_init(struct device *dev, static int visstrim_m10_sdhc1_init(struct device *dev,
irq_handler_t detect_irq, void *data) irq_handler_t detect_irq, void *data)
...@@ -216,6 +342,9 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { ...@@ -216,6 +342,9 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = {
{ {
I2C_BOARD_INFO("tlv320aic32x4", 0x18), I2C_BOARD_INFO("tlv320aic32x4", 0x18),
.platform_data = &visstrim_m10_aic32x4_pdata, .platform_data = &visstrim_m10_aic32x4_pdata,
},
{
I2C_BOARD_INFO("m41t00", 0x68),
} }
}; };
...@@ -254,16 +383,21 @@ static void __init visstrim_m10_board_init(void) ...@@ -254,16 +383,21 @@ static void __init visstrim_m10_board_init(void)
imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata); imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata);
imx27_add_imx_uart0(&uart_pdata); imx27_add_imx_uart0(&uart_pdata);
i2c_register_board_info(0, visstrim_m10_i2c_devices,
ARRAY_SIZE(visstrim_m10_i2c_devices));
imx27_add_imx_i2c(0, &visstrim_m10_i2c_data); imx27_add_imx_i2c(0, &visstrim_m10_i2c_data);
imx27_add_imx_i2c(1, &visstrim_m10_i2c_data); imx27_add_imx_i2c(1, &visstrim_m10_i2c_data);
i2c_register_board_info(0, visstrim_m10_i2c_devices,
ARRAY_SIZE(visstrim_m10_i2c_devices));
imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata); imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata);
imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata); imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata);
imx27_add_fec(NULL); imx27_add_fec(NULL);
imx_add_gpio_keys(&visstrim_gpio_keys_platform_data); imx_add_gpio_keys(&visstrim_gpio_keys_platform_data);
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
imx_add_platform_device("mx27vis", 0, NULL, 0, NULL, 0); imx_add_platform_device("mx27vis", 0, NULL, 0, NULL, 0);
platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0,
&iclink_tvp5150, sizeof(iclink_tvp5150));
gpio_led_register_device(0, &visstrim_m10_led_data);
visstrim_camera_init();
} }
static void __init visstrim_m10_timer_init(void) static void __init visstrim_m10_timer_init(void)
...@@ -277,6 +411,7 @@ static struct sys_timer visstrim_m10_timer = { ...@@ -277,6 +411,7 @@ static struct sys_timer visstrim_m10_timer = {
MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = visstrim_reserve,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
......
...@@ -530,6 +530,8 @@ static void __init mx31moboard_init(void) ...@@ -530,6 +530,8 @@ static void __init mx31moboard_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
gpio_led_register_device(-1, &mx31moboard_led_pdata); gpio_led_register_device(-1, &mx31moboard_led_pdata);
imx31_add_imx2_wdt(NULL);
imx31_add_imx_uart0(&uart0_pdata); imx31_add_imx_uart0(&uart0_pdata);
imx31_add_imx_uart4(&uart4_pdata); imx31_add_imx_uart4(&uart4_pdata);
...@@ -590,7 +592,7 @@ static void __init mx31moboard_reserve(void) ...@@ -590,7 +592,7 @@ static void __init mx31moboard_reserve(void)
} }
MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
/* Maintainer: Valentin Longchamp, EPFL Mobots group */ /* Maintainer: Philippe Retornaz, EPFL Mobots group */
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = mx31moboard_reserve, .reserve = mx31moboard_reserve,
.map_io = mx31_map_io, .map_io = mx31_map_io,
......
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
* *
* Author: Fabio Estevam <fabio.estevam@freescale.com> * Author: Fabio Estevam <fabio.estevam@freescale.com>
* *
* Copyright (C) 2011 Meprolight, Ltd.
* Alex Gershgorin <alexg@meprolight.com>
*
* Modified from i.MX31 3-Stack Development System
*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
...@@ -34,15 +39,102 @@ ...@@ -34,15 +39,102 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/memblock.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/iomux-mx35.h> #include <mach/iomux-mx35.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/3ds_debugboard.h> #include <mach/3ds_debugboard.h>
#include <video/platform_lcd.h>
#include <media/soc_camera.h>
#include "devices-imx35.h" #include "devices-imx35.h"
#define GPIO_MC9S08DZ60_GPS_ENABLE 0
#define GPIO_MC9S08DZ60_HDD_ENABLE 4
#define GPIO_MC9S08DZ60_WIFI_ENABLE 5
#define GPIO_MC9S08DZ60_LCD_ENABLE 6
#define GPIO_MC9S08DZ60_SPEAKER_ENABLE 8
static const struct fb_videomode fb_modedb[] = {
{
/* 800x480 @ 55 Hz */
.name = "Ceramate-CLAA070VC01",
.refresh = 55,
.xres = 800,
.yres = 480,
.pixclock = 40000,
.left_margin = 40,
.right_margin = 40,
.upper_margin = 5,
.lower_margin = 5,
.hsync_len = 20,
.vsync_len = 10,
.sync = FB_SYNC_OE_ACT_HIGH,
.vmode = FB_VMODE_NONINTERLACED,
.flag = 0,
},
};
static const struct ipu_platform_data mx3_ipu_data __initconst = {
.irq_base = MXC_IPU_IRQ_START,
};
static struct mx3fb_platform_data mx3fb_pdata __initdata = {
.name = "Ceramate-CLAA070VC01",
.mode = fb_modedb,
.num_modes = ARRAY_SIZE(fb_modedb),
};
static struct i2c_board_info __initdata i2c_devices_3ds[] = {
{
I2C_BOARD_INFO("mc9s08dz60", 0x69),
},
};
static int lcd_power_gpio = -ENXIO;
static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip,
void *data)
{
return !strcmp(chip->label, data);
}
static void mx35_3ds_lcd_set_power(
struct plat_lcd_data *pd, unsigned int power)
{
struct gpio_chip *chip;
if (!gpio_is_valid(lcd_power_gpio)) {
chip = gpiochip_find(
"mc9s08dz60", mc9s08dz60_gpiochip_match);
if (chip) {
lcd_power_gpio =
chip->base + GPIO_MC9S08DZ60_LCD_ENABLE;
if (gpio_request(lcd_power_gpio, "lcd_power") < 0) {
pr_err("error: gpio already requested!\n");
lcd_power_gpio = -ENXIO;
}
} else {
pr_err("error: didn't find mc9s08dz60 gpio chip\n");
}
}
if (gpio_is_valid(lcd_power_gpio))
gpio_set_value_cansleep(lcd_power_gpio, power);
}
static struct plat_lcd_data mx35_3ds_lcd_data = {
.set_power = mx35_3ds_lcd_set_power,
};
static struct platform_device mx35_3ds_lcd = {
.name = "platform-lcd",
.dev.platform_data = &mx35_3ds_lcd_data,
};
#define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 1)) #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 1))
static const struct imxuart_platform_data uart_pdata __initconst = { static const struct imxuart_platform_data uart_pdata __initconst = {
...@@ -120,6 +212,109 @@ static iomux_v3_cfg_t mx35pdk_pads[] = { ...@@ -120,6 +212,109 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
/* I2C1 */ /* I2C1 */
MX35_PAD_I2C1_CLK__I2C1_SCL, MX35_PAD_I2C1_CLK__I2C1_SCL,
MX35_PAD_I2C1_DAT__I2C1_SDA, MX35_PAD_I2C1_DAT__I2C1_SDA,
/* Display */
MX35_PAD_LD0__IPU_DISPB_DAT_0,
MX35_PAD_LD1__IPU_DISPB_DAT_1,
MX35_PAD_LD2__IPU_DISPB_DAT_2,
MX35_PAD_LD3__IPU_DISPB_DAT_3,
MX35_PAD_LD4__IPU_DISPB_DAT_4,
MX35_PAD_LD5__IPU_DISPB_DAT_5,
MX35_PAD_LD6__IPU_DISPB_DAT_6,
MX35_PAD_LD7__IPU_DISPB_DAT_7,
MX35_PAD_LD8__IPU_DISPB_DAT_8,
MX35_PAD_LD9__IPU_DISPB_DAT_9,
MX35_PAD_LD10__IPU_DISPB_DAT_10,
MX35_PAD_LD11__IPU_DISPB_DAT_11,
MX35_PAD_LD12__IPU_DISPB_DAT_12,
MX35_PAD_LD13__IPU_DISPB_DAT_13,
MX35_PAD_LD14__IPU_DISPB_DAT_14,
MX35_PAD_LD15__IPU_DISPB_DAT_15,
MX35_PAD_LD16__IPU_DISPB_DAT_16,
MX35_PAD_LD17__IPU_DISPB_DAT_17,
MX35_PAD_D3_HSYNC__IPU_DISPB_D3_HSYNC,
MX35_PAD_D3_FPSHIFT__IPU_DISPB_D3_CLK,
MX35_PAD_D3_DRDY__IPU_DISPB_D3_DRDY,
MX35_PAD_CONTRAST__IPU_DISPB_CONTR,
MX35_PAD_D3_VSYNC__IPU_DISPB_D3_VSYNC,
MX35_PAD_D3_REV__IPU_DISPB_D3_REV,
MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS,
/* CSI */
MX35_PAD_TX1__IPU_CSI_D_6,
MX35_PAD_TX0__IPU_CSI_D_7,
MX35_PAD_CSI_D8__IPU_CSI_D_8,
MX35_PAD_CSI_D9__IPU_CSI_D_9,
MX35_PAD_CSI_D10__IPU_CSI_D_10,
MX35_PAD_CSI_D11__IPU_CSI_D_11,
MX35_PAD_CSI_D12__IPU_CSI_D_12,
MX35_PAD_CSI_D13__IPU_CSI_D_13,
MX35_PAD_CSI_D14__IPU_CSI_D_14,
MX35_PAD_CSI_D15__IPU_CSI_D_15,
MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC,
MX35_PAD_CSI_MCLK__IPU_CSI_MCLK,
MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK,
MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC,
};
/*
* Camera support
*/
static phys_addr_t mx3_camera_base __initdata;
#define MX35_3DS_CAMERA_BUF_SIZE SZ_8M
static const struct mx3_camera_pdata mx35_3ds_camera_pdata __initconst = {
.flags = MX3_CAMERA_DATAWIDTH_8,
.mclk_10khz = 2000,
};
static int __init imx35_3ds_init_camera(void)
{
int dma, ret = -ENOMEM;
struct platform_device *pdev =
imx35_alloc_mx3_camera(&mx35_3ds_camera_pdata);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
if (!mx3_camera_base)
goto err;
dma = dma_declare_coherent_memory(&pdev->dev,
mx3_camera_base, mx3_camera_base,
MX35_3DS_CAMERA_BUF_SIZE,
DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
if (!(dma & DMA_MEMORY_MAP))
goto err;
ret = platform_device_add(pdev);
if (ret)
err:
platform_device_put(pdev);
return ret;
}
static const struct ipu_platform_data mx35_3ds_ipu_data __initconst = {
.irq_base = MXC_IPU_IRQ_START,
};
static struct i2c_board_info mx35_3ds_i2c_camera = {
I2C_BOARD_INFO("ov2640", 0x30),
};
static struct soc_camera_link iclink_ov2640 = {
.bus_id = 0,
.board_info = &mx35_3ds_i2c_camera,
.i2c_adapter_id = 0,
.power = NULL,
};
static struct platform_device mx35_3ds_ov2640 = {
.name = "soc-camera-pdrv",
.id = 0,
.dev = {
.platform_data = &iclink_ov2640,
},
}; };
static int mx35_3ds_otg_init(struct platform_device *pdev) static int mx35_3ds_otg_init(struct platform_device *pdev)
...@@ -179,6 +374,8 @@ static const struct imxi2c_platform_data mx35_3ds_i2c0_data __initconst = { ...@@ -179,6 +374,8 @@ static const struct imxi2c_platform_data mx35_3ds_i2c0_data __initconst = {
*/ */
static void __init mx35_3ds_init(void) static void __init mx35_3ds_init(void)
{ {
struct platform_device *imx35_fb_pdev;
imx35_soc_init(); imx35_soc_init();
mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads));
...@@ -204,6 +401,17 @@ static void __init mx35_3ds_init(void) ...@@ -204,6 +401,17 @@ static void __init mx35_3ds_init(void)
pr_warn("Init of the debugboard failed, all " pr_warn("Init of the debugboard failed, all "
"devices on the debugboard are unusable.\n"); "devices on the debugboard are unusable.\n");
imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
i2c_register_board_info(
0, i2c_devices_3ds, ARRAY_SIZE(i2c_devices_3ds));
imx35_add_ipu_core(&mx35_3ds_ipu_data);
platform_device_register(&mx35_3ds_ov2640);
imx35_3ds_init_camera();
imx35_fb_pdev = imx35_add_mx3_sdc_fb(&mx3fb_pdata);
mx35_3ds_lcd.dev.parent = &imx35_fb_pdev->dev;
platform_device_register(&mx35_3ds_lcd);
} }
static void __init mx35pdk_timer_init(void) static void __init mx35pdk_timer_init(void)
...@@ -215,6 +423,13 @@ struct sys_timer mx35pdk_timer = { ...@@ -215,6 +423,13 @@ struct sys_timer mx35pdk_timer = {
.init = mx35pdk_timer_init, .init = mx35pdk_timer_init,
}; };
static void __init mx35_3ds_reserve(void)
{
/* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
mx3_camera_base = arm_memblock_steal(MX35_3DS_CAMERA_BUF_SIZE,
MX35_3DS_CAMERA_BUF_SIZE);
}
MACHINE_START(MX35_3DS, "Freescale MX35PDK") MACHINE_START(MX35_3DS, "Freescale MX35PDK")
/* Maintainer: Freescale Semiconductor, Inc */ /* Maintainer: Freescale Semiconductor, Inc */
.atag_offset = 0x100, .atag_offset = 0x100,
...@@ -224,5 +439,6 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK") ...@@ -224,5 +439,6 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
.handle_irq = imx35_handle_irq, .handle_irq = imx35_handle_irq,
.timer = &mx35pdk_timer, .timer = &mx35pdk_timer,
.init_machine = mx35_3ds_init, .init_machine = mx35_3ds_init,
.reserve = mx35_3ds_reserve,
.restart = mxc_restart, .restart = mxc_restart,
MACHINE_END MACHINE_END
...@@ -44,6 +44,20 @@ config MACH_GURUPLUG ...@@ -44,6 +44,20 @@ config MACH_GURUPLUG
Say 'Y' here if you want your kernel to support the Say 'Y' here if you want your kernel to support the
Marvell GuruPlug Reference Board. Marvell GuruPlug Reference Board.
config ARCH_KIRKWOOD_DT
bool "Marvell Kirkwood Flattened Device Tree"
select USE_OF
help
Say 'Y' here if you want your kernel to support the
Marvell Kirkwood using flattened device tree.
config MACH_DREAMPLUG_DT
bool "Marvell DreamPlug (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the
Marvell DreamPlug (Flattened Device Tree).
config MACH_TS219 config MACH_TS219
bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
help help
......
...@@ -20,3 +20,4 @@ obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o ...@@ -20,3 +20,4 @@ obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_T5325) += t5325-setup.o obj-$(CONFIG_MACH_T5325) += t5325-setup.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o
obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
zreladdr-y += 0x00008000 zreladdr-y += 0x00008000
params_phys-y := 0x00000100 params_phys-y := 0x00000100
initrd_phys-y := 0x00800000 initrd_phys-y := 0x00800000
dtb-$(CONFIG_MACH_DREAMPLUG_DT) += kirkwood-dreamplug.dtb
/*
* Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
*
* arch/arm/mach-kirkwood/board-dt.c
*
* Marvell DreamPlug Reference Board Setup
*
* 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/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mtd/partitions.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_fdt.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/mtd/physmap.h>
#include <linux/spi/flash.h>
#include <linux/spi/spi.h>
#include <linux/spi/orion_spi.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include <plat/mvsdio.h>
#include "common.h"
#include "mpp.h"
static struct of_device_id kirkwood_dt_match_table[] __initdata = {
{ .compatible = "simple-bus", },
{ }
};
struct mtd_partition dreamplug_partitions[] = {
{
.name = "u-boot",
.size = SZ_512K,
.offset = 0,
},
{
.name = "u-boot env",
.size = SZ_64K,
.offset = SZ_512K + SZ_512K,
},
{
.name = "dtb",
.size = SZ_64K,
.offset = SZ_512K + SZ_512K + SZ_512K,
},
};
static const struct flash_platform_data dreamplug_spi_slave_data = {
.type = "mx25l1606e",
.name = "spi_flash",
.parts = dreamplug_partitions,
.nr_parts = ARRAY_SIZE(dreamplug_partitions),
};
static struct spi_board_info __initdata dreamplug_spi_slave_info[] = {
{
.modalias = "m25p80",
.platform_data = &dreamplug_spi_slave_data,
.irq = -1,
.max_speed_hz = 50000000,
.bus_num = 0,
.chip_select = 0,
},
};
static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
};
static struct mv643xx_eth_platform_data dreamplug_ge01_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(1),
};
static struct mv_sata_platform_data dreamplug_sata_data = {
.n_ports = 1,
};
static struct mvsdio_platform_data dreamplug_mvsdio_data = {
/* unfortunately the CD signal has not been connected */
};
static struct gpio_led dreamplug_led_pins[] = {
{
.name = "dreamplug:blue:bluetooth",
.gpio = 47,
.active_low = 1,
},
{
.name = "dreamplug:green:wifi",
.gpio = 48,
.active_low = 1,
},
{
.name = "dreamplug:green:wifi_ap",
.gpio = 49,
.active_low = 1,
},
};
static struct gpio_led_platform_data dreamplug_led_data = {
.leds = dreamplug_led_pins,
.num_leds = ARRAY_SIZE(dreamplug_led_pins),
};
static struct platform_device dreamplug_leds = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &dreamplug_led_data,
}
};
static unsigned int dreamplug_mpp_config[] __initdata = {
MPP0_SPI_SCn,
MPP1_SPI_MOSI,
MPP2_SPI_SCK,
MPP3_SPI_MISO,
MPP47_GPIO, /* Bluetooth LED */
MPP48_GPIO, /* Wifi LED */
MPP49_GPIO, /* Wifi AP LED */
0
};
static void __init dreamplug_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(dreamplug_mpp_config);
spi_register_board_info(dreamplug_spi_slave_info,
ARRAY_SIZE(dreamplug_spi_slave_info));
kirkwood_spi_init();
kirkwood_ehci_init();
kirkwood_ge00_init(&dreamplug_ge00_data);
kirkwood_ge01_init(&dreamplug_ge01_data);
kirkwood_sata_init(&dreamplug_sata_data);
kirkwood_sdio_init(&dreamplug_mvsdio_data);
platform_device_register(&dreamplug_leds);
}
static void __init kirkwood_dt_init(void)
{
kirkwood_init();
if (of_machine_is_compatible("globalscale,dreamplug"))
dreamplug_init();
of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
}
static const char *kirkwood_dt_board_compat[] = {
"globalscale,dreamplug",
NULL
};
DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
/* Maintainer: Jason Cooper <jason@lakedaemon.net> */
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer,
.init_machine = kirkwood_dt_init,
.restart = kirkwood_restart,
.dt_compat = kirkwood_dt_board_compat,
MACHINE_END
...@@ -223,6 +223,7 @@ struct resource mmp2_resource_gpio[] = { ...@@ -223,6 +223,7 @@ struct resource mmp2_resource_gpio[] = {
}, { }, {
.start = IRQ_MMP2_GPIO, .start = IRQ_MMP2_GPIO,
.end = IRQ_MMP2_GPIO, .end = IRQ_MMP2_GPIO,
.name = "gpio_mux",
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };
......
...@@ -166,6 +166,7 @@ struct resource pxa168_resource_gpio[] = { ...@@ -166,6 +166,7 @@ struct resource pxa168_resource_gpio[] = {
}, { }, {
.start = IRQ_PXA168_GPIOX, .start = IRQ_PXA168_GPIOX,
.end = IRQ_PXA168_GPIOX, .end = IRQ_PXA168_GPIOX,
.name = "gpio_mux",
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };
......
...@@ -173,6 +173,7 @@ struct resource pxa910_resource_gpio[] = { ...@@ -173,6 +173,7 @@ struct resource pxa910_resource_gpio[] = {
}, { }, {
.start = IRQ_PXA910_AP_GPIO, .start = IRQ_PXA910_AP_GPIO,
.end = IRQ_PXA910_AP_GPIO, .end = IRQ_PXA910_AP_GPIO,
.name = "gpio_mux",
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };
......
...@@ -83,6 +83,18 @@ config MODULE_M28 ...@@ -83,6 +83,18 @@ config MODULE_M28
select MXS_HAVE_PLATFORM_MXSFB select MXS_HAVE_PLATFORM_MXSFB
select MXS_OCOTP select MXS_OCOTP
config MODULE_APX4
bool
select SOC_IMX28
select LEDS_GPIO_REGISTER
select MXS_HAVE_AMBA_DUART
select MXS_HAVE_PLATFORM_AUART
select MXS_HAVE_PLATFORM_FEC
select MXS_HAVE_PLATFORM_MXS_I2C
select MXS_HAVE_PLATFORM_MXS_MMC
select MXS_HAVE_PLATFORM_MXS_SAIF
select MXS_OCOTP
config MACH_TX28 config MACH_TX28
bool "Ka-Ro TX28 module" bool "Ka-Ro TX28 module"
select MODULE_TX28 select MODULE_TX28
...@@ -91,4 +103,8 @@ config MACH_M28EVK ...@@ -91,4 +103,8 @@ config MACH_M28EVK
bool "Support DENX M28EVK Platform" bool "Support DENX M28EVK Platform"
select MODULE_M28 select MODULE_M28
config MACH_APX4DEVKIT
bool "Support Bluegiga APX4 Development Kit"
select MODULE_APX4
endif endif
...@@ -11,6 +11,7 @@ obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o ...@@ -11,6 +11,7 @@ obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o
obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
obj-$(CONFIG_MACH_M28EVK) += mach-m28evk.o obj-$(CONFIG_MACH_M28EVK) += mach-m28evk.o
obj-$(CONFIG_MACH_APX4DEVKIT) += mach-apx4devkit.o
obj-$(CONFIG_MODULE_TX28) += module-tx28.o obj-$(CONFIG_MODULE_TX28) += module-tx28.o
obj-$(CONFIG_MACH_TX28) += mach-tx28.o obj-$(CONFIG_MACH_TX28) += mach-tx28.o
......
...@@ -18,4 +18,5 @@ ...@@ -18,4 +18,5 @@
#define HW_DIGCTL_CTRL 0x0 #define HW_DIGCTL_CTRL 0x0
#define BP_DIGCTL_CTRL_SAIF_CLKMUX 10 #define BP_DIGCTL_CTRL_SAIF_CLKMUX 10
#define BM_DIGCTL_CTRL_SAIF_CLKMUX (0x3 << 10) #define BM_DIGCTL_CTRL_SAIF_CLKMUX (0x3 << 10)
#define HW_DIGCTL_CHIPID 0x310
#endif #endif
...@@ -23,21 +23,9 @@ ...@@ -23,21 +23,9 @@
#include <linux/io.h> #include <linux/io.h>
#endif #endif
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <mach/digctl.h>
#include <mach/hardware.h> #include <mach/hardware.h>
/*
* MXS CPU types
*/
#define cpu_is_mx23() ( \
machine_is_mx23evk() || \
machine_is_stmp378x() || \
0)
#define cpu_is_mx28() ( \
machine_is_mx28evk() || \
machine_is_m28evk() || \
machine_is_tx28() || \
0)
/* /*
* IO addresses common to MXS-based * IO addresses common to MXS-based
*/ */
...@@ -109,6 +97,21 @@ static inline void __mxs_togl(u32 mask, void __iomem *reg) ...@@ -109,6 +97,21 @@ static inline void __mxs_togl(u32 mask, void __iomem *reg)
{ {
__raw_writel(mask, reg + MXS_TOG_ADDR); __raw_writel(mask, reg + MXS_TOG_ADDR);
} }
/*
* MXS CPU types
*/
#define MXS_CHIPID (MXS_IO_ADDRESS(MXS_DIGCTL_BASE_ADDR) + HW_DIGCTL_CHIPID)
static inline int cpu_is_mx23(void)
{
return ((__raw_readl(MXS_CHIPID) >> 16) == 0x3780);
}
static inline int cpu_is_mx28(void)
{
return ((__raw_readl(MXS_CHIPID) >> 16) == 0x2800);
}
#endif #endif
#endif /* __MACH_MXS_H__ */ #endif /* __MACH_MXS_H__ */
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
#ifndef __MACH_MXS_UNCOMPRESS_H__ #ifndef __MACH_MXS_UNCOMPRESS_H__
#define __MACH_MXS_UNCOMPRESS_H__ #define __MACH_MXS_UNCOMPRESS_H__
#include <asm/mach-types.h>
unsigned long mxs_duart_base; unsigned long mxs_duart_base;
#define MXS_DUART(x) (*(volatile unsigned long *)(mxs_duart_base + (x))) #define MXS_DUART(x) (*(volatile unsigned long *)(mxs_duart_base + (x)))
...@@ -55,16 +53,17 @@ static inline void flush(void) ...@@ -55,16 +53,17 @@ static inline void flush(void)
#define MX23_DUART_BASE_ADDR 0x80070000 #define MX23_DUART_BASE_ADDR 0x80070000
#define MX28_DUART_BASE_ADDR 0x80074000 #define MX28_DUART_BASE_ADDR 0x80074000
#define MXS_DIGCTL_CHIPID 0x8001c310
static inline void __arch_decomp_setup(unsigned long arch_id) static inline void __arch_decomp_setup(unsigned long arch_id)
{ {
switch (arch_id) { u16 chipid = (*(volatile unsigned long *) MXS_DIGCTL_CHIPID) >> 16;
case MACH_TYPE_MX23EVK:
switch (chipid) {
case 0x3780:
mxs_duart_base = MX23_DUART_BASE_ADDR; mxs_duart_base = MX23_DUART_BASE_ADDR;
break; break;
case MACH_TYPE_MX28EVK: case 0x2800:
case MACH_TYPE_M28EVK:
case MACH_TYPE_TX28:
mxs_duart_base = MX28_DUART_BASE_ADDR; mxs_duart_base = MX28_DUART_BASE_ADDR;
break; break;
default: default:
......
/*
* Copyright (C) 2011-2012
* Lauri Hintsala, Bluegiga, <lauri.hintsala@bluegiga.com>
* Veli-Pekka Peltola, Bluegiga, <veli-pekka.peltola@bluegiga.com>
*
* based on: mach-mx28evk.c
* Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/clk.h>
#include <linux/i2c.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/micrel_phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <mach/common.h>
#include <mach/digctl.h>
#include <mach/iomux-mx28.h>
#include "devices-mx28.h"
#define APX4DEVKIT_GPIO_USERLED MXS_GPIO_NR(3, 28)
static const iomux_cfg_t apx4devkit_pads[] __initconst = {
/* duart */
MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL,
MX28_PAD_PWM1__DUART_TX | MXS_PAD_CTRL,
/* auart0 */
MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL,
MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL,
MX28_PAD_AUART0_CTS__AUART0_CTS | MXS_PAD_CTRL,
MX28_PAD_AUART0_RTS__AUART0_RTS | MXS_PAD_CTRL,
/* auart1 */
MX28_PAD_AUART1_RX__AUART1_RX | MXS_PAD_CTRL,
MX28_PAD_AUART1_TX__AUART1_TX | MXS_PAD_CTRL,
/* auart2 */
MX28_PAD_SSP2_SCK__AUART2_RX | MXS_PAD_CTRL,
MX28_PAD_SSP2_MOSI__AUART2_TX | MXS_PAD_CTRL,
/* auart3 */
MX28_PAD_SSP2_MISO__AUART3_RX | MXS_PAD_CTRL,
MX28_PAD_SSP2_SS0__AUART3_TX | MXS_PAD_CTRL,
#define MXS_PAD_FEC (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP)
/* fec0 */
MX28_PAD_ENET0_MDC__ENET0_MDC | MXS_PAD_FEC,
MX28_PAD_ENET0_MDIO__ENET0_MDIO | MXS_PAD_FEC,
MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MXS_PAD_FEC,
MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MXS_PAD_FEC,
MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MXS_PAD_FEC,
MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MXS_PAD_FEC,
MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MXS_PAD_FEC,
MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MXS_PAD_FEC,
MX28_PAD_ENET_CLK__CLKCTRL_ENET | MXS_PAD_FEC,
/* i2c */
MX28_PAD_I2C0_SCL__I2C0_SCL,
MX28_PAD_I2C0_SDA__I2C0_SDA,
/* mmc0 */
MX28_PAD_SSP0_DATA0__SSP0_D0 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA1__SSP0_D1 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA2__SSP0_D2 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA3__SSP0_D3 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA4__SSP0_D4 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA5__SSP0_D5 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA6__SSP0_D6 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA7__SSP0_D7 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_CMD__SSP0_CMD |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
MX28_PAD_SSP0_SCK__SSP0_SCK |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
/* led */
MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL,
/* saif0 & saif1 */
MX28_PAD_SAIF0_MCLK__SAIF0_MCLK |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
};
/* led */
static const struct gpio_led apx4devkit_leds[] __initconst = {
{
.name = "user-led",
.default_trigger = "heartbeat",
.gpio = APX4DEVKIT_GPIO_USERLED,
},
};
static const struct gpio_led_platform_data apx4devkit_led_data __initconst = {
.leds = apx4devkit_leds,
.num_leds = ARRAY_SIZE(apx4devkit_leds),
};
static const struct fec_platform_data mx28_fec_pdata __initconst = {
.phy = PHY_INTERFACE_MODE_RMII,
};
static const struct mxs_mmc_platform_data apx4devkit_mmc_pdata __initconst = {
.wp_gpio = -EINVAL,
.flags = SLOTF_4_BIT_CAPABLE,
};
static const struct i2c_board_info apx4devkit_i2c_boardinfo[] __initconst = {
{ I2C_BOARD_INFO("sgtl5000", 0x0a) }, /* ASoC */
{ I2C_BOARD_INFO("pcf8563", 0x51) }, /* RTC */
};
#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || \
defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
static struct regulator_consumer_supply apx4devkit_audio_consumer_supplies[] = {
REGULATOR_SUPPLY("VDDA", "0-000a"),
REGULATOR_SUPPLY("VDDIO", "0-000a"),
};
static struct regulator_init_data apx4devkit_vdd_reg_init_data = {
.constraints = {
.name = "3V3",
.always_on = 1,
},
.consumer_supplies = apx4devkit_audio_consumer_supplies,
.num_consumer_supplies = ARRAY_SIZE(apx4devkit_audio_consumer_supplies),
};
static struct fixed_voltage_config apx4devkit_vdd_pdata = {
.supply_name = "board-3V3",
.microvolts = 3300000,
.gpio = -EINVAL,
.enabled_at_boot = 1,
.init_data = &apx4devkit_vdd_reg_init_data,
};
static struct platform_device apx4devkit_voltage_regulator = {
.name = "reg-fixed-voltage",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &apx4devkit_vdd_pdata,
},
};
static void __init apx4devkit_add_regulators(void)
{
platform_device_register(&apx4devkit_voltage_regulator);
}
#else
static void __init apx4devkit_add_regulators(void) {}
#endif
static const struct mxs_saif_platform_data
apx4devkit_mxs_saif_pdata[] __initconst = {
/* working on EXTMSTR0 mode (saif0 master, saif1 slave) */
{
.master_mode = 1,
.master_id = 0,
}, {
.master_mode = 0,
.master_id = 0,
},
};
static int apx4devkit_phy_fixup(struct phy_device *phy)
{
phy->dev_flags |= MICREL_PHY_50MHZ_CLK;
return 0;
}
static void __init apx4devkit_init(void)
{
mxs_iomux_setup_multiple_pads(apx4devkit_pads,
ARRAY_SIZE(apx4devkit_pads));
mx28_add_duart();
mx28_add_auart0();
mx28_add_auart1();
mx28_add_auart2();
mx28_add_auart3();
/*
* Register fixup for the Micrel KS8031 PHY clock
* (shares same ID with KS8051)
*/
phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
apx4devkit_phy_fixup);
mx28_add_fec(0, &mx28_fec_pdata);
mx28_add_mxs_mmc(0, &apx4devkit_mmc_pdata);
gpio_led_register_device(0, &apx4devkit_led_data);
mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
mx28_add_saif(0, &apx4devkit_mxs_saif_pdata[0]);
mx28_add_saif(1, &apx4devkit_mxs_saif_pdata[1]);
apx4devkit_add_regulators();
mx28_add_mxs_i2c(0);
i2c_register_board_info(0, apx4devkit_i2c_boardinfo,
ARRAY_SIZE(apx4devkit_i2c_boardinfo));
mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0, NULL, 0);
}
static void __init apx4devkit_timer_init(void)
{
mx28_clocks_init();
}
static struct sys_timer apx4devkit_timer = {
.init = apx4devkit_timer_init,
};
MACHINE_START(APX4DEVKIT, "Bluegiga APX4 Development Kit")
.map_io = mx28_map_io,
.init_irq = mx28_init_irq,
.timer = &apx4devkit_timer,
.init_machine = apx4devkit_init,
.restart = mxs_restart,
MACHINE_END
...@@ -247,18 +247,15 @@ static int __init m28evk_fec_get_mac(void) ...@@ -247,18 +247,15 @@ static int __init m28evk_fec_get_mac(void)
u32 val; u32 val;
const u32 *ocotp = mxs_get_ocotp(); const u32 *ocotp = mxs_get_ocotp();
if (!ocotp) { if (!ocotp)
pr_err("%s: timeout when reading fec mac from OCOTP\n",
__func__);
return -ETIMEDOUT; return -ETIMEDOUT;
}
/* /*
* OCOTP only stores the last 4 octets for each mac address, * OCOTP only stores the last 4 octets for each mac address,
* so hard-code DENX OUI (C0:E5:4E) here. * so hard-code DENX OUI (C0:E5:4E) here.
*/ */
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
val = ocotp[i * 4]; val = ocotp[i];
mx28_fec_pdata[i].mac[0] = 0xC0; mx28_fec_pdata[i].mac[0] = 0xC0;
mx28_fec_pdata[i].mac[1] = 0xE5; mx28_fec_pdata[i].mac[1] = 0xE5;
mx28_fec_pdata[i].mac[2] = 0x4E; mx28_fec_pdata[i].mac[2] = 0x4E;
......
...@@ -223,7 +223,6 @@ static const struct gpio_led_platform_data mx28evk_led_data __initconst = { ...@@ -223,7 +223,6 @@ static const struct gpio_led_platform_data mx28evk_led_data __initconst = {
/* fec */ /* fec */
static void __init mx28evk_fec_reset(void) static void __init mx28evk_fec_reset(void)
{ {
int ret;
struct clk *clk; struct clk *clk;
/* Enable fec phy clock */ /* Enable fec phy clock */
...@@ -231,32 +230,7 @@ static void __init mx28evk_fec_reset(void) ...@@ -231,32 +230,7 @@ static void __init mx28evk_fec_reset(void)
if (!IS_ERR(clk)) if (!IS_ERR(clk))
clk_prepare_enable(clk); clk_prepare_enable(clk);
/* Power up fec phy */ gpio_set_value(MX28EVK_FEC_PHY_RESET, 0);
ret = gpio_request(MX28EVK_FEC_PHY_POWER, "fec-phy-power");
if (ret) {
pr_err("Failed to request gpio fec-phy-%s: %d\n", "power", ret);
return;
}
ret = gpio_direction_output(MX28EVK_FEC_PHY_POWER, 0);
if (ret) {
pr_err("Failed to drive gpio fec-phy-%s: %d\n", "power", ret);
return;
}
/* Reset fec phy */
ret = gpio_request(MX28EVK_FEC_PHY_RESET, "fec-phy-reset");
if (ret) {
pr_err("Failed to request gpio fec-phy-%s: %d\n", "reset", ret);
return;
}
gpio_direction_output(MX28EVK_FEC_PHY_RESET, 0);
if (ret) {
pr_err("Failed to drive gpio fec-phy-%s: %d\n", "reset", ret);
return;
}
mdelay(1); mdelay(1);
gpio_set_value(MX28EVK_FEC_PHY_RESET, 1); gpio_set_value(MX28EVK_FEC_PHY_RESET, 1);
} }
...@@ -278,14 +252,14 @@ static int __init mx28evk_fec_get_mac(void) ...@@ -278,14 +252,14 @@ static int __init mx28evk_fec_get_mac(void)
const u32 *ocotp = mxs_get_ocotp(); const u32 *ocotp = mxs_get_ocotp();
if (!ocotp) if (!ocotp)
goto error; return -ETIMEDOUT;
/* /*
* OCOTP only stores the last 4 octets for each mac address, * OCOTP only stores the last 4 octets for each mac address,
* so hard-code Freescale OUI (00:04:9f) here. * so hard-code Freescale OUI (00:04:9f) here.
*/ */
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
val = ocotp[i * 4]; val = ocotp[i];
mx28_fec_pdata[i].mac[0] = 0x00; mx28_fec_pdata[i].mac[0] = 0x00;
mx28_fec_pdata[i].mac[1] = 0x04; mx28_fec_pdata[i].mac[1] = 0x04;
mx28_fec_pdata[i].mac[2] = 0x9f; mx28_fec_pdata[i].mac[2] = 0x9f;
...@@ -295,10 +269,6 @@ static int __init mx28evk_fec_get_mac(void) ...@@ -295,10 +269,6 @@ static int __init mx28evk_fec_get_mac(void)
} }
return 0; return 0;
error:
pr_err("%s: timeout when reading fec mac from OCOTP\n", __func__);
return -ETIMEDOUT;
} }
/* /*
...@@ -417,9 +387,14 @@ static void __init mx28evk_add_regulators(void) ...@@ -417,9 +387,14 @@ static void __init mx28evk_add_regulators(void)
static void __init mx28evk_add_regulators(void) {} static void __init mx28evk_add_regulators(void) {}
#endif #endif
static struct gpio mx28evk_lcd_gpios[] = { static const struct gpio mx28evk_gpios[] __initconst = {
{ MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" }, { MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" },
{ MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" }, { MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" },
{ MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT, "flexcan-switch" },
{ MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW, "mmc0-slot-power" },
{ MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW, "mmc1-slot-power" },
{ MX28EVK_FEC_PHY_POWER, GPIOF_OUT_INIT_LOW, "fec-phy-power" },
{ MX28EVK_FEC_PHY_RESET, GPIOF_DIR_OUT, "fec-phy-reset" },
}; };
static const struct mxs_saif_platform_data static const struct mxs_saif_platform_data
...@@ -447,24 +422,17 @@ static void __init mx28evk_init(void) ...@@ -447,24 +422,17 @@ static void __init mx28evk_init(void)
if (mx28evk_fec_get_mac()) if (mx28evk_fec_get_mac())
pr_warn("%s: failed on fec mac setup\n", __func__); pr_warn("%s: failed on fec mac setup\n", __func__);
ret = gpio_request_array(mx28evk_gpios, ARRAY_SIZE(mx28evk_gpios));
if (ret)
pr_err("One or more GPIOs failed to be requested: %d\n", ret);
mx28evk_fec_reset(); mx28evk_fec_reset();
mx28_add_fec(0, &mx28_fec_pdata[0]); mx28_add_fec(0, &mx28_fec_pdata[0]);
mx28_add_fec(1, &mx28_fec_pdata[1]); mx28_add_fec(1, &mx28_fec_pdata[1]);
ret = gpio_request_one(MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT,
"flexcan-switch");
if (ret) {
pr_err("failed to request gpio flexcan-switch: %d\n", ret);
} else {
mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]); mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]);
mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]); mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
}
ret = gpio_request_array(mx28evk_lcd_gpios,
ARRAY_SIZE(mx28evk_lcd_gpios));
if (ret)
pr_warn("failed to request gpio pins for lcd: %d\n", ret);
else
mx28_add_mxsfb(&mx28evk_mxsfb_pdata); mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0); mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
...@@ -480,19 +448,7 @@ static void __init mx28evk_init(void) ...@@ -480,19 +448,7 @@ static void __init mx28evk_init(void)
mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0, mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0,
NULL, 0); NULL, 0);
/* power on mmc slot by writing 0 to the gpio */
ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
"mmc0-slot-power");
if (ret)
pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret);
else
mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]); mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);
ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW,
"mmc1-slot-power");
if (ret)
pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret);
else
mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
mx28_add_rtc_stmp3xxx(); mx28_add_rtc_stmp3xxx();
......
...@@ -152,6 +152,10 @@ config MACH_AMS_DELTA ...@@ -152,6 +152,10 @@ config MACH_AMS_DELTA
bool "Amstrad E3 (Delta)" bool "Amstrad E3 (Delta)"
depends on ARCH_OMAP1 && ARCH_OMAP15XX depends on ARCH_OMAP1 && ARCH_OMAP15XX
select FIQ select FIQ
select GPIO_GENERIC_PLATFORM
select LEDS_GPIO_REGISTER
select REGULATOR
select REGULATOR_FIXED_VOLTAGE
help help
Support for the Amstrad E3 (codename Delta) videophone. Say Y here Support for the Amstrad E3 (codename Delta) videophone. Say Y here
if you have such a device. if you have such a device.
......
This diff is collapsed.
...@@ -245,10 +245,11 @@ config MACH_NOKIA_N8X0 ...@@ -245,10 +245,11 @@ config MACH_NOKIA_N8X0
select MACH_NOKIA_N810_WIMAX select MACH_NOKIA_N810_WIMAX
config MACH_NOKIA_RM680 config MACH_NOKIA_RM680
bool "Nokia RM-680 board" bool "Nokia RM-680/696 board"
depends on ARCH_OMAP3 depends on ARCH_OMAP3
default y default y
select OMAP_PACKAGE_CBB select OMAP_PACKAGE_CBB
select MACH_NOKIA_RM696
config MACH_NOKIA_RX51 config MACH_NOKIA_RX51
bool "Nokia RX-51 board" bool "Nokia RX-51 board"
......
...@@ -270,4 +270,7 @@ ifneq ($(CONFIG_HWSPINLOCK_OMAP),) ...@@ -270,4 +270,7 @@ ifneq ($(CONFIG_HWSPINLOCK_OMAP),)
obj-y += hwspinlock.o obj-y += hwspinlock.o
endif endif
emac-$(CONFIG_TI_DAVINCI_EMAC) := am35xx-emac.o
obj-y += $(emac-m) $(emac-y)
obj-y += common-board-devices.o twl-common.o obj-y += common-board-devices.o twl-common.o
/*
* Copyright (C) 2011 Ilya Yanok, Emcraft Systems
*
* Based on mach-omap2/board-am3517evm.c
* Copyright (C) 2009 Texas Instruments Incorporated
* Author: Ranjith Lohithakshan <ranjithl@ti.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* published by the Free Software Foundation.
*
* This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
* whether express or implied; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#include <linux/clk.h>
#include <linux/davinci_emac.h>
#include <linux/platform_device.h>
#include <plat/irqs.h>
#include <mach/am35xx.h>
#include "control.h"
static struct mdio_platform_data am35xx_emac_mdio_pdata;
static struct resource am35xx_emac_mdio_resources[] = {
DEFINE_RES_MEM(AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET, SZ_4K),
};
static struct platform_device am35xx_emac_mdio_device = {
.name = "davinci_mdio",
.id = 0,
.num_resources = ARRAY_SIZE(am35xx_emac_mdio_resources),
.resource = am35xx_emac_mdio_resources,
.dev.platform_data = &am35xx_emac_mdio_pdata,
};
static void am35xx_enable_emac_int(void)
{
u32 regval;
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
AM35XX_CPGMAC_C0_TX_PULSE_CLR |
AM35XX_CPGMAC_C0_MISC_PULSE_CLR |
AM35XX_CPGMAC_C0_RX_THRESH_CLR);
omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
}
static void am35xx_disable_emac_int(void)
{
u32 regval;
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
AM35XX_CPGMAC_C0_TX_PULSE_CLR);
omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
}
static struct emac_platform_data am35xx_emac_pdata = {
.ctrl_reg_offset = AM35XX_EMAC_CNTRL_OFFSET,
.ctrl_mod_reg_offset = AM35XX_EMAC_CNTRL_MOD_OFFSET,
.ctrl_ram_offset = AM35XX_EMAC_CNTRL_RAM_OFFSET,
.ctrl_ram_size = AM35XX_EMAC_CNTRL_RAM_SIZE,
.hw_ram_addr = AM35XX_EMAC_HW_RAM_ADDR,
.version = EMAC_VERSION_2,
.interrupt_enable = am35xx_enable_emac_int,
.interrupt_disable = am35xx_disable_emac_int,
};
static struct resource am35xx_emac_resources[] = {
DEFINE_RES_MEM(AM35XX_IPSS_EMAC_BASE, 0x30000),
DEFINE_RES_IRQ(INT_35XX_EMAC_C0_RXTHRESH_IRQ),
DEFINE_RES_IRQ(INT_35XX_EMAC_C0_RX_PULSE_IRQ),
DEFINE_RES_IRQ(INT_35XX_EMAC_C0_TX_PULSE_IRQ),
DEFINE_RES_IRQ(INT_35XX_EMAC_C0_MISC_PULSE_IRQ),
};
static struct platform_device am35xx_emac_device = {
.name = "davinci_emac",
.id = -1,
.num_resources = ARRAY_SIZE(am35xx_emac_resources),
.resource = am35xx_emac_resources,
.dev = {
.platform_data = &am35xx_emac_pdata,
},
};
void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)
{
unsigned int regval;
int err;
am35xx_emac_pdata.rmii_en = rmii_en;
am35xx_emac_mdio_pdata.bus_freq = mdio_bus_freq;
err = platform_device_register(&am35xx_emac_device);
if (err) {
pr_err("AM35x: failed registering EMAC device: %d\n", err);
return;
}
err = platform_device_register(&am35xx_emac_mdio_device);
if (err) {
pr_err("AM35x: failed registering EMAC MDIO device: %d\n", err);
platform_device_unregister(&am35xx_emac_device);
return;
}
regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
regval = regval & (~(AM35XX_CPGMACSS_SW_RST));
omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);
regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
}
/*
* Copyright (C) 2011 Ilya Yanok, Emcraft Systems
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#define AM35XX_DEFAULT_MDIO_FREQUENCY 1000000
#if defined(CONFIG_TI_DAVINCI_EMAC) || defined(CONFIG_TI_DAVINCI_EMAC_MODULE)
void am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en);
#else
static inline void am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) {}
#endif
...@@ -324,7 +324,10 @@ static struct spi_board_info sdp4430_spi_board_info[] __initdata = { ...@@ -324,7 +324,10 @@ static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
.bus_num = 1, .bus_num = 1,
.chip_select = 0, .chip_select = 0,
.max_speed_hz = 24000000, .max_speed_hz = 24000000,
.irq = ETH_KS8851_IRQ, /*
* .irq is set to gpio_to_irq(ETH_KS8851_IRQ)
* in omap_4430sdp_init
*/
}, },
}; };
......
...@@ -39,124 +39,11 @@ ...@@ -39,124 +39,11 @@
#include <video/omap-panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-dvi.h> #include <video/omap-panel-dvi.h>
#include "am35xx-emac.h"
#include "mux.h" #include "mux.h"
#include "control.h" #include "control.h"
#include "hsmmc.h" #include "hsmmc.h"
#define AM35XX_EVM_MDIO_FREQUENCY (1000000)
static struct mdio_platform_data am3517_evm_mdio_pdata = {
.bus_freq = AM35XX_EVM_MDIO_FREQUENCY,
};
static struct resource am3517_mdio_resources[] = {
{
.start = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET,
.end = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET +
SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
};
static struct platform_device am3517_mdio_device = {
.name = "davinci_mdio",
.id = 0,
.num_resources = ARRAY_SIZE(am3517_mdio_resources),
.resource = am3517_mdio_resources,
.dev.platform_data = &am3517_evm_mdio_pdata,
};
static struct emac_platform_data am3517_evm_emac_pdata = {
.rmii_en = 1,
};
static struct resource am3517_emac_resources[] = {
{
.start = AM35XX_IPSS_EMAC_BASE,
.end = AM35XX_IPSS_EMAC_BASE + 0x2FFFF,
.flags = IORESOURCE_MEM,
},
{
.start = INT_35XX_EMAC_C0_RXTHRESH_IRQ,
.end = INT_35XX_EMAC_C0_RXTHRESH_IRQ,
.flags = IORESOURCE_IRQ,
},
{
.start = INT_35XX_EMAC_C0_RX_PULSE_IRQ,
.end = INT_35XX_EMAC_C0_RX_PULSE_IRQ,
.flags = IORESOURCE_IRQ,
},
{
.start = INT_35XX_EMAC_C0_TX_PULSE_IRQ,
.end = INT_35XX_EMAC_C0_TX_PULSE_IRQ,
.flags = IORESOURCE_IRQ,
},
{
.start = INT_35XX_EMAC_C0_MISC_PULSE_IRQ,
.end = INT_35XX_EMAC_C0_MISC_PULSE_IRQ,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device am3517_emac_device = {
.name = "davinci_emac",
.id = -1,
.num_resources = ARRAY_SIZE(am3517_emac_resources),
.resource = am3517_emac_resources,
};
static void am3517_enable_ethernet_int(void)
{
u32 regval;
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
AM35XX_CPGMAC_C0_TX_PULSE_CLR |
AM35XX_CPGMAC_C0_MISC_PULSE_CLR |
AM35XX_CPGMAC_C0_RX_THRESH_CLR);
omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
}
static void am3517_disable_ethernet_int(void)
{
u32 regval;
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
AM35XX_CPGMAC_C0_TX_PULSE_CLR);
omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
}
static void am3517_evm_ethernet_init(struct emac_platform_data *pdata)
{
unsigned int regval;
pdata->ctrl_reg_offset = AM35XX_EMAC_CNTRL_OFFSET;
pdata->ctrl_mod_reg_offset = AM35XX_EMAC_CNTRL_MOD_OFFSET;
pdata->ctrl_ram_offset = AM35XX_EMAC_CNTRL_RAM_OFFSET;
pdata->ctrl_ram_size = AM35XX_EMAC_CNTRL_RAM_SIZE;
pdata->version = EMAC_VERSION_2;
pdata->hw_ram_addr = AM35XX_EMAC_HW_RAM_ADDR;
pdata->interrupt_enable = am3517_enable_ethernet_int;
pdata->interrupt_disable = am3517_disable_ethernet_int;
am3517_emac_device.dev.platform_data = pdata;
platform_device_register(&am3517_emac_device);
platform_device_register(&am3517_mdio_device);
clk_add_alias(NULL, dev_name(&am3517_mdio_device.dev),
NULL, &am3517_emac_device.dev);
regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
regval = regval & (~(AM35XX_CPGMACSS_SW_RST));
omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);
regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
return ;
}
#define LCD_PANEL_PWR 176 #define LCD_PANEL_PWR 176
#define LCD_PANEL_BKLIGHT_PWR 182 #define LCD_PANEL_BKLIGHT_PWR 182
#define LCD_PANEL_PWM 181 #define LCD_PANEL_PWM 181
...@@ -498,7 +385,7 @@ static void __init am3517_evm_init(void) ...@@ -498,7 +385,7 @@ static void __init am3517_evm_init(void)
i2c_register_board_info(1, am3517evm_i2c1_boardinfo, i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
ARRAY_SIZE(am3517evm_i2c1_boardinfo)); ARRAY_SIZE(am3517evm_i2c1_boardinfo));
/*Ethernet*/ /*Ethernet*/
am3517_evm_ethernet_init(&am3517_evm_emac_pdata); am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
/* MUSB */ /* MUSB */
am3517_evm_musb_init(); am3517_evm_musb_init();
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "mux.h" #include "mux.h"
#include "control.h" #include "control.h"
#include "common-board-devices.h" #include "common-board-devices.h"
#include "am35xx-emac.h"
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
static struct gpio_led cm_t3517_leds[] = { static struct gpio_led cm_t3517_leds[] = {
...@@ -291,6 +292,7 @@ static void __init cm_t3517_init(void) ...@@ -291,6 +292,7 @@ static void __init cm_t3517_init(void)
cm_t3517_init_rtc(); cm_t3517_init_rtc();
cm_t3517_init_usbh(); cm_t3517_init_usbh();
cm_t3517_init_hecc(); cm_t3517_init_hecc();
am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
} }
MACHINE_START(CM_T3517, "Compulab CM-T3517") MACHINE_START(CM_T3517, "Compulab CM-T3517")
......
...@@ -205,6 +205,7 @@ static void __init omap3logic_init(void) ...@@ -205,6 +205,7 @@ static void __init omap3logic_init(void)
MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap35xx_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
...@@ -216,6 +217,7 @@ MACHINE_END ...@@ -216,6 +217,7 @@ MACHINE_END
MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap35xx_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
......
...@@ -121,6 +121,11 @@ static struct platform_device pandora_leds_gpio = { ...@@ -121,6 +121,11 @@ static struct platform_device pandora_leds_gpio = {
}, },
}; };
static struct platform_device pandora_backlight = {
.name = "pandora-backlight",
.id = -1,
};
#define GPIO_BUTTON(gpio_num, ev_type, ev_code, act_low, descr) \ #define GPIO_BUTTON(gpio_num, ev_type, ev_code, act_low, descr) \
{ \ { \
.gpio = gpio_num, \ .gpio = gpio_num, \
...@@ -478,6 +483,10 @@ static struct platform_device pandora_vwlan_device = { ...@@ -478,6 +483,10 @@ static struct platform_device pandora_vwlan_device = {
static struct twl4030_bci_platform_data pandora_bci_data; static struct twl4030_bci_platform_data pandora_bci_data;
static struct twl4030_power_data pandora_power_data = {
.use_poweroff = true,
};
static struct twl4030_platform_data omap3pandora_twldata = { static struct twl4030_platform_data omap3pandora_twldata = {
.gpio = &omap3pandora_gpio_data, .gpio = &omap3pandora_gpio_data,
.vmmc1 = &pandora_vmmc1, .vmmc1 = &pandora_vmmc1,
...@@ -488,6 +497,7 @@ static struct twl4030_platform_data omap3pandora_twldata = { ...@@ -488,6 +497,7 @@ static struct twl4030_platform_data omap3pandora_twldata = {
.vsim = &pandora_vsim, .vsim = &pandora_vsim,
.keypad = &pandora_kp_data, .keypad = &pandora_kp_data,
.bci = &pandora_bci_data, .bci = &pandora_bci_data,
.power = &pandora_power_data,
}; };
static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = { static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
...@@ -559,6 +569,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { ...@@ -559,6 +569,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
&pandora_leds_gpio, &pandora_leds_gpio,
&pandora_keys_gpio, &pandora_keys_gpio,
&pandora_vwlan_device, &pandora_vwlan_device,
&pandora_backlight,
}; };
static const struct usbhs_omap_board_data usbhs_bdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
......
...@@ -116,10 +116,16 @@ static struct platform_device panda_abe_audio = { ...@@ -116,10 +116,16 @@ static struct platform_device panda_abe_audio = {
}, },
}; };
static struct platform_device btwilink_device = {
.name = "btwilink",
.id = -1,
};
static struct platform_device *panda_devices[] __initdata = { static struct platform_device *panda_devices[] __initdata = {
&leds_gpio, &leds_gpio,
&wl1271_device, &wl1271_device,
&panda_abe_audio, &panda_abe_audio,
&btwilink_device,
}; };
static const struct usbhs_omap_board_data usbhs_bdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
......
/* /*
* Board support file for Nokia RM-680. * Board support file for Nokia RM-680/696.
* *
* Copyright (C) 2010 Nokia * Copyright (C) 2010 Nokia
* *
...@@ -154,3 +154,15 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") ...@@ -154,3 +154,15 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
.timer = &omap3_timer, .timer = &omap3_timer,
.restart = omap_prcm_restart, .restart = omap_prcm_restart,
MACHINE_END MACHINE_END
MACHINE_START(NOKIA_RM696, "Nokia RM-696 board")
.atag_offset = 0x100,
.reserve = omap_reserve,
.map_io = omap3_map_io,
.init_early = omap3630_init_early,
.init_irq = omap3_init_irq,
.handle_irq = omap3_intc_handle_irq,
.init_machine = rm680_init,
.timer = &omap3_timer,
.restart = omap_prcm_restart,
MACHINE_END
...@@ -1102,6 +1102,11 @@ static struct tsc2005_platform_data tsc2005_pdata = { ...@@ -1102,6 +1102,11 @@ static struct tsc2005_platform_data tsc2005_pdata = {
.esd_timeout_ms = 8000, .esd_timeout_ms = 8000,
}; };
static struct gpio rx51_tsc2005_gpios[] __initdata = {
{ RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ" },
{ RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "tsc2005 reset" },
};
static void rx51_tsc2005_set_reset(bool enable) static void rx51_tsc2005_set_reset(bool enable)
{ {
gpio_set_value(RX51_TSC2005_RESET_GPIO, enable); gpio_set_value(RX51_TSC2005_RESET_GPIO, enable);
...@@ -1111,20 +1116,18 @@ static void __init rx51_init_tsc2005(void) ...@@ -1111,20 +1116,18 @@ static void __init rx51_init_tsc2005(void)
{ {
int r; int r;
r = gpio_request_one(RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ"); omap_mux_init_gpio(RX51_TSC2005_RESET_GPIO, OMAP_PIN_OUTPUT);
omap_mux_init_gpio(RX51_TSC2005_IRQ_GPIO, OMAP_PIN_INPUT_PULLUP);
r = gpio_request_array(rx51_tsc2005_gpios,
ARRAY_SIZE(rx51_tsc2005_gpios));
if (r < 0) { if (r < 0) {
printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 IRQ"); printk(KERN_ERR "tsc2005 board initialization failed\n");
rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq = 0; tsc2005_pdata.esd_timeout_ms = 0;
return;
} }
r = gpio_request_one(RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH,
"tsc2005 reset");
if (r >= 0) {
tsc2005_pdata.set_reset = rx51_tsc2005_set_reset; tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
} else {
printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 reset");
tsc2005_pdata.esd_timeout_ms = 0;
}
} }
void __init rx51_peripherals_init(void) void __init rx51_peripherals_init(void)
......
...@@ -97,9 +97,9 @@ static unsigned long hx4700_pin_config[] __initdata = { ...@@ -97,9 +97,9 @@ static unsigned long hx4700_pin_config[] __initdata = {
/* BTUART */ /* BTUART */
GPIO42_BTUART_RXD, GPIO42_BTUART_RXD,
GPIO43_BTUART_TXD, GPIO43_BTUART_TXD_LPM_LOW,
GPIO44_BTUART_CTS, GPIO44_BTUART_CTS,
GPIO45_BTUART_RTS, GPIO45_BTUART_RTS_LPM_LOW,
/* PWM 1 (Backlight) */ /* PWM 1 (Backlight) */
GPIO17_PWM1_OUT, GPIO17_PWM1_OUT,
...@@ -245,6 +245,21 @@ static u16 asic3_gpio_config[] = { ...@@ -245,6 +245,21 @@ static u16 asic3_gpio_config[] = {
ASIC3_GPIOD15_nPIOW, ASIC3_GPIOD15_nPIOW,
}; };
static struct asic3_led asic3_leds[ASIC3_NUM_LEDS] = {
[0] = {
.name = "hx4700:amber",
.default_trigger = "ds2760-battery.0-charging-blink-full-solid",
},
[1] = {
.name = "hx4700:green",
.default_trigger = "unused",
},
[2] = {
.name = "hx4700:blue",
.default_trigger = "hx4700-radio",
},
};
static struct resource asic3_resources[] = { static struct resource asic3_resources[] = {
/* GPIO part */ /* GPIO part */
[0] = { [0] = {
...@@ -275,6 +290,7 @@ static struct asic3_platform_data asic3_platform_data = { ...@@ -275,6 +290,7 @@ static struct asic3_platform_data asic3_platform_data = {
.gpio_config_num = ARRAY_SIZE(asic3_gpio_config), .gpio_config_num = ARRAY_SIZE(asic3_gpio_config),
.irq_base = IRQ_BOARD_START, .irq_base = IRQ_BOARD_START,
.gpio_base = HX4700_ASIC3_GPIO_BASE, .gpio_base = HX4700_ASIC3_GPIO_BASE,
.leds = asic3_leds,
}; };
static struct platform_device asic3 = { static struct platform_device asic3 = {
...@@ -705,10 +721,9 @@ static void hx4700_set_vpp(struct platform_device *pdev, int vpp) ...@@ -705,10 +721,9 @@ static void hx4700_set_vpp(struct platform_device *pdev, int vpp)
gpio_set_value(GPIO91_HX4700_FLASH_VPEN, vpp); gpio_set_value(GPIO91_HX4700_FLASH_VPEN, vpp);
} }
static struct resource strataflash_resource = { static struct resource strataflash_resource[] = {
.start = PXA_CS0_PHYS, [0] = DEFINE_RES_MEM(PXA_CS0_PHYS, SZ_64M),
.end = PXA_CS0_PHYS + SZ_128M - 1, [1] = DEFINE_RES_MEM(PXA_CS0_PHYS + SZ_64M, SZ_64M),
.flags = IORESOURCE_MEM,
}; };
static struct physmap_flash_data strataflash_data = { static struct physmap_flash_data strataflash_data = {
...@@ -719,8 +734,8 @@ static struct physmap_flash_data strataflash_data = { ...@@ -719,8 +734,8 @@ static struct physmap_flash_data strataflash_data = {
static struct platform_device strataflash = { static struct platform_device strataflash = {
.name = "physmap-flash", .name = "physmap-flash",
.id = -1, .id = -1,
.resource = &strataflash_resource, .resource = strataflash_resource,
.num_resources = 1, .num_resources = ARRAY_SIZE(strataflash_resource),
.dev = { .dev = {
.platform_data = &strataflash_data, .platform_data = &strataflash_data,
}, },
...@@ -787,17 +802,6 @@ static struct platform_device audio = { ...@@ -787,17 +802,6 @@ static struct platform_device audio = {
}; };
/*
* PCMCIA
*/
static struct platform_device pcmcia = {
.name = "hx4700-pcmcia",
.dev = {
.parent = &asic3.dev,
},
};
/* /*
* Platform devices * Platform devices
*/ */
...@@ -814,7 +818,6 @@ static struct platform_device *devices[] __initdata = { ...@@ -814,7 +818,6 @@ static struct platform_device *devices[] __initdata = {
&power_supply, &power_supply,
&strataflash, &strataflash,
&audio, &audio,
&pcmcia,
}; };
static struct gpio global_gpios[] = { static struct gpio global_gpios[] = {
...@@ -830,7 +833,6 @@ static struct gpio global_gpios[] = { ...@@ -830,7 +833,6 @@ static struct gpio global_gpios[] = {
{ GPIO32_HX4700_RS232_ON, GPIOF_OUT_INIT_HIGH, "RS232_ON" }, { GPIO32_HX4700_RS232_ON, GPIOF_OUT_INIT_HIGH, "RS232_ON" },
{ GPIO71_HX4700_ASIC3_nRESET, GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" }, { GPIO71_HX4700_ASIC3_nRESET, GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" },
{ GPIO82_HX4700_EUART_RESET, GPIOF_OUT_INIT_HIGH, "EUART_RESET" }, { GPIO82_HX4700_EUART_RESET, GPIOF_OUT_INIT_HIGH, "EUART_RESET" },
{ GPIO105_HX4700_nIR_ON, GPIOF_OUT_INIT_HIGH, "nIR_EN" },
}; };
static void __init hx4700_init(void) static void __init hx4700_init(void)
......
...@@ -158,7 +158,9 @@ ...@@ -158,7 +158,9 @@
#define GPIO44_BTUART_CTS MFP_CFG_IN(GPIO44, AF1) #define GPIO44_BTUART_CTS MFP_CFG_IN(GPIO44, AF1)
#define GPIO42_BTUART_RXD MFP_CFG_IN(GPIO42, AF1) #define GPIO42_BTUART_RXD MFP_CFG_IN(GPIO42, AF1)
#define GPIO45_BTUART_RTS MFP_CFG_OUT(GPIO45, AF2, DRIVE_HIGH) #define GPIO45_BTUART_RTS MFP_CFG_OUT(GPIO45, AF2, DRIVE_HIGH)
#define GPIO45_BTUART_RTS_LPM_LOW MFP_CFG_OUT(GPIO45, AF2, DRIVE_LOW)
#define GPIO43_BTUART_TXD MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH) #define GPIO43_BTUART_TXD MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)
#define GPIO43_BTUART_TXD_LPM_LOW MFP_CFG_OUT(GPIO43, AF2, DRIVE_LOW)
/* STUART */ /* STUART */
#define GPIO46_STUART_RXD MFP_CFG_IN(GPIO46, AF2) #define GPIO46_STUART_RXD MFP_CFG_IN(GPIO46, AF2)
......
...@@ -304,5 +304,6 @@ config MACH_WLF_CRAGG_6410 ...@@ -304,5 +304,6 @@ config MACH_WLF_CRAGG_6410
select S3C64XX_DEV_SPI0 select S3C64XX_DEV_SPI0
select SAMSUNG_GPIO_EXTRA128 select SAMSUNG_GPIO_EXTRA128
select I2C select I2C
select LEDS_GPIO_REGISTER
help help
Machine support for the Wolfson Cragganmore S3C6410 variant. Machine support for the Wolfson Cragganmore S3C6410 variant.
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/export.h> #include <linux/export.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/spi/spi.h>
#include <linux/mfd/wm831x/irq.h> #include <linux/mfd/wm831x/irq.h>
#include <linux/mfd/wm831x/gpio.h> #include <linux/mfd/wm831x/gpio.h>
...@@ -21,8 +22,25 @@ ...@@ -21,8 +22,25 @@
#include <sound/wm8962.h> #include <sound/wm8962.h>
#include <sound/wm9081.h> #include <sound/wm9081.h>
#include <plat/s3c64xx-spi.h>
#include <mach/crag6410.h> #include <mach/crag6410.h>
static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = {
.set_level = gpio_set_value,
.line = S3C64XX_GPC(3),
};
static struct spi_board_info wm1253_devs[] = {
[0] = {
.modalias = "wm0010",
.bus_num = 0,
.chip_select = 0,
.mode = SPI_MODE_0,
.controller_data = &wm0010_spi_csinfo,
},
};
static struct wm5100_pdata wm5100_pdata = { static struct wm5100_pdata wm5100_pdata = {
.ldo_ena = S3C64XX_GPN(7), .ldo_ena = S3C64XX_GPN(7),
.irq_flags = IRQF_TRIGGER_HIGH, .irq_flags = IRQF_TRIGGER_HIGH,
...@@ -159,14 +177,21 @@ static __devinitdata const struct { ...@@ -159,14 +177,21 @@ static __devinitdata const struct {
const char *name; const char *name;
const struct i2c_board_info *i2c_devs; const struct i2c_board_info *i2c_devs;
int num_i2c_devs; int num_i2c_devs;
const struct spi_board_info *spi_devs;
int num_spi_devs;
} gf_mods[] = { } gf_mods[] = {
{ .id = 0x01, .name = "1250-EV1 Springbank" }, { .id = 0x01, .name = "1250-EV1 Springbank" },
{ .id = 0x02, .name = "1251-EV1 Jura" }, { .id = 0x02, .name = "1251-EV1 Jura" },
{ .id = 0x03, .name = "1252-EV1 Glenlivet" }, { .id = 0x03, .name = "1252-EV1 Glenlivet" },
{ .id = 0x11, .name = "6249-EV2 Glenfarclas", }, { .id = 0x11, .name = "6249-EV2 Glenfarclas", },
{ .id = 0x14, .name = "6271-EV1 Lochnagar" },
{ .id = 0x15, .name = "XXXX-EV1 Bells" },
{ .id = 0x21, .name = "1275-EV1 Mortlach" }, { .id = 0x21, .name = "1275-EV1 Mortlach" },
{ .id = 0x25, .name = "1274-EV1 Glencadam" }, { .id = 0x25, .name = "1274-EV1 Glencadam" },
{ .id = 0x31, .name = "1253-EV1 Tomatin", }, { .id = 0x31, .name = "1253-EV1 Tomatin",
.spi_devs = wm1253_devs, .num_spi_devs = ARRAY_SIZE(wm1253_devs) },
{ .id = 0x32, .name = "XXXX-EV1 Caol Illa" },
{ .id = 0x33, .name = "XXXX-EV1 Oban" },
{ .id = 0x39, .name = "1254-EV1 Dallas Dhu", { .id = 0x39, .name = "1254-EV1 Dallas Dhu",
.i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) }, .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) },
{ .id = 0x3a, .name = "1259-EV1 Tobermory", { .id = 0x3a, .name = "1259-EV1 Tobermory",
...@@ -198,12 +223,16 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, ...@@ -198,12 +223,16 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
if (i < ARRAY_SIZE(gf_mods)) { if (i < ARRAY_SIZE(gf_mods)) {
dev_info(&i2c->dev, "%s revision %d\n", dev_info(&i2c->dev, "%s revision %d\n",
gf_mods[i].name, rev + 1); gf_mods[i].name, rev + 1);
for (j = 0; j < gf_mods[i].num_i2c_devs; j++) { for (j = 0; j < gf_mods[i].num_i2c_devs; j++) {
if (!i2c_new_device(i2c->adapter, if (!i2c_new_device(i2c->adapter,
&(gf_mods[i].i2c_devs[j]))) &(gf_mods[i].i2c_devs[j])))
dev_err(&i2c->dev, dev_err(&i2c->dev,
"Failed to register dev: %d\n", ret); "Failed to register dev: %d\n", ret);
} }
spi_register_board_info(gf_mods[i].spi_devs,
gf_mods[i].num_spi_devs);
} else { } else {
dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n", dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n",
id, rev + 1); id, rev + 1);
......
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/mmc/host.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h> #include <linux/regulator/fixed.h>
#include <linux/pwm_backlight.h> #include <linux/pwm_backlight.h>
...@@ -299,6 +301,7 @@ static struct platform_device littlemill_device = { ...@@ -299,6 +301,7 @@ static struct platform_device littlemill_device = {
}; };
static struct regulator_consumer_supply wallvdd_consumers[] = { static struct regulator_consumer_supply wallvdd_consumers[] = {
REGULATOR_SUPPLY("SPKVDD", "1-001a"),
REGULATOR_SUPPLY("SPKVDD1", "1-001a"), REGULATOR_SUPPLY("SPKVDD1", "1-001a"),
REGULATOR_SUPPLY("SPKVDD2", "1-001a"), REGULATOR_SUPPLY("SPKVDD2", "1-001a"),
REGULATOR_SUPPLY("SPKVDDL", "1-001a"), REGULATOR_SUPPLY("SPKVDDL", "1-001a"),
...@@ -575,11 +578,19 @@ static struct s3c2410_platform_i2c i2c0_pdata = { ...@@ -575,11 +578,19 @@ static struct s3c2410_platform_i2c i2c0_pdata = {
.frequency = 400000, .frequency = 400000,
}; };
static struct regulator_consumer_supply pvdd_1v2_consumers[] __initdata = {
REGULATOR_SUPPLY("DCVDD", "spi0.0"),
REGULATOR_SUPPLY("AVDD", "spi0.0"),
};
static struct regulator_init_data pvdd_1v2 __initdata = { static struct regulator_init_data pvdd_1v2 __initdata = {
.constraints = { .constraints = {
.name = "PVDD_1V2", .name = "PVDD_1V2",
.always_on = 1, .valid_ops_mask = REGULATOR_CHANGE_STATUS,
}, },
.consumer_supplies = pvdd_1v2_consumers,
.num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers),
}; };
static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = {
...@@ -593,6 +604,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { ...@@ -593,6 +604,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = {
REGULATOR_SUPPLY("AVDD2", "1-001a"), REGULATOR_SUPPLY("AVDD2", "1-001a"),
REGULATOR_SUPPLY("DCVDD", "1-001a"), REGULATOR_SUPPLY("DCVDD", "1-001a"),
REGULATOR_SUPPLY("AVDD", "1-001a"), REGULATOR_SUPPLY("AVDD", "1-001a"),
REGULATOR_SUPPLY("DBVDD", "spi0.0"),
}; };
static struct regulator_init_data pvdd_1v8 __initdata = { static struct regulator_init_data pvdd_1v8 __initdata = {
...@@ -682,6 +694,7 @@ static void __init crag6410_map_io(void) ...@@ -682,6 +694,7 @@ static void __init crag6410_map_io(void)
static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = { static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = {
.max_width = 4, .max_width = 4,
.cd_type = S3C_SDHCI_CD_PERMANENT, .cd_type = S3C_SDHCI_CD_PERMANENT,
.host_caps = MMC_CAP_POWER_OFF_CARD,
}; };
static void crag6410_cfg_sdhci0(struct platform_device *dev, int width) static void crag6410_cfg_sdhci0(struct platform_device *dev, int width)
...@@ -697,6 +710,55 @@ static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = { ...@@ -697,6 +710,55 @@ static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = {
.max_width = 4, .max_width = 4,
.cd_type = S3C_SDHCI_CD_INTERNAL, .cd_type = S3C_SDHCI_CD_INTERNAL,
.cfg_gpio = crag6410_cfg_sdhci0, .cfg_gpio = crag6410_cfg_sdhci0,
.host_caps = MMC_CAP_POWER_OFF_CARD,
};
static const struct gpio_led gpio_leds[] = {
{
.name = "d13:green:",
.gpio = MMGPIO_GPIO_BASE + 0,
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
{
.name = "d14:green:",
.gpio = MMGPIO_GPIO_BASE + 1,
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
{
.name = "d15:green:",
.gpio = MMGPIO_GPIO_BASE + 2,
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
{
.name = "d16:green:",
.gpio = MMGPIO_GPIO_BASE + 3,
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
{
.name = "d17:green:",
.gpio = MMGPIO_GPIO_BASE + 4,
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
{
.name = "d18:green:",
.gpio = MMGPIO_GPIO_BASE + 5,
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
{
.name = "d19:green:",
.gpio = MMGPIO_GPIO_BASE + 6,
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
{
.name = "d20:green:",
.gpio = MMGPIO_GPIO_BASE + 7,
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
};
static const struct gpio_led_platform_data gpio_leds_pdata = {
.leds = gpio_leds,
.num_leds = ARRAY_SIZE(gpio_leds),
}; };
static struct s3c_hsotg_plat crag6410_hsotg_pdata; static struct s3c_hsotg_plat crag6410_hsotg_pdata;
...@@ -731,9 +793,12 @@ static void __init crag6410_machine_init(void) ...@@ -731,9 +793,12 @@ static void __init crag6410_machine_init(void)
i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
samsung_keypad_set_platdata(&crag6410_keypad_data); samsung_keypad_set_platdata(&crag6410_keypad_data);
s3c64xx_spi0_set_platdata(&s3c64xx_spi0_pdata, 0, 1);
platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices)); platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));
gpio_led_register_device(-1, &gpio_leds_pdata);
regulator_has_full_constraints(); regulator_has_full_constraints();
s3c64xx_pm_init(); s3c64xx_pm_init();
......
...@@ -124,6 +124,10 @@ config MACH_SMDKC110 ...@@ -124,6 +124,10 @@ config MACH_SMDKC110
select S3C_DEV_I2C2 select S3C_DEV_I2C2
select S3C_DEV_RTC select S3C_DEV_RTC
select S3C_DEV_WDT select S3C_DEV_WDT
select S5P_DEV_FIMC0
select S5P_DEV_FIMC1
select S5P_DEV_FIMC2
select S5P_DEV_MFC
select SAMSUNG_DEV_IDE select SAMSUNG_DEV_IDE
select S5PV210_SETUP_I2C1 select S5PV210_SETUP_I2C1
select S5PV210_SETUP_I2C2 select S5PV210_SETUP_I2C2
...@@ -148,6 +152,11 @@ config MACH_SMDKV210 ...@@ -148,6 +152,11 @@ config MACH_SMDKV210
select S3C_DEV_I2C2 select S3C_DEV_I2C2
select S3C_DEV_RTC select S3C_DEV_RTC
select S3C_DEV_WDT select S3C_DEV_WDT
select S5P_DEV_FIMC0
select S5P_DEV_FIMC1
select S5P_DEV_FIMC2
select S5P_DEV_JPEG
select S5P_DEV_MFC
select SAMSUNG_DEV_ADC select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_IDE select SAMSUNG_DEV_IDE
......
...@@ -339,6 +339,11 @@ static struct clk init_clocks_off[] = { ...@@ -339,6 +339,11 @@ static struct clk init_clocks_off[] = {
.parent = &clk_hclk_dsys.clk, .parent = &clk_hclk_dsys.clk,
.enable = s5pv210_clk_ip0_ctrl, .enable = s5pv210_clk_ip0_ctrl,
.ctrlbit = (1 << 26), .ctrlbit = (1 << 26),
}, {
.name = "jpeg",
.parent = &clk_hclk_dsys.clk,
.enable = s5pv210_clk_ip0_ctrl,
.ctrlbit = (1 << 28),
}, { }, {
.name = "mfc", .name = "mfc",
.devname = "s5p-mfc", .devname = "s5p-mfc",
......
...@@ -90,6 +90,8 @@ ...@@ -90,6 +90,8 @@
#define S5PV210_PA_FIMC1 0xFB300000 #define S5PV210_PA_FIMC1 0xFB300000
#define S5PV210_PA_FIMC2 0xFB400000 #define S5PV210_PA_FIMC2 0xFB400000
#define S5PV210_PA_JPEG 0xFB600000
#define S5PV210_PA_SDO 0xF9000000 #define S5PV210_PA_SDO 0xF9000000
#define S5PV210_PA_VP 0xF9100000 #define S5PV210_PA_VP 0xF9100000
#define S5PV210_PA_MIXER 0xF9200000 #define S5PV210_PA_MIXER 0xF9200000
...@@ -132,6 +134,8 @@ ...@@ -132,6 +134,8 @@
#define S5P_PA_SYSCON S5PV210_PA_SYSCON #define S5P_PA_SYSCON S5PV210_PA_SYSCON
#define S5P_PA_TIMER S5PV210_PA_TIMER #define S5P_PA_TIMER S5PV210_PA_TIMER
#define S5P_PA_JPEG S5PV210_PA_JPEG
#define SAMSUNG_PA_ADC S5PV210_PA_ADC #define SAMSUNG_PA_ADC S5PV210_PA_ADC
#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON #define SAMSUNG_PA_CFCON S5PV210_PA_CFCON
#define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD #define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD
......
...@@ -616,6 +616,7 @@ static struct platform_device *aquila_devices[] __initdata = { ...@@ -616,6 +616,7 @@ static struct platform_device *aquila_devices[] __initdata = {
&s5p_device_fimc0, &s5p_device_fimc0,
&s5p_device_fimc1, &s5p_device_fimc1,
&s5p_device_fimc2, &s5p_device_fimc2,
&s5p_device_fimc_md,
&s5pv210_device_iis0, &s5pv210_device_iis0,
&wm8994_fixed_voltage0, &wm8994_fixed_voltage0,
&wm8994_fixed_voltage1, &wm8994_fixed_voltage1,
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <plat/iic.h> #include <plat/iic.h>
#include <plat/pm.h> #include <plat/pm.h>
#include <plat/s5p-time.h> #include <plat/s5p-time.h>
#include <plat/mfc.h>
#include "common.h" #include "common.h"
...@@ -94,6 +95,13 @@ static struct platform_device *smdkc110_devices[] __initdata = { ...@@ -94,6 +95,13 @@ static struct platform_device *smdkc110_devices[] __initdata = {
&s3c_device_i2c2, &s3c_device_i2c2,
&s3c_device_rtc, &s3c_device_rtc,
&s3c_device_wdt, &s3c_device_wdt,
&s5p_device_fimc0,
&s5p_device_fimc1,
&s5p_device_fimc2,
&s5p_device_fimc_md,
&s5p_device_mfc,
&s5p_device_mfc_l,
&s5p_device_mfc_r,
}; };
static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = { static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = {
...@@ -117,6 +125,11 @@ static void __init smdkc110_map_io(void) ...@@ -117,6 +125,11 @@ static void __init smdkc110_map_io(void)
s5p_set_timer_source(S5P_PWM3, S5P_PWM4); s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
} }
static void __init smdkc110_reserve(void)
{
s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
}
static void __init smdkc110_machine_init(void) static void __init smdkc110_machine_init(void)
{ {
s3c_pm_init(); s3c_pm_init();
...@@ -145,4 +158,5 @@ MACHINE_START(SMDKC110, "SMDKC110") ...@@ -145,4 +158,5 @@ MACHINE_START(SMDKC110, "SMDKC110")
.init_machine = smdkc110_machine_init, .init_machine = smdkc110_machine_init,
.timer = &s5p_timer, .timer = &s5p_timer,
.restart = s5pv210_restart, .restart = s5pv210_restart,
.reserve = &smdkc110_reserve,
MACHINE_END MACHINE_END
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <plat/s5p-time.h> #include <plat/s5p-time.h>
#include <plat/backlight.h> #include <plat/backlight.h>
#include <plat/regs-fb-v4.h> #include <plat/regs-fb-v4.h>
#include <plat/mfc.h>
#include "common.h" #include "common.h"
...@@ -223,6 +224,14 @@ static struct platform_device *smdkv210_devices[] __initdata = { ...@@ -223,6 +224,14 @@ static struct platform_device *smdkv210_devices[] __initdata = {
&s3c_device_rtc, &s3c_device_rtc,
&s3c_device_ts, &s3c_device_ts,
&s3c_device_wdt, &s3c_device_wdt,
&s5p_device_fimc0,
&s5p_device_fimc1,
&s5p_device_fimc2,
&s5p_device_fimc_md,
&s5p_device_jpeg,
&s5p_device_mfc,
&s5p_device_mfc_l,
&s5p_device_mfc_r,
&s5pv210_device_ac97, &s5pv210_device_ac97,
&s5pv210_device_iis0, &s5pv210_device_iis0,
&s5pv210_device_spdif, &s5pv210_device_spdif,
...@@ -282,6 +291,11 @@ static void __init smdkv210_map_io(void) ...@@ -282,6 +291,11 @@ static void __init smdkv210_map_io(void)
s5p_set_timer_source(S5P_PWM2, S5P_PWM4); s5p_set_timer_source(S5P_PWM2, S5P_PWM4);
} }
static void __init smdkv210_reserve(void)
{
s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
}
static void __init smdkv210_machine_init(void) static void __init smdkv210_machine_init(void)
{ {
s3c_pm_init(); s3c_pm_init();
...@@ -319,4 +333,5 @@ MACHINE_START(SMDKV210, "SMDKV210") ...@@ -319,4 +333,5 @@ MACHINE_START(SMDKV210, "SMDKV210")
.init_machine = smdkv210_machine_init, .init_machine = smdkv210_machine_init,
.timer = &s5p_timer, .timer = &s5p_timer,
.restart = s5pv210_restart, .restart = s5pv210_restart,
.reserve = &smdkv210_reserve,
MACHINE_END MACHINE_END
...@@ -131,11 +131,7 @@ static void __init tegra_dt_init(void) ...@@ -131,11 +131,7 @@ static void __init tegra_dt_init(void)
} }
static const char *tegra20_dt_board_compat[] = { static const char *tegra20_dt_board_compat[] = {
"compulab,trimslice", "nvidia,tegra20",
"nvidia,harmony",
"compal,paz00",
"nvidia,seaboard",
"nvidia,ventana",
NULL NULL
}; };
......
...@@ -69,7 +69,7 @@ static void __init tegra30_dt_init(void) ...@@ -69,7 +69,7 @@ static void __init tegra30_dt_init(void)
} }
static const char *tegra30_dt_board_compat[] = { static const char *tegra30_dt_board_compat[] = {
"nvidia,cardhu", "nvidia,tegra30",
NULL NULL
}; };
......
...@@ -36,13 +36,14 @@ static struct regulator_consumer_supply tps658621_ldo0_supply[] = { ...@@ -36,13 +36,14 @@ static struct regulator_consumer_supply tps658621_ldo0_supply[] = {
static struct regulator_init_data ldo0_data = { static struct regulator_init_data ldo0_data = {
.constraints = { .constraints = {
.min_uV = 1250 * 1000, .min_uV = 3300 * 1000,
.max_uV = 3300 * 1000, .max_uV = 3300 * 1000,
.valid_modes_mask = (REGULATOR_MODE_NORMAL | .valid_modes_mask = (REGULATOR_MODE_NORMAL |
REGULATOR_MODE_STANDBY), REGULATOR_MODE_STANDBY),
.valid_ops_mask = (REGULATOR_CHANGE_MODE | .valid_ops_mask = (REGULATOR_CHANGE_MODE |
REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_STATUS |
REGULATOR_CHANGE_VOLTAGE), REGULATOR_CHANGE_VOLTAGE),
.apply_uV = 1,
}, },
.num_consumer_supplies = ARRAY_SIZE(tps658621_ldo0_supply), .num_consumer_supplies = ARRAY_SIZE(tps658621_ldo0_supply),
.consumer_supplies = tps658621_ldo0_supply, .consumer_supplies = tps658621_ldo0_supply,
......
...@@ -28,33 +28,8 @@ ...@@ -28,33 +28,8 @@
#if defined (CONFIG_MACH_AMS_DELTA) #if defined (CONFIG_MACH_AMS_DELTA)
#define AMS_DELTA_LATCH1_PHYS 0x01000000
#define AMS_DELTA_LATCH1_VIRT 0xEA000000
#define AMS_DELTA_MODEM_PHYS 0x04000000
#define AMS_DELTA_MODEM_VIRT 0xEB000000
#define AMS_DELTA_LATCH2_PHYS 0x08000000
#define AMS_DELTA_LATCH2_VIRT 0xEC000000
#define AMS_DELTA_LATCH1_LED_CAMERA 0x01
#define AMS_DELTA_LATCH1_LED_ADVERT 0x02
#define AMS_DELTA_LATCH1_LED_EMAIL 0x04
#define AMS_DELTA_LATCH1_LED_HANDSFREE 0x08
#define AMS_DELTA_LATCH1_LED_VOICEMAIL 0x10
#define AMS_DELTA_LATCH1_LED_VOICE 0x20
#define AMS_DELTA_LATCH2_LCD_VBLEN 0x0001
#define AMS_DELTA_LATCH2_LCD_NDISP 0x0002
#define AMS_DELTA_LATCH2_NAND_NCE 0x0004
#define AMS_DELTA_LATCH2_NAND_NRE 0x0008
#define AMS_DELTA_LATCH2_NAND_NWP 0x0010
#define AMS_DELTA_LATCH2_NAND_NWE 0x0020
#define AMS_DELTA_LATCH2_NAND_ALE 0x0040
#define AMS_DELTA_LATCH2_NAND_CLE 0x0080
#define AMD_DELTA_LATCH2_KEYBRD_PWR 0x0100
#define AMD_DELTA_LATCH2_KEYBRD_DATA 0x0200
#define AMD_DELTA_LATCH2_SCARD_RSTIN 0x0400 #define AMD_DELTA_LATCH2_SCARD_RSTIN 0x0400
#define AMD_DELTA_LATCH2_SCARD_CMDVCC 0x0800 #define AMD_DELTA_LATCH2_SCARD_CMDVCC 0x0800
#define AMS_DELTA_LATCH2_MODEM_NRESET 0x1000
#define AMS_DELTA_LATCH2_MODEM_CODEC 0x2000 #define AMS_DELTA_LATCH2_MODEM_CODEC 0x2000
#define AMS_DELTA_GPIO_PIN_KEYBRD_DATA 0 #define AMS_DELTA_GPIO_PIN_KEYBRD_DATA 0
...@@ -66,9 +41,29 @@ ...@@ -66,9 +41,29 @@
#define AMS_DELTA_GPIO_PIN_CONFIG 11 #define AMS_DELTA_GPIO_PIN_CONFIG 11
#define AMS_DELTA_GPIO_PIN_NAND_RB 12 #define AMS_DELTA_GPIO_PIN_NAND_RB 12
#define AMS_DELTA_GPIO_PIN_LCD_VBLEN 240
#define AMS_DELTA_GPIO_PIN_LCD_NDISP 241
#define AMS_DELTA_GPIO_PIN_NAND_NCE 242
#define AMS_DELTA_GPIO_PIN_NAND_NRE 243
#define AMS_DELTA_GPIO_PIN_NAND_NWP 244
#define AMS_DELTA_GPIO_PIN_NAND_NWE 245
#define AMS_DELTA_GPIO_PIN_NAND_ALE 246
#define AMS_DELTA_GPIO_PIN_NAND_CLE 247
#define AMS_DELTA_GPIO_PIN_KEYBRD_PWR 248
#define AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT 249
#define AMS_DELTA_GPIO_PIN_SCARD_RSTIN 250
#define AMS_DELTA_GPIO_PIN_SCARD_CMDVCC 251
#define AMS_DELTA_GPIO_PIN_MODEM_NRESET 252
#define AMS_DELTA_GPIO_PIN_MODEM_CODEC 253
#define AMS_DELTA_LATCH2_GPIO_BASE AMS_DELTA_GPIO_PIN_LCD_VBLEN
#define AMS_DELTA_LATCH2_NGPIO 16
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
void ams_delta_latch1_write(u8 mask, u8 value); void ams_delta_latch_write(int base, int ngpio, u16 mask, u16 value);
void ams_delta_latch2_write(u16 mask, u16 value); #define ams_delta_latch2_write(mask, value) \
ams_delta_latch_write(AMS_DELTA_LATCH2_GPIO_BASE, \
AMS_DELTA_LATCH2_NGPIO, (mask), (value))
#endif #endif
#endif /* CONFIG_MACH_AMS_DELTA */ #endif /* CONFIG_MACH_AMS_DELTA */
......
...@@ -160,6 +160,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id) ...@@ -160,6 +160,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
DEBUG_LL_OMAP3(3, igep0020); DEBUG_LL_OMAP3(3, igep0020);
DEBUG_LL_OMAP3(3, igep0030); DEBUG_LL_OMAP3(3, igep0030);
DEBUG_LL_OMAP3(3, nokia_rm680); DEBUG_LL_OMAP3(3, nokia_rm680);
DEBUG_LL_OMAP3(3, nokia_rm696);
DEBUG_LL_OMAP3(3, nokia_rx51); DEBUG_LL_OMAP3(3, nokia_rx51);
DEBUG_LL_OMAP3(3, omap3517evm); DEBUG_LL_OMAP3(3, omap3517evm);
DEBUG_LL_OMAP3(3, omap3_beagle); DEBUG_LL_OMAP3(3, omap3_beagle);
......
...@@ -92,8 +92,7 @@ static irqreturn_t ams_delta_serio_interrupt(int irq, void *dev_id) ...@@ -92,8 +92,7 @@ static irqreturn_t ams_delta_serio_interrupt(int irq, void *dev_id)
static int ams_delta_serio_open(struct serio *serio) static int ams_delta_serio_open(struct serio *serio)
{ {
/* enable keyboard */ /* enable keyboard */
ams_delta_latch2_write(AMD_DELTA_LATCH2_KEYBRD_PWR, gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 1);
AMD_DELTA_LATCH2_KEYBRD_PWR);
return 0; return 0;
} }
...@@ -101,9 +100,32 @@ static int ams_delta_serio_open(struct serio *serio) ...@@ -101,9 +100,32 @@ static int ams_delta_serio_open(struct serio *serio)
static void ams_delta_serio_close(struct serio *serio) static void ams_delta_serio_close(struct serio *serio)
{ {
/* disable keyboard */ /* disable keyboard */
ams_delta_latch2_write(AMD_DELTA_LATCH2_KEYBRD_PWR, 0); gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 0);
} }
static const struct gpio ams_delta_gpios[] __initconst_or_module = {
{
.gpio = AMS_DELTA_GPIO_PIN_KEYBRD_DATA,
.flags = GPIOF_DIR_IN,
.label = "serio-data",
},
{
.gpio = AMS_DELTA_GPIO_PIN_KEYBRD_CLK,
.flags = GPIOF_DIR_IN,
.label = "serio-clock",
},
{
.gpio = AMS_DELTA_GPIO_PIN_KEYBRD_PWR,
.flags = GPIOF_OUT_INIT_LOW,
.label = "serio-power",
},
{
.gpio = AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT,
.flags = GPIOF_OUT_INIT_LOW,
.label = "serio-dataout",
},
};
static int __init ams_delta_serio_init(void) static int __init ams_delta_serio_init(void)
{ {
int err; int err;
...@@ -123,19 +145,12 @@ static int __init ams_delta_serio_init(void) ...@@ -123,19 +145,12 @@ static int __init ams_delta_serio_init(void)
strlcpy(ams_delta_serio->phys, "GPIO/serio0", strlcpy(ams_delta_serio->phys, "GPIO/serio0",
sizeof(ams_delta_serio->phys)); sizeof(ams_delta_serio->phys));
err = gpio_request(AMS_DELTA_GPIO_PIN_KEYBRD_DATA, "serio-data"); err = gpio_request_array(ams_delta_gpios,
ARRAY_SIZE(ams_delta_gpios));
if (err) { if (err) {
pr_err("ams_delta_serio: Couldn't request gpio pin for data\n"); pr_err("ams_delta_serio: Couldn't request gpio pins\n");
goto serio; goto serio;
} }
gpio_direction_input(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
err = gpio_request(AMS_DELTA_GPIO_PIN_KEYBRD_CLK, "serio-clock");
if (err) {
pr_err("ams_delta_serio: couldn't request gpio pin for clock\n");
goto gpio_data;
}
gpio_direction_input(AMS_DELTA_GPIO_PIN_KEYBRD_CLK);
err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK),
ams_delta_serio_interrupt, IRQ_TYPE_EDGE_RISING, ams_delta_serio_interrupt, IRQ_TYPE_EDGE_RISING,
...@@ -143,7 +158,7 @@ static int __init ams_delta_serio_init(void) ...@@ -143,7 +158,7 @@ static int __init ams_delta_serio_init(void)
if (err < 0) { if (err < 0) {
pr_err("ams_delta_serio: couldn't request gpio interrupt %d\n", pr_err("ams_delta_serio: couldn't request gpio interrupt %d\n",
gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK)); gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK));
goto gpio_clk; goto gpio;
} }
/* /*
* Since GPIO register handling for keyboard clock pin is performed * Since GPIO register handling for keyboard clock pin is performed
...@@ -157,10 +172,9 @@ static int __init ams_delta_serio_init(void) ...@@ -157,10 +172,9 @@ static int __init ams_delta_serio_init(void)
dev_info(&ams_delta_serio->dev, "%s\n", ams_delta_serio->name); dev_info(&ams_delta_serio->dev, "%s\n", ams_delta_serio->name);
return 0; return 0;
gpio_clk: gpio:
gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_CLK); gpio_free_array(ams_delta_gpios,
gpio_data: ARRAY_SIZE(ams_delta_gpios));
gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
serio: serio:
kfree(ams_delta_serio); kfree(ams_delta_serio);
return err; return err;
...@@ -171,7 +185,7 @@ static void __exit ams_delta_serio_exit(void) ...@@ -171,7 +185,7 @@ static void __exit ams_delta_serio_exit(void)
{ {
serio_unregister_port(ams_delta_serio); serio_unregister_port(ams_delta_serio);
free_irq(OMAP_GPIO_IRQ(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0); free_irq(OMAP_GPIO_IRQ(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0);
gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_CLK); gpio_free_array(ams_delta_gpios,
gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_DATA); ARRAY_SIZE(ams_delta_gpios));
} }
module_exit(ams_delta_serio_exit); module_exit(ams_delta_serio_exit);
...@@ -74,13 +74,6 @@ config LEDS_S3C24XX ...@@ -74,13 +74,6 @@ config LEDS_S3C24XX
This option enables support for LEDs connected to GPIO lines This option enables support for LEDs connected to GPIO lines
on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440. on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440.
config LEDS_AMS_DELTA
tristate "LED Support for the Amstrad Delta (E3)"
depends on LEDS_CLASS
depends on MACH_AMS_DELTA
help
This option enables support for the LEDs on Amstrad Delta (E3).
config LEDS_NET48XX config LEDS_NET48XX
tristate "LED Support for Soekris net48xx series Error LED" tristate "LED Support for Soekris net48xx series Error LED"
depends on LEDS_CLASS depends on LEDS_CLASS
......
...@@ -12,7 +12,6 @@ obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o ...@@ -12,7 +12,6 @@ obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o
obj-$(CONFIG_LEDS_LM3530) += leds-lm3530.o obj-$(CONFIG_LEDS_LM3530) += leds-lm3530.o
obj-$(CONFIG_LEDS_MIKROTIK_RB532) += leds-rb532.o obj-$(CONFIG_LEDS_MIKROTIK_RB532) += leds-rb532.o
obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o
obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o
obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o
obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o
......
/*
* LEDs driver for Amstrad Delta (E3)
*
* Copyright (C) 2006 Jonathan McDowell <noodles@earth.li>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <plat/board-ams-delta.h>
/*
* Our context
*/
struct ams_delta_led {
struct led_classdev cdev;
u8 bitmask;
};
static void ams_delta_led_set(struct led_classdev *led_cdev,
enum led_brightness value)
{
struct ams_delta_led *led_dev =
container_of(led_cdev, struct ams_delta_led, cdev);
if (value)
ams_delta_latch1_write(led_dev->bitmask, led_dev->bitmask);
else
ams_delta_latch1_write(led_dev->bitmask, 0);
}
static struct ams_delta_led ams_delta_leds[] = {
{
.cdev = {
.name = "ams-delta::camera",
.brightness_set = ams_delta_led_set,
},
.bitmask = AMS_DELTA_LATCH1_LED_CAMERA,
},
{
.cdev = {
.name = "ams-delta::advert",
.brightness_set = ams_delta_led_set,
},
.bitmask = AMS_DELTA_LATCH1_LED_ADVERT,
},
{
.cdev = {
.name = "ams-delta::email",
.brightness_set = ams_delta_led_set,
},
.bitmask = AMS_DELTA_LATCH1_LED_EMAIL,
},
{
.cdev = {
.name = "ams-delta::handsfree",
.brightness_set = ams_delta_led_set,
},
.bitmask = AMS_DELTA_LATCH1_LED_HANDSFREE,
},
{
.cdev = {
.name = "ams-delta::voicemail",
.brightness_set = ams_delta_led_set,
},
.bitmask = AMS_DELTA_LATCH1_LED_VOICEMAIL,
},
{
.cdev = {
.name = "ams-delta::voice",
.brightness_set = ams_delta_led_set,
},
.bitmask = AMS_DELTA_LATCH1_LED_VOICE,
},
};
static int ams_delta_led_probe(struct platform_device *pdev)
{
int i, ret;
for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++) {
ams_delta_leds[i].cdev.flags |= LED_CORE_SUSPENDRESUME;
ret = led_classdev_register(&pdev->dev,
&ams_delta_leds[i].cdev);
if (ret < 0)
goto fail;
}
return 0;
fail:
while (--i >= 0)
led_classdev_unregister(&ams_delta_leds[i].cdev);
return ret;
}
static int ams_delta_led_remove(struct platform_device *pdev)
{
int i;
for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++)
led_classdev_unregister(&ams_delta_leds[i].cdev);
return 0;
}
static struct platform_driver ams_delta_led_driver = {
.probe = ams_delta_led_probe,
.remove = ams_delta_led_remove,
.driver = {
.name = "ams-delta-led",
.owner = THIS_MODULE,
},
};
module_platform_driver(ams_delta_led_driver);
MODULE_AUTHOR("Jonathan McDowell <noodles@earth.li>");
MODULE_DESCRIPTION("Amstrad Delta LED driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:ams-delta-led");
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/sizes.h> #include <asm/sizes.h>
#include <asm/gpio.h> #include <linux/gpio.h>
#include <plat/board-ams-delta.h> #include <plat/board-ams-delta.h>
/* /*
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
*/ */
static struct mtd_info *ams_delta_mtd = NULL; static struct mtd_info *ams_delta_mtd = NULL;
#define NAND_MASK (AMS_DELTA_LATCH2_NAND_NRE | AMS_DELTA_LATCH2_NAND_NWE | AMS_DELTA_LATCH2_NAND_CLE | AMS_DELTA_LATCH2_NAND_ALE | AMS_DELTA_LATCH2_NAND_NCE | AMS_DELTA_LATCH2_NAND_NWP)
/* /*
* Define partitions for flash devices * Define partitions for flash devices
*/ */
...@@ -68,10 +66,9 @@ static void ams_delta_write_byte(struct mtd_info *mtd, u_char byte) ...@@ -68,10 +66,9 @@ static void ams_delta_write_byte(struct mtd_info *mtd, u_char byte)
writew(0, io_base + OMAP_MPUIO_IO_CNTL); writew(0, io_base + OMAP_MPUIO_IO_CNTL);
writew(byte, this->IO_ADDR_W); writew(byte, this->IO_ADDR_W);
ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NWE, 0); gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NWE, 0);
ndelay(40); ndelay(40);
ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NWE, gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NWE, 1);
AMS_DELTA_LATCH2_NAND_NWE);
} }
static u_char ams_delta_read_byte(struct mtd_info *mtd) static u_char ams_delta_read_byte(struct mtd_info *mtd)
...@@ -80,12 +77,11 @@ static u_char ams_delta_read_byte(struct mtd_info *mtd) ...@@ -80,12 +77,11 @@ static u_char ams_delta_read_byte(struct mtd_info *mtd)
struct nand_chip *this = mtd->priv; struct nand_chip *this = mtd->priv;
void __iomem *io_base = this->priv; void __iomem *io_base = this->priv;
ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NRE, 0); gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NRE, 0);
ndelay(40); ndelay(40);
writew(~0, io_base + OMAP_MPUIO_IO_CNTL); writew(~0, io_base + OMAP_MPUIO_IO_CNTL);
res = readw(this->IO_ADDR_R); res = readw(this->IO_ADDR_R);
ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NRE, gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NRE, 1);
AMS_DELTA_LATCH2_NAND_NRE);
return res; return res;
} }
...@@ -132,15 +128,12 @@ static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd, ...@@ -132,15 +128,12 @@ static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd,
{ {
if (ctrl & NAND_CTRL_CHANGE) { if (ctrl & NAND_CTRL_CHANGE) {
unsigned long bits; gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NCE,
(ctrl & NAND_NCE) == 0);
bits = (~ctrl & NAND_NCE) ? AMS_DELTA_LATCH2_NAND_NCE : 0; gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_CLE,
bits |= (ctrl & NAND_CLE) ? AMS_DELTA_LATCH2_NAND_CLE : 0; (ctrl & NAND_CLE) != 0);
bits |= (ctrl & NAND_ALE) ? AMS_DELTA_LATCH2_NAND_ALE : 0; gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_ALE,
(ctrl & NAND_ALE) != 0);
ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_CLE |
AMS_DELTA_LATCH2_NAND_ALE |
AMS_DELTA_LATCH2_NAND_NCE, bits);
} }
if (cmd != NAND_CMD_NONE) if (cmd != NAND_CMD_NONE)
...@@ -152,6 +145,39 @@ static int ams_delta_nand_ready(struct mtd_info *mtd) ...@@ -152,6 +145,39 @@ static int ams_delta_nand_ready(struct mtd_info *mtd)
return gpio_get_value(AMS_DELTA_GPIO_PIN_NAND_RB); return gpio_get_value(AMS_DELTA_GPIO_PIN_NAND_RB);
} }
static const struct gpio _mandatory_gpio[] = {
{
.gpio = AMS_DELTA_GPIO_PIN_NAND_NCE,
.flags = GPIOF_OUT_INIT_HIGH,
.label = "nand_nce",
},
{
.gpio = AMS_DELTA_GPIO_PIN_NAND_NRE,
.flags = GPIOF_OUT_INIT_HIGH,
.label = "nand_nre",
},
{
.gpio = AMS_DELTA_GPIO_PIN_NAND_NWP,
.flags = GPIOF_OUT_INIT_HIGH,
.label = "nand_nwp",
},
{
.gpio = AMS_DELTA_GPIO_PIN_NAND_NWE,
.flags = GPIOF_OUT_INIT_HIGH,
.label = "nand_nwe",
},
{
.gpio = AMS_DELTA_GPIO_PIN_NAND_ALE,
.flags = GPIOF_OUT_INIT_LOW,
.label = "nand_ale",
},
{
.gpio = AMS_DELTA_GPIO_PIN_NAND_CLE,
.flags = GPIOF_OUT_INIT_LOW,
.label = "nand_cle",
},
};
/* /*
* Main initialization routine * Main initialization routine
*/ */
...@@ -223,10 +249,9 @@ static int __devinit ams_delta_init(struct platform_device *pdev) ...@@ -223,10 +249,9 @@ static int __devinit ams_delta_init(struct platform_device *pdev)
platform_set_drvdata(pdev, io_base); platform_set_drvdata(pdev, io_base);
/* Set chip enabled, but */ /* Set chip enabled, but */
ams_delta_latch2_write(NAND_MASK, AMS_DELTA_LATCH2_NAND_NRE | err = gpio_request_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
AMS_DELTA_LATCH2_NAND_NWE | if (err)
AMS_DELTA_LATCH2_NAND_NCE | goto out_gpio;
AMS_DELTA_LATCH2_NAND_NWP);
/* Scan to find existence of the device */ /* Scan to find existence of the device */
if (nand_scan(ams_delta_mtd, 1)) { if (nand_scan(ams_delta_mtd, 1)) {
...@@ -241,7 +266,10 @@ static int __devinit ams_delta_init(struct platform_device *pdev) ...@@ -241,7 +266,10 @@ static int __devinit ams_delta_init(struct platform_device *pdev)
goto out; goto out;
out_mtd: out_mtd:
gpio_free_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
out_gpio:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
gpio_free(AMS_DELTA_GPIO_PIN_NAND_RB);
iounmap(io_base); iounmap(io_base);
out_release_io: out_release_io:
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
...@@ -262,6 +290,8 @@ static int __devexit ams_delta_cleanup(struct platform_device *pdev) ...@@ -262,6 +290,8 @@ static int __devexit ams_delta_cleanup(struct platform_device *pdev)
/* Release resources, unregister device */ /* Release resources, unregister device */
nand_release(ams_delta_mtd); nand_release(ams_delta_mtd);
gpio_free_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
gpio_free(AMS_DELTA_GPIO_PIN_NAND_RB);
iounmap(io_base); iounmap(io_base);
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/lcd.h> #include <linux/lcd.h>
#include <linux/gpio.h>
#include <plat/board-ams-delta.h> #include <plat/board-ams-delta.h>
#include <mach/hardware.h> #include <mach/hardware.h>
...@@ -98,29 +99,41 @@ static struct lcd_ops ams_delta_lcd_ops = { ...@@ -98,29 +99,41 @@ static struct lcd_ops ams_delta_lcd_ops = {
/* omapfb panel section */ /* omapfb panel section */
static const struct gpio _gpios[] = {
{
.gpio = AMS_DELTA_GPIO_PIN_LCD_VBLEN,
.flags = GPIOF_OUT_INIT_LOW,
.label = "lcd_vblen",
},
{
.gpio = AMS_DELTA_GPIO_PIN_LCD_NDISP,
.flags = GPIOF_OUT_INIT_LOW,
.label = "lcd_ndisp",
},
};
static int ams_delta_panel_init(struct lcd_panel *panel, static int ams_delta_panel_init(struct lcd_panel *panel,
struct omapfb_device *fbdev) struct omapfb_device *fbdev)
{ {
return 0; return gpio_request_array(_gpios, ARRAY_SIZE(_gpios));
} }
static void ams_delta_panel_cleanup(struct lcd_panel *panel) static void ams_delta_panel_cleanup(struct lcd_panel *panel)
{ {
gpio_free_array(_gpios, ARRAY_SIZE(_gpios));
} }
static int ams_delta_panel_enable(struct lcd_panel *panel) static int ams_delta_panel_enable(struct lcd_panel *panel)
{ {
ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_NDISP, gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_NDISP, 1);
AMS_DELTA_LATCH2_LCD_NDISP); gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_VBLEN, 1);
ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN,
AMS_DELTA_LATCH2_LCD_VBLEN);
return 0; return 0;
} }
static void ams_delta_panel_disable(struct lcd_panel *panel) static void ams_delta_panel_disable(struct lcd_panel *panel)
{ {
ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN, 0); gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_VBLEN, 0);
ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_NDISP, 0); gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_NDISP, 0);
} }
static unsigned long ams_delta_panel_get_caps(struct lcd_panel *panel) static unsigned long ams_delta_panel_get_caps(struct lcd_panel *panel)
......
...@@ -426,29 +426,6 @@ static struct snd_soc_ops ams_delta_ops = { ...@@ -426,29 +426,6 @@ static struct snd_soc_ops ams_delta_ops = {
}; };
/* Board specific codec bias level control */
static int ams_delta_set_bias_level(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
switch (level) {
case SND_SOC_BIAS_ON:
case SND_SOC_BIAS_PREPARE:
case SND_SOC_BIAS_STANDBY:
if (card->dapm.bias_level == SND_SOC_BIAS_OFF)
ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_NRESET,
AMS_DELTA_LATCH2_MODEM_NRESET);
break;
case SND_SOC_BIAS_OFF:
if (card->dapm.bias_level != SND_SOC_BIAS_OFF)
ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_NRESET,
0);
}
card->dapm.bias_level = level;
return 0;
}
/* Digital mute implemented using modem/CPU multiplexer. /* Digital mute implemented using modem/CPU multiplexer.
* Shares hardware with codec config pulse generation */ * Shares hardware with codec config pulse generation */
static bool ams_delta_muted = 1; static bool ams_delta_muted = 1;
...@@ -512,9 +489,6 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd) ...@@ -512,9 +489,6 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
ams_delta_ops.shutdown = ams_delta_shutdown; ams_delta_ops.shutdown = ams_delta_shutdown;
} }
/* Set codec bias level */
ams_delta_set_bias_level(card, dapm, SND_SOC_BIAS_STANDBY);
/* Add hook switch - can be used to control the codec from userspace /* Add hook switch - can be used to control the codec from userspace
* even if line discipline fails */ * even if line discipline fails */
ret = snd_soc_jack_new(rtd->codec, "hook_switch", ret = snd_soc_jack_new(rtd->codec, "hook_switch",
...@@ -598,7 +572,6 @@ static struct snd_soc_card ams_delta_audio_card = { ...@@ -598,7 +572,6 @@ static struct snd_soc_card ams_delta_audio_card = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.dai_link = &ams_delta_dai_link, .dai_link = &ams_delta_dai_link,
.num_links = 1, .num_links = 1,
.set_bias_level = ams_delta_set_bias_level,
}; };
/* Module init/exit */ /* Module init/exit */
...@@ -635,7 +608,7 @@ static int __init ams_delta_module_init(void) ...@@ -635,7 +608,7 @@ static int __init ams_delta_module_init(void)
platform_device_put(ams_delta_audio_platform_device); platform_device_put(ams_delta_audio_platform_device);
return ret; return ret;
} }
module_init(ams_delta_module_init); late_initcall(ams_delta_module_init);
static void __exit ams_delta_module_exit(void) static void __exit ams_delta_module_exit(void)
{ {
...@@ -647,11 +620,6 @@ static void __exit ams_delta_module_exit(void) ...@@ -647,11 +620,6 @@ static void __exit ams_delta_module_exit(void)
ARRAY_SIZE(ams_delta_hook_switch_gpios), ARRAY_SIZE(ams_delta_hook_switch_gpios),
ams_delta_hook_switch_gpios); ams_delta_hook_switch_gpios);
/* Keep modem power on */
ams_delta_set_bias_level(&ams_delta_audio_card,
&ams_delta_audio_card.rtd[0].codec->dapm,
SND_SOC_BIAS_STANDBY);
platform_device_unregister(cx20442_platform_device); platform_device_unregister(cx20442_platform_device);
platform_device_unregister(ams_delta_audio_platform_device); platform_device_unregister(ams_delta_audio_platform_device);
} }
......
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