summaryrefslogtreecommitdiffstats
path: root/arch/mips/boot/dts/ingenic/rs90.dts
blob: 4eb1edbfc155a6d226b1833746fdc994aa42863e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "jz4725b.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/iio/adc/ingenic,adc.h>
#include <dt-bindings/input/linux-event-codes.h>

/ {
	compatible = "ylm,rs90", "ingenic,jz4725b";
	model = "RS-90";

	memory {
		device_type = "memory";
		reg = <0x0 0x2000000>;
	};

	vcc: regulator {
		compatible = "regulator-fixed";

		regulator-name = "vcc";
		regulaor-min-microvolt = <3300000>;
		regulaor-max-microvolt = <3300000>;
		regulator-always-on;
	};

	backlight: backlight {
		compatible = "pwm-backlight";
		pwms = <&pwm 3 40000 0>;

		brightness-levels = <0 16 32 48 64 80 112 144 192 255>;
		default-brightness-level = <8>;

		pinctrl-names = "default";
		pinctrl-0 = <&pins_pwm3>;

		power-supply = <&vcc>;
	};

	keys@0 {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		key@0 {
			label = "D-pad up";
			linux,code = <KEY_UP>;
			gpios = <&gpc 10 GPIO_ACTIVE_LOW>;
		};

		key@1 {
			label = "D-pad down";
			linux,code = <KEY_DOWN>;
			gpios = <&gpc 11 GPIO_ACTIVE_LOW>;
		};

		key@2 {
			label = "D-pad left";
			linux,code = <KEY_LEFT>;
			gpios = <&gpb 31 GPIO_ACTIVE_LOW>;
		};

		key@3 {
			label = "D-pad right";
			linux,code = <KEY_RIGHT>;
			gpios = <&gpd 21 GPIO_ACTIVE_LOW>;
		};

		key@4 {
			label = "Button A";
			linux,code = <KEY_LEFTCTRL>;
			gpios = <&gpc 31 GPIO_ACTIVE_LOW>;
		};

		key@5 {
			label = "Button B";
			linux,code = <KEY_LEFTALT>;
			gpios = <&gpc 30 GPIO_ACTIVE_LOW>;
		};

		key@6 {
			label = "Right shoulder button";
			linux,code = <KEY_BACKSPACE>;
			gpios = <&gpc 12 GPIO_ACTIVE_LOW>;
			debounce-interval = <10>;
		};

		key@7 {
			label = "Start button";
			linux,code = <KEY_ENTER>;
			gpios = <&gpd 17 GPIO_ACTIVE_LOW>;
		};
	};

	keys@1 {
		compatible = "adc-keys";
		io-channels = <&adc INGENIC_ADC_AUX>;
		io-channel-names = "buttons";
		keyup-threshold-microvolt = <1400000>;
		poll-interval = <30>;

		key@0 {
			label = "Left shoulder button";
			linux,code = <KEY_TAB>;
			press-threshold-microvolt = <800000>;
		};

		key@1 {
			label = "Select button";
			linux,code = <KEY_ESC>;
			press-threshold-microvolt = <1100000>;
		};
	};

	amp: analog-amplifier {
		compatible = "simple-audio-amplifier";
		enable-gpios = <&gpc 15 GPIO_ACTIVE_HIGH>;

		VCC-supply = <&vcc>;
	};

	sound {
		compatible = "simple-audio-card";

		simple-audio-card,name = "rs90-audio";
		simple-audio-card,format = "i2s";

		simple-audio-card,widgets =
			"Speaker", "Speaker",
			"Headphone", "Headphones";
		simple-audio-card,routing =
			"INL", "LHPOUT",
			"INR", "RHPOUT",
			"Headphones", "LHPOUT",
			"Headphones", "RHPOUT",
			"Speaker", "OUTL",
			"Speaker", "OUTR";
		simple-audio-card,pin-switches = "Speaker";

		simple-audio-card,hp-det-gpio = <&gpd 16 GPIO_ACTIVE_LOW>;
		simple-audio-card,aux-devs = <&amp>;

		simple-audio-card,bitclock-master = <&dai_codec>;
		simple-audio-card,frame-master = <&dai_codec>;

		dai_cpu: simple-audio-card,cpu {
			sound-dai = <&aic>;
		};

		dai_codec: simple-audio-card,codec {
			sound-dai = <&codec>;
		};

	};

	usb_phy: usb-phy {
		compatible = "usb-nop-xceiv";
		#phy-cells = <0>;

		clocks = <&cgu JZ4725B_CLK_UDC_PHY>;
		clock-names = "main_clk";
		vcc-supply = <&vcc>;
	};

	panel {
		compatible = "sharp,ls020b1dd01d";

		backlight = <&backlight>;
		power-supply = <&vcc>;

		port {
			panel_input: endpoint {
				remote-endpoint = <&panel_output>;
			};
		};
	};
};

