Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2015 Maxime Ripard
0003  *
0004  * Maxime Ripard <maxime.ripard@free-electrons.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 "sun8i-a23.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048 
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/input/input.h>
0051 
0052 / {
0053         model = "Allwinner A23 Evaluation Board";
0054         compatible = "allwinner,sun8i-a23-evb", "allwinner,sun8i-a23";
0055 
0056         aliases {
0057                 i2c0 = &i2c0;
0058                 i2c1 = &i2c1;
0059                 serial0 = &r_uart;
0060         };
0061 
0062         chosen {
0063                 stdout-path = "serial0:115200n8";
0064         };
0065 };
0066 
0067 &i2c0 {
0068         status = "okay";
0069 };
0070 
0071 &i2c1 {
0072         status = "okay";
0073 };
0074 
0075 &lradc {
0076         vref-supply = <&reg_vcc3v0>;
0077         status = "okay";
0078 
0079         button-190 {
0080                 label = "Volume Up";
0081                 linux,code = <KEY_VOLUMEUP>;
0082                 channel = <0>;
0083                 voltage = <190000>;
0084         };
0085 
0086         button-390 {
0087                 label = "Volume Down";
0088                 linux,code = <KEY_VOLUMEDOWN>;
0089                 channel = <0>;
0090                 voltage = <390000>;
0091         };
0092 
0093         button-600 {
0094                 label = "Home";
0095                 linux,code = <KEY_HOME>;
0096                 channel = <0>;
0097                 voltage = <600000>;
0098         };
0099 };
0100 
0101 &mmc0 {
0102         vmmc-supply = <&reg_vcc3v0>;
0103         bus-width = <4>;
0104         cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB4 */
0105         status = "okay";
0106 };
0107 
0108 /*
0109  * The RX line has a non-populated resistance. In order to use it, you
0110  * need to solder R207 on the back of the board in order to close the
0111  * line and get a working UART.
0112  */
0113 &r_uart {
0114         pinctrl-names = "default";
0115         pinctrl-0 = <&r_uart_pins_a>;
0116         status = "okay";
0117 };