0001 /*
0002 * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
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 /* The SinA31s development board has the SinA31s core board soldered on */
0044 #include "sun6i-a31s-sina31s-core.dtsi"
0045
0046 #include <dt-bindings/input/input.h>
0047
0048 / {
0049 model = "Sinlinx SinA31s Development Board";
0050 compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s";
0051
0052 chosen {
0053 stdout-path = "serial0:115200n8";
0054 };
0055
0056 hdmi-connector {
0057 compatible = "hdmi-connector";
0058 type = "a";
0059
0060 port {
0061 hdmi_con_in: endpoint {
0062 remote-endpoint = <&hdmi_out_con>;
0063 };
0064 };
0065 };
0066
0067 leds {
0068 compatible = "gpio-leds";
0069
0070 status {
0071 label = "sina31s:status:usr";
0072 gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
0073 };
0074 };
0075
0076 sound {
0077 compatible = "simple-audio-card";
0078 simple-audio-card,name = "On-board SPDIF";
0079 simple-audio-card,cpu {
0080 sound-dai = <&spdif>;
0081 };
0082
0083 simple-audio-card,codec {
0084 sound-dai = <&spdif_out>;
0085 };
0086 };
0087
0088 spdif_out: spdif-out {
0089 #sound-dai-cells = <0>;
0090 compatible = "linux,spdif-dit";
0091 };
0092 };
0093
0094 &codec {
0095 allwinner,audio-routing =
0096 "Line Out", "LINEOUT",
0097 "MIC1", "Mic",
0098 "Mic", "MBIAS";
0099 status = "okay";
0100 };
0101
0102 &de {
0103 status = "okay";
0104 };
0105
0106 &ehci0 {
0107 /* USB 2.0 4 port hub IC */
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 phy-supply = <®_dldo1>;
0121 status = "okay";
0122 };
0123
0124 &hdmi {
0125 status = "okay";
0126 };
0127
0128 &hdmi_out {
0129 hdmi_out_con: endpoint {
0130 remote-endpoint = <&hdmi_con_in>;
0131 };
0132 };
0133
0134 &ir {
0135 pinctrl-names = "default";
0136 pinctrl-0 = <&s_ir_rx_pin>;
0137 status = "okay";
0138 };
0139
0140 &lradc {
0141 vref-supply = <®_aldo3>;
0142 status = "okay";
0143
0144 button-158 {
0145 label = "Volume Up";
0146 linux,code = <KEY_VOLUMEUP>;
0147 channel = <0>;
0148 voltage = <158730>;
0149 };
0150
0151 button-349 {
0152 label = "Volume Down";
0153 linux,code = <KEY_VOLUMEDOWN>;
0154 channel = <0>;
0155 voltage = <349206>;
0156 };
0157 };
0158
0159 &mdio {
0160 phy1: ethernet-phy@1 {
0161 reg = <1>;
0162 };
0163 };
0164
0165 &mmc0 {
0166 vmmc-supply = <®_dcdc1>;
0167 bus-width = <4>;
0168 cd-gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
0169 status = "okay";
0170 };
0171
0172 &ohci1 {
0173 status = "okay";
0174 };
0175
0176 ®_dldo1 {
0177 regulator-min-microvolt = <3300000>;
0178 regulator-max-microvolt = <3300000>;
0179 regulator-name = "vcc-gmac-phy";
0180 };
0181
0182 &spdif {
0183 pinctrl-names = "default";
0184 pinctrl-0 = <&spdif_tx_pin>;
0185 status = "okay";
0186 };
0187
0188 &usb_otg {
0189 dr_mode = "peripheral";
0190 status = "okay";
0191 };
0192
0193 &usbphy {
0194 status = "okay";
0195 };