1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 3 * Copyright (C) 2019 Icenowy Zheng <icenowy@ao 4 * 5 */ 6 7 /dts-v1/; 8 9 #include "sun50i-a64.dtsi" 10 #include "sun50i-a64-cpu-opp.dtsi" 11 12 #include <dt-bindings/gpio/gpio.h> 13 #include <dt-bindings/input/input.h> 14 #include <dt-bindings/pwm/pwm.h> 15 16 / { 17 model = "Pine64 PineTab Developer Samp 18 compatible = "pine64,pinetab", "allwin 19 chassis-type = "tablet"; 20 21 aliases { 22 serial0 = &uart0; 23 ethernet0 = &rtl8723cs; 24 }; 25 26 backlight: backlight { 27 compatible = "pwm-backlight"; 28 pwms = <&pwm 0 50000 PWM_POLAR 29 brightness-levels = <0 16 18 2 30 default-brightness-level = <15 31 enable-gpios = <&pio 3 23 GPIO 32 power-supply = <&vdd_bl>; 33 }; 34 35 chosen { 36 stdout-path = "serial0:115200n 37 }; 38 39 hdmi-connector { 40 compatible = "hdmi-connector"; 41 type = "c"; 42 43 port { 44 hdmi_con_in: endpoint 45 remote-endpoin 46 }; 47 }; 48 }; 49 50 i2c-csi { 51 compatible = "i2c-gpio"; 52 sda-gpios = <&pio 4 13 GPIO_AC 53 scl-gpios = <&pio 4 12 GPIO_AC 54 i2c-gpio,delay-us = <5>; 55 #address-cells = <1>; 56 #size-cells = <0>; 57 58 /* Rear camera */ 59 ov5640: camera@3c { 60 compatible = "ovti,ov5 61 reg = <0x3c>; 62 pinctrl-names = "defau 63 pinctrl-0 = <&csi_mclk 64 clocks = <&ccu CLK_CSI 65 clock-names = "xclk"; 66 67 AVDD-supply = <®_dl 68 DOVDD-supply = <®_a 69 DVDD-supply = <®_el 70 reset-gpios = <&pio 4 71 powerdown-gpios = <&pi 72 73 port { 74 ov5640_ep: end 75 remote 76 bus-wi 77 hsync- 78 vsync- 79 data-a 80 pclk-s 81 }; 82 }; 83 }; 84 }; 85 86 speaker_amp: audio-amplifier { 87 compatible = "simple-audio-amp 88 enable-gpios = <&pio 7 7 GPIO_ 89 sound-name-prefix = "Speaker A 90 }; 91 92 vdd_bl: regulator { 93 compatible = "regulator-fixed" 94 regulator-name = "bl-3v3"; 95 regulator-min-microvolt = <330 96 regulator-max-microvolt = <330 97 gpio = <&pio 7 6 GPIO_ACTIVE_H 98 enable-active-high; 99 }; 100 101 wifi_pwrseq: pwrseq { 102 compatible = "mmc-pwrseq-simpl 103 reset-gpios = <&r_pio 0 2 GPIO 104 post-power-on-delay-ms = <200> 105 }; 106 }; 107 108 &codec { 109 status = "okay"; 110 }; 111 112 &codec_analog { 113 cpvdd-supply = <®_eldo1>; 114 status = "okay"; 115 }; 116 117 &cpu0 { 118 cpu-supply = <®_dcdc2>; 119 }; 120 121 &cpu1 { 122 cpu-supply = <®_dcdc2>; 123 }; 124 125 &cpu2 { 126 cpu-supply = <®_dcdc2>; 127 }; 128 129 &cpu3 { 130 cpu-supply = <®_dcdc2>; 131 }; 132 133 &csi { 134 status = "okay"; 135 136 port { 137 csi_ep: endpoint { 138 remote-endpoint = <&ov 139 bus-width = <8>; 140 hsync-active = <1>; /* 141 vsync-active = <0>; /* 142 data-active = <1>; /* 143 pclk-sample = <1>; /* 144 }; 145 }; 146 }; 147 148 &dai { 149 status = "okay"; 150 }; 151 152 &de { 153 status = "okay"; 154 }; 155 156 &dphy { 157 status = "okay"; 158 }; 159 160 &dsi { 161 vcc-dsi-supply = <®_dldo1>; 162 status = "okay"; 163 164 panel@0 { 165 compatible = "feixin,k101-im2b 166 reg = <0>; 167 avdd-supply = <®_dc1sw>; 168 dvdd-supply = <®_dc1sw>; 169 cvdd-supply = <®_ldo_io1>; 170 reset-gpios = <&pio 3 24 GPIO_ 171 backlight = <&backlight>; 172 }; 173 }; 174 175 &ehci0 { 176 status = "okay"; 177 }; 178 179 &ehci1 { 180 status = "okay"; 181 }; 182 183 &i2c0 { 184 status = "okay"; 185 186 touchscreen@5d { 187 compatible = "goodix,gt9271"; 188 reg = <0x5d>; 189 interrupt-parent = <&pio>; 190 interrupts = <7 4 IRQ_TYPE_LEV 191 irq-gpios = <&pio 7 4 GPIO_ACT 192 reset-gpios = <&pio 7 8 GPIO_A 193 AVDD28-supply = <®_ldo_io1> 194 }; 195 }; 196 197 &i2c0_pins { 198 bias-pull-up; 199 }; 200 201 &i2c1 { 202 status = "okay"; 203 204 /* TODO: add Bochs BMA223 acceleromete 205 }; 206 207 &lradc { 208 vref-supply = <®_aldo3>; 209 status = "okay"; 210 211 button-200 { 212 label = "Volume Up"; 213 linux,code = <KEY_VOLUMEUP>; 214 channel = <0>; 215 voltage = <200000>; 216 }; 217 218 button-400 { 219 label = "Volume Down"; 220 linux,code = <KEY_VOLUMEDOWN>; 221 channel = <0>; 222 voltage = <400000>; 223 }; 224 }; 225 226 &mixer1 { 227 status = "okay"; 228 }; 229 230 &mmc0 { 231 pinctrl-names = "default"; 232 pinctrl-0 = <&mmc0_pins>; 233 vmmc-supply = <®_dcdc1>; 234 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 235 disable-wp; 236 bus-width = <4>; 237 status = "okay"; 238 }; 239 240 &mmc1 { 241 pinctrl-names = "default"; 242 pinctrl-0 = <&mmc1_pins>; 243 vmmc-supply = <®_dldo4>; 244 vqmmc-supply = <®_eldo1>; 245 mmc-pwrseq = <&wifi_pwrseq>; 246 bus-width = <4>; 247 non-removable; 248 status = "okay"; 249 250 rtl8723cs: wifi@1 { 251 reg = <1>; 252 }; 253 }; 254 255 &mmc2 { 256 pinctrl-names = "default"; 257 pinctrl-0 = <&mmc2_pins>; 258 vmmc-supply = <®_dcdc1>; 259 vqmmc-supply = <®_dcdc1>; 260 bus-width = <8>; 261 non-removable; 262 cap-mmc-hw-reset; 263 status = "okay"; 264 }; 265 266 &ohci0 { 267 status = "okay"; 268 }; 269 270 &pwm { 271 status = "okay"; 272 }; 273 274 &r_rsb { 275 status = "okay"; 276 277 axp803: pmic@3a3 { 278 compatible = "x-powers,axp803" 279 reg = <0x3a3>; 280 interrupt-parent = <&r_intc>; 281 interrupts = <GIC_SPI 32 IRQ_T 282 x-powers,drive-vbus-en; 283 }; 284 }; 285 286 #include "axp803.dtsi" 287 288 &ac_power_supply { 289 status = "okay"; 290 }; 291 292 &battery_power_supply { 293 status = "okay"; 294 }; 295 296 ®_aldo1 { 297 regulator-min-microvolt = <2800000>; 298 regulator-max-microvolt = <2800000>; 299 regulator-name = "dovdd-csi"; 300 }; 301 302 ®_aldo2 { 303 regulator-always-on; 304 regulator-min-microvolt = <1800000>; 305 regulator-max-microvolt = <3300000>; 306 regulator-name = "vcc-pl"; 307 }; 308 309 ®_aldo3 { 310 regulator-always-on; 311 regulator-min-microvolt = <2700000>; 312 regulator-max-microvolt = <3300000>; 313 regulator-name = "vcc-pll-avcc"; 314 }; 315 316 ®_dc1sw { 317 regulator-name = "vcc-lcd"; 318 }; 319 320 ®_dcdc1 { 321 regulator-always-on; 322 regulator-min-microvolt = <3300000>; 323 regulator-max-microvolt = <3300000>; 324 regulator-name = "vcc-3v3"; 325 }; 326 327 ®_dcdc2 { 328 regulator-always-on; 329 regulator-min-microvolt = <1000000>; 330 regulator-max-microvolt = <1300000>; 331 regulator-name = "vdd-cpux"; 332 }; 333 334 /* DCDC3 is polyphased with DCDC2 */ 335 336 ®_dcdc5 { 337 regulator-always-on; 338 regulator-min-microvolt = <1200000>; 339 regulator-max-microvolt = <1200000>; 340 regulator-name = "vcc-dram"; 341 }; 342 343 ®_dcdc6 { 344 regulator-always-on; 345 regulator-min-microvolt = <1100000>; 346 regulator-max-microvolt = <1100000>; 347 regulator-name = "vdd-sys"; 348 }; 349 350 ®_dldo1 { 351 regulator-always-on; 352 regulator-min-microvolt = <3300000>; 353 regulator-max-microvolt = <3300000>; 354 regulator-name = "vcc-hdmi-dsi-sensor" 355 }; 356 357 ®_dldo3 { 358 regulator-min-microvolt = <2800000>; 359 regulator-max-microvolt = <2800000>; 360 regulator-name = "avdd-csi"; 361 }; 362 363 ®_dldo4 { 364 regulator-min-microvolt = <3300000>; 365 regulator-max-microvolt = <3300000>; 366 regulator-name = "vcc-wifi"; 367 }; 368 369 ®_drivevbus { 370 regulator-name = "usb0-vbus"; 371 status = "okay"; 372 }; 373 374 ®_eldo1 { 375 regulator-always-on; 376 regulator-min-microvolt = <1800000>; 377 regulator-max-microvolt = <1800000>; 378 regulator-name = "cpvdd"; 379 }; 380 381 ®_eldo2 { 382 regulator-min-microvolt = <1800000>; 383 regulator-max-microvolt = <1800000>; 384 regulator-name = "vcca-1v8"; 385 }; 386 387 ®_eldo3 { 388 regulator-min-microvolt = <1800000>; 389 regulator-max-microvolt = <1800000>; 390 regulator-name = "dvdd-1v8-csi"; 391 }; 392 393 ®_fldo1 { 394 regulator-min-microvolt = <1200000>; 395 regulator-max-microvolt = <1200000>; 396 regulator-name = "vcc-1v2-hsic"; 397 }; 398 399 ®_fldo2 { 400 regulator-always-on; 401 regulator-min-microvolt = <1100000>; 402 regulator-max-microvolt = <1100000>; 403 regulator-name = "vdd-cpus"; 404 }; 405 406 ®_ldo_io0 { 407 regulator-min-microvolt = <3300000>; 408 regulator-max-microvolt = <3300000>; 409 regulator-name = "vcc-usb"; 410 status = "okay"; 411 }; 412 413 ®_ldo_io1 { 414 regulator-min-microvolt = <3300000>; 415 regulator-max-microvolt = <3300000>; 416 regulator-enable-ramp-delay = <3500000 417 regulator-name = "vcc-touchscreen"; 418 status = "okay"; 419 }; 420 421 ®_rtc_ldo { 422 regulator-name = "vcc-rtc"; 423 }; 424 425 &simplefb_hdmi { 426 vcc-hdmi-supply = <®_dldo1>; 427 }; 428 429 &hdmi { 430 hvcc-supply = <®_dldo1>; 431 status = "okay"; 432 }; 433 434 &hdmi_out { 435 hdmi_out_con: endpoint { 436 remote-endpoint = <&hdmi_con_i 437 }; 438 }; 439 440 &sound { 441 status = "okay"; 442 simple-audio-card,aux-devs = <&codec_a 443 simple-audio-card,widgets = "Microphon 444 "Microphon 445 "Headphone 446 "Speaker", 447 simple-audio-card,routing = 448 "Left DAC", "DACL", 449 "Right DAC", "DACR", 450 "Speaker Amp INL", "LI 451 "Speaker Amp INR", "LI 452 "Internal Speaker", "S 453 "Internal Speaker", "S 454 "Headphone Jack", "HP" 455 "ADCL", "Left ADC", 456 "ADCR", "Right ADC", 457 "Internal Microphone L 458 "MIC1", "Internal Micr 459 "Internal Microphone R 460 "MIC2", "Internal Micr 461 }; 462 463 &uart0 { 464 pinctrl-names = "default"; 465 pinctrl-0 = <&uart0_pb_pins>; 466 status = "okay"; 467 }; 468 469 &usb_otg { 470 dr_mode = "otg"; 471 status = "okay"; 472 }; 473 474 &usb_power_supply { 475 status = "okay"; 476 }; 477 478 &usbphy { 479 usb0_id_det-gpios = <&pio 7 9 GPIO_ACT 480 usb0_vbus_power-supply = <&usb_power_s 481 usb0_vbus-supply = <®_drivevbus>; 482 usb1_vbus-supply = <®_ldo_io0>; 483 status = "okay"; 484 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.