Message ID | 20230607201641.20982-6-ddrokosov@sberdevices.ru |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp456904vqr; Wed, 7 Jun 2023 13:19:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7qEgOgDIKzknFsAcDMve17TuRwCYd/PzDtUKvANnoOao7/02YWIpcXlnrxCfUM9TM5Szz/ X-Received: by 2002:a17:903:41c6:b0:1b1:ac87:b47a with SMTP id u6-20020a17090341c600b001b1ac87b47amr7395517ple.65.1686169181415; Wed, 07 Jun 2023 13:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686169181; cv=none; d=google.com; s=arc-20160816; b=ZOWS/Cl0OFGyHr1nEV/NqwOByIFcJzM+6JL8dtZDKwzNhUgk3umvNChV7tQe0TyMyz IWA6jFOArciPvtKNrcOLVXOPtT/2IPWCp8Rijk6f3j6eTJZoItd2FNS8+buG0GOZDn75 zWU3XDJ6XX+6PcAg4c5LAmtRqMHWzwZDMysEs6enVGX8Jjza+6gZw7FNJE4hd1yVZbv7 WZp21qydHRqyTuxi0Nl01d/eMpQxB9Ypy4o8BsBC3PSroQCPMdAu1IVnArnGNpnOJlc9 uX4EbcGFmofmzoI7ESRU5CxjMU6L4ayeCfC6bZPDNnC/KCONnfVbA3SoBPExbWRm755w L/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VVBMghSaus7SwxMO0wG80S4bhkxc+XRBu1rkfi7iaek=; b=XlHFHsWEom5YKw+lPmXUs/Y4MsmB+nPgmX2pEpCQmXYyKmIZi3dKLQtgf+7/hoMYUS osDqe1Q0A50RUj9ydRmIGbxAwDtASNhsRFohTaowTcNjOrMW2diotJ0/ErAYPppLQg3k RIqL1v+M5ITnY50f/SYQToZU7HByKQ2/lIhaIHqcqpnsoYeL6DNYc9HGGI5fgAReZgqn pWsItl7HITFZ/166Ri5oOI7KEejznrtRkC+JiLUQdhD8ZNYJzAOApaoYb9OcMxoQIB6U d/TMss4gnWpI0x1X6V+PYZ+pnM55yZsFfVtI4iVud0qH5zPqBODDN+uJvaCjvbg1yvrG o/UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=JQWIpvSK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020a17090301cc00b001ae82f13a0fsi9363456plh.643.2023.06.07.13.19.25; Wed, 07 Jun 2023 13:19:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=JQWIpvSK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232477AbjFGURO (ORCPT <rfc822;literming00@gmail.com> + 99 others); Wed, 7 Jun 2023 16:17:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232147AbjFGUQ7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 16:16:59 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1640B1BD6; Wed, 7 Jun 2023 13:16:58 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 41FBB5FD72; Wed, 7 Jun 2023 23:16:55 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1686169015; bh=VVBMghSaus7SwxMO0wG80S4bhkxc+XRBu1rkfi7iaek=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JQWIpvSKAFcRo6IIvAjvdO8J7/Ya+0jKxIgsqQg9Uc/du+xHwEowEhFWpdQOD+HEo rSyLukb8CnrPavC81nW184oBvm31UDuIVyrNj3FBUtE7StbzXfsBBGurN5HAGfKYQn JWsSPEquJ6U80ZlBiHOn5QG05gatTbRwbMbCZIfOHYo61sdxlwcWlFoSJusfNNWjzS VFONoP7hQRFLNfTSNZTxLUReT3rvpyqSSRkLWj8FQyfCZYmFCOwP5bbOzrAkwQy48Y 8tTSVaJuZS6Rk1/as5nUJS6biROPJJ5fkiHA2AAApHFmXn/abtbJb3+w5Hn/dAdnFP JQutt8zKfos3g== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 7 Jun 2023 23:16:55 +0300 (MSK) From: Dmitry Rokosov <ddrokosov@sberdevices.ru> To: <neil.armstrong@linaro.org>, <jbrunet@baylibre.com>, <mturquette@baylibre.com>, <sboyd@kernel.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <khilman@baylibre.com>, <martin.blumenstingl@googlemail.com>, <conor+dt@kernel.org> CC: <kernel@sberdevices.ru>, <sdfw_system_team@sberdevices.ru>, <rockosov@gmail.com>, <linux-amlogic@lists.infradead.org>, <linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, Oleg Lyovin <ovlevin@sberdevices.ru>, Dmitry Rokosov <ddrokosov@sberdevices.ru> Subject: [PATCH v1 5/6] arm64: dts: meson: a1: introduce UART_AO mux definitions Date: Wed, 7 Jun 2023 23:16:40 +0300 Message-ID: <20230607201641.20982-6-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230607201641.20982-1-ddrokosov@sberdevices.ru> References: <20230607201641.20982-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/07 16:55:00 #21454472 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768076535429207037?= X-GMAIL-MSGID: =?utf-8?q?1768076535429207037?= |
Series |
arm64: dts: meson: a1: introduce several peripheral IPs
|
|
Commit Message
Dmitry Rokosov
June 7, 2023, 8:16 p.m. UTC
From: Oleg Lyovin <ovlevin@sberdevices.ru> The Amlogic A1 has a UART_AO port, which can be used, for example, for BT HCI H4 connection. This patch adds mux definitions for it. Signed-off-by: Oleg Lyovin <ovlevin@sberdevices.ru> Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru> --- arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Comments
On Wed, Jun 7, 2023 at 10:16 PM Dmitry Rokosov <ddrokosov@sberdevices.ru> wrote: > > From: Oleg Lyovin <ovlevin@sberdevices.ru> > > The Amlogic A1 has a UART_AO port, which can be used, for example, for > BT HCI H4 connection. > > This patch adds mux definitions for it. In the past we've only taken the pinctrl definitions if we have a board that uses them. Neil, do we still have the same policy in place? If so this patch should be sent with the series that adds support for your A1 board. > Signed-off-by: Oleg Lyovin <ovlevin@sberdevices.ru> > Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru> > --- > arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi > index 0efd922ca7e1..3eb6aa9c00e0 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi > +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi > @@ -118,6 +118,22 @@ gpio: bank@400 { > gpio-ranges = <&periphs_pinctrl 0 0 62>; > }; > > + uart_a_pins: uart_a { Only our newer .dtsi (e.g. meson-g12-common.dtsi) are following the pattern where node names should use dashes instead of underscores. So please use: uart_a_pins: uart-a { ... [...] > + uart_a_cts_rts_pins: uart_a_cts_rts { similar to the comment from above: uart_a_cts_rts_pins: uart-a-cts-rts { ... > + mux { > + groups = "uart_a_cts", > + "uart_a_rts"; > + function = "uart_a"; > + bias-pull-down; Out of curiosity: is this pull down needed on all boards or just specific ones? It seems like all other SoCs use bias-disable for the RTS/CTS pins. Best regards, Martin
Hi, On 25/06/2023 23:07, Martin Blumenstingl wrote: > On Wed, Jun 7, 2023 at 10:16 PM Dmitry Rokosov <ddrokosov@sberdevices.ru> wrote: >> >> From: Oleg Lyovin <ovlevin@sberdevices.ru> >> >> The Amlogic A1 has a UART_AO port, which can be used, for example, for >> BT HCI H4 connection. >> >> This patch adds mux definitions for it. > In the past we've only taken the pinctrl definitions if we have a > board that uses them. > Neil, do we still have the same policy in place? If so this patch > should be sent with the series that adds support for your A1 board. Yes and no, if the work is done I'll take it, but yeah since upstream linux hates dead code, let's only define what's necessary. > >> Signed-off-by: Oleg Lyovin <ovlevin@sberdevices.ru> >> Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru> >> --- >> arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi >> index 0efd922ca7e1..3eb6aa9c00e0 100644 >> --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi >> +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi >> @@ -118,6 +118,22 @@ gpio: bank@400 { >> gpio-ranges = <&periphs_pinctrl 0 0 62>; >> }; >> >> + uart_a_pins: uart_a { > Only our newer .dtsi (e.g. meson-g12-common.dtsi) are following the > pattern where node names should use dashes instead of underscores. > So please use: uart_a_pins: uart-a { ... The new scheme which should be use should be: uart_a_pins: uart-a-pins-state { but it wasn't enforced in the pinctrl yaml pushed by heiner, but for sure no underscores in the node name. > > [...] >> + uart_a_cts_rts_pins: uart_a_cts_rts { > similar to the comment from above: > uart_a_cts_rts_pins: uart-a-cts-rts { ... > >> + mux { >> + groups = "uart_a_cts", >> + "uart_a_rts"; >> + function = "uart_a"; >> + bias-pull-down; > Out of curiosity: is this pull down needed on all boards or just specific ones? > It seems like all other SoCs use bias-disable for the RTS/CTS pins. > > > Best regards, > Martin
Martin, On Sun, Jun 25, 2023 at 11:07:51PM +0200, Martin Blumenstingl wrote: > On Wed, Jun 7, 2023 at 10:16 PM Dmitry Rokosov <ddrokosov@sberdevices.ru> wrote: > > > > From: Oleg Lyovin <ovlevin@sberdevices.ru> > > > > The Amlogic A1 has a UART_AO port, which can be used, for example, for > > BT HCI H4 connection. > > > > This patch adds mux definitions for it. > In the past we've only taken the pinctrl definitions if we have a > board that uses them. > Neil, do we still have the same policy in place? If so this patch > should be sent with the series that adds support for your A1 board. > > > Signed-off-by: Oleg Lyovin <ovlevin@sberdevices.ru> > > Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru> > > --- > > arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 16 ++++++++++++++++ > > 1 file changed, 16 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi > > index 0efd922ca7e1..3eb6aa9c00e0 100644 > > --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi > > +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi > > @@ -118,6 +118,22 @@ gpio: bank@400 { > > gpio-ranges = <&periphs_pinctrl 0 0 62>; > > }; > > > > + uart_a_pins: uart_a { > Only our newer .dtsi (e.g. meson-g12-common.dtsi) are following the > pattern where node names should use dashes instead of underscores. > So please use: uart_a_pins: uart-a { ... > Okay, no problem. I'll rename the nodes in the next patch series version. > [...] > > + uart_a_cts_rts_pins: uart_a_cts_rts { > similar to the comment from above: > uart_a_cts_rts_pins: uart-a-cts-rts { ... > Ok > > + mux { > > + groups = "uart_a_cts", > > + "uart_a_rts"; > > + function = "uart_a"; > > + bias-pull-down; > Out of curiosity: is this pull down needed on all boards or just specific ones? > It seems like all other SoCs use bias-disable for the RTS/CTS pins. > That's a good question. The Amlogic custom kernel DTSI declares bias-pull-down for CTS/RTS pins in UART_A. There is no information about this in the A1 datasheet. However, from my understanding, it is related to the usage of the UART_A. Typically, the UART_A endpoint on A1 boards is used for BT connections, which is why Amlogic applies bias-pull-down in the common DTSI. If my assumption is correct, it would be better to move the bias-pull-down node parameter to the custom board DTS. I will investigate this further and rework it in the next version if necessary.
Neil, Martin, On Mon, Jun 26, 2023 at 03:34:38PM +0200, neil.armstrong@linaro.org wrote: > Hi, > > On 25/06/2023 23:07, Martin Blumenstingl wrote: > > On Wed, Jun 7, 2023 at 10:16 PM Dmitry Rokosov <ddrokosov@sberdevices.ru> wrote: > > > > > > From: Oleg Lyovin <ovlevin@sberdevices.ru> > > > > > > The Amlogic A1 has a UART_AO port, which can be used, for example, for > > > BT HCI H4 connection. > > > > > > This patch adds mux definitions for it. > > In the past we've only taken the pinctrl definitions if we have a > > board that uses them. > > Neil, do we still have the same policy in place? If so this patch > > should be sent with the series that adds support for your A1 board. > > Yes and no, if the work is done I'll take it, but yeah since upstream linux > hates dead code, let's only define what's necessary. > I'll prepare the patches for ad401 reference board, and share the in the next patch series version. > > > > > Signed-off-by: Oleg Lyovin <ovlevin@sberdevices.ru> > > > Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru> > > > --- > > > arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 16 ++++++++++++++++ > > > 1 file changed, 16 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi > > > index 0efd922ca7e1..3eb6aa9c00e0 100644 > > > --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi > > > +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi > > > @@ -118,6 +118,22 @@ gpio: bank@400 { > > > gpio-ranges = <&periphs_pinctrl 0 0 62>; > > > }; > > > > > > + uart_a_pins: uart_a { > > Only our newer .dtsi (e.g. meson-g12-common.dtsi) are following the > > pattern where node names should use dashes instead of underscores. > > So please use: uart_a_pins: uart-a { ... > > The new scheme which should be use should be: > > uart_a_pins: uart-a-pins-state { > > but it wasn't enforced in the pinctrl yaml pushed by heiner, but for sure > no underscores in the node name. > Okay, got it > > > > [...] > > > + uart_a_cts_rts_pins: uart_a_cts_rts { > > similar to the comment from above: > > uart_a_cts_rts_pins: uart-a-cts-rts { ... > > > > > + mux { > > > + groups = "uart_a_cts", > > > + "uart_a_rts"; > > > + function = "uart_a"; > > > + bias-pull-down; > > Out of curiosity: is this pull down needed on all boards or just specific ones? > > It seems like all other SoCs use bias-disable for the RTS/CTS pins. > > > > > > Best regards, > > Martin >
diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi index 0efd922ca7e1..3eb6aa9c00e0 100644 --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi @@ -118,6 +118,22 @@ gpio: bank@400 { gpio-ranges = <&periphs_pinctrl 0 0 62>; }; + uart_a_pins: uart_a { + mux { + groups = "uart_a_tx", + "uart_a_rx"; + function = "uart_a"; + }; + }; + + uart_a_cts_rts_pins: uart_a_cts_rts { + mux { + groups = "uart_a_cts", + "uart_a_rts"; + function = "uart_a"; + bias-pull-down; + }; + }; }; uart_AO: serial@1c00 {