Received: by 10.213.65.68 with SMTP id h4csp276590imn; Tue, 13 Mar 2018 04:10:02 -0700 (PDT) X-Google-Smtp-Source: AG47ELv++8LJVfteFo4hPGIMOSZWnqLAxD8v/S30tcpEewHY3cWipzOqfwxns/u+5ToZBP/uVrDG X-Received: by 2002:a17:902:6ac2:: with SMTP id i2-v6mr187748plt.368.1520939402605; Tue, 13 Mar 2018 04:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520939402; cv=none; d=google.com; s=arc-20160816; b=h78ya6z+BjBblcDxcZw1/dPmxLAEs1oWVXe91uwWmhs3LP0QyEHbm1zcWZ1zAmh6Mx 996MhlYwLdbRAwFVM2ZHOfNZsN3mwtY5DSSbCIYDNA561UqwFpIqWiI+iM5xNWZbWDIc wA+Gwos4sgW7e6H62g+ZGBCquZ1BkeW7H5+lbET/DsV/HkR7yHVw/bR07hxzCkDQxm+R YKGJ1UgHZtKTa/6G3027nyOmtTfQoLM18yvKTY0b5qGXyf8goN1Exy8wB9eSkyOyQWw5 nlS9FAmyfZL96y7iF9mv5SZeu3KmiS+5syOoVJEEMcJ293pSHldpZb3WEn+7yhhKdlOp aQMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :content-id:mime-version:comments:references:in-reply-to:subject:cc :to:from:arc-authentication-results; bh=8cE1UM7cnSIH4xkbaSnRmBVARyXfcI7O2WJ5+6pBPUU=; b=QOO4PAeUUePs1gEPbfyI9TkLKvCSa9Q02+06WV3ViNt/+71EMOevVRaCDdPm8GnVvd l0frljU11JglvAUUPbup4yg2gSBCWdi91464tY8jFeFxnkKOezaWO9bsrS31rMkj3i5i sTdCDpHNHifwKwaXf83DhLi2ucfwTmDn94KPAq+QoYV1vO3cH5oiQFOnX7MDsgLh5fxU NBQwtnAhOSNDB8QOsm/l+d4AGt47hdyNpBpfLvlDAsNWdcoz9Si+E0WnF2haZPCjiXOn Zfs6+WCFy0eEnj6F/RD+MgJE5KmtUhIu6KSoGg0mGLOR/okHsQYWnbWX01WPNCTHTM73 0nkQ== 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 f33-v6si49897plb.482.2018.03.13.04.09.48; Tue, 13 Mar 2018 04:10:02 -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 S932609AbeCMLHp convert rfc822-to-8bit (ORCPT + 99 others); Tue, 13 Mar 2018 07:07:45 -0400 Received: from h1.radempa.de ([176.9.142.194]:45835 "EHLO mail.cosmopool.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752396AbeCMLHn (ORCPT ); Tue, 13 Mar 2018 07:07:43 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cosmopool.net (Postfix) with ESMTP id 8E5239002AC; Tue, 13 Mar 2018 12:07:41 +0100 (CET) Received: from mail.cosmopool.net ([127.0.0.1]) by localhost (mail.your-server.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y0MVs7Zin-ld; Tue, 13 Mar 2018 12:07:40 +0100 (CET) Received: from stardust.g4.wien.funkfeuer.at (178.113.193.8.wireless.dyn.drei.com [178.113.193.8]) by mail.cosmopool.net (Postfix) with ESMTPSA id 69D99900252; Tue, 13 Mar 2018 12:07:40 +0100 (CET) Received: from lambda by stardust.g4.wien.funkfeuer.at with local (Exim 4.89) (envelope-from ) id 1evhmK-0000OI-Nw; Tue, 13 Mar 2018 12:07:36 +0100 From: Harald Geyer To: Maxime Ripard cc: Chen-Yu Tsai , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andre Przywara , Icenowy Zheng , info@olimex.com Subject: Re: [PATCH 5/5] arm64: allwinner: a64: Add support for TERES I laptop In-reply-to: <20180313084108.uh3ui5jwin2knvuu@flea> References: <20180312161050.7647-1-harald@ccbib.org> <20180312161050.7647-6-harald@ccbib.org> <20180313084108.uh3ui5jwin2knvuu@flea> Comments: In-reply-to Maxime Ripard message dated "Tue, 13 Mar 2018 09:41:08 +0100." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1504.1520939256.1@stardust.g4.wien.funkfeuer.at> Content-Transfer-Encoding: 8BIT Date: Tue, 13 Mar 2018 12:07:36 +0100 Message-Id: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > Maxime Ripard writes: > > Hi, > > On Mon, Mar 12, 2018 at 04:10:50PM +0000, Harald Geyer wrote: >> The TERES I is an open hardware laptop built by Olimex using the >> Allwinner A64 SoC. >> >> Add the board specific .dts file, which includes the A64 .dtsi and >> enables the peripherals that we support so far. >> >> Signed-off-by: Harald Geyer >> --- >> arch/arm64/boot/dts/allwinner/Makefile | 1 + >> .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 308 +++++++++++++++++++++ >> 2 files changed, 309 insertions(+) >> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts >> >> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile >> index f505227b0250..5f073f7423b7 100644 >> --- a/arch/arm64/boot/dts/allwinner/Makefile >> +++ b/arch/arm64/boot/dts/allwinner/Makefile >> @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb >> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts >> new file mode 100644 >> index 000000000000..0d42b5111f0f >> --- /dev/null >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts >> @@ -0,0 +1,308 @@ >> +/* >> + * Copyright (C) Harald Geyer >> + * based on sun50i-a64-olinuxino.dts by Jagan Teki >> + * >> + * 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 library 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 library 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 an SPDX header here to define the license Ok, I will strip the actual text then. Nice. >> + >> +/dts-v1/; >> + >> +#include "sun50i-a64.dtsi" >> + >> +#include >> +#include >> +#include >> + >> +/ { >> + model = "Olimex Teres I A64"; > > It's called the Teres-I, there's no need for the A64 here Olimex said in the past they want the Teres to be very modular, with boards for different SoCs compatible with each other on the level of external pins. The PCBs we have right now are labled like TERES_PCB1-A64-MAIN, TERES-PCB2-IO, etc. - I wouldn't be surprised if they start selling TERES_PCB1-x86-MAIN to be put into your average Teres I, so I felt this naming was safer. However I specifically CCed them on this series, so they can comment on issues such as this one... >> + compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64"; > > Or in the compatible > >> + >> + aliases { >> + serial0 = &uart0; >> + }; >> + >> + backlight: backlight { >> + compatible = "pwm-backlight"; >> + pwms = <&pwm 0 50000 0>; >> + brightness-levels = <0 10 20 30 40 50 60 70 100>; >> + default-brightness-level = <3>; >> + enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ >> + }; >> + >> + chosen { >> + stdout-path = "serial0:115200n8"; >> + >> + framebuffer-lcd { >> + eDP25-supply = <®_dldo2>; >> + eDP12-supply = <®_dldo3>; >> + }; >> + }; >> + >> + gpio-keys { >> + compatible = "gpio-keys"; >> + >> + lid-switch { >> + label = "Lid Switch"; >> + gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ >> + linux,input-type = ; >> + linux,code = ; >> + }; >> + }; >> + >> + leds: leds { > > Do you need a label? Here probably not. >> + compatible = "gpio-leds"; >> + >> + led_capslock: capslock { > > Same thing here I was kind of hoping I could use it to link the led to the keyboard, so that it goes on when the capslock key is pressed. But no such luck: 1) There seems to be no binding for external leds in the input subsystem. 2) The keyboard is a usb one and get enumerated automatically, so not DT node by default. I guess I can remove it, but then I guess labels for the leds might be helpful when further customizing the DT locally, so why not just keep them? >> + gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */ > > Ideally you should have LED labels here, following the scheme > devicename:colour:function Okay. >> + }; >> + >> + led_numlock: numlock { >> + gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */ >> + }; >> + }; >> + >> + reg_usb1_vbus: usb1-vbus { >> + compatible = "regulator-fixed"; >> + regulator-name = "usb1-vbus"; >> + regulator-min-microvolt = <5000000>; >> + regulator-max-microvolt = <5000000>; >> + enable-active-high; >> + gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ >> + status = "okay"; > > I guess this one has a parent regulator too? Unless I failed to read the schematic correctly: No. The step-up converter providing 5V power for the usb1-vbus is connected directly to the IPS (intelligent power source) output of the PMIC and enabled directly by the 3.3V supply. So technically of course there is a parent regulator, but nothing we can control from software. >> + }; >> + >> + wifi_pwrseq: wifi_pwrseq { >> + compatible = "mmc-pwrseq-simple"; >> + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ >> + }; >> +}; >> + >> +&ehci1 { >> + status = "okay"; >> +}; >> + >> +&i2c0 { >> + clock-frequency = <100000>; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&i2c0_pins>; >> + status = "okay"; >> +}; > > What is this used for? As explained in the other message in more detail: The ANX6345 eDP-bridge. Thanks for the review, Harald > Looks good otherwise, thanks! > Maxime > > -- > Maxime Ripard, Bootlin (formerly Free Electrons) > Embedded Linux and Kernel engineering > https://bootlin.com