0001 /*
0002 * Copyright 2014 Maxime Ripard
0003 *
0004 * Maxime Ripard <maxime.ripard@free-electrons.com>
0005 *
0006 * This file is dual-licensed: you can use it either under the terms
0007 * of the GPL or the X11 license, at your option. Note that this dual
0008 * licensing only applies to this file, and not this project as a
0009 * whole.
0010 *
0011 * a) This file is free software; you can redistribute it and/or
0012 * modify it under the terms of the GNU General Public License as
0013 * published by the Free Software Foundation; either version 2 of the
0014 * License, or (at your option) any later version.
0015 *
0016 * This file is distributed in the hope that it will be useful,
0017 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0019 * GNU General Public License for more details.
0020 *
0021 * Or, alternatively,
0022 *
0023 * b) Permission is hereby granted, free of charge, to any person
0024 * obtaining a copy of this software and associated documentation
0025 * files (the "Software"), to deal in the Software without
0026 * restriction, including without limitation the rights to use,
0027 * copy, modify, merge, publish, distribute, sublicense, and/or
0028 * sell copies of the Software, and to permit persons to whom the
0029 * Software is furnished to do so, subject to the following
0030 * conditions:
0031 *
0032 * The above copyright notice and this permission notice shall be
0033 * included in all copies or substantial portions of the Software.
0034 *
0035 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0036 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0037 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0038 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0039 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0040 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0041 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0042 * OTHER DEALINGS IN THE SOFTWARE.
0043 */
0044
0045 /dts-v1/;
0046 #include "sun6i-a31.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048
0049 #include <dt-bindings/gpio/gpio.h>
0050
0051 / {
0052 model = "Merrii A31 Hummingbird";
0053 compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
0054
0055 aliases {
0056 rtc0 = &pcf8563;
0057 rtc1 = &rtc;
0058 serial0 = &uart0;
0059 };
0060
0061 chosen {
0062 stdout-path = "serial0:115200n8";
0063 };
0064
0065 hdmi-connector {
0066 compatible = "hdmi-connector";
0067 type = "a";
0068
0069 port {
0070 hdmi_con_in: endpoint {
0071 remote-endpoint = <&hdmi_out_con>;
0072 };
0073 };
0074 };
0075
0076 vga-connector {
0077 compatible = "vga-connector";
0078
0079 port {
0080 vga_con_in: endpoint {
0081 remote-endpoint = <&vga_dac_out>;
0082 };
0083 };
0084 };
0085
0086 vga-dac {
0087 compatible = "dumb-vga-dac";
0088 vdd-supply = <®_vga_3v3>;
0089
0090 ports {
0091 #address-cells = <1>;
0092 #size-cells = <0>;
0093
0094 port@0 {
0095 reg = <0>;
0096
0097 vga_dac_in: endpoint {
0098 remote-endpoint = <&tcon0_out_vga>;
0099 };
0100 };
0101
0102 port@1 {
0103 reg = <1>;
0104
0105 vga_dac_out: endpoint {
0106 remote-endpoint = <&vga_con_in>;
0107 };
0108 };
0109 };
0110 };
0111
0112 reg_vga_3v3: vga_3v3_regulator {
0113 compatible = "regulator-fixed";
0114 regulator-name = "vga-3v3";
0115 regulator-min-microvolt = <3300000>;
0116 regulator-max-microvolt = <3300000>;
0117 regulator-boot-on;
0118 enable-active-high;
0119 gpio = <&pio 7 25 GPIO_ACTIVE_HIGH>; /* PH25 */
0120 };
0121
0122 wifi_pwrseq: wifi_pwrseq {
0123 compatible = "mmc-pwrseq-simple";
0124 reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */
0125 };
0126 };
0127
0128 &codec {
0129 allwinner,audio-routing =
0130 "Headphone", "HP",
0131 "Speaker", "LINEOUT",
0132 "LINEIN", "Line In",
0133 "MIC1", "Mic",
0134 "MIC2", "Headset Mic",
0135 "Mic", "MBIAS",
0136 "Headset Mic", "HBIAS";
0137 allwinner,pa-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
0138 status = "okay";
0139 };
0140
0141 &cpu0 {
0142 cpu-supply = <®_dcdc3>;
0143 };
0144
0145 &de {
0146 status = "okay";
0147 };
0148
0149 &ehci0 {
0150 status = "okay";
0151 };
0152
0153 &gmac {
0154 pinctrl-names = "default";
0155 pinctrl-0 = <&gmac_rgmii_pins>;
0156 phy-handle = <&phy1>;
0157 phy-mode = "rgmii-id";
0158 status = "okay";
0159 };
0160
0161 &hdmi {
0162 status = "okay";
0163 };
0164
0165 &hdmi_out {
0166 hdmi_out_con: endpoint {
0167 remote-endpoint = <&hdmi_con_in>;
0168 };
0169 };
0170
0171 &i2c0 {
0172 /* pull-ups and devices require AXP221 DLDO3 */
0173 status = "failed";
0174 };
0175
0176 &i2c1 {
0177 status = "okay";
0178 };
0179
0180 &i2c2 {
0181 status = "okay";
0182
0183 pcf8563: rtc@51 {
0184 compatible = "nxp,pcf8563";
0185 reg = <0x51>;
0186 };
0187 };
0188
0189 &ir {
0190 pinctrl-names = "default";
0191 pinctrl-0 = <&s_ir_rx_pin>;
0192 status = "okay";
0193 };
0194
0195 &mdio {
0196 phy1: ethernet-phy@1 {
0197 reg = <1>;
0198 reset-gpios = <&pio 0 21 GPIO_ACTIVE_LOW>;
0199 reset-assert-us = <10000>;
0200 reset-deassert-us = <30000>;
0201 };
0202 };
0203
0204 &mmc0 {
0205 vmmc-supply = <®_dcdc1>;
0206 bus-width = <4>;
0207 cd-gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
0208 status = "okay";
0209 };
0210
0211 &mmc1 {
0212 vmmc-supply = <®_aldo1>;
0213 mmc-pwrseq = <&wifi_pwrseq>;
0214 bus-width = <4>;
0215 non-removable;
0216 status = "okay";
0217 };
0218
0219 &ohci0 {
0220 status = "okay";
0221 };
0222
0223 &p2wi {
0224 status = "okay";
0225
0226 axp22x: pmic@68 {
0227 compatible = "x-powers,axp221";
0228 reg = <0x68>;
0229 interrupt-parent = <&r_intc>;
0230 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0231 x-powers,drive-vbus-en;
0232 };
0233 };
0234
0235 #include "axp22x.dtsi"
0236
0237 &ac_power_supply {
0238 status = "okay";
0239 };
0240
0241 ®_aldo1 {
0242 regulator-min-microvolt = <3300000>;
0243 regulator-max-microvolt = <3300000>;
0244 regulator-name = "vcc-wifi";
0245 };
0246
0247 ®_aldo3 {
0248 regulator-always-on;
0249 regulator-min-microvolt = <2700000>;
0250 regulator-max-microvolt = <3300000>;
0251 regulator-name = "avcc";
0252 };
0253
0254 ®_dc5ldo {
0255 regulator-min-microvolt = <700000>;
0256 regulator-max-microvolt = <1320000>;
0257 regulator-name = "vdd-cpus";
0258 };
0259
0260 ®_dcdc1 {
0261 regulator-always-on;
0262 regulator-min-microvolt = <3000000>;
0263 regulator-max-microvolt = <3000000>;
0264 regulator-name = "vcc-3v0";
0265 };
0266
0267 ®_dcdc2 {
0268 regulator-min-microvolt = <700000>;
0269 regulator-max-microvolt = <1320000>;
0270 regulator-name = "vdd-gpu";
0271 };
0272
0273 ®_dcdc3 {
0274 regulator-always-on;
0275 regulator-min-microvolt = <700000>;
0276 regulator-max-microvolt = <1320000>;
0277 regulator-name = "vdd-cpu";
0278 };
0279
0280 ®_dcdc4 {
0281 regulator-always-on;
0282 regulator-min-microvolt = <700000>;
0283 regulator-max-microvolt = <1320000>;
0284 regulator-name = "vdd-sys-dll";
0285 };
0286
0287 ®_dcdc5 {
0288 regulator-always-on;
0289 regulator-min-microvolt = <1500000>;
0290 regulator-max-microvolt = <1500000>;
0291 regulator-name = "vcc-dram";
0292 };
0293
0294 ®_drivevbus {
0295 regulator-name = "usb0-vbus";
0296 status = "okay";
0297 };
0298
0299 ®_usb1_vbus {
0300 gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
0301 status = "okay";
0302 };
0303
0304 &tcon0 {
0305 pinctrl-names = "default";
0306 pinctrl-0 = <&lcd0_rgb888_pins>;
0307 };
0308
0309 &tcon0_out {
0310 tcon0_out_vga: endpoint@0 {
0311 reg = <0>;
0312 remote-endpoint = <&vga_dac_in>;
0313 };
0314 };
0315
0316 &uart0 {
0317 pinctrl-names = "default";
0318 pinctrl-0 = <&uart0_ph_pins>;
0319 status = "okay";
0320 };
0321
0322 &usb_otg {
0323 dr_mode = "otg";
0324 status = "okay";
0325 };
0326
0327 &usb_power_supply {
0328 status = "okay";
0329 };
0330
0331 &usbphy {
0332 usb0_id_det-gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */
0333 usb0_vbus_det-gpios = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */
0334 usb0_vbus_power-supply = <&usb_power_supply>;
0335 usb0_vbus-supply = <®_drivevbus>;
0336 usb1_vbus-supply = <®_usb1_vbus>;
0337 status = "okay";
0338 };