Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
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 "sun7i-a20.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046 
0047 #include <dt-bindings/gpio/gpio.h>
0048 #include <dt-bindings/interrupt-controller/irq.h>
0049 
0050 / {
0051         model = "Lamobo R1";
0052         compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
0053 
0054         aliases {
0055                 serial0 = &uart0;
0056                 serial1 = &uart3;
0057                 serial2 = &uart7;
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 {
0079                         label = "lamobo_r1:green:usr";
0080                         gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
0081                 };
0082         };
0083 
0084         reg_gmac_3v3: gmac-3v3 {
0085                 compatible = "regulator-fixed";
0086                 regulator-name = "gmac-3v3";
0087                 regulator-min-microvolt = <3300000>;
0088                 regulator-max-microvolt = <3300000>;
0089                 startup-delay-us = <100000>;
0090                 enable-active-high;
0091                 gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
0092         };
0093 };
0094 
0095 &ahci {
0096         target-supply = <&reg_ahci_5v>;
0097         status = "okay";
0098 };
0099 
0100 &codec {
0101         status = "okay";
0102 };
0103 
0104 &cpu0 {
0105         cpu-supply = <&reg_dcdc2>;
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-mode = "rgmii";
0124         phy-supply = <&reg_gmac_3v3>;
0125         status = "okay";
0126 
0127         fixed-link {
0128                 speed = <1000>;
0129                 full-duplex;
0130         };
0131 
0132         mdio {
0133                 compatible = "snps,dwmac-mdio";
0134                 #address-cells = <1>;
0135                 #size-cells = <0>;
0136 
0137                 switch: ethernet-switch@1e {
0138                         compatible = "brcm,bcm53125";
0139                         reg = <30>;
0140 
0141                         ports {
0142                                 #address-cells = <1>;
0143                                 #size-cells = <0>;
0144 
0145                                 port0: port@0 {
0146                                         reg = <0>;
0147                                         label = "lan2";
0148                                 };
0149 
0150                                 port1: port@1 {
0151                                         reg = <1>;
0152                                         label = "lan3";
0153                                 };
0154 
0155                                 port2: port@2 {
0156                                         reg = <2>;
0157                                         label = "lan4";
0158                                 };
0159 
0160                                 port3: port@3 {
0161                                         reg = <3>;
0162                                         label = "wan";
0163                                 };
0164 
0165                                 port4: port@4 {
0166                                         reg = <4>;
0167                                         label = "lan1";
0168                                 };
0169 
0170                                 port8: port@8 {
0171                                         reg = <8>;
0172                                         label = "cpu";
0173                                         ethernet = <&gmac>;
0174                                         phy-mode = "rgmii-txid";
0175                                         fixed-link {
0176                                                 speed = <1000>;
0177                                                 full-duplex;
0178                                         };
0179                                 };
0180                         };
0181                 };
0182         };
0183 };
0184 
0185 &hdmi {
0186         status = "okay";
0187 };
0188 
0189 &hdmi_out {
0190         hdmi_out_con: endpoint {
0191                 remote-endpoint = <&hdmi_con_in>;
0192         };
0193 };
0194 
0195 &i2c0 {
0196         status = "okay";
0197 
0198         axp209: pmic@34 {
0199                 reg = <0x34>;
0200                 interrupt-parent = <&nmi_intc>;
0201                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0202         };
0203 };
0204 
0205 &i2c2 {
0206         status = "okay";
0207 };
0208 
0209 &ir0 {
0210         pinctrl-names = "default";
0211         pinctrl-0 = <&ir0_rx_pin>;
0212         status = "okay";
0213 };
0214 
0215 &mmc0 {
0216         vmmc-supply = <&reg_vcc3v3>;
0217         bus-width = <4>;
0218         cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
0219         status = "okay";
0220 };
0221 
0222 &ohci0 {
0223         status = "okay";
0224 };
0225 
0226 &otg_sram {
0227         status = "okay";
0228 };
0229 
0230 #include "axp209.dtsi"
0231 
0232 &ac_power_supply {
0233         status = "okay";
0234 };
0235 
0236 &battery_power_supply {
0237         status = "okay";
0238 };
0239 
0240 &reg_ahci_5v {
0241         gpio = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
0242         status = "okay";
0243 };
0244 
0245 &reg_dcdc2 {
0246         regulator-always-on;
0247         regulator-min-microvolt = <1000000>;
0248         regulator-max-microvolt = <1400000>;
0249         regulator-name = "vdd-cpu";
0250 };
0251 
0252 &reg_dcdc3 {
0253         regulator-always-on;
0254         regulator-min-microvolt = <1000000>;
0255         regulator-max-microvolt = <1400000>;
0256         regulator-name = "vdd-int-dll";
0257 };
0258 
0259 &reg_ldo1 {
0260         regulator-name = "vdd-rtc";
0261 };
0262 
0263 &reg_ldo2 {
0264         regulator-always-on;
0265         regulator-min-microvolt = <3000000>;
0266         regulator-max-microvolt = <3000000>;
0267         regulator-name = "avcc";
0268 };
0269 
0270 &reg_usb0_vbus {
0271         status = "okay";
0272 };
0273 
0274 &reg_usb2_vbus {
0275         gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
0276         status = "okay";
0277 };
0278 
0279 &spi0 {
0280         pinctrl-names = "default";
0281         pinctrl-0 = <&spi0_pi_pins>,
0282                     <&spi0_cs0_pi_pin>,
0283                     <&spi0_cs1_pi_pin>;
0284         status = "okay";
0285 };
0286 
0287 &uart0 {
0288         pinctrl-names = "default";
0289         pinctrl-0 = <&uart0_pb_pins>;
0290         status = "okay";
0291 };
0292 
0293 &uart3 {
0294         pinctrl-names = "default";
0295         pinctrl-0 = <&uart3_ph_pins>;
0296         status = "okay";
0297 };
0298 
0299 &uart7 {
0300         pinctrl-names = "default";
0301         pinctrl-0 = <&uart7_pi_pins>;
0302         status = "okay";
0303 };
0304 
0305 &usb_otg {
0306         dr_mode = "otg";
0307         status = "okay";
0308 };
0309 
0310 &usb_power_supply {
0311         status = "okay";
0312 };
0313 
0314 &usbphy {
0315         usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0316         usb0_vbus_power-supply = <&usb_power_supply>;
0317         usb0_vbus-supply = <&reg_usb0_vbus>;
0318         usb2_vbus-supply = <&reg_usb2_vbus>;
0319         status = "okay";
0320 };