Commit 95360fd63606918167a5365b770a6d28d333f0ed
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc board specific updates from Olof Johansson: "Misc board updates: - Greg added a handful of boards to KS8695 (since he has stepped up to maintain it). - Qualcomm has added DT-only board support for a couple of their newer SoCs. - misc other updates for Samsung and Freescale boards." Fix up trivial conflict in arch/arm/mach-shmobile/board-armadillo800eva.c due to gpio device data being added next to hdmi device data that got moved. * tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: msm: Allow 8960 and 8660 to compile together ARM: msm: Allow msm_iomap-8x60 and msm_iomap-8960 to coexist ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12 ARM: EXYNOS: Use generic pwm driver in Origen board ARM: shmobile: armadillo800eva: Add support RTC ARM: ks8695: add board support for the OpenGear boards based on the KS8695 ARM: ks8695: add board support for the SnapGear boards based on the KS8695 ARM: dts: Add heartbeat gpio-leds support to Origen ARM: dts: Use active low flag for gpio-keys on Origen ARM: shmobile: marzen: enable thermal sensor ARM: shmobile: marzen: fixup regulator id for smsc911x ARM: shmobile: marzen: add SDHI0 support ARM: mmp: enable debug uart port in defconfig ARM: mmp: implement DEBUG_LL port choice ARM: S3C64XX: Register audio platform devices for Bells on Cragganmore ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore ARM: mx27pdk: Add audio support ARM: ttc_dkb: add nand support
Showing 26 changed files Side-by-side Diff
- arch/arm/Kconfig.debug
- arch/arm/boot/dts/exynos4210-origen.dts
- arch/arm/configs/armadillo800eva_defconfig
- arch/arm/configs/marzen_defconfig
- arch/arm/configs/mmp2_defconfig
- arch/arm/configs/pxa910_defconfig
- arch/arm/mach-exynos/Kconfig
- arch/arm/mach-exynos/mach-origen.c
- arch/arm/mach-exynos/mach-smdk4x12.c
- arch/arm/mach-exynos/mach-smdkv310.c
- arch/arm/mach-imx/Kconfig
- arch/arm/mach-imx/mach-mx27_3ds.c
- arch/arm/mach-ks8695/Kconfig
- arch/arm/mach-ks8695/Makefile
- arch/arm/mach-ks8695/board-og.c
- arch/arm/mach-ks8695/board-sg.c
- arch/arm/mach-mmp/include/mach/debug-macro.S
- arch/arm/mach-mmp/ttc_dkb.c
- arch/arm/mach-msm/Kconfig
- arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
- arch/arm/mach-msm/include/mach/msm_iomap.h
- arch/arm/mach-msm/io.c
- arch/arm/mach-s3c64xx/mach-crag6410-module.c
- arch/arm/mach-s3c64xx/mach-crag6410.c
- arch/arm/mach-shmobile/board-armadillo800eva.c
- arch/arm/mach-shmobile/board-marzen.c
arch/arm/Kconfig.debug
... | ... | @@ -224,6 +224,20 @@ |
224 | 224 | Say Y here if you want kernel low-level debugging support |
225 | 225 | on i.MX6Q UART4. |
226 | 226 | |
227 | + config DEBUG_MMP_UART2 | |
228 | + bool "Kernel low-level debugging message via MMP UART2" | |
229 | + depends on ARCH_MMP | |
230 | + help | |
231 | + Say Y here if you want kernel low-level debugging support | |
232 | + on MMP UART2. | |
233 | + | |
234 | + config DEBUG_MMP_UART3 | |
235 | + bool "Kernel low-level debugging message via MMP UART3" | |
236 | + depends on ARCH_MMP | |
237 | + help | |
238 | + Say Y here if you want kernel low-level debugging support | |
239 | + on MMP UART3. | |
240 | + | |
227 | 241 | config DEBUG_MSM_UART1 |
228 | 242 | bool "Kernel low-level debugging messages via MSM UART1" |
229 | 243 | depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 |
arch/arm/boot/dts/exynos4210-origen.dts
... | ... | @@ -62,32 +62,40 @@ |
62 | 62 | |
63 | 63 | up { |
64 | 64 | label = "Up"; |
65 | - gpios = <&gpx2 0 0 0 2>; | |
65 | + gpios = <&gpx2 0 0 0x10000 2>; | |
66 | 66 | linux,code = <103>; |
67 | 67 | }; |
68 | 68 | |
69 | 69 | down { |
70 | 70 | label = "Down"; |
71 | - gpios = <&gpx2 1 0 0 2>; | |
71 | + gpios = <&gpx2 1 0 0x10000 2>; | |
72 | 72 | linux,code = <108>; |
73 | 73 | }; |
74 | 74 | |
75 | 75 | back { |
76 | 76 | label = "Back"; |
77 | - gpios = <&gpx1 7 0 0 2>; | |
77 | + gpios = <&gpx1 7 0 0x10000 2>; | |
78 | 78 | linux,code = <158>; |
79 | 79 | }; |
80 | 80 | |
81 | 81 | home { |
82 | 82 | label = "Home"; |
83 | - gpios = <&gpx1 6 0 0 2>; | |
83 | + gpios = <&gpx1 6 0 0x10000 2>; | |
84 | 84 | linux,code = <102>; |
85 | 85 | }; |
86 | 86 | |
87 | 87 | menu { |
88 | 88 | label = "Menu"; |
89 | - gpios = <&gpx1 5 0 0 2>; | |
89 | + gpios = <&gpx1 5 0 0x10000 2>; | |
90 | 90 | linux,code = <139>; |
91 | + }; | |
92 | + }; | |
93 | + | |
94 | + leds { | |
95 | + compatible = "gpio-leds"; | |
96 | + status { | |
97 | + gpios = <&gpx1 3 0 0x10000 2>; | |
98 | + linux,default-trigger = "heartbeat"; | |
91 | 99 | }; |
92 | 100 | }; |
93 | 101 |
arch/arm/configs/armadillo800eva_defconfig
... | ... | @@ -85,6 +85,7 @@ |
85 | 85 | CONFIG_SERIAL_SH_SCI_CONSOLE=y |
86 | 86 | # CONFIG_HW_RANDOM is not set |
87 | 87 | CONFIG_I2C=y |
88 | +CONFIG_I2C_GPIO=y | |
88 | 89 | CONFIG_I2C_SH_MOBILE=y |
89 | 90 | # CONFIG_HWMON is not set |
90 | 91 | CONFIG_MEDIA_SUPPORT=y |
... | ... | @@ -120,6 +121,8 @@ |
120 | 121 | CONFIG_MMC=y |
121 | 122 | CONFIG_MMC_SDHI=y |
122 | 123 | CONFIG_MMC_SH_MMCIF=y |
124 | +CONFIG_RTC_CLASS=y | |
125 | +CONFIG_RTC_DRV_S35390A=y | |
123 | 126 | CONFIG_DMADEVICES=y |
124 | 127 | CONFIG_SH_DMAE=y |
125 | 128 | CONFIG_UIO=y |
arch/arm/configs/marzen_defconfig
arch/arm/configs/mmp2_defconfig
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | CONFIG_AEABI=y |
17 | 17 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
18 | 18 | CONFIG_ZBOOT_ROM_BSS=0x0 |
19 | -CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS2,38400 mem=128M user_debug=255" | |
19 | +CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS2,38400 mem=128M user_debug=255 earlyprintk" | |
20 | 20 | CONFIG_VFP=y |
21 | 21 | CONFIG_NET=y |
22 | 22 | CONFIG_PACKET=y |
... | ... | @@ -90,6 +90,9 @@ |
90 | 90 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
91 | 91 | # CONFIG_DYNAMIC_DEBUG is not set |
92 | 92 | CONFIG_DEBUG_USER=y |
93 | +CONFIG_DEBUG_LL=y | |
94 | +CONFIG_DEBUG_MMP_UART3=y | |
95 | +CONFIG_EARLY_PRINTK=y | |
93 | 96 | CONFIG_DEBUG_ERRORS=y |
94 | 97 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
95 | 98 | CONFIG_CRC_CCITT=y |
arch/arm/configs/pxa910_defconfig
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | CONFIG_AEABI=y |
18 | 18 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
19 | 19 | CONFIG_ZBOOT_ROM_BSS=0x0 |
20 | -CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.2.100:/nfsroot/ ip=192.168.2.101:192.168.2.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=128M" | |
20 | +CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.2.100:/nfsroot/ ip=192.168.2.101:192.168.2.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=128M earlyprintk" | |
21 | 21 | CONFIG_FPE_NWFPE=y |
22 | 22 | CONFIG_NET=y |
23 | 23 | CONFIG_PACKET=y |
... | ... | @@ -66,6 +66,8 @@ |
66 | 66 | CONFIG_DEBUG_USER=y |
67 | 67 | CONFIG_DEBUG_ERRORS=y |
68 | 68 | CONFIG_DEBUG_LL=y |
69 | +CONFIG_DEBUG_MMP_UART2=y | |
70 | +CONFIG_EARLY_PRINTK=y | |
69 | 71 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
70 | 72 | CONFIG_CRC_CCITT=y |
arch/arm/mach-exynos/Kconfig
... | ... | @@ -221,6 +221,7 @@ |
221 | 221 | select EXYNOS4_SETUP_KEYPAD |
222 | 222 | select EXYNOS4_SETUP_SDHCI |
223 | 223 | select EXYNOS4_SETUP_USB_PHY |
224 | + select S3C24XX_PWM | |
224 | 225 | help |
225 | 226 | Machine support for Samsung SMDKV310 |
226 | 227 | |
... | ... | @@ -348,6 +349,7 @@ |
348 | 349 | select EXYNOS4_SETUP_FIMD0 |
349 | 350 | select EXYNOS4_SETUP_SDHCI |
350 | 351 | select EXYNOS4_SETUP_USB_PHY |
352 | + select S3C24XX_PWM | |
351 | 353 | help |
352 | 354 | Machine support for ORIGEN based on Samsung EXYNOS4210 |
353 | 355 | |
... | ... | @@ -383,6 +385,7 @@ |
383 | 385 | select EXYNOS4_SETUP_KEYPAD |
384 | 386 | select EXYNOS4_SETUP_SDHCI |
385 | 387 | select EXYNOS4_SETUP_USB_PHY |
388 | + select S3C24XX_PWM | |
386 | 389 | help |
387 | 390 | Machine support for Samsung SMDK4212 |
388 | 391 |
arch/arm/mach-exynos/mach-origen.c
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 | #include <linux/platform_device.h> |
16 | 16 | #include <linux/io.h> |
17 | 17 | #include <linux/input.h> |
18 | +#include <linux/pwm.h> | |
18 | 19 | #include <linux/pwm_backlight.h> |
19 | 20 | #include <linux/gpio_keys.h> |
20 | 21 | #include <linux/i2c.h> |
... | ... | @@ -614,6 +615,10 @@ |
614 | 615 | .dev.platform_data = &origen_lcd_hv070wsa_data, |
615 | 616 | }; |
616 | 617 | |
618 | +static struct pwm_lookup origen_pwm_lookup[] = { | |
619 | + PWM_LOOKUP("s3c24xx-pwm.0", 0, "pwm-backlight.0", NULL), | |
620 | +}; | |
621 | + | |
617 | 622 | #ifdef CONFIG_DRM_EXYNOS |
618 | 623 | static struct exynos_drm_fimd_pdata drm_fimd_pdata = { |
619 | 624 | .panel = { |
... | ... | @@ -798,6 +803,7 @@ |
798 | 803 | |
799 | 804 | platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); |
800 | 805 | |
806 | + pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup)); | |
801 | 807 | samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); |
802 | 808 | |
803 | 809 | origen_bt_setup(); |
arch/arm/mach-exynos/mach-smdk4x12.c
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | #include <linux/mfd/max8997.h> |
18 | 18 | #include <linux/mmc/host.h> |
19 | 19 | #include <linux/platform_device.h> |
20 | +#include <linux/pwm.h> | |
20 | 21 | #include <linux/pwm_backlight.h> |
21 | 22 | #include <linux/regulator/machine.h> |
22 | 23 | #include <linux/serial_core.h> |
... | ... | @@ -222,6 +223,10 @@ |
222 | 223 | .pwm_period_ns = 1000, |
223 | 224 | }; |
224 | 225 | |
226 | +static struct pwm_lookup smdk4x12_pwm_lookup[] = { | |
227 | + PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL), | |
228 | +}; | |
229 | + | |
225 | 230 | static uint32_t smdk4x12_keymap[] __initdata = { |
226 | 231 | /* KEY(row, col, keycode) */ |
227 | 232 | KEY(1, 3, KEY_1), KEY(1, 4, KEY_2), KEY(1, 5, KEY_3), |
... | ... | @@ -349,6 +354,7 @@ |
349 | 354 | ARRAY_SIZE(smdk4x12_i2c_devs7)); |
350 | 355 | |
351 | 356 | samsung_bl_set(&smdk4x12_bl_gpio_info, &smdk4x12_bl_data); |
357 | + pwm_add_table(smdk4x12_pwm_lookup, ARRAY_SIZE(smdk4x12_pwm_lookup)); | |
352 | 358 | |
353 | 359 | samsung_keypad_set_platdata(&smdk4x12_keypad_data); |
354 | 360 |
arch/arm/mach-exynos/mach-smdkv310.c
... | ... | @@ -18,6 +18,7 @@ |
18 | 18 | #include <linux/io.h> |
19 | 19 | #include <linux/i2c.h> |
20 | 20 | #include <linux/input.h> |
21 | +#include <linux/pwm.h> | |
21 | 22 | #include <linux/pwm_backlight.h> |
22 | 23 | #include <linux/platform_data/s3c-hsotg.h> |
23 | 24 | |
... | ... | @@ -360,6 +361,10 @@ |
360 | 361 | I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38), |
361 | 362 | }; |
362 | 363 | |
364 | +static struct pwm_lookup smdkv310_pwm_lookup[] = { | |
365 | + PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL), | |
366 | +}; | |
367 | + | |
363 | 368 | static void s5p_tv_setup(void) |
364 | 369 | { |
365 | 370 | /* direct HPD to HDMI chip */ |
... | ... | @@ -399,6 +404,8 @@ |
399 | 404 | samsung_keypad_set_platdata(&smdkv310_keypad_data); |
400 | 405 | |
401 | 406 | samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); |
407 | + pwm_add_table(smdkv310_pwm_lookup, ARRAY_SIZE(smdkv310_pwm_lookup)); | |
408 | + | |
402 | 409 | #ifdef CONFIG_DRM_EXYNOS |
403 | 410 | s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; |
404 | 411 | exynos4_fimd0_gpio_setup_24bpp(); |
arch/arm/mach-imx/Kconfig
... | ... | @@ -298,6 +298,7 @@ |
298 | 298 | select IMX_HAVE_PLATFORM_IMX_FB |
299 | 299 | select IMX_HAVE_PLATFORM_IMX_I2C |
300 | 300 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
301 | + select IMX_HAVE_PLATFORM_IMX_SSI | |
301 | 302 | select IMX_HAVE_PLATFORM_IMX_UART |
302 | 303 | select IMX_HAVE_PLATFORM_MX2_CAMERA |
303 | 304 | select IMX_HAVE_PLATFORM_MXC_EHCI |
arch/arm/mach-imx/mach-mx27_3ds.c
... | ... | @@ -158,6 +158,11 @@ |
158 | 158 | PB21_PF_CSI_HSYNC, |
159 | 159 | CSI_PWRDWN | GPIO_GPIO | GPIO_OUT, |
160 | 160 | CSI_RESET | GPIO_GPIO | GPIO_OUT, |
161 | + /* SSI4 */ | |
162 | + PC16_PF_SSI4_FS, | |
163 | + PC17_PF_SSI4_RXD, | |
164 | + PC18_PF_SSI4_TXD, | |
165 | + PC19_PF_SSI4_CLK, | |
161 | 166 | }; |
162 | 167 | |
163 | 168 | static struct gpio mx27_3ds_camera_gpios[] = { |
164 | 169 | |
165 | 170 | |
... | ... | @@ -329,15 +334,26 @@ |
329 | 334 | }; |
330 | 335 | |
331 | 336 | /* MC13783 */ |
337 | +static struct mc13xxx_codec_platform_data mx27_3ds_codec = { | |
338 | + .dac_ssi_port = MC13783_SSI1_PORT, | |
339 | + .adc_ssi_port = MC13783_SSI1_PORT, | |
340 | +}; | |
341 | + | |
332 | 342 | static struct mc13xxx_platform_data mc13783_pdata = { |
333 | 343 | .regulators = { |
334 | 344 | .regulators = mx27_3ds_regulators, |
335 | 345 | .num_regulators = ARRAY_SIZE(mx27_3ds_regulators), |
336 | 346 | |
337 | 347 | }, |
338 | - .flags = MC13XXX_USE_TOUCHSCREEN | MC13XXX_USE_RTC, | |
348 | + .flags = MC13XXX_USE_TOUCHSCREEN | MC13XXX_USE_RTC | | |
349 | + MC13XXX_USE_CODEC, | |
350 | + .codec = &mx27_3ds_codec, | |
339 | 351 | }; |
340 | 352 | |
353 | +static struct imx_ssi_platform_data mx27_3ds_ssi_pdata = { | |
354 | + .flags = IMX_SSI_DMA | IMX_SSI_NET, | |
355 | +}; | |
356 | + | |
341 | 357 | /* SPI */ |
342 | 358 | static int spi1_chipselect[] = {SPI1_SS0}; |
343 | 359 | |
... | ... | @@ -512,6 +528,9 @@ |
512 | 528 | } |
513 | 529 | |
514 | 530 | imx27_add_mx2_camera(&mx27_3ds_cam_pdata); |
531 | + imx27_add_imx_ssi(0, &mx27_3ds_ssi_pdata); | |
532 | + | |
533 | + imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); | |
515 | 534 | } |
516 | 535 | |
517 | 536 | static void __init mx27pdk_timer_init(void) |
arch/arm/mach-ks8695/Kconfig
... | ... | @@ -21,6 +21,67 @@ |
21 | 21 | say 'Y' here if you want your kernel to run on the Brivo |
22 | 22 | Systems LLC, ACS-5000 Master board. |
23 | 23 | |
24 | +config MACH_LITE300 | |
25 | + bool "SecureComputing SG300" | |
26 | + help | |
27 | + Say 'Y' here if you want your kernel to support the | |
28 | + SecureComputing / SnapGear SG300 VPN Internet Router. | |
29 | + See http://www.securecomputing.com for more details. | |
30 | + | |
31 | +config MACH_SG310 | |
32 | + bool "McAfee SG310" | |
33 | + help | |
34 | + Say 'Y' here if you want your kernel to support the | |
35 | + McAfee / SnapGear SG310 VPN Internet Router. | |
36 | + See http://www.mcafee.com for more details. | |
37 | + | |
38 | +config MACH_SE4200 | |
39 | + bool "SecureComputing SE4200" | |
40 | + help | |
41 | + Say 'Y' here if you want your kernel to support the | |
42 | + SecureComputing / SnapGear SE4200 Secure Wireless VPN | |
43 | + Internet Router. | |
44 | + See http://www.securecomputing.com for more details. | |
45 | + | |
46 | +config MACH_CM4002 | |
47 | + bool "OpenGear CM4002" | |
48 | + help | |
49 | + Say 'Y' here if you want your kernel to support the OpenGear | |
50 | + CM4002 Secure Access Server. See http://www.opengear.com for | |
51 | + more details. | |
52 | + | |
53 | +config MACH_CM4008 | |
54 | + bool "OpenGear CM4008" | |
55 | + select MIGHT_HAVE_PCI | |
56 | + help | |
57 | + Say 'Y' here if you want your kernel to support the OpenGear | |
58 | + CM4008 Console Server. See http://www.opengear.com for more | |
59 | + details. | |
60 | + | |
61 | +config MACH_CM41xx | |
62 | + bool "OpenGear CM41xx" | |
63 | + select MIGHT_HAVE_PCI | |
64 | + help | |
65 | + Say 'Y' here if you want your kernel to support the OpenGear | |
66 | + CM4016 or CM4048 Console Servers. See http://www.opengear.com for | |
67 | + more details. | |
68 | + | |
69 | +config MACH_IM4004 | |
70 | + bool "OpenGear IM4004" | |
71 | + select MIGHT_HAVE_PCI | |
72 | + help | |
73 | + Say 'Y' here if you want your kernel to support the OpenGear | |
74 | + IM4004 Secure Access Server. See http://www.opengear.com for | |
75 | + more details. | |
76 | + | |
77 | +config MACH_IM42xx | |
78 | + bool "OpenGear IM42xx" | |
79 | + select MIGHT_HAVE_PCI | |
80 | + help | |
81 | + Say 'Y' here if you want your kernel to support the OpenGear | |
82 | + IM4216 or IM4248 Console Servers. See http://www.opengear.com for | |
83 | + more details. | |
84 | + | |
24 | 85 | endmenu |
25 | 86 | |
26 | 87 | endif |
arch/arm/mach-ks8695/Makefile
... | ... | @@ -15,4 +15,12 @@ |
15 | 15 | obj-$(CONFIG_MACH_KS8695) += board-micrel.o |
16 | 16 | obj-$(CONFIG_MACH_DSM320) += board-dsm320.o |
17 | 17 | obj-$(CONFIG_MACH_ACS5K) += board-acs5k.o |
18 | +obj-$(CONFIG_MACH_LITE300) += board-sg.o | |
19 | +obj-$(CONFIG_MACH_SG310) += board-sg.o | |
20 | +obj-$(CONFIG_MACH_SE4200) += board-sg.o | |
21 | +obj-$(CONFIG_MACH_CM4002) += board-og.o | |
22 | +obj-$(CONFIG_MACH_CM4008) += board-og.o | |
23 | +obj-$(CONFIG_MACH_CM41xx) += board-og.o | |
24 | +obj-$(CONFIG_MACH_IM4004) += board-og.o | |
25 | +obj-$(CONFIG_MACH_IM42xx) += board-og.o |
arch/arm/mach-ks8695/board-og.c
1 | +/* | |
2 | + * board-og.c -- support for the OpenGear KS8695 based boards. | |
3 | + * | |
4 | + * This program is free software; you can redistribute it and/or modify | |
5 | + * it under the terms of the GNU General Public License version 2 as | |
6 | + * published by the Free Software Foundation. | |
7 | + */ | |
8 | + | |
9 | +#include <linux/kernel.h> | |
10 | +#include <linux/types.h> | |
11 | +#include <linux/interrupt.h> | |
12 | +#include <linux/init.h> | |
13 | +#include <linux/delay.h> | |
14 | +#include <linux/platform_device.h> | |
15 | +#include <linux/serial_8250.h> | |
16 | +#include <linux/gpio.h> | |
17 | +#include <linux/irq.h> | |
18 | +#include <asm/mach-types.h> | |
19 | +#include <asm/mach/arch.h> | |
20 | +#include <asm/mach/map.h> | |
21 | +#include <mach/devices.h> | |
22 | +#include <mach/regs-gpio.h> | |
23 | +#include <mach/gpio-ks8695.h> | |
24 | +#include "generic.h" | |
25 | + | |
26 | +static int og_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |
27 | +{ | |
28 | + if (machine_is_im4004() && (slot == 8)) | |
29 | + return KS8695_IRQ_EXTERN1; | |
30 | + return KS8695_IRQ_EXTERN0; | |
31 | +} | |
32 | + | |
33 | +static struct ks8695_pci_cfg __initdata og_pci = { | |
34 | + .mode = KS8695_MODE_PCI, | |
35 | + .map_irq = og_pci_map_irq, | |
36 | +}; | |
37 | + | |
38 | +static void __init og_register_pci(void) | |
39 | +{ | |
40 | + /* Initialize the GPIO lines for interrupt mode */ | |
41 | + ks8695_gpio_interrupt(KS8695_GPIO_0, IRQ_TYPE_LEVEL_LOW); | |
42 | + | |
43 | + /* Cardbus Slot */ | |
44 | + if (machine_is_im4004()) | |
45 | + ks8695_gpio_interrupt(KS8695_GPIO_1, IRQ_TYPE_LEVEL_LOW); | |
46 | + | |
47 | + ks8695_init_pci(&og_pci); | |
48 | +} | |
49 | + | |
50 | +/* | |
51 | + * The PCI bus reset is driven by a dedicated GPIO line. Toggle it here | |
52 | + * and bring the PCI bus out of reset. | |
53 | + */ | |
54 | +static void __init og_pci_bus_reset(void) | |
55 | +{ | |
56 | + unsigned int rstline = 1; | |
57 | + | |
58 | + /* Some boards use a different GPIO as the PCI reset line */ | |
59 | + if (machine_is_im4004()) | |
60 | + rstline = 2; | |
61 | + else if (machine_is_im42xx()) | |
62 | + rstline = 0; | |
63 | + | |
64 | + gpio_request(rstline, "PCI reset"); | |
65 | + gpio_direction_output(rstline, 0); | |
66 | + | |
67 | + /* Drive a reset on the PCI reset line */ | |
68 | + gpio_set_value(rstline, 1); | |
69 | + gpio_set_value(rstline, 0); | |
70 | + mdelay(100); | |
71 | + gpio_set_value(rstline, 1); | |
72 | + mdelay(100); | |
73 | +} | |
74 | + | |
75 | +/* | |
76 | + * Direct connect serial ports (non-PCI that is). | |
77 | + */ | |
78 | +#define S8250_PHYS 0x03800000 | |
79 | +#define S8250_VIRT 0xf4000000 | |
80 | +#define S8250_SIZE 0x00100000 | |
81 | + | |
82 | +static struct __initdata map_desc og_io_desc[] = { | |
83 | + { | |
84 | + .virtual = S8250_VIRT, | |
85 | + .pfn = __phys_to_pfn(S8250_PHYS), | |
86 | + .length = S8250_SIZE, | |
87 | + .type = MT_DEVICE, | |
88 | + } | |
89 | +}; | |
90 | + | |
91 | +static struct resource og_uart_resources[] = { | |
92 | + { | |
93 | + .start = S8250_VIRT, | |
94 | + .end = S8250_VIRT + S8250_SIZE, | |
95 | + .flags = IORESOURCE_MEM | |
96 | + }, | |
97 | +}; | |
98 | + | |
99 | +static struct plat_serial8250_port og_uart_data[] = { | |
100 | + { | |
101 | + .mapbase = S8250_VIRT, | |
102 | + .membase = (char *) S8250_VIRT, | |
103 | + .irq = 3, | |
104 | + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | |
105 | + .iotype = UPIO_MEM, | |
106 | + .regshift = 2, | |
107 | + .uartclk = 115200 * 16, | |
108 | + }, | |
109 | + { }, | |
110 | +}; | |
111 | + | |
112 | +static struct platform_device og_uart = { | |
113 | + .name = "serial8250", | |
114 | + .id = 0, | |
115 | + .dev.platform_data = og_uart_data, | |
116 | + .num_resources = 1, | |
117 | + .resource = og_uart_resources | |
118 | +}; | |
119 | + | |
120 | +static struct platform_device *og_devices[] __initdata = { | |
121 | + &og_uart | |
122 | +}; | |
123 | + | |
124 | +static void __init og_init(void) | |
125 | +{ | |
126 | + ks8695_register_gpios(); | |
127 | + | |
128 | + if (machine_is_cm4002()) { | |
129 | + ks8695_gpio_interrupt(KS8695_GPIO_1, IRQ_TYPE_LEVEL_HIGH); | |
130 | + iotable_init(og_io_desc, ARRAY_SIZE(og_io_desc)); | |
131 | + platform_add_devices(og_devices, ARRAY_SIZE(og_devices)); | |
132 | + } else { | |
133 | + og_pci_bus_reset(); | |
134 | + og_register_pci(); | |
135 | + } | |
136 | + | |
137 | + ks8695_add_device_lan(); | |
138 | + ks8695_add_device_wan(); | |
139 | +} | |
140 | + | |
141 | +#ifdef CONFIG_MACH_CM4002 | |
142 | +MACHINE_START(CM4002, "OpenGear/CM4002") | |
143 | + /* OpenGear Inc. */ | |
144 | + .atag_offset = 0x100, | |
145 | + .map_io = ks8695_map_io, | |
146 | + .init_irq = ks8695_init_irq, | |
147 | + .init_machine = og_init, | |
148 | + .timer = &ks8695_timer, | |
149 | + .restart = ks8695_restart, | |
150 | +MACHINE_END | |
151 | +#endif | |
152 | + | |
153 | +#ifdef CONFIG_MACH_CM4008 | |
154 | +MACHINE_START(CM4008, "OpenGear/CM4008") | |
155 | + /* OpenGear Inc. */ | |
156 | + .atag_offset = 0x100, | |
157 | + .map_io = ks8695_map_io, | |
158 | + .init_irq = ks8695_init_irq, | |
159 | + .init_machine = og_init, | |
160 | + .timer = &ks8695_timer, | |
161 | + .restart = ks8695_restart, | |
162 | +MACHINE_END | |
163 | +#endif | |
164 | + | |
165 | +#ifdef CONFIG_MACH_CM41xx | |
166 | +MACHINE_START(CM41XX, "OpenGear/CM41xx") | |
167 | + /* OpenGear Inc. */ | |
168 | + .atag_offset = 0x100, | |
169 | + .map_io = ks8695_map_io, | |
170 | + .init_irq = ks8695_init_irq, | |
171 | + .init_machine = og_init, | |
172 | + .timer = &ks8695_timer, | |
173 | + .restart = ks8695_restart, | |
174 | +MACHINE_END | |
175 | +#endif | |
176 | + | |
177 | +#ifdef CONFIG_MACH_IM4004 | |
178 | +MACHINE_START(IM4004, "OpenGear/IM4004") | |
179 | + /* OpenGear Inc. */ | |
180 | + .atag_offset = 0x100, | |
181 | + .map_io = ks8695_map_io, | |
182 | + .init_irq = ks8695_init_irq, | |
183 | + .init_machine = og_init, | |
184 | + .timer = &ks8695_timer, | |
185 | + .restart = ks8695_restart, | |
186 | +MACHINE_END | |
187 | +#endif | |
188 | + | |
189 | +#ifdef CONFIG_MACH_IM42xx | |
190 | +MACHINE_START(IM42XX, "OpenGear/IM42xx") | |
191 | + /* OpenGear Inc. */ | |
192 | + .atag_offset = 0x100, | |
193 | + .map_io = ks8695_map_io, | |
194 | + .init_irq = ks8695_init_irq, | |
195 | + .init_machine = og_init, | |
196 | + .timer = &ks8695_timer, | |
197 | + .restart = ks8695_restart, | |
198 | +MACHINE_END | |
199 | +#endif |
arch/arm/mach-ks8695/board-sg.c
1 | +/* | |
2 | + * board-sg.c -- support for the SnapGear KS8695 based boards | |
3 | + * | |
4 | + * This program is free software; you can redistribute it and/or modify | |
5 | + * it under the terms of the GNU General Public License version 2 as | |
6 | + * published by the Free Software Foundation. | |
7 | + */ | |
8 | + | |
9 | +#include <linux/kernel.h> | |
10 | +#include <linux/types.h> | |
11 | +#include <linux/init.h> | |
12 | +#include <linux/platform_device.h> | |
13 | +#include <linux/mtd/mtd.h> | |
14 | +#include <linux/mtd/map.h> | |
15 | +#include <linux/mtd/physmap.h> | |
16 | +#include <linux/mtd/partitions.h> | |
17 | +#include <asm/mach-types.h> | |
18 | +#include <asm/mach/arch.h> | |
19 | +#include <mach/devices.h> | |
20 | +#include "generic.h" | |
21 | + | |
22 | +/* | |
23 | + * The SG310 machine type is fitted with a conventional 8MB Strataflash | |
24 | + * device. Define its partitioning. | |
25 | + */ | |
26 | +#define FL_BASE 0x02000000 | |
27 | +#define FL_SIZE SZ_8M | |
28 | + | |
29 | +static struct mtd_partition sg_mtd_partitions[] = { | |
30 | + [0] = { | |
31 | + .name = "SnapGear Boot Loader", | |
32 | + .size = SZ_128K, | |
33 | + }, | |
34 | + [1] = { | |
35 | + .name = "SnapGear non-volatile configuration", | |
36 | + .size = SZ_512K, | |
37 | + .offset = SZ_256K, | |
38 | + }, | |
39 | + [2] = { | |
40 | + .name = "SnapGear image", | |
41 | + .offset = SZ_512K + SZ_256K, | |
42 | + }, | |
43 | + [3] = { | |
44 | + .name = "SnapGear StrataFlash", | |
45 | + }, | |
46 | + [4] = { | |
47 | + .name = "SnapGear Boot Tags", | |
48 | + .size = SZ_128K, | |
49 | + .offset = SZ_128K, | |
50 | + }, | |
51 | +}; | |
52 | + | |
53 | +static struct physmap_flash_data sg_mtd_pdata = { | |
54 | + .width = 1, | |
55 | + .nr_parts = ARRAY_SIZE(sg_mtd_partitions), | |
56 | + .parts = sg_mtd_partitions, | |
57 | +}; | |
58 | + | |
59 | + | |
60 | +static struct resource sg_mtd_resource[] = { | |
61 | + [0] = { | |
62 | + .start = FL_BASE, | |
63 | + .end = FL_BASE + FL_SIZE - 1, | |
64 | + .flags = IORESOURCE_MEM, | |
65 | + }, | |
66 | +}; | |
67 | + | |
68 | +static struct platform_device sg_mtd_device = { | |
69 | + .name = "physmap-flash", | |
70 | + .id = 0, | |
71 | + .num_resources = ARRAY_SIZE(sg_mtd_resource), | |
72 | + .resource = sg_mtd_resource, | |
73 | + .dev = { | |
74 | + .platform_data = &sg_mtd_pdata, | |
75 | + }, | |
76 | +}; | |
77 | + | |
78 | +static void __init sg_init(void) | |
79 | +{ | |
80 | + ks8695_add_device_lan(); | |
81 | + ks8695_add_device_wan(); | |
82 | + | |
83 | + if (machine_is_sg310()) | |
84 | + platform_device_register(&sg_mtd_device); | |
85 | +} | |
86 | + | |
87 | +#ifdef CONFIG_MACH_LITE300 | |
88 | +MACHINE_START(LITE300, "SecureComputing/SG300") | |
89 | + /* SnapGear */ | |
90 | + .atag_offset = 0x100, | |
91 | + .map_io = ks8695_map_io, | |
92 | + .init_irq = ks8695_init_irq, | |
93 | + .init_machine = sg_init, | |
94 | + .timer = &ks8695_timer, | |
95 | + .restart = ks8695_restart, | |
96 | +MACHINE_END | |
97 | +#endif | |
98 | + | |
99 | +#ifdef CONFIG_MACH_SG310 | |
100 | +MACHINE_START(SG310, "McAfee/SG310") | |
101 | + /* SnapGear */ | |
102 | + .atag_offset = 0x100, | |
103 | + .map_io = ks8695_map_io, | |
104 | + .init_irq = ks8695_init_irq, | |
105 | + .init_machine = sg_init, | |
106 | + .timer = &ks8695_timer, | |
107 | + .restart = ks8695_restart, | |
108 | +MACHINE_END | |
109 | +#endif | |
110 | + | |
111 | +#ifdef CONFIG_MACH_SE4200 | |
112 | +MACHINE_START(SE4200, "SecureComputing/SE4200") | |
113 | + /* SnapGear */ | |
114 | + .atag_offset = 0x100, | |
115 | + .map_io = ks8695_map_io, | |
116 | + .init_irq = ks8695_init_irq, | |
117 | + .init_machine = sg_init, | |
118 | + .timer = &ks8695_timer, | |
119 | + .restart = ks8695_restart, | |
120 | +MACHINE_END | |
121 | +#endif |
arch/arm/mach-mmp/include/mach/debug-macro.S
... | ... | @@ -9,13 +9,21 @@ |
9 | 9 | * published by the Free Software Foundation. |
10 | 10 | */ |
11 | 11 | |
12 | +#if defined(CONFIG_DEBUG_MMP_UART2) | |
13 | +#define MMP_UART_OFFSET 0x00017000 | |
14 | +#elif defined(CONFIG_DEBUG_MMP_UART3) | |
15 | +#define MMP_UART_OFFSET 0x00018000 | |
16 | +#else | |
17 | +#error "Select uart for DEBUG_LL" | |
18 | +#endif | |
19 | + | |
12 | 20 | #include <mach/addr-map.h> |
13 | 21 | |
14 | 22 | .macro addruart, rp, rv, tmp |
15 | 23 | ldr \rp, =APB_PHYS_BASE @ physical |
16 | 24 | ldr \rv, =APB_VIRT_BASE @ virtual |
17 | - orr \rp, \rp, #0x00017000 | |
18 | - orr \rv, \rv, #0x00017000 | |
25 | + orr \rp, \rp, #MMP_UART_OFFSET | |
26 | + orr \rv, \rv, #MMP_UART_OFFSET | |
19 | 27 | .endm |
20 | 28 | |
21 | 29 | #define UART_SHIFT 2 |
arch/arm/mach-mmp/ttc_dkb.c
... | ... | @@ -177,12 +177,22 @@ |
177 | 177 | #endif |
178 | 178 | #endif |
179 | 179 | |
180 | +#ifdef CONFIG_MTD_NAND_PXA3xx | |
181 | +static struct pxa3xx_nand_platform_data dkb_nand_info = { | |
182 | + .enable_arbiter = 1, | |
183 | + .num_cs = 1, | |
184 | +}; | |
185 | +#endif | |
186 | + | |
180 | 187 | static void __init ttc_dkb_init(void) |
181 | 188 | { |
182 | 189 | mfp_config(ARRAY_AND_SIZE(ttc_dkb_pin_config)); |
183 | 190 | |
184 | 191 | /* on-chip devices */ |
185 | 192 | pxa910_add_uart(1); |
193 | +#ifdef CONFIG_MTD_NAND_PXA3xx | |
194 | + pxa910_add_nand(&dkb_nand_info); | |
195 | +#endif | |
186 | 196 | |
187 | 197 | /* off-chip devices */ |
188 | 198 | pxa910_add_twsi(0, NULL, ARRAY_AND_SIZE(ttc_dkb_i2c_info)); |
arch/arm/mach-msm/Kconfig
1 | 1 | if ARCH_MSM |
2 | 2 | |
3 | +comment "Qualcomm MSM SoC Type" | |
4 | + depends on (ARCH_MSM8X60 || ARCH_MSM8960) | |
5 | + | |
3 | 6 | choice |
4 | 7 | prompt "Qualcomm MSM SoC Type" |
5 | 8 | default ARCH_MSM7X00A |
9 | + depends on !(ARCH_MSM8X60 || ARCH_MSM8960) | |
6 | 10 | |
7 | 11 | config ARCH_MSM7X00A |
8 | 12 | bool "MSM7x00A / MSM7x01A" |
... | ... | @@ -36,6 +40,8 @@ |
36 | 40 | select GPIO_MSM_V1 |
37 | 41 | select MSM_PROC_COMM |
38 | 42 | |
43 | +endchoice | |
44 | + | |
39 | 45 | config ARCH_MSM8X60 |
40 | 46 | bool "MSM8X60" |
41 | 47 | select ARCH_MSM_SCORPIONMP |
... | ... | @@ -56,8 +62,6 @@ |
56 | 62 | select MSM_GPIOMUX |
57 | 63 | select MSM_SCM if SMP |
58 | 64 | select USE_OF |
59 | - | |
60 | -endchoice | |
61 | 65 | |
62 | 66 | config MSM_HAS_DEBUG_UART_HS |
63 | 67 | bool |
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
... | ... | @@ -41,20 +41,9 @@ |
41 | 41 | #define MSM8X60_QGIC_CPU_PHYS 0x02081000 |
42 | 42 | #define MSM8X60_QGIC_CPU_SIZE SZ_4K |
43 | 43 | |
44 | -#define MSM_ACC_BASE IOMEM(0xF0002000) | |
45 | -#define MSM_ACC_PHYS 0x02001000 | |
46 | -#define MSM_ACC_SIZE SZ_4K | |
47 | - | |
48 | -#define MSM_GCC_BASE IOMEM(0xF0003000) | |
49 | -#define MSM_GCC_PHYS 0x02082000 | |
50 | -#define MSM_GCC_SIZE SZ_4K | |
51 | - | |
52 | 44 | #define MSM_TLMM_BASE IOMEM(0xF0004000) |
53 | 45 | #define MSM_TLMM_PHYS 0x00800000 |
54 | 46 | #define MSM_TLMM_SIZE SZ_16K |
55 | - | |
56 | -#define MSM_SHARED_RAM_BASE IOMEM(0xF0100000) | |
57 | -#define MSM_SHARED_RAM_SIZE SZ_1M | |
58 | 47 | |
59 | 48 | #define MSM8X60_TMR_PHYS 0x02000000 |
60 | 49 | #define MSM8X60_TMR_SIZE SZ_4K |
arch/arm/mach-msm/include/mach/msm_iomap.h
... | ... | @@ -41,12 +41,11 @@ |
41 | 41 | #include "msm_iomap-7x30.h" |
42 | 42 | #elif defined(CONFIG_ARCH_QSD8X50) |
43 | 43 | #include "msm_iomap-8x50.h" |
44 | -#elif defined(CONFIG_ARCH_MSM8X60) | |
45 | -#include "msm_iomap-8x60.h" | |
46 | 44 | #else |
47 | 45 | #include "msm_iomap-7x00.h" |
48 | 46 | #endif |
49 | 47 | |
48 | +#include "msm_iomap-8x60.h" | |
50 | 49 | #include "msm_iomap-8960.h" |
51 | 50 | |
52 | 51 | #define MSM_DEBUG_UART_SIZE SZ_4K |
arch/arm/mach-msm/io.c
arch/arm/mach-s3c64xx/mach-crag6410-module.c
... | ... | @@ -16,6 +16,7 @@ |
16 | 16 | #include <linux/mfd/wm831x/irq.h> |
17 | 17 | #include <linux/mfd/wm831x/gpio.h> |
18 | 18 | #include <linux/mfd/wm8994/pdata.h> |
19 | +#include <linux/mfd/arizona/pdata.h> | |
19 | 20 | |
20 | 21 | #include <linux/regulator/machine.h> |
21 | 22 | |
22 | 23 | |
... | ... | @@ -181,11 +182,35 @@ |
181 | 182 | }, |
182 | 183 | }; |
183 | 184 | |
184 | -static const struct i2c_board_info wm5102_devs[] = { | |
185 | - { I2C_BOARD_INFO("wm5102", 0x1a), | |
186 | - .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, }, | |
185 | +static struct arizona_pdata wm5102_pdata = { | |
186 | + .ldoena = S3C64XX_GPN(7), | |
187 | + .gpio_base = CODEC_GPIO_BASE, | |
188 | + .irq_active_high = true, | |
189 | + .micd_pol_gpio = CODEC_GPIO_BASE + 4, | |
190 | + .gpio_defaults = { | |
191 | + [2] = 0x10000, /* AIF3TXLRCLK */ | |
192 | + [3] = 0x4, /* OPCLK */ | |
193 | + }, | |
187 | 194 | }; |
188 | 195 | |
196 | +static struct s3c64xx_spi_csinfo wm5102_spi_csinfo = { | |
197 | + .line = S3C64XX_GPN(5), | |
198 | +}; | |
199 | + | |
200 | +static struct spi_board_info wm5102_spi_devs[] = { | |
201 | + [0] = { | |
202 | + .modalias = "wm5102", | |
203 | + .max_speed_hz = 10 * 1000 * 1000, | |
204 | + .bus_num = 0, | |
205 | + .chip_select = 0, | |
206 | + .mode = SPI_MODE_0, | |
207 | + .irq = GLENFARCLAS_PMIC_IRQ_BASE + | |
208 | + WM831X_IRQ_GPIO_2, | |
209 | + .controller_data = &wm5102_spi_csinfo, | |
210 | + .platform_data = &wm5102_pdata, | |
211 | + }, | |
212 | +}; | |
213 | + | |
189 | 214 | static const struct i2c_board_info wm6230_i2c_devs[] = { |
190 | 215 | { I2C_BOARD_INFO("wm9081", 0x6c), |
191 | 216 | .platform_data = &wm9081_pdata, }, |
... | ... | @@ -223,8 +248,9 @@ |
223 | 248 | { .id = 0x3c, .name = "1273-EV1 Longmorn" }, |
224 | 249 | { .id = 0x3d, .name = "1277-EV1 Littlemill", |
225 | 250 | .i2c_devs = wm1277_devs, .num_i2c_devs = ARRAY_SIZE(wm1277_devs) }, |
226 | - { .id = 0x3e, .name = "WM5102-6271-EV1-CS127", | |
227 | - .i2c_devs = wm5102_devs, .num_i2c_devs = ARRAY_SIZE(wm5102_devs) }, | |
251 | + { .id = 0x3e, .name = "WM5102-6271-EV1-CS127 Amrut", | |
252 | + .spi_devs = wm5102_spi_devs, | |
253 | + .num_spi_devs = ARRAY_SIZE(wm5102_spi_devs) }, | |
228 | 254 | }; |
229 | 255 | |
230 | 256 | static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, |
arch/arm/mach-s3c64xx/mach-crag6410.c
... | ... | @@ -287,6 +287,16 @@ |
287 | 287 | .id = -1, |
288 | 288 | }; |
289 | 289 | |
290 | +static struct platform_device bells_wm5102_device = { | |
291 | + .name = "bells", | |
292 | + .id = 0, | |
293 | +}; | |
294 | + | |
295 | +static struct platform_device bells_wm5110_device = { | |
296 | + .name = "bells", | |
297 | + .id = 1, | |
298 | +}; | |
299 | + | |
290 | 300 | static struct regulator_consumer_supply wallvdd_consumers[] = { |
291 | 301 | REGULATOR_SUPPLY("SPKVDD", "1-001a"), |
292 | 302 | REGULATOR_SUPPLY("SPKVDD1", "1-001a"), |
... | ... | @@ -359,6 +369,8 @@ |
359 | 369 | &tobermory_device, |
360 | 370 | &littlemill_device, |
361 | 371 | &lowland_device, |
372 | + &bells_wm5102_device, | |
373 | + &bells_wm5110_device, | |
362 | 374 | &wallvdd_device, |
363 | 375 | }; |
364 | 376 |
arch/arm/mach-shmobile/board-armadillo800eva.c
... | ... | @@ -37,6 +37,7 @@ |
37 | 37 | #include <linux/mmc/host.h> |
38 | 38 | #include <linux/mmc/sh_mmcif.h> |
39 | 39 | #include <linux/mmc/sh_mobile_sdhi.h> |
40 | +#include <linux/i2c-gpio.h> | |
40 | 41 | #include <mach/common.h> |
41 | 42 | #include <mach/irqs.h> |
42 | 43 | #include <mach/r8a7740.h> |
... | ... | @@ -877,6 +878,21 @@ |
877 | 878 | }, |
878 | 879 | }; |
879 | 880 | |
881 | +/* RTC: RTC connects i2c-gpio. */ | |
882 | +static struct i2c_gpio_platform_data i2c_gpio_data = { | |
883 | + .sda_pin = GPIO_PORT208, | |
884 | + .scl_pin = GPIO_PORT91, | |
885 | + .udelay = 5, /* 100 kHz */ | |
886 | +}; | |
887 | + | |
888 | +static struct platform_device i2c_gpio_device = { | |
889 | + .name = "i2c-gpio", | |
890 | + .id = 2, | |
891 | + .dev = { | |
892 | + .platform_data = &i2c_gpio_data, | |
893 | + }, | |
894 | +}; | |
895 | + | |
880 | 896 | /* I2C */ |
881 | 897 | static struct i2c_board_info i2c0_devices[] = { |
882 | 898 | { |
... | ... | @@ -888,6 +904,13 @@ |
888 | 904 | }, |
889 | 905 | }; |
890 | 906 | |
907 | +static struct i2c_board_info i2c2_devices[] = { | |
908 | + { | |
909 | + I2C_BOARD_INFO("s35390a", 0x30), | |
910 | + .type = "s35390a", | |
911 | + }, | |
912 | +}; | |
913 | + | |
891 | 914 | /* |
892 | 915 | * board devices |
893 | 916 | */ |
... | ... | @@ -904,6 +927,7 @@ |
904 | 927 | &fsi_device, |
905 | 928 | &fsi_wm8978_device, |
906 | 929 | &fsi_hdmi_device, |
930 | + &i2c_gpio_device, | |
907 | 931 | }; |
908 | 932 | |
909 | 933 | static void __init eva_clock_init(void) |
... | ... | @@ -1174,6 +1198,7 @@ |
1174 | 1198 | #endif |
1175 | 1199 | |
1176 | 1200 | i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); |
1201 | + i2c_register_board_info(2, i2c2_devices, ARRAY_SIZE(i2c2_devices)); | |
1177 | 1202 | |
1178 | 1203 | r8a7740_add_standard_devices(); |
1179 | 1204 |
arch/arm/mach-shmobile/board-marzen.c
... | ... | @@ -30,6 +30,8 @@ |
30 | 30 | #include <linux/regulator/fixed.h> |
31 | 31 | #include <linux/regulator/machine.h> |
32 | 32 | #include <linux/smsc911x.h> |
33 | +#include <linux/mmc/sh_mobile_sdhi.h> | |
34 | +#include <linux/mfd/tmio.h> | |
33 | 35 | #include <mach/hardware.h> |
34 | 36 | #include <mach/r8a7779.h> |
35 | 37 | #include <mach/common.h> |
... | ... | @@ -39,6 +41,12 @@ |
39 | 41 | #include <asm/hardware/gic.h> |
40 | 42 | #include <asm/traps.h> |
41 | 43 | |
44 | +/* Fixed 3.3V regulator to be used by SDHI0 */ | |
45 | +static struct regulator_consumer_supply fixed3v3_power_consumers[] = { | |
46 | + REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | |
47 | + REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), | |
48 | +}; | |
49 | + | |
42 | 50 | /* Dummy supplies, where voltage doesn't matter */ |
43 | 51 | static struct regulator_consumer_supply dummy_supplies[] = { |
44 | 52 | REGULATOR_SUPPLY("vddvario", "smsc911x"), |
45 | 53 | |
46 | 54 | |
... | ... | @@ -75,13 +83,61 @@ |
75 | 83 | .num_resources = ARRAY_SIZE(smsc911x_resources), |
76 | 84 | }; |
77 | 85 | |
86 | +static struct resource sdhi0_resources[] = { | |
87 | + [0] = { | |
88 | + .name = "sdhi0", | |
89 | + .start = 0xffe4c000, | |
90 | + .end = 0xffe4c0ff, | |
91 | + .flags = IORESOURCE_MEM, | |
92 | + }, | |
93 | + [1] = { | |
94 | + .start = gic_spi(104), | |
95 | + .flags = IORESOURCE_IRQ, | |
96 | + }, | |
97 | +}; | |
98 | + | |
99 | +static struct sh_mobile_sdhi_info sdhi0_platform_data = { | |
100 | + .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, | |
101 | + .tmio_caps = MMC_CAP_SD_HIGHSPEED, | |
102 | +}; | |
103 | + | |
104 | +static struct platform_device sdhi0_device = { | |
105 | + .name = "sh_mobile_sdhi", | |
106 | + .num_resources = ARRAY_SIZE(sdhi0_resources), | |
107 | + .resource = sdhi0_resources, | |
108 | + .id = 0, | |
109 | + .dev = { | |
110 | + .platform_data = &sdhi0_platform_data, | |
111 | + } | |
112 | +}; | |
113 | + | |
114 | +/* Thermal */ | |
115 | +static struct resource thermal_resources[] = { | |
116 | + [0] = { | |
117 | + .start = 0xFFC48000, | |
118 | + .end = 0xFFC48038 - 1, | |
119 | + .flags = IORESOURCE_MEM, | |
120 | + }, | |
121 | +}; | |
122 | + | |
123 | +static struct platform_device thermal_device = { | |
124 | + .name = "rcar_thermal", | |
125 | + .resource = thermal_resources, | |
126 | + .num_resources = ARRAY_SIZE(thermal_resources), | |
127 | +}; | |
128 | + | |
78 | 129 | static struct platform_device *marzen_devices[] __initdata = { |
79 | 130 | ð_device, |
131 | + &sdhi0_device, | |
132 | + &thermal_device, | |
80 | 133 | }; |
81 | 134 | |
82 | 135 | static void __init marzen_init(void) |
83 | 136 | { |
84 | - regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | |
137 | + regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, | |
138 | + ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | |
139 | + regulator_register_fixed(1, dummy_supplies, | |
140 | + ARRAY_SIZE(dummy_supplies)); | |
85 | 141 | |
86 | 142 | r8a7779_pinmux_init(); |
87 | 143 | |
... | ... | @@ -96,6 +152,16 @@ |
96 | 152 | /* LAN89218 */ |
97 | 153 | gpio_request(GPIO_FN_EX_CS0, NULL); /* nCS */ |
98 | 154 | gpio_request(GPIO_FN_IRQ1_B, NULL); /* IRQ + PME */ |
155 | + | |
156 | + /* SD0 (CN20) */ | |
157 | + gpio_request(GPIO_FN_SD0_CLK, NULL); | |
158 | + gpio_request(GPIO_FN_SD0_CMD, NULL); | |
159 | + gpio_request(GPIO_FN_SD0_DAT0, NULL); | |
160 | + gpio_request(GPIO_FN_SD0_DAT1, NULL); | |
161 | + gpio_request(GPIO_FN_SD0_DAT2, NULL); | |
162 | + gpio_request(GPIO_FN_SD0_DAT3, NULL); | |
163 | + gpio_request(GPIO_FN_SD0_CD, NULL); | |
164 | + gpio_request(GPIO_FN_SD0_WP, NULL); | |
99 | 165 | |
100 | 166 | r8a7779_add_standard_devices(); |
101 | 167 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |