0001 /*
0002 * Copyright 2015-2020 Adam Sampson <ats@offog.org>
0003 *
0004 * This file is dual-licensed: you can use it either under the terms
0005 * of the GPL or the X11 license, at your option. Note that this dual
0006 * licensing only applies to this file, and not this project as a
0007 * whole.
0008 *
0009 * a) This file is free software; you can redistribute it and/or
0010 * modify it under the terms of the GNU General Public License as
0011 * published by the Free Software Foundation; either version 2 of the
0012 * License, or (at your option) any later version.
0013 *
0014 * This file is distributed in the hope that it will be useful,
0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0017 * GNU General Public License for more details.
0018 *
0019 * Or, alternatively,
0020 *
0021 * b) Permission is hereby granted, free of charge, to any person
0022 * obtaining a copy of this software and associated documentation
0023 * files (the "Software"), to deal in the Software without
0024 * restriction, including without limitation the rights to use,
0025 * copy, modify, merge, publish, distribute, sublicense, and/or
0026 * sell copies of the Software, and to permit persons to whom the
0027 * Software is furnished to do so, subject to the following
0028 * conditions:
0029 *
0030 * The above copyright notice and this permission notice shall be
0031 * included in all copies or substantial portions of the Software.
0032 *
0033 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0034 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0035 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0036 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0037 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0038 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0039 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0040 * OTHER DEALINGS IN THE SOFTWARE.
0041 */
0042
0043 /dts-v1/;
0044 #include "sun7i-a20.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046 #include <dt-bindings/gpio/gpio.h>
0047 #include <dt-bindings/interrupt-controller/arm-gic.h>
0048
0049 / {
0050 model = "LinkSprite pcDuino3 Nano";
0051 compatible = "linksprite,pcduino3-nano", "allwinner,sun7i-a20";
0052
0053 aliases {
0054 serial0 = &uart0;
0055 };
0056
0057 chosen {
0058 stdout-path = "serial0:115200n8";
0059 };
0060
0061 hdmi-connector {
0062 compatible = "hdmi-connector";
0063 type = "a";
0064
0065 port {
0066 hdmi_con_in: endpoint {
0067 remote-endpoint = <&hdmi_out_con>;
0068 };
0069 };
0070 };
0071
0072 leds {
0073 compatible = "gpio-leds";
0074
0075 led-3 {
0076 label = "pcduino3-nano:green:usr1";
0077 gpios = <&pio 7 16 GPIO_ACTIVE_LOW>; /* PH16 */
0078 };
0079
0080 led-4 {
0081 label = "pcduino3-nano:green:usr2";
0082 gpios = <&pio 7 15 GPIO_ACTIVE_LOW>; /* PH15 */
0083 };
0084 };
0085 };
0086
0087 &ahci {
0088 target-supply = <®_ahci_5v>;
0089 status = "okay";
0090 };
0091
0092 &codec {
0093 status = "okay";
0094 };
0095
0096 &cpu0 {
0097 cpu-supply = <®_dcdc2>;
0098 };
0099
0100 &de {
0101 status = "okay";
0102 };
0103
0104 &ehci0 {
0105 status = "okay";
0106 };
0107
0108 &ehci1 {
0109 status = "okay";
0110 };
0111
0112 &gmac {
0113 pinctrl-names = "default";
0114 pinctrl-0 = <&gmac_rgmii_pins>;
0115 phy-handle = <&phy1>;
0116 phy-mode = "rgmii-id";
0117 status = "okay";
0118 };
0119
0120 &hdmi {
0121 status = "okay";
0122 };
0123
0124 &hdmi_out {
0125 hdmi_out_con: endpoint {
0126 remote-endpoint = <&hdmi_con_in>;
0127 };
0128 };
0129
0130 &i2c0 {
0131 status = "okay";
0132
0133 axp209: pmic@34 {
0134 reg = <0x34>;
0135 interrupt-parent = <&nmi_intc>;
0136 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0137 };
0138 };
0139
0140 &ir0 {
0141 pinctrl-names = "default";
0142 pinctrl-0 = <&ir0_rx_pin>;
0143 status = "okay";
0144 };
0145
0146 &gmac_mdio {
0147 phy1: ethernet-phy@1 {
0148 reg = <1>;
0149 };
0150 };
0151
0152 &mmc0 {
0153 vmmc-supply = <®_vcc3v3>;
0154 bus-width = <4>;
0155 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0156 status = "okay";
0157 };
0158
0159 &ohci0 {
0160 status = "okay";
0161 };
0162
0163 &ohci1 {
0164 status = "okay";
0165 };
0166
0167 &otg_sram {
0168 status = "okay";
0169 };
0170
0171 ®_ahci_5v {
0172 gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
0173 status = "okay";
0174 };
0175
0176 #include "axp209.dtsi"
0177
0178 ®_dcdc2 {
0179 regulator-always-on;
0180 regulator-min-microvolt = <1000000>;
0181 regulator-max-microvolt = <1400000>;
0182 regulator-name = "vdd-cpu";
0183 };
0184
0185 ®_dcdc3 {
0186 regulator-always-on;
0187 regulator-min-microvolt = <1000000>;
0188 regulator-max-microvolt = <1400000>;
0189 regulator-name = "vdd-int-pll";
0190 };
0191
0192 ®_ldo1 {
0193 regulator-name = "vdd-rtc";
0194 };
0195
0196 ®_ldo2 {
0197 regulator-always-on;
0198 regulator-min-microvolt = <3000000>;
0199 regulator-max-microvolt = <3000000>;
0200 regulator-name = "avcc";
0201 };
0202
0203 /* A single regulator (U24) powers both USB host ports. */
0204 ®_usb1_vbus {
0205 gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
0206 status = "okay";
0207 };
0208
0209 &uart0 {
0210 pinctrl-names = "default";
0211 pinctrl-0 = <&uart0_pb_pins>;
0212 status = "okay";
0213 };
0214
0215 &usb_otg {
0216 dr_mode = "otg";
0217 status = "okay";
0218 };
0219
0220 &usbphy {
0221 usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0222 usb1_vbus-supply = <®_usb1_vbus>;
0223 usb2_vbus-supply = <®_usb1_vbus>;
0224 status = "okay";
0225 };