| .. | .. |
|---|
| 1 | | -/* |
|---|
| 2 | | - * Copyright (C) Harald Geyer <harald@ccbib.org> |
|---|
| 3 | | - * based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * SPDX-License-Identifier: (GPL-2.0 OR MIT) |
|---|
| 6 | | - */ |
|---|
| 1 | +// SPDX-License-Identifier: (GPL-2.0 OR MIT) |
|---|
| 2 | +// Copyright (C) Harald Geyer <harald@ccbib.org> |
|---|
| 3 | +// based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com> |
|---|
| 7 | 4 | |
|---|
| 8 | 5 | /dts-v1/; |
|---|
| 9 | 6 | |
|---|
| 10 | 7 | #include "sun50i-a64.dtsi" |
|---|
| 8 | +#include "sun50i-a64-cpu-opp.dtsi" |
|---|
| 11 | 9 | |
|---|
| 12 | 10 | #include <dt-bindings/gpio/gpio.h> |
|---|
| 13 | 11 | #include <dt-bindings/input/input.h> |
|---|
| .. | .. |
|---|
| 19 | 17 | |
|---|
| 20 | 18 | aliases { |
|---|
| 21 | 19 | serial0 = &uart0; |
|---|
| 20 | + }; |
|---|
| 21 | + |
|---|
| 22 | + backlight: backlight { |
|---|
| 23 | + compatible = "pwm-backlight"; |
|---|
| 24 | + pwms = <&pwm 0 50000 0>; |
|---|
| 25 | + power-supply = <®_dcdc1>; |
|---|
| 26 | + brightness-levels = <0 5 7 10 14 20 28 40 56 80 112>; |
|---|
| 27 | + default-brightness-level = <5>; |
|---|
| 28 | + enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ |
|---|
| 22 | 29 | }; |
|---|
| 23 | 30 | |
|---|
| 24 | 31 | chosen { |
|---|
| .. | .. |
|---|
| 70 | 77 | compatible = "mmc-pwrseq-simple"; |
|---|
| 71 | 78 | reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ |
|---|
| 72 | 79 | }; |
|---|
| 80 | + |
|---|
| 81 | + speaker_amp: audio-amplifier { |
|---|
| 82 | + compatible = "simple-audio-amplifier"; |
|---|
| 83 | + enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */ |
|---|
| 84 | + sound-name-prefix = "Speaker Amp"; |
|---|
| 85 | + }; |
|---|
| 86 | +}; |
|---|
| 87 | + |
|---|
| 88 | +&codec { |
|---|
| 89 | + status = "okay"; |
|---|
| 90 | +}; |
|---|
| 91 | + |
|---|
| 92 | +&codec_analog { |
|---|
| 93 | + cpvdd-supply = <®_eldo1>; |
|---|
| 94 | + status = "okay"; |
|---|
| 95 | +}; |
|---|
| 96 | + |
|---|
| 97 | +&dai { |
|---|
| 98 | + status = "okay"; |
|---|
| 99 | +}; |
|---|
| 100 | + |
|---|
| 101 | +&de { |
|---|
| 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>; |
|---|
| 73 | 119 | }; |
|---|
| 74 | 120 | |
|---|
| 75 | 121 | &ehci1 { |
|---|
| .. | .. |
|---|
| 77 | 123 | }; |
|---|
| 78 | 124 | |
|---|
| 79 | 125 | |
|---|
| 80 | | -/* The ANX6345 eDP-bridge is on i2c0. There is no linux (mainline) |
|---|
| 81 | | - * driver for this chip at the moment, the bootloader initializes it. |
|---|
| 82 | | - * However it can be accessed with the i2c-dev driver from user space. |
|---|
| 83 | | - */ |
|---|
| 84 | 126 | &i2c0 { |
|---|
| 85 | 127 | clock-frequency = <100000>; |
|---|
| 86 | | - pinctrl-names = "default"; |
|---|
| 87 | | - pinctrl-0 = <&i2c0_pins>; |
|---|
| 128 | + status = "okay"; |
|---|
| 129 | + |
|---|
| 130 | + anx6345: anx6345@38 { |
|---|
| 131 | + compatible = "analogix,anx6345"; |
|---|
| 132 | + reg = <0x38>; |
|---|
| 133 | + reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ |
|---|
| 134 | + dvdd25-supply = <®_dldo2>; |
|---|
| 135 | + dvdd12-supply = <®_dldo3>; |
|---|
| 136 | + |
|---|
| 137 | + ports { |
|---|
| 138 | + #address-cells = <1>; |
|---|
| 139 | + #size-cells = <0>; |
|---|
| 140 | + |
|---|
| 141 | + port@0 { |
|---|
| 142 | + anx6345_in: endpoint { |
|---|
| 143 | + remote-endpoint = <&tcon0_out_anx6345>; |
|---|
| 144 | + }; |
|---|
| 145 | + }; |
|---|
| 146 | + }; |
|---|
| 147 | + }; |
|---|
| 148 | +}; |
|---|
| 149 | + |
|---|
| 150 | +&mixer0 { |
|---|
| 88 | 151 | status = "okay"; |
|---|
| 89 | 152 | }; |
|---|
| 90 | 153 | |
|---|
| .. | .. |
|---|
| 131 | 194 | status = "okay"; |
|---|
| 132 | 195 | }; |
|---|
| 133 | 196 | |
|---|
| 197 | +&pwm { |
|---|
| 198 | + status = "okay"; |
|---|
| 199 | +}; |
|---|
| 200 | + |
|---|
| 134 | 201 | &r_rsb { |
|---|
| 135 | 202 | status = "okay"; |
|---|
| 136 | 203 | |
|---|
| .. | .. |
|---|
| 144 | 211 | }; |
|---|
| 145 | 212 | |
|---|
| 146 | 213 | #include "axp803.dtsi" |
|---|
| 214 | + |
|---|
| 215 | +&ac_power_supply { |
|---|
| 216 | + status = "okay"; |
|---|
| 217 | +}; |
|---|
| 218 | + |
|---|
| 219 | +&battery_power_supply { |
|---|
| 220 | + status = "okay"; |
|---|
| 221 | +}; |
|---|
| 147 | 222 | |
|---|
| 148 | 223 | ®_aldo1 { |
|---|
| 149 | 224 | regulator-always-on; |
|---|
| .. | .. |
|---|
| 239 | 314 | }; |
|---|
| 240 | 315 | |
|---|
| 241 | 316 | /* |
|---|
| 242 | | - * The A64 chip cannot work without this regulator off, although |
|---|
| 317 | + * The A64 chip cannot work with this regulator off, although |
|---|
| 243 | 318 | * it seems to be only driving the AR100 core. |
|---|
| 244 | 319 | * Maybe we don't still know well about CPUs domain. |
|---|
| 245 | 320 | */ |
|---|
| .. | .. |
|---|
| 258 | 333 | vcc-hdmi-supply = <®_dldo1>; |
|---|
| 259 | 334 | }; |
|---|
| 260 | 335 | |
|---|
| 336 | +&sound { |
|---|
| 337 | + simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>; |
|---|
| 338 | + simple-audio-card,widgets = "Headphone", "Headphone Jack", |
|---|
| 339 | + "Microphone", "Headset Microphone", |
|---|
| 340 | + "Microphone", "Internal Microphone", |
|---|
| 341 | + "Speaker", "Internal Speaker"; |
|---|
| 342 | + simple-audio-card,routing = |
|---|
| 343 | + "Left DAC", "DACL", |
|---|
| 344 | + "Right DAC", "DACR", |
|---|
| 345 | + "ADCL", "Left ADC", |
|---|
| 346 | + "ADCR", "Right ADC", |
|---|
| 347 | + "Headphone Jack", "HP", |
|---|
| 348 | + "Speaker Amp INL", "LINEOUT", |
|---|
| 349 | + "Speaker Amp INR", "LINEOUT", |
|---|
| 350 | + "Internal Speaker", "Speaker Amp OUTL", |
|---|
| 351 | + "Internal Speaker", "Speaker Amp OUTR", |
|---|
| 352 | + "Internal Microphone", "MBIAS", |
|---|
| 353 | + "MIC1", "Internal Microphone", |
|---|
| 354 | + "Headset Microphone", "HBIAS", |
|---|
| 355 | + "MIC2", "Headset Microphone"; |
|---|
| 356 | + status = "okay"; |
|---|
| 357 | +}; |
|---|
| 358 | + |
|---|
| 359 | +&tcon0 { |
|---|
| 360 | + pinctrl-names = "default"; |
|---|
| 361 | + pinctrl-0 = <&lcd_rgb666_pins>; |
|---|
| 362 | + |
|---|
| 363 | + status = "okay"; |
|---|
| 364 | +}; |
|---|
| 365 | + |
|---|
| 366 | +&tcon0_out { |
|---|
| 367 | + tcon0_out_anx6345: endpoint@0 { |
|---|
| 368 | + reg = <0>; |
|---|
| 369 | + remote-endpoint = <&anx6345_in>; |
|---|
| 370 | + }; |
|---|
| 371 | +}; |
|---|
| 372 | + |
|---|
| 261 | 373 | &uart0 { |
|---|
| 262 | 374 | pinctrl-names = "default"; |
|---|
| 263 | | - pinctrl-0 = <&uart0_pins_a>; |
|---|
| 375 | + pinctrl-0 = <&uart0_pb_pins>; |
|---|
| 264 | 376 | status = "okay"; |
|---|
| 265 | 377 | }; |
|---|
| 266 | 378 | |
|---|