0001 /*
0002 * Copyright 2012 Maxime Ripard <maxime.ripard@free-electrons.com>
0003 * Copyright 2013 Hans de Goede <hdegoede@redhat.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 "sun5i-a13.dtsi"
0046 #include "sunxi-common-regulators.dtsi"
0047
0048 #include <dt-bindings/gpio/gpio.h>
0049
0050 / {
0051 model = "Olimex A13-Olinuxino Micro";
0052 compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13";
0053
0054 aliases {
0055 serial0 = &uart1;
0056 };
0057
0058 chosen {
0059 stdout-path = "serial0:115200n8";
0060 };
0061
0062 leds {
0063 compatible = "gpio-leds";
0064 pinctrl-names = "default";
0065 pinctrl-0 = <&led_pins_olinuxinom>;
0066
0067 led {
0068 label = "a13-olinuxino-micro:green:power";
0069 gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
0070 default-state = "on";
0071 };
0072 };
0073 };
0074
0075 &ehci0 {
0076 status = "okay";
0077 };
0078
0079 &i2c0 {
0080 status = "okay";
0081 };
0082
0083 &i2c1 {
0084 status = "okay";
0085 };
0086
0087 &i2c2 {
0088 status = "okay";
0089 };
0090
0091 &mmc0 {
0092 vmmc-supply = <®_vcc3v3>;
0093 bus-width = <4>;
0094 cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
0095 status = "okay";
0096 };
0097
0098 &ohci0 {
0099 status = "okay";
0100 };
0101
0102 &otg_sram {
0103 status = "okay";
0104 };
0105
0106 &pio {
0107 led_pins_olinuxinom: led-pin {
0108 pins = "PG9";
0109 function = "gpio_out";
0110 drive-strength = <20>;
0111 };
0112 };
0113
0114 ®_usb0_vbus {
0115 gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>;
0116 status = "okay";
0117 };
0118
0119 ®_usb1_vbus {
0120 gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
0121 status = "okay";
0122 };
0123
0124 &uart1 {
0125 pinctrl-names = "default";
0126 pinctrl-0 = <&uart1_pg_pins>;
0127 status = "okay";
0128 };
0129
0130 &usb_otg {
0131 dr_mode = "otg";
0132 status = "okay";
0133 };
0134
0135 &usbphy {
0136 usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */
0137 usb0_vbus_det-gpios = <&pio 6 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PG1 */
0138 usb0_vbus-supply = <®_usb0_vbus>;
0139 usb1_vbus-supply = <®_usb1_vbus>;
0140 status = "okay";
0141 };