Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
0003  *
0004  * Hans de Goede <hdegoede@redhat.com>
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 "sun7i-a20.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048 
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/interrupt-controller/irq.h>
0051 
0052 / {
0053         model = "Orange Pi Mini";
0054         compatible = "xunlong,orangepi-mini", "allwinner,sun7i-a20";
0055 
0056         aliases {
0057                 serial0 = &uart0;
0058         };
0059 
0060         chosen {
0061                 stdout-path = "serial0:115200n8";
0062         };
0063 
0064         hdmi-connector {
0065                 compatible = "hdmi-connector";
0066                 type = "a";
0067 
0068                 port {
0069                         hdmi_con_in: endpoint {
0070                                 remote-endpoint = <&hdmi_out_con>;
0071                         };
0072                 };
0073         };
0074 
0075         leds {
0076                 compatible = "gpio-leds";
0077 
0078                 led-0 {
0079                         label = "orangepi:green:usr";
0080                         gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
0081                 };
0082 
0083                 led-1 {
0084                         label = "orangepi:blue:usr";
0085                         gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>; /* PH25 */
0086                 };
0087         };
0088 
0089         reg_gmac_3v3: gmac-3v3 {
0090                 compatible = "regulator-fixed";
0091                 regulator-name = "gmac-3v3";
0092                 regulator-min-microvolt = <3300000>;
0093                 regulator-max-microvolt = <3300000>;
0094                 startup-delay-us = <100000>;
0095                 enable-active-high;
0096                 gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
0097         };
0098 };
0099 
0100 &ahci {
0101         status = "okay";
0102 };
0103 
0104 &codec {
0105         status = "okay";
0106 };
0107 
0108 &de {
0109         status = "okay";
0110 };
0111 
0112 &ehci0 {
0113         status = "okay";
0114 };
0115 
0116 &ehci1 {
0117         status = "okay";
0118 };
0119 
0120 &gmac {
0121         pinctrl-names = "default";
0122         pinctrl-0 = <&gmac_rgmii_pins>;
0123         phy-handle = <&phy1>;
0124         phy-mode = "rgmii";
0125         phy-supply = <&reg_gmac_3v3>;
0126         status = "okay";
0127 };
0128 
0129 &hdmi {
0130         status = "okay";
0131 };
0132 
0133 &hdmi_out {
0134         hdmi_out_con: endpoint {
0135                 remote-endpoint = <&hdmi_con_in>;
0136         };
0137 };
0138 
0139 &i2c0 {
0140         status = "okay";
0141 
0142         axp209: pmic@34 {
0143                 reg = <0x34>;
0144                 interrupt-parent = <&nmi_intc>;
0145                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0146         };
0147 };
0148 
0149 #include "axp209.dtsi"
0150 
0151 &ir0 {
0152         pinctrl-names = "default";
0153         pinctrl-0 = <&ir0_rx_pin>;
0154         status = "okay";
0155 };
0156 
0157 &gmac_mdio {
0158         phy1: ethernet-phy@1 {
0159                 reg = <1>;
0160         };
0161 };
0162 
0163 &mmc0 {
0164         vmmc-supply = <&reg_vcc3v3>;
0165         bus-width = <4>;
0166         cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
0167         status = "okay";
0168 };
0169 
0170 &mmc3 {
0171         vmmc-supply = <&reg_vcc3v3>;
0172         bus-width = <4>;
0173         cd-gpios = <&pio 7 11 GPIO_ACTIVE_LOW>; /* PH11 */
0174         status = "okay";
0175 };
0176 
0177 &otg_sram {
0178         status = "okay";
0179 };
0180 
0181 &reg_dcdc2 {
0182         regulator-always-on;
0183         regulator-min-microvolt = <1000000>;
0184         regulator-max-microvolt = <1500000>;
0185         regulator-name = "vdd-cpu";
0186 };
0187 
0188 &reg_dcdc3 {
0189         regulator-always-on;
0190         regulator-min-microvolt = <1000000>;
0191         regulator-max-microvolt = <1400000>;
0192         regulator-name = "vdd-int-pll";
0193 };
0194 
0195 &reg_ldo1 {
0196         regulator-name = "vdd-rtc";
0197 };
0198 
0199 &reg_ldo2 {
0200         regulator-always-on;
0201         regulator-min-microvolt = <3000000>;
0202         regulator-max-microvolt = <3000000>;
0203         regulator-name = "avcc";
0204 };
0205 
0206 &reg_usb0_vbus {
0207         status = "okay";
0208 };
0209 
0210 &reg_usb1_vbus {
0211         gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
0212         status = "okay";
0213 };
0214 
0215 &reg_usb2_vbus {
0216         gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
0217         status = "okay";
0218 };
0219 
0220 &uart0 {
0221         pinctrl-names = "default";
0222         pinctrl-0 = <&uart0_pb_pins>;
0223         status = "okay";
0224 };
0225 
0226 &usb_otg {
0227         dr_mode = "otg";
0228         status = "okay";
0229 };
0230 
0231 &usb_power_supply {
0232         status = "okay";
0233 };
0234 
0235 &usbphy {
0236         usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0237         usb0_vbus_power-supply = <&usb_power_supply>;
0238         usb0_vbus-supply = <&reg_usb0_vbus>;
0239         usb1_vbus-supply = <&reg_usb1_vbus>;
0240         usb2_vbus-supply = <&reg_usb2_vbus>;
0241         status = "okay";
0242 };