Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2013 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 "sun7i-a20.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048 
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/interrupt-controller/irq.h>
0051 
0052 / {
0053         model = "Cubietech Cubieboard2";
0054         compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
0055 
0056         aliases {
0057                 serial0 = &uart0;
0058         };
0059 
0060         chosen {
0061                 stdout-path = "serial0:115200n8";
0062         };
0063 
0064         hdmi-connector {
0065                 compatible = "hdmi-connector";
0066                 type = "a";
0067 
0068                 port {
0069                         hdmi_con_in: endpoint {
0070                                 remote-endpoint = <&hdmi_out_con>;
0071                         };
0072                 };
0073         };
0074 
0075         leds {
0076                 compatible = "gpio-leds";
0077 
0078                 led-0 {
0079                         label = "cubieboard2:blue:usr";
0080                         gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
0081                 };
0082 
0083                 led-1 {
0084                         label = "cubieboard2:green:usr";
0085                         gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
0086                 };
0087         };
0088 };
0089 
0090 &ahci {
0091         target-supply = <&reg_ahci_5v>;
0092         status = "okay";
0093 };
0094 
0095 &codec {
0096         status = "okay";
0097 };
0098 
0099 &cpu0 {
0100         cpu-supply = <&reg_dcdc2>;
0101 };
0102 
0103 &de {
0104         status = "okay";
0105 };
0106 
0107 &ehci0 {
0108         status = "okay";
0109 };
0110 
0111 &ehci1 {
0112         status = "okay";
0113 };
0114 
0115 &gmac {
0116         pinctrl-names = "default";
0117         pinctrl-0 = <&gmac_mii_pins>;
0118         phy-handle = <&phy1>;
0119         phy-mode = "mii";
0120         status = "okay";
0121 };
0122 
0123 &hdmi {
0124         status = "okay";
0125 };
0126 
0127 &hdmi_out {
0128         hdmi_out_con: endpoint {
0129                 remote-endpoint = <&hdmi_con_in>;
0130         };
0131 };
0132 
0133 &i2c0 {
0134         status = "okay";
0135 
0136         axp209: pmic@34 {
0137                 reg = <0x34>;
0138                 interrupt-parent = <&nmi_intc>;
0139                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0140         };
0141 };
0142 
0143 &i2c1 {
0144         status = "okay";
0145 };
0146 
0147 &ir0 {
0148         pinctrl-names = "default";
0149         pinctrl-0 = <&ir0_rx_pin>;
0150         status = "okay";
0151 };
0152 
0153 &mmc0 {
0154         vmmc-supply = <&reg_vcc3v3>;
0155         bus-width = <4>;
0156         cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0157         status = "okay";
0158 };
0159 
0160 &gmac_mdio {
0161         phy1: ethernet-phy@1 {
0162                 reg = <1>;
0163         };
0164 };
0165 
0166 &ohci0 {
0167         status = "okay";
0168 };
0169 
0170 &ohci1 {
0171         status = "okay";
0172 };
0173 
0174 &otg_sram {
0175         status = "okay";
0176 };
0177 
0178 &reg_ahci_5v {
0179         status = "okay";
0180 };
0181 
0182 #include "axp209.dtsi"
0183 
0184 &ac_power_supply {
0185         status = "okay";
0186 };
0187 
0188 &reg_dcdc2 {
0189         regulator-always-on;
0190         regulator-min-microvolt = <1000000>;
0191         regulator-max-microvolt = <1450000>;
0192         regulator-name = "vdd-cpu";
0193 };
0194 
0195 &reg_dcdc3 {
0196         regulator-always-on;
0197         regulator-min-microvolt = <1000000>;
0198         regulator-max-microvolt = <1400000>;
0199         regulator-name = "vdd-int-dll";
0200 };
0201 
0202 &reg_ldo1 {
0203         regulator-name = "vdd-rtc";
0204 };
0205 
0206 &reg_ldo2 {
0207         regulator-always-on;
0208         regulator-min-microvolt = <3000000>;
0209         regulator-max-microvolt = <3000000>;
0210         regulator-name = "avcc";
0211 };
0212 
0213 &reg_usb1_vbus {
0214         status = "okay";
0215 };
0216 
0217 &reg_usb2_vbus {
0218         status = "okay";
0219 };
0220 
0221 &uart0 {
0222         pinctrl-names = "default";
0223         pinctrl-0 = <&uart0_pb_pins>;
0224         status = "okay";
0225 };
0226 
0227 &usb_otg {
0228         dr_mode = "otg";
0229         status = "okay";
0230 };
0231 
0232 &usbphy {
0233         usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0234         usb1_vbus-supply = <&reg_usb1_vbus>;
0235         usb2_vbus-supply = <&reg_usb2_vbus>;
0236         status = "okay";
0237 };