0001 /*
0002 * Copyright 2015 Aleksei Mamlin
0003 * Aleksei Mamlin <mamlinav@gmail.com>
0004 *
0005 * This file is dual-licensed: you can use it either under the terms
0006 * of the GPL or the X11 license, at your option. Note that this dual
0007 * licensing only applies to this file, and not this project as a
0008 * whole.
0009 *
0010 * a) This file is free software; you can redistribute it and/or
0011 * modify it under the terms of the GNU General Public License as
0012 * published by the Free Software Foundation; either version 2 of the
0013 * License, or (at your option) any later version.
0014 *
0015 * This file is distributed in the hope that it will be useful,
0016 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0018 * GNU General Public License for more details.
0019 *
0020 * Or, alternatively,
0021 *
0022 * b) Permission is hereby granted, free of charge, to any person
0023 * obtaining a copy of this software and associated documentation
0024 * files (the "Software"), to deal in the Software without
0025 * restriction, including without limitation the rights to use,
0026 * copy, modify, merge, publish, distribute, sublicense, and/or
0027 * sell copies of the Software, and to permit persons to whom the
0028 * Software is furnished to do so, subject to the following
0029 * conditions:
0030 *
0031 * The above copyright notice and this permission notice shall be
0032 * included in all copies or substantial portions of the Software.
0033 *
0034 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0035 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0036 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0037 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0038 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0039 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0040 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0041 * OTHER DEALINGS IN THE SOFTWARE.
0042 */
0043
0044 /dts-v1/;
0045 #include "sun4i-a10.dtsi"
0046 #include "sunxi-common-regulators.dtsi"
0047
0048 #include <dt-bindings/gpio/gpio.h>
0049
0050 / {
0051 model = "HAOYU Electronics Marsboard A10";
0052 compatible = "haoyu,a10-marsboard", "allwinner,sun4i-a10";
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 = "marsboard:red1:usr";
0067 gpios = <&pio 1 5 GPIO_ACTIVE_HIGH>;
0068 };
0069
0070 led-1 {
0071 label = "marsboard:red2:usr";
0072 gpios = <&pio 1 6 GPIO_ACTIVE_HIGH>;
0073 };
0074
0075 led-2 {
0076 label = "marsboard:red3:usr";
0077 gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>;
0078 };
0079
0080 led-3 {
0081 label = "marsboard:red4:usr";
0082 gpios = <&pio 1 8 GPIO_ACTIVE_HIGH>;
0083 };
0084 };
0085 };
0086
0087 &ahci {
0088 status = "okay";
0089 };
0090
0091 &codec {
0092 status = "okay";
0093 };
0094
0095 &ehci0 {
0096 status = "okay";
0097 };
0098
0099 &ehci1 {
0100 status = "okay";
0101 };
0102
0103 &emac_sram {
0104 status = "okay";
0105 };
0106
0107 &emac {
0108 phy-handle = <&phy1>;
0109 status = "okay";
0110 };
0111
0112 &i2c0 {
0113 status = "okay";
0114 };
0115
0116 &i2c1 {
0117 status = "okay";
0118 };
0119
0120 &i2c2 {
0121 status = "okay";
0122 };
0123
0124 &mdio {
0125 status = "okay";
0126
0127 phy1: ethernet-phy@1 {
0128 reg = <1>;
0129 };
0130 };
0131
0132 &mmc0 {
0133 vmmc-supply = <®_vcc3v3>;
0134 bus-width = <4>;
0135 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0136 status = "okay";
0137 };
0138
0139 &ohci0 {
0140 status = "okay";
0141 };
0142
0143 &ohci1 {
0144 status = "okay";
0145 };
0146
0147 &otg_sram {
0148 status = "okay";
0149 };
0150
0151 ®_usb1_vbus {
0152 status = "okay";
0153 };
0154
0155 ®_usb2_vbus {
0156 status = "okay";
0157 };
0158
0159 &spi0 {
0160 pinctrl-names = "default";
0161 pinctrl-0 = <&spi0_pi_pins>,
0162 <&spi0_cs0_pi_pin>;
0163 status = "okay";
0164 };
0165
0166 &uart0 {
0167 pinctrl-names = "default";
0168 pinctrl-0 = <&uart0_pb_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 | GPIO_PULL_UP)>; /* PH4 */
0179 usb1_vbus-supply = <®_usb1_vbus>;
0180 usb2_vbus-supply = <®_usb2_vbus>;
0181 status = "okay";
0182 };