Message ID | 20240126063500.2684087-2-wenst@chromium.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-39666-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp528984dyb; Fri, 26 Jan 2024 00:56:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3p6qcPHaBrv9L+9A8uVrM9/5Rpx4doPK5sPHlZE5DpEnjhOvnvzMbHNhn4lIFLy2q6e7/ X-Received: by 2002:a50:ff0e:0:b0:55d:32f3:6b14 with SMTP id a14-20020a50ff0e000000b0055d32f36b14mr231832edu.8.1706259401687; Fri, 26 Jan 2024 00:56:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706259401; cv=pass; d=google.com; s=arc-20160816; b=kRwr6BP7qLZtMV2+1vkC3S/qRYkHSV4sKQVSr8WjWStwJzldL8uq55p8JdnDADzOup zMVgEoCKz8TS9naBz6kussQ1WF6YJNW/4Ctgs93JTDRIF5tRdcpwSAgJrNyTFnUl/+09 iSldda3TYmdA+IdRcF8Fc7gaP4K/nOZWnJ6odq75g3L9p1tLP7LApcmxTkAckQa2EfHS 5mPH6EYpS0B4XBpzAmzwUhHLOdeCFgYeR1ls4O0kLmU4etSuS9FTZ/4pOO+/g4zYvn6G zCI4yMo+6E4+sf76pncsiz02ZQy2zz+1yQHdcCR//0Mc1cJZ5xt8OeVHFwqgdMHSA7bs yuaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=wDsngDFt0eFkFTP4ef0B62TIJS7yfiBrPs76zEjZeSM=; fh=Dq0KyaWQMV1+xKd1qM9MI32PdsWXz3CFCYPcvTEh9EA=; b=S0nis4v4alFfhh29UtS6pCG6MV5uhmVG1gejgwUbvhkWTE9eOiv8T7YVhdJgabylgU 9X/hgazZ3A1GQ1O1c1Yf8UtE0HaPNKDw5ssHbLxv4da5AWFUC4UZN2lJuPRt+svAH/dF hoE+faf+0lt8K1dwFpCy/XUlNEdHuhoXYM/d0u4e144ujYPJVjeNmdTiwNv5PDC8RlMa ZNV+qS1smmuZkwVUc89QiCJu5Rej3hQFmsUnGaplklEob8f53Fc5wr3GielxESXCeLDQ VblYPLZeB6p29vWYqjhmOEwzMRZOkNQEdccRY3WuX+Q0xrT7TeLGKfXITwaHyKDXSenY xHzA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JwPEojnr; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-39666-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39666-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ef6-20020a05640228c600b00558207a051bsi445600edb.317.2024.01.26.00.56.41 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 00:56:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39666-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JwPEojnr; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-39666-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39666-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2D1B91F26BFB for <ouuuleilei@gmail.com>; Fri, 26 Jan 2024 08:49:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC92A1DFE7; Fri, 26 Jan 2024 06:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="JwPEojnr" Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DCCF1D55D for <linux-kernel@vger.kernel.org>; Fri, 26 Jan 2024 06:35:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706250911; cv=none; b=NUClTMm/GXRkzmXYWzEArc0GHa2eqdNoLlmt21vcbFZ4q652TBAfD8lxXxfYTvuPtrgm+zrVepaPqKh1MW1GTwKJL9enan1hCBSfol99jkGYqIGV39MvVEsVlGJkOk5+23y8fQG8XLIR6Ff5y6vrfsaSCWALxwgULPrJqFRavOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706250911; c=relaxed/simple; bh=5GcKspq0sMdDxo+UcPZnccatMORdMIGaN6teLn0eoa0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o0crLq6UjQOVcZXxewZLUz87D8J8p6fKg/0cJd+Fe2DVN22EaVNp8IUrmIiNegWOT1e3jkrSDNGloWZgt5Pju2VAysK6r3voCGT61oyoOtYM5h3Zso+2fxdcnh5B99C+3vC966/xtsM+oDzy1L/6bMKq99jfAqHu8NCLNXGuulA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=JwPEojnr; arc=none smtp.client-ip=209.85.167.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-3bde3403a59so224693b6e.1 for <linux-kernel@vger.kernel.org>; Thu, 25 Jan 2024 22:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706250908; x=1706855708; 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=wDsngDFt0eFkFTP4ef0B62TIJS7yfiBrPs76zEjZeSM=; b=JwPEojnr3HIN7q3xXNGIPqLMH3CcKTdX3CQFnggugoe9QdPyV3GTtsHFfyVm9uNNAE 58FUc+2D/6uGqfZOHVi/WbZUcT4Fdz0XvPmcf7nvL3jg3arMfhUWbW9wQ60+o9GUlvxs NpPBqCP91fS1Vv6P20VZevkHkPPLsdYy9LBsk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706250908; x=1706855708; 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=wDsngDFt0eFkFTP4ef0B62TIJS7yfiBrPs76zEjZeSM=; b=XbblWwBBMbJHlRkozDIhWhzyRgUKW4rBFTCgq64LV9HE0c9byJiVAK62Kub3YVbwa3 YdGgxXK/kp8PGmyd1BliUUb+u0MfJpAIGGGb2+ivDE+O1BOcYvZl6pQvZ+b1ZhEr5x0D +BiuSL4jj4Bw1o+391wniDfXxEj11Nu7MWGGbIIq0yYiRnEevlKj3SvIL+e4u5xBoU+Z fEKuHY48QJMqmkNEXuGi98azu77u1a55CzC+c86kwQzstm5dJ6qvGcQNOKuqj7susTKt y+mEUG8oj6zGznPK/Fbe7V5RqevLgD51NFADFmEtDIjcxlMOCGle5XLHL8dK+r+tkmno s5VA== X-Gm-Message-State: AOJu0YwCij9FpAYmVsnJMSzHwIYKluiMJZPLGUJ0oIsEo6hmM3Wjl6SE fmmFy1tMh8lFA9fWO6JeQVqxSrjh8fgfcRsZR6rvkzFSHteiNY3KC0fcEObDWw== X-Received: by 2002:a05:6808:320b:b0:3bd:df12:e966 with SMTP id cb11-20020a056808320b00b003bddf12e966mr1498123oib.90.1706250908541; Thu, 25 Jan 2024 22:35:08 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:2614:bbbd:8db2:1f54]) by smtp.gmail.com with ESMTPSA id ka3-20020a056a00938300b006db13a02921sm488735pfb.183.2024.01.25.22.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 22:35:08 -0800 (PST) From: Chen-Yu Tsai <wenst@chromium.org> To: Marcel Holtmann <marcel@holtmann.org>, Luiz Augusto von Dentz <luiz.dentz@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: Chen-Yu Tsai <wenst@chromium.org>, Sean Wang <sean.wang@mediatek.com>, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: net: bluetooth: Add MediaTek MT7921S SDIO Bluetooth Date: Fri, 26 Jan 2024 14:34:57 +0800 Message-ID: <20240126063500.2684087-2-wenst@chromium.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126063500.2684087-1-wenst@chromium.org> References: <20240126063500.2684087-1-wenst@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789142658354469571 X-GMAIL-MSGID: 1789142658354469571 |
Series |
bluetooth: mt7921s: Add binding and fixup existing dts
|
|
Commit Message
Chen-Yu Tsai
Jan. 26, 2024, 6:34 a.m. UTC
The MediaTek MT7921S is a WiFi/Bluetooth combo chip that works over
SDIO. While the Bluetooth function is fully discoverable, the chip
has a pin that can reset just the Bluetooth side, as opposed to the
full chip. This needs to be described in the device tree.
Add a device tree binding for MT7921S Bluetooth over SDIO specifically
ot document the reset line.
Cc: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Changes since v1:
- Reworded descriptions
- Moved binding maintainer section before description
- Added missing reference to bluetooth-controller.yaml
- Added missing GPIO header to example
.../bluetooth/mediatek,mt7921s-bluetooth.yaml | 53 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 54 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml
Comments
Il 26/01/24 07:34, Chen-Yu Tsai ha scritto: > The MediaTek MT7921S is a WiFi/Bluetooth combo chip that works over > SDIO. While the Bluetooth function is fully discoverable, the chip > has a pin that can reset just the Bluetooth side, as opposed to the > full chip. This needs to be described in the device tree. > > Add a device tree binding for MT7921S Bluetooth over SDIO specifically > ot document the reset line. > > Cc: Sean Wang <sean.wang@mediatek.com> > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > --- > Changes since v1: > - Reworded descriptions > - Moved binding maintainer section before description > - Added missing reference to bluetooth-controller.yaml > - Added missing GPIO header to example > > .../bluetooth/mediatek,mt7921s-bluetooth.yaml | 53 +++++++++++++++++++ > MAINTAINERS | 1 + > 2 files changed, 54 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > > diff --git a/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > new file mode 100644 > index 000000000000..ff11c95c816c > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > @@ -0,0 +1,53 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7921s-bluetooth.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek MT7921S Bluetooth > + > +maintainers: > + - Sean Wang <sean.wang@mediatek.com> > + > +description: > + MT7921S is an SDIO-attached dual-radio WiFi+Bluetooth Combo chip; each > + function is its own SDIO function on a shared SDIO interface. The chip > + has two dedicated reset lines, one for each function core. > + This binding only covers the Bluetooth part of the chip. > + > +allOf: > + - $ref: bluetooth-controller.yaml# > + > +properties: > + compatible: > + enum: > + - mediatek,mt7921s-bluetooth > + reg: > + const: 2 > + > + reset-gpios: > + maxItems: 1 > + description: > + An active-low reset line for the Bluetooth core; on typical M.2 > + key E modules this is the W_DISABLE2# pin. > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/gpio/gpio.h> > + > + mmc { > + #address-cells = <1>; > + #size-cells = <0>; > + > + bluetooth@2 { > + compatible = "mediatek,mt7921s-bluetooth"; > + reg = <2>; > + reset-gpios = <&pio 8 GPIO_ACTIVE_LOW>; > + }; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index b64a64ca7916..662957146852 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -13657,6 +13657,7 @@ M: Sean Wang <sean.wang@mediatek.com> > L: linux-bluetooth@vger.kernel.org > L: linux-mediatek@lists.infradead.org (moderated for non-subscribers) > S: Maintained > +F: Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > F: Documentation/devicetree/bindings/net/mediatek-bluetooth.txt > F: drivers/bluetooth/btmtkuart.c >
On 26/01/2024 07:34, Chen-Yu Tsai wrote: > The MediaTek MT7921S is a WiFi/Bluetooth combo chip that works over > SDIO. While the Bluetooth function is fully discoverable, the chip > has a pin that can reset just the Bluetooth side, as opposed to the > full chip. This needs to be described in the device tree. > > Add a device tree binding for MT7921S Bluetooth over SDIO specifically > ot document the reset line. s/ot/to/ > > Cc: Sean Wang <sean.wang@mediatek.com> > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> > --- > Changes since v1: > - Reworded descriptions > - Moved binding maintainer section before description > - Added missing reference to bluetooth-controller.yaml > - Added missing GPIO header to example > > .../bluetooth/mediatek,mt7921s-bluetooth.yaml | 53 +++++++++++++++++++ > MAINTAINERS | 1 + > 2 files changed, 54 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > > diff --git a/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > new file mode 100644 > index 000000000000..ff11c95c816c > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > @@ -0,0 +1,53 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7921s-bluetooth.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek MT7921S Bluetooth > + > +maintainers: > + - Sean Wang <sean.wang@mediatek.com> > + > +description: > + MT7921S is an SDIO-attached dual-radio WiFi+Bluetooth Combo chip; each > + function is its own SDIO function on a shared SDIO interface. The chip > + has two dedicated reset lines, one for each function core. > + This binding only covers the Bluetooth part of the chip. > + > +allOf: > + - $ref: bluetooth-controller.yaml# > + > +properties: > + compatible: > + enum: > + - mediatek,mt7921s-bluetooth Can it be also WiFi on separate bus? How many device nodes do you need for this device? Missing blank line. > + reg: > + const: 2 > + > + reset-gpios: > + maxItems: 1 > + description: > + An active-low reset line for the Bluetooth core; on typical M.2 > + key E modules this is the W_DISABLE2# pin. > + > +required: > + - compatible > + - reg > + > +additionalProperties: false Instead 'unevaluatedProperties: false' Best regards, Krzysztof
On Fri, Jan 26, 2024 at 6:40 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 26/01/2024 07:34, Chen-Yu Tsai wrote: > > The MediaTek MT7921S is a WiFi/Bluetooth combo chip that works over > > SDIO. While the Bluetooth function is fully discoverable, the chip > > has a pin that can reset just the Bluetooth side, as opposed to the > > full chip. This needs to be described in the device tree. > > > > Add a device tree binding for MT7921S Bluetooth over SDIO specifically > > ot document the reset line. > > s/ot/to/ > > > > > Cc: Sean Wang <sean.wang@mediatek.com> > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> > > --- > > Changes since v1: > > - Reworded descriptions > > - Moved binding maintainer section before description > > - Added missing reference to bluetooth-controller.yaml > > - Added missing GPIO header to example > > > > .../bluetooth/mediatek,mt7921s-bluetooth.yaml | 53 +++++++++++++++++++ > > MAINTAINERS | 1 + > > 2 files changed, 54 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > > > > diff --git a/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > > new file mode 100644 > > index 000000000000..ff11c95c816c > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml > > @@ -0,0 +1,53 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7921s-bluetooth.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: MediaTek MT7921S Bluetooth > > + > > +maintainers: > > + - Sean Wang <sean.wang@mediatek.com> > > + > > +description: > > + MT7921S is an SDIO-attached dual-radio WiFi+Bluetooth Combo chip; each > > + function is its own SDIO function on a shared SDIO interface. The chip > > + has two dedicated reset lines, one for each function core. > > + This binding only covers the Bluetooth part of the chip. > > + > > +allOf: > > + - $ref: bluetooth-controller.yaml# > > + > > +properties: > > + compatible: > > + enum: > > + - mediatek,mt7921s-bluetooth > > Can it be also WiFi on separate bus? How many device nodes do you need > for this device? For the "S" variant, WiFi is also on SDIO. For the other two variants, "U" and "E", WiFi goes over USB and PCIe respectively. On both those variants, Bluetooth can either go over USB or UART. That is what I gathered from the pinouts. There are a dozen GPIO pins which don't have detailed descriptions though. If you want a comprehensive binding of the whole chip and all its variants, I suggest we ask MediaTek to provide it instead. My goal with the binding is to document existing usage and allow me to upstream new device trees. For now we only need the Bluetooth node. The WiFi part is perfectly detectable, and the driver doesn't seem to need the WiFi reset pin. The Bluetooth driver only uses its reset pin to reset a hung controller. > Missing blank line. Will fix. > > + reg: > > + const: 2 > > + > > + reset-gpios: > > + maxItems: 1 > > + description: > > + An active-low reset line for the Bluetooth core; on typical M.2 > > + key E modules this is the W_DISABLE2# pin. > > + > > +required: > > + - compatible > > + - reg > > + > > +additionalProperties: false > > Instead 'unevaluatedProperties: false' Will fix. Thanks ChenYu
On 29/01/2024 04:38, Chen-Yu Tsai wrote: >>> +allOf: >>> + - $ref: bluetooth-controller.yaml# >>> + >>> +properties: >>> + compatible: >>> + enum: >>> + - mediatek,mt7921s-bluetooth >> >> Can it be also WiFi on separate bus? How many device nodes do you need >> for this device? > > For the "S" variant, WiFi is also on SDIO. For the other two variants, > "U" and "E", WiFi goes over USB and PCIe respectively. On both those > variants, Bluetooth can either go over USB or UART. That is what I > gathered from the pinouts. There are a dozen GPIO pins which don't > have detailed descriptions though. If you want a comprehensive > binding of the whole chip and all its variants, I suggest we ask > MediaTek to provide it instead. My goal with the binding is to document > existing usage and allow me to upstream new device trees. > > For now we only need the Bluetooth node. The WiFi part is perfectly > detectable, and the driver doesn't seem to need the WiFi reset pin. > The Bluetooth driver only uses its reset pin to reset a hung controller. Then suffix "bluetooth" seems redundant. Best regards, Krzysztof
On Mon, Jan 29, 2024 at 3:34 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 29/01/2024 04:38, Chen-Yu Tsai wrote: > > >>> +allOf: > >>> + - $ref: bluetooth-controller.yaml# > >>> + > >>> +properties: > >>> + compatible: > >>> + enum: > >>> + - mediatek,mt7921s-bluetooth > >> > >> Can it be also WiFi on separate bus? How many device nodes do you need > >> for this device? > > > > For the "S" variant, WiFi is also on SDIO. For the other two variants, > > "U" and "E", WiFi goes over USB and PCIe respectively. On both those > > variants, Bluetooth can either go over USB or UART. That is what I > > gathered from the pinouts. There are a dozen GPIO pins which don't > > have detailed descriptions though. If you want a comprehensive > > binding of the whole chip and all its variants, I suggest we ask > > MediaTek to provide it instead. My goal with the binding is to document > > existing usage and allow me to upstream new device trees. > > > > For now we only need the Bluetooth node. The WiFi part is perfectly > > detectable, and the driver doesn't seem to need the WiFi reset pin. > > The Bluetooth driver only uses its reset pin to reset a hung controller. > > Then suffix "bluetooth" seems redundant. I think keeping the suffix makes more sense though. The chip is a two function piece, and this only targets one of the functions. Also, the compatible string is already used in an existing driver [1] and soon-to-be in-tree device tree [2]. ChenYu [1] https://elixir.bootlin.com/linux/latest/source/drivers/bluetooth/btmtksdio.c#L1414 [2] https://elixir.bootlin.com/linux/v6.8-rc1/source/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts#L86
On 30/01/2024 04:32, Chen-Yu Tsai wrote: > On Mon, Jan 29, 2024 at 3:34 PM Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 29/01/2024 04:38, Chen-Yu Tsai wrote: >> >>>>> +allOf: >>>>> + - $ref: bluetooth-controller.yaml# >>>>> + >>>>> +properties: >>>>> + compatible: >>>>> + enum: >>>>> + - mediatek,mt7921s-bluetooth >>>> >>>> Can it be also WiFi on separate bus? How many device nodes do you need >>>> for this device? >>> >>> For the "S" variant, WiFi is also on SDIO. For the other two variants, >>> "U" and "E", WiFi goes over USB and PCIe respectively. On both those >>> variants, Bluetooth can either go over USB or UART. That is what I >>> gathered from the pinouts. There are a dozen GPIO pins which don't >>> have detailed descriptions though. If you want a comprehensive >>> binding of the whole chip and all its variants, I suggest we ask >>> MediaTek to provide it instead. My goal with the binding is to document >>> existing usage and allow me to upstream new device trees. >>> >>> For now we only need the Bluetooth node. The WiFi part is perfectly >>> detectable, and the driver doesn't seem to need the WiFi reset pin. >>> The Bluetooth driver only uses its reset pin to reset a hung controller. >> >> Then suffix "bluetooth" seems redundant. > > I think keeping the suffix makes more sense though. The chip is a two > function piece, and this only targets one of the functions. Also, the That's why I asked and you said there is only one interface: SDIO. > compatible string is already used in an existing driver [1] and > soon-to-be in-tree device tree [2]. That's not the way to upstream compatible. You cannot send it bypassing bindings and review and later claim that's an ABI. Best regards, Krzysztof
On Tue, Jan 30, 2024 at 3:37 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 30/01/2024 04:32, Chen-Yu Tsai wrote: > > On Mon, Jan 29, 2024 at 3:34 PM Krzysztof Kozlowski > > <krzysztof.kozlowski@linaro.org> wrote: > >> > >> On 29/01/2024 04:38, Chen-Yu Tsai wrote: > >> > >>>>> +allOf: > >>>>> + - $ref: bluetooth-controller.yaml# > >>>>> + > >>>>> +properties: > >>>>> + compatible: > >>>>> + enum: > >>>>> + - mediatek,mt7921s-bluetooth > >>>> > >>>> Can it be also WiFi on separate bus? How many device nodes do you need > >>>> for this device? > >>> > >>> For the "S" variant, WiFi is also on SDIO. For the other two variants, > >>> "U" and "E", WiFi goes over USB and PCIe respectively. On both those > >>> variants, Bluetooth can either go over USB or UART. That is what I > >>> gathered from the pinouts. There are a dozen GPIO pins which don't > >>> have detailed descriptions though. If you want a comprehensive > >>> binding of the whole chip and all its variants, I suggest we ask > >>> MediaTek to provide it instead. My goal with the binding is to document > >>> existing usage and allow me to upstream new device trees. > >>> > >>> For now we only need the Bluetooth node. The WiFi part is perfectly > >>> detectable, and the driver doesn't seem to need the WiFi reset pin. > >>> The Bluetooth driver only uses its reset pin to reset a hung controller. > >> > >> Then suffix "bluetooth" seems redundant. > > > > I think keeping the suffix makes more sense though. The chip is a two > > function piece, and this only targets one of the functions. Also, the > > That's why I asked and you said there is only one interface: SDIO. There's only one interface, SDIO, but two SDIO functions. The two functions, if both were to be described in the device tree, would be two separate nodes. We just don't have any use for the WiFi one right now. Does that make sense to keep the suffix? > > compatible string is already used in an existing driver [1] and > > soon-to-be in-tree device tree [2]. > > That's not the way to upstream compatible. You cannot send it bypassing > bindings and review and later claim that's an ABI. I get that. I can fix up the existing users where necessary. A proper binding would make the driver lookup be more efficient as well. Thanks ChenYu
On 30/01/2024 08:47, Chen-Yu Tsai wrote: > On Tue, Jan 30, 2024 at 3:37 PM Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 30/01/2024 04:32, Chen-Yu Tsai wrote: >>> On Mon, Jan 29, 2024 at 3:34 PM Krzysztof Kozlowski >>> <krzysztof.kozlowski@linaro.org> wrote: >>>> >>>> On 29/01/2024 04:38, Chen-Yu Tsai wrote: >>>> >>>>>>> +allOf: >>>>>>> + - $ref: bluetooth-controller.yaml# >>>>>>> + >>>>>>> +properties: >>>>>>> + compatible: >>>>>>> + enum: >>>>>>> + - mediatek,mt7921s-bluetooth >>>>>> >>>>>> Can it be also WiFi on separate bus? How many device nodes do you need >>>>>> for this device? >>>>> >>>>> For the "S" variant, WiFi is also on SDIO. For the other two variants, >>>>> "U" and "E", WiFi goes over USB and PCIe respectively. On both those >>>>> variants, Bluetooth can either go over USB or UART. That is what I >>>>> gathered from the pinouts. There are a dozen GPIO pins which don't >>>>> have detailed descriptions though. If you want a comprehensive >>>>> binding of the whole chip and all its variants, I suggest we ask >>>>> MediaTek to provide it instead. My goal with the binding is to document >>>>> existing usage and allow me to upstream new device trees. >>>>> >>>>> For now we only need the Bluetooth node. The WiFi part is perfectly >>>>> detectable, and the driver doesn't seem to need the WiFi reset pin. >>>>> The Bluetooth driver only uses its reset pin to reset a hung controller. >>>> >>>> Then suffix "bluetooth" seems redundant. >>> >>> I think keeping the suffix makes more sense though. The chip is a two >>> function piece, and this only targets one of the functions. Also, the >> >> That's why I asked and you said there is only one interface: SDIO. > > There's only one interface, SDIO, but two SDIO functions. The two > functions, if both were to be described in the device tree, would > be two separate nodes. We just don't have any use for the WiFi one > right now. Does that make sense to keep the suffix? Number of functions does not really matter. Number of interfaces on the bus would matter. Why would you have two separate nodes for the same SDIO interface? Or do you want to say there are two interfaces? Best regards, Krzysztof
On Tue, Jan 30, 2024 at 05:25:38PM +0100, Krzysztof Kozlowski wrote: > On 30/01/2024 08:47, Chen-Yu Tsai wrote: > > On Tue, Jan 30, 2024 at 3:37 PM Krzysztof Kozlowski > > <krzysztof.kozlowski@linaro.org> wrote: > >> > >> On 30/01/2024 04:32, Chen-Yu Tsai wrote: > >>> On Mon, Jan 29, 2024 at 3:34 PM Krzysztof Kozlowski > >>> <krzysztof.kozlowski@linaro.org> wrote: > >>>> > >>>> On 29/01/2024 04:38, Chen-Yu Tsai wrote: > >>>> > >>>>>>> +allOf: > >>>>>>> + - $ref: bluetooth-controller.yaml# > >>>>>>> + > >>>>>>> +properties: > >>>>>>> + compatible: > >>>>>>> + enum: > >>>>>>> + - mediatek,mt7921s-bluetooth > >>>>>> > >>>>>> Can it be also WiFi on separate bus? How many device nodes do you need > >>>>>> for this device? > >>>>> > >>>>> For the "S" variant, WiFi is also on SDIO. For the other two variants, > >>>>> "U" and "E", WiFi goes over USB and PCIe respectively. On both those > >>>>> variants, Bluetooth can either go over USB or UART. That is what I > >>>>> gathered from the pinouts. There are a dozen GPIO pins which don't > >>>>> have detailed descriptions though. If you want a comprehensive > >>>>> binding of the whole chip and all its variants, I suggest we ask > >>>>> MediaTek to provide it instead. My goal with the binding is to document > >>>>> existing usage and allow me to upstream new device trees. > >>>>> > >>>>> For now we only need the Bluetooth node. The WiFi part is perfectly > >>>>> detectable, and the driver doesn't seem to need the WiFi reset pin. > >>>>> The Bluetooth driver only uses its reset pin to reset a hung controller. > >>>> > >>>> Then suffix "bluetooth" seems redundant. > >>> > >>> I think keeping the suffix makes more sense though. The chip is a two > >>> function piece, and this only targets one of the functions. Also, the > >> > >> That's why I asked and you said there is only one interface: SDIO. > > > > There's only one interface, SDIO, but two SDIO functions. The two > > functions, if both were to be described in the device tree, would > > be two separate nodes. We just don't have any use for the WiFi one > > right now. Does that make sense to keep the suffix? > > Number of functions does not really matter. Number of interfaces on the > bus would matter. Why would you have two separate nodes for the same > SDIO interface? Or do you want to say there are two interfaces? Right, one device at 2 addresses on a bus should be a node with 2 "reg" entries, not 2 nodes with 1 "reg" address each. Rob
(+CC Ulf Hansson) On Wed, Jan 31, 2024 at 6:38 AM Rob Herring <robh@kernel.org> wrote: > > On Tue, Jan 30, 2024 at 05:25:38PM +0100, Krzysztof Kozlowski wrote: > > On 30/01/2024 08:47, Chen-Yu Tsai wrote: > > > On Tue, Jan 30, 2024 at 3:37 PM Krzysztof Kozlowski > > > <krzysztof.kozlowski@linaro.org> wrote: > > >> > > >> On 30/01/2024 04:32, Chen-Yu Tsai wrote: > > >>> On Mon, Jan 29, 2024 at 3:34 PM Krzysztof Kozlowski > > >>> <krzysztof.kozlowski@linaro.org> wrote: > > >>>> > > >>>> On 29/01/2024 04:38, Chen-Yu Tsai wrote: > > >>>> > > >>>>>>> +allOf: > > >>>>>>> + - $ref: bluetooth-controller.yaml# > > >>>>>>> + > > >>>>>>> +properties: > > >>>>>>> + compatible: > > >>>>>>> + enum: > > >>>>>>> + - mediatek,mt7921s-bluetooth > > >>>>>> > > >>>>>> Can it be also WiFi on separate bus? How many device nodes do you need > > >>>>>> for this device? > > >>>>> > > >>>>> For the "S" variant, WiFi is also on SDIO. For the other two variants, > > >>>>> "U" and "E", WiFi goes over USB and PCIe respectively. On both those > > >>>>> variants, Bluetooth can either go over USB or UART. That is what I > > >>>>> gathered from the pinouts. There are a dozen GPIO pins which don't > > >>>>> have detailed descriptions though. If you want a comprehensive > > >>>>> binding of the whole chip and all its variants, I suggest we ask > > >>>>> MediaTek to provide it instead. My goal with the binding is to document > > >>>>> existing usage and allow me to upstream new device trees. > > >>>>> > > >>>>> For now we only need the Bluetooth node. The WiFi part is perfectly > > >>>>> detectable, and the driver doesn't seem to need the WiFi reset pin. > > >>>>> The Bluetooth driver only uses its reset pin to reset a hung controller. > > >>>> > > >>>> Then suffix "bluetooth" seems redundant. > > >>> > > >>> I think keeping the suffix makes more sense though. The chip is a two > > >>> function piece, and this only targets one of the functions. Also, the > > >> > > >> That's why I asked and you said there is only one interface: SDIO. > > > > > > There's only one interface, SDIO, but two SDIO functions. The two > > > functions, if both were to be described in the device tree, would > > > be two separate nodes. We just don't have any use for the WiFi one > > > right now. Does that make sense to keep the suffix? > > > > Number of functions does not really matter. Number of interfaces on the > > bus would matter. Why would you have two separate nodes for the same > > SDIO interface? Or do you want to say there are two interfaces? There is only one external interface. I don't know how the functions are stitched together internally. It could be that the separate functions have nothing in common other than sharing a standard external SDIO interface. Each function can be individually controlled, and operations for different functions are directed internally to the corresponding core. > Right, one device at 2 addresses on a bus should be a node with 2 "reg" > entries, not 2 nodes with 1 "reg" address each. AFAICU that's not what the MMC controller binding, which I quote below, says. It implies that each SDIO function shall be a separate node under the MMC controller node. patternProperties: "^.*@[0-9]+$": type: object description: | On embedded systems the cards connected to a host may need additional properties. These can be specified in subnodes to the host controller node. The subnodes are identified by the standard \'reg\' property. Which information exactly can be specified depends on the bindings for the SDIO function driver for the subnode, as specified by the compatible string. properties: compatible: description: | Name of SDIO function following generic names recommended practice reg: items: - minimum: 0 maximum: 7 description: Must contain the SDIO function number of the function this subnode describes. A value of 0 denotes the memory SD function, values from 1 to 7 denote the SDIO functions. ChenYu
On Wed, 31 Jan 2024 at 04:39, Chen-Yu Tsai <wenst@chromium.org> wrote: > > (+CC Ulf Hansson) > > On Wed, Jan 31, 2024 at 6:38 AM Rob Herring <robh@kernel.org> wrote: > > > > On Tue, Jan 30, 2024 at 05:25:38PM +0100, Krzysztof Kozlowski wrote: > > > On 30/01/2024 08:47, Chen-Yu Tsai wrote: > > > > On Tue, Jan 30, 2024 at 3:37 PM Krzysztof Kozlowski > > > > <krzysztof.kozlowski@linaro.org> wrote: > > > >> > > > >> On 30/01/2024 04:32, Chen-Yu Tsai wrote: > > > >>> On Mon, Jan 29, 2024 at 3:34 PM Krzysztof Kozlowski > > > >>> <krzysztof.kozlowski@linaro.org> wrote: > > > >>>> > > > >>>> On 29/01/2024 04:38, Chen-Yu Tsai wrote: > > > >>>> > > > >>>>>>> +allOf: > > > >>>>>>> + - $ref: bluetooth-controller.yaml# > > > >>>>>>> + > > > >>>>>>> +properties: > > > >>>>>>> + compatible: > > > >>>>>>> + enum: > > > >>>>>>> + - mediatek,mt7921s-bluetooth > > > >>>>>> > > > >>>>>> Can it be also WiFi on separate bus? How many device nodes do you need > > > >>>>>> for this device? > > > >>>>> > > > >>>>> For the "S" variant, WiFi is also on SDIO. For the other two variants, > > > >>>>> "U" and "E", WiFi goes over USB and PCIe respectively. On both those > > > >>>>> variants, Bluetooth can either go over USB or UART. That is what I > > > >>>>> gathered from the pinouts. There are a dozen GPIO pins which don't > > > >>>>> have detailed descriptions though. If you want a comprehensive > > > >>>>> binding of the whole chip and all its variants, I suggest we ask > > > >>>>> MediaTek to provide it instead. My goal with the binding is to document > > > >>>>> existing usage and allow me to upstream new device trees. > > > >>>>> > > > >>>>> For now we only need the Bluetooth node. The WiFi part is perfectly > > > >>>>> detectable, and the driver doesn't seem to need the WiFi reset pin. > > > >>>>> The Bluetooth driver only uses its reset pin to reset a hung controller. > > > >>>> > > > >>>> Then suffix "bluetooth" seems redundant. > > > >>> > > > >>> I think keeping the suffix makes more sense though. The chip is a two > > > >>> function piece, and this only targets one of the functions. Also, the > > > >> > > > >> That's why I asked and you said there is only one interface: SDIO. > > > > > > > > There's only one interface, SDIO, but two SDIO functions. The two > > > > functions, if both were to be described in the device tree, would > > > > be two separate nodes. We just don't have any use for the WiFi one > > > > right now. Does that make sense to keep the suffix? > > > > > > Number of functions does not really matter. Number of interfaces on the > > > bus would matter. Why would you have two separate nodes for the same > > > SDIO interface? Or do you want to say there are two interfaces? > > There is only one external interface. I don't know how the functions > are stitched together internally. > > It could be that the separate functions have nothing in common other > than sharing a standard external SDIO interface. Each function can be > individually controlled, and operations for different functions are > directed internally to the corresponding core. > > > Right, one device at 2 addresses on a bus should be a node with 2 "reg" > > entries, not 2 nodes with 1 "reg" address each. > > AFAICU that's not what the MMC controller binding, which I quote below, > says. It implies that each SDIO function shall be a separate node under > the MMC controller node. Yes, that's what we decided to go with, a long time ago. At least in this particular case, I think it makes sense, as each function (child-node) may also describe additional resources routed to each function. A typical description could be for a WiFi-Bluetooth combo-chip, where each function may have its own clocks, irqs and regulators being routed. > > > patternProperties: > "^.*@[0-9]+$": > type: object > description: | > On embedded systems the cards connected to a host may need > additional properties. These can be specified in subnodes to the > host controller node. The subnodes are identified by the > standard \'reg\' property. Which information exactly can be > specified depends on the bindings for the SDIO function driver > for the subnode, as specified by the compatible string. > > properties: > compatible: > description: | > Name of SDIO function following generic names recommended > practice > > reg: > items: > - minimum: 0 > maximum: 7 > description: > Must contain the SDIO function number of the function this > subnode describes. A value of 0 denotes the memory SD > function, values from 1 to 7 denote the SDIO functions. > > > ChenYu Kind regards Uffe
On Tue, Feb 6, 2024 at 1:50 AM Ulf Hansson <ulf.hansson@linaro.org> wrote: > > On Wed, 31 Jan 2024 at 04:39, Chen-Yu Tsai <wenst@chromium.org> wrote: > > > > (+CC Ulf Hansson) > > > > On Wed, Jan 31, 2024 at 6:38 AM Rob Herring <robh@kernel.org> wrote: > > > > > > On Tue, Jan 30, 2024 at 05:25:38PM +0100, Krzysztof Kozlowski wrote: > > > > On 30/01/2024 08:47, Chen-Yu Tsai wrote: > > > > > On Tue, Jan 30, 2024 at 3:37 PM Krzysztof Kozlowski > > > > > <krzysztof.kozlowski@linaro.org> wrote: > > > > >> > > > > >> On 30/01/2024 04:32, Chen-Yu Tsai wrote: > > > > >>> On Mon, Jan 29, 2024 at 3:34 PM Krzysztof Kozlowski > > > > >>> <krzysztof.kozlowski@linaro.org> wrote: > > > > >>>> > > > > >>>> On 29/01/2024 04:38, Chen-Yu Tsai wrote: > > > > >>>> > > > > >>>>>>> +allOf: > > > > >>>>>>> + - $ref: bluetooth-controller.yaml# > > > > >>>>>>> + > > > > >>>>>>> +properties: > > > > >>>>>>> + compatible: > > > > >>>>>>> + enum: > > > > >>>>>>> + - mediatek,mt7921s-bluetooth > > > > >>>>>> > > > > >>>>>> Can it be also WiFi on separate bus? How many device nodes do you need > > > > >>>>>> for this device? > > > > >>>>> > > > > >>>>> For the "S" variant, WiFi is also on SDIO. For the other two variants, > > > > >>>>> "U" and "E", WiFi goes over USB and PCIe respectively. On both those > > > > >>>>> variants, Bluetooth can either go over USB or UART. That is what I > > > > >>>>> gathered from the pinouts. There are a dozen GPIO pins which don't > > > > >>>>> have detailed descriptions though. If you want a comprehensive > > > > >>>>> binding of the whole chip and all its variants, I suggest we ask > > > > >>>>> MediaTek to provide it instead. My goal with the binding is to document > > > > >>>>> existing usage and allow me to upstream new device trees. > > > > >>>>> > > > > >>>>> For now we only need the Bluetooth node. The WiFi part is perfectly > > > > >>>>> detectable, and the driver doesn't seem to need the WiFi reset pin. > > > > >>>>> The Bluetooth driver only uses its reset pin to reset a hung controller. > > > > >>>> > > > > >>>> Then suffix "bluetooth" seems redundant. > > > > >>> > > > > >>> I think keeping the suffix makes more sense though. The chip is a two > > > > >>> function piece, and this only targets one of the functions. Also, the > > > > >> > > > > >> That's why I asked and you said there is only one interface: SDIO. > > > > > > > > > > There's only one interface, SDIO, but two SDIO functions. The two > > > > > functions, if both were to be described in the device tree, would > > > > > be two separate nodes. We just don't have any use for the WiFi one > > > > > right now. Does that make sense to keep the suffix? > > > > > > > > Number of functions does not really matter. Number of interfaces on the > > > > bus would matter. Why would you have two separate nodes for the same > > > > SDIO interface? Or do you want to say there are two interfaces? > > > > There is only one external interface. I don't know how the functions > > are stitched together internally. > > > > It could be that the separate functions have nothing in common other > > than sharing a standard external SDIO interface. Each function can be > > individually controlled, and operations for different functions are > > directed internally to the corresponding core. > > > > > Right, one device at 2 addresses on a bus should be a node with 2 "reg" > > > entries, not 2 nodes with 1 "reg" address each. > > > > AFAICU that's not what the MMC controller binding, which I quote below, > > says. It implies that each SDIO function shall be a separate node under > > the MMC controller node. > > Yes, that's what we decided to go with, a long time ago. At least in > this particular case, I think it makes sense, as each function > (child-node) may also describe additional resources routed to each > function. > > A typical description could be for a WiFi-Bluetooth combo-chip, where > each function may have its own clocks, irqs and regulators being > routed. Rob, Krzysztof, does that help you understand why the binding and example are written with bluetooth being one node and WiFi (should it ever be added) being a separate node? It is based on the existing MMC controller bindings. ChenYu > > > > > > patternProperties: > > "^.*@[0-9]+$": > > type: object > > description: | > > On embedded systems the cards connected to a host may need > > additional properties. These can be specified in subnodes to the > > host controller node. The subnodes are identified by the > > standard \'reg\' property. Which information exactly can be > > specified depends on the bindings for the SDIO function driver > > for the subnode, as specified by the compatible string. > > > > properties: > > compatible: > > description: | > > Name of SDIO function following generic names recommended > > practice > > > > reg: > > items: > > - minimum: 0 > > maximum: 7 > > description: > > Must contain the SDIO function number of the function this > > subnode describes. A value of 0 denotes the memory SD > > function, values from 1 to 7 denote the SDIO functions. > > > > > > ChenYu > > Kind regards > Uffe
diff --git a/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml new file mode 100644 index 000000000000..ff11c95c816c --- /dev/null +++ b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7921s-bluetooth.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT7921S Bluetooth + +maintainers: + - Sean Wang <sean.wang@mediatek.com> + +description: + MT7921S is an SDIO-attached dual-radio WiFi+Bluetooth Combo chip; each + function is its own SDIO function on a shared SDIO interface. The chip + has two dedicated reset lines, one for each function core. + This binding only covers the Bluetooth part of the chip. + +allOf: + - $ref: bluetooth-controller.yaml# + +properties: + compatible: + enum: + - mediatek,mt7921s-bluetooth + reg: + const: 2 + + reset-gpios: + maxItems: 1 + description: + An active-low reset line for the Bluetooth core; on typical M.2 + key E modules this is the W_DISABLE2# pin. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + mmc { + #address-cells = <1>; + #size-cells = <0>; + + bluetooth@2 { + compatible = "mediatek,mt7921s-bluetooth"; + reg = <2>; + reset-gpios = <&pio 8 GPIO_ACTIVE_LOW>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index b64a64ca7916..662957146852 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13657,6 +13657,7 @@ M: Sean Wang <sean.wang@mediatek.com> L: linux-bluetooth@vger.kernel.org L: linux-mediatek@lists.infradead.org (moderated for non-subscribers) S: Maintained +F: Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml F: Documentation/devicetree/bindings/net/mediatek-bluetooth.txt F: drivers/bluetooth/btmtkuart.c