Message ID | 20240208-dev-rx-enable-v6-2-39e68e17a339@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 710DEC4829C for <linux-rockchip@archiver.kernel.org>; Thu, 8 Feb 2024 15:41:36 +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=WCRwwmT3P+Fet15YYk9pMs9vTM+PUfeNPb+zIFsHgtQ=; b=FA59Ep5jGN02+t2Ttei3XR0jEY AXVo3QQKlZNZLcfa1u7Zi/bWbBxeGMERhBdEw1e5p6zZv5wUMW5FhbR7vgawZJAwiLKUu9R9W7bZA /UXzuAtNcWCYmMp0xByHAZ03UXbSpD8ylrsyuNNic56PSV02MuwVH6UKTPgOzrOhTeM3xN+Mhvl9y 4ROE594nobWI+MXRG/VCHWEWyb7/CXAJc6ZUUr0LWK0WFv+XpCxFwW65d+qqyXMVmIimwPW68bs4x B287UXPkmBcX2Wd06V+Znc2vZULZ/IkVqnEyFU1CpsOV1OBBRdk+tsF+TfGUdpIvwfYj5+sgkNELW z+6pBldQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY6Wo-0000000EBs3-3Oo0; Thu, 08 Feb 2024 15:41:30 +0000 Received: from mail-he1eur04on20700.outbound.protection.outlook.com ([2a01:111:f403:260f::700] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY6Wl-0000000EBl5-279Y; Thu, 08 Feb 2024 15:41:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=amdTxEO35Ol2fLY/v6EvxXiiOf8iEJFnf+X0S8Pkczq4Bihf48kPEmtuss+p9aWKBnVFdBsra0XnMm0cvei4jgpzbWf57M6KsiEypEYw+gjHxHgkq5aV4vA5FiT26QxiRiKr7qHckt9xvulpC2iLrzwoz8SARlK4eqK+7GW/uF3q8LVlrs7EhO524otTFn7WGTD7Ry8KK4IF84uKojoHLPRSXXjiAgUtdRXsfqfHJ4Aj5JVPoEpLySAuNfK8hZBmylgREGAX7OGC2J8OpG7k1XNsu9ek+Mk8ZhOh09e+iHTxslghtYwFw3wvYb02HCLYln07Mg0UhVdKOY95CObjYw== 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=9E73qvcYPt+w1rq3AgHdWgp3ZIRu84aG3pPkfSbiArU=; b=l5rBnmIJx+o4n/qyIlxzX95xp8G0tT0vwio39JNJxEvRp90rBxtR0qjJnVdtGigndV82vNRSd177E9lSafb06egYcQBc+wqLYveYiqlcEF7FwnB+MdcpyqJxpa7dfdUWDSkxnwbYzqRyf0uc6ZYQbOas/L28KMLcncRNxzX6lQRgCKfvWWUK0aEpZip0udAe+0Ga+ojFoLGk6QY1FWRZESN98HxuI1HKTbfZL0Jw1catmLDhalZlZpLjEnGN/wZJ0sPP/1ZZfCwNld0hyXW3OjRHf9wEJ+Y+ugDlEv7r6IOxeoihnAKLbvgWZ8GrX/+Tpi/IofLFIh3xVzfUWq7GPg== 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=9E73qvcYPt+w1rq3AgHdWgp3ZIRu84aG3pPkfSbiArU=; b=g/HBttYryVByc8G1QirxumJu6NUZNEURJGfSEcPNA+nAiFkZDn6NUFzbcW5KXYmc3C0WShoooTs0M1vQo0KwzThGJVdX775shOPp1oSkSj8+ZfRwWW0JdNBjuUj6vxdDfM9BDuweaaTJRuMRIGyoOul26cVjc3T7hQcSN8XZ7m38JKPYGigJOSKRMs243oys0ItLvIq27cxI3WiI6pd14jd/xe9pooMtoS1VyT780M2yBK6PVRj79oKdWTUFwlKM6M7rfq9zToHe/XDBzzvVRPTlKW/OlLm8+0GkloDIg8PmEscw8WJRLNASp1XnkkGmPXne429S1AjyxQPWg09s1g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=theobroma-systems.com; Received: from VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) by AS8PR04MB7621.eurprd04.prod.outlook.com (2603:10a6:20b:299::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.39; Thu, 8 Feb 2024 15:41:00 +0000 Received: from VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::d4b1:cea8:7085:ec50]) by VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::d4b1:cea8:7085:ec50%4]) with mapi id 15.20.7249.035; Thu, 8 Feb 2024 15:41:00 +0000 From: Farouk Bouabid <farouk.bouabid@theobroma-systems.com> Date: Thu, 08 Feb 2024 16:39:56 +0100 Subject: [PATCH v6 2/2] arm64: dts: rockchip: px30-ringneck-haikou: add rs485 support on uart5 Message-Id: <20240208-dev-rx-enable-v6-2-39e68e17a339@theobroma-systems.com> References: <20240208-dev-rx-enable-v6-0-39e68e17a339@theobroma-systems.com> In-Reply-To: <20240208-dev-rx-enable-v6-0-39e68e17a339@theobroma-systems.com> To: 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: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, quentin.schulz@theobroma-systems.com, Farouk Bouabid <farouk.bouabid@theobroma-systems.com> X-Mailer: b4 0.12.3 X-ClientProxiedBy: VI1PR06CA0208.eurprd06.prod.outlook.com (2603:10a6:802:2c::29) To VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6382:EE_|AS8PR04MB7621:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b44e0cb-4831-4156-a47b-08dc28bc593b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nDKLzK92bQqkAbydubnS1Pue1Mjw3JNk+m7qg4b0KSVFzvZLEk28SZsVg0AtoSkMonkEkpo+NaK/kVGgHGc4BTWXWzGG4wdl1GlrzwOPVo8lhherQ1QOjg6mu/rEITe1gTYEz/g8zLqdIisRoqTQ/kyKs+oEwQNflqFDCuF9XYms1o1RcR/fl6RKnbuEPZPpx4/TDvQ6gCMfbw5+IPAk+8DV0/4MR6d5xRUf9GQ+UKED970v2XIJk0W2v5roqWzjFraDTyG9SADHJ+0UmBL1t0Ax693drHumOI2RZUIYcjDAKJC25HD9UWtQq9heZ2lJCxHHt2QNc2LBoKWXGJoqqpZM0a/YakouF6UNx2N+oEbHxkQDHQuP9TOMlizLW9MVhY7lezCFvpVpKePZ05PaoaAIbs478oFN/UJb13OU0aamHxDJXRP8cHS8Dx8toz+SZTyAKgjEalJqT9zABBQ89BDsEIcFkJf9/CC/OmPzKZweD5E3ttbM4qEhinICnqYJ7TrEgE7kRY5FnhuYLzQWfpA0EexcaTENlPMq/tOOTSRPiY5pqhLZv0ADACAwIJbNsMuUHEGNnrwlNnUOBcswZhZyUreRpsiXg90HtQqSH4Goj/CHqR4yo1e5XQm79Dyj X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6382.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(366004)(346002)(136003)(39850400004)(396003)(230922051799003)(451199024)(64100799003)(186009)(1800799012)(107886003)(86362001)(2616005)(26005)(6486002)(44832011)(478600001)(5660300002)(2906002)(38350700005)(110136005)(66476007)(66556008)(316002)(66946007)(8936002)(4326008)(36756003)(6512007)(8676002)(6666004)(6506007)(52116002)(38100700002)(41300700001)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ms/j4bSiczuHWcr8MF6iJY0xJEje?= =?utf-8?q?xgLcD0omsbsvuD146R0sIjFd4RDviyX6C/V+P2wfL0lEgIeJel8V2i3AzU1izX+yi?= =?utf-8?q?H2awpJ6YiNs6aZAYDd9y3NhNjbl0k2aQMTRf5MbwDjHw6I2SwR1am7A3bmi6cdwML?= =?utf-8?q?qG58aw2Sjsm9hVQ9ThIFwKdsjfgUFRnKL5BSLbxxDz/3OIguqmv3bz2KRTVapg060?= =?utf-8?q?sQ+sh0YKMrw6XQaK1134wllihIZDaN4f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lRsIgzbNo7vXtNM+UX/ayLf0i79fPpAh1?= =?utf-8?q?vuHRTF0pmIySdGIFwwK7YnBZQzRqAGt2kya3V73GiBbE4IYXJGE6nZMXiaGcAAuCn?= =?utf-8?q?Ppg9AXqhpy+VQ/IExht6Cctkl2qz+cQu9mWwmcgZbg+WqOFUHiK+zKbHrX+DCu+tT?= =?utf-8?q?dkLAFLMGGSNmcZwRoN9VokCBhzkDpU1GbsheSdhIif2VeeSqk8EcbJ1QnUaWzk28r?= =?utf-8?q?6ujOOaSmnJeZOKetBj3kt3nRt5i2hxJlvhvP6wCKXfZIKXe0UyPk8iDLdG1IoBg9K?= =?utf-8?q?Ktt3HVRaoIH3rDQ8eyiZhBI4a2pcH3Gw30jeT/XQCyOHlVJewZeAmQ59r2lh19dlb?= =?utf-8?q?PvvRfyopYZOr3x4iu7RzOAG3jsgF0nTwucZesBhner/obM0iDGUapMmp7wIjd7CI3?= =?utf-8?q?jFRoxktD5/nRoVH3fxf81gpRLYqevYOCn4YTno1jS/I13++p8/J5MEc=3D?= X-OriginatorOrg: theobroma-systems.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b44e0cb-4831-4156-a47b-08dc28bc593b X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 15:40:59.6590 (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: PNthGxRdS4RFGHNByN5GvJdptv68quzWJQk3QImw9HfDttKAIT7lE/bhNt8JMXt/6jZdozJ9p9ai3uukSGgh9JdDDKYbRBT+Rll/jcUNtxvj1+l4oZyjw25+zb5EsJaS X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7621 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240208_074127_598887_FE497DF6 X-CRM114-Status: GOOD ( 11.02 ) 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/px30-ringneck-haikou.dts b/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts index 16798eb77077..ae398acdcf45 100644 --- a/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts @@ -227,6 +227,7 @@ &uart0 { &uart5 { pinctrl-0 = <&uart5_xfer>; + rts-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; 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 uart5 using ioctl, DE/RE are both connected to GPIO0_B5 which is the RTS signal for uart0. Implement GPIO0_B5 as rts-gpios with RTS_ON_SEND option enabled (default) so that driver mode gets enabled while sending (RTS high) and receiver mode gets enabled while not sending (RTS low). In full-duplex mode (em485 is disabled), DE is connected to GPIO0_B5 and RE is grounded (enabled). Since GPIO0_B5 is implemented as rts-gpios, the driver mode gets enabled whenever we want to send something and RE is not affected (always enabled) in this case by the state of RTS. Signed-off-by: Farouk Bouabid <farouk.bouabid@theobroma-systems.com> --- arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts | 1 + 1 file changed, 1 insertion(+)