&ext {
	clock-frequency = <12000000>;
};

&rtc_dev {
	system-power-controller;
};

&udc {
	phys = <&usb_phy>;
};

&pinctrl {
	pins_mmc1: mmc1 {
		function = "mmc1";
		groups = "mmc1-1bit";
	};

	pins_nemc: nemc {
		function = "nand";
		groups = "nand-cs1", "nand-cle-ale", "nand-fre-fwe";
	};

	pins_pwm3: pwm3 {
		function = "pwm3";
		groups = "pwm3";
		bias-disable;
	};

	pins_lcd: lcd {
		function = "lcd";
		groups = "lcd-8bit", "lcd-16bit", "lcd-special";
	};
};

&mmc0 {
	status = "disabled";
};

&mmc1 {
	bus-width = <1>;
	max-frequency = <48000000>;

	pinctrl-names = "default";
	pinctrl-0 = <&pins_mmc1>;

	cd-gpios = <&gpc 20 GPIO_ACTIVE_LOW>;
};

&uart {
	/*
	 * The pins for RX/TX are used for the right shoulder button and
	 * backlight PWM.
	 */
	status = "disabled";
};

&nemc {
	nandc: nand-controller@1 {
		compatible = "ingenic,jz4725b-nand";
		reg = <1 0 0x4000000>;

		#address-cells = <1>;
		#size-cells = <0>;

		ecc-engine = <&bch>;

		ingenic,nemc-tAS = <10>;
		ingenic,nemc-tAH = <5>;
		ingenic,nemc-tBP = <10>;
		ingenic,nemc-tAW = <15>;
		ingenic,nemc-tSTRV = <100>;

		pinctrl-names = "default";
		pinctrl-0 = <&pins_nemc>;

		rb-gpios = <&gpc 27 GPIO_ACTIVE_HIGH>;

		nand@1 {
			reg = <1>;

			nand-ecc-step-size = <512>;
			nand-ecc-strength = <8>;
			nand-ecc-mode = "hw";
			nand-is-boot-medium;
			nand-on-flash-bbt;

			partitions {
				compatible = "fixed-partitions";
				#address-cells = <1>;
				#size-cells = <1>;

				partition@0 {
					label = "bootloader";
					reg = <0x0 0x20000>;
				};

				partition@20000 {
					label = "system";
					reg = <0x20000 0x0>;
				};
			};
		};
	};
};

&cgu {
	/* Use 32kHz oscillator as the parent of the RTC clock */
	assigned-clocks = <&cgu JZ4725B_CLK_RTC>;
	assigned-clock-parents = <&cgu JZ4725B_CLK_OSC32K>;
};

&tcu {
	/*
	 * 750 kHz for the system timer and clocksource, and use RTC as the
	 * parent for the watchdog clock.
	 */
	assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, <&tcu TCU_CLK_WDT>;
	assigned-clock-parents = <0>, <0>, <&cgu JZ4725B_CLK_RTC>;
	assigned-clock-rates = <750000>, <750000>;
};

&lcd {
	pinctrl-names = "default";
	pinctrl-0 = <&pins_lcd>;
};

&lcd_ports {
	port@0 {
		reg = <0>;

		panel_output: endpoint {
			remote-endpoint = <&panel_input>;
		};
	};
};