0001 /*
0002 * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
0003 *
0004 * Hans de Goede <hdegoede@redhat.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 "sun7i-a20.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/interrupt-controller/irq.h>
0051
0052 / {
0053 model = "Mele M3";
0054 compatible = "mele,m3", "allwinner,sun7i-a20";
0055
0056 aliases {
0057 serial0 = &uart0;
0058 };
0059
0060 chosen {
0061 stdout-path = "serial0:115200n8";
0062 };
0063
0064 leds {
0065 compatible = "gpio-leds";
0066
0067 led {
0068 label = "m3:blue:usr";
0069 gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
0070 };
0071 };
0072 };
0073
0074 &ehci0 {
0075 status = "okay";
0076 };
0077
0078 &ehci1 {
0079 status = "okay";
0080 };
0081
0082 &gmac {
0083 pinctrl-names = "default";
0084 pinctrl-0 = <&gmac_mii_pins>;
0085 phy-handle = <&phy1>;
0086 phy-mode = "mii";
0087 status = "okay";
0088 };
0089
0090 &i2c0 {
0091 status = "okay";
0092
0093 axp209: pmic@34 {
0094 compatible = "x-powers,axp209";
0095 reg = <0x34>;
0096 interrupt-parent = <&nmi_intc>;
0097 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0098
0099 interrupt-controller;
0100 #interrupt-cells = <1>;
0101 };
0102 };
0103
0104 &ir0 {
0105 pinctrl-names = "default";
0106 pinctrl-0 = <&ir0_rx_pin>;
0107 status = "okay";
0108 };
0109
0110 &gmac_mdio {
0111 phy1: ethernet-phy@1 {
0112 reg = <1>;
0113 };
0114 };
0115
0116 &mmc0 {
0117 vmmc-supply = <®_vcc3v3>;
0118 bus-width = <4>;
0119 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0120 status = "okay";
0121 };
0122
0123 &mmc2 {
0124 vmmc-supply = <®_vcc3v3>;
0125 bus-width = <4>;
0126 non-removable;
0127 status = "okay";
0128 };
0129
0130 &ohci0 {
0131 status = "okay";
0132 };
0133
0134 &ohci1 {
0135 status = "okay";
0136 };
0137
0138 ®_usb1_vbus {
0139 status = "okay";
0140 };
0141
0142 ®_usb2_vbus {
0143 status = "okay";
0144 };
0145
0146 &uart0 {
0147 pinctrl-names = "default";
0148 pinctrl-0 = <&uart0_pb_pins>;
0149 status = "okay";
0150 };
0151
0152 &usbphy {
0153 usb1_vbus-supply = <®_usb1_vbus>;
0154 usb2_vbus-supply = <®_usb2_vbus>;
0155 status = "okay";
0156 };