diff options
author | Holger Brunck <holger.brunck@keymile.com> | 2012-05-08 09:57:22 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2012-07-10 08:07:20 -0400 |
commit | 5d1d67e361eaf4c67a28cf6ccc6e3e6a9b0aae6f (patch) | |
tree | 7583e3c3a660d6b59e98386e515408c856cc6c67 /arch | |
parent | 7ee0bf533606f6ac5bc33f4ae60a4b04914675fb (diff) |
powerpc/82xx: add SPI support for mgcoge
Add spi support for mgcoge into the platform code and the dts
file. Additionaly SPIDEV is switched on in the defconfig and the
updates for the newer kernel version are committed. The SPI
interface is used to drive the Maxim DS3106 clock chip.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/boot/dts/mgcoge.dts | 23 | ||||
-rw-r--r-- | arch/powerpc/configs/mgcoge_defconfig | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/82xx/km82xx.c | 5 |
3 files changed, 32 insertions, 8 deletions
diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts index ededaf5ac015..d72fb5e219d0 100644 --- a/arch/powerpc/boot/dts/mgcoge.dts +++ b/arch/powerpc/boot/dts/mgcoge.dts | |||
@@ -222,6 +222,29 @@ | |||
222 | interrupt-parent = <&PIC>; | 222 | interrupt-parent = <&PIC>; |
223 | usb-clock = <5>; | 223 | usb-clock = <5>; |
224 | }; | 224 | }; |
225 | spi@11aa0 { | ||
226 | cell-index = <0>; | ||
227 | compatible = "fsl,spi", "fsl,cpm2-spi"; | ||
228 | reg = <0x11a80 0x40 0x89fc 0x2>; | ||
229 | interrupts = <2 8>; | ||
230 | interrupt-parent = <&PIC>; | ||
231 | gpios = < &cpm2_pio_d 19 0>; | ||
232 | #address-cells = <1>; | ||
233 | #size-cells = <0>; | ||
234 | ds3106@1 { | ||
235 | compatible = "gen,spidev"; | ||
236 | reg = <0>; | ||
237 | spi-max-frequency = <8000000>; | ||
238 | }; | ||
239 | }; | ||
240 | |||
241 | }; | ||
242 | |||
243 | cpm2_pio_d: gpio-controller@10d60 { | ||
244 | #gpio-cells = <2>; | ||
245 | compatible = "fsl,cpm2-pario-bank"; | ||
246 | reg = <0x10d60 0x14>; | ||
247 | gpio-controller; | ||
225 | }; | 248 | }; |
226 | 249 | ||
227 | cpm2_pio_c: gpio-controller@10d40 { | 250 | cpm2_pio_c: gpio-controller@10d40 { |
diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/mgcoge_defconfig index 0d36b0e1e268..8fa84f156ef3 100644 --- a/arch/powerpc/configs/mgcoge_defconfig +++ b/arch/powerpc/configs/mgcoge_defconfig | |||
@@ -2,7 +2,6 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_SWAP is not set | 2 | # CONFIG_SWAP is not set |
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_SPARSE_IRQ=y | ||
6 | CONFIG_IKCONFIG=y | 5 | CONFIG_IKCONFIG=y |
7 | CONFIG_IKCONFIG_PROC=y | 6 | CONFIG_IKCONFIG_PROC=y |
8 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
@@ -12,6 +11,7 @@ CONFIG_KALLSYMS_ALL=y | |||
12 | # CONFIG_PCSPKR_PLATFORM is not set | 11 | # CONFIG_PCSPKR_PLATFORM is not set |
13 | CONFIG_EMBEDDED=y | 12 | CONFIG_EMBEDDED=y |
14 | CONFIG_SLAB=y | 13 | CONFIG_SLAB=y |
14 | CONFIG_PARTITION_ADVANCED=y | ||
15 | # CONFIG_IOSCHED_CFQ is not set | 15 | # CONFIG_IOSCHED_CFQ is not set |
16 | # CONFIG_PPC_PMAC is not set | 16 | # CONFIG_PPC_PMAC is not set |
17 | CONFIG_PPC_82xx=y | 17 | CONFIG_PPC_82xx=y |
@@ -49,12 +49,9 @@ CONFIG_PROC_DEVICETREE=y | |||
49 | CONFIG_BLK_DEV_LOOP=y | 49 | CONFIG_BLK_DEV_LOOP=y |
50 | CONFIG_BLK_DEV_RAM=y | 50 | CONFIG_BLK_DEV_RAM=y |
51 | CONFIG_NETDEVICES=y | 51 | CONFIG_NETDEVICES=y |
52 | CONFIG_FIXED_PHY=y | ||
53 | CONFIG_NET_ETHERNET=y | ||
54 | CONFIG_FS_ENET=y | 52 | CONFIG_FS_ENET=y |
55 | CONFIG_FS_ENET_MDIO_FCC=y | 53 | CONFIG_FS_ENET_MDIO_FCC=y |
56 | # CONFIG_NETDEV_1000 is not set | 54 | CONFIG_FIXED_PHY=y |
57 | # CONFIG_NETDEV_10000 is not set | ||
58 | # CONFIG_WLAN is not set | 55 | # CONFIG_WLAN is not set |
59 | # CONFIG_INPUT is not set | 56 | # CONFIG_INPUT is not set |
60 | # CONFIG_SERIO is not set | 57 | # CONFIG_SERIO is not set |
@@ -64,6 +61,8 @@ CONFIG_SERIAL_CPM_CONSOLE=y | |||
64 | CONFIG_I2C=y | 61 | CONFIG_I2C=y |
65 | CONFIG_I2C_CHARDEV=y | 62 | CONFIG_I2C_CHARDEV=y |
66 | CONFIG_I2C_CPM=y | 63 | CONFIG_I2C_CPM=y |
64 | CONFIG_SPI=y | ||
65 | CONFIG_SPI_FSL_SPI=y | ||
67 | # CONFIG_HWMON is not set | 66 | # CONFIG_HWMON is not set |
68 | CONFIG_USB_GADGET=y | 67 | CONFIG_USB_GADGET=y |
69 | CONFIG_USB_FSL_USB2=y | 68 | CONFIG_USB_FSL_USB2=y |
@@ -80,8 +79,6 @@ CONFIG_SQUASHFS=y | |||
80 | CONFIG_NFS_FS=y | 79 | CONFIG_NFS_FS=y |
81 | CONFIG_NFS_V3=y | 80 | CONFIG_NFS_V3=y |
82 | CONFIG_ROOT_NFS=y | 81 | CONFIG_ROOT_NFS=y |
83 | CONFIG_PARTITION_ADVANCED=y | ||
84 | CONFIG_NLS=y | ||
85 | CONFIG_NLS_CODEPAGE_437=y | 82 | CONFIG_NLS_CODEPAGE_437=y |
86 | CONFIG_NLS_ASCII=y | 83 | CONFIG_NLS_ASCII=y |
87 | CONFIG_NLS_ISO8859_1=y | 84 | CONFIG_NLS_ISO8859_1=y |
@@ -90,7 +87,6 @@ CONFIG_MAGIC_SYSRQ=y | |||
90 | CONFIG_DEBUG_FS=y | 87 | CONFIG_DEBUG_FS=y |
91 | # CONFIG_SCHED_DEBUG is not set | 88 | # CONFIG_SCHED_DEBUG is not set |
92 | CONFIG_DEBUG_INFO=y | 89 | CONFIG_DEBUG_INFO=y |
93 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
94 | CONFIG_BDI_SWITCH=y | 90 | CONFIG_BDI_SWITCH=y |
95 | CONFIG_CRYPTO_ECB=y | 91 | CONFIG_CRYPTO_ECB=y |
96 | CONFIG_CRYPTO_PCBC=y | 92 | CONFIG_CRYPTO_PCBC=y |
diff --git a/arch/powerpc/platforms/82xx/km82xx.c b/arch/powerpc/platforms/82xx/km82xx.c index 3661bcdc326a..cf964e19573a 100644 --- a/arch/powerpc/platforms/82xx/km82xx.c +++ b/arch/powerpc/platforms/82xx/km82xx.c | |||
@@ -128,6 +128,11 @@ static __initdata struct cpm_pin km82xx_pins[] = { | |||
128 | {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* TXP */ | 128 | {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* TXP */ |
129 | {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* TXN */ | 129 | {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* TXN */ |
130 | {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXD */ | 130 | {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXD */ |
131 | |||
132 | /* SPI */ | ||
133 | {3, 16, CPM_PIN_INPUT | CPM_PIN_SECONDARY},/* SPI_MISO PD16 */ | ||
134 | {3, 17, CPM_PIN_INPUT | CPM_PIN_SECONDARY},/* SPI_MOSI PD17 */ | ||
135 | {3, 18, CPM_PIN_INPUT | CPM_PIN_SECONDARY},/* SPI_CLK PD18 */ | ||
131 | }; | 136 | }; |
132 | 137 | ||
133 | static void __init init_ioports(void) | 138 | static void __init init_ioports(void) |