0001 /*
0002 * Copyright 2015 - Marcus Cooper <codekipper@gmail.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 "sun7i-a20.dtsi"
0045 #include "sunxi-itead-core-common.dtsi"
0046
0047 / {
0048 model = "Itead Ibox A20";
0049 compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20";
0050
0051 leds {
0052 compatible = "gpio-leds";
0053 pinctrl-names = "default";
0054 pinctrl-0 = <&led_pins_itead_core>;
0055
0056 led-0 {
0057 label = "itead_core:green:usr";
0058 gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
0059 default-state = "on";
0060 };
0061
0062 led-1 {
0063 label = "itead_core:blue:usr";
0064 gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
0065 default-state = "on";
0066 };
0067 };
0068
0069 sound {
0070 compatible = "simple-audio-card";
0071 simple-audio-card,name = "On-board SPDIF";
0072
0073 simple-audio-card,cpu {
0074 sound-dai = <&spdif>;
0075 };
0076
0077 simple-audio-card,codec {
0078 sound-dai = <&spdif_out>;
0079 };
0080 };
0081
0082 spdif_out: spdif-out {
0083 #sound-dai-cells = <0>;
0084 compatible = "linux,spdif-dit";
0085 };
0086 };
0087
0088 &ahci {
0089 target-supply = <®_ahci_5v>;
0090 status = "okay";
0091 };
0092
0093 &codec {
0094 status = "okay";
0095 };
0096
0097 &gmac {
0098 pinctrl-names = "default";
0099 pinctrl-0 = <&gmac_mii_pins>;
0100 phy-handle = <&phy1>;
0101 phy-mode = "mii";
0102 status = "okay";
0103 };
0104
0105 &gmac_mdio {
0106 phy1: ethernet-phy@1 {
0107 reg = <1>;
0108 };
0109 };
0110
0111 &i2c0 {
0112 axp209: pmic@34 {
0113 interrupt-parent = <&nmi_intc>;
0114 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0115 };
0116 };
0117
0118 &ir0 {
0119 pinctrl-names = "default";
0120 pinctrl-0 = <&ir0_rx_pin>;
0121 status = "okay";
0122 };
0123
0124 &mmc0 {
0125 vmmc-supply = <®_vcc3v3>;
0126 bus-width = <4>;
0127 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0128 status = "okay";
0129 };
0130
0131 &pio {
0132 led_pins_itead_core: led-pins {
0133 pins = "PH20","PH21";
0134 function = "gpio_out";
0135 drive-strength = <20>;
0136 };
0137 };
0138
0139 ®_ahci_5v {
0140 status = "okay";
0141 };
0142
0143 &spdif {
0144 pinctrl-names = "default";
0145 pinctrl-0 = <&spdif_tx_pin>;
0146 status = "okay";
0147 };