Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
0004  * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
0005  * Copyright (C) 2018 Hao Zhang <hao5781286@gmail.com>
0006  *
0007  * This file is dual-licensed: you can use it either under the terms
0008  * of the GPL or the X11 license, at your option. Note that this dual
0009  * licensing only applies to this file, and not this project as a
0010  * whole.
0011  *
0012  *  a) This file is free software; you can redistribute it and/or
0013  *     modify it under the terms of the GNU General Public License as
0014  *     published by the Free Software Foundation; either version 2 of the
0015  *     License, or (at your option) any later version.
0016  *
0017  *     This file is distributed in the hope that it will be useful,
0018  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
0019  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0020  *     GNU General Public License for more details.
0021  *
0022  * Or, alternatively,
0023  *
0024  *  b) Permission is hereby granted, free of charge, to any person
0025  *     obtaining a copy of this software and associated documentation
0026  *     files (the "Software"), to deal in the Software without
0027  *     restriction, including without limitation the rights to use,
0028  *     copy, modify, merge, publish, distribute, sublicense, and/or
0029  *     sell copies of the Software, and to permit persons to whom the
0030  *     Software is furnished to do so, subject to the following
0031  *     conditions:
0032  *
0033  *     The above copyright notice and this permission notice shall be
0034  *     included in all copies or substantial portions of the Software.
0035  *
0036  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0037  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0038  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0039  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0040  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0041  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0042  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0043  *     OTHER DEALINGS IN THE SOFTWARE.
0044  */
0045 
0046 /dts-v1/;
0047 #include "sun8i-r40.dtsi"
0048 #include "sun8i-r40-cpu-opp.dtsi"
0049 
0050 #include <dt-bindings/gpio/gpio.h>
0051 
0052 / {
0053         model = "t3-cqa3t-bv3";
0054         compatible = "qihua,t3-cqa3t-bv3", "allwinner,sun8i-t3",
0055                      "allwinner,sun8i-r40";
0056 
0057         aliases {
0058                 serial0 = &uart0;
0059         };
0060 
0061         chosen {
0062                 stdout-path = "serial0:115200n8";
0063         };
0064 
0065         connector {
0066                 compatible = "hdmi-connector";
0067                 type = "a";
0068 
0069                 port {
0070                         hdmi_con_in: endpoint {
0071                                 remote-endpoint = <&hdmi_out_con>;
0072                         };
0073                 };
0074         };
0075 
0076         reg_vcc5v0: vcc5v0 {
0077                 compatible = "regulator-fixed";
0078                 regulator-name = "vcc5v0";
0079                 regulator-min-microvolt = <5000000>;
0080                 regulator-max-microvolt = <5000000>;
0081                 gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
0082                 enable-active-high;
0083         };
0084 };
0085 
0086 &ahci {
0087         ahci-supply = <&reg_dldo4>;
0088         phy-supply = <&reg_eldo3>;
0089         status = "okay";
0090 };
0091 
0092 &cpu0 {
0093         cpu-supply = <&reg_dcdc2>;
0094 };
0095 
0096 &de {
0097         status = "okay";
0098 };
0099 
0100 &ehci1 {
0101         status = "okay";
0102 };
0103 
0104 &ehci2 {
0105         status = "okay";
0106 };
0107 
0108 &hdmi {
0109         status = "okay";
0110 };
0111 
0112 &hdmi_out {
0113         hdmi_out_con: endpoint {
0114                 remote-endpoint = <&hdmi_con_in>;
0115         };
0116 };
0117 
0118 &i2c0 {
0119         status = "okay";
0120 
0121         axp22x: pmic@34 {
0122                 compatible = "x-powers,axp221";
0123                 reg = <0x34>;
0124                 interrupt-parent = <&nmi_intc>;
0125                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0126         };
0127 };
0128 
0129 #include "axp22x.dtsi"
0130 
0131 &mmc0 {
0132         vmmc-supply = <&reg_dcdc1>;
0133         bus-width = <4>;
0134         cd-gpios = <&pio 7 15 GPIO_ACTIVE_LOW>; /* PH15 */
0135         status = "okay";
0136 };
0137 
0138 &mmc2 {
0139         vmmc-supply = <&reg_dcdc1>;
0140         vqmmc-supply = <&reg_dcdc1>;
0141         bus-width = <8>;
0142         non-removable;
0143         status = "okay";
0144 };
0145 
0146 &ohci1 {
0147         status = "okay";
0148 };
0149 
0150 &ohci2 {
0151         status = "okay";
0152 };
0153 
0154 &reg_aldo2 {
0155         regulator-always-on;
0156         regulator-min-microvolt = <2500000>;
0157         regulator-max-microvolt = <2500000>;
0158         regulator-name = "vcc-pa";
0159 };
0160 
0161 &reg_aldo3 {
0162         regulator-always-on;
0163         regulator-min-microvolt = <2700000>;
0164         regulator-max-microvolt = <3300000>;
0165         regulator-name = "avcc";
0166 };
0167 
0168 &reg_dcdc1 {
0169         regulator-always-on;
0170         regulator-min-microvolt = <3000000>;
0171         regulator-max-microvolt = <3000000>;
0172         regulator-name = "vcc-3v0";
0173 };
0174 
0175 &reg_dcdc2 {
0176         regulator-always-on;
0177         regulator-min-microvolt = <1000000>;
0178         regulator-max-microvolt = <1300000>;
0179         regulator-name = "vdd-cpu";
0180 };
0181 
0182 &reg_dcdc3 {
0183         regulator-always-on;
0184         regulator-min-microvolt = <1000000>;
0185         regulator-max-microvolt = <1300000>;
0186         regulator-name = "vdd-sys";
0187 };
0188 
0189 &reg_dcdc5 {
0190         regulator-always-on;
0191         regulator-min-microvolt = <1500000>;
0192         regulator-max-microvolt = <1500000>;
0193         regulator-name = "vcc-dram";
0194 };
0195 
0196 &reg_dldo1 {
0197         regulator-always-on;
0198         regulator-min-microvolt = <3300000>;
0199         regulator-max-microvolt = <3300000>;
0200         regulator-name = "vcc-pg";
0201 };
0202 
0203 &reg_dldo3 {
0204         regulator-always-on;
0205         regulator-min-microvolt = <3300000>;
0206         regulator-max-microvolt = <3300000>;
0207         regulator-name = "vcc-dldo3";
0208 };
0209 
0210 &reg_eldo3 {
0211         regulator-always-on;
0212         regulator-min-microvolt = <2800000>;
0213         regulator-max-microvolt = <2800000>;
0214         regulator-name = "vcc-pe";
0215 };
0216 
0217 &tcon_tv0 {
0218         status = "okay";
0219 };
0220 
0221 &uart0 {
0222         pinctrl-names = "default";
0223         pinctrl-0 = <&uart0_pb_pins>;
0224         status = "okay";
0225 };
0226 
0227 &usbphy {
0228         usb1_vbus-supply = <&reg_vcc5v0>;
0229         usb2_vbus-supply = <&reg_vcc5v0>;
0230         status = "okay";
0231 };