0001 /*
0002 * Copyright 2012 Stefan Roese
0003 * Stefan Roese <sr@denx.de>
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 = "Cubietech Cubieboard";
0052 compatible = "cubietech,a10-cubieboard", "allwinner,sun4i-a10";
0053
0054 aliases {
0055 serial0 = &uart0;
0056 };
0057
0058 chosen {
0059 stdout-path = "serial0:115200n8";
0060 };
0061
0062 hdmi-connector {
0063 compatible = "hdmi-connector";
0064 type = "a";
0065
0066 port {
0067 hdmi_con_in: endpoint {
0068 remote-endpoint = <&hdmi_out_con>;
0069 };
0070 };
0071 };
0072
0073 leds {
0074 compatible = "gpio-leds";
0075 pinctrl-names = "default";
0076 pinctrl-0 = <&led_pins_cubieboard>;
0077
0078 led-0 {
0079 label = "cubieboard:blue:usr";
0080 gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */
0081 };
0082
0083 led-1 {
0084 label = "cubieboard:green:usr";
0085 gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */
0086 linux,default-trigger = "heartbeat";
0087 };
0088 };
0089 };
0090
0091 &ahci {
0092 target-supply = <®_ahci_5v>;
0093 status = "okay";
0094 };
0095
0096 &codec {
0097 status = "okay";
0098 };
0099
0100 &cpu0 {
0101 cpu-supply = <®_dcdc2>;
0102 };
0103
0104 &de {
0105 status = "okay";
0106 };
0107
0108 &ehci0 {
0109 status = "okay";
0110 };
0111
0112 &ehci1 {
0113 status = "okay";
0114 };
0115
0116 &emac {
0117 phy-handle = <&phy1>;
0118 status = "okay";
0119 };
0120
0121 &emac_sram {
0122 status = "okay";
0123 };
0124
0125 &hdmi {
0126 status = "okay";
0127 };
0128
0129 &hdmi_out {
0130 hdmi_out_con: endpoint {
0131 remote-endpoint = <&hdmi_con_in>;
0132 };
0133 };
0134
0135 &i2c0 {
0136 status = "okay";
0137
0138 axp209: pmic@34 {
0139 reg = <0x34>;
0140 interrupts = <0>;
0141 };
0142 };
0143
0144 &i2c1 {
0145 status = "okay";
0146 };
0147
0148 &ir0 {
0149 pinctrl-names = "default";
0150 pinctrl-0 = <&ir0_rx_pins>;
0151 status = "okay";
0152 };
0153
0154 &mdio {
0155 status = "okay";
0156
0157 phy1: ethernet-phy@1 {
0158 reg = <1>;
0159 };
0160 };
0161
0162 &mmc0 {
0163 vmmc-supply = <®_vcc3v3>;
0164 bus-width = <4>;
0165 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0166 status = "okay";
0167 };
0168
0169 &ohci0 {
0170 status = "okay";
0171 };
0172
0173 &ohci1 {
0174 status = "okay";
0175 };
0176
0177 &otg_sram {
0178 status = "okay";
0179 };
0180
0181 &pio {
0182 led_pins_cubieboard: led-pins {
0183 pins = "PH20", "PH21";
0184 function = "gpio_out";
0185 drive-strength = <20>;
0186 };
0187 };
0188
0189 ®_ahci_5v {
0190 status = "okay";
0191 };
0192
0193 #include "axp209.dtsi"
0194
0195 &ac_power_supply {
0196 status = "okay";
0197 };
0198
0199 ®_dcdc2 {
0200 regulator-always-on;
0201 regulator-min-microvolt = <1000000>;
0202 regulator-max-microvolt = <1450000>;
0203 regulator-name = "vdd-cpu";
0204 };
0205
0206 ®_dcdc3 {
0207 regulator-always-on;
0208 regulator-min-microvolt = <1000000>;
0209 regulator-max-microvolt = <1400000>;
0210 regulator-name = "vdd-int-dll";
0211 };
0212
0213 ®_ldo1 {
0214 regulator-name = "vdd-rtc";
0215 };
0216
0217 ®_ldo2 {
0218 regulator-always-on;
0219 regulator-min-microvolt = <3000000>;
0220 regulator-max-microvolt = <3000000>;
0221 regulator-name = "avcc";
0222 };
0223
0224 ®_usb1_vbus {
0225 status = "okay";
0226 };
0227
0228 ®_usb2_vbus {
0229 status = "okay";
0230 };
0231
0232 &spi0 {
0233 pinctrl-names = "default";
0234 pinctrl-0 = <&spi0_pi_pins>,
0235 <&spi0_cs0_pi_pin>;
0236 status = "okay";
0237 };
0238
0239 &uart0 {
0240 pinctrl-names = "default";
0241 pinctrl-0 = <&uart0_pb_pins>;
0242 status = "okay";
0243 };
0244
0245 &usb_otg {
0246 dr_mode = "otg";
0247 status = "okay";
0248 };
0249
0250 &usbphy {
0251 usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0252 usb1_vbus-supply = <®_usb1_vbus>;
0253 usb2_vbus-supply = <®_usb2_vbus>;
0254 status = "okay";
0255 };