Message ID | 20240126-dev-rx-enable-v4-5-45aaf4d96328@theobroma-systems.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90B92C47DDF for <linux-rockchip@archiver.kernel.org>; Fri, 26 Jan 2024 14:59:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=4gDuA2cE3VkC1sihtuHHb9H/7NtflmiXhjSym0VpOOo=; b=ybZWIAkQl/7awRsA9hW2jG8anB /R5442l+qM3HqemGUVu2z4OI+O/IoPOBC9V3s/PUm4q5VmgdAdJ/91F+IZuYLMFaSUsYz7sqIv9Ak ZXNNtulaqW+MwAtQnl4eeTwBprIgb0ZxKRe05hu7RC0OBsC9Cqx2G29C+1Iktvqs+cklrIB1iG0IG JNUvA47TZNtmi38kowxkQrVENoza50MYmTG3mhIjbjYvZVYXB8pFf1BVL9dciFUFaA7TFcVZoqKNP dK9xJ1AD3Ttx1RgHuUeuqpZJwK/HSMThtLQqviyh8CHzJTNjxUXrt6g5ZhJmDtY4NcAcpSRtL3BKn ARVSfJqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTNfi-00000004S1y-33Ra; Fri, 26 Jan 2024 14:59:10 +0000 Received: from mail-vi1eur02on2060b.outbound.protection.outlook.com ([2a01:111:f400:fe16::60b] helo=EUR02-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTNfC-00000004RZP-3u5c; Fri, 26 Jan 2024 14:58:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kwn9wUZJ5kIYwqdPCyOtw3R6VYOUsOxjjJjhKNsvbmjtvtAyH/w3mHr/TKWCwfFFLXqdqmZ44wAkmBgoVcxVMHogehHwDzl6o4FDPHpjiVZakFKElASdQ+SSTEdJm1Rzpb3GoRmfQri3O+tKhAibBKERwD6eAYXJh37gNr96NWnQTlYtiv7/SSkBtkFFSyYqda+ci4lLsJI/dWmjxuBDRHiMToqd82pRw6qpT451ikfa/LycGcxJZdct1FPlOFKBgctGrlGVDCYw6jifZUoWRToFxdqSILcJTE+rPazL7w0MvwUPMDqGvqLuXQMWk0sO7TCNA1CKWELWkBcbgrK1Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dh9xD3qkAnT4zDfH45UENOftyY6lM3S9XnELbSMrfDE=; b=VNSeEmdxRkxARmSG9tkhdVbMIV8iZvk3I7ohcBEiC4iR5W3WvayIK1PFrSP1kE/1ooPqSOKpjuEqghs90zv9pbjczs7/vK8k1oAF1y01N8FGSDC0ah+VmcKxMrE5Wq7ZaZ1XqGewBbh1PUcljZNw3zsxqohQ2FGCR+LHGg2PxPEEwL6YDlRqFmkLuILedjsaIRQ4P8P4vGd064hi62vg32CCPtI5Z0BfKHC7Y+N3Ww5EDXBCJtT3Vh5fhI9Zjupdl8Uv2It1kjKG2L0/3W2sFY+zVCGy+hq9Qvlgr6/lLMCPFaODDwRwtOSHOOB6Sq9aOoXHQANIIrPj77ALBUM9GQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=theobroma-systems.com; dmarc=pass action=none header.from=theobroma-systems.com; dkim=pass header.d=theobroma-systems.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=theobroma-systems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dh9xD3qkAnT4zDfH45UENOftyY6lM3S9XnELbSMrfDE=; b=D9q6kdjAcggdZtKX6qg6LbKq1GGN2YVkkHegbYtDdoOdyEWO/QCSiGq2Z2aHmpWH7DeAdMEHaaKNAPtR0kIGDXlg9qzdXyX7CF/Tg/WGtCXBp/Mw9vEv6o2nVB4mSBNTv1fLEygQVLH6cL6c/KBvupTUJ/n5/BjTfFOy5lXVVDjk37njP+OIY2v20D4/3azFyO7c18JPEd5niiSA61jAFr3UEdaWe4Dp/BKx/jRA4V6sUDyKk1dQfwIfPqcLaLPbdmnZMAWZVWgnfbto3Z1zOX+/k9ZYBhck6DgeJ2VTShR2sZDdy66GsunXv3TATR8alcKX7RW62WdY5cRLOw1IYg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=theobroma-systems.com; Received: from AM0PR04MB6371.eurprd04.prod.outlook.com (2603:10a6:208:178::19) by GVXPR04MB9735.eurprd04.prod.outlook.com (2603:10a6:150:118::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Fri, 26 Jan 2024 14:58:26 +0000 Received: from AM0PR04MB6371.eurprd04.prod.outlook.com ([fe80::e130:6c40:23e5:9a8f]) by AM0PR04MB6371.eurprd04.prod.outlook.com ([fe80::e130:6c40:23e5:9a8f%5]) with mapi id 15.20.7228.022; Fri, 26 Jan 2024 14:58:26 +0000 From: Farouk Bouabid <farouk.bouabid@theobroma-systems.com> Date: Fri, 26 Jan 2024 15:55:14 +0100 Subject: [PATCH v4 5/6] arm64: dts: rockchip: rk3399-puma-haikou: add rs485 support on uart2 Message-Id: <20240126-dev-rx-enable-v4-5-45aaf4d96328@theobroma-systems.com> References: <20240126-dev-rx-enable-v4-0-45aaf4d96328@theobroma-systems.com> In-Reply-To: <20240126-dev-rx-enable-v4-0-45aaf4d96328@theobroma-systems.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Heiko Stuebner <heiko@sntech.de> Cc: Rob Herring <robh@kernel.org>, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, quentin.schulz@theobroma-systems.com, Farouk Bouabid <farouk.bouabid@theobroma-systems.com> X-Mailer: b4 0.12.3 X-ClientProxiedBy: VI1PR06CA0114.eurprd06.prod.outlook.com (2603:10a6:803:8c::43) To AM0PR04MB6371.eurprd04.prod.outlook.com (2603:10a6:208:178::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6371:EE_|GVXPR04MB9735:EE_ X-MS-Office365-Filtering-Correlation-Id: 6efb7f02-11dd-4ea0-6627-08dc1e7f401f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L+hOi6ufXvXkOebFWx77newJSg/6k0l5l4rhb3Yu3Dw++2bkNIYlc2JIxXa04YD2krPe9EagRFjIAV0y3lEm6y8qNZaNduCliCIhSkz8RWGrnwVEp9pugGyzN0gnIa4SO5v+/Kx9/kyrHkdMFyAAeLmGMcp2oVVnN/PUDt7mNtqXaVVKc8/7uMv/wNglh2zxOttJh17sufwQJ87KcMp5/kppxKzUt7WSlT2J94wZJNWyo5vfbSxcswb/IT2ffP2Y8MJ+M/b+JvLBC0B59YTx6WOC2cyBVvDyDee727oLEWe4Uwaf8YKsyFTwItEOS4Quw02Q1BHBtuOdbLFk0+ApXPRQ8HOLWgrfOEJZO7uml81AXshj8w9QLMJZHAcBL/7mSR/S2OuRNtZzLaGgL0I9ms8RkTaePLCoxQ4Z9R8aPO+4HSHOZfA37EOzLRTwy2yVo7QNcZ6WENIQPFskvKsisDgEIhPwMOxuEGX6pOZhZ4H8rvI2lFm56AsrzEm9sVmVyVvx6AFylQXsT9MtcRsZ4MHqPyQudrG38pcXKVqdlfsk6SdOOj0s0vtNXZ+QpI6UEusKgYr8woeebwRgHbEHxrfO0E+I7c0ALU+jjqfkEXo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6371.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(346002)(136003)(39850400004)(376002)(230922051799003)(64100799003)(186009)(1800799012)(451199024)(66476007)(54906003)(66556008)(86362001)(478600001)(38100700002)(6486002)(6506007)(36756003)(38350700005)(41300700001)(52116002)(4326008)(8676002)(8936002)(26005)(2616005)(316002)(5660300002)(66946007)(6512007)(6666004)(7416002)(2906002)(44832011)(83380400001)(107886003)(110136005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?wx+awSSw/10WNVxE4Jo4Xdx9Zlpf?= =?utf-8?q?x0Nm2UopYrv9eNoFuIBcNWUofztoorclZIBc38qAkuefnZkcmOlsdKldYwUINMQfl?= =?utf-8?q?1uRZwxFnbZQvqkJCuhh6eMLgy612laWRqlsNoNka6UxaKFVTZRC/mvd4Xc92vQyn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?q?8hat3m27B+uj2zwzl0SmS1jwLLX6wPQUbTjPm2S5aOTs7S9LPV8RsdLFg4MApC8WA?= =?utf-8?q?xcm8JkZbHUo/BqKJx2cCQkYWBNwqdpvoFq3cQtoyrvrvqnh0v/gpJAz8Sum7Rk17A?= =?utf-8?q?oa7Cktz6u+vPlV+dtJEuQeDIDSmWb3CdastEWpzXL8Be3SpsHkcCWFKWwz6jY1DXG?= =?utf-8?q?P6DtvY0Kgrk3K18Mk3xR1XlSkofyd8C+W9xyqxNdnuzOFUyOlG+pDh+S81jeLWGoo?= =?utf-8?q?OcYUVHQiqyFGCbXheDobMhw6t1f44+wSg9sKz8yZtD4P5wpQ8bPP49rNiUFkoExYn?= =?utf-8?q?nbO9QwDq4aJhjC9xPaNXFOK+9SbNl2lE2lvU8WYHROmg6crqSYr1k+cPD/LsTgCrZ?= =?utf-8?q?JvPT7Om7HsgEWZ8KdX6mSy+BnpUCk8ZkmZNkza6a/Z+tCuZhYLlPjTBhPs/It18ZA?= =?utf-8?q?g6Tq1ujkaDYdovlNzPK1az26OMnq2j5PyXaB1pcXSQujEqTKp3aawbPjcHXTkKGfn?= =?utf-8?q?SfK8G9aW9pkKIL8VUNjC8G+Z6FFfCx9tuTJSxyfWz8APojvP+4ZRMko=3D?= X-OriginatorOrg: theobroma-systems.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6efb7f02-11dd-4ea0-6627-08dc1e7f401f X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6371.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2024 14:58:26.5911 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5e0e1b52-21b5-4e7b-83bb-514ec460677e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SrH1vOXKAo53wXvXG8yvq73fOXtG3kz25Of3FFPsCLyygCLogtp49NoDA7PHaN42Hjk7MFcc86Qy37V59XXyQHbBYVvBueXv1WXiH+OjcnpiwXSfUWjcA6xKjZoMVE4V X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB9735 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_065839_095901_E58A2EE4 X-CRM114-Status: GOOD ( 12.42 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms <linux-rockchip.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-rockchip/> List-Post: <mailto:linux-rockchip@lists.infradead.org> List-Help: <mailto:linux-rockchip-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" <linux-rockchip-bounces@lists.infradead.org> Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org |
Series |
serial: 8250: Add support for rs485 half/full duplex on puma/ringneck-haikou
|
expand
|
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts index 18a98c4648ea..576024c745ed 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts @@ -273,11 +273,13 @@ &u2phy0_host { &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; + pinctrl-0 = <&uart0_xfer>; status = "okay"; }; &uart2 { + rs485-rx-enable-gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>; + rs485-rx-enable-inactive-when-rs485-disabled; status = "okay"; };
A hardware switch can set the rs485 transceiver into half or full duplex mode. Switching to the half-duplex mode requires the user to enable em485 on uart2 using ioctl, DE/RE are both connected to GPIO2_C3 which is the RTS signal for uart0. Which means GPIO2_C3 is implemented as rs485 rx-enable gpio. In full-duplex mode (em485 is disabled), DE is connected to GPIO2_C3 and RE is grounded (enabled). This requires rx-enable gpio to be inactive to enable DE as well. Signed-off-by: Farouk Bouabid <farouk.bouabid@theobroma-systems.com> --- arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)