1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 // Copyright (C) 2017 Icenowy Zheng <icenowy@ao !! 2 /* 3 // Copyright (C) 2018 Vasily Khoruzhick <anarso !! 3 * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz> >> 4 * Copyright (C) 2018 Vasily Khoruzhick <anarsoul@gmail.com> >> 5 * >> 6 */ 4 7 5 /dts-v1/; 8 /dts-v1/; 6 9 7 #include "sun50i-a64.dtsi" 10 #include "sun50i-a64.dtsi" 8 #include "sun50i-a64-cpu-opp.dtsi" << 9 11 10 #include <dt-bindings/gpio/gpio.h> 12 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/input/gpio-keys.h> << 12 #include <dt-bindings/input/input.h> 13 #include <dt-bindings/input/input.h> 13 #include <dt-bindings/pwm/pwm.h> 14 #include <dt-bindings/pwm/pwm.h> 14 15 15 / { 16 / { 16 model = "Pine64 Pinebook"; !! 17 model = "Pinebook"; 17 compatible = "pine64,pinebook", "allwi 18 compatible = "pine64,pinebook", "allwinner,sun50i-a64"; 18 chassis-type = "laptop"; << 19 19 20 aliases { 20 aliases { 21 serial0 = &uart0; 21 serial0 = &uart0; 22 ethernet0 = &rtl8723cs; 22 ethernet0 = &rtl8723cs; 23 }; 23 }; 24 24 25 backlight: backlight { 25 backlight: backlight { 26 compatible = "pwm-backlight"; 26 compatible = "pwm-backlight"; 27 pwms = <&pwm 0 50000 0>; 27 pwms = <&pwm 0 50000 0>; 28 brightness-levels = <0 5 10 15 28 brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>; 29 default-brightness-level = <2> 29 default-brightness-level = <2>; 30 enable-gpios = <&pio 3 23 GPIO 30 enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ 31 power-supply = <®_vbklt>; << 32 }; 31 }; 33 32 34 chosen { 33 chosen { 35 stdout-path = "serial0:115200n 34 stdout-path = "serial0:115200n8"; >> 35 >> 36 framebuffer-lcd { >> 37 panel-supply = <®_dc1sw>; >> 38 dvdd25-supply = <®_dldo2>; >> 39 dvdd12-supply = <®_fldo1>; >> 40 }; 36 }; 41 }; 37 42 38 gpio-keys { !! 43 gpio_keys { 39 compatible = "gpio-keys"; 44 compatible = "gpio-keys"; 40 45 41 lid-switch { !! 46 lid_switch { 42 label = "Lid Switch"; 47 label = "Lid Switch"; 43 gpios = <&r_pio 0 12 G 48 gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */ 44 linux,input-type = <EV 49 linux,input-type = <EV_SW>; 45 linux,code = <SW_LID>; 50 linux,code = <SW_LID>; 46 linux,can-disable; 51 linux,can-disable; 47 wakeup-source; 52 wakeup-source; 48 wakeup-event-action = << 49 }; << 50 }; << 51 << 52 panel_edp: panel-edp { << 53 compatible = "neweast,wjfh1160 << 54 backlight = <&backlight>; << 55 power-supply = <®_dc1sw>; << 56 << 57 port { << 58 panel_edp_in: endpoint << 59 remote-endpoin << 60 }; << 61 }; 53 }; 62 }; 54 }; 63 55 64 reg_vbklt: vbklt { !! 56 reg_vcc3v3: vcc3v3 { 65 compatible = "regulator-fixed" 57 compatible = "regulator-fixed"; 66 regulator-name = "vbklt"; !! 58 regulator-name = "vcc3v3"; 67 regulator-min-microvolt = <180 !! 59 regulator-min-microvolt = <3300000>; 68 regulator-max-microvolt = <180 !! 60 regulator-max-microvolt = <3300000>; 69 gpio = <&pio 7 6 GPIO_ACTIVE_H << 70 enable-active-high; << 71 }; 61 }; 72 62 73 reg_vcc5v0: vcc5v0 { !! 63 wifi_pwrseq: wifi_pwrseq { 74 compatible = "regulator-fixed" << 75 regulator-name = "vcc5v0"; << 76 regulator-min-microvolt = <500 << 77 regulator-max-microvolt = <500 << 78 gpio = <&axp_gpio 0 GPIO_ACTIV << 79 enable-active-high; << 80 }; << 81 << 82 wifi_pwrseq: pwrseq { << 83 compatible = "mmc-pwrseq-simpl 64 compatible = "mmc-pwrseq-simple"; 84 reset-gpios = <&r_pio 0 2 GPIO 65 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 85 }; 66 }; 86 << 87 speaker_amp: audio-amplifier { << 88 compatible = "simple-audio-amp << 89 VCC-supply = <®_vcc5v0>; << 90 enable-gpios = <&pio 7 7 GPIO_ << 91 sound-name-prefix = "Speaker A << 92 }; << 93 << 94 }; << 95 << 96 &codec { << 97 status = "okay"; << 98 }; << 99 << 100 &codec_analog { << 101 cpvdd-supply = <®_eldo1>; << 102 status = "okay"; << 103 }; << 104 << 105 &cpu0 { << 106 cpu-supply = <®_dcdc2>; << 107 }; << 108 << 109 &cpu1 { << 110 cpu-supply = <®_dcdc2>; << 111 }; << 112 << 113 &cpu2 { << 114 cpu-supply = <®_dcdc2>; << 115 }; << 116 << 117 &cpu3 { << 118 cpu-supply = <®_dcdc2>; << 119 }; << 120 << 121 &dai { << 122 status = "okay"; << 123 }; << 124 << 125 &de { << 126 status = "okay"; << 127 }; 67 }; 128 68 129 &ehci0 { 69 &ehci0 { 130 status = "okay"; 70 status = "okay"; 131 }; 71 }; 132 72 133 &ehci1 { 73 &ehci1 { 134 status = "okay"; 74 status = "okay"; 135 }; 75 }; 136 76 137 &mixer0 { << 138 status = "okay"; << 139 }; << 140 << 141 &mmc0 { 77 &mmc0 { 142 pinctrl-names = "default"; 78 pinctrl-names = "default"; 143 pinctrl-0 = <&mmc0_pins>; 79 pinctrl-0 = <&mmc0_pins>; 144 vmmc-supply = <®_dcdc1>; 80 vmmc-supply = <®_dcdc1>; 145 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; !! 81 cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; >> 82 cd-inverted; 146 disable-wp; 83 disable-wp; 147 bus-width = <4>; 84 bus-width = <4>; 148 status = "okay"; 85 status = "okay"; 149 }; 86 }; 150 87 151 &mmc1 { 88 &mmc1 { 152 pinctrl-names = "default"; 89 pinctrl-names = "default"; 153 pinctrl-0 = <&mmc1_pins>; 90 pinctrl-0 = <&mmc1_pins>; 154 vmmc-supply = <®_dldo4>; 91 vmmc-supply = <®_dldo4>; 155 vqmmc-supply = <®_eldo1>; 92 vqmmc-supply = <®_eldo1>; 156 mmc-pwrseq = <&wifi_pwrseq>; 93 mmc-pwrseq = <&wifi_pwrseq>; 157 bus-width = <4>; 94 bus-width = <4>; 158 non-removable; 95 non-removable; 159 status = "okay"; 96 status = "okay"; 160 97 161 rtl8723cs: wifi@1 { 98 rtl8723cs: wifi@1 { 162 reg = <1>; 99 reg = <1>; 163 }; 100 }; 164 }; 101 }; 165 102 166 &mmc2 { 103 &mmc2 { 167 pinctrl-names = "default"; 104 pinctrl-names = "default"; 168 pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pi !! 105 pinctrl-0 = <&mmc2_pins>; 169 vmmc-supply = <®_dcdc1>; 106 vmmc-supply = <®_dcdc1>; 170 vqmmc-supply = <®_eldo1>; 107 vqmmc-supply = <®_eldo1>; 171 max-frequency = <200000000>; 108 max-frequency = <200000000>; 172 bus-width = <8>; 109 bus-width = <8>; 173 non-removable; 110 non-removable; 174 cap-mmc-hw-reset; 111 cap-mmc-hw-reset; 175 mmc-hs200-1_8v; 112 mmc-hs200-1_8v; 176 status = "okay"; 113 status = "okay"; 177 }; 114 }; 178 115 179 &ohci0 { 116 &ohci0 { 180 status = "okay"; 117 status = "okay"; 181 }; 118 }; 182 119 183 &ohci1 { 120 &ohci1 { 184 status = "okay"; 121 status = "okay"; 185 }; 122 }; 186 123 187 &pio { << 188 vcc-pc-supply = <®_eldo1>; << 189 vcc-pd-supply = <®_dcdc1>; << 190 vcc-pe-supply = <®_aldo1>; << 191 vcc-pg-supply = <®_eldo1>; << 192 }; << 193 << 194 &pwm { 124 &pwm { 195 status = "okay"; 125 status = "okay"; 196 }; 126 }; 197 127 198 &r_i2c { << 199 clock-frequency = <100000>; << 200 pinctrl-names = "default"; << 201 pinctrl-0 = <&r_i2c_pl89_pins>; << 202 status = "okay"; << 203 << 204 anx6345: anx6345@38 { << 205 compatible = "analogix,anx6345 << 206 reg = <0x38>; << 207 reset-gpios = <&pio 3 24 GPIO_ << 208 dvdd25-supply = <®_dldo2>; << 209 dvdd12-supply = <®_fldo1>; << 210 << 211 ports { << 212 #address-cells = <1>; << 213 #size-cells = <0>; << 214 << 215 anx6345_in: port@0 { << 216 reg = <0>; << 217 anx6345_in_tco << 218 remote << 219 }; << 220 }; << 221 << 222 anx6345_out: port@1 { << 223 reg = <1>; << 224 anx6345_out_ed << 225 remote << 226 }; << 227 }; << 228 }; << 229 }; << 230 }; << 231 << 232 &r_pio { << 233 /* << 234 * FIXME: We can't add that supply for << 235 * create a circular dependency betwee << 236 * and the RSB Bus. << 237 * << 238 * vcc-pl-supply = <®_aldo2>; << 239 */ << 240 }; << 241 << 242 &r_rsb { 128 &r_rsb { 243 status = "okay"; 129 status = "okay"; 244 130 245 axp803: pmic@3a3 { 131 axp803: pmic@3a3 { 246 compatible = "x-powers,axp803" 132 compatible = "x-powers,axp803"; 247 reg = <0x3a3>; 133 reg = <0x3a3>; 248 interrupt-parent = <&r_intc>; 134 interrupt-parent = <&r_intc>; 249 interrupts = <GIC_SPI 32 IRQ_T !! 135 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 250 }; 136 }; 251 }; 137 }; 252 138 253 #include "axp803.dtsi" !! 139 /* The ANX6345 eDP-bridge is on r_i2c */ 254 !! 140 &r_i2c { 255 &ac_power_supply { !! 141 clock-frequency = <100000>; >> 142 pinctrl-names = "default"; >> 143 pinctrl-0 = <&r_i2c_pins_a>; 256 status = "okay"; 144 status = "okay"; 257 }; 145 }; 258 146 259 &battery_power_supply { !! 147 #include "axp803.dtsi" 260 status = "okay"; << 261 }; << 262 148 263 ®_aldo1 { 149 ®_aldo1 { 264 regulator-name = "vcc-pe"; !! 150 regulator-min-microvolt = <2800000>; >> 151 regulator-max-microvolt = <2800000>; >> 152 regulator-name = "vcc-csi"; 265 }; 153 }; 266 154 267 ®_aldo2 { 155 ®_aldo2 { 268 regulator-always-on; 156 regulator-always-on; 269 regulator-min-microvolt = <1800000>; 157 regulator-min-microvolt = <1800000>; 270 regulator-max-microvolt = <3300000>; 158 regulator-max-microvolt = <3300000>; 271 regulator-name = "vcc-pl"; 159 regulator-name = "vcc-pl"; 272 }; 160 }; 273 161 274 ®_aldo3 { 162 ®_aldo3 { 275 regulator-always-on; 163 regulator-always-on; 276 regulator-min-microvolt = <2700000>; 164 regulator-min-microvolt = <2700000>; 277 regulator-max-microvolt = <3300000>; 165 regulator-max-microvolt = <3300000>; 278 regulator-name = "vcc-pll-avcc"; 166 regulator-name = "vcc-pll-avcc"; 279 }; 167 }; 280 168 281 ®_dc1sw { 169 ®_dc1sw { 282 regulator-name = "vcc-lcd"; 170 regulator-name = "vcc-lcd"; 283 }; 171 }; 284 172 285 ®_dcdc1 { 173 ®_dcdc1 { 286 regulator-always-on; 174 regulator-always-on; 287 regulator-min-microvolt = <3300000>; 175 regulator-min-microvolt = <3300000>; 288 regulator-max-microvolt = <3300000>; 176 regulator-max-microvolt = <3300000>; 289 regulator-name = "vcc-3v3"; 177 regulator-name = "vcc-3v3"; 290 }; 178 }; 291 179 292 ®_dcdc2 { 180 ®_dcdc2 { 293 regulator-always-on; 181 regulator-always-on; 294 regulator-min-microvolt = <1000000>; 182 regulator-min-microvolt = <1000000>; 295 regulator-max-microvolt = <1300000>; 183 regulator-max-microvolt = <1300000>; 296 regulator-name = "vdd-cpux"; 184 regulator-name = "vdd-cpux"; 297 }; 185 }; 298 186 299 /* DCDC3 is polyphased with DCDC2 */ 187 /* DCDC3 is polyphased with DCDC2 */ 300 188 301 ®_dcdc5 { 189 ®_dcdc5 { 302 regulator-always-on; 190 regulator-always-on; 303 regulator-min-microvolt = <1200000>; 191 regulator-min-microvolt = <1200000>; 304 regulator-max-microvolt = <1200000>; 192 regulator-max-microvolt = <1200000>; 305 regulator-name = "vcc-dram"; 193 regulator-name = "vcc-dram"; 306 }; 194 }; 307 195 308 ®_dcdc6 { 196 ®_dcdc6 { 309 regulator-always-on; 197 regulator-always-on; 310 regulator-min-microvolt = <1100000>; 198 regulator-min-microvolt = <1100000>; 311 regulator-max-microvolt = <1100000>; 199 regulator-max-microvolt = <1100000>; 312 regulator-name = "vdd-sys"; 200 regulator-name = "vdd-sys"; 313 }; 201 }; 314 202 315 ®_dldo1 { 203 ®_dldo1 { 316 regulator-min-microvolt = <3300000>; 204 regulator-min-microvolt = <3300000>; 317 regulator-max-microvolt = <3300000>; 205 regulator-max-microvolt = <3300000>; 318 regulator-name = "vcc-hdmi"; 206 regulator-name = "vcc-hdmi"; 319 }; 207 }; 320 208 321 ®_dldo2 { 209 ®_dldo2 { 322 regulator-min-microvolt = <2500000>; 210 regulator-min-microvolt = <2500000>; 323 regulator-max-microvolt = <2500000>; 211 regulator-max-microvolt = <2500000>; 324 regulator-name = "vcc-edp"; 212 regulator-name = "vcc-edp"; 325 }; 213 }; 326 214 >> 215 ®_dldo3 { >> 216 regulator-min-microvolt = <3300000>; >> 217 regulator-max-microvolt = <3300000>; >> 218 regulator-name = "avdd-csi"; >> 219 }; >> 220 327 ®_dldo4 { 221 ®_dldo4 { 328 regulator-min-microvolt = <3300000>; 222 regulator-min-microvolt = <3300000>; 329 regulator-max-microvolt = <3300000>; 223 regulator-max-microvolt = <3300000>; 330 regulator-name = "vcc-wifi"; 224 regulator-name = "vcc-wifi"; 331 }; 225 }; 332 226 333 ®_eldo1 { 227 ®_eldo1 { 334 regulator-always-on; 228 regulator-always-on; 335 regulator-min-microvolt = <1800000>; 229 regulator-min-microvolt = <1800000>; 336 regulator-max-microvolt = <1800000>; 230 regulator-max-microvolt = <1800000>; 337 regulator-name = "cpvdd"; 231 regulator-name = "cpvdd"; 338 }; 232 }; 339 233 >> 234 ®_eldo3 { >> 235 regulator-min-microvolt = <1800000>; >> 236 regulator-max-microvolt = <1800000>; >> 237 regulator-name = "vdd-1v8-csi"; >> 238 }; >> 239 340 ®_fldo1 { 240 ®_fldo1 { 341 regulator-min-microvolt = <1200000>; 241 regulator-min-microvolt = <1200000>; 342 regulator-max-microvolt = <1200000>; 242 regulator-max-microvolt = <1200000>; 343 regulator-name = "vcc-1v2-hsic"; 243 regulator-name = "vcc-1v2-hsic"; 344 }; 244 }; 345 245 346 ®_fldo2 { 246 ®_fldo2 { 347 regulator-always-on; 247 regulator-always-on; 348 regulator-min-microvolt = <1100000>; 248 regulator-min-microvolt = <1100000>; 349 regulator-max-microvolt = <1100000>; 249 regulator-max-microvolt = <1100000>; 350 regulator-name = "vdd-cpus"; 250 regulator-name = "vdd-cpus"; 351 }; 251 }; 352 252 353 ®_rtc_ldo { !! 253 ®_ldo_io0 { 354 regulator-name = "vcc-rtc"; !! 254 regulator-min-microvolt = <3300000>; >> 255 regulator-max-microvolt = <3300000>; >> 256 regulator-name = "vcc-usb"; >> 257 status = "okay"; 355 }; 258 }; 356 259 357 &simplefb_lcd { !! 260 ®_rtc_ldo { 358 panel-supply = <®_dc1sw>; !! 261 regulator-name = "vcc-rtc"; 359 dvdd25-supply = <®_dldo2>; << 360 dvdd12-supply = <®_fldo1>; << 361 }; 262 }; 362 263 363 &simplefb_hdmi { 264 &simplefb_hdmi { 364 vcc-hdmi-supply = <®_dldo1>; 265 vcc-hdmi-supply = <®_dldo1>; 365 }; 266 }; 366 267 367 &sound { << 368 status = "okay"; << 369 simple-audio-card,aux-devs = <&codec_a << 370 simple-audio-card,widgets = "Microphon << 371 "Microphon << 372 "Headphone << 373 "Speaker", << 374 simple-audio-card,routing = << 375 "Left DAC", "DACL", << 376 "Right DAC", "DACR", << 377 "Speaker Amp INL", "LI << 378 "Speaker Amp INR", "LI << 379 "Internal Speaker", "S << 380 "Internal Speaker", "S << 381 "Headphone Jack", "HP" << 382 "ADCL", "Left ADC", << 383 "ADCR", "Right ADC", << 384 "Internal Microphone L << 385 "MIC1", "Internal Micr << 386 "Internal Microphone R << 387 "MIC2", "Internal Micr << 388 }; << 389 << 390 &tcon0 { << 391 pinctrl-names = "default"; << 392 pinctrl-0 = <&lcd_rgb666_pins>; << 393 << 394 status = "okay"; << 395 }; << 396 << 397 &tcon0_out { << 398 tcon0_out_anx6345: endpoint { << 399 remote-endpoint = <&anx6345_in << 400 }; << 401 }; << 402 << 403 &uart0 { 268 &uart0 { 404 pinctrl-names = "default"; 269 pinctrl-names = "default"; 405 pinctrl-0 = <&uart0_pb_pins>; !! 270 pinctrl-0 = <&uart0_pins_a>; 406 status = "okay"; << 407 }; << 408 << 409 &uart1 { << 410 pinctrl-names = "default"; << 411 pinctrl-0 = <&uart1_pins>, <&uart1_rts << 412 uart-has-rtscts; << 413 status = "okay"; 271 status = "okay"; 414 << 415 bluetooth { << 416 compatible = "realtek,rtl8723c << 417 device-wake-gpios = <&r_pio 0 << 418 enable-gpios = <&r_pio 0 4 GPI << 419 host-wake-gpios = <&r_pio 0 6 << 420 }; << 421 }; 272 }; 422 273 423 &usb_otg { 274 &usb_otg { 424 dr_mode = "host"; 275 dr_mode = "host"; 425 }; 276 }; 426 277 427 &usbphy { 278 &usbphy { 428 usb0_vbus-supply = <®_vcc5v0>; !! 279 usb0_vbus-supply = <®_ldo_io0>; 429 usb1_vbus-supply = <®_vcc5v0>; !! 280 usb1_vbus-supply = <®_ldo_io0>; 430 status = "okay"; 281 status = "okay"; 431 }; 282 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.