1 // SPDX-License-Identifier: GPL-2.0 1 // SPDX-License-Identifier: GPL-2.0 2 /dts-v1/; 2 /dts-v1/; 3 3 4 #include "jz4770.dtsi" 4 #include "jz4770.dtsi" 5 #include <dt-bindings/clock/ingenic,tcu.h> 5 #include <dt-bindings/clock/ingenic,tcu.h> 6 6 7 #include <dt-bindings/gpio/gpio.h> << 8 #include <dt-bindings/iio/adc/ingenic,adc.h> << 9 #include <dt-bindings/input/input.h> << 10 << 11 / { 7 / { 12 compatible = "gcw,zero", "ingenic,jz47 8 compatible = "gcw,zero", "ingenic,jz4770"; 13 model = "GCW Zero"; 9 model = "GCW Zero"; 14 10 15 aliases { 11 aliases { 16 serial0 = &uart0; 12 serial0 = &uart0; 17 serial1 = &uart1; 13 serial1 = &uart1; 18 serial2 = &uart2; 14 serial2 = &uart2; 19 serial3 = &uart3; 15 serial3 = &uart3; 20 }; 16 }; 21 17 22 memory: memory { << 23 device_type = "memory"; << 24 reg = <0x0 0x10000000>, << 25 <0x30000000 0x10000000>; << 26 }; << 27 << 28 chosen { 18 chosen { 29 stdout-path = "serial2:57600n8 19 stdout-path = "serial2:57600n8"; 30 }; 20 }; 31 21 32 vcc: regulator@0 { !! 22 board { 33 compatible = "regulator-fixed" !! 23 compatible = "simple-bus"; 34 regulator-name = "vcc"; << 35 << 36 regulator-min-microvolt = <330 << 37 regulator-max-microvolt = <330 << 38 regulator-always-on; << 39 }; << 40 << 41 mmc1_power: regulator@1 { << 42 compatible = "regulator-fixed" << 43 regulator-name = "mmc1_vcc"; << 44 gpio = <&gpe 9 0>; << 45 << 46 regulator-min-microvolt = <330 << 47 regulator-max-microvolt = <330 << 48 vin-supply = <&vcc>; << 49 }; << 50 << 51 headphones_amp: analog-amplifier@0 { << 52 compatible = "simple-audio-amp << 53 enable-gpios = <&gpf 3 GPIO_AC << 54 enable-delay-ms = <50>; << 55 << 56 VCC-supply = <&ldo5>; << 57 sound-name-prefix = "Headphone << 58 }; << 59 << 60 speaker_amp: analog-amplifier@1 { << 61 compatible = "simple-audio-amp << 62 enable-gpios = <&gpf 20 GPIO_A << 63 << 64 VCC-supply = <&ldo5>; << 65 sound-name-prefix = "Speaker A << 66 }; << 67 << 68 sound { << 69 compatible = "simple-audio-car << 70 << 71 simple-audio-card,name = "gcw0 << 72 simple-audio-card,format = "i2 << 73 << 74 simple-audio-card,widgets = << 75 "Speaker", "Speaker", << 76 "Headphone", "Headphon << 77 "Microphone", "Built-i << 78 simple-audio-card,routing = << 79 "Headphones Amp INL", << 80 "Headphones Amp INR", << 81 "Headphones", "Headpho << 82 "Headphones", "Headpho << 83 "Speaker Amp INL", "LO << 84 "Speaker Amp INR", "RO << 85 "Speaker", "Speaker Am << 86 "Speaker", "Speaker Am << 87 "LLINEIN", "Cap-less", << 88 "RLINEIN", "Cap-less", << 89 "Built-in Mic", "MICBI << 90 "MIC1P", "Built-in Mic << 91 "MIC1N", "Built-in Mic << 92 simple-audio-card,pin-switches << 93 << 94 simple-audio-card,hp-det-gpio << 95 simple-audio-card,aux-devs = < << 96 << 97 simple-audio-card,bitclock-mas << 98 simple-audio-card,frame-master << 99 << 100 dai_cpu: simple-audio-card,cpu << 101 sound-dai = <&aic>; << 102 }; << 103 << 104 dai_codec: simple-audio-card,c << 105 sound-dai = <&codec>; << 106 }; << 107 }; << 108 << 109 rumble { << 110 compatible = "pwm-vibrator"; << 111 pwms = <&pwm 4 2000000 0>; << 112 pwm-names = "enable"; << 113 << 114 pinctrl-names = "default"; << 115 pinctrl-0 = <&pins_pwm4>; << 116 }; << 117 << 118 backlight: backlight { << 119 compatible = "pwm-backlight"; << 120 pwms = <&pwm 1 40000 0>; << 121 power-supply = <&vcc>; << 122 << 123 brightness-levels = <0 16 32 4 << 124 144 160 1 << 125 default-brightness-level = <12 << 126 << 127 pinctrl-names = "default"; << 128 pinctrl-0 = <&pins_pwm1>; << 129 }; << 130 << 131 gpio-keys { << 132 compatible = "gpio-keys"; << 133 autorepeat; << 134 << 135 button-0 { << 136 label = "D-pad up"; << 137 linux,code = <KEY_UP>; << 138 linux,can-disable; << 139 gpios = <&gpe 21 GPIO_ << 140 }; << 141 << 142 button-1 { << 143 label = "D-pad down"; << 144 linux,code = <KEY_DOWN << 145 linux,can-disable; << 146 gpios = <&gpe 25 GPIO_ << 147 }; << 148 << 149 button-2 { << 150 label = "D-pad left"; << 151 linux,code = <KEY_LEFT << 152 linux,can-disable; << 153 gpios = <&gpe 23 GPIO_ << 154 }; << 155 << 156 button-3 { << 157 label = "D-pad right"; << 158 linux,code = <KEY_RIGH << 159 linux,can-disable; << 160 gpios = <&gpe 24 GPIO_ << 161 }; << 162 << 163 button-4 { << 164 label = "Button A"; << 165 linux,code = <KEY_LEFT << 166 linux,can-disable; << 167 gpios = <&gpe 29 GPIO_ << 168 }; << 169 << 170 button-5 { << 171 label = "Button B"; << 172 linux,code = <KEY_LEFT << 173 linux,can-disable; << 174 gpios = <&gpe 20 GPIO_ << 175 }; << 176 << 177 button-6 { << 178 label = "Button Y"; << 179 linux,code = <KEY_SPAC << 180 linux,can-disable; << 181 gpios = <&gpe 27 GPIO_ << 182 }; << 183 << 184 button-7 { << 185 label = "Button X"; << 186 linux,code = <KEY_LEFT << 187 linux,can-disable; << 188 gpios = <&gpe 28 GPIO_ << 189 }; << 190 << 191 button-8 { << 192 label = "Left shoulder << 193 linux,code = <KEY_TAB> << 194 linux,can-disable; << 195 gpios = <&gpb 20 GPIO_ << 196 }; << 197 << 198 button-9 { << 199 label = "Right shoulde << 200 linux,code = <KEY_BACK << 201 linux,can-disable; << 202 gpios = <&gpe 26 GPIO_ << 203 }; << 204 << 205 button-10 { << 206 label = "Start button" << 207 linux,code = <KEY_ENTE << 208 linux,can-disable; << 209 gpios = <&gpb 21 GPIO_ << 210 }; << 211 << 212 button-11 { << 213 label = "Select button << 214 linux,code = <KEY_ESC> << 215 linux,can-disable; << 216 /* << 217 * This is the only bu << 218 * since it doubles as << 219 */ << 220 gpios = <&gpd 18 GPIO_ << 221 }; << 222 << 223 button-12 { << 224 label = "Power slider" << 225 linux,code = <KEY_POWE << 226 linux,can-disable; << 227 gpios = <&gpa 30 GPIO_ << 228 wakeup-source; << 229 }; << 230 << 231 button-13 { << 232 label = "Power hold"; << 233 linux,code = <KEY_PAUS << 234 linux,can-disable; << 235 gpios = <&gpf 11 GPIO_ << 236 }; << 237 }; << 238 << 239 i2c3: i2c-controller@3 { << 240 compatible = "i2c-gpio"; << 241 #address-cells = <1>; << 242 #size-cells = <0>; << 243 << 244 sda-gpios = <&gpd 5 GPIO_ACTIV << 245 scl-gpios = <&gpd 4 GPIO_ACTIV << 246 i2c-gpio,delay-us = <2>; /* 25 << 247 << 248 act8600: pmic@5a { << 249 compatible = "active-s << 250 reg = <0x5a>; << 251 << 252 regulators { << 253 /* USB OTG */ << 254 otg_vbus: SUDC << 255 /* << 256 * 5.3 << 257 * for << 258 * bet << 259 * con << 260 */ << 261 regula << 262 regula << 263 inl-su << 264 }; << 265 << 266 /* << 267 * When this i << 268 * no USB netw << 269 */ << 270 ldo5: LDO5 { << 271 regula << 272 regula << 273 inl-su << 274 }; << 275 << 276 /* LCD panel a << 277 ldo6: LDO6 { << 278 regula << 279 regula << 280 inl-su << 281 }; << 282 << 283 /* ??? */ << 284 LDO7 { << 285 regula << 286 regula << 287 /*regu << 288 inl-su << 289 }; << 290 << 291 /* << 292 * The colors << 293 * off. Which << 294 * data sheet << 295 */ << 296 LDO8 { << 297 regula << 298 regula << 299 regula << 300 inl-su << 301 }; << 302 << 303 /* RTC fixed 3 << 304 LDO_REG9 { << 305 regula << 306 regula << 307 regula << 308 inl-su << 309 }; << 310 << 311 /* Unused fixe << 312 LDO_REG10 { << 313 inl-su << 314 }; << 315 }; << 316 }; << 317 }; << 318 << 319 leds { << 320 compatible = "gpio-leds"; << 321 << 322 led { << 323 gpios = <&gpb 30 GPIO_ << 324 default-state = "on"; << 325 }; << 326 }; << 327 << 328 spi { << 329 compatible = "spi-gpio"; << 330 #address-cells = <1>; 24 #address-cells = <1>; 331 #size-cells = <0>; !! 25 #size-cells = <1>; 332 !! 26 ranges; 333 sck-gpios = <&gpe 15 GPIO_ACTI << 334 mosi-gpios = <&gpe 17 GPIO_ACT << 335 cs-gpios = <&gpe 16 GPIO_ACTIV << 336 num-chipselects = <1>; << 337 << 338 nt39016@0 { << 339 compatible = "kingdisp << 340 reg = <0>; << 341 << 342 spi-max-frequency = <3 << 343 spi-3wire; << 344 << 345 reset-gpios = <&gpe 2 << 346 27 347 backlight = <&backligh !! 28 otg_phy: otg-phy { 348 power-supply = <&ldo6> !! 29 compatible = "usb-nop-xceiv"; 349 !! 30 clocks = <&cgu JZ4770_CLK_OTG_PHY>; 350 port { !! 31 clock-names = "main_clk"; 351 panel_input: e << 352 remote << 353 }; << 354 }; << 355 }; << 356 }; << 357 << 358 connector { << 359 compatible = "gpio-usb-b-conne << 360 label = "mini-USB"; << 361 type = "mini"; << 362 << 363 /* << 364 * USB OTG is not yet working << 365 * mechanism tends to fry easi << 366 * Until this is fixed, disabl << 367 * ID GPIO to the driver. << 368 */ << 369 //id-gpios = <&gpf 18 GPIO_ACT << 370 << 371 vbus-gpios = <&gpb 5 GPIO_ACTI << 372 vbus-supply = <&otg_vbus>; << 373 << 374 pinctrl-names = "default"; << 375 pinctrl-0 = <&pins_otg>; << 376 << 377 port { << 378 usb_ep: endpoint { << 379 remote-endpoin << 380 }; << 381 }; 32 }; 382 }; 33 }; 383 }; 34 }; 384 35 385 &ext { 36 &ext { 386 clock-frequency = <12000000>; 37 clock-frequency = <12000000>; 387 }; 38 }; 388 39 389 &pinctrl { << 390 pins_lcd: lcd { << 391 function = "lcd"; << 392 groups = "lcd-24bit"; << 393 }; << 394 << 395 pins_uart2: uart2 { << 396 function = "uart2"; << 397 groups = "uart2-data"; << 398 }; << 399 << 400 pins_mmc0: mmc0 { << 401 function = "mmc0"; << 402 groups = "mmc0-1bit-a", "mmc0- << 403 }; << 404 << 405 pins_mmc1: mmc1 { << 406 function = "mmc1"; << 407 groups = "mmc1-1bit-d", "mmc1- << 408 }; << 409 << 410 pins_otg: otg { << 411 otg-vbus-pin { << 412 function = "otg"; << 413 groups = "otg-vbus"; << 414 }; << 415 << 416 vbus-pin { << 417 pins = "PB5"; << 418 bias-disable; << 419 }; << 420 }; << 421 << 422 pins_pwm1: pwm1 { << 423 function = "pwm1"; << 424 groups = "pwm1"; << 425 }; << 426 << 427 pins_pwm4: pwm4 { << 428 function = "pwm4"; << 429 groups = "pwm4"; << 430 }; << 431 }; << 432 << 433 &uart2 { 40 &uart2 { 434 pinctrl-names = "default"; << 435 pinctrl-0 = <&pins_uart2>; << 436 << 437 status = "okay"; 41 status = "okay"; 438 }; 42 }; 439 43 440 &cgu { 44 &cgu { 441 /* !! 45 /* Put high-speed peripherals under PLL1, such that we can change the 442 * Put high-speed peripherals under PL << 443 * PLL0 frequency on demand without ha 46 * PLL0 frequency on demand without having to suspend peripherals. 444 * We use a rate of 432 MHz, which is 47 * We use a rate of 432 MHz, which is the least common multiple of 445 * 27 MHz (required by TV encoder) and 48 * 27 MHz (required by TV encoder) and 48 MHz (required by USB host). 446 * Put the GPU under PLL0 since we wan << 447 * Use the 32 kHz oscillator as the pa << 448 * precision. << 449 */ 49 */ 450 assigned-clocks = 50 assigned-clocks = 451 <&cgu JZ4770_CLK_PLL1>, 51 <&cgu JZ4770_CLK_PLL1>, 452 <&cgu JZ4770_CLK_GPU>, !! 52 <&cgu JZ4770_CLK_UHC>; 453 <&cgu JZ4770_CLK_RTC>, << 454 <&cgu JZ4770_CLK_UHC>, << 455 <&cgu JZ4770_CLK_LPCLK_MUX>, << 456 <&cgu JZ4770_CLK_MMC0_MUX>, << 457 <&cgu JZ4770_CLK_MMC1_MUX>; << 458 assigned-clock-parents = 53 assigned-clock-parents = 459 <0>, 54 <0>, 460 <&cgu JZ4770_CLK_PLL0>, << 461 <&cgu JZ4770_CLK_OSC32K>, << 462 <&cgu JZ4770_CLK_PLL1>, << 463 <&cgu JZ4770_CLK_PLL1>, << 464 <&cgu JZ4770_CLK_PLL1>, << 465 <&cgu JZ4770_CLK_PLL1>; 55 <&cgu JZ4770_CLK_PLL1>; 466 assigned-clock-rates = 56 assigned-clock-rates = 467 <432000000>, !! 57 <432000000>; 468 <600000000>; << 469 }; 58 }; 470 59 471 &uhc { 60 &uhc { 472 /* The WiFi module is connected to the 61 /* The WiFi module is connected to the UHC. */ 473 status = "okay"; 62 status = "okay"; 474 }; 63 }; 475 64 476 &tcu { 65 &tcu { 477 /* !! 66 /* 750 kHz for the system timer and clocksource */ 478 * 750 kHz for the system timer and cl !! 67 assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; 479 * and use RTC as the parent for the w !! 68 assigned-clock-rates = <750000>, <750000>; 480 */ << 481 assigned-clocks = <&tcu TCU_CLK_TIMER0 << 482 <&tcu TCU_CLK_OST>, << 483 assigned-clock-parents = <0>, <0>, <0> << 484 assigned-clock-rates = <750000>, <7500 << 485 69 486 /* PWM1 is in use, so use channel #2 f !! 70 /* PWM1 is in use, so reserve channel #2 for the clocksource */ 487 ingenic,pwm-channels-mask = <0xfa>; 71 ingenic,pwm-channels-mask = <0xfa>; 488 }; << 489 << 490 &usb_otg { << 491 port { << 492 usb_otg_ep: endpoint { << 493 remote-endpoint = <&us << 494 }; << 495 }; << 496 }; << 497 << 498 &otg_phy { << 499 vcc-supply = <&ldo5>; << 500 }; << 501 << 502 &rtc { << 503 clocks = <&cgu JZ4770_CLK_RTC>; << 504 clock-names = "rtc"; << 505 << 506 system-power-controller; << 507 }; << 508 << 509 &mmc0 { << 510 status = "okay"; << 511 << 512 bus-width = <4>; << 513 max-frequency = <48000000>; << 514 vmmc-supply = <&vcc>; << 515 non-removable; << 516 << 517 pinctrl-names = "default"; << 518 pinctrl-0 = <&pins_mmc0>; << 519 }; << 520 << 521 &mmc1 { << 522 status = "okay"; << 523 << 524 bus-width = <4>; << 525 max-frequency = <48000000>; << 526 cd-gpios = <&gpb 2 GPIO_ACTIVE_LOW>; << 527 vmmc-supply = <&mmc1_power>; << 528 << 529 pinctrl-names = "default"; << 530 pinctrl-0 = <&pins_mmc1>; << 531 }; << 532 << 533 &lcd { << 534 pinctrl-names = "default"; << 535 pinctrl-0 = <&pins_lcd>; << 536 << 537 port { << 538 panel_output: endpoint { << 539 remote-endpoint = <&pa << 540 }; << 541 }; << 542 }; 72 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.