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