0001 /*
0002 * Copyright 2015 Chen-Yu Tsai
0003 *
0004 * Chen-Yu Tsai <wens@csie.org>
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 "sun8i-a33.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/input/input.h>
0051
0052 / {
0053 model = "Sinlinx SinA33";
0054 compatible = "sinlinx,sina33", "allwinner,sun8i-a33";
0055
0056 aliases {
0057 serial0 = &uart0;
0058 };
0059
0060 chosen {
0061 stdout-path = "serial0:115200n8";
0062 };
0063
0064 panel {
0065 compatible = "netron-dy,e231732";
0066 power-supply = <®_vcc3v3>;
0067
0068 port {
0069 panel_input: endpoint {
0070 remote-endpoint = <&tcon0_out_panel>;
0071 };
0072 };
0073 };
0074 };
0075
0076 &codec {
0077 status = "okay";
0078 };
0079
0080 &cpu0 {
0081 cpu-supply = <®_dcdc3>;
0082 };
0083
0084 &cpu0_opp_table {
0085 opp-1104000000 {
0086 opp-hz = /bits/ 64 <1104000000>;
0087 opp-microvolt = <1320000>;
0088 clock-latency-ns = <244144>; /* 8 32k periods */
0089 };
0090
0091 opp-1200000000 {
0092 opp-hz = /bits/ 64 <1200000000>;
0093 opp-microvolt = <1320000>;
0094 clock-latency-ns = <244144>; /* 8 32k periods */
0095 };
0096 };
0097
0098 &de {
0099 status = "okay";
0100 };
0101
0102 &dai {
0103 status = "okay";
0104 };
0105
0106 &ehci0 {
0107 status = "okay";
0108 };
0109
0110 &lradc {
0111 vref-supply = <®_dcdc1>;
0112 status = "okay";
0113
0114 button-200 {
0115 label = "Volume Up";
0116 linux,code = <KEY_VOLUMEUP>;
0117 channel = <0>;
0118 voltage = <191011>;
0119 };
0120
0121 button-400 {
0122 label = "Volume Down";
0123 linux,code = <KEY_VOLUMEDOWN>;
0124 channel = <0>;
0125 voltage = <391304>;
0126 };
0127
0128 button-600 {
0129 label = "Home";
0130 linux,code = <KEY_HOME>;
0131 channel = <0>;
0132 voltage = <600000>;
0133 };
0134 };
0135
0136 &mmc0 {
0137 vmmc-supply = <®_dcdc1>;
0138 bus-width = <4>;
0139 cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB4 */
0140 status = "okay";
0141 };
0142
0143 &mmc2 {
0144 pinctrl-names = "default";
0145 pinctrl-0 = <&mmc2_8bit_pins>;
0146 vmmc-supply = <®_dcdc1>;
0147 bus-width = <8>;
0148 non-removable;
0149 cap-mmc-hw-reset;
0150 status = "okay";
0151 };
0152
0153 &mmc2_8bit_pins {
0154 /* Increase drive strength for DDR modes */
0155 drive-strength = <40>;
0156 };
0157
0158 &ohci0 {
0159 status = "okay";
0160 };
0161
0162 &r_rsb {
0163 status = "okay";
0164
0165 axp22x: pmic@3a3 {
0166 compatible = "x-powers,axp223";
0167 reg = <0x3a3>;
0168 interrupt-parent = <&r_intc>;
0169 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0170 eldoin-supply = <®_dcdc1>;
0171 };
0172 };
0173
0174 #include "axp223.dtsi"
0175
0176 &ac_power_supply {
0177 status = "okay";
0178 };
0179
0180 &battery_power_supply {
0181 status = "okay";
0182 };
0183
0184 ®_aldo1 {
0185 regulator-always-on;
0186 regulator-min-microvolt = <3000000>;
0187 regulator-max-microvolt = <3000000>;
0188 regulator-name = "vcc-io";
0189 };
0190
0191 ®_aldo2 {
0192 regulator-always-on;
0193 regulator-min-microvolt = <2350000>;
0194 regulator-max-microvolt = <2650000>;
0195 regulator-name = "vdd-dll";
0196 };
0197
0198 ®_aldo3 {
0199 regulator-always-on;
0200 regulator-min-microvolt = <2700000>;
0201 regulator-max-microvolt = <3300000>;
0202 regulator-name = "vcc-pll-avcc";
0203 };
0204
0205 ®_dc5ldo {
0206 regulator-always-on;
0207 regulator-min-microvolt = <900000>;
0208 regulator-max-microvolt = <1400000>;
0209 regulator-name = "vdd-cpus";
0210 };
0211
0212 ®_dcdc1 {
0213 regulator-always-on;
0214 regulator-min-microvolt = <3000000>;
0215 regulator-max-microvolt = <3000000>;
0216 regulator-name = "vcc-3v0";
0217 };
0218
0219 ®_dcdc2 {
0220 regulator-always-on;
0221 regulator-min-microvolt = <900000>;
0222 regulator-max-microvolt = <1400000>;
0223 regulator-name = "vdd-sys";
0224 };
0225
0226 ®_dcdc3 {
0227 regulator-always-on;
0228 regulator-min-microvolt = <900000>;
0229 regulator-max-microvolt = <1400000>;
0230 regulator-name = "vdd-cpu";
0231 };
0232
0233 ®_dcdc5 {
0234 regulator-always-on;
0235 regulator-min-microvolt = <1500000>;
0236 regulator-max-microvolt = <1500000>;
0237 regulator-name = "vcc-dram";
0238 };
0239
0240 ®_rtc_ldo {
0241 regulator-name = "vcc-rtc";
0242 };
0243
0244 &sound {
0245 status = "okay";
0246 };
0247
0248 &tcon0 {
0249 pinctrl-names = "default";
0250 pinctrl-0 = <&lcd_rgb666_pins>;
0251 status = "okay";
0252 };
0253
0254 &tcon0_out {
0255 tcon0_out_panel: endpoint@0 {
0256 reg = <0>;
0257 remote-endpoint = <&panel_input>;
0258 };
0259 };
0260
0261 &uart0 {
0262 pinctrl-names = "default";
0263 pinctrl-0 = <&uart0_pb_pins>;
0264 status = "okay";
0265 };
0266
0267 &usb_otg {
0268 dr_mode = "peripheral";
0269 status = "okay";
0270 };
0271
0272 &usbphy {
0273 status = "okay";
0274 usb1_vbus-supply = <®_vcc5v0>; /* USB1 VBUS is always on */
0275 };