Received: by 10.192.165.148 with SMTP id m20csp2767991imm; Mon, 7 May 2018 00:20:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq49EFemJJO5WEFy1pDZYPKeXRK+OtwJ738EvLPZZ8v3pZV1tGQe0DZazzmPEq58riABrWk X-Received: by 2002:a17:902:8d8e:: with SMTP id v14-v6mr37501006plo.387.1525677612585; Mon, 07 May 2018 00:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525677612; cv=none; d=google.com; s=arc-20160816; b=rx6AuW6kG9swfs5iOnaM96t2c8tJRw35MH//0CEln1G4BefZMhTeKzR0FLraLC4TRU F2pwy9VO6uy39GRibs4ZHBAs+hugLjJyZBIp9LdgM/wRCdRq36i9rL3/E6KCdvL418Wi VoN3D9SLa3E7ACMhrcbJmyDJY+QG5Gx2lOssR8yrTf9HjtpMJOYkI8c/w3Pfhrf/FA8I F6hCQicI02bxGtdLA4zpbMlXvXrBKOdz4un99qpXw5Sk2HSSFJdOaatK5AjNrrMXYNaw 2ukveqjsRabsPtakcVF9FFPS2gwyOQ84VtWbVK6c4gK3yHpKTs0k9vodKhxdBtrZM8jn XX3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=6ZDD4Tir/JMtkRY2vgRaxnZ0Use5x8Q8MAuKoU6mUiQ=; b=CQNC9HtNynMaZLTnXL6VR4ru84Gjlzhmf9S59txqB3e7T7nTVJAlHwhI/MsYY2FoLw qyBj7J8liVgwJy6iHSvz1lkwhTsbB9DFgridTwUfyRU9poOMPyT+xjVwuxn7kQHPkKgd u4GSSP1Qxeyx+AgkJ6eY70mNiX7GKb/aEiG1jCusMKSDWxudJhFt8kvy2X+Nyc48mVpH Ax606smjHU38ziB2EOfQamcTj0hsP6Xpr0X/1lq5x+MhbOW9hE3HdHhlE/YEGI8rnjDF IXPz/8eyXG+etEAo5YQBzYu4n9ZToVfFdQ4V9Y7cb4n8uquA3uF7FEdUrf1d2+bmDR7K whOA== 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 33-v6si21855849plu.385.2018.05.07.00.19.57; Mon, 07 May 2018 00:20:12 -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 S1750998AbeEGHTq (ORCPT + 99 others); Mon, 7 May 2018 03:19:46 -0400 Received: from mail.bootlin.com ([62.4.15.54]:43164 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbeEGHTn (ORCPT ); Mon, 7 May 2018 03:19:43 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 841C9207BB; Mon, 7 May 2018 09:19:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 4EFAE20376; Mon, 7 May 2018 09:19:30 +0200 (CEST) Date: Mon, 7 May 2018 09:19:31 +0200 From: Maxime Ripard To: Paul Kocialkowski Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Rob Herring , Mark Rutland , Chen-Yu Tsai , Thierry Reding , devicetree@vger.kernel.org Subject: Re: [PATCH v3 3/3] ARM: dts: sun7i: Add support for the Ainol AW1 tablet Message-ID: <20180507071931.tebv45yxrojxxkeb@flea> References: <20180506214901.23429-1-contact@paulk.fr> <20180506214901.23429-3-contact@paulk.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="y6g2nzcki4pe24es" Content-Disposition: inline In-Reply-To: <20180506214901.23429-3-contact@paulk.fr> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --y6g2nzcki4pe24es Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sun, May 06, 2018 at 11:49:01PM +0200, Paul Kocialkowski wrote: > This adds support for the Ainol AW1, an A20-based 7" tablet from Ainol. >=20 > The following board-specific features are supported: > * LCD panel > * Backlight > * USB OTG > * Buttons > * Touchscreen (doesn't work without non-free firmware) > * Accelerometer > * Battery >=20 > The following are untested: > * Audio output > * Audio speakers > * USB via SPCI connector >=20 > The following are not supported: > * Wi-Fi > * Bluetooth > * NAND > * Audio via SPCI connector > * Audio via Bluetooth I2S >=20 > 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 >=20 > 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) +=3D \ > sun6i-a31s-sinovoip-bpi-m2.dtb \ > sun6i-a31s-yones-toptech-bs1078-v2.dtb > dtb-$(CONFIG_MACH_SUN7I) +=3D \ > + 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/dt= s/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+ This should be your first line. Also, we usually license our DT under a dual license (GPL and MIT) so that other projects (like FreeBSD) can use them as well, instead of duplicating them. It would be great if you'd consider it. > + */ > + > +/dts-v1/; > +#include "sun7i-a20.dtsi" > +#include "sunxi-common-regulators.dtsi" > + > +#include > +#include > +#include > +#include > + > +/ { > + model =3D "Ainol AW1"; > + compatible =3D "ainol,ainol-aw1", "allwinner,sun7i-a20"; > + > + aliases { > + serial0 =3D &uart0; > + }; > + > + chosen { > + stdout-path =3D "serial0:115200n8"; > + }; > + > + backlight: backlight { > + compatible =3D "pwm-backlight"; > + pwms =3D <&pwm 0 50000 PWM_POLARITY_INVERTED>; > + brightness-levels =3D <0 10 20 30 40 50 60 70 80 90 100>; The increase in perceived brightness should be linear. Usually, for PWMs backed backlight, an exponential list is a much better approximation. > + default-brightness-level =3D <5>; > + enable-gpios =3D <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ > + }; > + > + panel: panel { > + compatible =3D "innolux,at070tn90"; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + power-supply =3D <&panel_power>; > + backlight =3D <&backlight>; > + > + port@0 { > + reg =3D <0>; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + panel_input: endpoint@0 { > + reg =3D <0>; > + remote-endpoint =3D <&tcon0_out_panel>; > + }; > + }; > + }; > + > + panel_power: panel_power { > + compatible =3D "regulator-fixed"; > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&panel_power_pin>; > + regulator-name =3D "panel-power"; > + regulator-min-microvolt =3D <10400000>; > + regulator-max-microvolt =3D <10400000>; > + gpio =3D <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ > + enable-active-high; > + regulator-boot-on; > + }; > +}; > + > +&codec { > + allwinner,pa-gpios =3D <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ > + status =3D "okay"; > +}; > + > +&cpu0 { > + cpu-supply =3D <®_dcdc2>; > +}; > + > +&de { > + status =3D "okay"; > +}; > + > +&ehci0 { > + status =3D "okay"; > +}; > + > +&ehci1 { > + status =3D "okay"; > +}; > + > +&i2c0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&i2c0_pins_a>; > + status =3D "okay"; > + > + axp209: pmic@34 { > + reg =3D <0x34>; > + interrupt-parent =3D <&nmi_intc>; > + interrupts =3D <0 IRQ_TYPE_LEVEL_LOW>; > + }; > +}; > + > +&i2c1 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&i2c1_pins_a>; > + status =3D "okay"; > + > + lis3dh: accelerometer@18 { > + compatible =3D "st,lis3dh-accel"; > + reg =3D <0x18>; > + vdd-supply =3D <®_vcc3v3>; > + vddio-supply =3D <®_vcc3v3>; > + st,drdy-int-pin =3D <1>; > + }; > +}; > + > +&i2c2 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&i2c2_pins_a>; > + status =3D "okay"; > + clock-frequency =3D <400000>; > + > + gsl1680: touchscreen@40 { > + compatible =3D "silead,gsl1680"; > + reg =3D <0x40>; > + interrupt-parent =3D <&pio>; > + interrupts =3D <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ > + power-gpios =3D <&pio 7 20 GPIO_ACTIVE_HIGH>; /* PH20 */ > + firmware-name =3D "gsl1680-ainol-aw1.fw"; > + touchscreen-size-x =3D <480>; > + touchscreen-size-y =3D <800>; > + touchscreen-swapped-x-y; > + touchscreen-inverted-y; > + silead,max-fingers =3D <5>; > + }; > +}; > + > +&lradc { > + vref-supply =3D <®_ldo2>; > + status =3D "okay"; > + > + button@571 { > + label =3D "Volume Up"; > + linux,code =3D ; > + channel =3D <0>; > + voltage =3D <571428>; > + }; > + > + button@761 { > + label =3D "Volume Down"; > + linux,code =3D ; > + channel =3D <0>; > + voltage =3D <761904>; > + }; > + > + button@952 { > + label =3D "Home"; > + linux,code =3D ; > + channel =3D <0>; > + voltage =3D <952380>; > + }; > +}; > + > +&mmc0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&mmc0_pins_a>; > + vmmc-supply =3D <®_vcc3v3>; You have the regulators described in your DT, you'd better use them instead of the one coming from sunxi-common-regulators.dtsi. > + bus-width =3D <4>; > + cd-gpios =3D <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ > + cd-inverted; > + status =3D "okay"; > +}; > + > +&ohci0 { > + status =3D "okay"; > +}; > + > +&ohci1 { > + status =3D "okay"; > +}; > + > +&otg_sram { > + status =3D "okay"; > +}; > + > +&pio { > + panel_power_pin: panel_power_pin@0 { > + pins =3D "PH8"; > + function =3D "gpio_out"; > + }; > +}; You don't need that pinctrl node. Maxime --=20 Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com --y6g2nzcki4pe24es Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlrv/gIACgkQ0rTAlCFN r3S4UA//UubFJ13xD4IpAyFnbvWrCjeIWtq2X4UddRSR0w1iLgZb2e4piqvGLa5H QBOS89vTHtjPxJVhdtZkX4bTHy/E+GMa1fQuMNGlVetRvYQfUx9XXabFMwQXVgw9 8bdVeyB1AxNDm7PID49cjQcYJtW6005+e1CjMKi6/IR683iXhGqwuS9HfojwXK/Y oZakCLNWebFfY8fo91dtvjgzTWrgSvH3uDQKQDam3EBLLO0U3BRF9A6emrNQ33tz 3K/bxuk7B6zzbNHvG9ZUw9iruP4OBOfCBZaQnnWcwbC38OQ6XvnfEIm+haHJ8Awv CkOh2DCyMYvE47FKb65yfhB1bGGdOBySinnPkAazFtW2LC/1VzhtO+Ctdpl8A1Hk HMIwQAp1Ped7+2puRamhc9QVf0YRt1UyUaSShngjcGTMQEEm+sGNUS78GO5mpHKb Qu2bE0MVRsxhYPxjrt9X+faF3P3WDdm3LrIelmZqWn5W9M0s/k4U4avXVM2Aahff PxUwFLuOd5NOLKzr+XVcNoTibsKoEQXvXLORyR+dux0/NsmSFaH06QyOpkl62cxA 1w6B108mWaoFxLm6/Ea6dcg35gV+GPgBGnnifZpGpl8ZcPkNXDsakVjePIHxxQ/8 c3htBM+2niylOtDST0YVU+4YxKahTwZVKme8oUqYzqw8wB5gqy4= =RXn1 -----END PGP SIGNATURE----- --y6g2nzcki4pe24es--