From patchwork Sun Sep 24 11:36:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 144113 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp716909vqu; Sun, 24 Sep 2023 08:26:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3IJqtouDMi3vUYUDTpq/8EBRSc/rSDbDDfBHfuYtC72pE0CvsQiYNw8ufPTWeWdtqMx33 X-Received: by 2002:a17:902:aa41:b0:1c5:f110:efa0 with SMTP id c1-20020a170902aa4100b001c5f110efa0mr2359789plr.30.1695569189629; Sun, 24 Sep 2023 08:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695569189; cv=none; d=google.com; s=arc-20160816; b=ifMjUMFAxeVk4Ow1PVtIxNTbOZD7xTXMMT5B1Wt2s3Ef1GCTbgyX5EbXQWx7m5Hj0y W4a/5Xl2u43s3O+h04s1NulL9KwVRuQc8DtKzUD1ox4rX3p20K/70wKnla1nTzgZpm0y PsZtWcydgkprN18kPXMbvHgkjiYtIbH3mZErXO3pSzO40WBpc/0AkoWDh6GNfDxh46hi A+hQyQYCWb5hfB/0zva4gZ2x/vm0Qkkj/89TCufKAty9wL7fueaWjBZUrRTgMCwgnC25 pW3aSHKhgi9VoYv85Yevo1wmgJZZTaYd2VPVhSaxLM+BOWLOKWDEa3CP98S9FPQ1ae22 lq/A== 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=ygmequM6X8SVeyJvfoY8+sWP6RwI5iKR0zSHbF+Gqd0=; fh=s9z7nQI8bejycky2Sj3FV9x0KoR9nNTVf/pJEfm3xpg=; b=RQwKmH3QE/QTvwnrFAC5FwThrtJWveVvTLV339O0uj96biEV4l1G6r4Yu5ha0OqzK0 WG2rGFuDu27ShUtzRUFeB4IPuwHBu8tmNsONXwxFhKugqHU0MgmMGmn5Xy676tK+dFHF 47Um55IeGew+OdCUOUvB8YgQMnqJ5kze14f3fUCUa3KnZiCHjUcK3SQYahpRsdP9qKC3 AzVIHRZPIi571S0AAskws3utNA0MZkrHXFWjAzVCOEAkuyJx7ryz5UjaRvyUU4pny/Sz 71Uk1Isw2jAQ5X/jwPLYlbOjnfPi1ibczW3+kyIEZ1Ep3abCRhe0Rc3ccSdHgOP2qlCo p/6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dThGO9pq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id w3-20020a170902e88300b001bdf69e297bsi8586829plg.588.2023.09.24.08.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 08:26:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dThGO9pq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EBB3A8031AE4; Sun, 24 Sep 2023 04:38:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229589AbjIXLih (ORCPT + 30 others); Sun, 24 Sep 2023 07:38:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjIXLie (ORCPT ); Sun, 24 Sep 2023 07:38:34 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDAFDFF; Sun, 24 Sep 2023 04:38:28 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-2773f2e599cso204879a91.1; Sun, 24 Sep 2023 04:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695555508; x=1696160308; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ygmequM6X8SVeyJvfoY8+sWP6RwI5iKR0zSHbF+Gqd0=; b=dThGO9pqSVwZqfKGqysQQO8FfzYPzNKztBepck+LnMxqxHQda2beOvH0cQ3b3ffk6V 5Xg9j4prdVgHdi8PEiPmH/newzvxY7D3Y7ZK9MwRxU6C8jmoihzaGBIPBIxGeStIjGpx zTQurP+EH6u4zSlGRwqLytByg6HI3zItPJNMNpJi9U+NCmo9GYS67/rhfcFTCyxr3MmN blAkM4S5E517e4oChPeI/8UOiyHvhuljyCE7q1MBxj8+lFSmWSfvNLV5rgfJ8DXk75ii xnu747vMBmBdf+Wwq4hnMr7qwUd4sh2SVB0n2BiQcV31SN1hB6tzUtZARqTIn0ul67nA wHWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695555508; x=1696160308; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ygmequM6X8SVeyJvfoY8+sWP6RwI5iKR0zSHbF+Gqd0=; b=dkttI1Bjq6Nl2b4HHGqx+1/52OrwPjFmAwe02FCnFtTYOa2Y9xBfUiT5AUjyThaTbG 0prC4TWakEv8ec31/mexkXXQ6K6cDTaMCh94hUHm0emfrbVnTvYbzDU723zDrZwzYlE8 Ud2xRviu+mPXSitboyqQKUDqQ+ERk1Pdgd/xVmwY0O6ZTbxilUsc/ayyM32mTo83hgnd sUYeOX4O90aS4zfPgCzCBMhg05T50qm7FCGsjjAUgE/oQHlp29uin8vLsw5IM4hWL6xn Buc21a8wra9iL9GOYErd0SPwarfAkgMoits8xz7WyroJSJNLkNTf/QEbVSGBYVQz0Yor URSw== X-Gm-Message-State: AOJu0YyHQ27BO8IJCSL+NCYxxDCkl64bAvqacDaJLsm45zN5/DocLpUj lxdsi9Ts2KZNlA+gE9UNaE4= X-Received: by 2002:a17:90a:f182:b0:274:c2b2:7bb7 with SMTP id bv2-20020a17090af18200b00274c2b27bb7mr2246863pjb.27.1695555508165; Sun, 24 Sep 2023 04:38:28 -0700 (PDT) Received: from toolbox.iitism.net ([103.15.228.93]) by smtp.gmail.com with ESMTPSA id s2-20020a17090a6e4200b002775281b9easm422376pjm.50.2023.09.24.04.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 04:38:27 -0700 (PDT) From: Ayush Singh To: greybus-dev@lists.linaro.org Cc: Ayush Singh , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, vaishnav@beagleboard.org, jkridner@beagleboard.org, nm@ti.com, krzysztof.kozlowski+dt@linaro.org, vigneshr@ti.com, kristo@kernel.org, robh+dt@kernel.org, conor+dt@kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 1/3] dt-bindings: Add beagleplaycc1352 Date: Sun, 24 Sep 2023 17:06:57 +0530 Message-ID: <20230924113725.164948-2-ayushdevel1325@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230924113725.164948-1-ayushdevel1325@gmail.com> References: <20230924113725.164948-1-ayushdevel1325@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 24 Sep 2023 04:38:47 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777920331257682137 X-GMAIL-MSGID: 1777933158355233769 Adds DT bindings for BeaglePlay CC1352 co-processor. BeaglePlay has a CC1352 co-processor connected to the main AM62 (running Linux) over UART. In the BeagleConnect Technology, CC1352 is responsible for handling 6LoWPAN communication with beagleconnect freedom nodes as well as their discovery. It is used by gb-beagleplay greybus driver. Signed-off-by: Ayush Singh --- .../bindings/net/beagle,play-cc1352.yaml | 25 +++++++++++++++++++ MAINTAINERS | 6 +++++ 2 files changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/beagle,play-cc1352.yaml diff --git a/Documentation/devicetree/bindings/net/beagle,play-cc1352.yaml b/Documentation/devicetree/bindings/net/beagle,play-cc1352.yaml new file mode 100644 index 000000000000..f8536d1a6765 --- /dev/null +++ b/Documentation/devicetree/bindings/net/beagle,play-cc1352.yaml @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/beagle,play-cc1352.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: BeaglePlay CC1352 co-processor + +maintainers: + - Ayush Singh + +properties: + compatible: + const: beagle,play-cc1352 + +required: + - compatible + +additionalProperties: false + +examples: + - | + mcu { + compatible = "beagle,play-cc1352"; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 37b9626ee654..9d1b49a6dfad 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8969,6 +8969,12 @@ F: drivers/staging/greybus/sdio.c F: drivers/staging/greybus/spi.c F: drivers/staging/greybus/spilib.c +GREYBUS BEAGLEPLAY DRIVERS +M: Ayush Singh +L: greybus-dev@lists.linaro.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/serial/beaglecc1352.yaml + GREYBUS SUBSYSTEM M: Johan Hovold M: Alex Elder From patchwork Sun Sep 24 11:36:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 144134 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp803832vqu; Sun, 24 Sep 2023 12:18:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF65rOohaINGypukozUyZC0C8DgURDZ4rm+1xt2Hcp9sFBaC9lAUi1V7YkK7lXVrJsjWR1s X-Received: by 2002:a05:6a00:b48:b0:690:c5cf:91f5 with SMTP id p8-20020a056a000b4800b00690c5cf91f5mr4047799pfo.18.1695583080022; Sun, 24 Sep 2023 12:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695583080; cv=none; d=google.com; s=arc-20160816; b=unLzAUK11MeRl83T3sndRy4DyXOLmR0fLmmK1cnaj6p/NHwT0L78JZecSP+eu4az7L JiBVQXFUojCDbKel4m/JnzY2cf7eCYsg++4cZnvJZan7arp71FHugkZQoyZS9+NxFj8v +RRl2LAIqBwxrdEuhvWb7Ut7ddXCMWNhW5fee1RRWcH6kcTh8O744vnHy7XKta1sAFs8 Z3fZhFKn+LCBNGHFqkPhDeo+iZUgeyqlizCsvi/ZupwIvip0nbI3UnftR2W+J5F/GXHV mNfSUGPHQQ+dC0f4UWSYKx0GrxZwpR9Z/EGuOxdR8MMTqp8GH3JLzX1WVv9TUfxwLIyb A3tA== 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=Xs+e2DvRCJu24FAC1rzhbizY0OQKaeiMtpfRhhb/MLo=; fh=LhjtXm9rSZ+NpYlXaUu0FdJsNfcELaak2z7ufLFrL0k=; b=dUv6HkmwVQZf1EzsdAykZpZuf1uwikhi+rrtrYndLqEldxeEjT2yVYKBBcLlRjZ5Qm Pmi8z3/R7q9fN8JYSkGZRARfMLuxmrOMVxycQCEsCAy4usGLZvjTbQQHD99Yy8d2uMDR kMSbGwMdO70ifbn8uds3PA7rC8IeIXg/gPupGJlhgTSU/ogXHGglAW2P4axoEpuW08Gy voYAeZOvzukzOwzVWDc3NdZft12v7mALg0bhRi0VI2yOR3yxS7tIosJ1hpkA0DM4HwfL /yFkjBG4VmlScjdSYfZPDMI4MXaQCofIj+uZ01U7U5KTY+SyiGafAGzS92i2reCN4K/D mGXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UC0STlvv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id t5-20020a628105000000b0068fb5cbcef2si8241015pfd.117.2023.09.24.12.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 12:17:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UC0STlvv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id F083980C602B; Sun, 24 Sep 2023 04:38:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229690AbjIXLim (ORCPT + 30 others); Sun, 24 Sep 2023 07:38:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjIXLik (ORCPT ); Sun, 24 Sep 2023 07:38:40 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0A38103; Sun, 24 Sep 2023 04:38:33 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-690f9c787baso3427452b3a.1; Sun, 24 Sep 2023 04:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695555513; x=1696160313; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xs+e2DvRCJu24FAC1rzhbizY0OQKaeiMtpfRhhb/MLo=; b=UC0STlvv/nugGh3Y6GL2C3yxTRK54JTY4mAx71HDgWKIsNNr6tjsZSRSGIMZ3+HMCa 8uIjdcHRMO2Pwo6ob85fC/txXcP1Nnt8pdpGrycvFb8HbA4D8Qh7osqZdFP9Tdmno7MG JqD0ZIZ3sEAw8vJPCkZwND1crdI7sJEJ0n3SU29mS187Ep/K8k43xfGtMhFjuYC8Mdpr HPlRqFkOzbsgEDpkuHxIAZJ2RxT+C38TWZ4MLVOtAvVjEKL3VPUeLW5vy3u2juiegwrn EEmpzw/8t0QTmnrPBhr3dGIr6Y74ptSHan5wIDKUFzcbMR7DqRvdZozrY/w3HkKJZFJw 8D6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695555513; x=1696160313; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xs+e2DvRCJu24FAC1rzhbizY0OQKaeiMtpfRhhb/MLo=; b=jTEhoKpxsNRcU2qta0u0ZgppPgULyy4+ovKLU9pOfaLh75wA6UlMtgx8Qia0pCiI2Y 87hJJ6xf7UxarkSgK69SaT1LvaPUZIqAnNv4R0QooaTHGRDZ/7ChQ0b45q4qignPD5NQ htg3yMLm4+YPLCVoiSWBEncn83mbiDg1iIcUwob5SusuWu5CkXcFKI8qkj2lGAhjeNjj 7cDQmrTlc1B7agTGRDdnfWesSneFYNEYXBsEgKu7ftHcXZY0C366jSMMeskryJkZHfX/ ajEITiI6Zn5d9lGyAfTwkWzGaVjmJA5XxtGyFOoY+AIBok+GR7Ek3bih4ua9OR+di/dz xAtw== X-Gm-Message-State: AOJu0YwquztQLelZvQxWro0c/VHuqlalD8J7oGCcFCa22UBOFuNH3ShR fLj42Gs/GsDbmDAjV9dbxHE= X-Received: by 2002:a05:6a20:9496:b0:15d:2bff:77b with SMTP id hs22-20020a056a20949600b0015d2bff077bmr2584055pzb.34.1695555513050; Sun, 24 Sep 2023 04:38:33 -0700 (PDT) Received: from toolbox.iitism.net ([103.15.228.93]) by smtp.gmail.com with ESMTPSA id s2-20020a17090a6e4200b002775281b9easm422376pjm.50.2023.09.24.04.38.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 04:38:32 -0700 (PDT) From: Ayush Singh To: greybus-dev@lists.linaro.org Cc: Ayush Singh , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, vaishnav@beagleboard.org, jkridner@beagleboard.org, nm@ti.com, krzysztof.kozlowski+dt@linaro.org, johan@kernel.org, elder@kernel.org Subject: [PATCH v5 2/3] greybus: Add BeaglePlay Linux Driver Date: Sun, 24 Sep 2023 17:06:58 +0530 Message-ID: <20230924113725.164948-3-ayushdevel1325@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230924113725.164948-1-ayushdevel1325@gmail.com> References: <20230924113725.164948-1-ayushdevel1325@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sun, 24 Sep 2023 04:38:50 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777925846101050108 X-GMAIL-MSGID: 1777947723992527246 Add the Greybus host driver for BeaglePlay board by BeagleBoard.org. Current beagleconnect setup involves running SVC in a user-space application (GBridge) and using netlink to communicate with kernel space. GBridge itself uses wpanusb kernel driver for communication with CC1325, so the greybus messages travel from kernel space (gb_netlink) to user-space (GBridge) and then back to kernel space (wpanusb) before reaching CC1352. gb-beagleplay directly communicates with CC1352 (running Zephyr application). Thus, it simplifies the complete beagleconnect setup eliminating user-space GBridge. This driver is responsible for the following: - Start SVC (CC1352) on driver load. - Send/Receive Greybus messages to/from CC1352 using HDLC over UART. - Print Logs from CC1352. - Stop SVC (CC1352) on driver load. Signed-off-by: Ayush Singh --- MAINTAINERS | 1 + drivers/greybus/Kconfig | 10 + drivers/greybus/Makefile | 4 +- drivers/greybus/gb-beagleplay.c | 526 ++++++++++++++++++++++++++++++++ 4 files changed, 539 insertions(+), 2 deletions(-) create mode 100644 drivers/greybus/gb-beagleplay.c diff --git a/MAINTAINERS b/MAINTAINERS index 9d1b49a6dfad..3cbf2c87fb14 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8974,6 +8974,7 @@ M: Ayush Singh L: greybus-dev@lists.linaro.org (moderated for non-subscribers) S: Maintained F: Documentation/devicetree/bindings/serial/beaglecc1352.yaml +F: drivers/greybus/gb-beagleplay.c GREYBUS SUBSYSTEM M: Johan Hovold diff --git a/drivers/greybus/Kconfig b/drivers/greybus/Kconfig index 78ba3c3083d5..07e3119e2faa 100644 --- a/drivers/greybus/Kconfig +++ b/drivers/greybus/Kconfig @@ -17,6 +17,16 @@ menuconfig GREYBUS if GREYBUS +config GREYBUS_BEAGLEPLAY + tristate "Greybus BeaglePlay driver" + depends on TTY + help + Select this option if you have a BeaglePlay where CC1352 + co-processor acts as Greybus SVC. + + To compile this code as a module, chose M here: the module + will be called gb-beagleplay.ko + config GREYBUS_ES2 tristate "Greybus ES3 USB host controller" depends on USB diff --git a/drivers/greybus/Makefile b/drivers/greybus/Makefile index 9bccdd229aa2..15a84a83788d 100644 --- a/drivers/greybus/Makefile +++ b/drivers/greybus/Makefile @@ -18,9 +18,9 @@ obj-$(CONFIG_GREYBUS) += greybus.o # needed for trace events ccflags-y += -I$(src) +obj-$(CONFIG_GREYBUS_BEAGLEPLAY) += gb-beagleplay.o + # Greybus Host controller drivers gb-es2-y := es2.o obj-$(CONFIG_GREYBUS_ES2) += gb-es2.o - - diff --git a/drivers/greybus/gb-beagleplay.c b/drivers/greybus/gb-beagleplay.c new file mode 100644 index 000000000000..39d87ef3b8fc --- /dev/null +++ b/drivers/greybus/gb-beagleplay.c @@ -0,0 +1,526 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Beagleplay Linux Driver for Greybus + * + * Copyright (c) 2023 Ayush Singh + * Copyright (c) 2023 BeagleBoard.org Foundation + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define RX_HDLC_PAYLOAD 1024 +#define CRC_LEN 2 +#define MAX_RX_HDLC (1 + RX_HDLC_PAYLOAD + CRC_LEN) +#define TX_CIRC_BUF_SIZE 1024 + +#define ADDRESS_GREYBUS 0x01 +#define ADDRESS_DBG 0x02 +#define ADDRESS_CONTROL 0x03 + +#define HDLC_FRAME 0x7E +#define HDLC_ESC 0x7D +#define HDLC_XOR 0x20 + +#define CONTROL_SVC_START 0x01 +#define CONTROL_SVC_STOP 0x02 + +/* The maximum number of CPorts supported by Greybus Host Device */ +#define BEAGLEPLAY_GB_MAX_CPORTS 32 + +/* + * BeaglePlay Greybus driver + * + * @serdev: Serdev device + * + * @gb_host_device: greybud host device + * + * @tx_work: transmit work + * @tx_producer_lock: transmit producer lock + * @tx_consumer_lock: transmit consumer lock + * @tx_circ_buf: transmit circular buffer + * @tx_crc: HDCL CRC + * @tx_ack_seq: current TX ACK sequence number + * + * @rx_buffer_len: Rx buffer length + * @rx_in_esc: Rx Flag to indicate if ESC + * @rx_buffer: Rx buffer + */ +struct gb_beagleplay { + struct serdev_device *serdev; + + struct gb_host_device *gb_host_device; + + struct work_struct tx_work; + /* tx_producer_lock: HDLC producer lock */ + spinlock_t tx_producer_lock; + /* tx_consumer_lock: HDLC consumer lock */ + spinlock_t tx_consumer_lock; + struct circ_buf tx_circ_buf; + u16 tx_crc; + u8 tx_ack_seq; + + u16 rx_buffer_len; + u8 rx_in_esc; + u8 rx_buffer[MAX_RX_HDLC]; +}; + +struct hdlc_payload { + u16 length; + void *payload; +}; + +static void hdlc_handle_greybus_frame(struct gb_beagleplay *bg, u8 *buffer, + size_t buffer_len) +{ + u16 cport_id; + struct gb_operation_msg_hdr *hdr = + (struct gb_operation_msg_hdr *)buffer; + + memcpy(&cport_id, hdr->pad, sizeof(cport_id)); + + dev_dbg(&bg->serdev->dev, + "Greybus Operation %u of Type %X on CPort %u with Status %u Received", + hdr->operation_id, hdr->type, cport_id, hdr->result); + + greybus_data_rcvd(bg->gb_host_device, cport_id, buffer, buffer_len); +} + +static void hdlc_handle_dbg_frame(struct gb_beagleplay *bg, const char *buffer, + size_t buffer_len) +{ + dev_dbg(&bg->serdev->dev, "CC1352 Debug: %.*s", (int)buffer_len, + buffer); +} + +/* + * Consume HDLC Buffer. This function assumes that consumer lock has been acquired. + */ +static void hdlc_write(struct gb_beagleplay *bg) +{ + /* Start consuning HDLC data */ + int head = smp_load_acquire(&bg->tx_circ_buf.head); + int tail = bg->tx_circ_buf.tail; + int count = CIRC_CNT_TO_END(head, tail, TX_CIRC_BUF_SIZE); + const unsigned char *buf = &bg->tx_circ_buf.buf[tail]; + int written; + + if (count > 0) { + written = serdev_device_write_buf(bg->serdev, buf, count); + + /* Finish consuming HDLC data */ + smp_store_release(&bg->tx_circ_buf.tail, + (tail + written) & (TX_CIRC_BUF_SIZE - 1)); + } +} + +/* + * Queue HDLC data for sending. This function assumes that producer lock as been acquired. + */ +static void hdlc_append(struct gb_beagleplay *bg, u8 value) +{ + int tail, head = bg->tx_circ_buf.head; + + while (true) { + tail = READ_ONCE(bg->tx_circ_buf.tail); + + if (CIRC_SPACE(head, tail, TX_CIRC_BUF_SIZE) >= 1) { + bg->tx_circ_buf.buf[head] = value; + + /* Finish producing HDLC byte */ + smp_store_release(&bg->tx_circ_buf.head, + (head + 1) & (TX_CIRC_BUF_SIZE - 1)); + return; + } + dev_warn(&bg->serdev->dev, "Tx circ buf full"); + usleep_range(3000, 5000); + } +} + +static void hdlc_append_escaped(struct gb_beagleplay *bg, u8 value) +{ + if (value == HDLC_FRAME || value == HDLC_ESC) { + hdlc_append(bg, HDLC_ESC); + value ^= HDLC_XOR; + } + hdlc_append(bg, value); +} + +static void hdlc_append_tx_frame(struct gb_beagleplay *bg) +{ + bg->tx_crc = 0xFFFF; + hdlc_append(bg, HDLC_FRAME); +} + +static void hdlc_append_tx_u8(struct gb_beagleplay *bg, u8 value) +{ + bg->tx_crc = crc_ccitt(bg->tx_crc, &value, 1); + hdlc_append_escaped(bg, value); +} + +static void hdlc_append_tx_buffer(struct gb_beagleplay *bg, const u8 *buffer, + size_t len) +{ + size_t i; + + for (i = 0; i < len; i++) + hdlc_append_tx_u8(bg, buffer[i]); +} + +static void hdlc_append_tx_crc(struct gb_beagleplay *bg) +{ + bg->tx_crc ^= 0xffff; + hdlc_append_escaped(bg, bg->tx_crc & 0xff); + hdlc_append_escaped(bg, (bg->tx_crc >> 8) & 0xff); +} + +static void hdlc_handle_rx_frame(struct gb_beagleplay *bg) +{ + u8 address = bg->rx_buffer[0]; + char *buffer = &bg->rx_buffer[2]; + size_t buffer_len = bg->rx_buffer_len - 4; + + switch (address) { + case ADDRESS_DBG: + hdlc_handle_dbg_frame(bg, buffer, buffer_len); + break; + case ADDRESS_GREYBUS: + hdlc_handle_greybus_frame(bg, buffer, buffer_len); + break; + default: + dev_warn_ratelimited(&bg->serdev->dev, "Got Unknown Frame %u", + address); + } +} + +static void hdlc_transmit(struct work_struct *work) +{ + struct gb_beagleplay *bg = + container_of(work, struct gb_beagleplay, tx_work); + + spin_lock_bh(&bg->tx_consumer_lock); + hdlc_write(bg); + spin_unlock_bh(&bg->tx_consumer_lock); +} + +static void hdlc_send_async(struct gb_beagleplay *bg, u8 address, u8 control, + const struct hdlc_payload payloads[], size_t count) +{ + size_t i; + + /* + * HDLC_FRAME + * 0 address : 0x01 + * 1 control : 0x03 + * contents + * x/y crc + * HDLC_FRAME + */ + + spin_lock(&bg->tx_producer_lock); + + hdlc_append_tx_frame(bg); + hdlc_append_tx_u8(bg, address); + hdlc_append_tx_u8(bg, control); + for (i = 0; i < count; ++i) { + hdlc_append_tx_buffer(bg, payloads[i].payload, + payloads[i].length); + } + hdlc_append_tx_crc(bg); + hdlc_append_tx_frame(bg); + + spin_unlock(&bg->tx_producer_lock); + + schedule_work(&bg->tx_work); +} + +static void hdlc_send_s_frame_ack(struct gb_beagleplay *bg) +{ + hdlc_send_async(bg, bg->rx_buffer[0], (bg->rx_buffer[1] >> 1) & 0x7, + NULL, 0); +} + +static int hdlc_rx(struct gb_beagleplay *bg, const u8 *data, size_t count) +{ + u16 crc_check; + size_t i; + u8 c, ctrl; + + for (i = 0; i < count; ++i) { + c = data[i]; + + switch (c) { + case HDLC_FRAME: + if (bg->rx_buffer_len) { + crc_check = crc_ccitt(0xffff, bg->rx_buffer, + bg->rx_buffer_len); + if (crc_check == 0xf0b8) { + ctrl = bg->rx_buffer[1]; + if ((ctrl & 1) == 0) { + /* I-Frame, send S-Frame ACK */ + hdlc_send_s_frame_ack(bg); + } + hdlc_handle_rx_frame(bg); + } else { + dev_warn_ratelimited( + &bg->serdev->dev, + "CRC Failed from %02x: 0x%04x", + bg->rx_buffer[0], crc_check); + } + } + bg->rx_buffer_len = 0; + break; + case HDLC_ESC: + bg->rx_in_esc = 1; + break; + default: + if (bg->rx_in_esc) { + c ^= 0x20; + bg->rx_in_esc = 0; + } + + if (bg->rx_buffer_len < MAX_RX_HDLC) { + bg->rx_buffer[bg->rx_buffer_len] = c; + bg->rx_buffer_len++; + } else { + dev_err_ratelimited(&bg->serdev->dev, + "RX Buffer Overflow"); + bg->rx_buffer_len = 0; + } + } + } + + return count; +} + +static int hdlc_init(struct gb_beagleplay *bg) +{ + INIT_WORK(&bg->tx_work, hdlc_transmit); + spin_lock_init(&bg->tx_producer_lock); + spin_lock_init(&bg->tx_consumer_lock); + bg->tx_circ_buf.head = 0; + bg->tx_circ_buf.tail = 0; + + bg->tx_circ_buf.buf = + devm_kmalloc(&bg->serdev->dev, TX_CIRC_BUF_SIZE, GFP_KERNEL); + if (!bg->tx_circ_buf.buf) + return -ENOMEM; + + bg->rx_buffer_len = 0; + bg->rx_in_esc = 0; + + return 0; +} + +static void hdlc_deinit(struct gb_beagleplay *bg) +{ + flush_work(&bg->tx_work); +} + +static int gb_beagleplay_tty_receive(struct serdev_device *serdev, + const unsigned char *data, size_t count) +{ + struct gb_beagleplay *bg = serdev_device_get_drvdata(serdev); + + return hdlc_rx(bg, data, count); +} + +static void beagleplay_greybus_tty_wakeup(struct serdev_device *serdev) +{ + struct gb_beagleplay *bg = serdev_device_get_drvdata(serdev); + + schedule_work(&bg->tx_work); +} + +static struct serdev_device_ops gb_beagleplay_ops = { + .receive_buf = gb_beagleplay_tty_receive, + .write_wakeup = beagleplay_greybus_tty_wakeup, +}; + +static int gb_message_send(struct gb_host_device *hd, u16 cport_id, + struct gb_message *msg, gfp_t gfp_mask) +{ + struct gb_beagleplay *bg = dev_get_drvdata(&hd->dev); + struct hdlc_payload payloads[2]; + + dev_dbg(&hd->dev, + "Sending Greybus message with Operation %u, Type: %X on Cport %u", + msg->header->operation_id, msg->header->type, cport_id); + + if (msg->header->size > RX_HDLC_PAYLOAD) { + dev_err(&hd->dev, "Greybus message too big"); + return -E2BIG; + } + + memcpy(msg->header->pad, &cport_id, sizeof(cport_id)); + + payloads[0].payload = msg->header; + payloads[0].length = sizeof(*msg->header); + payloads[1].payload = msg->payload; + payloads[1].length = msg->payload_size; + + hdlc_send_async(bg, ADDRESS_GREYBUS, 0x03, payloads, 2); + greybus_message_sent(bg->gb_host_device, msg, 0); + + return 0; +} + +static void gb_message_cancel(struct gb_message *message) +{ +} + +static struct gb_hd_driver gb_hdlc_driver = { .message_send = gb_message_send, + .message_cancel = + gb_message_cancel }; + +static void gb_beagleplay_start_svc(struct gb_beagleplay *bg) +{ + const u8 command = CONTROL_SVC_START; + const struct hdlc_payload payload = { .length = 1, + .payload = (void *)&command }; + + hdlc_send_async(bg, ADDRESS_CONTROL, 0x03, &payload, 1); +} + +static void gb_beagleplay_stop_svc(struct gb_beagleplay *bg) +{ + const u8 command = CONTROL_SVC_STOP; + const struct hdlc_payload payload = { .length = 1, + .payload = (void *)&command }; + + hdlc_send_async(bg, ADDRESS_CONTROL, 0x03, &payload, 1); +} + +static void gb_greybus_deinit(struct gb_beagleplay *bg) +{ + gb_hd_del(bg->gb_host_device); + gb_hd_put(bg->gb_host_device); +} + +static int gb_greybus_init(struct gb_beagleplay *bg) +{ + int ret; + + bg->gb_host_device = gb_hd_create(&gb_hdlc_driver, &bg->serdev->dev, + TX_CIRC_BUF_SIZE, + BEAGLEPLAY_GB_MAX_CPORTS); + if (IS_ERR(bg->gb_host_device)) { + return dev_err_probe(&bg->serdev->dev, + PTR_ERR(bg->gb_host_device), + "Unable to create Greybus Host Device"); + } + ret = gb_hd_add(bg->gb_host_device); + if (ret) { + dev_err(&bg->serdev->dev, "Failed to add Greybus Host Device"); + goto free_gb_hd; + } + dev_set_drvdata(&bg->gb_host_device->dev, bg); + + return 0; + +free_gb_hd: + gb_greybus_deinit(bg); + return ret; +} + +static void gb_serdev_deinit(struct gb_beagleplay *bg) +{ + serdev_device_close(bg->serdev); +} + +static int gb_serdev_init(struct gb_beagleplay *bg) +{ + u32 speed = 115200; + int ret; + + serdev_device_set_drvdata(bg->serdev, bg); + serdev_device_set_client_ops(bg->serdev, &gb_beagleplay_ops); + ret = serdev_device_open(bg->serdev); + if (ret) { + return dev_err_probe(&bg->serdev->dev, ret, + "Unable to Open Serial Device"); + } + speed = serdev_device_set_baudrate(bg->serdev, speed); + serdev_device_set_flow_control(bg->serdev, false); + + return 0; +} + +static int gb_beagleplay_probe(struct serdev_device *serdev) +{ + int ret = 0; + struct gb_beagleplay *bg = + devm_kmalloc(&serdev->dev, sizeof(*bg), GFP_KERNEL); + + if (!bg) + return -ENOMEM; + + bg->serdev = serdev; + ret = gb_serdev_init(bg); + if (ret) + return ret; + + ret = hdlc_init(bg); + if (ret) + goto free_serdev; + + ret = gb_greybus_init(bg); + if (ret) + goto free_hdlc; + + gb_beagleplay_start_svc(bg); + + return 0; + +free_hdlc: + hdlc_deinit(bg); +free_serdev: + gb_serdev_deinit(bg); + return ret; +} + +static void gb_beagleplay_remove(struct serdev_device *serdev) +{ + struct gb_beagleplay *bg = serdev_device_get_drvdata(serdev); + + gb_greybus_deinit(bg); + gb_beagleplay_stop_svc(bg); + hdlc_deinit(bg); + gb_serdev_deinit(bg); +} + +static const struct of_device_id gb_beagleplay_of_match[] = { + { + .compatible = "beagle,play-cc1352", + }, + {}, +}; +MODULE_DEVICE_TABLE(of, gb_beagleplay_of_match); + +static struct serdev_device_driver gb_beagleplay_driver = { + .probe = gb_beagleplay_probe, + .remove = gb_beagleplay_remove, + .driver = { + .name = "gb_beagleplay", + .of_match_table = gb_beagleplay_of_match, + }, +}; + +module_serdev_device_driver(gb_beagleplay_driver); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Ayush Singh "); +MODULE_DESCRIPTION("A Greybus driver for BeaglePlay"); From patchwork Sun Sep 24 11:36:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 144142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp842221vqu; Sun, 24 Sep 2023 14:16:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZ62afVsBBBUWuuyfY8UsoYmHRdvGVUykqnmfMHCvCm2E/XXi8BZ0yL0ALpH3pjSm+1tFy X-Received: by 2002:a17:902:ced2:b0:1bd:a42a:215e with SMTP id d18-20020a170902ced200b001bda42a215emr3908365plg.38.1695590180536; Sun, 24 Sep 2023 14:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695590180; cv=none; d=google.com; s=arc-20160816; b=DzEuJ06ge5tkUpomEGr6ukGx31GzNMBuKEg0sipBQzXNPakXMIxa/s18ZgqYKLpatC kGVKqT57jxmRkTLDytcFnT6ZHgxorSVNQNjqaZSKJ9I26IG11VZo7e+d2DcxcW5nHFnb WaDgnQ5gtbJFCEOzWnOGqePDgUAyRDmOXu0DWZ+uWdnp3PecU8n+N95J4TQ2t82inGi/ FRv7vpKsK58xbGfxlkG0UWPtbjJZqzYy7p85vaHaP3VhYTEGfkZFlMpILCgaaA0Bd7xy uPAOT43n/XfyVRiUpFITFL7omUciEZziRVPyfGQN9Oz3LJf/5EYlyVvovcFJGqsGLd3R LavQ== 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=ul33TqpD3VQ4mK3/9LxJs7GhSg/Yt+Ru6Sjot+t3GL0=; fh=x41sJj7s4h183k+beLa7JHvvxAjjK/gQ/0BKFUXjj6o=; b=nRVyfgf/zmUKfw1KEj4B1DdjvbFmfC90kaHKDTCzmjB5yxyDRBH6S7wNU/ZK+BLo2S NpsphJ0cryU7m7gJbeQ0EFuGVxBKwgpjNkRYXTENfsuakkVfMl/GiZvinC4GIJL/Q4I6 qs74pHizSM18PwYGmfI5TgD1fsZqNYEQo3SKS1zfUju9FiyFBMxuRumamJtfzwS5KmI2 k5W9x93E43WB0lalLHv5SfKWBH7s7QFnD2XjgF+cAZjqFLbPQKevwrQ/c/yBScjG5iBw VKPenCRcsz5MKWJUH1jqJxxehSfzsTU/CdbHkHlC7XI2VomvcJ6QZQjUKsfsqvO1DqLg 13aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZOlZAz5T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m7-20020a170902db0700b001c5f37aeebdsi4979778plx.579.2023.09.24.14.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 14:16:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZOlZAz5T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D17AC80CC227; Sun, 24 Sep 2023 04:38:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229910AbjIXLiv (ORCPT + 30 others); Sun, 24 Sep 2023 07:38:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbjIXLis (ORCPT ); Sun, 24 Sep 2023 07:38:48 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64962139; Sun, 24 Sep 2023 04:38:38 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-692b43bd804so1854695b3a.1; Sun, 24 Sep 2023 04:38:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695555517; x=1696160317; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ul33TqpD3VQ4mK3/9LxJs7GhSg/Yt+Ru6Sjot+t3GL0=; b=ZOlZAz5T+VrfIMdSIjsP/ZG2ykGru9yD46U+P/Rj1ycMXxBCi40QdyXK03kkMV/SaX F7D2rC97Enn3EiIKEXpWU2iJKHkCNsAObPxPtQO0fxheCzxMvTqjgWPO0rq4JkJoOnTT A3d5ojtGdZaeWJESSeEwdRV36tj0+iVF8ihjAX/cQodu8oJDBhTFOAvaHOsJ5woxzshp BbPcuhb+jKeFk/mftTIz3E4mVtPBRsPm0nF8rrPkaUsCXqPWTOc587BbgQGkPHnoA6TM Bly3vxzYew4ZLIhi6QL9s48waWra8Hs6obgH9rx3F1rRpGlBHEg20mJWyTZnXR1ojW1Z g5Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695555517; x=1696160317; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ul33TqpD3VQ4mK3/9LxJs7GhSg/Yt+Ru6Sjot+t3GL0=; b=uln41+WMhYU/wz9F6QfzSjVjbdfOxYAAbQA5tANOcQSs3aqW8RgVc0QJWJ5OVcrEOl OObA7Z1h7SxVgB3JyCxKsd/jAG0u7krMvaC5tK2l1bXvcCT9zyCkoXwNz3NgGNcJMGVG O8pu5WZA68nmANktamdn+v263zY2eN1GL5x6U4TOvX9lcYA1Vq5hUwA/CgLAf3zU755q UYVIZV77irQI3W1+YKB+NqDu0nil57MmrrrMy5G3C3VXc5/pZC2wJZZxN/L6sm2o0r/Z BSWYPSiouKr3uwhOWA7cDeYOf8+KsnNl54vx98xVqKqHRiJNuF1gCIRPSzBbUBVeml6L lN8Q== X-Gm-Message-State: AOJu0YzsUJ3Z7i82TgHSuAXDi6j7Z+eD6w6kXmmkc8CdIimQy0Uh30mG Ln48FLJRWHBFrq/F5XgBwEE= X-Received: by 2002:a05:6a20:8e08:b0:13d:5b8e:db83 with SMTP id y8-20020a056a208e0800b0013d5b8edb83mr3211081pzj.9.1695555517561; Sun, 24 Sep 2023 04:38:37 -0700 (PDT) Received: from toolbox.iitism.net ([103.15.228.93]) by smtp.gmail.com with ESMTPSA id s2-20020a17090a6e4200b002775281b9easm422376pjm.50.2023.09.24.04.38.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 04:38:37 -0700 (PDT) From: Ayush Singh To: greybus-dev@lists.linaro.org Cc: Ayush Singh , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, vaishnav@beagleboard.org, jkridner@beagleboard.org, nm@ti.com, vigneshr@ti.com, kristo@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 3/3] dts: ti: k3-am625-beagleplay: Add beaglecc1352 Date: Sun, 24 Sep 2023 17:06:59 +0530 Message-ID: <20230924113725.164948-4-ayushdevel1325@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230924113725.164948-1-ayushdevel1325@gmail.com> References: <20230924113725.164948-1-ayushdevel1325@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 24 Sep 2023 04:38:55 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777955169372268476 X-GMAIL-MSGID: 1777955169372268476 The BeaglePlay board by BeagleBoard.org has a CC1352 co-processor. This co-processor is connected to the main AM62 (running Linux) over UART. In the BeagleConnect Technology, CC1352 is responsible for handling 6LoWPAN communication with beagleconnect freedom nodes as well as their discovery. This mcu is used by gb-beagleplay, a Greybus driver for BeaglePlay. Signed-off-by: Ayush Singh --- arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts index 7cfdf562b53b..5d46f907468f 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts @@ -870,6 +870,10 @@ &main_uart6 { pinctrl-names = "default"; pinctrl-0 = <&wifi_debug_uart_pins_default>; status = "okay"; + + mcu { + compatible = "beagle,play-cc1352"; + }; }; &dss {