aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingkai Hu <Mingkai.Hu@freescale.com>2013-08-02 02:39:11 -0400
committerScott Wood <scottwood@freescale.com>2013-08-23 20:43:24 -0400
commit622e03eb3498c32ee29de5c1d6d381f443e58fad (patch)
tree786efceede48ee3b1b15d088865ff31e0d259a87
parent2c2f036afee7c28a2019b34134c4ea002a2d2c36 (diff)
powerpc/85xx: Add C293PCIE board support
C293PCIE board is a series of Freescale PCIe add-in cards to perform as public key crypto accelerator or secure key management module. - 512KB platform SRAM in addition to 512K L2 Cache/SRAM - 512MB soldered DDR3 32bit memory - CPLD System Logic - 64MB x16 NOR flash and 4GB x8 NAND flash - 16MB SPI flash Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com> Signed-off-by: Po Liu <Po.Liu@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
-rw-r--r--arch/powerpc/boot/dts/c293pcie.dts223
-rw-r--r--arch/powerpc/configs/mpc85xx_defconfig1
-rw-r--r--arch/powerpc/configs/mpc85xx_smp_defconfig1
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig6
-rw-r--r--arch/powerpc/platforms/85xx/Makefile1
-rw-r--r--arch/powerpc/platforms/85xx/c293pcie.c75
6 files changed, 307 insertions, 0 deletions
diff --git a/arch/powerpc/boot/dts/c293pcie.dts b/arch/powerpc/boot/dts/c293pcie.dts
new file mode 100644
index 000000000000..1238bda8901f
--- /dev/null
+++ b/arch/powerpc/boot/dts/c293pcie.dts
@@ -0,0 +1,223 @@
1/*
2 * C293 PCIE Device Tree Source
3 *
4 * Copyright 2013 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35/include/ "fsl/c293si-pre.dtsi"
36
37/ {
38 model = "fsl,C293PCIE";
39 compatible = "fsl,C293PCIE";
40
41 memory {
42 device_type = "memory";
43 };
44
45 ifc: ifc@fffe1e000 {
46 reg = <0xf 0xffe1e000 0 0x2000>;
47 ranges = <0x0 0x0 0xf 0xec000000 0x04000000
48 0x2 0x0 0xf 0xffdf0000 0x00010000>;
49
50 };
51
52 soc: soc@fffe00000 {
53 ranges = <0x0 0xf 0xffe00000 0x100000>;
54 };
55
56 pci0: pcie@fffe0a000 {
57 reg = <0xf 0xffe0a000 0 0x1000>;
58 ranges = <0x2000000 0x0 0x80000000 0xc 0x00000000 0x0 0x20000000
59 0x1000000 0x0 0x00000000 0xf 0xffc00000 0x0 0x10000>;
60 pcie@0 {
61 ranges = <0x2000000 0x0 0x80000000
62 0x2000000 0x0 0x80000000
63 0x0 0x20000000
64
65 0x1000000 0x0 0x0
66 0x1000000 0x0 0x0
67 0x0 0x100000>;
68 };
69 };
70};
71
72&ifc {
73 nor@0,0 {
74 #address-cells = <1>;
75 #size-cells = <1>;
76 compatible = "cfi-flash";
77 reg = <0x0 0x0 0x4000000>;
78 bank-width = <2>;
79 device-width = <1>;
80
81 partition@0 {
82 /* 1MB for DTB Image */
83 reg = <0x0 0x00100000>;
84 label = "NOR DTB Image";
85 };
86
87 partition@100000 {
88 /* 8 MB for Linux Kernel Image */
89 reg = <0x00100000 0x00800000>;
90 label = "NOR Linux Kernel Image";
91 };
92
93 partition@900000 {
94 /* 53MB for rootfs */
95 reg = <0x00900000 0x03500000>;
96 label = "NOR Rootfs Image";
97 };
98
99 partition@3e00000 {
100 /* 1MB for blob encrypted key */
101 reg = <0x03e00000 0x00100000>;
102 label = "NOR blob encrypted key";
103 };
104
105 partition@3f00000 {
106 /* 512KB for u-boot Bootloader Image and evn */
107 reg = <0x03f00000 0x00100000>;
108 label = "NOR U-Boot Image";
109 read-only;
110 };
111 };
112
113 nand@1,0 {
114 #address-cells = <1>;
115 #size-cells = <1>;
116 compatible = "fsl,ifc-nand";
117 reg = <0x1 0x0 0x10000>;
118
119 partition@0 {
120 /* This location must not be altered */
121 /* 1MB for u-boot Bootloader Image */
122 reg = <0x0 0x00100000>;
123 label = "NAND U-Boot Image";
124 read-only;
125 };
126
127 partition@100000 {
128 /* 1MB for DTB Image */
129 reg = <0x00100000 0x00100000>;
130 label = "NAND DTB Image";
131 };
132
133 partition@200000 {
134 /* 16MB for Linux Kernel Image */
135 reg = <0x00200000 0x01000000>;
136 label = "NAND Linux Kernel Image";
137 };
138
139 partition@1200000 {
140 /* 4078MB for Root file System Image */
141 reg = <0x00600000 0xfee00000>;
142 label = "NAND RFS Image";
143 };
144 };
145
146 cpld@2,0 {
147 compatible = "fsl,c293pcie-cpld";
148 reg = <0x2 0x0 0x20>;
149 };
150};
151
152&soc {
153 i2c@3000 {
154 eeprom@50 {
155 compatible = "st,24c1024";
156 reg = <0x50>;
157 };
158
159 adt7461@4c {
160 compatible = "adi,adt7461";
161 reg = <0x4c>;
162 };
163 };
164
165 spi@7000 {
166 flash@0 {
167 #address-cells = <1>;
168 #size-cells = <1>;
169 compatible = "spansion,s25sl12801";
170 reg = <0>;
171 spi-max-frequency = <50000000>;
172
173 partition@0 {
174 /* 1MB for u-boot Bootloader Image */
175 /* 1MB for Environment */
176 reg = <0x0 0x00100000>;
177 label = "SPI Flash U-Boot Image";
178 read-only;
179 };
180
181 partition@100000 {
182 /* 512KB for DTB Image */
183 reg = <0x00100000 0x00080000>;
184 label = "SPI Flash DTB Image";
185 };
186
187 partition@180000 {
188 /* 4MB for Linux Kernel Image */
189 reg = <0x00180000 0x00400000>;
190 label = "SPI Flash Linux Kernel Image";
191 };
192
193 partition@580000 {
194 /* 10.5MB for RFS Image */
195 reg = <0x00580000 0x00a80000>;
196 label = "SPI Flash RFS Image";
197 };
198 };
199 };
200
201 mdio@24000 {
202 phy0: ethernet-phy@0 {
203 interrupts = <2 1 0 0>;
204 reg = <0x0>;
205 };
206
207 phy1: ethernet-phy@1 {
208 interrupts = <2 1 0 0>;
209 reg = <0x2>;
210 };
211 };
212
213 enet0: ethernet@b0000 {
214 phy-handle = <&phy0>;
215 phy-connection-type = "rgmii-id";
216 };
217
218 enet1: ethernet@b1000 {
219 phy-handle = <&phy1>;
220 phy-connection-type = "rgmii-id";
221 };
222};
223/include/ "fsl/c293si-post.dtsi"
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig
index b90c7af2ca1e..dc098d988211 100644
--- a/arch/powerpc/configs/mpc85xx_defconfig
+++ b/arch/powerpc/configs/mpc85xx_defconfig
@@ -27,6 +27,7 @@ CONFIG_MPC85xx_MDS=y
27CONFIG_MPC8536_DS=y 27CONFIG_MPC8536_DS=y
28CONFIG_MPC85xx_DS=y 28CONFIG_MPC85xx_DS=y
29CONFIG_MPC85xx_RDB=y 29CONFIG_MPC85xx_RDB=y
30CONFIG_C293_PCIE=y
30CONFIG_P1010_RDB=y 31CONFIG_P1010_RDB=y
31CONFIG_P1022_DS=y 32CONFIG_P1022_DS=y
32CONFIG_P1022_RDK=y 33CONFIG_P1022_RDK=y
diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig
index 9ced85188534..5bca60161bb3 100644
--- a/arch/powerpc/configs/mpc85xx_smp_defconfig
+++ b/arch/powerpc/configs/mpc85xx_smp_defconfig
@@ -30,6 +30,7 @@ CONFIG_MPC85xx_MDS=y
30CONFIG_MPC8536_DS=y 30CONFIG_MPC8536_DS=y
31CONFIG_MPC85xx_DS=y 31CONFIG_MPC85xx_DS=y
32CONFIG_MPC85xx_RDB=y 32CONFIG_MPC85xx_RDB=y
33CONFIG_C293_PCIE=y
33CONFIG_P1010_RDB=y 34CONFIG_P1010_RDB=y
34CONFIG_P1022_DS=y 35CONFIG_P1022_DS=y
35CONFIG_P1022_RDK=y 36CONFIG_P1022_RDK=y
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index b8f0d3270d7a..de2eb9320993 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -32,6 +32,12 @@ config BSC9131_RDB
32 StarCore SC3850 DSP 32 StarCore SC3850 DSP
33 Manufacturer : Freescale Semiconductor, Inc 33 Manufacturer : Freescale Semiconductor, Inc
34 34
35config C293_PCIE
36 bool "Freescale C293PCIE"
37 select DEFAULT_UIMAGE
38 help
39 This option enables support for the C293PCIE board
40
35config MPC8540_ADS 41config MPC8540_ADS
36 bool "Freescale MPC8540 ADS" 42 bool "Freescale MPC8540 ADS"
37 select DEFAULT_UIMAGE 43 select DEFAULT_UIMAGE
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 2eab37ea4a9d..53c9f75a6907 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -6,6 +6,7 @@ obj-$(CONFIG_SMP) += smp.o
6obj-y += common.o 6obj-y += common.o
7 7
8obj-$(CONFIG_BSC9131_RDB) += bsc913x_rdb.o 8obj-$(CONFIG_BSC9131_RDB) += bsc913x_rdb.o
9obj-$(CONFIG_C293_PCIE) += c293pcie.o
9obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o 10obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
10obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o 11obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
11obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o 12obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
diff --git a/arch/powerpc/platforms/85xx/c293pcie.c b/arch/powerpc/platforms/85xx/c293pcie.c
new file mode 100644
index 000000000000..6208e49142bf
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/c293pcie.c
@@ -0,0 +1,75 @@
1/*
2 * C293PCIE Board Setup
3 *
4 * Copyright 2013 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#include <linux/stddef.h>
13#include <linux/kernel.h>
14#include <linux/of_platform.h>
15
16#include <asm/machdep.h>
17#include <asm/udbg.h>
18#include <asm/mpic.h>
19
20#include <sysdev/fsl_soc.h>
21#include <sysdev/fsl_pci.h>
22
23#include "mpc85xx.h"
24
25void __init c293_pcie_pic_init(void)
26{
27 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN |
28 MPIC_SINGLE_DEST_CPU, 0, 256, " OpenPIC ");
29
30 BUG_ON(mpic == NULL);
31
32 mpic_init(mpic);
33}
34
35
36/*
37 * Setup the architecture
38 */
39static void __init c293_pcie_setup_arch(void)
40{
41 if (ppc_md.progress)
42 ppc_md.progress("c293_pcie_setup_arch()", 0);
43
44 fsl_pci_assign_primary();
45
46 printk(KERN_INFO "C293 PCIE board from Freescale Semiconductor\n");
47}
48
49machine_arch_initcall(c293_pcie, mpc85xx_common_publish_devices);
50
51/*
52 * Called very early, device-tree isn't unflattened
53 */
54static int __init c293_pcie_probe(void)
55{
56 unsigned long root = of_get_flat_dt_root();
57
58 if (of_flat_dt_is_compatible(root, "fsl,C293PCIE"))
59 return 1;
60 return 0;
61}
62
63define_machine(c293_pcie) {
64 .name = "C293 PCIE",
65 .probe = c293_pcie_probe,
66 .setup_arch = c293_pcie_setup_arch,
67 .init_IRQ = c293_pcie_pic_init,
68#ifdef CONFIG_PCI
69 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
70#endif
71 .get_irq = mpic_get_irq,
72 .restart = fsl_rstcr_restart,
73 .calibrate_decr = generic_calibrate_decr,
74 .progress = udbg_progress,
75};