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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 03158C63777 for ; Mon, 23 Nov 2020 09:43:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8457F2078E for ; Mon, 23 Nov 2020 09:43:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=fossekall.de header.i=@fossekall.de header.b="lQ3z59+Y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727922AbgKWJnR (ORCPT ); Mon, 23 Nov 2020 04:43:17 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.53]:30350 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725275AbgKWJnQ (ORCPT ); Mon, 23 Nov 2020 04:43:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606124591; s=strato-dkim-0002; d=fossekall.de; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=X00269bVq/tKBXSY9ndHMPgqQzKkKX6R0AKx7WaQNw4=; b=lQ3z59+YaUNGqpDO3J+9s7vPhUyyeR6ObiCTHtZTi7F1HqN4m1kVkp1lfea/o9riTh FzhZCpZis6gnFa5PQGU1Cokbbt+lFV3ffrDJLktgiFnKHe0U607oHpl5V3IoQ1Y0epN+ hSFwE10eSzZ1IQegGEDckgmRwPf9X5j4DHTJMg8PaE8or3rKv0hDV4DcIA4quw6SC4wl yeYGcWCxz+r4TuZlSquT/pYEf+h/q3/1/QwZQHcwES3G6Pj22YARx53CgXnQSmnKTqbz L3pUXVzTNaMhOIc/4D+LtFKKzJuPbYWqxLlia0kC8fiCyc0aN4pydUgGmkgEhd/aN00y 7y4w== X-RZG-AUTH: ":O2kGeEG7b/pS1EzgE2y7nF0STYsSLflpbjNKxx7cGrBOdI6BL9pkS3QW19mO7I+/JwRspuzJFZuRzQ==" X-RZG-CLASS-ID: mo00 Received: from aerfugl by smtp.strato.de (RZmta 47.3.4 AUTH) with ESMTPSA id g02087wAN9h242r (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Mon, 23 Nov 2020 10:43:02 +0100 (CET) Received: from koltrast.a98shuttle.de ([192.168.1.27] helo=a98shuttle.de) by aerfugl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1kh8NB-0006ro-Np; Mon, 23 Nov 2020 10:43:01 +0100 Date: Mon, 23 Nov 2020 10:43:00 +0100 From: Michael Klein To: Chen-Yu Tsai Cc: Maxime Ripard , devicetree , Rob Herring , linux-kernel , linux-arm-kernel Subject: Re: [PATCH] ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add gpio-line-names Message-ID: <20201123094300.GA3699@a98shuttle.de> References: <20201115222425.2885427-1-michael@fossekall.de> <20201120155252.kfkavrn4wpqzmbyc@gilmour> <20201120182739.GA3734181@a98shuttle.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 23, 2020 at 12:39:07PM +0800, Chen-Yu Tsai wrote: >On Sat, Nov 21, 2020 at 2:28 AM Michael Klein wrote: >> >> Thank you for having a look at the patch! >> >> On Fri, Nov 20, 2020 at 04:52:52PM +0100, Maxime Ripard wrote: >> >On Sun, Nov 15, 2020 at 11:24:25PM +0100, Michael Klein wrote: >> >> Add gpio-line-names as documented in the Banana Pi wiki [1] and in the >> >> schematics [2]. >> >> >> >> [1]: http://wiki.banana-pi.org/Banana_Pi_BPI-M2_ZERO#GPIO_PIN_define >> >> [2]: https://drive.google.com/file/d/0B4PAo2nW2KfnMW5sVkxWSW9qa28/view >> >> >> >> Signed-off-by: Michael Klein >> >> --- >> >> .../dts/sun8i-h2-plus-bananapi-m2-zero.dts | 64 +++++++++++++++++++ >> >> 1 file changed, 64 insertions(+) >> >> >> >> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts >> >> index 4c6704e4c57e..b4ddfaf01b45 100644 >> >> --- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts >> >> +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts >> >> @@ -136,6 +136,70 @@ bluetooth { >> >> >> >> }; >> >> >> >> +&pio { >> >> + gpio-line-names = >> >> + /* PA */ >> >> + "UART2-TX", "UART2-RX", "UART2-RTS", "UART2-CTS", >> >> + "UART0-TXD", "UART0-RXD", "PWM1", "PA7-EINT7", >> >> + "PA8-EINT8", "PA9-EINT9", "PA10-EINT10", "TWI0-SCK", >> >> + "TWI0-SDA", "UART3-TX", "UART3-RX", "UART3-RTS", >> >> + "UART3-CTS", "PA17-EINT17", "TWI1-SCK", "TWI1-SDA", >> >> + "PA20-EINT20", "PA21-EINT21", "", "", >> >> + "", "", "", "", "", "", "", "", >> > >> >IIRC, the point is to have the pin names that the vendor publishes. >> > >> >Looking at Documentation/devicetree/bindings/gpio/gpio.txt, it says: >> > >> >""" >> >Optionally, a GPIO controller may have a "gpio-line-names" property. This is >> >an array of strings defining the names of the GPIO lines going out of the >> >GPIO controller. This name should be the most meaningful producer name >> >for the system, such as a rail name indicating the usage. Package names >> >such as pin name are discouraged: such lines have opaque names (since they >> >are by definition generic purpose) and such names are usually not very >> >helpful. >> >""" >> > >> >In this case, from the link you gave above, I think having the CON*-P* >> >names make more sense. >> >> Hm, but these are the pin names (of the connector) and should thus not >> be used, right? >> >> For e.g. the PA0 pin, the wiki link gives three candidates: >> >> - CON2-P13 (GPIO Pin Name -> pin 13 of the 40 pin GPIO header) >> - UART2-TX (Default Function) >> - PA0-EINT0 (Function2 : GPIO) >> >> IMHO, the CON*-P* name is the least helpful of the above, as it tells >> nothing about the usage. I'm not sure about the other two names, though. > >I believe the function names are pretty useless in this case, as you >cannot use the GPIO subsystem to mux functions. That is what pinctrl >does. And in our case, the pinctrl drivers already know all the >available functions each pin has. > >Using the pin count and connector name provides the user direct mapping >of the software representation of the pin against the actual pin on the >hardware. The user can then proceed to request and use that pin. Thank you for the explanation, that makes sense. I'll update the patch then. Michael 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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 237D8C2D0E4 for ; Mon, 23 Nov 2020 09:44:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9C6CC206F7 for ; Mon, 23 Nov 2020 09:44:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="j1j/oIHe"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=fossekall.de header.i=@fossekall.de header.b="hPtsAxoC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C6CC206F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fossekall.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RzXNlED6cZSkLdAFhWURnNT/JzKzH3NtUCJXtkXMKqM=; b=j1j/oIHeqBLQ4Te6PBzLtkvLP vGFF+LGRdwpJfXBgtFRygEDQ9Wi8VicgJcVFbH2s4jCtgBuKuQbf5u2yEdXHwYCx79LZTs/EF3412 8edXSoFkeO3tAuv5CAmO0yZOS05hg2Oc9gm4zI9tVTsDrQ38Ao0urQXgKBzP8jV2Ost3QCRN2UnwJ c/Xpz9hChrgU/bu6+1dBkvNzrhdD/PiOCLqKmFr/9vwaWHzlj85uKly6JaNwCE0Wy+hIhriJdMMq9 /0JDVZW5bEZ2Oq2vn+wUPvycPiRyvXdc/sB9PVoWJrDnMvt3nXsO7Dyi6mUE5+Bzvhl5sQbNuu4nL Aha8KdHIA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kh8NN-0005tC-9W; Mon, 23 Nov 2020 09:43:13 +0000 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.53]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kh8NK-0005se-De for linux-arm-kernel@lists.infradead.org; Mon, 23 Nov 2020 09:43:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606124584; s=strato-dkim-0002; d=fossekall.de; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=X00269bVq/tKBXSY9ndHMPgqQzKkKX6R0AKx7WaQNw4=; b=hPtsAxoCZGU6SzfG3mmUrDyvDZhbZQFs8tZEeePFF0CnaDF06EZ/8hvbwlTFgQTmn2 9bd3eb4f69MlSqggEYUtDrUaMHzaN6Z9IMyL2lnG2juUV6nt3G7YC0xGP2MghD0SOT/U H1DWmUXhUn4joxO9fqRNV/buqrak4lj7ZriZ4oAGZindt8ml5DMb1/WcKEB5YwFfUnLV uPpWnAxT6oqimGIjw4ZJeOAJdPxUCy00pIpX6HJkdHsI9nGQjafHAQocrDXJEsylrljE TKgG/ExBdDE7SOr3xfm1gXuJHlcNTqKRQIkNYfcHUU2+9bGrs+7QAjjTzv4M0hoGIIK6 t9Mw== X-RZG-AUTH: ":O2kGeEG7b/pS1EzgE2y7nF0STYsSLflpbjNKxx7cGrBOdI6BL9pkS3QW19mO7I+/JwRspuzJFZuRzQ==" X-RZG-CLASS-ID: mo00 Received: from aerfugl by smtp.strato.de (RZmta 47.3.4 AUTH) with ESMTPSA id g02087wAN9h242r (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Mon, 23 Nov 2020 10:43:02 +0100 (CET) Received: from koltrast.a98shuttle.de ([192.168.1.27] helo=a98shuttle.de) by aerfugl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1kh8NB-0006ro-Np; Mon, 23 Nov 2020 10:43:01 +0100 Date: Mon, 23 Nov 2020 10:43:00 +0100 From: Michael Klein To: Chen-Yu Tsai Subject: Re: [PATCH] ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add gpio-line-names Message-ID: <20201123094300.GA3699@a98shuttle.de> References: <20201115222425.2885427-1-michael@fossekall.de> <20201120155252.kfkavrn4wpqzmbyc@gilmour> <20201120182739.GA3734181@a98shuttle.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201123_044310_671551_69564B13 X-CRM114-Status: GOOD ( 21.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree , Rob Herring , Maxime Ripard , linux-arm-kernel , linux-kernel Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 23, 2020 at 12:39:07PM +0800, Chen-Yu Tsai wrote: >On Sat, Nov 21, 2020 at 2:28 AM Michael Klein wrote: >> >> Thank you for having a look at the patch! >> >> On Fri, Nov 20, 2020 at 04:52:52PM +0100, Maxime Ripard wrote: >> >On Sun, Nov 15, 2020 at 11:24:25PM +0100, Michael Klein wrote: >> >> Add gpio-line-names as documented in the Banana Pi wiki [1] and in the >> >> schematics [2]. >> >> >> >> [1]: http://wiki.banana-pi.org/Banana_Pi_BPI-M2_ZERO#GPIO_PIN_define >> >> [2]: https://drive.google.com/file/d/0B4PAo2nW2KfnMW5sVkxWSW9qa28/view >> >> >> >> Signed-off-by: Michael Klein >> >> --- >> >> .../dts/sun8i-h2-plus-bananapi-m2-zero.dts | 64 +++++++++++++++++++ >> >> 1 file changed, 64 insertions(+) >> >> >> >> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts >> >> index 4c6704e4c57e..b4ddfaf01b45 100644 >> >> --- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts >> >> +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts >> >> @@ -136,6 +136,70 @@ bluetooth { >> >> >> >> }; >> >> >> >> +&pio { >> >> + gpio-line-names = >> >> + /* PA */ >> >> + "UART2-TX", "UART2-RX", "UART2-RTS", "UART2-CTS", >> >> + "UART0-TXD", "UART0-RXD", "PWM1", "PA7-EINT7", >> >> + "PA8-EINT8", "PA9-EINT9", "PA10-EINT10", "TWI0-SCK", >> >> + "TWI0-SDA", "UART3-TX", "UART3-RX", "UART3-RTS", >> >> + "UART3-CTS", "PA17-EINT17", "TWI1-SCK", "TWI1-SDA", >> >> + "PA20-EINT20", "PA21-EINT21", "", "", >> >> + "", "", "", "", "", "", "", "", >> > >> >IIRC, the point is to have the pin names that the vendor publishes. >> > >> >Looking at Documentation/devicetree/bindings/gpio/gpio.txt, it says: >> > >> >""" >> >Optionally, a GPIO controller may have a "gpio-line-names" property. This is >> >an array of strings defining the names of the GPIO lines going out of the >> >GPIO controller. This name should be the most meaningful producer name >> >for the system, such as a rail name indicating the usage. Package names >> >such as pin name are discouraged: such lines have opaque names (since they >> >are by definition generic purpose) and such names are usually not very >> >helpful. >> >""" >> > >> >In this case, from the link you gave above, I think having the CON*-P* >> >names make more sense. >> >> Hm, but these are the pin names (of the connector) and should thus not >> be used, right? >> >> For e.g. the PA0 pin, the wiki link gives three candidates: >> >> - CON2-P13 (GPIO Pin Name -> pin 13 of the 40 pin GPIO header) >> - UART2-TX (Default Function) >> - PA0-EINT0 (Function2 : GPIO) >> >> IMHO, the CON*-P* name is the least helpful of the above, as it tells >> nothing about the usage. I'm not sure about the other two names, though. > >I believe the function names are pretty useless in this case, as you >cannot use the GPIO subsystem to mux functions. That is what pinctrl >does. And in our case, the pinctrl drivers already know all the >available functions each pin has. > >Using the pin count and connector name provides the user direct mapping >of the software representation of the pin against the actual pin on the >hardware. The user can then proceed to request and use that pin. Thank you for the explanation, that makes sense. I'll update the patch then. Michael _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel