Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2016 - Stefan Mavrodiev <stefan.mavrodiev@gmail.com>
0003  *                  Olimex LTD. <support@olimex.com>
0004  *
0005  * This file is dual-licensed: you can use it either under the terms
0006  * of the GPL or the X11 license, at your option. Note that this dual
0007  * licensing only applies to this file, and not this project as a
0008  * whole.
0009  *
0010  *  a) This file is free software; you can redistribute it and/or
0011  *     modify it under the terms of the GNU General Public License as
0012  *     published by the Free Software Foundation; either version 2 of the
0013  *     License, or (at your option) any later version.
0014  *
0015  *     This file is distributed in the hope that it will be useful,
0016  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
0017  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0018  *     GNU General Public License for more details.
0019  *
0020  * Or, alternatively,
0021  *
0022  *  b) Permission is hereby granted, free of charge, to any person
0023  *     obtaining a copy of this software and associated documentation
0024  *     files (the "Software"), to deal in the Software without
0025  *     restriction, including without limitation the rights to use,
0026  *     copy, modify, merge, publish, distribute, sublicense, and/or
0027  *     sell copies of the Software, and to permit persons to whom the
0028  *     Software is furnished to do so, subject to the following
0029  *     conditions:
0030  *
0031  *     The above copyright notice and this permission notice shall be
0032  *     included in all copies or substantial portions of the Software.
0033  *
0034  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0035  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0036  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0037  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0038  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0039  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0040  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0041  *     OTHER DEALINGS IN THE SOFTWARE.
0042  */
0043 
0044 /dts-v1/;
0045 #include "sun8i-a33.dtsi"
0046 
0047 #include <dt-bindings/gpio/gpio.h>
0048 #include <dt-bindings/input/input.h>
0049 
0050 / {
0051         model = "Olimex A33-OLinuXino";
0052         compatible = "olimex,a33-olinuxino","allwinner,sun8i-a33";
0053 
0054         aliases {
0055                 serial0 = &uart0;
0056         };
0057 
0058         chosen {
0059                 stdout-path = "serial0:115200n8";
0060         };
0061 
0062         leds {
0063                 compatible = "gpio-leds";
0064 
0065                 led {
0066                         label = "a33-olinuxino:green:usr";
0067                         gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>;
0068                 };
0069         };
0070 };
0071 
0072 &codec {
0073         status = "okay";
0074 };
0075 
0076 &dai {
0077         status = "okay";
0078 };
0079 
0080 &ehci0 {
0081         status = "okay";
0082 };
0083 
0084 &mmc0 {
0085         vmmc-supply = <&reg_dcdc1>;
0086         bus-width = <4>;
0087         cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB4 */
0088         status = "okay";
0089 };
0090 
0091 &ohci0 {
0092         status = "okay";
0093 };
0094 
0095 &r_rsb {
0096         status = "okay";
0097 
0098         axp22x: pmic@3a3 {
0099                 compatible = "x-powers,axp223";
0100                 reg = <0x3a3>;
0101                 interrupt-parent = <&r_intc>;
0102                 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0103                 eldoin-supply = <&reg_dcdc1>;
0104                 x-powers,drive-vbus-en;
0105         };
0106 };
0107 
0108 #include "axp223.dtsi"
0109 
0110 &ac_power_supply {
0111         status = "okay";
0112 };
0113 
0114 &battery_power_supply {
0115         status = "okay";
0116 };
0117 
0118 &reg_aldo1 {
0119         regulator-always-on;
0120         regulator-min-microvolt = <3300000>;
0121         regulator-max-microvolt = <3300000>;
0122         regulator-name = "vcc-io";
0123 };
0124 
0125 &reg_aldo2 {
0126         regulator-always-on;
0127         regulator-min-microvolt = <2350000>;
0128         regulator-max-microvolt = <2650000>;
0129         regulator-name = "vdd-dll";
0130 };
0131 
0132 &reg_aldo3 {
0133         regulator-always-on;
0134         regulator-min-microvolt = <3300000>;
0135         regulator-max-microvolt = <3300000>;
0136         regulator-name = "vcc-avcc";
0137 };
0138 
0139 &reg_dc1sw {
0140         regulator-name = "vcc-lcd";
0141 };
0142 
0143 &reg_dc5ldo {
0144         regulator-always-on;
0145         regulator-min-microvolt = <900000>;
0146         regulator-max-microvolt = <1400000>;
0147         regulator-name = "vdd-cpus";
0148 };
0149 
0150 &reg_dcdc1 {
0151         regulator-always-on;
0152         regulator-min-microvolt = <3300000>;
0153         regulator-max-microvolt = <3300000>;
0154         regulator-name = "vcc-3v3";
0155 };
0156 
0157 &reg_dcdc2 {
0158         regulator-always-on;
0159         regulator-min-microvolt = <900000>;
0160         regulator-max-microvolt = <1400000>;
0161         regulator-name = "vdd-sys";
0162 };
0163 
0164 &reg_dcdc3 {
0165         regulator-always-on;
0166         regulator-min-microvolt = <900000>;
0167         regulator-max-microvolt = <1400000>;
0168         regulator-name = "vdd-cpu";
0169 };
0170 
0171 &reg_dcdc5 {
0172         regulator-always-on;
0173         regulator-min-microvolt = <1500000>;
0174         regulator-max-microvolt = <1500000>;
0175         regulator-name = "vcc-dram";
0176 };
0177 
0178 &reg_drivevbus {
0179         regulator-name = "usb0-vbus";
0180         status = "okay";
0181 };
0182 
0183 &reg_rtc_ldo {
0184         regulator-name = "vcc-rtc";
0185 };
0186 
0187 &simplefb_lcd {
0188         vcc-lcd-supply = <&reg_dc1sw>;
0189 };
0190 
0191 &sound {
0192         /* Board level jack widgets */
0193         simple-audio-card,widgets = "Microphone", "Microphone Jack",
0194                                     "Headphone", "Headphone Jack";
0195         /* Board level routing. First 2 routes copied from SoC level */
0196         simple-audio-card,routing =
0197                 "Left DAC", "DACL",
0198                 "Right DAC", "DACR",
0199                 "HP", "HPCOM",
0200                 "Headphone Jack", "HP",
0201                 "MIC1", "Microphone Jack",
0202                 "Microphone Jack", "MBIAS";
0203         status = "okay";
0204 };
0205 
0206 &uart0 {
0207         pinctrl-names = "default";
0208         pinctrl-0 = <&uart0_pb_pins>;
0209         status = "okay";
0210 };
0211 
0212 &usb_otg {
0213         dr_mode = "otg";
0214         status = "okay";
0215 };
0216 
0217 &usb_power_supply {
0218         status = "okay";
0219 };
0220 
0221 &usbphy {
0222         usb0_id_det-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
0223         usb0_vbus_power-supply = <&usb_power_supply>;
0224         usb0_vbus-supply = <&reg_drivevbus>;
0225         status = "okay";
0226 };