aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2007-02-07 23:19:12 -0500
committerKumar Gala <galak@kernel.crashing.org>2007-02-08 00:44:05 -0500
commitb359049f270dcaab8a5bbdbb966594c16caba16c (patch)
tree5da2264bf07a8c0c481aee64e5fd3c3d5b052604
parent8423200553113cc031caa9b147f6150a8e26545c (diff)
[POWERPC] 83xx: Add base support for the MPC8313E RDB
Add support for the MPC8313E Reference Development Board (RDB). The board is a mini-ITX reference board with 128M DDR2, 8M flash, 32M NAND, USB, PCI, gigabit ethernet, and serial. Signed-off-by: Wilson Lo <Wilson.Lo@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts219
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig12
-rw-r--r--arch/powerpc/platforms/83xx/Makefile1
-rw-r--r--arch/powerpc/platforms/83xx/mpc8313_rdb.c99
4 files changed, 331 insertions, 0 deletions
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
new file mode 100644
index 000000000000..3d2f5a06df3f
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -0,0 +1,219 @@
1/*
2 * MPC8313E RDB Device Tree Source
3 *
4 * Copyright 2005, 2006, 2007 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12/ {
13 model = "MPC8313ERDB";
14 compatible = "MPC83xx";
15 #address-cells = <1>;
16 #size-cells = <1>;
17
18 cpus {
19 #cpus = <1>;
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 PowerPC,8313@0 {
24 device_type = "cpu";
25 reg = <0>;
26 d-cache-line-size = <20>; // 32 bytes
27 i-cache-line-size = <20>; // 32 bytes
28 d-cache-size = <4000>; // L1, 16K
29 i-cache-size = <4000>; // L1, 16K
30 timebase-frequency = <0>; // from bootloader
31 bus-frequency = <0>; // from bootloader
32 clock-frequency = <0>; // from bootloader
33 32-bit;
34 };
35 };
36
37 memory {
38 device_type = "memory";
39 reg = <00000000 08000000>; // 128MB at 0
40 };
41
42 soc8313@e0000000 {
43 #address-cells = <1>;
44 #size-cells = <1>;
45 #interrupt-cells = <2>;
46 device_type = "soc";
47 ranges = <0 e0000000 00100000>;
48 reg = <e0000000 00000200>;
49 bus-frequency = <0>;
50
51 wdt@200 {
52 device_type = "watchdog";
53 compatible = "mpc83xx_wdt";
54 reg = <200 100>;
55 };
56
57 i2c@3000 {
58 device_type = "i2c";
59 compatible = "fsl-i2c";
60 reg = <3000 100>;
61 interrupts = <e 8>;
62 interrupt-parent = <700>;
63 dfsrr;
64 };
65
66 i2c@3100 {
67 device_type = "i2c";
68 compatible = "fsl-i2c";
69 reg = <3100 100>;
70 interrupts = <f 8>;
71 interrupt-parent = <700>;
72 dfsrr;
73 };
74
75 spi@7000 {
76 device_type = "spi";
77 compatible = "mpc83xx_spi";
78 reg = <7000 1000>;
79 interrupts = <10 8>;
80 interrupt-parent = <700>;
81 mode = <0>;
82 };
83
84 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
85 usb@23000 {
86 device_type = "usb";
87 compatible = "fsl-usb2-dr";
88 reg = <23000 1000>;
89 #address-cells = <1>;
90 #size-cells = <0>;
91 interrupt-parent = <700>;
92 interrupts = <26 2>;
93 phy_type = "utmi_wide";
94 };
95
96 mdio@24520 {
97 device_type = "mdio";
98 compatible = "gianfar";
99 reg = <24520 20>;
100 #address-cells = <1>;
101 #size-cells = <0>;
102 linux,phandle = <24520>;
103 ethernet-phy@1 {
104 linux,phandle = <2452001>;
105 interrupt-parent = <700>;
106 interrupts = <13 2>;
107 reg = <1>;
108 device_type = "ethernet-phy";
109 };
110 ethernet-phy@4 {
111 linux,phandle = <2452004>;
112 interrupt-parent = <700>;
113 interrupts = <14 2>;
114 reg = <4>;
115 device_type = "ethernet-phy";
116 };
117 };
118
119 ethernet@24000 {
120 device_type = "network";
121 model = "eTSEC";
122 compatible = "gianfar";
123 reg = <24000 1000>;
124 local-mac-address = [ 00 00 00 00 00 00 ];
125 interrupts = <25 8 24 8 23 8>;
126 interrupt-parent = <700>;
127 phy-handle = <2452001>;
128 };
129
130 ethernet@25000 {
131 device_type = "network";
132 model = "eTSEC";
133 compatible = "gianfar";
134 reg = <25000 1000>;
135 local-mac-address = [ 00 00 00 00 00 00 ];
136 interrupts = <22 8 21 8 20 8>;
137 interrupt-parent = <700>;
138 phy-handle = <2452004>;
139 };
140
141 serial@4500 {
142 device_type = "serial";
143 compatible = "ns16550";
144 reg = <4500 100>;
145 clock-frequency = <0>;
146 interrupts = <9 8>;
147 interrupt-parent = <700>;
148 };
149
150 serial@4600 {
151 device_type = "serial";
152 compatible = "ns16550";
153 reg = <4600 100>;
154 clock-frequency = <0>;
155 interrupts = <a 8>;
156 interrupt-parent = <700>;
157 };
158
159 pci@8500 {
160 interrupt-map-mask = <f800 0 0 7>;
161 interrupt-map = <
162
163 /* IDSEL 0x0E -mini PCI */
164 7000 0 0 1 700 12 8
165 7000 0 0 2 700 12 8
166 7000 0 0 3 700 12 8
167 7000 0 0 4 700 12 8
168
169 /* IDSEL 0x0F - PCI slot */
170 7800 0 0 1 700 11 8
171 7800 0 0 2 700 12 8
172 7800 0 0 3 700 11 8
173 7800 0 0 4 700 12 8>;
174 interrupt-parent = <700>;
175 interrupts = <42 8>;
176 bus-range = <0 0>;
177 ranges = <02000000 0 90000000 90000000 0 10000000
178 42000000 0 80000000 80000000 0 10000000
179 01000000 0 00000000 e2000000 0 00100000>;
180 clock-frequency = <3f940aa>;
181 #interrupt-cells = <1>;
182 #size-cells = <2>;
183 #address-cells = <3>;
184 reg = <8500 100>;
185 compatible = "83xx";
186 device_type = "pci";
187 };
188
189 crypto@30000 {
190 device_type = "crypto";
191 model = "SEC2";
192 compatible = "talitos";
193 reg = <30000 7000>;
194 interrupts = <b 8>;
195 interrupt-parent = <700>;
196 /* Rev. 2.2 */
197 num-channels = <1>;
198 channel-fifo-len = <18>;
199 exec-units-mask = <0000004c>;
200 descriptor-types-mask = <0122003f>;
201 };
202
203 /* IPIC
204 * interrupts cell = <intr #, sense>
205 * sense values match linux IORESOURCE_IRQ_* defines:
206 * sense == 8: Level, low assertion
207 * sense == 2: Edge, high-to-low change
208 */
209 pic@700 {
210 linux,phandle = <700>;
211 interrupt-controller;
212 #address-cells = <0>;
213 #interrupt-cells = <2>;
214 reg = <700 100>;
215 built-in;
216 device_type = "ipic";
217 };
218 };
219};
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index edcd5b875b66..46883c5136ac 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -5,6 +5,12 @@ choice
5 prompt "Machine Type" 5 prompt "Machine Type"
6 default MPC834x_SYS 6 default MPC834x_SYS
7 7
8config MPC8313_RDB
9 bool "Freescale MPC8313 RDB"
10 select DEFAULT_UIMAGE
11 help
12 This option enables support for the MPC8313 RDB board.
13
8config MPC832x_MDS 14config MPC832x_MDS
9 bool "Freescale MPC832x MDS" 15 bool "Freescale MPC832x MDS"
10 select DEFAULT_UIMAGE 16 select DEFAULT_UIMAGE
@@ -41,6 +47,12 @@ config MPC8360E_PB
41 47
42endchoice 48endchoice
43 49
50config PPC_MPC831x
51 bool
52 select PPC_UDBG_16550
53 select PPC_INDIRECT_PCI
54 default y if MPC8313_RDB
55
44config PPC_MPC832x 56config PPC_MPC832x
45 bool 57 bool
46 select PPC_UDBG_16550 58 select PPC_UDBG_16550
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index f1aa7e24a938..0b732a79c0a8 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -3,6 +3,7 @@
3# 3#
4obj-y := misc.o 4obj-y := misc.o
5obj-$(CONFIG_PCI) += pci.o 5obj-$(CONFIG_PCI) += pci.o
6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o
6obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o 7obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o
7obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o 8obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
8obj-$(CONFIG_MPC8360E_PB) += mpc8360e_pb.o 9obj-$(CONFIG_MPC8360E_PB) += mpc8360e_pb.o
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
new file mode 100644
index 000000000000..c3b98c34eb6b
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
@@ -0,0 +1,99 @@
1/*
2 * arch/powerpc/platforms/83xx/mpc8313_rdb.c
3 *
4 * Description: MPC8313x RDB board specific routines.
5 * This file is based on mpc834x_sys.c
6 * Author: Lo Wlison <r43300@freescale.com>
7 *
8 * Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#include <linux/pci.h>
17
18#include <asm/time.h>
19#include <asm/ipic.h>
20#include <asm/udbg.h>
21
22#include "mpc83xx.h"
23
24#undef DEBUG
25#ifdef DEBUG
26#define DBG(fmt...) udbg_printf(fmt)
27#else
28#define DBG(fmt...)
29#endif
30
31#ifndef CONFIG_PCI
32unsigned long isa_io_base = 0;
33unsigned long isa_mem_base = 0;
34#endif
35
36/* ************************************************************************
37 *
38 * Setup the architecture
39 *
40 */
41static void __init mpc8313_rdb_setup_arch(void)
42{
43 struct device_node *np;
44
45 if (ppc_md.progress)
46 ppc_md.progress("mpc8313_rdb_setup_arch()", 0);
47
48#ifdef CONFIG_PCI
49 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
50 add_bridge(np);
51
52 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
53#endif
54}
55
56void __init mpc8313_rdb_init_IRQ(void)
57{
58 struct device_node *np;
59
60 np = of_find_node_by_type(NULL, "ipic");
61 if (!np)
62 return;
63
64 ipic_init(np, 0);
65
66 /* Initialize the default interrupt mapping priorities,
67 * in case the boot rom changed something on us.
68 */
69 ipic_set_default_priority();
70}
71
72/*
73 * Called very early, MMU is off, device-tree isn't unflattened
74 */
75static int __init mpc8313_rdb_probe(void)
76{
77 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
78 "model", NULL);
79 if (model == NULL)
80 return 0;
81 if (strcmp(model, "MPC8313ERDB"))
82 return 0;
83
84 DBG("MPC8313 RDB found\n");
85
86 return 1;
87}
88
89define_machine(mpc8313_rdb) {
90 .name = "MPC8313 RDB",
91 .probe = mpc8313_rdb_probe,
92 .setup_arch = mpc8313_rdb_setup_arch,
93 .init_IRQ = mpc8313_rdb_init_IRQ,
94 .get_irq = ipic_get_irq,
95 .restart = mpc83xx_restart,
96 .time_init = mpc83xx_time_init,
97 .calibrate_decr = generic_calibrate_decr,
98 .progress = udbg_progress,
99};