From patchwork Wed Sep 1 09:18:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12468939 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 814D1C432BE for ; Wed, 1 Sep 2021 09:59:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 496DC60462 for ; Wed, 1 Sep 2021 09:59:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 496DC60462 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=Y1tVgJca2TkFTo4uLKvubhhc6Hl9RdJNsK0hPbG5Soo=; b=rBCUPy5jLtVlVT UfYUu9MM8UaSv902ya5gLM7J/ofduRDhEgdBmst6LpVwmO6KqtBSglLmmRqxkWCOQY7/+GDjkq+OE HNMo4EwWCg0+c8MWTEbxCWhQ4qhGVZOalR0IbwsbtPbc2EvVmKoLnoYS0AnXgG9gQsrFPmKoi8qAa iFsfUv6xmSXQCjqfJ8FDLyjmxzlyP4JTR2ICEfwQ8r097Xc1czulQrN+aJOxkRt7FBM9kEmsrs/ad RQaPhZc1yjVkYELZGICDChDwSdJeWODMtZ/kunQjERwg4077CjIVtiVZgCRQ6mzehQ8Hu01C9BrR6 iEImymg0WNcpJVYmuhFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLMzA-0052nz-U2; Wed, 01 Sep 2021 09:56:51 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLMOk-004pjQ-Ae for linux-arm-kernel@lists.infradead.org; Wed, 01 Sep 2021 09:19:14 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 998DF580AF6; Wed, 1 Sep 2021 05:19:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 01 Sep 2021 05:19:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=P6Nu6aTsQPnD4 VDKF+yrkv+lZ72RVulC249s1d3SA1A=; b=fyiiFo9+hVDa0nlR+UU1Q3DTE7o7i IdR3OXR8nGCe5ZivF8enSkzSHWkoUO7vVCcvRroK1m1WrJTlb8vXD1m+bjm/FRBY RZHfUME7wCL4RezW5KXfv48BMTO4ZEYU09EaNLFtSuQbA10Ik28llF7FWrT4OM8o 09gHoJMNm0BeK0p7Rt1gEQw0FUEj5ZLbU8hjjJr9j63wrY3/oXDRvOEOepNXWz5s zaivaq2iGAu8tGhL3mxWn6eKElwQ3paytmzI1hZICdVgOAko1eH8hk9jY+nRjEwh N2TSl4v4jaRlvFMRVVZLPK1yK2r5Wd9x94Bt8pLFwvs/bpIqmfALh4oww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=P6Nu6aTsQPnD4VDKF+yrkv+lZ72RVulC249s1d3SA1A=; b=ZXAfJMQ0 5Muo/tu+Fn9xKwqE3QGA6DsKAVG+iNx5E+XIZOwchCSnRe2DK7zkqVislyRGENVH RRz6Jj1f28wI3eWr7k1yeWZDN3Mo/byZmz0/kPaxV0OxNYrzRSO2SiVAyYEK/+F5 guuNmCjEtAYH2CrDnQFhJMMl2Y0K9Bb6dpKEIt18HWQD0oS4PMU+XM0y9n/RPdTB nG1CmZitU2ETdQ3ly+WXN4MGItX2D3GMYjteTRVgY3uiGimTmdg73rc0a1s65qqh ceI6MF9S1yyIYnhJKAGOOH23BGAl7XJjjVGcIGdme8AHqaRoTztPXc0WZ9tLnVLA njS96idSgzqwWA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvfedgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Sep 2021 05:19:08 -0400 (EDT) From: Maxime Ripard To: devicetree@vger.kernel.org, Rob Herring , Frank Rowand , Chen-Yu Tsai , Maxime Ripard , =?utf-8?q?Jernej_=C5=A0krabec?= Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, "David S. Miller" , Jakub Kicinski , Linus Walleij , netdev@vger.kernel.org, Rob Herring Subject: [PATCH v2 07/52] dt-bindings: bluetooth: broadcom: Fix clocks check Date: Wed, 1 Sep 2021 11:18:07 +0200 Message-Id: <20210901091852.479202-8-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210901091852.479202-1-maxime@cerno.tech> References: <20210901091852.479202-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210901_021910_513979_8364A8FE X-CRM114-Status: GOOD ( 16.91 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The original binding was mentioning that valid values for the clocks and clock-names property were one or two clocks from extclk, txco and lpo, with extclk being deprecated in favor of txco. However, the current binding lists a valid array as extclk, txco and lpo, with either one or two items. While this looks similar, it actually enforces that all the device trees use either ["extclk"], or ["extclk", "txco"]. That doesn't make much sense, since the two clocks are said to be equivalent, with one superseeding the other. lpo is also not a valid clock anymore, and would be as the third clock of the list, while we could have only this clock in the previous binding (and in DTs). Let's rework the clock clause to allow to have either: - extclk, and mark it a deprecated - txco alone - lpo alone - txco, lpo While ["extclk", "lpo"] wouldn't be valid, it wasn't found in any device tree so it's not an issue in practice. Similarly, ["lpo", "txco"] is still considered invalid, but it's generally considered as a best practice to fix the order of clocks. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linus Walleij Cc: netdev@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Reviewed-by: Linus Walleij --- .../bindings/net/broadcom-bluetooth.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml index fbdc2083bec4..5aac094fd217 100644 --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml @@ -50,16 +50,29 @@ properties: by interrupts and "host-wakeup" interrupt-names clocks: + minItems: 1 maxItems: 2 description: 1 or 2 clocks as defined in clock-names below, in that order clock-names: description: Names of the 1 to 2 supplied clocks - items: + oneOf: + - const: extclk + deprecated: true + description: Deprecated in favor of txco + - const: txco + description: > + external reference clock (not a standalone crystal) + - const: lpo - - const: extclk + description: > + external low power 32.768 kHz clock + + - items: + - const: txco + - const: lpo vbat-supply: description: phandle to regulator supply for VBAT