aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHolger Brunck <holger.brunck@keymile.com>2012-05-08 09:57:22 -0400
committerKumar Gala <galak@kernel.crashing.org>2012-07-10 08:07:20 -0400
commit5d1d67e361eaf4c67a28cf6ccc6e3e6a9b0aae6f (patch)
tree7583e3c3a660d6b59e98386e515408c856cc6c67 /arch
parent7ee0bf533606f6ac5bc33f4ae60a4b04914675fb (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.dts23
-rw-r--r--arch/powerpc/configs/mgcoge_defconfig12
-rw-r--r--arch/powerpc/platforms/82xx/km82xx.c5
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
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_POSIX_MQUEUE=y 4CONFIG_POSIX_MQUEUE=y
5CONFIG_SPARSE_IRQ=y
6CONFIG_IKCONFIG=y 5CONFIG_IKCONFIG=y
7CONFIG_IKCONFIG_PROC=y 6CONFIG_IKCONFIG_PROC=y
8CONFIG_LOG_BUF_SHIFT=14 7CONFIG_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
13CONFIG_EMBEDDED=y 12CONFIG_EMBEDDED=y
14CONFIG_SLAB=y 13CONFIG_SLAB=y
14CONFIG_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
17CONFIG_PPC_82xx=y 17CONFIG_PPC_82xx=y
@@ -49,12 +49,9 @@ CONFIG_PROC_DEVICETREE=y
49CONFIG_BLK_DEV_LOOP=y 49CONFIG_BLK_DEV_LOOP=y
50CONFIG_BLK_DEV_RAM=y 50CONFIG_BLK_DEV_RAM=y
51CONFIG_NETDEVICES=y 51CONFIG_NETDEVICES=y
52CONFIG_FIXED_PHY=y
53CONFIG_NET_ETHERNET=y
54CONFIG_FS_ENET=y 52CONFIG_FS_ENET=y
55CONFIG_FS_ENET_MDIO_FCC=y 53CONFIG_FS_ENET_MDIO_FCC=y
56# CONFIG_NETDEV_1000 is not set 54CONFIG_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
64CONFIG_I2C=y 61CONFIG_I2C=y
65CONFIG_I2C_CHARDEV=y 62CONFIG_I2C_CHARDEV=y
66CONFIG_I2C_CPM=y 63CONFIG_I2C_CPM=y
64CONFIG_SPI=y
65CONFIG_SPI_FSL_SPI=y
67# CONFIG_HWMON is not set 66# CONFIG_HWMON is not set
68CONFIG_USB_GADGET=y 67CONFIG_USB_GADGET=y
69CONFIG_USB_FSL_USB2=y 68CONFIG_USB_FSL_USB2=y
@@ -80,8 +79,6 @@ CONFIG_SQUASHFS=y
80CONFIG_NFS_FS=y 79CONFIG_NFS_FS=y
81CONFIG_NFS_V3=y 80CONFIG_NFS_V3=y
82CONFIG_ROOT_NFS=y 81CONFIG_ROOT_NFS=y
83CONFIG_PARTITION_ADVANCED=y
84CONFIG_NLS=y
85CONFIG_NLS_CODEPAGE_437=y 82CONFIG_NLS_CODEPAGE_437=y
86CONFIG_NLS_ASCII=y 83CONFIG_NLS_ASCII=y
87CONFIG_NLS_ISO8859_1=y 84CONFIG_NLS_ISO8859_1=y
@@ -90,7 +87,6 @@ CONFIG_MAGIC_SYSRQ=y
90CONFIG_DEBUG_FS=y 87CONFIG_DEBUG_FS=y
91# CONFIG_SCHED_DEBUG is not set 88# CONFIG_SCHED_DEBUG is not set
92CONFIG_DEBUG_INFO=y 89CONFIG_DEBUG_INFO=y
93CONFIG_SYSCTL_SYSCALL_CHECK=y
94CONFIG_BDI_SWITCH=y 90CONFIG_BDI_SWITCH=y
95CONFIG_CRYPTO_ECB=y 91CONFIG_CRYPTO_ECB=y
96CONFIG_CRYPTO_PCBC=y 92CONFIG_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
133static void __init init_ioports(void) 138static void __init init_ioports(void)