| .. | .. |
|---|
| 1 | | -/* |
|---|
| 2 | | - * Copyright (c) 2016 ARM Ltd. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This file is dual-licensed: you can use it either under the terms |
|---|
| 5 | | - * of the GPL or the X11 license, at your option. Note that this dual |
|---|
| 6 | | - * licensing only applies to this file, and not this project as a |
|---|
| 7 | | - * whole. |
|---|
| 8 | | - * |
|---|
| 9 | | - * a) This library is free software; you can redistribute it and/or |
|---|
| 10 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 11 | | - * published by the Free Software Foundation; either version 2 of the |
|---|
| 12 | | - * License, or (at your option) any later version. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This library is distributed in the hope that it will be useful, |
|---|
| 15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | | - * GNU General Public License for more details. |
|---|
| 18 | | - * |
|---|
| 19 | | - * Or, alternatively, |
|---|
| 20 | | - * |
|---|
| 21 | | - * b) Permission is hereby granted, free of charge, to any person |
|---|
| 22 | | - * obtaining a copy of this software and associated documentation |
|---|
| 23 | | - * files (the "Software"), to deal in the Software without |
|---|
| 24 | | - * restriction, including without limitation the rights to use, |
|---|
| 25 | | - * copy, modify, merge, publish, distribute, sublicense, and/or |
|---|
| 26 | | - * sell copies of the Software, and to permit persons to whom the |
|---|
| 27 | | - * Software is furnished to do so, subject to the following |
|---|
| 28 | | - * conditions: |
|---|
| 29 | | - * |
|---|
| 30 | | - * The above copyright notice and this permission notice shall be |
|---|
| 31 | | - * included in all copies or substantial portions of the Software. |
|---|
| 32 | | - * |
|---|
| 33 | | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|---|
| 34 | | - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|---|
| 35 | | - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|---|
| 36 | | - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|---|
| 37 | | - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|---|
| 38 | | - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|---|
| 39 | | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|---|
| 40 | | - * OTHER DEALINGS IN THE SOFTWARE. |
|---|
| 41 | | - */ |
|---|
| 1 | +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
|---|
| 2 | +// Copyright (c) 2016 ARM Ltd. |
|---|
| 42 | 3 | |
|---|
| 43 | 4 | /dts-v1/; |
|---|
| 44 | 5 | |
|---|
| 45 | 6 | #include "sun50i-a64.dtsi" |
|---|
| 7 | +#include "sun50i-a64-cpu-opp.dtsi" |
|---|
| 46 | 8 | |
|---|
| 47 | 9 | #include <dt-bindings/gpio/gpio.h> |
|---|
| 48 | 10 | |
|---|
| .. | .. |
|---|
| 58 | 20 | |
|---|
| 59 | 21 | chosen { |
|---|
| 60 | 22 | stdout-path = "serial0:115200n8"; |
|---|
| 23 | + }; |
|---|
| 24 | + |
|---|
| 25 | + hdmi-connector { |
|---|
| 26 | + compatible = "hdmi-connector"; |
|---|
| 27 | + type = "a"; |
|---|
| 28 | + |
|---|
| 29 | + port { |
|---|
| 30 | + hdmi_con_in: endpoint { |
|---|
| 31 | + remote-endpoint = <&hdmi_out_con>; |
|---|
| 32 | + }; |
|---|
| 33 | + }; |
|---|
| 61 | 34 | }; |
|---|
| 62 | 35 | |
|---|
| 63 | 36 | leds { |
|---|
| .. | .. |
|---|
| 83 | 56 | wifi_pwrseq: wifi_pwrseq { |
|---|
| 84 | 57 | compatible = "mmc-pwrseq-simple"; |
|---|
| 85 | 58 | reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ |
|---|
| 59 | + clocks = <&rtc 1>; |
|---|
| 60 | + clock-names = "ext_clock"; |
|---|
| 86 | 61 | }; |
|---|
| 62 | +}; |
|---|
| 63 | + |
|---|
| 64 | +&codec { |
|---|
| 65 | + status = "okay"; |
|---|
| 66 | +}; |
|---|
| 67 | + |
|---|
| 68 | +&codec_analog { |
|---|
| 69 | + cpvdd-supply = <®_eldo1>; |
|---|
| 70 | + status = "okay"; |
|---|
| 71 | +}; |
|---|
| 72 | + |
|---|
| 73 | +&cpu0 { |
|---|
| 74 | + cpu-supply = <®_dcdc2>; |
|---|
| 75 | +}; |
|---|
| 76 | + |
|---|
| 77 | +&cpu1 { |
|---|
| 78 | + cpu-supply = <®_dcdc2>; |
|---|
| 79 | +}; |
|---|
| 80 | + |
|---|
| 81 | +&cpu2 { |
|---|
| 82 | + cpu-supply = <®_dcdc2>; |
|---|
| 83 | +}; |
|---|
| 84 | + |
|---|
| 85 | +&cpu3 { |
|---|
| 86 | + cpu-supply = <®_dcdc2>; |
|---|
| 87 | +}; |
|---|
| 88 | + |
|---|
| 89 | +&dai { |
|---|
| 90 | + status = "okay"; |
|---|
| 91 | +}; |
|---|
| 92 | + |
|---|
| 93 | +&de { |
|---|
| 94 | + status = "okay"; |
|---|
| 87 | 95 | }; |
|---|
| 88 | 96 | |
|---|
| 89 | 97 | &ehci0 { |
|---|
| .. | .. |
|---|
| 103 | 111 | status = "okay"; |
|---|
| 104 | 112 | }; |
|---|
| 105 | 113 | |
|---|
| 114 | +&hdmi { |
|---|
| 115 | + hvcc-supply = <®_dldo1>; |
|---|
| 116 | + status = "okay"; |
|---|
| 117 | +}; |
|---|
| 118 | + |
|---|
| 119 | +&hdmi_out { |
|---|
| 120 | + hdmi_out_con: endpoint { |
|---|
| 121 | + remote-endpoint = <&hdmi_con_in>; |
|---|
| 122 | + }; |
|---|
| 123 | +}; |
|---|
| 124 | + |
|---|
| 106 | 125 | &i2c1 { |
|---|
| 107 | | - pinctrl-names = "default"; |
|---|
| 108 | | - pinctrl-0 = <&i2c1_pins>; |
|---|
| 109 | 126 | status = "okay"; |
|---|
| 110 | 127 | }; |
|---|
| 111 | 128 | |
|---|
| .. | .. |
|---|
| 151 | 168 | |
|---|
| 152 | 169 | &mmc2 { |
|---|
| 153 | 170 | pinctrl-names = "default"; |
|---|
| 154 | | - pinctrl-0 = <&mmc2_pins>; |
|---|
| 171 | + pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>; |
|---|
| 155 | 172 | vmmc-supply = <®_dcdc1>; |
|---|
| 156 | 173 | bus-width = <8>; |
|---|
| 157 | 174 | non-removable; |
|---|
| .. | .. |
|---|
| 180 | 197 | }; |
|---|
| 181 | 198 | |
|---|
| 182 | 199 | #include "axp803.dtsi" |
|---|
| 200 | + |
|---|
| 201 | +&ac_power_supply { |
|---|
| 202 | + status = "okay"; |
|---|
| 203 | +}; |
|---|
| 204 | + |
|---|
| 205 | +&battery_power_supply { |
|---|
| 206 | + status = "okay"; |
|---|
| 207 | +}; |
|---|
| 183 | 208 | |
|---|
| 184 | 209 | ®_aldo1 { |
|---|
| 185 | 210 | /* |
|---|
| .. | .. |
|---|
| 300 | 325 | vcc-hdmi-supply = <®_dldo1>; |
|---|
| 301 | 326 | }; |
|---|
| 302 | 327 | |
|---|
| 328 | +&sound { |
|---|
| 329 | + status = "okay"; |
|---|
| 330 | + simple-audio-card,widgets = "Headphone", "Headphone Jack", |
|---|
| 331 | + "Microphone", "Microphone Jack", |
|---|
| 332 | + "Microphone", "Onboard Microphone"; |
|---|
| 333 | + simple-audio-card,routing = |
|---|
| 334 | + "Left DAC", "DACL", |
|---|
| 335 | + "Right DAC", "DACR", |
|---|
| 336 | + "ADCL", "Left ADC", |
|---|
| 337 | + "ADCR", "Right ADC", |
|---|
| 338 | + "Headphone Jack", "HP", |
|---|
| 339 | + "MIC2", "Microphone Jack", |
|---|
| 340 | + "Onboard Microphone", "MBIAS", |
|---|
| 341 | + "MIC1", "Onboard Microphone"; |
|---|
| 342 | +}; |
|---|
| 343 | + |
|---|
| 303 | 344 | &uart0 { |
|---|
| 304 | 345 | pinctrl-names = "default"; |
|---|
| 305 | | - pinctrl-0 = <&uart0_pins_a>; |
|---|
| 346 | + pinctrl-0 = <&uart0_pb_pins>; |
|---|
| 306 | 347 | status = "okay"; |
|---|
| 307 | 348 | }; |
|---|
| 308 | 349 | |
|---|
| 309 | 350 | &uart1 { |
|---|
| 310 | 351 | pinctrl-names = "default"; |
|---|
| 311 | 352 | pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; |
|---|
| 353 | + uart-has-rtscts; |
|---|
| 312 | 354 | status = "okay"; |
|---|
| 355 | + |
|---|
| 356 | + bluetooth { |
|---|
| 357 | + compatible = "brcm,bcm43438-bt"; |
|---|
| 358 | + clocks = <&rtc 1>; |
|---|
| 359 | + clock-names = "lpo"; |
|---|
| 360 | + vbat-supply = <®_dldo2>; |
|---|
| 361 | + vddio-supply = <®_dldo4>; |
|---|
| 362 | + device-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ |
|---|
| 363 | + host-wakeup-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */ |
|---|
| 364 | + shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ |
|---|
| 365 | + }; |
|---|
| 313 | 366 | }; |
|---|
| 314 | 367 | |
|---|
| 315 | 368 | &usb_otg { |
|---|
| .. | .. |
|---|
| 317 | 370 | status = "okay"; |
|---|
| 318 | 371 | }; |
|---|
| 319 | 372 | |
|---|
| 373 | +&usb_power_supply { |
|---|
| 374 | + status = "okay"; |
|---|
| 375 | +}; |
|---|
| 376 | + |
|---|
| 320 | 377 | &usbphy { |
|---|
| 321 | 378 | usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ |
|---|
| 379 | + usb0_vbus_power-supply = <&usb_power_supply>; |
|---|
| 322 | 380 | usb0_vbus-supply = <®_drivevbus>; |
|---|
| 323 | 381 | status = "okay"; |
|---|
| 324 | 382 | }; |
|---|