| .. | .. |
|---|
| 1 | | -/* |
|---|
| 2 | | - * Copyright (C) 2017 Jagan Teki <jteki@openedev.com> |
|---|
| 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) 2017 Jagan Teki <jteki@openedev.com> |
|---|
| 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 | |
|---|
| .. | .. |
|---|
| 51 | 13 | compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64"; |
|---|
| 52 | 14 | |
|---|
| 53 | 15 | aliases { |
|---|
| 16 | + ethernet0 = &emac; |
|---|
| 54 | 17 | serial0 = &uart0; |
|---|
| 55 | 18 | }; |
|---|
| 56 | 19 | |
|---|
| 57 | 20 | chosen { |
|---|
| 58 | 21 | stdout-path = "serial0:115200n8"; |
|---|
| 59 | 22 | }; |
|---|
| 23 | + |
|---|
| 24 | + hdmi-connector { |
|---|
| 25 | + compatible = "hdmi-connector"; |
|---|
| 26 | + type = "a"; |
|---|
| 27 | + |
|---|
| 28 | + port { |
|---|
| 29 | + hdmi_con_in: endpoint { |
|---|
| 30 | + remote-endpoint = <&hdmi_out_con>; |
|---|
| 31 | + }; |
|---|
| 32 | + }; |
|---|
| 33 | + }; |
|---|
| 34 | + |
|---|
| 35 | + leds { |
|---|
| 36 | + compatible = "gpio-leds"; |
|---|
| 37 | + |
|---|
| 38 | + blue { |
|---|
| 39 | + label = "nanopi-a64:blue:status"; |
|---|
| 40 | + gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ |
|---|
| 41 | + }; |
|---|
| 42 | + }; |
|---|
| 43 | + |
|---|
| 44 | + wifi_pwrseq: wifi_pwrseq { |
|---|
| 45 | + compatible = "mmc-pwrseq-simple"; |
|---|
| 46 | + clocks = <&rtc 1>; |
|---|
| 47 | + clock-names = "ext_clock"; |
|---|
| 48 | + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ |
|---|
| 49 | + }; |
|---|
| 50 | +}; |
|---|
| 51 | + |
|---|
| 52 | +&cpu0 { |
|---|
| 53 | + cpu-supply = <®_dcdc2>; |
|---|
| 54 | +}; |
|---|
| 55 | + |
|---|
| 56 | +&cpu1 { |
|---|
| 57 | + cpu-supply = <®_dcdc2>; |
|---|
| 58 | +}; |
|---|
| 59 | + |
|---|
| 60 | +&cpu2 { |
|---|
| 61 | + cpu-supply = <®_dcdc2>; |
|---|
| 62 | +}; |
|---|
| 63 | + |
|---|
| 64 | +&cpu3 { |
|---|
| 65 | + cpu-supply = <®_dcdc2>; |
|---|
| 66 | +}; |
|---|
| 67 | + |
|---|
| 68 | +&de { |
|---|
| 69 | + status = "okay"; |
|---|
| 60 | 70 | }; |
|---|
| 61 | 71 | |
|---|
| 62 | 72 | &ehci0 { |
|---|
| .. | .. |
|---|
| 67 | 77 | status = "okay"; |
|---|
| 68 | 78 | }; |
|---|
| 69 | 79 | |
|---|
| 70 | | -/* i2c1 connected with gpio headers like pine64, bananapi */ |
|---|
| 71 | | -&i2c1 { |
|---|
| 80 | +&emac { |
|---|
| 72 | 81 | pinctrl-names = "default"; |
|---|
| 73 | | - pinctrl-0 = <&i2c1_pins>; |
|---|
| 74 | | - status = "disabled"; |
|---|
| 82 | + pinctrl-0 = <&rgmii_pins>; |
|---|
| 83 | + phy-mode = "rgmii"; |
|---|
| 84 | + phy-handle = <&ext_rgmii_phy>; |
|---|
| 85 | + phy-supply = <®_dcdc1>; |
|---|
| 86 | + status = "okay"; |
|---|
| 75 | 87 | }; |
|---|
| 76 | 88 | |
|---|
| 89 | +&hdmi { |
|---|
| 90 | + hvcc-supply = <®_dldo1>; |
|---|
| 91 | + status = "okay"; |
|---|
| 92 | +}; |
|---|
| 93 | + |
|---|
| 94 | +&hdmi_out { |
|---|
| 95 | + hdmi_out_con: endpoint { |
|---|
| 96 | + remote-endpoint = <&hdmi_con_in>; |
|---|
| 97 | + }; |
|---|
| 98 | +}; |
|---|
| 99 | + |
|---|
| 100 | +/* i2c1 connected with gpio headers like pine64, bananapi */ |
|---|
| 77 | 101 | &i2c1_pins { |
|---|
| 78 | 102 | bias-pull-up; |
|---|
| 103 | +}; |
|---|
| 104 | + |
|---|
| 105 | +&mdio { |
|---|
| 106 | + ext_rgmii_phy: ethernet-phy@1 { |
|---|
| 107 | + compatible = "ethernet-phy-ieee802.3-c22"; |
|---|
| 108 | + reg = <7>; |
|---|
| 109 | + }; |
|---|
| 79 | 110 | }; |
|---|
| 80 | 111 | |
|---|
| 81 | 112 | &mmc0 { |
|---|
| .. | .. |
|---|
| 86 | 117 | disable-wp; |
|---|
| 87 | 118 | bus-width = <4>; |
|---|
| 88 | 119 | status = "okay"; |
|---|
| 120 | +}; |
|---|
| 121 | + |
|---|
| 122 | +&mmc1 { |
|---|
| 123 | + pinctrl-names = "default"; |
|---|
| 124 | + pinctrl-0 = <&mmc1_pins>; |
|---|
| 125 | + vmmc-supply = <®_dcdc1>; |
|---|
| 126 | + vqmmc-supply = <®_dldo4>; |
|---|
| 127 | + mmc-pwrseq = <&wifi_pwrseq>; |
|---|
| 128 | + bus-width = <4>; |
|---|
| 129 | + non-removable; |
|---|
| 130 | + status = "okay"; |
|---|
| 131 | + |
|---|
| 132 | + rtl8189etv: wifi@1 { |
|---|
| 133 | + reg = <1>; |
|---|
| 134 | + interrupt-parent = <&r_pio>; |
|---|
| 135 | + interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ |
|---|
| 136 | + interrupt-names = "host-wake"; |
|---|
| 137 | + }; |
|---|
| 89 | 138 | }; |
|---|
| 90 | 139 | |
|---|
| 91 | 140 | &ohci0 { |
|---|
| .. | .. |
|---|
| 108 | 157 | }; |
|---|
| 109 | 158 | |
|---|
| 110 | 159 | #include "axp803.dtsi" |
|---|
| 160 | + |
|---|
| 161 | +&ac_power_supply { |
|---|
| 162 | + status = "okay"; |
|---|
| 163 | +}; |
|---|
| 111 | 164 | |
|---|
| 112 | 165 | ®_aldo2 { |
|---|
| 113 | 166 | regulator-always-on; |
|---|
| .. | .. |
|---|
| 201 | 254 | |
|---|
| 202 | 255 | &uart0 { |
|---|
| 203 | 256 | pinctrl-names = "default"; |
|---|
| 204 | | - pinctrl-0 = <&uart0_pins_a>; |
|---|
| 257 | + pinctrl-0 = <&uart0_pb_pins>; |
|---|
| 205 | 258 | status = "okay"; |
|---|
| 206 | 259 | }; |
|---|
| 207 | 260 | |
|---|