0001 /*
0002 * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
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
0047 #include <dt-bindings/gpio/gpio.h>
0048 #include <dt-bindings/interrupt-controller/irq.h>
0049
0050 / {
0051 model = "I12 / Q5 / QT840A A20 tvbox";
0052 compatible = "allwinner,i12-tvbox", "allwinner,sun7i-a20";
0053
0054 aliases {
0055 serial0 = &uart0;
0056 };
0057
0058 chosen {
0059 stdout-path = "serial0:115200n8";
0060 };
0061
0062 leds {
0063 compatible = "gpio-leds";
0064
0065 led-0 {
0066 label = "i12_tvbox:red:usr";
0067 gpios = <&pio 7 9 GPIO_ACTIVE_LOW>;
0068 };
0069
0070 led-1 {
0071 label = "i12_tvbox:blue:usr";
0072 gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
0073 };
0074 };
0075
0076 reg_vmmc3: vmmc3 {
0077 compatible = "regulator-fixed";
0078 regulator-name = "vmmc3";
0079 regulator-min-microvolt = <3300000>;
0080 regulator-max-microvolt = <3300000>;
0081 enable-active-high;
0082 gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
0083 };
0084
0085 reg_vmmc3_io: vmmc3-io {
0086 compatible = "regulator-fixed";
0087 regulator-name = "vmmc3-io";
0088 regulator-min-microvolt = <3300000>;
0089 regulator-max-microvolt = <3300000>;
0090 /* This controls VCC-PI, must be always on! */
0091 regulator-always-on;
0092 enable-active-high;
0093 gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
0094 };
0095
0096 reg_gmac_3v3: gmac-3v3 {
0097 compatible = "regulator-fixed";
0098 regulator-name = "gmac-3v3";
0099 regulator-min-microvolt = <3300000>;
0100 regulator-max-microvolt = <3300000>;
0101 startup-delay-us = <50000>;
0102 enable-active-high;
0103 gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>;
0104 };
0105 };
0106
0107 &ehci0 {
0108 status = "okay";
0109 };
0110
0111 &ehci1 {
0112 status = "okay";
0113 };
0114
0115 &gmac {
0116 pinctrl-names = "default";
0117 pinctrl-0 = <&gmac_mii_pins>;
0118 phy-handle = <&phy1>;
0119 phy-mode = "mii";
0120 phy-supply = <®_gmac_3v3>;
0121 status = "okay";
0122 };
0123
0124 &i2c0 {
0125 status = "okay";
0126
0127 axp209: pmic@34 {
0128 compatible = "x-powers,axp209";
0129 reg = <0x34>;
0130 interrupt-parent = <&nmi_intc>;
0131 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0132
0133 interrupt-controller;
0134 #interrupt-cells = <1>;
0135 };
0136 };
0137
0138 &ir0 {
0139 pinctrl-names = "default";
0140 pinctrl-0 = <&ir0_rx_pin>;
0141 status = "okay";
0142 };
0143
0144 &gmac_mdio {
0145 phy1: ethernet-phy@1 {
0146 reg = <1>;
0147 };
0148 };
0149
0150 &mmc0 {
0151 vmmc-supply = <®_vcc3v3>;
0152 bus-width = <4>;
0153 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0154 status = "okay";
0155 };
0156
0157 &mmc3 {
0158 vmmc-supply = <®_vmmc3>;
0159 bus-width = <4>;
0160 non-removable;
0161 status = "okay";
0162
0163 brcmf: wifi@1 {
0164 reg = <1>;
0165 compatible = "brcm,bcm4329-fmac";
0166 interrupt-parent = <&pio>;
0167 interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
0168 interrupt-names = "host-wake";
0169 };
0170 };
0171
0172 &ohci0 {
0173 status = "okay";
0174 };
0175
0176 &ohci1 {
0177 status = "okay";
0178 };
0179
0180 ®_usb1_vbus {
0181 status = "okay";
0182 };
0183
0184 ®_usb2_vbus {
0185 status = "okay";
0186 };
0187
0188 &uart0 {
0189 pinctrl-names = "default";
0190 pinctrl-0 = <&uart0_pb_pins>;
0191 status = "okay";
0192 };
0193
0194 &usbphy {
0195 usb1_vbus-supply = <®_usb1_vbus>;
0196 usb2_vbus-supply = <®_usb2_vbus>;
0197 status = "okay";
0198 };