ramips: make rt3883 usb work properly
[openwrt.git] / target / linux / ramips / patches-3.9 / 0118-DT-MIPS-ralink-add-RT2880-dts-files.patch
1 From f88ca014e92cf209c0e5b6f68b45e3ca0ada6c45 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Fri, 12 Apr 2013 06:27:37 +0000
4 Subject: [PATCH 118/164] DT: MIPS: ralink: add RT2880 dts files
5
6 Add a dtsi file for RT2880 SoC and a sample dts file.
7
8 Signed-off-by: John Crispin <blogic@openwrt.org>
9 Acked-by: Grant Likely <grant.likely@secretlab.ca>
10 Patchwork: http://patchwork.linux-mips.org/patch/5188/
11 ---
12  arch/mips/ralink/Kconfig             |    4 +++
13  arch/mips/ralink/dts/Makefile        |    1 +
14  arch/mips/ralink/dts/rt2880.dtsi     |   58 ++++++++++++++++++++++++++++++++++
15  arch/mips/ralink/dts/rt2880_eval.dts |   46 +++++++++++++++++++++++++++
16  4 files changed, 109 insertions(+)
17  create mode 100644 arch/mips/ralink/dts/rt2880.dtsi
18  create mode 100644 arch/mips/ralink/dts/rt2880_eval.dts
19
20 diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
21 index 86f6c77..2f6fbb8 100644
22 --- a/arch/mips/ralink/Kconfig
23 +++ b/arch/mips/ralink/Kconfig
24 @@ -34,6 +34,10 @@ choice
25         config DTB_RT_NONE
26                 bool "None"
27  
28 +       config DTB_RT2880_EVAL
29 +               bool "RT2880 eval kit"
30 +               depends on SOC_RT288X
31 +
32         config DTB_RT305X_EVAL
33                 bool "RT305x eval kit"
34                 depends on SOC_RT305X
35 diff --git a/arch/mips/ralink/dts/Makefile b/arch/mips/ralink/dts/Makefile
36 index 1a69fb3..f635a01 100644
37 --- a/arch/mips/ralink/dts/Makefile
38 +++ b/arch/mips/ralink/dts/Makefile
39 @@ -1 +1,2 @@
40 +obj-$(CONFIG_DTB_RT2880_EVAL) := rt2880_eval.dtb.o
41  obj-$(CONFIG_DTB_RT305X_EVAL) := rt3052_eval.dtb.o
42 diff --git a/arch/mips/ralink/dts/rt2880.dtsi b/arch/mips/ralink/dts/rt2880.dtsi
43 new file mode 100644
44 index 0000000..182afde
45 --- /dev/null
46 +++ b/arch/mips/ralink/dts/rt2880.dtsi
47 @@ -0,0 +1,58 @@
48 +/ {
49 +       #address-cells = <1>;
50 +       #size-cells = <1>;
51 +       compatible = "ralink,rt2880-soc";
52 +
53 +       cpus {
54 +               cpu@0 {
55 +                       compatible = "mips,mips4KEc";
56 +               };
57 +       };
58 +
59 +       cpuintc: cpuintc@0 {
60 +               #address-cells = <0>;
61 +               #interrupt-cells = <1>;
62 +               interrupt-controller;
63 +               compatible = "mti,cpu-interrupt-controller";
64 +       };
65 +
66 +       palmbus@300000 {
67 +               compatible = "palmbus";
68 +               reg = <0x300000 0x200000>;
69 +                ranges = <0x0 0x300000 0x1FFFFF>;
70 +
71 +               #address-cells = <1>;
72 +               #size-cells = <1>;
73 +
74 +               sysc@0 {
75 +                       compatible = "ralink,rt2880-sysc";
76 +                       reg = <0x0 0x100>;
77 +               };
78 +
79 +               intc: intc@200 {
80 +                       compatible = "ralink,rt2880-intc";
81 +                       reg = <0x200 0x100>;
82 +
83 +                       interrupt-controller;
84 +                       #interrupt-cells = <1>;
85 +
86 +                       interrupt-parent = <&cpuintc>;
87 +                       interrupts = <2>;
88 +               };
89 +
90 +               memc@300 {
91 +                       compatible = "ralink,rt2880-memc";
92 +                       reg = <0x300 0x100>;
93 +               };
94 +
95 +               uartlite@c00 {
96 +                       compatible = "ralink,rt2880-uart", "ns16550a";
97 +                       reg = <0xc00 0x100>;
98 +
99 +                       interrupt-parent = <&intc>;
100 +                       interrupts = <8>;
101 +
102 +                       reg-shift = <2>;
103 +               };
104 +       };
105 +};
106 diff --git a/arch/mips/ralink/dts/rt2880_eval.dts b/arch/mips/ralink/dts/rt2880_eval.dts
107 new file mode 100644
108 index 0000000..322d700
109 --- /dev/null
110 +++ b/arch/mips/ralink/dts/rt2880_eval.dts
111 @@ -0,0 +1,46 @@
112 +/dts-v1/;
113 +
114 +/include/ "rt2880.dtsi"
115 +
116 +/ {
117 +       compatible = "ralink,rt2880-eval-board", "ralink,rt2880-soc";
118 +       model = "Ralink RT2880 evaluation board";
119 +
120 +       memory@0 {
121 +               reg = <0x8000000 0x2000000>;
122 +       };
123 +
124 +       chosen {
125 +               bootargs = "console=ttyS0,57600";
126 +       };
127 +
128 +       cfi@1f000000 {
129 +               compatible = "cfi-flash";
130 +               reg = <0x1f000000 0x400000>;
131 +
132 +               bank-width = <2>;
133 +               device-width = <2>;
134 +               #address-cells = <1>;
135 +               #size-cells = <1>;
136 +
137 +               partition@0 {
138 +                       label = "uboot";
139 +                       reg = <0x0 0x30000>;
140 +                       read-only;
141 +               };
142 +               partition@30000 {
143 +                       label = "uboot-env";
144 +                       reg = <0x30000 0x10000>;
145 +                       read-only;
146 +               };
147 +               partition@40000 {
148 +                       label = "calibration";
149 +                       reg = <0x40000 0x10000>;
150 +                       read-only;
151 +               };
152 +               partition@50000 {
153 +                       label = "linux";
154 +                       reg = <0x50000 0x3b0000>;
155 +               };
156 +       };
157 +};
158 -- 
159 1.7.10.4
160