0001 /*
0002 * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
0003 *
0004 * This file is dual-licensed: you can use it either under the terms
0005 * of the GPL or the X11 license, at your option. Note that this dual
0006 * licensing only applies to this file, and not this project as a
0007 * whole.
0008 *
0009 * a) This file is free software; you can redistribute it and/or
0010 * modify it under the terms of the GNU General Public License as
0011 * published by the Free Software Foundation; either version 2 of the
0012 * License, or (at your option) any later version.
0013 *
0014 * This file is distributed in the hope that it will be useful,
0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0017 * GNU General Public License for more details.
0018 *
0019 * Or, alternatively,
0020 *
0021 * b) Permission is hereby granted, free of charge, to any person
0022 * obtaining a copy of this software and associated documentation
0023 * files (the "Software"), to deal in the Software without
0024 * restriction, including without limitation the rights to use,
0025 * copy, modify, merge, publish, distribute, sublicense, and/or
0026 * sell copies of the Software, and to permit persons to whom the
0027 * Software is furnished to do so, subject to the following
0028 * conditions:
0029 *
0030 * The above copyright notice and this permission notice shall be
0031 * included in all copies or substantial portions of the Software.
0032 *
0033 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0034 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0035 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0036 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0037 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0038 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0039 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0040 * OTHER DEALINGS IN THE SOFTWARE.
0041 */
0042
0043 /dts-v1/;
0044 #include "sun4i-a10.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046
0047 #include <dt-bindings/gpio/gpio.h>
0048
0049 / {
0050 model = "Olimex A10-OLinuXino-LIME";
0051 compatible = "olimex,a10-olinuxino-lime", "allwinner,sun4i-a10";
0052
0053 aliases {
0054 serial0 = &uart0;
0055 };
0056
0057 chosen {
0058 stdout-path = "serial0:115200n8";
0059 };
0060
0061 hdmi-connector {
0062 compatible = "hdmi-connector";
0063 type = "a";
0064
0065 port {
0066 hdmi_con_in: endpoint {
0067 remote-endpoint = <&hdmi_out_con>;
0068 };
0069 };
0070 };
0071
0072 leds {
0073 compatible = "gpio-leds";
0074 pinctrl-names = "default";
0075 pinctrl-0 = <&led_pins_olinuxinolime>;
0076
0077 led {
0078 label = "a10-olinuxino-lime:green:usr";
0079 gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
0080 default-state = "on";
0081 };
0082 };
0083 };
0084
0085 &ahci {
0086 target-supply = <®_ahci_5v>;
0087 status = "okay";
0088 };
0089
0090 &cpu0 {
0091 /*
0092 * The A10-Lime is known to be unstable when running at 1008 MHz
0093 */
0094 operating-points =
0095 /* kHz uV */
0096 <912000 1350000>,
0097 <864000 1300000>,
0098 <624000 1250000>;
0099 };
0100
0101 &de {
0102 status = "okay";
0103 };
0104
0105 &ehci0 {
0106 status = "okay";
0107 };
0108
0109 &ehci1 {
0110 status = "okay";
0111 };
0112
0113 &emac {
0114 phy-handle = <&phy1>;
0115 status = "okay";
0116 };
0117
0118 &emac_sram {
0119 status = "okay";
0120 };
0121
0122 &hdmi {
0123 status = "okay";
0124 };
0125
0126 &hdmi_out {
0127 hdmi_out_con: endpoint {
0128 remote-endpoint = <&hdmi_con_in>;
0129 };
0130 };
0131
0132 &i2c0 {
0133 status = "okay";
0134
0135 axp209: pmic@34 {
0136 compatible = "x-powers,axp209";
0137 reg = <0x34>;
0138 interrupts = <0>;
0139
0140 interrupt-controller;
0141 #interrupt-cells = <1>;
0142 };
0143 };
0144
0145 &i2c1 {
0146 status = "okay";
0147
0148 eeprom: eeprom@50 {
0149 compatible = "atmel,24c16";
0150 reg = <0x50>;
0151 pagesize = <16>;
0152 };
0153 };
0154
0155 &mdio {
0156 status = "okay";
0157
0158 phy1: ethernet-phy@1 {
0159 reg = <1>;
0160 };
0161 };
0162
0163 &mmc0 {
0164 vmmc-supply = <®_vcc3v3>;
0165 bus-width = <4>;
0166 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0167 status = "okay";
0168 };
0169
0170 &ohci0 {
0171 status = "okay";
0172 };
0173
0174 &ohci1 {
0175 status = "okay";
0176 };
0177
0178 &otg_sram {
0179 status = "okay";
0180 };
0181
0182 &pio {
0183 led_pins_olinuxinolime: led-pin {
0184 pins = "PH2";
0185 function = "gpio_out";
0186 drive-strength = <20>;
0187 };
0188 };
0189
0190 ®_ahci_5v {
0191 gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
0192 status = "okay";
0193 };
0194
0195 ®_usb0_vbus {
0196 status = "okay";
0197 };
0198
0199 ®_usb1_vbus {
0200 status = "okay";
0201 };
0202
0203 ®_usb2_vbus {
0204 status = "okay";
0205 };
0206
0207 &uart0 {
0208 pinctrl-names = "default";
0209 pinctrl-0 = <&uart0_pb_pins>;
0210 status = "okay";
0211 };
0212
0213 &usb_otg {
0214 dr_mode = "otg";
0215 status = "okay";
0216 };
0217
0218 &usbphy {
0219 usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0220 usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH5 */
0221 usb0_vbus-supply = <®_usb0_vbus>;
0222 usb1_vbus-supply = <®_usb1_vbus>;
0223 usb2_vbus-supply = <®_usb2_vbus>;
0224 status = "okay";
0225 };