Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2013 Emilio López
0003  *
0004  * Emilio López <emilio@elopez.com.ar>
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 "sun4i-a10.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048 
0049 #include <dt-bindings/gpio/gpio.h>
0050 
0051 / {
0052         model = "Mele A1000";
0053         compatible = "mele,a1000", "allwinner,sun4i-a10";
0054 
0055         aliases {
0056                 serial0 = &uart0;
0057         };
0058 
0059         chosen {
0060                 stdout-path = "serial0:115200n8";
0061         };
0062 
0063         hdmi-connector {
0064                 compatible = "hdmi-connector";
0065                 type = "a";
0066 
0067                 port {
0068                         hdmi_con_in: endpoint {
0069                                 remote-endpoint = <&hdmi_out_con>;
0070                         };
0071                 };
0072         };
0073 
0074         leds {
0075                 compatible = "gpio-leds";
0076 
0077                 led-0 {
0078                         label = "a1000:red:usr";
0079                         gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>;
0080                 };
0081 
0082                 led-1 {
0083                         label = "a1000:blue:pwr";
0084                         gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
0085                         default-state = "on";
0086                 };
0087         };
0088 
0089         reg_emac_3v3: emac-3v3 {
0090                 compatible = "regulator-fixed";
0091                 regulator-name = "emac-3v3";
0092                 regulator-min-microvolt = <3300000>;
0093                 regulator-max-microvolt = <3300000>;
0094                 startup-delay-us = <20000>;
0095                 enable-active-high;
0096                 gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>;
0097         };
0098 
0099         sound {
0100                 compatible = "simple-audio-card";
0101                 simple-audio-card,name = "On-board SPDIF";
0102 
0103                 simple-audio-card,cpu {
0104                         sound-dai = <&spdif>;
0105                 };
0106 
0107                 simple-audio-card,codec {
0108                         sound-dai = <&spdif_out>;
0109                 };
0110         };
0111 
0112         spdif_out: spdif-out {
0113                 #sound-dai-cells = <0>;
0114                 compatible = "linux,spdif-dit";
0115         };
0116 };
0117 
0118 &ahci {
0119         status = "okay";
0120 };
0121 
0122 &codec {
0123         status = "okay";
0124 };
0125 
0126 &cpu0 {
0127         cpu-supply = <&reg_dcdc2>;
0128 };
0129 
0130 &ehci0 {
0131         status = "okay";
0132 };
0133 
0134 &ehci1 {
0135         status = "okay";
0136 };
0137 
0138 &emac {
0139         phy-handle = <&phy1>;
0140         status = "okay";
0141 };
0142 
0143 &emac_sram {
0144         status = "okay";
0145 };
0146 
0147 &de {
0148         status = "okay";
0149 };
0150 
0151 &hdmi {
0152         status = "okay";
0153 };
0154 
0155 &hdmi_out {
0156         hdmi_out_con: endpoint {
0157                 remote-endpoint = <&hdmi_con_in>;
0158         };
0159 };
0160 
0161 &i2c0 {
0162         status = "okay";
0163 
0164         axp209: pmic@34 {
0165                 compatible = "x-powers,axp209";
0166                 reg = <0x34>;
0167                 interrupts = <0>;
0168 
0169                 interrupt-controller;
0170                 #interrupt-cells = <1>;
0171         };
0172 };
0173 
0174 &ir0 {
0175         pinctrl-names = "default";
0176         pinctrl-0 = <&ir0_rx_pins>;
0177         status = "okay";
0178 };
0179 
0180 &mdio {
0181         phy-supply = <&reg_emac_3v3>;
0182         status = "okay";
0183 
0184         phy1: ethernet-phy@1 {
0185                 reg = <1>;
0186         };
0187 };
0188 
0189 &mmc0 {
0190         vmmc-supply = <&reg_vcc3v3>;
0191         bus-width = <4>;
0192         cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0193         status = "okay";
0194 };
0195 
0196 &ohci0 {
0197         status = "okay";
0198 };
0199 
0200 &ohci1 {
0201         status = "okay";
0202 };
0203 
0204 #include "axp209.dtsi"
0205 
0206 &reg_dcdc2 {
0207         regulator-always-on;
0208         regulator-min-microvolt = <1000000>;
0209         regulator-max-microvolt = <1400000>;
0210         regulator-name = "vdd-cpu";
0211 };
0212 
0213 &reg_dcdc3 {
0214         regulator-always-on;
0215         regulator-min-microvolt = <1000000>;
0216         regulator-max-microvolt = <1250000>;
0217         regulator-name = "vdd-int-dll";
0218 };
0219 
0220 &reg_ldo1 {
0221         regulator-name = "vdd-rtc";
0222 };
0223 
0224 &reg_ldo2 {
0225         regulator-always-on;
0226         regulator-min-microvolt = <3000000>;
0227         regulator-max-microvolt = <3000000>;
0228         regulator-name = "avcc";
0229 };
0230 
0231 &reg_usb1_vbus {
0232         status = "okay";
0233 };
0234 
0235 &reg_usb2_vbus {
0236         status = "okay";
0237 };
0238 
0239 &spdif {
0240         pinctrl-names = "default";
0241         pinctrl-0 = <&spdif_tx_pin>;
0242         status = "okay";
0243 };
0244 
0245 &uart0 {
0246         pinctrl-names = "default";
0247         pinctrl-0 = <&uart0_pb_pins>;
0248         status = "okay";
0249 };
0250 
0251 &usbphy {
0252         usb1_vbus-supply = <&reg_usb1_vbus>;
0253         usb2_vbus-supply = <&reg_usb2_vbus>;
0254         status = "okay";
0255 };