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