From patchwork Fri Sep 24 07:27:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12514265 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=-18.2 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,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 C1931C433EF for ; Fri, 24 Sep 2021 07:30:31 +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 8FE0B61211 for ; Fri, 24 Sep 2021 07:30:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8FE0B61211 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: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=o+FhTH9j3DGMrckpLC98eyrj6u4QXZvfFevj7t2DQ2Q=; b=wWUd81x5q+NhIz 4ErIn0SIFCCPW5HkdxWA7AZVmR54dQ8geSQYo4MiWrsf3RDfA2+8FAUNhLfjI+6d6js1uuVJceHJI hP4efZ7R7gdHPczodQGZ5OPyp8PXCEtC/dqOCBawwZattJ1HL44h0H4eEpqFTOrygIIFg4cjxssoB JmTGCQYIzXRzSYqeQjWzLrG8m9wtSXk8sxjj6v3e5xtA4T506OijjRfDQjfOjiwYqXGVP9XveAHqQ lvV2psPa8Qfvy6d2UeeP5erKunfNoB0HrCfzYJvEvSAN6G1jadVr2cO/xf8+Lrk5jANmSrlikc9DL T5mNwFtO37ZPar2g3AnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTfcq-00DJE3-TF; Fri, 24 Sep 2021 07:28:06 +0000 Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTfcl-00DJB5-7K for linux-arm-kernel@lists.infradead.org; Fri, 24 Sep 2021 07:28:00 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 7DF7E580F3A; Fri, 24 Sep 2021 03:27:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 24 Sep 2021 03:27:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=8ZUo02dZnGgFgfTeHndvB1x9MZ FJLT3D0GdIhBkBwqA=; b=Y7HfydDhDQlpA2UMLzUWZfR9q/1FwmMmDq7lXQwMc8 Vgush16WBed+1oEkjplnln/mJdYgRMx3iOOM8vt/MQeKRZrCVBtFJox+pBbm8iBP 0A7qgR8a5Wm8W3TwOD9z9/lVOYrqexvHXL81aU+c8ssytbgOa+kh1/wi2eG6Toa3 5iGsNkhUZ37tYo8k10GghgLE4yQPA+06d/1IrDOdTi0e/c+s6U3A6FnQOVU0Pv1r PfodwK0OHsgyb+rrQNxK83j/rcUiztW+vIWAXZRFuw6V2SXWzBaF54ftEZ0uwR/Y so3L6XLkuqoHg5F1VcTvD3wZX6+IuFKz6AaETl7+5n0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=8ZUo02dZnGgFgfTeH ndvB1x9MZFJLT3D0GdIhBkBwqA=; b=gPDpXF0YPJrqzAyjmx9B2GRxgd0RDhHoH 7JSGftdgB8x7MHaLCjQNwD95rh1IQplQO6cuwNDiqGMZ3QKl+GLKs2b5ciRcqfKD p1Lg6ggkTsMySaq11gnGPxPS12VJjZustHPl2Rl8AQCYZsyEerJGH3u+bzUVRDZr IawP40+7oLEHjBQdAj4/0NAJKath8rxPrI9Ne9d+DZZVNi9q+sJMgn4GzxA87QVI /FvHfHZ2+/n96G9vkJa2xdJVUG2/C9sAbih8PSjY/Je5PHB5HfuycwLT5UbxPERZ elC+SxzvSLER2t/FeabxIEDGbIakNtTyumiditzM3sHfeVINcD0NA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejtddguddujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeejffehuddvvddvlefhgeelleffgfeijedvhefgieejtdeiueetjeetfeeukeej geenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Sep 2021 03:27:58 -0400 (EDT) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , =?utf-8?q?Jernej_=C5=A0krabec?= , Rob Herring , Frank Rowand Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev, "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Linus Walleij , Rob Herring Subject: [RESEND v2 1/4] dt-bindings: bluetooth: broadcom: Fix clocks check Date: Fri, 24 Sep 2021 09:27:53 +0200 Message-Id: <20210924072756.869731-1-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210924_002759_374853_0E21F722 X-CRM114-Status: GOOD ( 15.32 ) 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: netdev@vger.kernel.org Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- .../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