153ab4af3SHans de Goede/* 253ab4af3SHans de Goede * Copyright 2015 Hans de Goede <hdegoede@redhat.com> 353ab4af3SHans de Goede * 453ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms 553ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 653ab4af3SHans de Goede * licensing only applies to this file, and not this project as a 753ab4af3SHans de Goede * whole. 853ab4af3SHans de Goede * 953ab4af3SHans de Goede * a) This file is free software; you can redistribute it and/or 1053ab4af3SHans de Goede * modify it under the terms of the GNU General Public License as 1153ab4af3SHans de Goede * published by the Free Software Foundation; either version 2 of the 1253ab4af3SHans de Goede * License, or (at your option) any later version. 1353ab4af3SHans de Goede * 1453ab4af3SHans de Goede * This file is distributed in the hope that it will be useful, 1553ab4af3SHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 1653ab4af3SHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1753ab4af3SHans de Goede * GNU General Public License for more details. 1853ab4af3SHans de Goede * 1953ab4af3SHans de Goede * Or, alternatively, 2053ab4af3SHans de Goede * 2153ab4af3SHans de Goede * b) Permission is hereby granted, free of charge, to any person 2253ab4af3SHans de Goede * obtaining a copy of this software and associated documentation 2353ab4af3SHans de Goede * files (the "Software"), to deal in the Software without 2453ab4af3SHans de Goede * restriction, including without limitation the rights to use, 2553ab4af3SHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 2653ab4af3SHans de Goede * sell copies of the Software, and to permit persons to whom the 2753ab4af3SHans de Goede * Software is furnished to do so, subject to the following 2853ab4af3SHans de Goede * conditions: 2953ab4af3SHans de Goede * 3053ab4af3SHans de Goede * The above copyright notice and this permission notice shall be 3153ab4af3SHans de Goede * included in all copies or substantial portions of the Software. 3253ab4af3SHans de Goede * 3353ab4af3SHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 3453ab4af3SHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 3553ab4af3SHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 3653ab4af3SHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 3753ab4af3SHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 3853ab4af3SHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 3953ab4af3SHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4053ab4af3SHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 4153ab4af3SHans de Goede */ 4253ab4af3SHans de Goede 4353ab4af3SHans de Goede/dts-v1/; 4453ab4af3SHans de Goede#include "sun5i-a13.dtsi" 45860fbdd4SHans de Goede#include "sun5i-reference-design-tablet.dtsi" 468b1ba941SHans de Goede#include <dt-bindings/interrupt-controller/irq.h> 4753ab4af3SHans de Goede 4853ab4af3SHans de Goede/ { 4953ab4af3SHans de Goede model = "Utoo P66"; 5053ab4af3SHans de Goede compatible = "utoo,p66", "allwinner,sun5i-a13"; 5153ab4af3SHans de Goede 52860fbdd4SHans de Goede /* The P66 uses the uart pins as gpios */ 53860fbdd4SHans de Goede aliases { 54860fbdd4SHans de Goede /delete-property/serial0; 55860fbdd4SHans de Goede }; 56860fbdd4SHans de Goede 57860fbdd4SHans de Goede chosen { 58860fbdd4SHans de Goede /delete-property/stdout-path; 5980e5f83cSHans de Goede }; 6080e5f83cSHans de Goede 6153ab4af3SHans de Goede i2c_lcd: i2c@0 { 6253ab4af3SHans de Goede /* The lcd panel i2c interface is hooked up via gpios */ 6353ab4af3SHans de Goede compatible = "i2c-gpio"; 6453ab4af3SHans de Goede pinctrl-names = "default"; 6553ab4af3SHans de Goede pinctrl-0 = <&i2c_lcd_pins>; 6653ab4af3SHans de Goede gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>, /* PG12, sda */ 6753ab4af3SHans de Goede <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10, scl */ 6853ab4af3SHans de Goede i2c-gpio,delay-us = <5>; 6953ab4af3SHans de Goede }; 7053ab4af3SHans de Goede}; 7153ab4af3SHans de Goede 72860fbdd4SHans de Goede&backlight { 73860fbdd4SHans de Goede /* Note levels of 10 / 20% result in backlight off */ 74860fbdd4SHans de Goede brightness-levels = <0 30 40 50 60 70 80 90 100>; 75860fbdd4SHans de Goede default-brightness-level = <6>; 76860fbdd4SHans de Goede}; 77860fbdd4SHans de Goede 7880e5f83cSHans de Goede&codec { 7980e5f83cSHans de Goede allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */ 8080e5f83cSHans de Goede}; 8180e5f83cSHans de Goede 82860fbdd4SHans de Goede&codec_pa_pin { 83*13b36facSJagan Teki pins = "PG3"; 8453ab4af3SHans de Goede}; 8553ab4af3SHans de Goede 8653ab4af3SHans de Goede&mmc2 { 8753ab4af3SHans de Goede pinctrl-names = "default"; 8853ab4af3SHans de Goede pinctrl-0 = <&mmc2_pins_a>; 8953ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 9053ab4af3SHans de Goede bus-width = <8>; 9153ab4af3SHans de Goede non-removable; 9253ab4af3SHans de Goede status = "okay"; 9353ab4af3SHans de Goede 9453ab4af3SHans de Goede mmccard: mmccard@0 { 9553ab4af3SHans de Goede reg = <0>; 9653ab4af3SHans de Goede compatible = "mmc-card"; 9753ab4af3SHans de Goede broken-hpi; 9853ab4af3SHans de Goede }; 9953ab4af3SHans de Goede}; 10053ab4af3SHans de Goede 10153ab4af3SHans de Goede&pio { 10253ab4af3SHans de Goede i2c_lcd_pins: i2c_lcd_pin@0 { 103*13b36facSJagan Teki pins = "PG10", "PG12"; 104*13b36facSJagan Teki function = "gpio_out"; 105*13b36facSJagan Teki bias-pull-up; 10653ab4af3SHans de Goede }; 10753ab4af3SHans de Goede}; 10853ab4af3SHans de Goede 10953ab4af3SHans de Goede®_usb0_vbus { 11053ab4af3SHans de Goede gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ 11153ab4af3SHans de Goede}; 11253ab4af3SHans de Goede 113*13b36facSJagan Teki&touchscreen { 114*13b36facSJagan Teki compatible = "chipone,icn8318"; 115*13b36facSJagan Teki reg = <0x40>; 116*13b36facSJagan Teki /* The P66 uses a different EINT then the reference design */ 117*13b36facSJagan Teki interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */ 118*13b36facSJagan Teki /* The icn8318 binding expects wake-gpios instead of power-gpios */ 119*13b36facSJagan Teki wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ 120*13b36facSJagan Teki touchscreen-size-x = <800>; 121*13b36facSJagan Teki touchscreen-size-y = <480>; 122*13b36facSJagan Teki touchscreen-inverted-x; 123*13b36facSJagan Teki touchscreen-swapped-x-y; 124*13b36facSJagan Teki status = "okay"; 125*13b36facSJagan Teki}; 126*13b36facSJagan Teki 127860fbdd4SHans de Goede&uart1 { 128860fbdd4SHans de Goede /* The P66 uses the uart pins as gpios */ 129860fbdd4SHans de Goede status = "disabled"; 130da52a4a3SHans de Goede}; 131da52a4a3SHans de Goede 132860fbdd4SHans de Goede&usb0_vbus_pin_a { 133*13b36facSJagan Teki pins = "PB4"; 13453ab4af3SHans de Goede}; 135