From patchwork Fri Jun 28 05:46:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13715483 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 8D44FC2BBCA for ; Fri, 28 Jun 2024 05:47:21 +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: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=J82aso9srCTwQ13NgHA3QiH1Y/m1v0Plo0MRWgzcEWw=; b=Tpmrn5p1bSOyvI4kMijyy2SUlw M/CNvE10RZPBLUPcfUL7CN7e7Y8F1EdcVemeMlQ1P+9aG9gcD0gt6czNQ4lQYC+BSM22RAo//phWJ ry5ompJh13QpctAjVsx+y9wP4cpJ7rIITV7isd2gmnMJJLYoqu4FdNicqJ1ExWxuWdTjCb8LLghSu UL2GTlbPD+/Euxk0PzE7p+Au70xjSkHhDRvHYkyQ9UU2VDc4TJfLrJtZ8jFLoJoWkrtWzbR0Sm2CQ 3pefOv6UNZNsZGpy9jdShMvwZRBdRk8tYMNfW/WGExZlapsHI0Gm+7oYCt26H8GWtmEWnenXavo0/ jzYZduZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sN4S7-0000000Cer5-35Sj; Fri, 28 Jun 2024 05:47:19 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sN4Ry-0000000Ceov-1Caj; Fri, 28 Jun 2024 05:47:11 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a72420e84feso28361466b.0; Thu, 27 Jun 2024 22:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719553628; x=1720158428; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=J82aso9srCTwQ13NgHA3QiH1Y/m1v0Plo0MRWgzcEWw=; b=Dy+p5XpE8D72K0fFYcliFi6g2JmgUPQQVPNOeGn+Ln6Y+HoNM2GWAFXCMrA/t3dI1c r4NBJmql1/8ehcz3/sc0UbVLxbXESHsz3u4DlO37zbzUUqjsAermPiLVOaipGP1/I/wr CpU5NjGefhV9CVPqsmoS3vBSRIPcS4TyGqCqCiQVq+e9EZVpLQDTDFONRzNcE36aGu4h Ce57+jHm5kKXl2gfuPAeLJisb8addyE+BxeJP3qEG/2b/A1gqOyc4bQOCsCIgDxdne1/ w5ZhPrsl8D64KHuvXhV8bE6qXgLKM2/gKYH9yWoin4VUrQm7eIta83ZFd9D7yU7/49mf 8aeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719553628; x=1720158428; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=J82aso9srCTwQ13NgHA3QiH1Y/m1v0Plo0MRWgzcEWw=; b=HgJU5mJoTxh8i2ThmhQ64BiUQZvpgtVvx4hjwp1i7HhVWf4dq+cRuIsHhj8fgNkdev 8ASzyqIsj/HPZJac+Zy4EjaoHidqTcGqcspFBwqEqLSnGVJOJOeW3n2h64MXmRXOQmNP WzU0WbnI10s4W8JAqjenvzog9rCNO5qB4mpN81EAFp+sK6aLnHLryknRmoXiwd6NnFoh ktURaW5X683kODa86JxMUhlljHPObwu5af5hSHmmLyZvtPNZgHJpZyjXQRuHsPxOvi5w 9PRC6qXXHrethqaNkfPOJyl9XXA7LxOvtjApTVtOhcoJcu33T36HD6ZM6dgFGoYDCmR3 zFXg== X-Forwarded-Encrypted: i=1; AJvYcCXFX2Qli1VYzmPOgk+AnySNr33xhwVloGTDEVWI9n3HF8tkdFeiNGt4DHNuh2aPJbl+MZ+C/3Q2shxJxOLTot4Fw7nXyJ0WJxpwV6uHxNNKuQtyVF4Jvf5y5lOE53zvVaspDyEmPwbP1H2BCEDCJXf7VwBmcPJLFRk= X-Gm-Message-State: AOJu0Yz0Zba7JaEeyQR4rc0zRE726ZG5TWzLgKDmHK0df1Y8S8iDVueI LTHGpGUvehyBsgy8WKL6X9t2+zCbz5j1aYnzy1nwivS5EdKH4AIwip3S1Q== X-Google-Smtp-Source: AGHT+IESZihvr0VfgF8QpueLxCMpYeBNN0yaK4ft/bU3+rHkwKNn0h5UqOyBqhd7yd/NxLcWzXzC+Q== X-Received: by 2002:a17:906:a847:b0:a6f:6721:b065 with SMTP id a640c23a62f3a-a7245bb25e6mr1136984566b.32.1719553627433; Thu, 27 Jun 2024 22:47:07 -0700 (PDT) Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72ab0651a8sm41665766b.128.2024.06.27.22.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 22:47:06 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marcel Holtmann , Luiz Augusto von Dentz , Matthias Brugger , AngeloGioacchino Del Regno , Sean Wang , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V2] dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema Date: Fri, 28 Jun 2024 07:46:35 +0200 Message-Id: <20240628054635.3154-1-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_224710_383490_5E3345BA X-CRM114-Status: GOOD ( 17.81 ) 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 From: Rafał Miłecki This helps validating DTS files. Introduced changes: 1. Dropped serial details from example 2. Added required example include Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring (Arm) --- V2: Simplify example .../bluetooth/mediatek,mt7622-bluetooth.yaml | 51 +++++++++++++++++++ .../bindings/net/mediatek-bluetooth.txt | 36 ------------- 2 files changed, 51 insertions(+), 36 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml diff --git a/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml new file mode 100644 index 000000000000..3f9e69208127 --- /dev/null +++ b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7622-bluetooth.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek SoC built-in Bluetooth + +description: + This device is a serial attached device to BTIF device and thus it must be a + child node of the serial node with BTIF. The dt-bindings details for BTIF + device can be known via Documentation/devicetree/bindings/serial/8250.yaml. + +maintainers: + - Sean Wang + +allOf: + - $ref: bluetooth-controller.yaml# + +properties: + compatible: + const: mediatek,mt7622-bluetooth + + clocks: + maxItems: 1 + + clock-names: + const: ref + + power-domains: + maxItems: 1 + +required: + - clocks + - clock-names + - power-domains + +unevaluatedProperties: false + +examples: + - | + #include + + serial { + bluetooth { + compatible = "mediatek,mt7622-bluetooth"; + power-domains = <&scpsys MT7622_POWER_DOMAIN_WB>; + clocks = <&clk25m>; + clock-names = "ref"; + }; + }; diff --git a/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt b/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt index 9ef5bacda8c1..988c72685cbf 100644 --- a/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt +++ b/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt @@ -1,39 +1,3 @@ -MediaTek SoC built-in Bluetooth Devices -================================== - -This device is a serial attached device to BTIF device and thus it must be a -child node of the serial node with BTIF. The dt-bindings details for BTIF -device can be known via Documentation/devicetree/bindings/serial/8250.yaml. - -Required properties: - -- compatible: Must be - "mediatek,mt7622-bluetooth": for MT7622 SoC -- clocks: Should be the clock specifiers corresponding to the entry in - clock-names property. -- clock-names: Should contain "ref" entries. -- power-domains: Phandle to the power domain that the device is part of - -Example: - - btif: serial@1100c000 { - compatible = "mediatek,mt7622-btif", - "mediatek,mtk-btif"; - reg = <0 0x1100c000 0 0x1000>; - interrupts = ; - clocks = <&pericfg CLK_PERI_BTIF_PD>; - clock-names = "main"; - reg-shift = <2>; - reg-io-width = <4>; - - bluetooth { - compatible = "mediatek,mt7622-bluetooth"; - power-domains = <&scpsys MT7622_POWER_DOMAIN_WB>; - clocks = <&clk25m>; - clock-names = "ref"; - }; - }; - MediaTek UART based Bluetooth Devices ==================================