1 // SPDX-License-Identifier: GPL-2.0
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/iio/adc/ingenic,adc.h>
8 #include <dt-bindings/clock/ingenic,tcu.h>
9 #include <dt-bindings/input/input.h>
11 #define KEY_QI_QI KEY_F13
12 #define KEY_QI_UPRED KEY_RIGHTALT
13 #define KEY_QI_VOLUP KEY_VOLUMEUP
14 #define KEY_QI_VOLDOWN KEY_VOLUMEDOWN
15 #define KEY_QI_FN KEY_LEFTCTRL
18 compatible = "qi,lb60", "ingenic,jz4740";
25 compatible = "regulator-fixed";
26 regulator-name = "vcc";
28 regulator-min-microvolt = <3300000>;
29 regulator-max-microvolt = <3300000>;
33 mmc_power: regulator@1 {
34 compatible = "regulator-fixed";
35 regulator-name = "mmc_vcc";
38 regulator-min-microvolt = <3300000>;
39 regulator-max-microvolt = <3300000>;
42 amp_supply: regulator@2 {
43 compatible = "regulator-fixed";
44 regulator-name = "amp_supply";
48 regulator-min-microvolt = <3300000>;
49 regulator-max-microvolt = <3300000>;
52 amp: analog-amplifier {
53 compatible = "simple-audio-amplifier";
54 enable-gpios = <&gpb 29 GPIO_ACTIVE_HIGH>;
55 VCC-supply = <&_supply>;
59 compatible = "simple-audio-card";
61 simple-audio-card,name = "QI LB60";
62 simple-audio-card,format = "i2s";
64 simple-audio-card,widgets =
67 simple-audio-card,routing =
74 simple-audio-card,aux-devs = <&>;
76 simple-audio-card,bitclock-master = <&dai_codec>;
77 simple-audio-card,frame-master = <&dai_codec>;
79 dai_cpu: simple-audio-card,cpu {
83 dai_codec: simple-audio-card,codec {
89 compatible = "gpio-keys";
94 linux,code = <KEY_POWER>;
95 gpios = <&gpd 29 GPIO_ACTIVE_LOW>;
100 compatible = "gpio-matrix-keypad";
102 col-scan-delay-us = <10>;
103 debounce-delay-ms = <10>;
106 row-gpios = <&gpd 18 0 &gpd 19 0 &gpd 20 0 &gpd 21 0
107 &gpd 22 0 &gpd 23 0 &gpd 24 0 &gpd 26 0>;
108 col-gpios = <&gpc 10 0 &gpc 11 0 &gpc 12 0 &gpc 13 0
109 &gpc 14 0 &gpc 15 0 &gpc 16 0 &gpc 17 0>;
113 MATRIX_KEY(0, 0, KEY_F1) /* S2 */
114 MATRIX_KEY(0, 1, KEY_F2) /* S3 */
115 MATRIX_KEY(0, 2, KEY_F3) /* S4 */
116 MATRIX_KEY(0, 3, KEY_F4) /* S5 */
117 MATRIX_KEY(0, 4, KEY_F5) /* S6 */
118 MATRIX_KEY(0, 5, KEY_F6) /* S7 */
119 MATRIX_KEY(0, 6, KEY_F7) /* S8 */
121 MATRIX_KEY(1, 0, KEY_Q) /* S10 */
122 MATRIX_KEY(1, 1, KEY_W) /* S11 */
123 MATRIX_KEY(1, 2, KEY_E) /* S12 */
124 MATRIX_KEY(1, 3, KEY_R) /* S13 */
125 MATRIX_KEY(1, 4, KEY_T) /* S14 */
126 MATRIX_KEY(1, 5, KEY_Y) /* S15 */
127 MATRIX_KEY(1, 6, KEY_U) /* S16 */
128 MATRIX_KEY(1, 7, KEY_I) /* S17 */
129 MATRIX_KEY(2, 0, KEY_A) /* S18 */
130 MATRIX_KEY(2, 1, KEY_S) /* S19 */
131 MATRIX_KEY(2, 2, KEY_D) /* S20 */
132 MATRIX_KEY(2, 3, KEY_F) /* S21 */
133 MATRIX_KEY(2, 4, KEY_G) /* S22 */
134 MATRIX_KEY(2, 5, KEY_H) /* S23 */
135 MATRIX_KEY(2, 6, KEY_J) /* S24 */
136 MATRIX_KEY(2, 7, KEY_K) /* S25 */
137 MATRIX_KEY(3, 0, KEY_ESC) /* S26 */
138 MATRIX_KEY(3, 1, KEY_Z) /* S27 */
139 MATRIX_KEY(3, 2, KEY_X) /* S28 */
140 MATRIX_KEY(3, 3, KEY_C) /* S29 */
141 MATRIX_KEY(3, 4, KEY_V) /* S30 */
142 MATRIX_KEY(3, 5, KEY_B) /* S31 */
143 MATRIX_KEY(3, 6, KEY_N) /* S32 */
144 MATRIX_KEY(3, 7, KEY_M) /* S33 */
145 MATRIX_KEY(4, 0, KEY_TAB) /* S34 */
146 MATRIX_KEY(4, 1, KEY_CAPSLOCK) /* S35 */
147 MATRIX_KEY(4, 2, KEY_BACKSLASH) /* S36 */
148 MATRIX_KEY(4, 3, KEY_APOSTROPHE) /* S37 */
149 MATRIX_KEY(4, 4, KEY_COMMA) /* S38 */
150 MATRIX_KEY(4, 5, KEY_DOT) /* S39 */
151 MATRIX_KEY(4, 6, KEY_SLASH) /* S40 */
152 MATRIX_KEY(4, 7, KEY_UP) /* S41 */
153 MATRIX_KEY(5, 0, KEY_O) /* S42 */
154 MATRIX_KEY(5, 1, KEY_L) /* S43 */
155 MATRIX_KEY(5, 2, KEY_EQUAL) /* S44 */
156 MATRIX_KEY(5, 3, KEY_QI_UPRED) /* S45 */
157 MATRIX_KEY(5, 4, KEY_SPACE) /* S46 */
158 MATRIX_KEY(5, 5, KEY_QI_QI) /* S47 */
159 MATRIX_KEY(5, 6, KEY_RIGHTCTRL) /* S48 */
160 MATRIX_KEY(5, 7, KEY_LEFT) /* S49 */
161 MATRIX_KEY(6, 0, KEY_F8) /* S50 */
162 MATRIX_KEY(6, 1, KEY_P) /* S51 */
163 MATRIX_KEY(6, 2, KEY_BACKSPACE)/* S52 */
164 MATRIX_KEY(6, 3, KEY_ENTER) /* S53 */
165 MATRIX_KEY(6, 4, KEY_QI_VOLUP) /* S54 */
166 MATRIX_KEY(6, 5, KEY_QI_VOLDOWN) /* S55 */
167 MATRIX_KEY(6, 6, KEY_DOWN) /* S56 */
168 MATRIX_KEY(6, 7, KEY_RIGHT) /* S57 */
170 MATRIX_KEY(7, 0, KEY_LEFTSHIFT) /* S58 */
171 MATRIX_KEY(7, 1, KEY_LEFTALT) /* S59 */
172 MATRIX_KEY(7, 2, KEY_QI_FN) /* S60 */
177 compatible = "spi-gpio";
178 #address-cells = <1>;
181 sck-gpios = <&gpc 23 GPIO_ACTIVE_HIGH>;
182 mosi-gpios = <&gpc 22 GPIO_ACTIVE_HIGH>;
183 cs-gpios = <&gpc 21 GPIO_ACTIVE_LOW>;
184 num-chipselects = <1>;
187 usb_charger: charger {
188 compatible = "gpio-charger";
189 charger-type = "usb-sdp";
190 gpios = <&gpd 28 GPIO_ACTIVE_LOW>;
191 status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>;
194 simple_battery: battery {
195 compatible = "simple-battery";
196 voltage-min-design-microvolt = <3600000>;
197 voltage-max-design-microvolt = <4200000>;
201 compatible = "ingenic,jz4740-battery";
202 io-channels = <&adc INGENIC_ADC_BATTERY>;
203 io-channel-names = "battery";
204 power-supplies = <&usb_charger>;
205 monitored-battery = <&simple_battery>;
209 compatible = "iio-hwmon";
210 io-channels = <&adc INGENIC_ADC_AUX>;
214 compatible = "giantplus,gpm940b0";
216 power-supply = <&vcc>;
219 panel_input: endpoint {
220 remote-endpoint = <&panel_output>;
226 compatible = "usb-nop-xceiv";
234 clock-frequency = <12000000>;
238 system-power-controller;
242 pinctrl-names = "default";
243 pinctrl-0 = <&pins_uart0>;
251 nandc: nand-controller@1 {
252 compatible = "ingenic,jz4740-nand";
253 reg = <1 0 0x4000000>;
255 #address-cells = <1>;
258 ingenic,bch-controller = <&ecc>;
260 pinctrl-names = "default";
261 pinctrl-0 = <&pins_nemc>;
263 rb-gpios = <&gpc 30 GPIO_ACTIVE_LOW>;
268 nand-ecc-step-size = <512>;
269 nand-ecc-strength = <4>;
270 nand-ecc-mode = "hw";
275 compatible = "fixed-partitions";
276 #address-cells = <1>;
281 reg = <0x0 0x400000>;
286 reg = <0x400000 0x400000>;
291 reg = <0x800000 0x0>;
299 pinctrl-names = "default";
300 pinctrl-0 = <&pins_lcd>;
303 panel_output: endpoint {
304 remote-endpoint = <&panel_input>;
326 groups = "uart0-data";
333 groups = "mmc-1bit", "mmc-4bit";
346 max-frequency = <24000000>;
347 cd-gpios = <&gpd 0 GPIO_ACTIVE_HIGH>;
348 vmmc-supply = <&mmc_power>;
350 pinctrl-names = "default";
351 pinctrl-0 = <&pins_mmc>;
355 /* 750 kHz for the system timer and clocksource */
356 assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>;
357 assigned-clock-rates = <750000>, <750000>;