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";
19 model = "Ben Nanonote";
22 device_type = "memory";
23 reg = <0x0 0x2000000>;
31 compatible = "regulator-fixed";
32 regulator-name = "vcc";
34 regulator-min-microvolt = <3300000>;
35 regulator-max-microvolt = <3300000>;
39 mmc_power: regulator@1 {
40 compatible = "regulator-fixed";
41 regulator-name = "mmc_vcc";
44 regulator-min-microvolt = <3300000>;
45 regulator-max-microvolt = <3300000>;
48 amp_supply: regulator@2 {
49 compatible = "regulator-fixed";
50 regulator-name = "amp_supply";
54 regulator-min-microvolt = <3300000>;
55 regulator-max-microvolt = <3300000>;
58 amp: analog-amplifier {
59 compatible = "simple-audio-amplifier";
60 enable-gpios = <&gpb 29 GPIO_ACTIVE_HIGH>;
61 VCC-supply = <&_supply>;
65 compatible = "simple-audio-card";
67 simple-audio-card,name = "QI LB60";
68 simple-audio-card,format = "i2s";
70 simple-audio-card,widgets =
73 simple-audio-card,routing =
80 simple-audio-card,aux-devs = <&>;
82 simple-audio-card,bitclock-master = <&dai_codec>;
83 simple-audio-card,frame-master = <&dai_codec>;
85 dai_cpu: simple-audio-card,cpu {
89 dai_codec: simple-audio-card,codec {
95 compatible = "gpio-keys";
100 linux,code = <KEY_POWER>;
101 gpios = <&gpd 29 GPIO_ACTIVE_LOW>;
106 compatible = "gpio-matrix-keypad";
108 col-scan-delay-us = <10>;
109 debounce-delay-ms = <10>;
112 row-gpios = <&gpd 18 0>, <&gpd 19 0>, <&gpd 20 0>, <&gpd 21 0>,
113 <&gpd 22 0>, <&gpd 23 0>, <&gpd 24 0>, <&gpd 26 0>;
114 col-gpios = <&gpc 10 0>, <&gpc 11 0>, <&gpc 12 0>, <&gpc 13 0>,
115 <&gpc 14 0>, <&gpc 15 0>, <&gpc 16 0>, <&gpc 17 0>;
119 <MATRIX_KEY(0, 0, KEY_F1)>, /* S2 */
120 <MATRIX_KEY(0, 1, KEY_F2)>, /* S3 */
121 <MATRIX_KEY(0, 2, KEY_F3)>, /* S4 */
122 <MATRIX_KEY(0, 3, KEY_F4)>, /* S5 */
123 <MATRIX_KEY(0, 4, KEY_F5)>, /* S6 */
124 <MATRIX_KEY(0, 5, KEY_F6)>, /* S7 */
125 <MATRIX_KEY(0, 6, KEY_F7)>, /* S8 */
127 <MATRIX_KEY(1, 0, KEY_Q)>, /* S10 */
128 <MATRIX_KEY(1, 1, KEY_W)>, /* S11 */
129 <MATRIX_KEY(1, 2, KEY_E)>, /* S12 */
130 <MATRIX_KEY(1, 3, KEY_R)>, /* S13 */
131 <MATRIX_KEY(1, 4, KEY_T)>, /* S14 */
132 <MATRIX_KEY(1, 5, KEY_Y)>, /* S15 */
133 <MATRIX_KEY(1, 6, KEY_U)>, /* S16 */
134 <MATRIX_KEY(1, 7, KEY_I)>, /* S17 */
135 <MATRIX_KEY(2, 0, KEY_A)>, /* S18 */
136 <MATRIX_KEY(2, 1, KEY_S)>, /* S19 */
137 <MATRIX_KEY(2, 2, KEY_D)>, /* S20 */
138 <MATRIX_KEY(2, 3, KEY_F)>, /* S21 */
139 <MATRIX_KEY(2, 4, KEY_G)>, /* S22 */
140 <MATRIX_KEY(2, 5, KEY_H)>, /* S23 */
141 <MATRIX_KEY(2, 6, KEY_J)>, /* S24 */
142 <MATRIX_KEY(2, 7, KEY_K)>, /* S25 */
143 <MATRIX_KEY(3, 0, KEY_ESC)>, /* S26 */
144 <MATRIX_KEY(3, 1, KEY_Z)>, /* S27 */
145 <MATRIX_KEY(3, 2, KEY_X)>, /* S28 */
146 <MATRIX_KEY(3, 3, KEY_C)>, /* S29 */
147 <MATRIX_KEY(3, 4, KEY_V)>, /* S30 */
148 <MATRIX_KEY(3, 5, KEY_B)>, /* S31 */
149 <MATRIX_KEY(3, 6, KEY_N)>, /* S32 */
150 <MATRIX_KEY(3, 7, KEY_M)>, /* S33 */
151 <MATRIX_KEY(4, 0, KEY_TAB)>, /* S34 */
152 <MATRIX_KEY(4, 1, KEY_CAPSLOCK)>, /* S35 */
153 <MATRIX_KEY(4, 2, KEY_BACKSLASH)>, /* S36 */
154 <MATRIX_KEY(4, 3, KEY_APOSTROPHE)>, /* S37 */
155 <MATRIX_KEY(4, 4, KEY_COMMA)>, /* S38 */
156 <MATRIX_KEY(4, 5, KEY_DOT)>, /* S39 */
157 <MATRIX_KEY(4, 6, KEY_SLASH)>, /* S40 */
158 <MATRIX_KEY(4, 7, KEY_UP)>, /* S41 */
159 <MATRIX_KEY(5, 0, KEY_O)>, /* S42 */
160 <MATRIX_KEY(5, 1, KEY_L)>, /* S43 */
161 <MATRIX_KEY(5, 2, KEY_EQUAL)>, /* S44 */
162 <MATRIX_KEY(5, 3, KEY_QI_UPRED)>, /* S45 */
163 <MATRIX_KEY(5, 4, KEY_SPACE)>, /* S46 */
164 <MATRIX_KEY(5, 5, KEY_QI_QI)>, /* S47 */
165 <MATRIX_KEY(5, 6, KEY_RIGHTCTRL)>, /* S48 */
166 <MATRIX_KEY(5, 7, KEY_LEFT)>, /* S49 */
167 <MATRIX_KEY(6, 0, KEY_F8)>, /* S50 */
168 <MATRIX_KEY(6, 1, KEY_P)>, /* S51 */
169 <MATRIX_KEY(6, 2, KEY_BACKSPACE)>,/* S52 */
170 <MATRIX_KEY(6, 3, KEY_ENTER)>, /* S53 */
171 <MATRIX_KEY(6, 4, KEY_QI_VOLUP)>, /* S54 */
172 <MATRIX_KEY(6, 5, KEY_QI_VOLDOWN)>, /* S55 */
173 <MATRIX_KEY(6, 6, KEY_DOWN)>, /* S56 */
174 <MATRIX_KEY(6, 7, KEY_RIGHT)>, /* S57 */
176 <MATRIX_KEY(7, 0, KEY_LEFTSHIFT)>, /* S58 */
177 <MATRIX_KEY(7, 1, KEY_LEFTALT)>, /* S59 */
178 <MATRIX_KEY(7, 2, KEY_QI_FN)>; /* S60 */
182 compatible = "spi-gpio";
183 #address-cells = <1>;
186 sck-gpios = <&gpc 23 GPIO_ACTIVE_HIGH>;
187 mosi-gpios = <&gpc 22 GPIO_ACTIVE_HIGH>;
188 cs-gpios = <&gpc 21 GPIO_ACTIVE_LOW>;
189 num-chipselects = <1>;
192 usb_charger: charger {
193 compatible = "gpio-charger";
194 charger-type = "usb-sdp";
195 gpios = <&gpd 28 GPIO_ACTIVE_LOW>;
196 status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>;
199 simple_battery: battery {
200 compatible = "simple-battery";
201 voltage-min-design-microvolt = <3600000>;
202 voltage-max-design-microvolt = <4200000>;
206 compatible = "ingenic,jz4740-battery";
207 io-channels = <&adc INGENIC_ADC_BATTERY>;
208 io-channel-names = "battery";
209 power-supplies = <&usb_charger>;
210 monitored-battery = <&simple_battery>;
214 compatible = "iio-hwmon";
215 io-channels = <&adc INGENIC_ADC_AUX>;
219 compatible = "giantplus,gpm940b0";
221 power-supply = <&vcc>;
224 panel_input: endpoint {
225 remote-endpoint = <&panel_output>;
231 compatible = "usb-nop-xceiv";
239 clock-frequency = <12000000>;
243 system-power-controller;
247 pinctrl-names = "default";
248 pinctrl-0 = <&pins_uart0>;
256 nandc: nand-controller@1 {
257 compatible = "ingenic,jz4740-nand";
258 reg = <1 0 0x4000000>;
260 #address-cells = <1>;
265 pinctrl-names = "default";
266 pinctrl-0 = <&pins_nemc>;
268 rb-gpios = <&gpc 30 GPIO_ACTIVE_HIGH>;
273 nand-ecc-step-size = <512>;
274 nand-ecc-strength = <4>;
275 nand-ecc-mode = "hw";
280 compatible = "fixed-partitions";
281 #address-cells = <1>;
286 reg = <0x0 0x400000>;
291 reg = <0x400000 0x400000>;
296 reg = <0x800000 0x0>;
304 pinctrl-names = "default";
305 pinctrl-0 = <&pins_lcd>;
308 panel_output: endpoint {
309 remote-endpoint = <&panel_input>;
326 groups = "nand-fre-fwe", "nand-cs1";
331 groups = "uart0-data";
338 groups = "mmc-1bit", "mmc-4bit";
351 max-frequency = <24000000>;
352 cd-gpios = <&gpd 0 GPIO_ACTIVE_HIGH>;
353 vmmc-supply = <&mmc_power>;
355 pinctrl-names = "default";
356 pinctrl-0 = <&pins_mmc>;
360 /* 750 kHz for the system timer and clocksource */
361 assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>;
362 assigned-clock-rates = <750000>, <750000>;