Received: by 10.192.165.148 with SMTP id m20csp2429482imm; Sun, 6 May 2018 14:51:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpJEzzKI+xUiymc4DKqoq+CYBqh8+2Ii2yA1u+WCiobNOLc3Y29rGkrgixTeJgRcJWe6c2H X-Received: by 2002:a63:7c15:: with SMTP id x21-v6mr28195347pgc.209.1525643476412; Sun, 06 May 2018 14:51:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525643476; cv=none; d=google.com; s=arc-20160816; b=ZVOA+C8MBMXoyI5VhRy2r+mHADM8b7KJpExcj2VHezwQJebHi/XegAfeeQHzVyzvlI R9Nw9appN6cUuz0/6zVup4JI7qXrVkL6DG+cER57d8IJ4EM6mGt9zBtqekJ+c16wTRuq mcKIDBP0nLg5qud1FLg76GnU53UT/t77lfNhq9r6YzTkxnCnsaoOgMYsikudxAY5hYkM dRe/mMVRLvAkmaIP7fHD9HSSzq5JeO8KSgWvRFQp21Wdz8LRdJNpxSZF3/728zXX+uMy ryCsn+wWPOvGEskMuOTkp87ghGelOSeYMVU+PSqcywgrNBJKDQk/A2Oqo93k+0E3/Xeo HmFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=oBsjSUaYyzPWa+GWLFbdvBDzR2qP/09Qt63M7wnfK4E=; b=H9wVTfFxSDfDJ0TMmTFzLo7Nk4VfDcUFviHKYRAKscL4tAqVBNcCRFA5q/wNxH2P+I xjIfcxb/EAIzpiZL2xdXW7q1fReghpmIyy3sRskZDPNKnZC6KlAwoJ8CdfnRnEG+wtL9 SRGzXPrmyGyzMZ54zo1VIKK74OergaLF5mCBGb0ZEWlBVYfyCVN5jLXAsuFsjd2uUi9H ddv0t3ymuwRoHyr2kdU79tCBx/TK26e28gdpWdZxSnyviO/xAz2KPenmyWxZZT+hjoSu rJWWJ4z/wJpDt0XKE/8+2DwpA99hFaZ4YN/m1B05ExFI0rk9rfb90QWzoUIJ4PLuI/Sq 4WGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j7si944390pfj.267.2018.05.06.14.51.02; Sun, 06 May 2018 14:51:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751949AbeEFVuH (ORCPT + 99 others); Sun, 6 May 2018 17:50:07 -0400 Received: from leonov.paulk.fr ([185.233.101.22]:55018 "EHLO leonov.paulk.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751834AbeEFVuE (ORCPT ); Sun, 6 May 2018 17:50:04 -0400 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 4978EC02C9; Sun, 6 May 2018 23:50:02 +0200 (CEST) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 4088CC0D53; Sun, 6 May 2018 23:50:01 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id 50AD1C0D47; Sun, 6 May 2018 23:49:05 +0200 (CEST) From: Paul Kocialkowski To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Thierry Reding , devicetree@vger.kernel.org, Paul Kocialkowski Subject: [PATCH v3 3/3] ARM: dts: sun7i: Add support for the Ainol AW1 tablet Date: Sun, 6 May 2018 23:49:01 +0200 Message-Id: <20180506214901.23429-3-contact@paulk.fr> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180506214901.23429-1-contact@paulk.fr> References: <20180506214901.23429-1-contact@paulk.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds support for the Ainol AW1, an A20-based 7" tablet from Ainol. The following board-specific features are supported: * LCD panel * Backlight * USB OTG * Buttons * Touchscreen (doesn't work without non-free firmware) * Accelerometer * Battery The following are untested: * Audio output * Audio speakers * USB via SPCI connector The following are not supported: * Wi-Fi * Bluetooth * NAND * Audio via SPCI connector * Audio via Bluetooth I2S Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun7i-a20-ainol-aw1.dts | 275 ++++++++++++++++++++++ 2 files changed, 276 insertions(+) create mode 100644 arch/arm/boot/dts/sun7i-a20-ainol-aw1.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 7e2424957809..4a80971f2bc9 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -946,6 +946,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31s-sinovoip-bpi-m2.dtb \ sun6i-a31s-yones-toptech-bs1078-v2.dtb dtb-$(CONFIG_MACH_SUN7I) += \ + sun7i-a20-ainol-aw1.dtb \ sun7i-a20-bananapi.dtb \ sun7i-a20-bananapi-m1-plus.dtb \ sun7i-a20-bananapro.dtb \ diff --git a/arch/arm/boot/dts/sun7i-a20-ainol-aw1.dts b/arch/arm/boot/dts/sun7i-a20-ainol-aw1.dts new file mode 100644 index 000000000000..9a1d54a9f9a0 --- /dev/null +++ b/arch/arm/boot/dts/sun7i-a20-ainol-aw1.dts @@ -0,0 +1,275 @@ +/* + * Copyright (C) 2018 Paul Kocialkowski + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +#include "sun7i-a20.dtsi" +#include "sunxi-common-regulators.dtsi" + +#include +#include +#include +#include + +/ { + model = "Ainol AW1"; + compatible = "ainol,ainol-aw1", "allwinner,sun7i-a20"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; + default-brightness-level = <5>; + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + }; + + panel: panel { + compatible = "innolux,at070tn90"; + #address-cells = <1>; + #size-cells = <0>; + power-supply = <&panel_power>; + backlight = <&backlight>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + panel_input: endpoint@0 { + reg = <0>; + remote-endpoint = <&tcon0_out_panel>; + }; + }; + }; + + panel_power: panel_power { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&panel_power_pin>; + regulator-name = "panel-power"; + regulator-min-microvolt = <10400000>; + regulator-max-microvolt = <10400000>; + gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ + enable-active-high; + regulator-boot-on; + }; +}; + +&codec { + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ + status = "okay"; +}; + +&cpu0 { + cpu-supply = <®_dcdc2>; +}; + +&de { + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + axp209: pmic@34 { + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; + status = "okay"; + + lis3dh: accelerometer@18 { + compatible = "st,lis3dh-accel"; + reg = <0x18>; + vdd-supply = <®_vcc3v3>; + vddio-supply = <®_vcc3v3>; + st,drdy-int-pin = <1>; + }; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; + clock-frequency = <400000>; + + gsl1680: touchscreen@40 { + compatible = "silead,gsl1680"; + reg = <0x40>; + interrupt-parent = <&pio>; + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ + power-gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* PH20 */ + firmware-name = "gsl1680-ainol-aw1.fw"; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + touchscreen-swapped-x-y; + touchscreen-inverted-y; + silead,max-fingers = <5>; + }; +}; + +&lradc { + vref-supply = <®_ldo2>; + status = "okay"; + + button@571 { + label = "Volume Up"; + linux,code = ; + channel = <0>; + voltage = <571428>; + }; + + button@761 { + label = "Volume Down"; + linux,code = ; + channel = <0>; + voltage = <761904>; + }; + + button@952 { + label = "Home"; + linux,code = ; + channel = <0>; + voltage = <952380>; + }; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ + cd-inverted; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&otg_sram { + status = "okay"; +}; + +&pio { + panel_power_pin: panel_power_pin@0 { + pins = "PH8"; + function = "gpio_out"; + }; +}; + +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pins_a>; + status = "okay"; +}; + +&tcon0 { + pinctrl-names = "default"; + pinctrl-0 = <&lcd0_rgb666_pins>; + status = "okay"; +}; + +&tcon0_out { + tcon0_out_panel: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +}; + +#include "axp209.dtsi" + +&battery_power_supply { + status = "okay"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1450000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-int-dll"; +}; + +®_ldo1 { + regulator-name = "vdd-rtc"; +}; + +®_ldo2 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "avcc"; +}; + +®_usb0_vbus { + status = "okay"; +}; + +®_usb1_vbus { + status = "okay"; +}; + +®_usb2_vbus { + status = "okay"; +}; + +&usb_power_supply { + status = "okay"; +}; -- 2.17.0