Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (C) 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 /dts-v1/;
0044 #include "sun8i-h3.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046 
0047 #include <dt-bindings/gpio/gpio.h>
0048 #include <dt-bindings/input/input.h>
0049 
0050 / {
0051         model = "Xunlong Orange Pi PC";
0052         compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
0053 
0054         aliases {
0055                 ethernet0 = &emac;
0056                 serial0 = &uart0;
0057         };
0058 
0059         chosen {
0060                 stdout-path = "serial0:115200n8";
0061         };
0062 
0063         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                 pwr_led {
0078                         label = "orangepi:green:pwr";
0079                         gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
0080                         default-state = "on";
0081                 };
0082 
0083                 status_led {
0084                         label = "orangepi:red:status";
0085                         gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
0086                 };
0087         };
0088 
0089         gpio-keys {
0090                 compatible = "gpio-keys";
0091 
0092                 switch-4 {
0093                         label = "sw4";
0094                         linux,code = <KEY_POWER>;
0095                         gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
0096                         wakeup-source;
0097                 };
0098         };
0099 };
0100 
0101 &codec {
0102         allwinner,audio-routing =
0103                 "Line Out", "LINEOUT",
0104                 "MIC1", "Mic",
0105                 "Mic",  "MBIAS";
0106         status = "okay";
0107 };
0108 
0109 &de {
0110         status = "okay";
0111 };
0112 
0113 &cpu0 {
0114         cpu-supply = <&reg_vdd_cpux>;
0115 };
0116 
0117 &ehci0 {
0118         status = "okay";
0119 };
0120 
0121 &ehci1 {
0122         status = "okay";
0123 };
0124 
0125 &ehci2 {
0126         status = "okay";
0127 };
0128 
0129 &ehci3 {
0130         status = "okay";
0131 };
0132 
0133 &emac {
0134         phy-handle = <&int_mii_phy>;
0135         phy-mode = "mii";
0136         allwinner,leds-active-low;
0137         status = "okay";
0138 };
0139 
0140 &hdmi {
0141         status = "okay";
0142 };
0143 
0144 &hdmi_out {
0145         hdmi_out_con: endpoint {
0146                 remote-endpoint = <&hdmi_con_in>;
0147         };
0148 };
0149 
0150 &ir {
0151         pinctrl-names = "default";
0152         pinctrl-0 = <&r_ir_rx_pin>;
0153         status = "okay";
0154 };
0155 
0156 &mmc0 {
0157         vmmc-supply = <&reg_vcc3v3>;
0158         bus-width = <4>;
0159         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0160         status = "okay";
0161 };
0162 
0163 &ohci0 {
0164         status = "okay";
0165 };
0166 
0167 &ohci1 {
0168         status = "okay";
0169 };
0170 
0171 &ohci2 {
0172         status = "okay";
0173 };
0174 
0175 &ohci3 {
0176         status = "okay";
0177 };
0178 
0179 &r_i2c {
0180         status = "okay";
0181 
0182         reg_vdd_cpux: regulator@65 {
0183                 compatible = "silergy,sy8106a";
0184                 reg = <0x65>;
0185                 regulator-name = "vdd-cpux";
0186                 silergy,fixed-microvolt = <1200000>;
0187                 /*
0188                  * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
0189                  * however both the Armbian DVFS table and the official one
0190                  * have operating points with voltage under 1.1V, and both
0191                  * DVFS table are known to work properly at the lowest
0192                  * operating point.
0193                  *
0194                  * Use 1.0V as the minimum voltage instead.
0195                  */
0196                 regulator-min-microvolt = <1000000>;
0197                 regulator-max-microvolt = <1300000>;
0198                 regulator-boot-on;
0199                 regulator-always-on;
0200         };
0201 };
0202 
0203 &reg_usb0_vbus {
0204         gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
0205         status = "okay";
0206 };
0207 
0208 &uart0 {
0209         pinctrl-names = "default";
0210         pinctrl-0 = <&uart0_pa_pins>;
0211         status = "okay";
0212 };
0213 
0214 &uart1 {
0215         pinctrl-names = "default";
0216         pinctrl-0 = <&uart1_pins>;
0217         status = "disabled";
0218 };
0219 
0220 &uart2 {
0221         pinctrl-names = "default";
0222         pinctrl-0 = <&uart2_pins>;
0223         status = "disabled";
0224 };
0225 
0226 &uart3 {
0227         pinctrl-names = "default";
0228         pinctrl-0 = <&uart3_pins>;
0229         status = "disabled";
0230 };
0231 
0232 &usb_otg {
0233         dr_mode = "otg";
0234         status = "okay";
0235 };
0236 
0237 &usbphy {
0238         usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
0239         usb0_vbus-supply = <&reg_usb0_vbus>;
0240         /* VBUS on USB host ports are always on */
0241         status = "okay";
0242 };