From patchwork Fri Apr 12 07:30:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 13627031 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88F22C4345F for ; Fri, 12 Apr 2024 07:31:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NPVvWMAJiQ9bH1Vh3FBxv8RA77e8O4OnA04Edjj3+7c=; b=jVh/7vGocmmLX6Cb8Bv5pLrBPV lusMUKeh/58zF/O44lpC38iDAeVHkMcSJ+aHWG90z9ESF8JBDdABZjsCzCxvw1WSOMtHoeozc43L7 ptA/G0MrSu0LgV52Nrj/3laIeX6W+M5/DqaPfuQ430WPr6FtZ2BsMC1eb32xtwSmQOQLw0kGY1IpG nytSiat1pj8xJwc57dKMXP124meemzy3x6BylL4MCsJnAqB4P1O9ov3kgwOz0braZhL3uyRqpPdk8 w+RIsu9K8VadkfdWoa2kDUXdNwXIh1Ocuxd1KUNzI/nEWyGn1/1iZxfGyu+ZsSmg9oUQdZz3KbWHD NeMKxvIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvBNM-0000000Fr0V-0WVR; Fri, 12 Apr 2024 07:31:08 +0000 Received: from mail-oo1-xc2b.google.com ([2607:f8b0:4864:20::c2b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvBNE-0000000Fqtl-0Xsd for linux-mediatek@lists.infradead.org; Fri, 12 Apr 2024 07:31:02 +0000 Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-5ac5376c4b2so349087eaf.2 for ; Fri, 12 Apr 2024 00:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712907058; x=1713511858; darn=lists.infradead.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=NPVvWMAJiQ9bH1Vh3FBxv8RA77e8O4OnA04Edjj3+7c=; b=CH7B/YzCTnJGm+t3sJFG1DK2vD7Myalruj9M2urSX163AkPsQEFvdg8c1Sp9GTFHfb Rq5UY5B0Kt7Lt+dw06F7mbGA7H52QQ7YgqI333pGuaKEj9oIfBXUv86PZiaP7aKc//7U ZKSTDmHEuY8GeHz5kFXeD3aZ7S7hrvn2GgO4w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712907058; x=1713511858; 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=NPVvWMAJiQ9bH1Vh3FBxv8RA77e8O4OnA04Edjj3+7c=; b=FsOtG6LnRjEX7Hit3vNc9PhSRRXk6Yxdj6xrb8PFKbbuhCwXBxp1nNpidL1iOnPhXF GywOqC3rQ+5Qi3XzC4uHwmT1Gi0E/Zn1W6Blk4nbQg/2Dv7MpJPlz0MJZM2PD12ajdxT lTIHEvhWjaRI3VH0wPvc9NIP0Lg8vZ5Qw+NWAhDz4mqUCozhuOSvtRw1+w1Q0oxipaA1 mOzpUyEDB2c7JRk1+l5atVms0KPIJCREy05slhPn3wr7e2GGpBA9QLCedQ8ej6RuHvPE UCSbertYNHo72n0aEgsrwPalmrSsjy46Hz3kWythne19ibIXRNObxOLjFVGM95A/UlF7 GqxA== X-Forwarded-Encrypted: i=1; AJvYcCXhSXXxfBC4z3r2vTzcRORO5wWe6yrObCDOJVjGsLxBRuDEoBrcl2LVAn2QuKaoCd80AkTPwUnix2/iFCXYtOV+Z4wXafGgKufS3wGezAdy+nlG X-Gm-Message-State: AOJu0Yxyw7TtU0UQEkcCCvGYpcX6JLArFKBNV7btMzZx2Xj424YtBq/J 4zuHfEc1XqrKaqvoH3WtWUDQQHGJ/Eyb1cjub9Rd9QQ+8lX5CZ9jENd81izCAA== X-Google-Smtp-Source: AGHT+IHbqeFZC+Q0e8Ic2lEtKsE2fsonI92D1nvKY+dlmohGFGapjLW9bPiT6QlzY3Dyk6ly/4CfLw== X-Received: by 2002:a05:6358:6b0c:b0:186:431:d9d6 with SMTP id y12-20020a0563586b0c00b001860431d9d6mr1648558rwg.17.1712907057809; Fri, 12 Apr 2024 00:30:57 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:e3c8:6e1:dcfa:3e8c]) by smtp.gmail.com with ESMTPSA id d6-20020a637346000000b005d3bae243bbsm2149609pgn.4.2024.04.12.00.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 00:30:57 -0700 (PDT) From: Chen-Yu Tsai To: Marcel Holtmann , Luiz Augusto von Dentz , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , Sean Wang , 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 v3 1/2] dt-bindings: net: bluetooth: Add MediaTek MT7921S SDIO Bluetooth Date: Fri, 12 Apr 2024 15:30:42 +0800 Message-ID: <20240412073046.1192744-2-wenst@chromium.org> X-Mailer: git-send-email 2.44.0.683.g7961c838ac-goog In-Reply-To: <20240412073046.1192744-1-wenst@chromium.org> References: <20240412073046.1192744-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_003100_385021_1CF097D3 X-CRM114-Status: GOOD ( 20.99 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The MediaTek MT7921S is a WiFi/Bluetooth combo chip that works over SDIO. WiFi and Bluetooth are separate SDIO functions within the chip. While the Bluetooth SDIO function is fully discoverable, the chip has a pin that can reset just the Bluetooth core, as opposed to the full chip. This should be described in the device tree. Add a device tree binding for the Bluetooth SDIO function of the MT7921S specifically to document the reset line. This binding is based on the MMC controller binding, which specifies one device node per SDIO function. Cc: Sean Wang Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring --- Changes since v2: - Expand description and commit message to clearly state that WiFi and Bluetooth are separate SDIO functions, and that each function should be a separate device node, as specified by the MMC binding. - Change 'additionalProperties' to 'unevaluatedProperties' - Add missing separating new line - s/ot/to/ Angelo's reviewed-by was not picked up due to the above changes. 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 | 55 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 56 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..67ff7caad599 --- /dev/null +++ b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml @@ -0,0 +1,55 @@ +# 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 + +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 SDIO function, with one device + node describing only this SDIO function. + +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 + +unevaluatedProperties: false + +examples: + - | + #include + + 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 88981d9f3958..218bc2a21207 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13818,6 +13818,7 @@ M: Sean Wang 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 From patchwork Fri Apr 12 07:30:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 13627032 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D309C00A94 for ; Fri, 12 Apr 2024 07:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5RdZHSk4TFU7CzZXHHxRZDn956keZAqDxJBl6Nwvleg=; b=1juCkPXY3iAwxIWKfV/b8OiH9x eDPFsRW/dRP70Ev4llNMTwrVjn9Iw1pqZtxDueg1Nj5FS5ppnV3ukaE4jGMCwWnhceKltOXqCRoOO pxcSY1omwS4+TDUx9p3ChpP1B1Ea4nJKgLOqO9s4MAlYfes4bZB5leCXgfKYNGVdofaB60wSVBR/I jwm4Y3gCnakpq+ybO9yjCKapwW0CODNP1OHJZEslmUVlfb/LGjGDt+EJBRs1UrzMFlCztqEv8GZQn BRYQd/VSjLLqfZWVlGyJgTa734x7Sid2GupxSTePnK4dFW5lhHu6t5jj4+HvJvrMPJRmZJKt2GV2o ijiKmsDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvBNO-0000000Fr2S-1rPm; Fri, 12 Apr 2024 07:31:10 +0000 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvBNH-0000000Fqw0-19Qe for linux-mediatek@lists.infradead.org; Fri, 12 Apr 2024 07:31:05 +0000 Received: by mail-il1-x133.google.com with SMTP id e9e14a558f8ab-36a0d09e6ffso2983235ab.0 for ; Fri, 12 Apr 2024 00:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712907061; x=1713511861; darn=lists.infradead.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=5RdZHSk4TFU7CzZXHHxRZDn956keZAqDxJBl6Nwvleg=; b=AtHLPww6OYyXPFCjkHI4WG/zwAzfyQDeR9vkAuiQuAlLz0TWPgxmlnYEJObRw/5jQu GdkLaZrvKmZILdIF0x2TfDAqOi02xdwL7iQXzccwmOGvbeUz2WYipiDaMT+obRIO993i Pw+spsgpS7lVDGOlKlOVMQEiRr8Cq3JH1nzu4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712907061; x=1713511861; 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=5RdZHSk4TFU7CzZXHHxRZDn956keZAqDxJBl6Nwvleg=; b=h76TQytvjYCnIc3rlA2J2Gn14D+nx8j3KbhX3G2FF/lV1BfeoQod3E3GUdEh6U7q00 6BVW9SRU6A1vNlV47HD18jfr470+Fj1JQFMlLz44QNVuq+FSqgXIBgWmudIDnz+pQqf2 P/oNf9MwPJLeFYDBoM+exBSBAWiUC+Hhe0k/NNVqANDdzfofZuAJkI/+kWoLeVujcBR9 1nadm1+0vw7x/TDZib9NVniQC2VO0Qszo2Kogrlx3bjg/W0v1bHxnlSZkvB9QZWjItNT /RS1lmQgeBJREQO/3fFILciEqhH3EWax2uLHXk57W7IOQskfOZldkLHB8SvOBREOroiA emCA== X-Forwarded-Encrypted: i=1; AJvYcCU2MmR427rCbdKU7UwlnlV70SnlkUVnmO5V4qfeUXAWkz8upoIOxyg0rwX7WD/nPdWZnITn9Y/cYANJURVcermo1xARo6TrTy/EeZzzCGoCYNNc X-Gm-Message-State: AOJu0Yx+hf/kZCMav1odpyr8GBW8Y4kJsbH8f4HvmLTE/cvSlFzWJ4Mj 9ed1M1DKlHjclRDCFKy3eSrkCSFWnnYP8SkVp2KgDNm1rZNqijoC5mn+P1H9wg== X-Google-Smtp-Source: AGHT+IEL4CHJZN6cyV51F6bVm8k72tn6WE6KhBCBOK+lKr3ueEZGkvYYXfBhK3hbMLBmSdrvlM2k9Q== X-Received: by 2002:a05:6e02:160a:b0:369:9492:c24b with SMTP id t10-20020a056e02160a00b003699492c24bmr2090150ilu.10.1712907061055; Fri, 12 Apr 2024 00:31:01 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:e3c8:6e1:dcfa:3e8c]) by smtp.gmail.com with ESMTPSA id d6-20020a637346000000b005d3bae243bbsm2149609pgn.4.2024.04.12.00.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 00:31:00 -0700 (PDT) From: Chen-Yu Tsai To: Marcel Holtmann , Luiz Augusto von Dentz , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , Sean Wang , 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 v3 2/2] arm64: dts: mediatek: mt8183-pico6: Fix bluetooth node Date: Fri, 12 Apr 2024 15:30:43 +0800 Message-ID: <20240412073046.1192744-3-wenst@chromium.org> X-Mailer: git-send-email 2.44.0.683.g7961c838ac-goog In-Reply-To: <20240412073046.1192744-1-wenst@chromium.org> References: <20240412073046.1192744-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_003103_392668_A477E0BC X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Bluetooth is not a random device connected to the MMC/SD controller. It is function 2 of the SDIO device. Fix the address of the bluetooth node. Also fix the node name and drop the label. Fixes: 055ef10ccdd4 ("arm64: dts: mt8183: Add jacuzzi pico/pico6 board") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno --- No changes since v1. arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts b/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts index a2e74b829320..6a7ae616512d 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts @@ -82,7 +82,8 @@ pins-clk { }; &mmc1 { - bt_reset: bt-reset { + bluetooth@2 { + reg = <2>; compatible = "mediatek,mt7921s-bluetooth"; pinctrl-names = "default"; pinctrl-0 = <&bt_pins_reset>;