From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIM_ADSP_ALL,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E9E6C10DCE for ; Tue, 10 Mar 2020 23:36:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C26C21927 for ; Tue, 10 Mar 2020 23:36:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="l2OYHYiu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C26C21927 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BE266E915; Tue, 10 Mar 2020 23:36:20 +0000 (UTC) Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by gabe.freedesktop.org (Postfix) with ESMTPS id C3E806E2E8 for ; Tue, 10 Mar 2020 14:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1583848922; bh=N+yAQNJfmeluvRI5yrMm83q2c3zIc6ZyA0qtUbad/jY=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=l2OYHYiueAA8UgpldQaFJDTj9zvEeLcKkQ/Dzm0eG/wkA15XIiILdoZ+LAvS9vKmg Iqw/OAKdm1B8N9f9iYPo3FWSkk5HKyf/kiYZbWAmrxETsMO84n9tMaPdNsoFx9boxq bF86Nx0lVl1XDoNBKZiw2aLU5R8sLs3m93bGs+/4= Date: Tue, 10 Mar 2020 15:02:02 +0100 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Pascal Roeleven Subject: Re: [linux-sunxi] [PATCH 2/2] ARM: dts: sun4i: Add support for Topwise A721 tablet Message-ID: <20200310140202.ntydtg4seosb2aqs@core.my.home> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Pascal Roeleven , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com References: <20200310102725.14591-1-dev@pascalroeleven.nl> <20200310102725.14591-3-dev@pascalroeleven.nl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200310102725.14591-3-dev@pascalroeleven.nl> X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED X-Mailman-Approved-At: Tue, 10 Mar 2020 23:36:13 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, David Airlie , linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Thierry Reding , dri-devel@lists.freedesktop.org, Sam Ravnborg , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hello Pascal, On Tue, Mar 10, 2020 at 11:27:24AM +0100, Pascal Roeleven wrote: > The Topwise A721/LY-F1 tablet is a tablet sold around 2012 under > different brands. The mainboard mentions A721 clearly, so this tablet > is best known under this name. > > Signed-off-by: Pascal Roeleven > --- > arch/arm/boot/dts/Makefile | 3 +- > arch/arm/boot/dts/sun4i-a10-topwise-a721.dts | 302 +++++++++++++++++++ > 2 files changed, 304 insertions(+), 1 deletion(-) > create mode 100644 arch/arm/boot/dts/sun4i-a10-topwise-a721.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 78f144e33..6e6141e00 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -1040,7 +1040,8 @@ dtb-$(CONFIG_MACH_SUN4I) += \ > sun4i-a10-olinuxino-lime.dtb \ > sun4i-a10-pcduino.dtb \ > sun4i-a10-pcduino2.dtb \ > - sun4i-a10-pov-protab2-ips9.dtb > + sun4i-a10-pov-protab2-ips9.dtb \ > + sun4i-a10-topwise-a721.dtb > dtb-$(CONFIG_MACH_SUN5I) += \ > sun5i-a10s-auxtek-t003.dtb \ > sun5i-a10s-auxtek-t004.dtb \ > diff --git a/arch/arm/boot/dts/sun4i-a10-topwise-a721.dts b/arch/arm/boot/dts/sun4i-a10-topwise-a721.dts > new file mode 100644 > index 000000000..ff43c9c12 > --- /dev/null > +++ b/arch/arm/boot/dts/sun4i-a10-topwise-a721.dts > @@ -0,0 +1,302 @@ > +/* > + * Copyright 2020 Pascal Roeleven > + * > + * This file is dual-licensed: you can use it either under the terms > + * of the GPL or the X11 license, at your option. Note that this dual > + * licensing only applies to this file, and not this project as a > + * whole. > + * > + * a) This file is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of the > + * License, or (at your option) any later version. > + * > + * This file is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * Or, alternatively, > + * > + * b) Permission is hereby granted, free of charge, to any person > + * obtaining a copy of this software and associated documentation > + * files (the "Software"), to deal in the Software without > + * restriction, including without limitation the rights to use, > + * copy, modify, merge, publish, distribute, sublicense, and/or > + * sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following > + * conditions: > + * > + * The above copyright notice and this permission notice shall be > + * included in all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + */ You should use SPDX license identifier instead of boilerplate license text. > +/dts-v1/; > +#include "sun4i-a10.dtsi" > +#include "sunxi-common-regulators.dtsi" > + > +#include > +#include > +#include > +#include > + > +/ { > + model = "Topwise A721"; > + compatible = "topwise,a721", "allwinner,sun4i-a10"; topwise is not in vendor-prefixes.yaml > + aliases { > + serial0 = &uart0; > + }; > + > + backlight: backlight { > + compatible = "pwm-backlight"; > + pwms = <&pwm 0 100000 PWM_POLARITY_INVERTED>; > + power-supply = <®_vbat>; > + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ > + brightness-levels = <0 30 40 50 60 70 80 90 100>; > + default-brightness-level = <8>; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + panel: panel { > + compatible = "starry,kr070pe2t"; > + backlight = <&backlight>; > + power-supply = <®_lcd_power>; > + > + port { > + panel_input: endpoint { > + remote-endpoint = <&tcon0_out_panel>; > + }; > + }; > + }; > + > + reg_lcd_power: reg-lcd-power { > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&lcd_power_pin>; > + regulator-name = "reg-lcd-power"; > + gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ > + enable-active-high; > + }; > + > + reg_vbat: reg-vbat { > + compatible = "regulator-fixed"; > + regulator-name = "vbat"; > + regulator-min-microvolt = <3700000>; > + regulator-max-microvolt = <3700000>; > + }; > + > +}; > + > +&codec { > + status = "okay"; > +}; > + > +&cpu0 { > + cpu-supply = <®_dcdc2>; > +}; > + > +&de { > + status = "okay"; > +}; > + > +&ehci0 { > + status = "okay"; > +}; > + > +&ehci1 { > + status = "okay"; > +}; > + > +&i2c0 { > + status = "okay"; > + > + axp209: pmic@34 { > + reg = <0x34>; > + interrupts = <0>; > + }; > +}; > + > +#include "axp209.dtsi" > + > +&ac_power_supply { > + status = "okay"; > +}; > + > +&battery_power_supply { > + status = "okay"; > +}; > + > +&i2c1 { > + status = "okay"; > + > + mma7660: accelerometer@4c { > + compatible = "fsl,mma7660"; > + reg = <0x4c>; > + }; > +}; > + > +&i2c2 { > + status = "okay"; > + > + ft5406ee8: touchscreen@38 { > + compatible = "edt,edt-ft5406"; > + reg = <0x38>; > + interrupt-parent = <&pio>; > + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; > + touchscreen-size-x = <800>; > + touchscreen-size-y = <480>; > + vcc-supply = <®_vcc3v3>; > + }; > +}; > + > +&lradc { > + vref-supply = <®_ldo2>; > + status = "okay"; > + > + button-vol-down { > + label = "Volume Down"; > + linux,code = ; > + channel = <0>; > + voltage = <761904>; > + }; > + > + button-vol-up { > + label = "Volume Up"; > + linux,code = ; > + channel = <0>; > + voltage = <571428>; > + }; > +}; > + > +&mmc0 { > + vmmc-supply = <®_vcc3v3>; > + bus-width = <4>; > + cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH01 */ > + status = "okay"; > +}; > + > +&ohci0 { > + status = "okay"; > +}; > + > +&ohci1 { > + status = "okay"; > +}; > + > +&otg_sram { > + status = "okay"; > +}; > + > +&pio { > + vcc-pb-supply = <®_vcc3v3>; > + vcc-pf-supply = <®_vcc3v3>; > + vcc-ph-supply = <®_vcc3v3>; > + > + lcd_power_pin: lcd-power-pin { > + pins = "PH8"; > + function = "gpio_out"; > + bias-pull-up; > + }; > + > + usb0_id_detect_pin: usb0-id-detect-pin { > + pins = "PH4"; > + function = "gpio_in"; > + bias-pull-up; > + }; > + > + usb0_vbus_detect_pin: usb0-vbus-detect-pin { > + pins = "PH5"; > + function = "gpio_in"; > + bias-pull-down; > + }; All 3 nodes above can be replaced with appropriate GPIO_PULL_UP / GPIO_PULL_DOWN macros inside the *-gpios property. > +}; > + > +&pwm { > + pinctrl-names = "default"; > + pinctrl-0 = <&pwm0_pin>; > + status = "okay"; > +}; > + > +®_dcdc2 { > + regulator-always-on; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1400000>; > + regulator-name = "vdd-cpu"; > +}; > + > +®_dcdc3 { > + regulator-always-on; > + regulator-min-microvolt = <1250000>; > + regulator-max-microvolt = <1250000>; > + regulator-name = "vdd-int-dll"; > +}; > + > + You have extra space here ^ > +®_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"; > +}; > + > +&tcon0_out { > + tcon0_out_panel: endpoint@0 { > + reg = <0>; > + remote-endpoint = <&panel_input>; > + }; > +}; > + > +&uart0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_pb_pins>; > + status = "okay"; > +}; > + > +&usb_otg { > + dr_mode = "otg"; > + status = "okay"; > +}; > + > +&usb_power_supply { > + status = "okay"; > +}; > + > +&usbphy { > + pinctrl-names = "default"; > + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; No need to use pinctrl to configure regular GPIO functions anymore. regards, Ondrej > + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ > + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ > + usb0_vbus-supply = <®_usb0_vbus>; > + usb1_vbus-supply = <®_usb1_vbus>; > + usb2_vbus-supply = <®_usb2_vbus>; > + status = "okay"; > +}; > -- > 2.20.1 > > -- > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. > To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200310102725.14591-3-dev%40pascalroeleven.nl. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel