0001 /*
0002 * Copyright 2015 Marcus Cooper <codekipper@gmail.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 "sun6i-a31.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046
0047 #include <dt-bindings/gpio/gpio.h>
0048
0049 / {
0050 model = "Mele I7 Quad top set box";
0051 compatible = "mele,i7", "allwinner,sun6i-a31";
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 {
0076 label = "i7:blue:usr";
0077 gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>;
0078 };
0079 };
0080
0081 sound {
0082 compatible = "simple-audio-card";
0083 simple-audio-card,name = "On-board SPDIF";
0084 simple-audio-card,cpu {
0085 sound-dai = <&spdif>;
0086 };
0087
0088 simple-audio-card,codec {
0089 sound-dai = <&spdif_out>;
0090 };
0091 };
0092
0093 spdif_out: spdif-out {
0094 #sound-dai-cells = <0>;
0095 compatible = "linux,spdif-dit";
0096 };
0097 };
0098
0099 &codec {
0100 allwinner,audio-routing =
0101 "Headphone", "HP";
0102 status = "okay";
0103 };
0104
0105 &de {
0106 status = "okay";
0107 };
0108
0109 &ehci0 {
0110 status = "okay";
0111 };
0112
0113 &ehci1 {
0114 status = "okay";
0115 };
0116
0117 &gmac {
0118 pinctrl-names = "default";
0119 pinctrl-0 = <&gmac_mii_pins>;
0120 phy-handle = <&phy1>;
0121 phy-mode = "mii";
0122 status = "okay";
0123 };
0124
0125 &hdmi {
0126 status = "okay";
0127 };
0128
0129 &hdmi_out {
0130 hdmi_out_con: endpoint {
0131 remote-endpoint = <&hdmi_con_in>;
0132 };
0133 };
0134
0135 &ir {
0136 pinctrl-names = "default";
0137 pinctrl-0 = <&s_ir_rx_pin>;
0138 status = "okay";
0139 };
0140
0141 &mdio {
0142 phy1: ethernet-phy@1 {
0143 reg = <1>;
0144 };
0145 };
0146
0147 &mmc0 {
0148 vmmc-supply = <®_vcc3v3>;
0149 bus-width = <4>;
0150 cd-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
0151 status = "okay";
0152 };
0153
0154 ®_usb1_vbus {
0155 gpio = <&pio 2 27 GPIO_ACTIVE_HIGH>;
0156 status = "okay";
0157 };
0158
0159 &spdif {
0160 pinctrl-names = "default";
0161 pinctrl-0 = <&spdif_tx_pin>;
0162 status = "okay";
0163 };
0164
0165 &tcon0 {
0166 status = "okay";
0167 };
0168
0169 &uart0 {
0170 pinctrl-names = "default";
0171 pinctrl-0 = <&uart0_ph_pins>;
0172 status = "okay";
0173 };
0174
0175 &usbphy {
0176 usb1_vbus-supply = <®_usb1_vbus>;
0177 status = "okay";
0178 };