0001 /*
0002 * Copyright 2015 Marcus Cooper
0003 *
0004 * Marcus Cooper <codekipper@gmail.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 * You should have received a copy of the GNU General Public
0022 * License along with this file; if not, write to the Free
0023 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
0024 * MA 02110-1301 USA
0025 *
0026 * Or, alternatively,
0027 *
0028 * b) Permission is hereby granted, free of charge, to any person
0029 * obtaining a copy of this software and associated documentation
0030 * files (the "Software"), to deal in the Software without
0031 * restriction, including without limitation the rights to use,
0032 * copy, modify, merge, publish, distribute, sublicense, and/or
0033 * sell copies of the Software, and to permit persons to whom the
0034 * Software is furnished to do so, subject to the following
0035 * conditions:
0036 *
0037 * The above copyright notice and this permission notice shall be
0038 * included in all copies or substantial portions of the Software.
0039 *
0040 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0041 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0042 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0043 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0044 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0045 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0046 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0047 * OTHER DEALINGS IN THE SOFTWARE.
0048 */
0049
0050 /dts-v1/;
0051 #include "sun7i-a20.dtsi"
0052 #include "sunxi-common-regulators.dtsi"
0053
0054 #include <dt-bindings/gpio/gpio.h>
0055 #include <dt-bindings/interrupt-controller/irq.h>
0056
0057 / {
0058 model = "mk808c";
0059 compatible = "allwinner,mk808c", "allwinner,sun7i-a20";
0060
0061 aliases {
0062 serial0 = &uart0;
0063 serial1 = &uart2;
0064 };
0065
0066 chosen {
0067 stdout-path = "serial0:115200n8";
0068 };
0069
0070 hdmi-connector {
0071 compatible = "hdmi-connector";
0072 type = "a";
0073
0074 port {
0075 hdmi_con_in: endpoint {
0076 remote-endpoint = <&hdmi_out_con>;
0077 };
0078 };
0079 };
0080 };
0081
0082 &codec {
0083 status = "okay";
0084 };
0085
0086 &de {
0087 status = "okay";
0088 };
0089
0090 &ehci0 {
0091 status = "okay";
0092 };
0093
0094 &ehci1 {
0095 status = "okay";
0096 };
0097
0098 &hdmi {
0099 status = "okay";
0100 };
0101
0102 &hdmi_out {
0103 hdmi_out_con: endpoint {
0104 remote-endpoint = <&hdmi_con_in>;
0105 };
0106 };
0107
0108 &i2c0 {
0109 status = "okay";
0110
0111 axp209: pmic@34 {
0112 compatible = "x-powers,axp209";
0113 reg = <0x34>;
0114 interrupt-parent = <&nmi_intc>;
0115 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0116 interrupt-controller;
0117 #interrupt-cells = <1>;
0118 };
0119 };
0120
0121 &i2c1 {
0122 status = "okay";
0123 };
0124
0125 &i2c2 {
0126 status = "okay";
0127 };
0128
0129 &mmc0 {
0130 vmmc-supply = <®_vcc3v0>;
0131 bus-width = <4>;
0132 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0133 status = "okay";
0134 };
0135
0136 &ohci0 {
0137 status = "okay";
0138 };
0139
0140 &ohci1 {
0141 status = "okay";
0142 };
0143
0144 &otg_sram {
0145 status = "okay";
0146 };
0147
0148 ®_usb0_vbus {
0149 status = "okay";
0150 };
0151
0152 ®_usb1_vbus {
0153 status = "okay";
0154 };
0155
0156 ®_usb2_vbus {
0157 status = "okay";
0158 };
0159
0160 &uart0 {
0161 pinctrl-names = "default";
0162 pinctrl-0 = <&uart0_pb_pins>;
0163 status = "okay";
0164 };
0165
0166 &uart2 {
0167 pinctrl-names = "default";
0168 pinctrl-0 = <&uart2_pi_pins>, <&uart2_cts_rts_pi_pins>;
0169 status = "okay";
0170 };
0171
0172 &usb_otg {
0173 dr_mode = "otg";
0174 status = "okay";
0175 };
0176
0177 &usbphy {
0178 usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
0179 usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
0180 usb0_vbus-supply = <®_usb0_vbus>;
0181 usb1_vbus-supply = <®_usb1_vbus>;
0182 usb2_vbus-supply = <®_usb2_vbus>;
0183 status = "okay";
0184 };