aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/boot/dts/ingenic/jz4770.dtsi212
-rw-r--r--arch/mips/jz4740/Kconfig6
-rw-r--r--arch/mips/jz4740/time.c2
3 files changed, 219 insertions, 1 deletions
diff --git a/arch/mips/boot/dts/ingenic/jz4770.dtsi b/arch/mips/boot/dts/ingenic/jz4770.dtsi
new file mode 100644
index 000000000000..7c2804f3f5f1
--- /dev/null
+++ b/arch/mips/boot/dts/ingenic/jz4770.dtsi
@@ -0,0 +1,212 @@
1// SPDX-License-Identifier: GPL-2.0
2
3#include <dt-bindings/clock/jz4770-cgu.h>
4
5/ {
6 #address-cells = <1>;
7 #size-cells = <1>;
8 compatible = "ingenic,jz4770";
9
10 cpuintc: interrupt-controller {
11 #address-cells = <0>;
12 #interrupt-cells = <1>;
13 interrupt-controller;
14 compatible = "mti,cpu-interrupt-controller";
15 };
16
17 intc: interrupt-controller@10001000 {
18 compatible = "ingenic,jz4770-intc";
19 reg = <0x10001000 0x40>;
20
21 interrupt-controller;
22 #interrupt-cells = <1>;
23
24 interrupt-parent = <&cpuintc>;
25 interrupts = <2>;
26 };
27
28 ext: ext {
29 compatible = "fixed-clock";
30 #clock-cells = <0>;
31 };
32
33 osc32k: osc32k {
34 compatible = "fixed-clock";
35 #clock-cells = <0>;
36 clock-frequency = <32768>;
37 };
38
39 cgu: jz4770-cgu@10000000 {
40 compatible = "ingenic,jz4770-cgu";
41 reg = <0x10000000 0x100>;
42
43 clocks = <&ext>, <&osc32k>;
44 clock-names = "ext", "osc32k";
45
46 #clock-cells = <1>;
47 };
48
49 pinctrl: pin-controller@10010000 {
50 compatible = "ingenic,jz4770-pinctrl";
51 reg = <0x10010000 0x600>;
52
53 #address-cells = <1>;
54 #size-cells = <0>;
55
56 gpa: gpio@0 {
57 compatible = "ingenic,jz4770-gpio";
58 reg = <0>;
59
60 gpio-controller;
61 gpio-ranges = <&pinctrl 0 0 32>;
62 #gpio-cells = <2>;
63
64 interrupt-controller;
65 #interrupt-cells = <2>;
66
67 interrupt-parent = <&intc>;
68 interrupts = <17>;
69 };
70
71 gpb: gpio@1 {
72 compatible = "ingenic,jz4770-gpio";
73 reg = <1>;
74
75 gpio-controller;
76 gpio-ranges = <&pinctrl 0 32 32>;
77 #gpio-cells = <2>;
78
79 interrupt-controller;
80 #interrupt-cells = <2>;
81
82 interrupt-parent = <&intc>;
83 interrupts = <16>;
84 };
85
86 gpc: gpio@2 {
87 compatible = "ingenic,jz4770-gpio";
88 reg = <2>;
89
90 gpio-controller;
91 gpio-ranges = <&pinctrl 0 64 32>;
92 #gpio-cells = <2>;
93
94 interrupt-controller;
95 #interrupt-cells = <2>;
96
97 interrupt-parent = <&intc>;
98 interrupts = <15>;
99 };
100
101 gpd: gpio@3 {
102 compatible = "ingenic,jz4770-gpio";
103 reg = <3>;
104
105 gpio-controller;
106 gpio-ranges = <&pinctrl 0 96 32>;
107 #gpio-cells = <2>;
108
109 interrupt-controller;
110 #interrupt-cells = <2>;
111
112 interrupt-parent = <&intc>;
113 interrupts = <14>;
114 };
115
116 gpe: gpio@4 {
117 compatible = "ingenic,jz4770-gpio";
118 reg = <4>;
119
120 gpio-controller;
121 gpio-ranges = <&pinctrl 0 128 32>;
122 #gpio-cells = <2>;
123
124 interrupt-controller;
125 #interrupt-cells = <2>;
126
127 interrupt-parent = <&intc>;
128 interrupts = <13>;
129 };
130
131 gpf: gpio@5 {
132 compatible = "ingenic,jz4770-gpio";
133 reg = <5>;
134
135 gpio-controller;
136 gpio-ranges = <&pinctrl 0 160 32>;
137 #gpio-cells = <2>;
138
139 interrupt-controller;
140 #interrupt-cells = <2>;
141
142 interrupt-parent = <&intc>;
143 interrupts = <12>;
144 };
145 };
146
147 uart0: serial@10030000 {
148 compatible = "ingenic,jz4770-uart";
149 reg = <0x10030000 0x100>;
150
151 clocks = <&ext>, <&cgu JZ4770_CLK_UART0>;
152 clock-names = "baud", "module";
153
154 interrupt-parent = <&intc>;
155 interrupts = <5>;
156
157 status = "disabled";
158 };
159
160 uart1: serial@10031000 {
161 compatible = "ingenic,jz4770-uart";
162 reg = <0x10031000 0x100>;
163
164 clocks = <&ext>, <&cgu JZ4770_CLK_UART1>;
165 clock-names = "baud", "module";
166
167 interrupt-parent = <&intc>;
168 interrupts = <4>;
169
170 status = "disabled";
171 };
172
173 uart2: serial@10032000 {
174 compatible = "ingenic,jz4770-uart";
175 reg = <0x10032000 0x100>;
176
177 clocks = <&ext>, <&cgu JZ4770_CLK_UART2>;
178 clock-names = "baud", "module";
179
180 interrupt-parent = <&intc>;
181 interrupts = <3>;
182
183 status = "disabled";
184 };
185
186 uart3: serial@10033000 {
187 compatible = "ingenic,jz4770-uart";
188 reg = <0x10033000 0x100>;
189
190 clocks = <&ext>, <&cgu JZ4770_CLK_UART3>;
191 clock-names = "baud", "module";
192
193 interrupt-parent = <&intc>;
194 interrupts = <2>;
195
196 status = "disabled";
197 };
198
199 uhc: uhc@13430000 {
200 compatible = "generic-ohci";
201 reg = <0x13430000 0x1000>;
202
203 clocks = <&cgu JZ4770_CLK_UHC>, <&cgu JZ4770_CLK_UHC_PHY>;
204 assigned-clocks = <&cgu JZ4770_CLK_UHC>;
205 assigned-clock-rates = <48000000>;
206
207 interrupt-parent = <&intc>;
208 interrupts = <20>;
209
210 status = "disabled";
211 };
212};
diff --git a/arch/mips/jz4740/Kconfig b/arch/mips/jz4740/Kconfig
index 643af2012e14..29a9361a2b77 100644
--- a/arch/mips/jz4740/Kconfig
+++ b/arch/mips/jz4740/Kconfig
@@ -18,6 +18,12 @@ config MACH_JZ4740
18 bool 18 bool
19 select SYS_HAS_CPU_MIPS32_R1 19 select SYS_HAS_CPU_MIPS32_R1
20 20
21config MACH_JZ4770
22 bool
23 select MIPS_CPU_SCACHE
24 select SYS_HAS_CPU_MIPS32_R2
25 select SYS_SUPPORTS_HIGHMEM
26
21config MACH_JZ4780 27config MACH_JZ4780
22 bool 28 bool
23 select MIPS_CPU_SCACHE 29 select MIPS_CPU_SCACHE
diff --git a/arch/mips/jz4740/time.c b/arch/mips/jz4740/time.c
index bb1ad5119da4..2ca9160f642a 100644
--- a/arch/mips/jz4740/time.c
+++ b/arch/mips/jz4740/time.c
@@ -113,7 +113,7 @@ static struct clock_event_device jz4740_clockevent = {
113#ifdef CONFIG_MACH_JZ4740 113#ifdef CONFIG_MACH_JZ4740
114 .irq = JZ4740_IRQ_TCU0, 114 .irq = JZ4740_IRQ_TCU0,
115#endif 115#endif
116#ifdef CONFIG_MACH_JZ4780 116#if defined(CONFIG_MACH_JZ4770) || defined(CONFIG_MACH_JZ4780)
117 .irq = JZ4780_IRQ_TCU2, 117 .irq = JZ4780_IRQ_TCU2,
118#endif 118#endif
119}; 119};