From 63767b9efdfc260e5a8642900c3f8c2c00946b9e Mon Sep 17 00:00:00 2001 From: Andy Gross Date: Wed, 23 May 2012 15:08:10 -0500 Subject: [PATCH] --- yaml --- r: 313469 b: refs/heads/master c: e2fb50521c3811eddd60d911bc6d4d191f5d6e61 h: refs/heads/master i: 313467: 5ff223819bfbb552e73196e395a5e0552881cf02 v: v3 --- [refs] | 2 +- .../tegra/{nvidia,tegra20-emc.txt => emc.txt} | 2 +- .../bindings/arm/tegra/nvidia,tegra20-mc.txt | 2 +- .../bindings/arm/tegra/nvidia,tegra30-mc.txt | 2 +- ...vidia,tegra20-gpio.txt => gpio_nvidia.txt} | 0 .../{nvidia,tegra20-kbc.txt => tegra-kbc.txt} | 0 ...dia,tegra20-sdhci.txt => nvidia-sdhci.txt} | 0 .../nvec/{nvidia,nvec.txt => nvec_nvidia.txt} | 0 ...io-alc5632.txt => tegra-audio-alc5632.txt} | 0 ...rimslice.txt => tegra-audio-trimslice.txt} | 0 ...udio-wm8753.txt => tegra-audio-wm8753.txt} | 0 ...udio-wm8903.txt => tegra-audio-wm8903.txt} | 0 ...nvidia,tegra20-das.txt => tegra20-das.txt} | 0 ...nvidia,tegra20-i2s.txt => tegra20-i2s.txt} | 0 ...{nvidia,tegra20-spi.txt => spi_nvidia.txt} | 0 ...{nvidia,tegra20-ehci.txt => tegra-usb.txt} | 0 trunk/arch/arm/Kconfig | 1 - .../{tegra30-cardhu.dts => tegra-cardhu.dts} | 1 + ...{tegra20-harmony.dts => tegra-harmony.dts} | 1 + .../{tegra20-paz00.dts => tegra-paz00.dts} | 1 + ...egra20-seaboard.dts => tegra-seaboard.dts} | 3 +- ...ra20-trimslice.dts => tegra-trimslice.dts} | 0 ...{tegra20-ventana.dts => tegra-ventana.dts} | 1 + trunk/arch/arm/boot/dts/tegra20.dtsi | 4 +- trunk/arch/arm/boot/dts/tegra30.dtsi | 2 +- trunk/arch/arm/mach-exynos/Kconfig | 2 - trunk/arch/arm/mach-exynos/mach-origen.c | 6 - trunk/arch/arm/mach-exynos/mach-smdk4x12.c | 10 +- trunk/arch/arm/mach-exynos/mach-smdkv310.c | 6 - trunk/arch/arm/mach-omap2/Makefile | 4 + trunk/arch/arm/mach-omap2/drm.c | 61 ++++ .../arm/mach-s3c64xx/include/mach/crag6410.h | 4 +- .../arm/mach-s3c64xx/mach-crag6410-module.c | 10 +- trunk/arch/arm/mach-s3c64xx/mach-crag6410.c | 1 + trunk/arch/arm/mach-s5pv210/Kconfig | 2 - trunk/arch/arm/mach-s5pv210/mach-smdkv210.c | 9 - trunk/arch/arm/mach-tegra/Kconfig | 39 +++ trunk/arch/arm/mach-tegra/Makefile | 13 +- trunk/arch/arm/mach-tegra/Makefile.boot | 12 +- trunk/arch/arm/mach-tegra/board-dt-tegra20.c | 74 +---- trunk/arch/arm/mach-tegra/board-dt-tegra30.c | 8 +- .../arch/arm/mach-tegra/board-harmony-pcie.c | 15 +- .../arch/arm/mach-tegra/board-harmony-power.c | 25 +- trunk/arch/arm/mach-tegra/board-paz00.c | 7 +- .../arm/mach-tegra/board-seaboard-pinmux.c | 197 +++++++++++ trunk/arch/arm/mach-tegra/board-seaboard.c | 306 ++++++++++++++++++ trunk/arch/arm/mach-tegra/board-seaboard.h | 47 +++ trunk/arch/arm/mach-tegra/board.h | 9 - trunk/arch/arm/mach-tegra/cpuidle.c | 6 +- trunk/arch/arm/mach-tegra/sleep.S | 29 ++ trunk/drivers/amba/tegra-ahb.c | 6 + trunk/drivers/mmc/host/sdhci-tegra.c | 5 +- trunk/drivers/staging/omapdrm/omap_drv.h | 2 +- .../linux/platform_data/omap_drm.h} | 19 +- trunk/sound/soc/tegra/Kconfig | 10 +- 55 files changed, 769 insertions(+), 197 deletions(-) rename trunk/Documentation/devicetree/bindings/arm/tegra/{nvidia,tegra20-emc.txt => emc.txt} (99%) rename trunk/Documentation/devicetree/bindings/gpio/{nvidia,tegra20-gpio.txt => gpio_nvidia.txt} (100%) rename trunk/Documentation/devicetree/bindings/input/{nvidia,tegra20-kbc.txt => tegra-kbc.txt} (100%) rename trunk/Documentation/devicetree/bindings/mmc/{nvidia,tegra20-sdhci.txt => nvidia-sdhci.txt} (100%) rename trunk/Documentation/devicetree/bindings/nvec/{nvidia,nvec.txt => nvec_nvidia.txt} (100%) rename trunk/Documentation/devicetree/bindings/sound/{nvidia,tegra-audio-alc5632.txt => tegra-audio-alc5632.txt} (100%) rename trunk/Documentation/devicetree/bindings/sound/{nvidia,tegra-audio-trimslice.txt => tegra-audio-trimslice.txt} (100%) rename trunk/Documentation/devicetree/bindings/sound/{nvidia,tegra-audio-wm8753.txt => tegra-audio-wm8753.txt} (100%) rename trunk/Documentation/devicetree/bindings/sound/{nvidia,tegra-audio-wm8903.txt => tegra-audio-wm8903.txt} (100%) rename trunk/Documentation/devicetree/bindings/sound/{nvidia,tegra20-das.txt => tegra20-das.txt} (100%) rename trunk/Documentation/devicetree/bindings/sound/{nvidia,tegra20-i2s.txt => tegra20-i2s.txt} (100%) rename trunk/Documentation/devicetree/bindings/spi/{nvidia,tegra20-spi.txt => spi_nvidia.txt} (100%) rename trunk/Documentation/devicetree/bindings/usb/{nvidia,tegra20-ehci.txt => tegra-usb.txt} (100%) rename trunk/arch/arm/boot/dts/{tegra30-cardhu.dts => tegra-cardhu.dts} (99%) rename trunk/arch/arm/boot/dts/{tegra20-harmony.dts => tegra-harmony.dts} (99%) rename trunk/arch/arm/boot/dts/{tegra20-paz00.dts => tegra-paz00.dts} (99%) rename trunk/arch/arm/boot/dts/{tegra20-seaboard.dts => tegra-seaboard.dts} (99%) rename trunk/arch/arm/boot/dts/{tegra20-trimslice.dts => tegra-trimslice.dts} (100%) rename trunk/arch/arm/boot/dts/{tegra20-ventana.dts => tegra-ventana.dts} (99%) create mode 100644 trunk/arch/arm/mach-omap2/drm.c create mode 100644 trunk/arch/arm/mach-tegra/board-seaboard-pinmux.c create mode 100644 trunk/arch/arm/mach-tegra/board-seaboard.c create mode 100644 trunk/arch/arm/mach-tegra/board-seaboard.h rename trunk/{drivers/staging/omapdrm/omap_priv.h => include/linux/platform_data/omap_drm.h} (81%) diff --git a/[refs] b/[refs] index 2ef269972d5c..4b03fea6fcb9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 388d037c8b8a77a7bdc84513e77ba7d2152890fb +refs/heads/master: e2fb50521c3811eddd60d911bc6d4d191f5d6e61 diff --git a/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-emc.txt b/trunk/Documentation/devicetree/bindings/arm/tegra/emc.txt similarity index 99% rename from trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-emc.txt rename to trunk/Documentation/devicetree/bindings/arm/tegra/emc.txt index 4c33b29dc660..09335f8eee00 100644 --- a/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-emc.txt +++ b/trunk/Documentation/devicetree/bindings/arm/tegra/emc.txt @@ -15,7 +15,7 @@ Child device nodes describe the memory settings for different configurations and Example: - memory-controller@7000f400 { + emc@7000f400 { #address-cells = < 1 >; #size-cells = < 0 >; compatible = "nvidia,tegra20-emc"; diff --git a/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt b/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt index 866d93421eba..c25a0a55151d 100644 --- a/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt +++ b/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt @@ -8,7 +8,7 @@ Required properties: - interrupts : Should contain MC General interrupt. Example: - memory-controller@0x7000f000 { + mc { compatible = "nvidia,tegra20-mc"; reg = <0x7000f000 0x024 0x7000f03c 0x3c4>; diff --git a/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-mc.txt b/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-mc.txt index bdf1a612422b..e47e73f612f4 100644 --- a/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-mc.txt +++ b/trunk/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-mc.txt @@ -8,7 +8,7 @@ Required properties: - interrupts : Should contain MC General interrupt. Example: - memory-controller { + mc { compatible = "nvidia,tegra30-mc"; reg = <0x7000f000 0x010 0x7000f03c 0x1b4 diff --git a/trunk/Documentation/devicetree/bindings/gpio/nvidia,tegra20-gpio.txt b/trunk/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/gpio/nvidia,tegra20-gpio.txt rename to trunk/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt diff --git a/trunk/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt b/trunk/Documentation/devicetree/bindings/input/tegra-kbc.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt rename to trunk/Documentation/devicetree/bindings/input/tegra-kbc.txt diff --git a/trunk/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt b/trunk/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt rename to trunk/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt diff --git a/trunk/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt b/trunk/Documentation/devicetree/bindings/nvec/nvec_nvidia.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt rename to trunk/Documentation/devicetree/bindings/nvec/nvec_nvidia.txt diff --git a/trunk/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt b/trunk/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt rename to trunk/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt diff --git a/trunk/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.txt b/trunk/Documentation/devicetree/bindings/sound/tegra-audio-trimslice.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.txt rename to trunk/Documentation/devicetree/bindings/sound/tegra-audio-trimslice.txt diff --git a/trunk/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt b/trunk/Documentation/devicetree/bindings/sound/tegra-audio-wm8753.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt rename to trunk/Documentation/devicetree/bindings/sound/tegra-audio-wm8753.txt diff --git a/trunk/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt b/trunk/Documentation/devicetree/bindings/sound/tegra-audio-wm8903.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt rename to trunk/Documentation/devicetree/bindings/sound/tegra-audio-wm8903.txt diff --git a/trunk/Documentation/devicetree/bindings/sound/nvidia,tegra20-das.txt b/trunk/Documentation/devicetree/bindings/sound/tegra20-das.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/sound/nvidia,tegra20-das.txt rename to trunk/Documentation/devicetree/bindings/sound/tegra20-das.txt diff --git a/trunk/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt b/trunk/Documentation/devicetree/bindings/sound/tegra20-i2s.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt rename to trunk/Documentation/devicetree/bindings/sound/tegra20-i2s.txt diff --git a/trunk/Documentation/devicetree/bindings/spi/nvidia,tegra20-spi.txt b/trunk/Documentation/devicetree/bindings/spi/spi_nvidia.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/spi/nvidia,tegra20-spi.txt rename to trunk/Documentation/devicetree/bindings/spi/spi_nvidia.txt diff --git a/trunk/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt b/trunk/Documentation/devicetree/bindings/usb/tegra-usb.txt similarity index 100% rename from trunk/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt rename to trunk/Documentation/devicetree/bindings/usb/tegra-usb.txt diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index 40fe514c23dc..a91009c61870 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -647,7 +647,6 @@ config ARCH_TEGRA select MIGHT_HAVE_CACHE_L2X0 select NEED_MACH_IO_H if PCI select ARCH_HAS_CPUFREQ - select USE_OF help This enables support for NVIDIA Tegra based systems (Tegra APX, Tegra 6xx and Tegra 2 series). diff --git a/trunk/arch/arm/boot/dts/tegra30-cardhu.dts b/trunk/arch/arm/boot/dts/tegra-cardhu.dts similarity index 99% rename from trunk/arch/arm/boot/dts/tegra30-cardhu.dts rename to trunk/arch/arm/boot/dts/tegra-cardhu.dts index c169bced131e..36321bceec46 100644 --- a/trunk/arch/arm/boot/dts/tegra30-cardhu.dts +++ b/trunk/arch/arm/boot/dts/tegra-cardhu.dts @@ -144,6 +144,7 @@ sdhci@78000600 { status = "okay"; + support-8bit; bus-width = <8>; }; diff --git a/trunk/arch/arm/boot/dts/tegra20-harmony.dts b/trunk/arch/arm/boot/dts/tegra-harmony.dts similarity index 99% rename from trunk/arch/arm/boot/dts/tegra20-harmony.dts rename to trunk/arch/arm/boot/dts/tegra-harmony.dts index f146dbf6f7f8..7de701365fce 100644 --- a/trunk/arch/arm/boot/dts/tegra20-harmony.dts +++ b/trunk/arch/arm/boot/dts/tegra-harmony.dts @@ -307,6 +307,7 @@ cd-gpios = <&gpio 58 0>; /* gpio PH2 */ wp-gpios = <&gpio 59 0>; /* gpio PH3 */ power-gpios = <&gpio 70 0>; /* gpio PI6 */ + support-8bit; bus-width = <8>; }; diff --git a/trunk/arch/arm/boot/dts/tegra20-paz00.dts b/trunk/arch/arm/boot/dts/tegra-paz00.dts similarity index 99% rename from trunk/arch/arm/boot/dts/tegra20-paz00.dts rename to trunk/arch/arm/boot/dts/tegra-paz00.dts index 684a9e1ff7e9..bfeb117d5aea 100644 --- a/trunk/arch/arm/boot/dts/tegra20-paz00.dts +++ b/trunk/arch/arm/boot/dts/tegra-paz00.dts @@ -301,6 +301,7 @@ sdhci@c8000600 { status = "okay"; + support-8bit; bus-width = <8>; }; diff --git a/trunk/arch/arm/boot/dts/tegra20-seaboard.dts b/trunk/arch/arm/boot/dts/tegra-seaboard.dts similarity index 99% rename from trunk/arch/arm/boot/dts/tegra20-seaboard.dts rename to trunk/arch/arm/boot/dts/tegra-seaboard.dts index b797901d040d..89cb7f2acd92 100644 --- a/trunk/arch/arm/boot/dts/tegra20-seaboard.dts +++ b/trunk/arch/arm/boot/dts/tegra-seaboard.dts @@ -334,7 +334,7 @@ }; }; - memory-controller@0x7000f400 { + emc { emc-table@190000 { reg = <190000>; compatible = "nvidia,tegra20-emc-table"; @@ -397,6 +397,7 @@ sdhci@c8000600 { status = "okay"; + support-8bit; bus-width = <8>; }; diff --git a/trunk/arch/arm/boot/dts/tegra20-trimslice.dts b/trunk/arch/arm/boot/dts/tegra-trimslice.dts similarity index 100% rename from trunk/arch/arm/boot/dts/tegra20-trimslice.dts rename to trunk/arch/arm/boot/dts/tegra-trimslice.dts diff --git a/trunk/arch/arm/boot/dts/tegra20-ventana.dts b/trunk/arch/arm/boot/dts/tegra-ventana.dts similarity index 99% rename from trunk/arch/arm/boot/dts/tegra20-ventana.dts rename to trunk/arch/arm/boot/dts/tegra-ventana.dts index be90544e6b59..445343b0fbdd 100644 --- a/trunk/arch/arm/boot/dts/tegra20-ventana.dts +++ b/trunk/arch/arm/boot/dts/tegra-ventana.dts @@ -314,6 +314,7 @@ sdhci@c8000600 { status = "okay"; + support-8bit; bus-width = <8>; }; diff --git a/trunk/arch/arm/boot/dts/tegra20.dtsi b/trunk/arch/arm/boot/dts/tegra20.dtsi index 59116b852434..c417d67e9027 100644 --- a/trunk/arch/arm/boot/dts/tegra20.dtsi +++ b/trunk/arch/arm/boot/dts/tegra20.dtsi @@ -164,7 +164,7 @@ reg = <0x7000e400 0x400>; }; - memory-controller@0x7000f000 { + mc { compatible = "nvidia,tegra20-mc"; reg = <0x7000f000 0x024 0x7000f03c 0x3c4>; @@ -177,7 +177,7 @@ 0x58000000 0x02000000>; /* GART aperture */ }; - memory-controller@0x7000f400 { + emc { compatible = "nvidia,tegra20-emc"; reg = <0x7000f400 0x200>; #address-cells = <1>; diff --git a/trunk/arch/arm/boot/dts/tegra30.dtsi b/trunk/arch/arm/boot/dts/tegra30.dtsi index 19479393842e..2dcc09e784b5 100644 --- a/trunk/arch/arm/boot/dts/tegra30.dtsi +++ b/trunk/arch/arm/boot/dts/tegra30.dtsi @@ -167,7 +167,7 @@ reg = <0x7000e400 0x400>; }; - memory-controller { + mc { compatible = "nvidia,tegra30-mc"; reg = <0x7000f000 0x010 0x7000f03c 0x1b4 diff --git a/trunk/arch/arm/mach-exynos/Kconfig b/trunk/arch/arm/mach-exynos/Kconfig index 498596b3adbb..6f6d13f91e4c 100644 --- a/trunk/arch/arm/mach-exynos/Kconfig +++ b/trunk/arch/arm/mach-exynos/Kconfig @@ -207,7 +207,6 @@ config MACH_SMDKV310 select S3C_DEV_HSMMC1 select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC3 - select S3C_DEV_USB_HSOTG select SAMSUNG_DEV_BACKLIGHT select EXYNOS_DEV_DRM select EXYNOS_DEV_SYSMMU @@ -327,7 +326,6 @@ config MACH_ORIGEN select S3C_DEV_WDT select S3C_DEV_HSMMC select S3C_DEV_HSMMC2 - select S3C_DEV_USB_HSOTG select S5P_DEV_FIMC0 select S5P_DEV_FIMC1 select S5P_DEV_FIMC2 diff --git a/trunk/arch/arm/mach-exynos/mach-origen.c b/trunk/arch/arm/mach-exynos/mach-origen.c index 9ed0229db8ae..f5572be9d7bf 100644 --- a/trunk/arch/arm/mach-exynos/mach-origen.c +++ b/trunk/arch/arm/mach-exynos/mach-origen.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -500,9 +499,6 @@ static void __init origen_ohci_init(void) exynos4_ohci_set_platdata(pdata); } -/* USB OTG */ -static struct s3c_hsotg_plat origen_hsotg_pdata; - static struct gpio_keys_button origen_gpio_keys_table[] = { { .code = KEY_MENU, @@ -659,7 +655,6 @@ static struct platform_device *origen_devices[] __initdata = { &s3c_device_hsmmc0, &s3c_device_i2c0, &s3c_device_rtc, - &s3c_device_usb_hsotg, &s3c_device_wdt, &s5p_device_ehci, &s5p_device_fimc0, @@ -749,7 +744,6 @@ static void __init origen_machine_init(void) origen_ehci_init(); origen_ohci_init(); - s3c_hsotg_set_platdata(&origen_hsotg_pdata); clk_xusbxti.rate = 24000000; s5p_tv_setup(); diff --git a/trunk/arch/arm/mach-exynos/mach-smdk4x12.c b/trunk/arch/arm/mach-exynos/mach-smdk4x12.c index e134c9562f15..fb09c70e195a 100644 --- a/trunk/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/trunk/arch/arm/mach-exynos/mach-smdk4x12.c @@ -219,10 +219,8 @@ static struct platform_pwm_backlight_data smdk4x12_bl_data = { static uint32_t smdk4x12_keymap[] __initdata = { /* KEY(row, col, keycode) */ - KEY(1, 3, KEY_1), KEY(1, 4, KEY_2), KEY(1, 5, KEY_3), - KEY(1, 6, KEY_4), KEY(1, 7, KEY_5), - KEY(2, 5, KEY_D), KEY(2, 6, KEY_A), KEY(2, 7, KEY_B), - KEY(0, 7, KEY_E), KEY(0, 5, KEY_C) + KEY(1, 0, KEY_D), KEY(1, 1, KEY_A), KEY(1, 2, KEY_B), + KEY(1, 3, KEY_E), KEY(1, 4, KEY_C) }; static struct matrix_keymap_data smdk4x12_keymap_data __initdata = { @@ -232,8 +230,8 @@ static struct matrix_keymap_data smdk4x12_keymap_data __initdata = { static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = { .keymap_data = &smdk4x12_keymap_data, - .rows = 3, - .cols = 8, + .rows = 2, + .cols = 5, }; static struct platform_device *smdk4x12_devices[] __initdata = { diff --git a/trunk/arch/arm/mach-exynos/mach-smdkv310.c b/trunk/arch/arm/mach-exynos/mach-smdkv310.c index 7b1b86663e51..262e9e446a96 100644 --- a/trunk/arch/arm/mach-exynos/mach-smdkv310.c +++ b/trunk/arch/arm/mach-exynos/mach-smdkv310.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -272,9 +271,6 @@ static void __init smdkv310_ohci_init(void) exynos4_ohci_set_platdata(pdata); } -/* USB OTG */ -static struct s3c_hsotg_plat smdkv310_hsotg_pdata; - static struct platform_device *smdkv310_devices[] __initdata = { &s3c_device_hsmmc0, &s3c_device_hsmmc1, @@ -283,7 +279,6 @@ static struct platform_device *smdkv310_devices[] __initdata = { &s3c_device_i2c1, &s5p_device_i2c_hdmiphy, &s3c_device_rtc, - &s3c_device_usb_hsotg, &s3c_device_wdt, &s5p_device_ehci, &s5p_device_fimc0, @@ -395,7 +390,6 @@ static void __init smdkv310_machine_init(void) smdkv310_ehci_init(); smdkv310_ohci_init(); - s3c_hsotg_set_platdata(&smdkv310_hsotg_pdata); clk_xusbxti.rate = 24000000; platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); diff --git a/trunk/arch/arm/mach-omap2/Makefile b/trunk/arch/arm/mach-omap2/Makefile index fa742f3c2629..a636cdc08876 100644 --- a/trunk/arch/arm/mach-omap2/Makefile +++ b/trunk/arch/arm/mach-omap2/Makefile @@ -189,6 +189,10 @@ endif # OMAP2420 MSDI controller integration support ("MMC") obj-$(CONFIG_SOC_OMAP2420) += msdi.o +ifneq ($(CONFIG_DRM_OMAP),) +obj-y += drm.o +endif + # Specific board support obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o diff --git a/trunk/arch/arm/mach-omap2/drm.c b/trunk/arch/arm/mach-omap2/drm.c new file mode 100644 index 000000000000..72e0f01b715c --- /dev/null +++ b/trunk/arch/arm/mach-omap2/drm.c @@ -0,0 +1,61 @@ +/* + * DRM/KMS device registration for TI OMAP platforms + * + * Copyright (C) 2012 Texas Instruments + * Author: Rob Clark + * + * 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. + * + * 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. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) + +static struct platform_device omap_drm_device = { + .dev = { + .coherent_dma_mask = DMA_BIT_MASK(32), + }, + .name = "omapdrm", + .id = 0, +}; + +static int __init omap_init_drm(void) +{ + struct omap_hwmod *oh = NULL; + struct platform_device *pdev; + + /* lookup and populate the DMM information, if present - OMAP4+ */ + oh = omap_hwmod_lookup("dmm"); + + if (oh) { + pdev = omap_device_build(oh->name, -1, oh, NULL, 0, NULL, 0, + false); + WARN(IS_ERR(pdev), "Could not build omap_device for %s\n", + oh->name); + } + + return platform_device_register(&omap_drm_device); + +} + +arch_initcall(omap_init_drm); + +#endif diff --git a/trunk/arch/arm/mach-s3c64xx/include/mach/crag6410.h b/trunk/arch/arm/mach-s3c64xx/include/mach/crag6410.h index 4c3c9994fc2c..4cb2f951f1e9 100644 --- a/trunk/arch/arm/mach-s3c64xx/include/mach/crag6410.h +++ b/trunk/arch/arm/mach-s3c64xx/include/mach/crag6410.h @@ -13,7 +13,9 @@ #include -#define GLENFARCLAS_PMIC_IRQ_BASE IRQ_BOARD_START +#define BANFF_PMIC_IRQ_BASE IRQ_BOARD_START +#define GLENFARCLAS_PMIC_IRQ_BASE (IRQ_BOARD_START + 64) +#define CODEC_IRQ_BASE (IRQ_BOARD_START + 128) #define PCA935X_GPIO_BASE GPIO_BOARD_START #define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) diff --git a/trunk/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/trunk/arch/arm/mach-s3c64xx/mach-crag6410-module.c index 4645aa15c82a..7a27f5603c74 100644 --- a/trunk/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/trunk/arch/arm/mach-s3c64xx/mach-crag6410-module.c @@ -39,7 +39,6 @@ static struct spi_board_info wm1253_devs[] = { .bus_num = 0, .chip_select = 0, .mode = SPI_MODE_0, - .irq = S3C_EINT(5), .controller_data = &wm0010_spi_csinfo, }, }; @@ -169,6 +168,7 @@ static struct wm8994_pdata wm8994_pdata = { .gpio_defaults = { 0x3, /* IRQ out, active high, CMOS */ }, + .irq_base = CODEC_IRQ_BASE, .ldo = { { .init_data = &wm8994_ldo1, }, { .init_data = &wm8994_ldo2, }, @@ -182,11 +182,6 @@ static const struct i2c_board_info wm1277_devs[] = { }, }; -static const struct i2c_board_info wm5102_devs[] = { - { I2C_BOARD_INFO("wm5102", 0x1a), - .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, }, -}; - static const struct i2c_board_info wm6230_i2c_devs[] = { { I2C_BOARD_INFO("wm9081", 0x6c), .platform_data = &wm9081_pdata, }, @@ -214,7 +209,6 @@ static __devinitdata const struct { .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 = 0x34, .name = "WM0010-6320-CS42 Balblair" }, { .id = 0x39, .name = "1254-EV1 Dallas Dhu", .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) }, { .id = 0x3a, .name = "1259-EV1 Tobermory", @@ -224,8 +218,6 @@ static __devinitdata const struct { { .id = 0x3c, .name = "1273-EV1 Longmorn" }, { .id = 0x3d, .name = "1277-EV1 Littlemill", .i2c_devs = wm1277_devs, .num_i2c_devs = ARRAY_SIZE(wm1277_devs) }, - { .id = 0x3e, .name = "WM5102-6271-EV1-CS127", - .i2c_devs = wm5102_devs, .num_i2c_devs = ARRAY_SIZE(wm5102_devs) }, }; static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, diff --git a/trunk/arch/arm/mach-s3c64xx/mach-crag6410.c b/trunk/arch/arm/mach-s3c64xx/mach-crag6410.c index 161c3b6218a2..d0c352d861f8 100644 --- a/trunk/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/trunk/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -525,6 +525,7 @@ static struct wm831x_touch_pdata touch_pdata __initdata = { static struct wm831x_pdata crag_pmic_pdata __initdata = { .wm831x_num = 1, + .irq_base = BANFF_PMIC_IRQ_BASE, .gpio_base = BANFF_PMIC_GPIO_BASE, .soft_shutdown = true, diff --git a/trunk/arch/arm/mach-s5pv210/Kconfig b/trunk/arch/arm/mach-s5pv210/Kconfig index 77185c38188b..88e983b0c82e 100644 --- a/trunk/arch/arm/mach-s5pv210/Kconfig +++ b/trunk/arch/arm/mach-s5pv210/Kconfig @@ -152,7 +152,6 @@ config MACH_SMDKV210 select S3C_DEV_I2C1 select S3C_DEV_I2C2 select S3C_DEV_RTC - select S3C_DEV_USB_HSOTG select S3C_DEV_WDT select S5P_DEV_FIMC0 select S5P_DEV_FIMC1 @@ -171,7 +170,6 @@ config MACH_SMDKV210 select S5PV210_SETUP_IDE select S5PV210_SETUP_KEYPAD select S5PV210_SETUP_SDHCI - select S5PV210_SETUP_USB_PHY help Machine support for Samsung SMDKV210 diff --git a/trunk/arch/arm/mach-s5pv210/mach-smdkv210.c b/trunk/arch/arm/mach-s5pv210/mach-smdkv210.c index c8997bce642d..0d7ddec88eb7 100644 --- a/trunk/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/trunk/arch/arm/mach-s5pv210/mach-smdkv210.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -48,7 +47,6 @@ #include #include #include -#include #include "common.h" @@ -205,9 +203,6 @@ static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = { .setup_gpio = s5pv210_fb_gpio_setup_24bpp, }; -/* USB OTG */ -static struct s3c_hsotg_plat smdkv210_hsotg_pdata; - static struct platform_device *smdkv210_devices[] __initdata = { &s3c_device_adc, &s3c_device_cfcon, @@ -221,7 +216,6 @@ static struct platform_device *smdkv210_devices[] __initdata = { &s3c_device_i2c2, &s3c_device_rtc, &s3c_device_ts, - &s3c_device_usb_hsotg, &s3c_device_wdt, &s5p_device_fimc0, &s5p_device_fimc1, @@ -320,9 +314,6 @@ static void __init smdkv210_machine_init(void) samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data); - s3c_hsotg_set_platdata(&smdkv210_hsotg_pdata); - clk_xusbxti.rate = 24000000; - platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); } diff --git a/trunk/arch/arm/mach-tegra/Kconfig b/trunk/arch/arm/mach-tegra/Kconfig index 9077aaa398d9..6a113a9bb87a 100644 --- a/trunk/arch/arm/mach-tegra/Kconfig +++ b/trunk/arch/arm/mach-tegra/Kconfig @@ -63,15 +63,40 @@ comment "Tegra board type" config MACH_HARMONY bool "Harmony board" depends on ARCH_TEGRA_2x_SOC + select MACH_HAS_SND_SOC_TEGRA_WM8903 if SND_SOC help Support for nVidia Harmony development platform +config MACH_KAEN + bool "Kaen board" + depends on ARCH_TEGRA_2x_SOC + select MACH_SEABOARD + select MACH_HAS_SND_SOC_TEGRA_WM8903 if SND_SOC + help + Support for the Kaen version of Seaboard + config MACH_PAZ00 bool "Paz00 board" depends on ARCH_TEGRA_2x_SOC help Support for the Toshiba AC100/Dynabook AZ netbook +config MACH_SEABOARD + bool "Seaboard board" + depends on ARCH_TEGRA_2x_SOC + select MACH_HAS_SND_SOC_TEGRA_WM8903 if SND_SOC + help + Support for nVidia Seaboard development platform. It will + also be included for some of the derivative boards that + have large similarities with the seaboard design. + +config MACH_TEGRA_DT + bool "Generic Tegra20 board (FDT support)" + depends on ARCH_TEGRA_2x_SOC + select USE_OF + help + Support for generic NVIDIA Tegra20 boards using Flattened Device Tree + config MACH_TRIMSLICE bool "TrimSlice board" depends on ARCH_TEGRA_2x_SOC @@ -79,6 +104,20 @@ config MACH_TRIMSLICE help Support for CompuLab TrimSlice platform +config MACH_WARIO + bool "Wario board" + depends on ARCH_TEGRA_2x_SOC + select MACH_SEABOARD + help + Support for the Wario version of Seaboard + +config MACH_VENTANA + bool "Ventana board" + depends on ARCH_TEGRA_2x_SOC + select MACH_TEGRA_DT + help + Support for the nVidia Ventana development platform + choice prompt "Default low-level debug console UART" default TEGRA_DEBUG_UART_NONE diff --git a/trunk/arch/arm/mach-tegra/Makefile b/trunk/arch/arm/mach-tegra/Makefile index 1f6f237586e4..2eb4445ddb14 100644 --- a/trunk/arch/arm/mach-tegra/Makefile +++ b/trunk/arch/arm/mach-tegra/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_CPU_IDLE) += sleep.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += powergate.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_emc.o +obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o obj-$(CONFIG_SMP) += reset.o @@ -22,9 +23,6 @@ obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o obj-$(CONFIG_TEGRA_PCI) += pcie.o obj-$(CONFIG_USB_SUPPORT) += usb_phy.o -obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-dt-tegra20.o -obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o - obj-$(CONFIG_MACH_HARMONY) += board-harmony.o obj-$(CONFIG_MACH_HARMONY) += board-harmony-pinmux.o obj-$(CONFIG_MACH_HARMONY) += board-harmony-pcie.o @@ -33,5 +31,14 @@ obj-$(CONFIG_MACH_HARMONY) += board-harmony-power.o obj-$(CONFIG_MACH_PAZ00) += board-paz00.o obj-$(CONFIG_MACH_PAZ00) += board-paz00-pinmux.o +obj-$(CONFIG_MACH_SEABOARD) += board-seaboard.o +obj-$(CONFIG_MACH_SEABOARD) += board-seaboard-pinmux.o + +obj-$(CONFIG_MACH_TEGRA_DT) += board-dt-tegra20.o +obj-$(CONFIG_MACH_TEGRA_DT) += board-harmony-pinmux.o +obj-$(CONFIG_MACH_TEGRA_DT) += board-seaboard-pinmux.o +obj-$(CONFIG_MACH_TEGRA_DT) += board-paz00-pinmux.o +obj-$(CONFIG_MACH_TEGRA_DT) += board-trimslice-pinmux.o + obj-$(CONFIG_MACH_TRIMSLICE) += board-trimslice.o obj-$(CONFIG_MACH_TRIMSLICE) += board-trimslice-pinmux.o diff --git a/trunk/arch/arm/mach-tegra/Makefile.boot b/trunk/arch/arm/mach-tegra/Makefile.boot index a369f96bd05e..9a82094092d7 100644 --- a/trunk/arch/arm/mach-tegra/Makefile.boot +++ b/trunk/arch/arm/mach-tegra/Makefile.boot @@ -2,9 +2,9 @@ zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) += 0x00008000 params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000 -dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-harmony.dtb -dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-paz00.dtb -dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-seaboard.dtb -dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-trimslice.dtb -dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-ventana.dtb -dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30-cardhu.dtb +dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb +dtb-$(CONFIG_MACH_PAZ00) += tegra-paz00.dtb +dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb +dtb-$(CONFIG_MACH_TRIMSLICE) += tegra-trimslice.dtb +dtb-$(CONFIG_MACH_VENTANA) += tegra-ventana.dtb +dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra-cardhu.dtb diff --git a/trunk/arch/arm/mach-tegra/board-dt-tegra20.c b/trunk/arch/arm/mach-tegra/board-dt-tegra20.c index d0de9c1192f7..eb7249db50a5 100644 --- a/trunk/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/trunk/arch/arm/mach-tegra/board-dt-tegra20.c @@ -64,7 +64,6 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { &tegra_ehci2_pdata), OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB3_BASE, "tegra-ehci.2", &tegra_ehci3_pdata), - OF_DEV_AUXDATA("nvidia,tegra20-apbdma", 0x6000a000, "tegra-apbdma", NULL), {} }; @@ -82,6 +81,11 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { { NULL, NULL, 0, 0}, }; +static struct of_device_id tegra_dt_match_table[] __initdata = { + { .compatible = "simple-bus", }, + {} +}; + static void __init tegra_dt_init(void) { tegra_clk_init_from_table(tegra_dt_clk_init_table); @@ -90,74 +94,10 @@ static void __init tegra_dt_init(void) * Finished with the static registrations now; fill in the missing * devices */ - of_platform_populate(NULL, of_default_bus_match_table, + of_platform_populate(NULL, tegra_dt_match_table, tegra20_auxdata_lookup, NULL); } -#ifdef CONFIG_MACH_TRIMSLICE -static void __init trimslice_init(void) -{ - int ret; - - ret = tegra_pcie_init(true, true); - if (ret) - pr_err("tegra_pci_init() failed: %d\n", ret); -} -#endif - -#ifdef CONFIG_MACH_HARMONY -static void __init harmony_init(void) -{ - int ret; - - ret = harmony_regulator_init(); - if (ret) { - pr_err("harmony_regulator_init() failed: %d\n", ret); - return; - } - - ret = harmony_pcie_init(); - if (ret) - pr_err("harmony_pcie_init() failed: %d\n", ret); -} -#endif - -#ifdef CONFIG_MACH_PAZ00 -static void __init paz00_init(void) -{ - tegra_paz00_wifikill_init(); -} -#endif - -static struct { - char *machine; - void (*init)(void); -} board_init_funcs[] = { -#ifdef CONFIG_MACH_TRIMSLICE - { "compulab,trimslice", trimslice_init }, -#endif -#ifdef CONFIG_MACH_HARMONY - { "nvidia,harmony", harmony_init }, -#endif -#ifdef CONFIG_MACH_PAZ00 - { "compal,paz00", paz00_init }, -#endif -}; - -static void __init tegra_dt_init_late(void) -{ - int i; - - tegra_init_late(); - - for (i = 0; i < ARRAY_SIZE(board_init_funcs); i++) { - if (of_machine_is_compatible(board_init_funcs[i].machine)) { - board_init_funcs[i].init(); - break; - } - } -} - static const char *tegra20_dt_board_compat[] = { "nvidia,tegra20", NULL @@ -170,7 +110,7 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)") .handle_irq = gic_handle_irq, .timer = &tegra_timer, .init_machine = tegra_dt_init, - .init_late = tegra_dt_init_late, + .init_late = tegra_init_late, .restart = tegra_assert_system_reset, .dt_compat = tegra20_dt_board_compat, MACHINE_END diff --git a/trunk/arch/arm/mach-tegra/board-dt-tegra30.c b/trunk/arch/arm/mach-tegra/board-dt-tegra30.c index ee48214bfd89..4f76fa7a5da3 100644 --- a/trunk/arch/arm/mach-tegra/board-dt-tegra30.c +++ b/trunk/arch/arm/mach-tegra/board-dt-tegra30.c @@ -36,6 +36,11 @@ #include "board.h" #include "clock.h" +static struct of_device_id tegra_dt_match_table[] __initdata = { + { .compatible = "simple-bus", }, + {} +}; + struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000000, "sdhci-tegra.0", NULL), OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000200, "sdhci-tegra.1", NULL), @@ -47,7 +52,6 @@ struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C700, "tegra-i2c.3", NULL), OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000D000, "tegra-i2c.4", NULL), OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL), - OF_DEV_AUXDATA("nvidia,tegra30-apbdma", 0x6000a000, "tegra-apbdma", NULL), {} }; @@ -70,7 +74,7 @@ static void __init tegra30_dt_init(void) { tegra_clk_init_from_table(tegra_dt_clk_init_table); - of_platform_populate(NULL, of_default_bus_match_table, + of_platform_populate(NULL, tegra_dt_match_table, tegra30_auxdata_lookup, NULL); } diff --git a/trunk/arch/arm/mach-tegra/board-harmony-pcie.c b/trunk/arch/arm/mach-tegra/board-harmony-pcie.c index e8c3fda9bec2..33c4fedab840 100644 --- a/trunk/arch/arm/mach-tegra/board-harmony-pcie.c +++ b/trunk/arch/arm/mach-tegra/board-harmony-pcie.c @@ -27,11 +27,14 @@ #ifdef CONFIG_TEGRA_PCI -int __init harmony_pcie_init(void) +static int __init harmony_pcie_init(void) { struct regulator *regulator = NULL; int err; + if (!machine_is_harmony()) + return 0; + err = gpio_request(TEGRA_GPIO_EN_VDD_1V05_GPIO, "EN_VDD_1V05"); if (err) return err; @@ -59,15 +62,7 @@ int __init harmony_pcie_init(void) return err; } -static int __init harmony_pcie_initcall(void) -{ - if (!machine_is_harmony()) - return 0; - - return harmony_pcie_init(); -} - /* PCI should be initialized after I2C, mfd and regulators */ -subsys_initcall_sync(harmony_pcie_initcall); +subsys_initcall_sync(harmony_pcie_init); #endif diff --git a/trunk/arch/arm/mach-tegra/board-harmony-power.c b/trunk/arch/arm/mach-tegra/board-harmony-power.c index 44dcb2e869b5..82f32300796c 100644 --- a/trunk/arch/arm/mach-tegra/board-harmony-power.c +++ b/trunk/arch/arm/mach-tegra/board-harmony-power.c @@ -20,10 +20,6 @@ #include #include #include -#include -#include - -#include #include @@ -114,26 +110,7 @@ static struct i2c_board_info __initdata harmony_regulators[] = { int __init harmony_regulator_init(void) { - if (machine_is_harmony()) { - i2c_register_board_info(3, harmony_regulators, 1); - } else { /* Harmony, booted using device tree */ - struct device_node *np; - struct i2c_adapter *adapter; - - np = of_find_node_by_path("/i2c@7000d000"); - if (np == NULL) { - pr_err("Could not find device_node for DVC I2C\n"); - return -ENODEV; - } - - adapter = of_find_i2c_adapter_by_node(np); - if (!adapter) { - pr_err("Could not find i2c_adapter for DVC I2C\n"); - return -ENODEV; - } - - i2c_new_device(adapter, harmony_regulators); - } + i2c_register_board_info(3, harmony_regulators, 1); return 0; } diff --git a/trunk/arch/arm/mach-tegra/board-paz00.c b/trunk/arch/arm/mach-tegra/board-paz00.c index 4b64af5cab27..bbc1907e98a6 100644 --- a/trunk/arch/arm/mach-tegra/board-paz00.c +++ b/trunk/arch/arm/mach-tegra/board-paz00.c @@ -148,6 +148,7 @@ static struct platform_device *paz00_devices[] __initdata = { &debug_uart, &tegra_sdhci_device4, &tegra_sdhci_device1, + &wifi_rfkill_device, &leds_gpio, &gpio_keys_device, }; @@ -200,11 +201,6 @@ static struct tegra_sdhci_platform_data sdhci_pdata4 = { .is_8bit = 1, }; -void __init tegra_paz00_wifikill_init(void) -{ - platform_device_register(&wifi_rfkill_device); -} - static void __init tegra_paz00_init(void) { tegra_clk_init_from_table(paz00_clk_init_table); @@ -215,7 +211,6 @@ static void __init tegra_paz00_init(void) tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices)); - tegra_paz00_wifikill_init(); paz00_i2c_init(); paz00_usb_init(); diff --git a/trunk/arch/arm/mach-tegra/board-seaboard-pinmux.c b/trunk/arch/arm/mach-tegra/board-seaboard-pinmux.c new file mode 100644 index 000000000000..11fc8a568c64 --- /dev/null +++ b/trunk/arch/arm/mach-tegra/board-seaboard-pinmux.c @@ -0,0 +1,197 @@ +/* + * Copyright (C) 2010-2012 NVIDIA Corporation + * Copyright (C) 2011 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * 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 + +#include "board-seaboard.h" +#include "board-pinmux.h" + +static unsigned long seaboard_pincfg_drive_sdio1[] = { + TEGRA_PINCONF_PACK(TEGRA_PINCONF_PARAM_HIGH_SPEED_MODE, 0), + TEGRA_PINCONF_PACK(TEGRA_PINCONF_PARAM_SCHMITT, 0), + TEGRA_PINCONF_PACK(TEGRA_PINCONF_PARAM_LOW_POWER_MODE, 3), + TEGRA_PINCONF_PACK(TEGRA_PINCONF_PARAM_DRIVE_DOWN_STRENGTH, 31), + TEGRA_PINCONF_PACK(TEGRA_PINCONF_PARAM_DRIVE_UP_STRENGTH, 31), + TEGRA_PINCONF_PACK(TEGRA_PINCONF_PARAM_SLEW_RATE_FALLING, 3), + TEGRA_PINCONF_PACK(TEGRA_PINCONF_PARAM_SLEW_RATE_RISING, 3), +}; + +static struct pinctrl_map common_map[] = { + TEGRA_MAP_MUXCONF("ata", "ide", none, driven), + TEGRA_MAP_MUXCONF("atb", "sdio4", none, driven), + TEGRA_MAP_MUXCONF("atc", "nand", none, driven), + TEGRA_MAP_MUXCONF("atd", "gmi", none, driven), + TEGRA_MAP_MUXCONF("ate", "gmi", none, tristate), + TEGRA_MAP_MUXCONF("cdev1", "plla_out", none, driven), + TEGRA_MAP_MUXCONF("cdev2", "pllp_out4", none, driven), + TEGRA_MAP_MUXCONF("crtp", "crt", up, tristate), + TEGRA_MAP_MUXCONF("csus", "vi_sensor_clk", none, tristate), + TEGRA_MAP_MUXCONF("dap1", "dap1", none, driven), + TEGRA_MAP_MUXCONF("dap2", "dap2", none, driven), + TEGRA_MAP_MUXCONF("dap3", "dap3", none, tristate), + TEGRA_MAP_MUXCONF("dap4", "dap4", none, driven), + TEGRA_MAP_MUXCONF("dta", "vi", down, driven), + TEGRA_MAP_MUXCONF("dtb", "vi", down, driven), + TEGRA_MAP_MUXCONF("dtc", "vi", down, driven), + TEGRA_MAP_MUXCONF("dtd", "vi", down, driven), + TEGRA_MAP_MUXCONF("dte", "vi", down, tristate), + TEGRA_MAP_MUXCONF("dtf", "i2c3", none, driven), + TEGRA_MAP_MUXCONF("gma", "sdio4", none, driven), + TEGRA_MAP_MUXCONF("gmb", "gmi", up, tristate), + TEGRA_MAP_MUXCONF("gmc", "uartd", none, driven), + TEGRA_MAP_MUXCONF("gme", "sdio4", none, driven), + TEGRA_MAP_MUXCONF("gpu", "pwm", none, driven), + TEGRA_MAP_MUXCONF("gpu7", "rtck", none, driven), + TEGRA_MAP_MUXCONF("gpv", "pcie", none, tristate), + TEGRA_MAP_MUXCONF("hdint", "hdmi", na, tristate), + TEGRA_MAP_MUXCONF("i2cp", "i2cp", none, driven), + TEGRA_MAP_MUXCONF("irrx", "uartb", none, driven), + TEGRA_MAP_MUXCONF("irtx", "uartb", none, driven), + TEGRA_MAP_MUXCONF("kbca", "kbc", up, driven), + TEGRA_MAP_MUXCONF("kbcb", "kbc", up, driven), + TEGRA_MAP_MUXCONF("kbcc", "kbc", up, driven), + TEGRA_MAP_MUXCONF("kbcd", "kbc", up, driven), + TEGRA_MAP_MUXCONF("kbce", "kbc", up, driven), + TEGRA_MAP_MUXCONF("kbcf", "kbc", up, driven), + TEGRA_MAP_MUXCONF("lcsn", "rsvd4", na, tristate), + TEGRA_MAP_MUXCONF("ld0", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld1", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld10", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld11", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld12", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld13", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld14", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld15", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld16", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld17", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld2", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld3", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld4", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld5", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld6", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld7", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld8", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ld9", "displaya", na, driven), + TEGRA_MAP_MUXCONF("ldc", "rsvd4", na, tristate), + TEGRA_MAP_MUXCONF("ldi", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lhp0", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lhp1", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lhp2", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lhs", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lm0", "rsvd4", na, driven), + TEGRA_MAP_MUXCONF("lm1", "crt", na, tristate), + TEGRA_MAP_MUXCONF("lpp", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lpw1", "rsvd4", na, tristate), + TEGRA_MAP_MUXCONF("lsc0", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lsdi", "rsvd4", na, tristate), + TEGRA_MAP_MUXCONF("lspi", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lvp0", "rsvd4", na, tristate), + TEGRA_MAP_MUXCONF("lvp1", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lvs", "displaya", na, driven), + TEGRA_MAP_MUXCONF("owc", "rsvd2", none, tristate), + TEGRA_MAP_MUXCONF("pmc", "pwr_on", na, driven), + TEGRA_MAP_MUXCONF("pta", "hdmi", none, driven), + TEGRA_MAP_MUXCONF("rm", "i2c1", none, driven), + TEGRA_MAP_MUXCONF("sdb", "sdio3", na, driven), + TEGRA_MAP_MUXCONF("sdc", "sdio3", none, driven), + TEGRA_MAP_MUXCONF("sdd", "sdio3", none, driven), + TEGRA_MAP_MUXCONF("sdio1", "sdio1", up, driven), + TEGRA_MAP_MUXCONF("slxa", "pcie", up, tristate), + TEGRA_MAP_MUXCONF("slxd", "spdif", none, driven), + TEGRA_MAP_MUXCONF("slxk", "pcie", none, driven), + TEGRA_MAP_MUXCONF("spdi", "rsvd2", none, driven), + TEGRA_MAP_MUXCONF("spdo", "rsvd2", none, driven), + TEGRA_MAP_MUXCONF("spib", "gmi", none, tristate), + TEGRA_MAP_MUXCONF("spid", "spi1", none, tristate), + TEGRA_MAP_MUXCONF("spie", "spi1", none, tristate), + TEGRA_MAP_MUXCONF("spif", "spi1", down, tristate), + TEGRA_MAP_MUXCONF("spih", "spi2_alt", up, tristate), + TEGRA_MAP_MUXCONF("uaa", "ulpi", up, driven), + TEGRA_MAP_MUXCONF("uab", "ulpi", up, driven), + TEGRA_MAP_MUXCONF("uac", "rsvd2", none, driven), + TEGRA_MAP_MUXCONF("uad", "irda", none, driven), + TEGRA_MAP_MUXCONF("uca", "uartc", none, driven), + TEGRA_MAP_MUXCONF("ucb", "uartc", none, driven), + TEGRA_MAP_MUXCONF("uda", "ulpi", none, driven), + TEGRA_MAP_CONF("ck32", none, na), + TEGRA_MAP_CONF("ddrc", none, na), + TEGRA_MAP_CONF("pmca", none, na), + TEGRA_MAP_CONF("pmcb", none, na), + TEGRA_MAP_CONF("pmcc", none, na), + TEGRA_MAP_CONF("pmcd", none, na), + TEGRA_MAP_CONF("pmce", none, na), + TEGRA_MAP_CONF("xm2c", none, na), + TEGRA_MAP_CONF("xm2d", none, na), + TEGRA_MAP_CONF("ls", up, na), + TEGRA_MAP_CONF("lc", up, na), + TEGRA_MAP_CONF("ld17_0", down, na), + TEGRA_MAP_CONF("ld19_18", down, na), + TEGRA_MAP_CONF("ld21_20", down, na), + TEGRA_MAP_CONF("ld23_22", down, na), +}; + +static struct pinctrl_map seaboard_map[] = { + TEGRA_MAP_MUXCONF("ddc", "rsvd2", none, tristate), + TEGRA_MAP_MUXCONF("gmd", "sflash", none, driven), + TEGRA_MAP_MUXCONF("lpw0", "hdmi", na, driven), + TEGRA_MAP_MUXCONF("lpw2", "hdmi", na, driven), + TEGRA_MAP_MUXCONF("lsc1", "hdmi", na, tristate), + TEGRA_MAP_MUXCONF("lsck", "hdmi", na, tristate), + TEGRA_MAP_MUXCONF("lsda", "hdmi", na, tristate), + TEGRA_MAP_MUXCONF("slxc", "spdif", none, tristate), + TEGRA_MAP_MUXCONF("spia", "gmi", up, tristate), + TEGRA_MAP_MUXCONF("spic", "gmi", up, driven), + TEGRA_MAP_MUXCONF("spig", "spi2_alt", up, tristate), + PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(PINMUX_DEV, "drive_sdio1", seaboard_pincfg_drive_sdio1), +}; + +static struct pinctrl_map ventana_map[] = { + TEGRA_MAP_MUXCONF("ddc", "rsvd2", none, driven), + TEGRA_MAP_MUXCONF("gmd", "sflash", none, tristate), + TEGRA_MAP_MUXCONF("lpw0", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lpw2", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lsc1", "displaya", na, driven), + TEGRA_MAP_MUXCONF("lsck", "displaya", na, tristate), + TEGRA_MAP_MUXCONF("lsda", "displaya", na, tristate), + TEGRA_MAP_MUXCONF("slxc", "sdio3", none, driven), + TEGRA_MAP_MUXCONF("spia", "gmi", none, tristate), + TEGRA_MAP_MUXCONF("spic", "gmi", none, tristate), + TEGRA_MAP_MUXCONF("spig", "spi2_alt", none, tristate), +}; + +static struct tegra_board_pinmux_conf common_conf = { + .maps = common_map, + .map_count = ARRAY_SIZE(common_map), +}; + +static struct tegra_board_pinmux_conf seaboard_conf = { + .maps = seaboard_map, + .map_count = ARRAY_SIZE(seaboard_map), +}; + +static struct tegra_board_pinmux_conf ventana_conf = { + .maps = ventana_map, + .map_count = ARRAY_SIZE(ventana_map), +}; + +void seaboard_pinmux_init(void) +{ + tegra_board_pinmux_init(&common_conf, &seaboard_conf); +} + +void ventana_pinmux_init(void) +{ + tegra_board_pinmux_init(&common_conf, &ventana_conf); +} diff --git a/trunk/arch/arm/mach-tegra/board-seaboard.c b/trunk/arch/arm/mach-tegra/board-seaboard.c new file mode 100644 index 000000000000..71e9f3fc7fba --- /dev/null +++ b/trunk/arch/arm/mach-tegra/board-seaboard.c @@ -0,0 +1,306 @@ +/* + * Copyright (c) 2010, 2011 NVIDIA Corporation. + * Copyright (C) 2010, 2011 Google, Inc. + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "board.h" +#include "board-seaboard.h" +#include "clock.h" +#include "devices.h" +#include "gpio-names.h" + +static struct plat_serial8250_port debug_uart_platform_data[] = { + { + /* Memory and IRQ filled in before registration */ + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, + .handle_break = tegra_serial_handle_break, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = 216000000, + }, { + .flags = 0, + } +}; + +static struct platform_device debug_uart = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = debug_uart_platform_data, + }, +}; + +static __initdata struct tegra_clk_init_table seaboard_clk_init_table[] = { + /* name parent rate enabled */ + { "uartb", "pll_p", 216000000, true}, + { "uartd", "pll_p", 216000000, true}, + { "pll_a", "pll_p_out1", 56448000, true }, + { "pll_a_out0", "pll_a", 11289600, true }, + { "cdev1", NULL, 0, true }, + { "i2s1", "pll_a_out0", 11289600, false}, + { "usbd", "clk_m", 12000000, true}, + { "usb3", "clk_m", 12000000, true}, + { NULL, NULL, 0, 0}, +}; + +static struct gpio_keys_button seaboard_gpio_keys_buttons[] = { + { + .code = SW_LID, + .gpio = TEGRA_GPIO_LIDSWITCH, + .active_low = 0, + .desc = "Lid", + .type = EV_SW, + .wakeup = 1, + .debounce_interval = 1, + }, + { + .code = KEY_POWER, + .gpio = TEGRA_GPIO_POWERKEY, + .active_low = 1, + .desc = "Power", + .type = EV_KEY, + .wakeup = 1, + }, +}; + +static struct gpio_keys_platform_data seaboard_gpio_keys = { + .buttons = seaboard_gpio_keys_buttons, + .nbuttons = ARRAY_SIZE(seaboard_gpio_keys_buttons), +}; + +static struct platform_device seaboard_gpio_keys_device = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &seaboard_gpio_keys, + } +}; + +static struct tegra_sdhci_platform_data sdhci_pdata1 = { + .cd_gpio = -1, + .wp_gpio = -1, + .power_gpio = -1, +}; + +static struct tegra_sdhci_platform_data sdhci_pdata3 = { + .cd_gpio = TEGRA_GPIO_SD2_CD, + .wp_gpio = TEGRA_GPIO_SD2_WP, + .power_gpio = TEGRA_GPIO_SD2_POWER, +}; + +static struct tegra_sdhci_platform_data sdhci_pdata4 = { + .cd_gpio = -1, + .wp_gpio = -1, + .power_gpio = -1, + .is_8bit = 1, +}; + +static struct tegra_wm8903_platform_data seaboard_audio_pdata = { + .gpio_spkr_en = TEGRA_GPIO_SPKR_EN, + .gpio_hp_det = TEGRA_GPIO_HP_DET, + .gpio_hp_mute = -1, + .gpio_int_mic_en = -1, + .gpio_ext_mic_en = -1, +}; + +static struct platform_device seaboard_audio_device = { + .name = "tegra-snd-wm8903", + .id = 0, + .dev = { + .platform_data = &seaboard_audio_pdata, + }, +}; + +static struct platform_device *seaboard_devices[] __initdata = { + &debug_uart, + &tegra_pmu_device, + &tegra_sdhci_device4, + &tegra_sdhci_device3, + &tegra_sdhci_device1, + &seaboard_gpio_keys_device, + &tegra_i2s_device1, + &tegra_das_device, + &seaboard_audio_device, +}; + +static struct i2c_board_info __initdata isl29018_device = { + I2C_BOARD_INFO("isl29018", 0x44), +}; + +static struct i2c_board_info __initdata adt7461_device = { + I2C_BOARD_INFO("adt7461", 0x4c), +}; + +static struct wm8903_platform_data wm8903_pdata = { + .irq_active_low = 0, + .micdet_cfg = 0, + .micdet_delay = 100, + .gpio_base = SEABOARD_GPIO_WM8903(0), + .gpio_cfg = { + 0, + 0, + WM8903_GPIO_CONFIG_ZERO, + 0, + 0, + }, +}; + +static struct i2c_board_info __initdata wm8903_device = { + I2C_BOARD_INFO("wm8903", 0x1a), + .platform_data = &wm8903_pdata, +}; + +static int seaboard_ehci_init(void) +{ + struct tegra_ehci_platform_data *pdata; + + pdata = tegra_ehci1_device.dev.platform_data; + pdata->vbus_gpio = TEGRA_GPIO_USB1; + + platform_device_register(&tegra_ehci1_device); + platform_device_register(&tegra_ehci3_device); + + return 0; +} + +static void __init seaboard_i2c_init(void) +{ + isl29018_device.irq = gpio_to_irq(TEGRA_GPIO_ISL29018_IRQ); + i2c_register_board_info(0, &isl29018_device, 1); + + wm8903_device.irq = gpio_to_irq(TEGRA_GPIO_CDC_IRQ); + i2c_register_board_info(0, &wm8903_device, 1); + + i2c_register_board_info(3, &adt7461_device, 1); + + platform_device_register(&tegra_i2c_device1); + platform_device_register(&tegra_i2c_device2); + platform_device_register(&tegra_i2c_device3); + platform_device_register(&tegra_i2c_device4); +} + +static void __init seaboard_common_init(void) +{ + seaboard_pinmux_init(); + + tegra_clk_init_from_table(seaboard_clk_init_table); + + tegra_sdhci_device1.dev.platform_data = &sdhci_pdata1; + tegra_sdhci_device3.dev.platform_data = &sdhci_pdata3; + tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; + + platform_add_devices(seaboard_devices, ARRAY_SIZE(seaboard_devices)); + + seaboard_ehci_init(); +} + +static void __init tegra_seaboard_init(void) +{ + /* Seaboard uses UARTD for the debug port. */ + debug_uart_platform_data[0].membase = IO_ADDRESS(TEGRA_UARTD_BASE); + debug_uart_platform_data[0].mapbase = TEGRA_UARTD_BASE; + debug_uart_platform_data[0].irq = INT_UARTD; + + seaboard_common_init(); + + seaboard_i2c_init(); +} + +static void __init tegra_kaen_init(void) +{ + /* Kaen uses UARTB for the debug port. */ + debug_uart_platform_data[0].membase = IO_ADDRESS(TEGRA_UARTB_BASE); + debug_uart_platform_data[0].mapbase = TEGRA_UARTB_BASE; + debug_uart_platform_data[0].irq = INT_UARTB; + + seaboard_audio_pdata.gpio_hp_mute = TEGRA_GPIO_KAEN_HP_MUTE; + + seaboard_common_init(); + + seaboard_i2c_init(); +} + +static void __init tegra_wario_init(void) +{ + /* Wario uses UARTB for the debug port. */ + debug_uart_platform_data[0].membase = IO_ADDRESS(TEGRA_UARTB_BASE); + debug_uart_platform_data[0].mapbase = TEGRA_UARTB_BASE; + debug_uart_platform_data[0].irq = INT_UARTB; + + seaboard_common_init(); + + seaboard_i2c_init(); +} + + +MACHINE_START(SEABOARD, "seaboard") + .atag_offset = 0x100, + .map_io = tegra_map_common_io, + .init_early = tegra20_init_early, + .init_irq = tegra_init_irq, + .handle_irq = gic_handle_irq, + .timer = &tegra_timer, + .init_machine = tegra_seaboard_init, + .init_late = tegra_init_late, + .restart = tegra_assert_system_reset, +MACHINE_END + +MACHINE_START(KAEN, "kaen") + .atag_offset = 0x100, + .map_io = tegra_map_common_io, + .init_early = tegra20_init_early, + .init_irq = tegra_init_irq, + .handle_irq = gic_handle_irq, + .timer = &tegra_timer, + .init_machine = tegra_kaen_init, + .init_late = tegra_init_late, + .restart = tegra_assert_system_reset, +MACHINE_END + +MACHINE_START(WARIO, "wario") + .atag_offset = 0x100, + .map_io = tegra_map_common_io, + .init_early = tegra20_init_early, + .init_irq = tegra_init_irq, + .handle_irq = gic_handle_irq, + .timer = &tegra_timer, + .init_machine = tegra_wario_init, + .init_late = tegra_init_late, + .restart = tegra_assert_system_reset, +MACHINE_END diff --git a/trunk/arch/arm/mach-tegra/board-seaboard.h b/trunk/arch/arm/mach-tegra/board-seaboard.h new file mode 100644 index 000000000000..4c45d4ca3c49 --- /dev/null +++ b/trunk/arch/arm/mach-tegra/board-seaboard.h @@ -0,0 +1,47 @@ +/* + * arch/arm/mach-tegra/board-seaboard.h + * + * Copyright (C) 2010 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * 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. + * + */ + +#ifndef _MACH_TEGRA_BOARD_SEABOARD_H +#define _MACH_TEGRA_BOARD_SEABOARD_H + +#include + +#define SEABOARD_GPIO_TPS6586X(_x_) (TEGRA_NR_GPIOS + (_x_)) +#define SEABOARD_GPIO_WM8903(_x_) (SEABOARD_GPIO_TPS6586X(4) + (_x_)) + +#define TEGRA_GPIO_SD2_CD TEGRA_GPIO_PI5 +#define TEGRA_GPIO_SD2_WP TEGRA_GPIO_PH1 +#define TEGRA_GPIO_SD2_POWER TEGRA_GPIO_PI6 +#define TEGRA_GPIO_LIDSWITCH TEGRA_GPIO_PC7 +#define TEGRA_GPIO_USB1 TEGRA_GPIO_PD0 +#define TEGRA_GPIO_POWERKEY TEGRA_GPIO_PV2 +#define TEGRA_GPIO_BACKLIGHT TEGRA_GPIO_PD4 +#define TEGRA_GPIO_LVDS_SHUTDOWN TEGRA_GPIO_PB2 +#define TEGRA_GPIO_BACKLIGHT_PWM TEGRA_GPIO_PU5 +#define TEGRA_GPIO_BACKLIGHT_VDD TEGRA_GPIO_PW0 +#define TEGRA_GPIO_EN_VDD_PNL TEGRA_GPIO_PC6 +#define TEGRA_GPIO_MAGNETOMETER TEGRA_GPIO_PN5 +#define TEGRA_GPIO_ISL29018_IRQ TEGRA_GPIO_PZ2 +#define TEGRA_GPIO_AC_ONLINE TEGRA_GPIO_PV3 +#define TEGRA_GPIO_WWAN_PWR SEABOARD_GPIO_TPS6586X(2) +#define TEGRA_GPIO_CDC_IRQ TEGRA_GPIO_PX3 +#define TEGRA_GPIO_SPKR_EN SEABOARD_GPIO_WM8903(2) +#define TEGRA_GPIO_HP_DET TEGRA_GPIO_PX1 +#define TEGRA_GPIO_KAEN_HP_MUTE TEGRA_GPIO_PA5 + +void seaboard_pinmux_init(void); + +#endif diff --git a/trunk/arch/arm/mach-tegra/board.h b/trunk/arch/arm/mach-tegra/board.h index f88e5143c767..65014968fc6c 100644 --- a/trunk/arch/arm/mach-tegra/board.h +++ b/trunk/arch/arm/mach-tegra/board.h @@ -46,14 +46,5 @@ int __init tegra_powergate_debugfs_init(void); static inline int tegra_powergate_debugfs_init(void) { return 0; } #endif -int __init harmony_regulator_init(void); -#ifdef CONFIG_TEGRA_PCI -int __init harmony_pcie_init(void); -#else -static inline int harmony_pcie_init(void) { return 0; } -#endif - -void __init tegra_paz00_wifikill_init(void); - extern struct sys_timer tegra_timer; #endif diff --git a/trunk/arch/arm/mach-tegra/cpuidle.c b/trunk/arch/arm/mach-tegra/cpuidle.c index 566e2f88899b..d83a8c0296f5 100644 --- a/trunk/arch/arm/mach-tegra/cpuidle.c +++ b/trunk/arch/arm/mach-tegra/cpuidle.c @@ -27,10 +27,10 @@ #include #include -#include - #include +extern void tegra_cpu_wfi(void); + static int tegra_idle_enter_lp3(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index); @@ -64,7 +64,7 @@ static int tegra_idle_enter_lp3(struct cpuidle_device *dev, enter = ktime_get(); - cpu_do_idle(); + tegra_cpu_wfi(); exit = ktime_sub(ktime_get(), enter); us = ktime_to_us(exit); diff --git a/trunk/arch/arm/mach-tegra/sleep.S b/trunk/arch/arm/mach-tegra/sleep.S index d29b156a8011..5b20197bae7f 100644 --- a/trunk/arch/arm/mach-tegra/sleep.S +++ b/trunk/arch/arm/mach-tegra/sleep.S @@ -62,3 +62,32 @@ movw \reg, #:lower16:\val movt \reg, #:upper16:\val .endm + +/* + * tegra_cpu_wfi + * + * puts current CPU in clock-gated wfi using the flow controller + * + * corrupts r0-r3 + * must be called with MMU on + */ + +ENTRY(tegra_cpu_wfi) + cpu_id r0 + cpu_to_halt_reg r1, r0 + cpu_to_csr_reg r2, r0 + mov32 r0, TEGRA_FLOW_CTRL_VIRT + mov r3, #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG + str r3, [r0, r2] @ clear event & interrupt status + mov r3, #FLOW_CTRL_WAIT_FOR_INTERRUPT | FLOW_CTRL_JTAG_RESUME + str r3, [r0, r1] @ put flow controller in wait irq mode + dsb + wfi + mov r3, #0 + str r3, [r0, r1] @ clear flow controller halt status + mov r3, #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG + str r3, [r0, r2] @ clear event & interrupt status + dsb + mov pc, lr +ENDPROC(tegra_cpu_wfi) + diff --git a/trunk/drivers/amba/tegra-ahb.c b/trunk/drivers/amba/tegra-ahb.c index 0b6f0b28a487..aa0b1f160528 100644 --- a/trunk/drivers/amba/tegra-ahb.c +++ b/trunk/drivers/amba/tegra-ahb.c @@ -264,6 +264,11 @@ static int __devinit tegra_ahb_probe(struct platform_device *pdev) return 0; } +static int __devexit tegra_ahb_remove(struct platform_device *pdev) +{ + return 0; +} + static const struct of_device_id tegra_ahb_of_match[] __devinitconst = { { .compatible = "nvidia,tegra30-ahb", }, { .compatible = "nvidia,tegra20-ahb", }, @@ -272,6 +277,7 @@ static const struct of_device_id tegra_ahb_of_match[] __devinitconst = { static struct platform_driver tegra_ahb_driver = { .probe = tegra_ahb_probe, + .remove = __devexit_p(tegra_ahb_remove), .driver = { .name = DRV_NAME, .owner = THIS_MODULE, diff --git a/trunk/drivers/mmc/host/sdhci-tegra.c b/trunk/drivers/mmc/host/sdhci-tegra.c index 6e5338a071ce..b38d8a78f6a0 100644 --- a/trunk/drivers/mmc/host/sdhci-tegra.c +++ b/trunk/drivers/mmc/host/sdhci-tegra.c @@ -223,7 +223,6 @@ static struct tegra_sdhci_platform_data * __devinit sdhci_tegra_dt_parse_pdata( { struct tegra_sdhci_platform_data *plat; struct device_node *np = pdev->dev.of_node; - u32 bus_width; if (!np) return NULL; @@ -237,9 +236,7 @@ static struct tegra_sdhci_platform_data * __devinit sdhci_tegra_dt_parse_pdata( plat->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0); plat->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0); plat->power_gpio = of_get_named_gpio(np, "power-gpios", 0); - - if (of_property_read_u32(np, "bus-width", &bus_width) == 0 && - bus_width == 8) + if (of_find_property(np, "support-8bit", NULL)) plat->is_8bit = 1; return plat; diff --git a/trunk/drivers/staging/omapdrm/omap_drv.h b/trunk/drivers/staging/omapdrm/omap_drv.h index f238d574da0c..2092a9167d29 100644 --- a/trunk/drivers/staging/omapdrm/omap_drv.h +++ b/trunk/drivers/staging/omapdrm/omap_drv.h @@ -25,8 +25,8 @@ #include #include #include +#include #include "omap_drm.h" -#include "omap_priv.h" #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__) #define VERB(fmt, ...) if (0) DRM_DEBUG(fmt, ##__VA_ARGS__) /* verbose debug */ diff --git a/trunk/drivers/staging/omapdrm/omap_priv.h b/trunk/include/linux/platform_data/omap_drm.h similarity index 81% rename from trunk/drivers/staging/omapdrm/omap_priv.h rename to trunk/include/linux/platform_data/omap_drm.h index ef6441447147..3da73bdc2031 100644 --- a/trunk/drivers/staging/omapdrm/omap_priv.h +++ b/trunk/include/linux/platform_data/omap_drm.h @@ -1,8 +1,8 @@ /* - * include/drm/omap_priv.h + * DRM/KMS platform data for TI OMAP platforms * - * Copyright (C) 2011 Texas Instruments - * Author: Rob Clark + * Copyright (C) 2012 Texas Instruments + * Author: Rob Clark * * 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 @@ -17,13 +17,11 @@ * this program. If not, see . */ -#ifndef __OMAP_PRIV_H__ -#define __OMAP_PRIV_H__ +#ifndef __PLATFORM_DATA_OMAP_DRM_H__ +#define __PLATFORM_DATA_OMAP_DRM_H__ -/* Non-userspace facing APIs - */ - -/* optional platform data to configure the default configuration of which +/* + * Optional platform data to configure the default configuration of which * pipes/overlays/CRTCs are used.. if this is not provided, then instead the * first CONFIG_DRM_OMAP_NUM_CRTCS are used, and they are each connected to * one manager, with priority given to managers that are connected to @@ -49,7 +47,6 @@ struct omap_kms_platform_data { struct omap_drm_platform_data { struct omap_kms_platform_data *kms_pdata; - struct omap_dmm_platform_data *dmm_pdata; }; -#endif /* __OMAP_DRM_H__ */ +#endif /* __PLATFORM_DATA_OMAP_DRM_H__ */ diff --git a/trunk/sound/soc/tegra/Kconfig b/trunk/sound/soc/tegra/Kconfig index 76dc230f2bb0..c1c8e955f4d3 100644 --- a/trunk/sound/soc/tegra/Kconfig +++ b/trunk/sound/soc/tegra/Kconfig @@ -58,9 +58,17 @@ config SND_SOC_TEGRA_WM8753 Say Y or M here if you want to add support for SoC audio on Tegra boards using the WM8753 codec, such as Whistler. +config MACH_HAS_SND_SOC_TEGRA_WM8903 + bool + help + Machines that use the SND_SOC_TEGRA_WM8903 driver should select + this config option, in order to allow the user to enable + SND_SOC_TEGRA_WM8903. + config SND_SOC_TEGRA_WM8903 tristate "SoC Audio support for Tegra boards using a WM8903 codec" depends on SND_SOC_TEGRA && I2C + depends on MACH_HAS_SND_SOC_TEGRA_WM8903 select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC select SND_SOC_WM8903 @@ -71,7 +79,7 @@ config SND_SOC_TEGRA_WM8903 config SND_SOC_TEGRA_TRIMSLICE tristate "SoC Audio support for TrimSlice board" - depends on SND_SOC_TEGRA && I2C + depends on SND_SOC_TEGRA && MACH_TRIMSLICE && I2C select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC select SND_SOC_TLV320AIC23 help