0001 /*
0002 * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
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 "sun5i-a13.dtsi"
0045 #include "sun5i-reference-design-tablet.dtsi"
0046 #include <dt-bindings/interrupt-controller/irq.h>
0047
0048 / {
0049 model = "Utoo P66";
0050 compatible = "utoo,p66", "allwinner,sun5i-a13";
0051
0052 /* The P66 uses the uart pins as gpios */
0053 aliases {
0054 /delete-property/serial0;
0055 };
0056
0057 chosen {
0058 /delete-property/stdout-path;
0059 };
0060
0061 i2c_lcd: i2c {
0062 /* The lcd panel i2c interface is hooked up via gpios */
0063 compatible = "i2c-gpio";
0064 sda-gpios = <&pio 6 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG12 */
0065 scl-gpios = <&pio 6 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG10 */
0066 i2c-gpio,delay-us = <5>;
0067 };
0068 };
0069
0070 &backlight {
0071 /* Note levels of 10 / 20% result in backlight off */
0072 brightness-levels = <0 30 40 50 60 70 80 90 100>;
0073 default-brightness-level = <6>;
0074 };
0075
0076 &codec {
0077 allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
0078 };
0079
0080 &mmc2 {
0081 pinctrl-names = "default";
0082 pinctrl-0 = <&mmc2_8bit_pins>;
0083 vmmc-supply = <®_vcc3v3>;
0084 bus-width = <8>;
0085 non-removable;
0086 status = "okay";
0087
0088 mmccard: mmccard@0 {
0089 reg = <0>;
0090 compatible = "mmc-card";
0091 broken-hpi;
0092 };
0093 };
0094
0095 ®_usb0_vbus {
0096 gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
0097 };
0098
0099 &touchscreen {
0100 compatible = "chipone,icn8318";
0101 reg = <0x40>;
0102 /* The P66 uses a different EINT then the reference design */
0103 interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
0104 /* The icn8318 binding expects wake-gpios instead of power-gpios */
0105 wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
0106 touchscreen-size-x = <800>;
0107 touchscreen-size-y = <480>;
0108 touchscreen-inverted-x;
0109 touchscreen-swapped-x-y;
0110 status = "okay";
0111 };
0112
0113 &uart1 {
0114 /* The P66 uses the uart pins as gpios */
0115 status = "disabled";
0116 };