0001 /*
0002 * Copyright 2012 Maxime Ripard
0003 *
0004 * Maxime Ripard <maxime.ripard@free-electrons.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 "sun5i-a13.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/input/input.h>
0051
0052 / {
0053 model = "Olimex A13-Olinuxino";
0054 compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13";
0055
0056 aliases {
0057 serial0 = &uart1;
0058 };
0059
0060 chosen {
0061 stdout-path = "serial0:115200n8";
0062 };
0063
0064 leds {
0065 compatible = "gpio-leds";
0066 pinctrl-names = "default";
0067 pinctrl-0 = <&led_pins_olinuxino>;
0068
0069 led {
0070 gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
0071 default-state = "on";
0072 };
0073 };
0074
0075 bridge {
0076 compatible = "dumb-vga-dac";
0077
0078 ports {
0079 #address-cells = <1>;
0080 #size-cells = <0>;
0081
0082 port@0 {
0083 reg = <0>;
0084
0085 vga_bridge_in: endpoint {
0086 remote-endpoint = <&tcon0_out_vga>;
0087 };
0088 };
0089
0090 port@1 {
0091 reg = <1>;
0092
0093 vga_bridge_out: endpoint {
0094 remote-endpoint = <&vga_con_in>;
0095 };
0096 };
0097 };
0098 };
0099
0100 vga {
0101 compatible = "vga-connector";
0102
0103 port {
0104 vga_con_in: endpoint {
0105 remote-endpoint = <&vga_bridge_out>;
0106 };
0107 };
0108 };
0109 };
0110
0111 &be0 {
0112 status = "okay";
0113 };
0114
0115 &codec {
0116 status = "okay";
0117 };
0118
0119 &ehci0 {
0120 status = "okay";
0121 };
0122
0123 &i2c0 {
0124 status = "okay";
0125
0126 axp209: pmic@34 {
0127 compatible = "x-powers,axp209";
0128 reg = <0x34>;
0129 interrupts = <0>;
0130
0131 interrupt-controller;
0132 #interrupt-cells = <1>;
0133 };
0134 };
0135
0136 &i2c1 {
0137 status = "okay";
0138 };
0139
0140 &i2c2 {
0141 status = "okay";
0142 };
0143
0144 &lradc {
0145 vref-supply = <®_vcc3v0>;
0146 status = "okay";
0147
0148 button-191 {
0149 label = "Volume Up";
0150 linux,code = <KEY_VOLUMEUP>;
0151 channel = <0>;
0152 voltage = <191274>;
0153 };
0154
0155 button-392 {
0156 label = "Volume Down";
0157 linux,code = <KEY_VOLUMEDOWN>;
0158 channel = <0>;
0159 voltage = <392644>;
0160 };
0161
0162 button-601 {
0163 label = "Menu";
0164 linux,code = <KEY_MENU>;
0165 channel = <0>;
0166 voltage = <601151>;
0167 };
0168
0169 button-795 {
0170 label = "Enter";
0171 linux,code = <KEY_ENTER>;
0172 channel = <0>;
0173 voltage = <795090>;
0174 };
0175
0176 button-987 {
0177 label = "Home";
0178 linux,code = <KEY_HOMEPAGE>;
0179 channel = <0>;
0180 voltage = <987387>;
0181 };
0182 };
0183
0184 &mmc0 {
0185 vmmc-supply = <®_vcc3v3>;
0186 bus-width = <4>;
0187 cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
0188 status = "okay";
0189 };
0190
0191 &ohci0 {
0192 status = "okay";
0193 };
0194
0195 &otg_sram {
0196 status = "okay";
0197 };
0198
0199 &pio {
0200 led_pins_olinuxino: led-pin {
0201 pins = "PG9";
0202 function = "gpio_out";
0203 drive-strength = <20>;
0204 };
0205 };
0206
0207 ®_usb0_vbus {
0208 status = "okay";
0209 gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
0210 };
0211
0212 ®_usb1_vbus {
0213 gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
0214 status = "okay";
0215 };
0216
0217 &tcon0 {
0218 pinctrl-names = "default";
0219 pinctrl-0 = <&lcd_rgb666_pins>;
0220 status = "okay";
0221 };
0222
0223 &tcon0_out {
0224 tcon0_out_vga: endpoint@0 {
0225 reg = <0>;
0226 remote-endpoint = <&vga_bridge_in>;
0227 };
0228 };
0229
0230 &uart1 {
0231 pinctrl-names = "default";
0232 pinctrl-0 = <&uart1_pg_pins>;
0233 status = "okay";
0234 };
0235
0236 &usb_otg {
0237 dr_mode = "otg";
0238 status = "okay";
0239 };
0240
0241 &usbphy {
0242 usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */
0243 usb0_vbus_det-gpios = <&pio 6 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PG1 */
0244 usb0_vbus-supply = <®_usb0_vbus>;
0245 usb1_vbus-supply = <®_usb1_vbus>;
0246 status = "okay";
0247 };