From patchwork Thu Feb 23 10:36:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neeraj Sanjay Kale X-Patchwork-Id: 13150082 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E4F8C636D7 for ; Thu, 23 Feb 2023 10:37:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233816AbjBWKhL (ORCPT ); Thu, 23 Feb 2023 05:37:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233768AbjBWKhI (ORCPT ); Thu, 23 Feb 2023 05:37:08 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2057.outbound.protection.outlook.com [40.107.21.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61C724FAAE; Thu, 23 Feb 2023 02:37:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mifoDEMsSgl/vmFQVhktuU3XssBwHiD5h04Tz0dz7gOKEFslDl0k1rbYiNi+xkCslmjauy92Cgh80ynTaNDlHLkEaw476dwuYEER3hVegig6iN81G7Ca9xy1rrfcQ99l9t/czhLHqPkXFuqiJ8VHt5+0LgFn7mNYCussXyjbFcHBrRgEY5GNnIu6hJP7GBNxlE/nKYQHbbymwxGXbmwu+yXOZB3ARfA6T0EmXsoe4tI6ebyfEkZoceMppV1ow9IlSpysP99/uSJmUkyTjOfPiI9K8PASWoDIA3Im+QCb3zBZN8K2aaiOo4C4sn8eGS/r8ysVy6p/3KC5pibLabiueA== 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=YaRJ0wVAel+SMHzl+EisXjhqD1nlPWpe8jatGPGtPBo=; b=Ahxgc/tkbKNBK8VOKKrTO0YteOdlYgOQ7vlXMbjdg6US8V0MZOuVYdelbqtw7WDPOToSteHzxoF14H0giAxkoKcHgw7tZq37qSF+FyLaz2FoaNzHYNKBYRL5REUVkf0kElbkyJKkq8Ec8+6mV8gs/EnvNkyvZGPMZuuMb8+eYtGoJoicW0FsLqKESBuQCMOTT+JRKVZ2O00WDjPV45YhwZ752mo15QGMPqP5/h9SNdQWV2XkYH3szmdgne/YjofkqxKVtujwPwT0NMLRJwkkRdV8yzUTIdBq5T42Lv6cxHeHxMVXVwnwret4aXt9bPDVxUqyVwe/XMTS4iPOGXodqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YaRJ0wVAel+SMHzl+EisXjhqD1nlPWpe8jatGPGtPBo=; b=cD44upllK116NkF2MrG3zBEnDDAYDJxuxssR3E0+H4R7yY9iq9d42WQ0cYr7ffphc+wKcZfiFnvQJ+LUK/6SZ/KAh57uxFKrkXTalVQrbl8SsYFnqE070pCatQIPgynwmkvJBGZEDgDKLWbeTJjcbSSvXGh1EaDD7DI7mWDJA/o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8603.eurprd04.prod.outlook.com (2603:10a6:20b:43a::10) by AM9PR04MB8195.eurprd04.prod.outlook.com (2603:10a6:20b:3b7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.21; Thu, 23 Feb 2023 10:37:01 +0000 Received: from AM9PR04MB8603.eurprd04.prod.outlook.com ([fe80::f8fe:ab7c:ef5d:9189]) by AM9PR04MB8603.eurprd04.prod.outlook.com ([fe80::f8fe:ab7c:ef5d:9189%9]) with mapi id 15.20.6134.021; Thu, 23 Feb 2023 10:37:01 +0000 From: Neeraj Sanjay Kale To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, alok.a.tiwari@oracle.com, hdanton@sina.com, ilpo.jarvinen@linux.intel.com, leon@kernel.org Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, amitkumar.karwar@nxp.com, rohit.fule@nxp.com, sherry.sun@nxp.com, neeraj.sanjaykale@nxp.com Subject: [PATCH v5 1/3] serdev: Add method to assert break signal over tty UART port Date: Thu, 23 Feb 2023 16:06:12 +0530 Message-Id: <20230223103614.4137309-2-neeraj.sanjaykale@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230223103614.4137309-1-neeraj.sanjaykale@nxp.com> References: <20230223103614.4137309-1-neeraj.sanjaykale@nxp.com> X-ClientProxiedBy: AM0PR06CA0137.eurprd06.prod.outlook.com (2603:10a6:208:ab::42) To AM9PR04MB8603.eurprd04.prod.outlook.com (2603:10a6:20b:43a::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8603:EE_|AM9PR04MB8195:EE_ X-MS-Office365-Filtering-Correlation-Id: 37316ca0-07a3-4ca0-3197-08db1589e537 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ilx2G9qXnPk4WEtNRnlzONpaecT3uYR6YGrqVVSqNI6Z5dWOyXHgU2A2Ry2HkXriv4KbDD/osV6r16tGgC9upBoSvGearf51Gl1H24ie++vehWNG1gdqh6Z65OZyvuBTZFn3ca0uKzX4bixWIq//InAur3r5Qa3ljY/fgDOm6jRIg9QOQ5ZXe7wL3+aUZIUmC05MFDMHTL2SHSNasd8TgJ7Tc92uLEpKkaeWt7GNKt0gvCK9LwITCNCcrfo6H5wkqptryd8dtfeJJfGrk1QmlB5bX14y+8FevxhTQhp+V07Tpb7IEYbTs4AxJV+Oh2Tq34Yhud1IZfJ835emcaKLM42qF3/D8abZA2WlAM4WISYfwEsEv68haOSdYpqhYC3suI8wQEmuSng59aUPBP8VCTO9dewsLsMq9Yt9CDK1ptoz1zuDJU+NB3QDZaSyHgG+DP464ZmcUOH0uW8D61hB+OUUZYyEYnS31UAwFD76Vt7xasrS/U1fahbLztUAtjAwfr74qhsWXzdohzC1MCXeHBlCnxAQrzeye2xVtdm3ZCRyMyT9CMYW4Ip44sEZWjdl1W6h03fpASTFR6S6iy3znaSA72oTSCBKbDrOk73CbFNpvsRG4SgQI+YkbMSdrFwGbkjfjQeoz/pn5mJLqz12reR2BoifaYu9rcJm5dJRIt228urZFFkaiE/v449tLBT4ZGk5aOauuE6UTD0hobeMHqBskFEe/8KzliI5WWc2u3I= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8603.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(136003)(346002)(366004)(39860400002)(396003)(376002)(451199018)(66946007)(66556008)(66476007)(83380400001)(8676002)(8936002)(316002)(5660300002)(4326008)(41300700001)(1076003)(6506007)(2616005)(186003)(6512007)(6666004)(26005)(478600001)(6486002)(52116002)(921005)(36756003)(86362001)(2906002)(7416002)(38350700002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ps8ZgAOB+7QxngjJwq1dNM13SL9WqpLRuolKboXN78eumUY7ONSimqgVVyyFcTF5G3sz/NkwfTpukDVVsa5Y/0af7gvPU2VOKsWVGvLiiry/mY53z/AxwMg/hFKMRemspJDribW8fcsy1f+2xltbfltL+0CZuR7ioV2PJ2DjLDKFLDymaxDQ8Ghk3DFKYYqwxbmB2tSDHuDNwL5Om29kH+qdg+0YD3hPUh75P5c4DQevDlyA/aszowv+6Y7fkmBcnPpciqarJg952kbXTVkYWjSW2JnlUnjcEMUPN5Rpnf0Eb2S+FEgvHAD5laE3WEk4xOdTGzHLHLBan1UWNjYivFPQEJktDbcrbnuKh+kjCEnOVKMUV9nUvP22hYESigO+LX/hHK2Qhv8QBk2N97ey+TkLfTgH5fCK4pLdL48hLwSkndsrgdsmVNlawTsFR/AwrWp8dELSERRa0O3q1nsmkbiv/0TCMfuxcKKS4PJNATGAmMvPB/CJX00pPPQ5jQGTQlcjZ1ISsGLXMeVQk1QEaFqjqW4jBNY3jBmdQWgO5uJ9DL4s/ze21z4vg80V+AZHljXQUBK6s3nzASE04o54P9rlVlUy8J7VJ9V5vrMheprra8eQCbonO09xaCx31xK1d7oL4vK78ugzH1HANWSJrby0fUSaVUZ40wg4ArWUNgrglVOGLjouRUNF1/tZ5QbDcG1zXcN89KXfW9WHb0yV6BcHL3sQ81GdDRQKLmS4FEDQa7YmYW38xabh7fKHngBhF2QYXCqUrBB7rJTXeb7kjOQp4qPsQ5SiZe9Di9fdZcaJHW5yYVJX1jI/8iSYHCrHlGeGNs+wcjoTK/S1q4j2MWyTp9I1wfRivx4+32SzhnQe6AJc3Gw8o2OqkWsxrnIKo5JynQ9/jy9se9xdoON+r+xlG6D+QoBpDkdQm2q3LjpdI+OfpRr1gbicZ/vv84vy4c3XKhKEVKJmI63hrGcCDHXsyJogAT9HKF/iTISrFHdD6HAPvvlhHVqKjt8LhHDqX30CSw4lCzurIhDy5CyaTsCOWEczICY6j9g6WrsKssXbFMhQbJwmJsKHpxyNYgqdrh5lENFPRFbkxpvcalSMRhjdPzJZRDPLJWGiaG+BQ1bDKR1sG++efwI33kJtfnt+mWfgt3c2EWO+ElDmkuoXsn8utrsqobo3vDLYkCpufjdF0n/0440vSd1hxrTVFv7mBCGTE8KZvLUcVblEYJuHaIDSf5JwChYvoNyyjzo1ww8Dx5GGzK2Ypp4q2kZnfWuk1P5SeLuK2ql8UTgzRV6uFioXTStmy78zpkaf0DCJlvfq8MupF3LZjzGG4p5jXXXuu3S1iK0mK/XNarM9CBcU3F60e/1lnT1OfO3mYg6AJtGCQkSD7XRjFbYpwHDjs9xaylz6ZoqaBJB/CeDaLcE7nGJp8InIo2nT8XtDC9O+gqsagYNJf7nfAePLIN070UGg9ydXe4JuGn9A4hiIDvvEqR3UMPpygxhdF3sXTcnL0avbXGUvDC+EBP8r1xzrjU35cJ/MggdH+sfjdieTXNbWiFnk/d/YoPz7LZj4Luub39x40L18fqL7dG0kx0ss7FotP2dCZs04rhylQjpSKKfBYw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37316ca0-07a3-4ca0-3197-08db1589e537 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8603.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2023 10:37:00.9609 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: T0u2knA3d3bMLyQqlCCfqyhRFOgGkFbz7UJL448UTh0MoFAmm/Av1hkleJjohi/qrbCzLIKuFMu342pZWLAjUzYItIknNYia+naFnu4QhHY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8195 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Adds serdev_device_break_ctl() and an implementation for ttyport. This function simply calls the break_ctl in tty layer, which can assert a break signal over UART-TX line, if the tty and the underlying platform and UART peripheral supports this operation. Signed-off-by: Neeraj Sanjay Kale --- v3: Add details to the commit message. (Greg KH) v4: Add a check for SERPORT_ACTIVE flag before asserting break over UART-TX. --- drivers/tty/serdev/core.c | 11 +++++++++++ drivers/tty/serdev/serdev-ttyport.c | 17 +++++++++++++++++ include/linux/serdev.h | 6 ++++++ 3 files changed, 34 insertions(+) diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index 0180e1e4e75d..f2fdd6264e5d 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -405,6 +405,17 @@ int serdev_device_set_tiocm(struct serdev_device *serdev, int set, int clear) } EXPORT_SYMBOL_GPL(serdev_device_set_tiocm); +int serdev_device_break_ctl(struct serdev_device *serdev, int break_state) +{ + struct serdev_controller *ctrl = serdev->ctrl; + + if (!ctrl || !ctrl->ops->break_ctl) + return -EOPNOTSUPP; + + return ctrl->ops->break_ctl(ctrl, break_state); +} +EXPORT_SYMBOL_GPL(serdev_device_break_ctl); + static int serdev_drv_probe(struct device *dev) { const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver); diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c index d367803e2044..be6044fc0e6d 100644 --- a/drivers/tty/serdev/serdev-ttyport.c +++ b/drivers/tty/serdev/serdev-ttyport.c @@ -247,6 +247,22 @@ static int ttyport_set_tiocm(struct serdev_controller *ctrl, unsigned int set, u return tty->ops->tiocmset(tty, set, clear); } +static int ttyport_break_ctl(struct serdev_controller *ctrl, unsigned int break_state) +{ + struct serport *serport = serdev_controller_get_drvdata(ctrl); + struct tty_struct *tty = serport->tty; + + if (!test_bit(SERPORT_ACTIVE, &serport->flags)) + return -EOPNOTSUPP; + + tty = serport->tty; + + if (!tty->ops->break_ctl) + return -EOPNOTSUPP; + + return tty->ops->break_ctl(tty, break_state); +} + static const struct serdev_controller_ops ctrl_ops = { .write_buf = ttyport_write_buf, .write_flush = ttyport_write_flush, @@ -259,6 +275,7 @@ static const struct serdev_controller_ops ctrl_ops = { .wait_until_sent = ttyport_wait_until_sent, .get_tiocm = ttyport_get_tiocm, .set_tiocm = ttyport_set_tiocm, + .break_ctl = ttyport_break_ctl, }; struct device *serdev_tty_port_register(struct tty_port *port, diff --git a/include/linux/serdev.h b/include/linux/serdev.h index 66f624fc618c..c065ef1c82f1 100644 --- a/include/linux/serdev.h +++ b/include/linux/serdev.h @@ -92,6 +92,7 @@ struct serdev_controller_ops { void (*wait_until_sent)(struct serdev_controller *, long); int (*get_tiocm)(struct serdev_controller *); int (*set_tiocm)(struct serdev_controller *, unsigned int, unsigned int); + int (*break_ctl)(struct serdev_controller *ctrl, unsigned int break_state); }; /** @@ -202,6 +203,7 @@ int serdev_device_write_buf(struct serdev_device *, const unsigned char *, size_ void serdev_device_wait_until_sent(struct serdev_device *, long); int serdev_device_get_tiocm(struct serdev_device *); int serdev_device_set_tiocm(struct serdev_device *, int, int); +int serdev_device_break_ctl(struct serdev_device *serdev, int break_state); void serdev_device_write_wakeup(struct serdev_device *); int serdev_device_write(struct serdev_device *, const unsigned char *, size_t, long); void serdev_device_write_flush(struct serdev_device *); @@ -255,6 +257,10 @@ static inline int serdev_device_set_tiocm(struct serdev_device *serdev, int set, { return -ENOTSUPP; } +static inline int serdev_device_break_ctl(struct serdev_device *serdev, int break_state) +{ + return -EOPNOTSUPP; +} static inline int serdev_device_write(struct serdev_device *sdev, const unsigned char *buf, size_t count, unsigned long timeout) { From patchwork Thu Feb 23 10:36:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neeraj Sanjay Kale X-Patchwork-Id: 13150083 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C004C64ED8 for ; Thu, 23 Feb 2023 10:37:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233914AbjBWKhj (ORCPT ); Thu, 23 Feb 2023 05:37:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233297AbjBWKhZ (ORCPT ); Thu, 23 Feb 2023 05:37:25 -0500 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2045.outbound.protection.outlook.com [40.107.7.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8A6F51FB7; Thu, 23 Feb 2023 02:37:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hDaIpD6DUnbNpUuteG5KhY2PHWC1E7Fb8xmIB6+Ez5Yww8RzIuUmdPVxGiflGQHmZ2IieZrl45XhTIbcLR9U5tf7q9rYT2k1HVnD7FzbiuVbG1/m9KcnmuT403y/g1VxjWC1ygerkBybEyeLxTUCs6XesFdkeVtVTaCi4S7bejTtH3DbS5xmgf6SvREO3PBtWcWqCYRUXKv3csYoD4+1rgryClEAAvcF7v33loC27/THgAvqIiGjpGvwM7ISyKs2Jy5fhkcpBXv2q/jeCK5zbamYnAdLsYKwaHqKg+nFEiwOiwwkbl1QwiA7oDVHK1+W5mfXYJRnYHeHbt1zW7KQQQ== 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=OsiN5ZZwPc03BkQeMZTXhfObCW9KQHB+d+9chCcqxsc=; b=E/DYzwHXPOcwfk+IgSPtMDBi8slBEDsHMqayQHtOueAJik2YxctpIuxdupTv8D3TyX+vvZajfeW1GaplIrYgN0HZfDV4T4qDWkH19LgyKo2hIkcnM14yXWkvJMA2vau3ozYHVCDI9WS6AcBR4U7Hu6Q9Aaq6cs3QbgEI6L8NRnVgdaB/U4wtPr2XbygZRORi3bt9QuyddcwVBJmG3POccevumBoC/VB6CCLng/jK0qIyBO5MSe2jEzmZSNHtd1x4clRtfPNj6ZwZ0g66ukFVQDWJA4mcd/DSEB1C7slLiiKflA+KIxKvWSB8SpwtBZjpmoc7DAeNSHKEzl7Zt/gaEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OsiN5ZZwPc03BkQeMZTXhfObCW9KQHB+d+9chCcqxsc=; b=kKOhFyUBpY0yY62p+y+CRZoPCO4QPU00bFOJbzMilFzFzw1ULmQ9Ku4Rv9Rr10II9N3JJJISHtxpsytO+WoQ/oIXPHgUL9UQJsW/XKk8OQVFJt3MUlTW4wXECHmmkBwzJg67zx83m+aJKWNU6kQLrqvivl/a30Q1ebv+IorPVhY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8603.eurprd04.prod.outlook.com (2603:10a6:20b:43a::10) by PAXPR04MB8239.eurprd04.prod.outlook.com (2603:10a6:102:1c2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.21; Thu, 23 Feb 2023 10:37:11 +0000 Received: from AM9PR04MB8603.eurprd04.prod.outlook.com ([fe80::f8fe:ab7c:ef5d:9189]) by AM9PR04MB8603.eurprd04.prod.outlook.com ([fe80::f8fe:ab7c:ef5d:9189%9]) with mapi id 15.20.6134.021; Thu, 23 Feb 2023 10:37:11 +0000 From: Neeraj Sanjay Kale To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, alok.a.tiwari@oracle.com, hdanton@sina.com, ilpo.jarvinen@linux.intel.com, leon@kernel.org Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, amitkumar.karwar@nxp.com, rohit.fule@nxp.com, sherry.sun@nxp.com, neeraj.sanjaykale@nxp.com Subject: [PATCH v5 2/3] dt-bindings: net: Bluetooth: Add NXP bluetooth support Date: Thu, 23 Feb 2023 16:06:13 +0530 Message-Id: <20230223103614.4137309-3-neeraj.sanjaykale@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230223103614.4137309-1-neeraj.sanjaykale@nxp.com> References: <20230223103614.4137309-1-neeraj.sanjaykale@nxp.com> X-ClientProxiedBy: AM0PR06CA0137.eurprd06.prod.outlook.com (2603:10a6:208:ab::42) To AM9PR04MB8603.eurprd04.prod.outlook.com (2603:10a6:20b:43a::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8603:EE_|PAXPR04MB8239:EE_ X-MS-Office365-Filtering-Correlation-Id: c1173d5c-9b24-4807-b17b-08db1589eb5a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2Q2+4h5O4T6na3IlT7u1zKGrwVtHvyRGimx2XTq0uQRXZpryQ9xVdYSPQjFS8bmG6gpbYDvM1/n2ncKTb0PV3o2BW8syi0D16U6BrYwzikr9oGrQNDVcOczd/gXOSbFS5ei5NFeKYkf2UX8OPcndt1slnRrVJob+EV0PHNoxBUAbzhFdHuO7WCpfPY8E+xPnOfomcBw0Z/Vki/OezqYpgPfglt5kjXJhSdFmHZBbdrChcJ7bkC9kx+ZMQKw+Dq3UsD357RBs6kgmOyfeNI6Sd4Jg6/gEenEoDZ9equKPMD/rFt1UxSvf9Fqju5EoZhKhNr9QidsTRcf+RonL8B2NshQOXBh1l2A2qOaCjXaGNmfhbAACg8NWk8Ur2MqBDlo0Wbl1YecaNs/SILNdUuz7ZGBkMF09sOuGqTtEnA6BuSmaoWZcOvVznDjO5kAl5V+9bhuT3Sug98dXdfycdfrGEA2BacOMmOcqUmMju2OKNpl7ee8wwNVimSPQ5GxBUukAQQDxpzh/jxe79RTR9xc6BGlxfJ9Evrz+HpmWfKrH798qQfSwdWuJ/1gUpZVEkBiix2CxilJC+VhyjtOWAVlysa9sYrgYHZFNaDxWlGqTlJrKwXZpOhkx7ACBistd3FHHFscG7WYefcftWWrF+5U+0wUd8AqV/4gZsSVVZwW2bI+jVbv92qw7OX7lbfNsB99ca2FjAZ5B7N9rFUDskPB/fQdXR1pDQ9r906ovng8W2OjC5Hc9H2jkvZJpCB1u22FE X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8603.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(366004)(346002)(136003)(39860400002)(376002)(451199018)(4326008)(921005)(86362001)(36756003)(38100700002)(38350700002)(66946007)(8676002)(1076003)(66556008)(186003)(6506007)(66476007)(26005)(41300700001)(6512007)(6486002)(966005)(52116002)(478600001)(316002)(2616005)(2906002)(83380400001)(5660300002)(8936002)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5ak4rEgfgakpZySk2MDqeWSnjN6XQ5YCXnkC41SHxW9CDYzBEv1atwdJNAjL7NRgcnq647t0XYt0Es9vJ/2MJLEjp0257f5RhHOUbLfBNczp1A/Jhhh2OVOo9ovY4Y2GgnRUMlNsxw6I4JIXYC9b4uguKBltSlRzRBDWGqWC2104TovDoEvMRvJ59sfQC1e/O5wjRVcLGwrz/fvf9Tfq7zpMvGOh5YAM4iP9dw0OooeT79rKv2loUK3eCVY4e8Dd/kxm85YbdBrACX3VeoehtZQrqYqqMrbpDEESFFPHLCx3Vz9q7zBpw6d0fyLqYOB7aqHlKtAB12p8phnW3nqVbUEjcJvL7mr5G1RAIYPnONtFmTgN1UtJebhNe5++izRrAl5HMVEZreq0g5xVEev6khJy98H9yZCjYjFLfnZ0++K6Z3rLyF4wA09cD3ulvTRm35xqtvLEYmvPAuygICV0iE7njql+WYh8LRVShGH0ihcaoe+LTZjqh73y8AR8wIgREG/kxCFqMLjWDpyveRzE0ydMpCkj0866KoR3UPz11G1Tedo/I7J3btfHuT8BKjqz867KB4HXQPKjpr5jJfTNBWK2lHQ5bEeeFTstn8PLZ6eP8vEshho6vmyULtjQ4fN/DGNcen5uDlL9QYWACA7mZu9FqGmto4AXgyVp8SWzO4GwFa28kbni+PwMbv4RSncgA1CkSf1GhfasMopsvutg3008hS/5073OhEcXpbo3shtBfX/6CZP+UcglF3MljkJsjeyKfFcR2JBjXagzbDwosNB3dTMUr3MPjHQbdblmrDznU81U5igV1SfPn7pDeZLWcS9wTA/wxwGQdZu5FWP3otv5gZnV47txgIL63SGVNjUGTeWPIzgbi1AKiKx9scJTOi7/NMaPzGtjlaMclxhwWu61/KQPHE1Phtp5rIqVcuOPu7l+aRwdEWDlpb9sFgsR5HbPZb/GCrJWM+6KHxf+C5N4JP4QRpd6B5+v8yxIPY6dDA+KbSPgwaUZmSLzYn7Q7YC4WDpKFjMeMuahTTCvTvbRYOz5LLBNyvgv9kL6udm9roAEXki136Ey70t+hJXzqIgvJVceoXKbgoy+/kXDfUkeNdFoii6JNG06EQ0hqrH0xaRgNq/qpKGbLEtDkPgnCnlMdiehFVDDzFLseHNQ6J7qlcVFX/bdUk5g1F0oNAm/6RtPatrudu03nC+eDww+GNjumazQCYENDiI3pT2riAv6zmuZZ4g1YuseF2+iiATlqSMW5Sp5k5G0JLazB5cYiG4dgl46cAz3eWC50t9LVAZrIVkfcvVy+k6EIZyj0C/WG4b9qa7H4oLtV6pI/jCvrO/iTEx6vivd5h5kHXJKVLIVMRHrR3iYZQOz+dyeHsROMHHSyDAeoaxG0WyxXo8FqajshQCvvPWzrz3RqX5DPV5DV0ZHrPqXzbMstrifviFsU4aYCooGVU3gLWNGTpbnIUEo2itRjVkgPp9UVKsjSL/VnaX+Gl6KbiRN5Lt2Di+lKn6J7rTlKT4Qf/85P3AX+/Fbqkv+MYFjdV6IawqWL8jVu6yyEpCsr0TAdDf5u6JxTDtqC0wemGhPsbtVymTpnlYjnCgh1N4zuLW4eFIV2A== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1173d5c-9b24-4807-b17b-08db1589eb5a X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8603.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2023 10:37:10.9630 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TIOxTU60gRqmjW0FlRd1F6As5VIwrgHA3TCYfmtufi+vq4jEiv+s0y2cUab7oh+hw6x1dEGWTqOORU3nRR38W2JsgF8DZRVKsJfoahzvVKI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8239 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Add binding document for NXP bluetooth chipsets attached over UART. Signed-off-by: Neeraj Sanjay Kale Reviewed-by: Krzysztof Kozlowski --- v2: Resolved dt_binding_check errors. (Rob Herring) v2: Modified description, added specific compatibility devices, corrected indentations. (Krzysztof Kozlowski) v3: Modified description, renamed file (Krzysztof Kozlowski) v4: Resolved dt_binding_check errors, corrected indentation. (Rob Herring, Krzysztof Kozlowski) v5: Corrected serial device name in example. (Krzysztof Kozlowski) --- .../net/bluetooth/nxp,88w8987-bt.yaml | 38 +++++++++++++++++++ MAINTAINERS | 6 +++ 2 files changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml diff --git a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml new file mode 100644 index 000000000000..d2f3f2b6e15d --- /dev/null +++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/bluetooth/nxp,88w8987-bt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP Bluetooth chips + +description: + This binding describes UART-attached NXP bluetooth chips. + These chips are dual-radio chips supporting WiFi and Bluetooth. + The bluetooth works on standard H4 protocol over 4-wire UART. + The RTS and CTS lines are used during FW download. + To enable power save mode, the host asserts break signal + over UART-TX line to put the chip into power save state. + De-asserting break wakes-up the BT chip. + +maintainers: + - Neeraj Sanjay Kale + +properties: + compatible: + enum: + - nxp,88w8987-bt + - nxp,88w8997-bt + +required: + - compatible + +additionalProperties: false + +examples: + - | + serial { + bluetooth { + compatible = "nxp,88w8987-bt"; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 32dd41574930..030ec6fe89df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22835,6 +22835,12 @@ L: linux-mm@kvack.org S: Maintained F: mm/zswap.c +NXP BLUETOOTH WIRELESS DRIVERS +M: Amitkumar Karwar +M: Neeraj Kale +S: Maintained +F: Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml + THE REST M: Linus Torvalds L: linux-kernel@vger.kernel.org