From patchwork Wed Mar 15 12:03:24 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: 663959 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 32220C6FD1D for ; Wed, 15 Mar 2023 12:04:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231773AbjCOMEo (ORCPT ); Wed, 15 Mar 2023 08:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbjCOMEe (ORCPT ); Wed, 15 Mar 2023 08:04:34 -0400 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2071.outbound.protection.outlook.com [40.107.241.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D22A62BEE0; Wed, 15 Mar 2023 05:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G3E08Viq4KESPXH+aBjdDDUwb/7uD72FPOOVoGkWFlIgXszPADaQYQoOUHYoCs4LS5oxu3AhUQYzWkzXoCH2sFZeETC71/rhvv8qegp3b3OupHtxFQ8nG5PiTFD0UoSTrc/3WZx5eU7D5bwDEBem2sDYOfbijrqc1iKnLDopl+Q6/bUDWu6Q8NWYtvxaKJHlD9I+oD0SqtVAE9rJLpaM1r3lcHg5zVHHdeLD1/J/XCUKnCQe21/bbqEIT3FKAQjejCGAVQvHZ75NEx+9iFmmA4LiBoHDpme+EY63vftdFUC+j3OYn8/RH905rjIwWlIz/xmM/PswenpkZo5PrSIEkA== 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=8nBPLnQZTmbjcXxRT01WcUGU4Offe4k8SEV+HxYAerM=; b=WmaDi9HHl1Fwg3VEAnrs6Er6pNiX0FU0qPghNNbsONiWr5WuF70qu6iuB7pwmWvfXAm3Xc91bWieh0FGVKuDl3pP338brBxg81bttAZTUDn+uZ0U5Ny1eTnDxUL79qiSZ0COhipYGjDxQFIXhV2m2b61sEnUn+FTIaXYeopeywaz/5uX6CPpy3/YowRwrpeL7Sp2bD7xIZUIE0vrBgaSBdxtYOMxhqv3kxfFsEYg7WSJ4Bl75kDmMk/5U6qNWP+b/vqO/pfMjzsma4Lxtb7TLxbDGumzTzZjdpPS10pnYEkiXB73UlSFutFn+vJy/QHHPKHeflnFRpMDjYLJUAwlDg== 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=8nBPLnQZTmbjcXxRT01WcUGU4Offe4k8SEV+HxYAerM=; b=AVfic7gEmGfaXUlnT1ieGBSYUqyyDLEhTA12phZRbdpQyOll8K4tZ9tlyBJWglYfIDsjvgLRGqMzjSPnuk9IHSuAfkB+DjiIJFT6sufPYAdZ0DzThUHohkB5YO+A+8opLZzReGHCmqHefu12Lkut9M/DAZSc5QwYrr4V4rdq76E= 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 DU2PR04MB8629.eurprd04.prod.outlook.com (2603:10a6:10:2dc::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.29; Wed, 15 Mar 2023 12:04:10 +0000 Received: from AM9PR04MB8603.eurprd04.prod.outlook.com ([fe80::45d2:ce51:a1c4:8762]) by AM9PR04MB8603.eurprd04.prod.outlook.com ([fe80::45d2:ce51:a1c4:8762%7]) with mapi id 15.20.6178.029; Wed, 15 Mar 2023 12:04:10 +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, simon.horman@corigine.com 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 v12 2/4] serdev: Add method to assert break signal over tty UART port Date: Wed, 15 Mar 2023 17:33:24 +0530 Message-Id: <20230315120327.958413-3-neeraj.sanjaykale@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230315120327.958413-1-neeraj.sanjaykale@nxp.com> References: <20230315120327.958413-1-neeraj.sanjaykale@nxp.com> X-ClientProxiedBy: SG2PR02CA0096.apcprd02.prod.outlook.com (2603:1096:4:90::36) To AM9PR04MB8603.eurprd04.prod.outlook.com (2603:10a6:20b:43a::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8603:EE_|DU2PR04MB8629:EE_ X-MS-Office365-Filtering-Correlation-Id: f431bd0c-1935-4355-f2b2-08db254d62c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F6XzxAjn7YmXYZLptZwHCiFUt4hjL3bSR52bBLG55YoO6eOCxvNUYHHrUmkkhVZ4j7pQzb2tRQ8TXnu/BrJJZxVNXJzlXO8viEihWnhsmpU0dj0LgDgn3WV3Q0T22/Ef/w3gGPDKcBI4hPc5PaogvVGNyBbT76CerPcfdKj6m2doU6jsHJmQ2SpKcWpboVztbBJANf8JkFYOdZB9PhXBr718rhDnI9UuJzQGMCfujF3XTnYnm7Ych8ZycINb0M3lv4K6ZZm4Ni+6IEWi10lOzbdnOTyPY9z3k7XiB0f18Tt+LKSs6H84DLJYzexON9CgyZOt2Pg5EvEoqC+kWSyjo0kPlDcSmkHZgz/B6O4+fs6FOdPlj+h1mbtBgLZH4r42DsCxbuGsqvuNrQ7FoeCZARdNMW1mYIiWeHsoCNDz4xITHkccVON4QexXUaDi0oQwGcZ1hJ3iF8HYOoTRjgnEgL9sdacAoIzUu1AO8q5JRKYDzbe7I0ffv1o/LkfAPu6qT/dwo5MEeFg0FbjzN/egYbqOVzIEjRBwny1/gOI3yw/QuDwIgWUSOeaiQMSDzfaLtgS+0Wp2qELctQQC3EOolEoEHYE9AFAt047PKt8PVWKtGEk9JeAtTfDWGRhU909YKQ5M1FuvwLiwuDRJhz5iAOIgutMSJflUYxUpJ4uF/bxwiAck5wrorpdBNYNHdKgX/LJsm9ez4yYCxe7zZbPIZt2XuXq6Olyz3BBIkCvy5Kg= 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)(376002)(396003)(366004)(39860400002)(136003)(346002)(451199018)(66946007)(41300700001)(38100700002)(2906002)(316002)(38350700002)(66476007)(66556008)(8676002)(4326008)(8936002)(478600001)(5660300002)(7416002)(186003)(52116002)(6486002)(921005)(36756003)(6666004)(6506007)(1076003)(2616005)(26005)(83380400001)(6512007)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mx6GWTq+71PFomIdccDE+xZ07URYDMQf9k9xpld0xgNm77NHM4cgUiiSy2cuibXPcn3VulA7Pkh3mM77jcuHYRa0B6bWXzjLlbrEqViAPl3iHML76Ampf+FV3fIPaGqVsLvLEp7Xl53lKhtwgdpmh0rHxerKIy2qaoTyex/cSdxvwpP6nQobBokZwLYF03uyu9jzUGuCU2SoJP06wpU8GW6dSyeLku4u83HN+3Hpp73YdFlCl8uhAc6k3upBog9i+hEtbINnjlA8KPVRC6uJTVjSgSNfOYlU66C0EsiI6yol3snyPw5q0pkwFB6I7IxPJ0adjjTPHgnzE20xK3K9T7PzVIU4aSHHtOQuaPslvD+QAzACJoyIEmZtVaiyvm88E/JNqyGZcqxqrbRRqodpgSp/TWg24qbO3UuOQG2UN5c/y7un0aDqsRJ1rEiBzeH4RnzH7UVD7/J2WbkyvutioHuxfaPY0H/lIWD/Egwwtr1Nad9FPa8DRXE127FKtubetN0F/v31YhqBFyNM0W5J+YIF76/yG7bKt+86WO7lj068J9kHmVCo0PF1J11hR9tVOsyo8Yf8s/6VAv+9i4ps+WH5U76a2bzt4Eh8UKCHywd8hzv9gw8bbPSB2WPNAknwRja0/vE3fWi0aGk/YpOmVObcTJ+QhmVpuUWzVOkpxBWY306oQfGMvrhhgHYEY2q12p39B1HQLPHGdCyPVoB4hVwg6Z0IkgfTeJwUonhtfYlw7kLpIxwUO/1+Ja0jIEwfOWZVEFF1d0vt8x8pdOiHatIsJwMMoQ9eyPzMX5knWKTFT7npuHN25g1SnuNEvIT3KBYdhSPHbKyomsK/ANTS3Jxvf+H11IZl9slBF4yQFh3WK/qjXwLKPWZmXHCi9PL7M9Tr1Ukr8SkKf3+RAh9U6we19Z8Rv5cITJA2QByF5Y/1nmaVy4kTWM/sauCeAB79JvZqEGtDx1O0/4Dk0RCFp42ro5oVrdbIHQDzo/vVC6NA09e7kHq4OkQgs+cUM8wKOx4KthOI+zRRoSUuonc9kROeNYfwIF0UFaViLOTaIznPq2/uCJ+7PrrYvD+0T7QcPYRvy0re1k0/GxRVb+lDHZgXXDv4GMURPETDtwfnXrC+0d4Y9f8tYXsHJVTpaGORMy3TsCjQ2WLeUDydeE1S/SCJOlHBONJ3Qsd39ThiiF951fMwgXfJKlgPguIBd4e/U9l8xas6+Vj7kGS/71ygglaY5wtC67IHAyDL0He26pH+dOR+PYXKmUqYDiwUBb7XD0o7v1KV7DAULDWm03kteDI3W3ZAZnPwtAqxNg84dl5P5Wu2/+vpjCVRqUtaOkyB5nPdx8WQfmpCyOKsI5EbcPrZFxeLB63gJJ9oLd+aXFC3qnUQjSgOjDGAMBjT1tdecwT+yQHRy7TrD/fcl45wJJO7LyP77fLzTEi3I/IutfxZ6LE4pT8sAhdSSAtN2PJOrG64nLQ3qDdbxLka84rG8h2VpAJC8YCG6qMXsBj5Mm3cJ5nDh9RICjcBXyPcJzAO8+J3/KxJqJMjBnT+W8tJ0DAIAO1UuRQCHiHfy35mHmefahqP9zlfUfXjZBvDj6lK8wTUbgLsS43QocKyZPQH5Q== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f431bd0c-1935-4355-f2b2-08db254d62c3 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8603.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2023 12:04:10.4962 (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: hiG1FLuaQYQ0VZ2nOALqnEyj2ajS0mYo7U/3T4fzsYeLxIHBKiyLOeVp4UD2glvP9Kiu8ZaXvjprA2F1LbNG8/9NU9CKC8ft1prtEYCyqhA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8629 Precedence: bulk List-ID: X-Mailing-List: linux-serial@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 Reviewed-by: Simon Horman --- v3: Add details to the commit message. Replace ENOTSUPP with EOPNOTSUPP. (Greg KH, Leon Romanovsky) v9: Replace all instances of ENOTSUPP with EOPNOTSUPP. (Simon Horman) v11: Create a separate patch for replacing ENOTSUPP with EOPNOTSUPP. (Simon Horman) --- drivers/tty/serdev/core.c | 11 +++++++++++ drivers/tty/serdev/serdev-ttyport.c | 12 ++++++++++++ include/linux/serdev.h | 6 ++++++ 3 files changed, 29 insertions(+) diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index d43aabd0cb76..dc540e74c64d 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 f26ff82723f1..8033ef19669c 100644 --- a/drivers/tty/serdev/serdev-ttyport.c +++ b/drivers/tty/serdev/serdev-ttyport.c @@ -247,6 +247,17 @@ 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 (!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 +270,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 89b0a5af9be2..d123d7f43e85 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 -EOPNOTSUPP; } +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 Wed Mar 15 12:03:25 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: 663958 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 085B8C61DA4 for ; Wed, 15 Mar 2023 12:05:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231924AbjCOMFL (ORCPT ); Wed, 15 Mar 2023 08:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232023AbjCOMEv (ORCPT ); Wed, 15 Mar 2023 08:04:51 -0400 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2071.outbound.protection.outlook.com [40.107.241.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B31E430B1D; Wed, 15 Mar 2023 05:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OVYQPJtm6I1+4uH6UU934mNF0GuZ8NXHVB5jI19TjTOfqPQ8TWUhbCE6Xiwi5jUt2oZw1ookSr/1OsqCf6FxtvtoMZmgHv/L2ndNlijlf/1QC/G6wqXnnv0gM5EF60C1ymQZ9bmgjWkYGNGrDC2wMU3HrZBbS2qdHLHIfBH1ZDHHf2XZuxRCigNYTRkqdVfoCc+dSgp5ImiB7nf6oKLCB9JFc+y59VlssZMojiCrxFC0a3JxuKZOjHyJvZ7Ay+x1KoijaG1WeixAfdF+ZvyQGqEknafyGpwC7WbfmSCbyPtJHejRYYmKdEs44IxK+uGQALHNSPDR8Y6bFEHPn2nyMQ== 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=pE/kksZ9/izowAg1GSlXNRb2ouOGLUVelluEjwyW+P4=; b=CianlRU+8+MkBrvNb0mXtCR/E6Bk6poHRi2neFYREiYnecJ1Ru0coZf8mLYHm7I6t57eutVmf7IZ/9nIUkUvMdTEL+qGltpllyBLCG2iINK4M6s/qjqQ48K0aU9IMQLIOH4ES5xo7pziaPPq7A820x4Ib6+Cri/Gb+HhObA4gccVPZQQkeONbpewF1odsIYtBSOYPD2mmTJ9QQYmtNF2b0olWvCgkrCpCAbsqkL8jiZyiX20RHDVaYuLHGPDlwLGCMJ8dQMN9Fcr1hZWWI7nhA9Zh9bPVfyVK/nCJxw+G2i+SrgysdgscPC9/k+3kNj7yYEV6ix8upUDZFwLQjvieA== 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=pE/kksZ9/izowAg1GSlXNRb2ouOGLUVelluEjwyW+P4=; b=Ch/FRqZ5sg4tVF3+oesVBHavw8h73yl5kIXaS8a5J1HYbg8RaG/q+zzgoIFdXqI2s6ZGTFld2K7JVgqeP3Igav0VpoJ3gjJtylFsiO6qbuNkkueAu3ShI76NxK87DqDkAw2t2yKBfS/RVMlq7i5t0YEe6g5otdQM1zDvoaHIJWg= 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 DU2PR04MB8629.eurprd04.prod.outlook.com (2603:10a6:10:2dc::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.29; Wed, 15 Mar 2023 12:04:16 +0000 Received: from AM9PR04MB8603.eurprd04.prod.outlook.com ([fe80::45d2:ce51:a1c4:8762]) by AM9PR04MB8603.eurprd04.prod.outlook.com ([fe80::45d2:ce51:a1c4:8762%7]) with mapi id 15.20.6178.029; Wed, 15 Mar 2023 12:04:16 +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, simon.horman@corigine.com 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 v12 3/4] dt-bindings: net: bluetooth: Add NXP bluetooth support Date: Wed, 15 Mar 2023 17:33:25 +0530 Message-Id: <20230315120327.958413-4-neeraj.sanjaykale@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230315120327.958413-1-neeraj.sanjaykale@nxp.com> References: <20230315120327.958413-1-neeraj.sanjaykale@nxp.com> X-ClientProxiedBy: SG2PR02CA0096.apcprd02.prod.outlook.com (2603:1096:4:90::36) To AM9PR04MB8603.eurprd04.prod.outlook.com (2603:10a6:20b:43a::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8603:EE_|DU2PR04MB8629:EE_ X-MS-Office365-Filtering-Correlation-Id: f918d3c2-b8a3-4a07-c7b7-08db254d665e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: db/HAgn6pZSg6KZJrD+uRrG4CceXKl2Z3eDHeDHAMwQWZtTUchfNPnxdK+bqjGk6GjxCQK45r3CHJhkVuqRb3ckpwgF4o1rdcmWMZwhJq4Kc1y+cOwknflPgwL2XoM48qEyeoYPJky0tkvPh83ENmzYrJcJhvyr1/l293ubGkQ5+b7gJ6yxKMKrLpQ5N3YtCu633mzeRpQu2zZ7VrEXa2MzKnTpZFkJgTmRWif4OvDTe6ekGMHrSIhThML6r4KLQfG2bmyuEuENj6tE/9eYkDl42n7H7TljdbKPsJ3DKBT/VDLFJSbiCpJM4+ov0dA4qbvKMTkgT1FrIN33VBSSXGX5fXRtzAzp/qJVd/SN+YlQKtJmxHw+hIAJPDg4WewWr3eWSfLnKNN+gLrkByMQpHn3yddj6193otj/Ktcwndp0CGbv3wXqg8DGdutvOeLnVEAWUqNd4l3ris9UFElmyAqQktXDLrz1ME7tGdM5wG2RHqpfuNI/OUBxRT08tdR3GASSHtpK/yb6RSvRvXmwMpOtf4NS0p3kvqppdbnyqpmXJKEKL4Bq1OAbypGqlZvp4v8grz4kb4BrHJstYryTDNlPbdIC9fBIUwAWyVDppdNjjYIKn4qs6C0ABYKFSG0TcR+GdtjcpR2fP7AtjnlZG9f/IS1vM+68rYNP6dsLUei6LwLQbPn/Zxrg3C4yd92SkqmB1YfzdHMrIp07z6ZuB4AAbbUkd1RYTB0mND02+40G4997fB1tf3cKb+DF/2REj 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)(376002)(396003)(366004)(39860400002)(136003)(346002)(451199018)(66946007)(41300700001)(38100700002)(2906002)(316002)(38350700002)(66476007)(66556008)(8676002)(4326008)(8936002)(478600001)(5660300002)(7416002)(186003)(52116002)(966005)(6486002)(921005)(36756003)(6666004)(6506007)(1076003)(2616005)(26005)(83380400001)(6512007)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kd4uH6ekfn5E9BQlEaLotherFXFxWR+AadcF4ktHL5p70F2PkKBYFy7k/f23nJnsZfZRDdmVbaAII8+yZM//jsdeGN0IaY+hFJ9RzkpCohkElyM5RrbBLeCwQ961MnjyLkZM/hiG13faOZAd89wRWUQDOjtAT1fo8ChQQfCFVM727q7m3vG0wInNZpLKvoVbEcMSHRmcvSYDIxX0iTy10/XMoNgK3si4vIlZz6gpqNXkDKdzC37r16H8VmKkI6e/f4lw7gdYuT+lFubrXod+Mu/lvhHowxv4Xbz+1ioNBilinTIw7x/TV5PmXG5+uTTe/8M2j+5AsOXG2gluLVF6Va7Bjj0brLSGyrv1PozGxCtjqSWgH4KWjJfNAZ99RCy62FIo9erDwxreutsvR3v4L5e/1iW1imF5bW4i8QIWIS64nAJdSp1qz18BTRXa6fv2hmKqn+m+/qpkRrtlsLv8zbBm1qbS9NihORCriWjEFdLeSmxUucCPTTAx6E4HTeRvg94sFjrUdqP3eusMMK2vOjT+JeyvWpyFfudoR9y4Ct65BUMz10FDsSXM6YajOgh+Wgs6B2nbaxttL7gaxStcFjO0gW+YKOBs0fw584kl2dL0l2j1aJfW0kqT1CgWk6t5mv08rUFbka/1zEex8j3rpEmeu21XIaG7vlzVu1gyH30xBWB7LN8U9ivqyDdhEKF8vaXs1oY4cgXv0gUH+RJ+oIvtck/HpV0QDwY1+dUPvdy0xzCgInitsHrID0KTXpbu2ed9FummBWOlNqbrjzUoAgloGmm/tin6DFLiMY569esBAEl4dbjwgPXJGO6f9ZvcJJsQ2jH4iEsVtJOyg22shib25AJjkC8kLGuayH0Kh70X7x4PkKir4ngefAaIg/qm3s4Ucr3TGggnTPiEnDfnPxXAasIfvH3K/CSpe4x9IFkC4qqmv0Q6mn3ckX4AH3hjlpQyGemR60ZMoBa0JZMfd+wWM8zyuvAerrOwvwGLMRctK+UX8gaA2wUXi/hCnJAmkprhWScpbPUCBnkIlAQ5TrWqKiCU7SUiKO3bK3DmQdYtJzzPLFXsFJwM1vOCTnkglcA5yD4Z20O6djCY+0g9faUGPIuWqjFM/4BRiNVvvscPVtKnMm4sWLeMQQMKKH+3nbElzZaOWkQ9ZNT3wOl7of6/2qoDKaBpqWU0W+PvIDKrVErgACF9GmkdoBYLsugigoUKieFau0V2VnnrIW4sSvDSugdIgm+LcrSRjVS5g9a/u3qew2SLTQ5zJRnyUJbjdPbeySiSgoVFAbLWgvbNnZk1H27lzvsJJq7Jt8W+G/stPjBzjtcYBeusUKr2uZBFXAiKZ7N28VJo18+dQT5q4z8arjkoaVFyEU3zEnbD9rLA0g5X344AsCIn7ypNxG1cU2/s1Q+mSu307z7IUJvY3gshuyiip5DVi/qqGUVsgjd+mdV76pXjZcW5z6hAeb2lblfq/7wx47s+8BGicjVgj+ade5pK1AUo9sNXr3Usgihg31QzyBi6uqDyHmNDFC6MyhtBj/5sY5ewjJGRQ0gFFm+xs3S9uUOLdKZ7VK8kc957rU2/xE4hyA5WEk+Uu6ZgwMrE9UDiqKCjLeW4lgahTg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f918d3c2-b8a3-4a07-c7b7-08db254d665e X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8603.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2023 12:04:16.5282 (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: eBwt7CgTut5FUJQAaNQjDTBMD68vG+LslFpTlwS2SONT1dtFM+ctRezU42KcdFoh61XfREK2etWOPqGDgNyiPPrv55rXLmBh5XlFhbNOA3U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8629 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.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) v11: Corrected grammatical errors in description. (Paul Menzel) --- .../net/bluetooth/nxp,88w8987-bt.yaml | 45 +++++++++++++++++++ MAINTAINERS | 6 +++ 2 files changed, 51 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..57e4c87cb00b --- /dev/null +++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml @@ -0,0 +1,45 @@ +# 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 + + fw-init-baudrate: + description: + Chip baudrate after FW is downloaded and initialized. + This property depends on the module vendor's + configuration. If this property is not specified, + 115200 is set as default. + +required: + - compatible + +additionalProperties: false + +examples: + - | + serial { + bluetooth { + compatible = "nxp,88w8987-bt"; + fw-init-baudrate = <3000000>; + }; + }; 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