Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3651702pxb; Fri, 4 Feb 2022 13:18:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZYknqmDMLBC+KkBrcV5vpFa0kBog/TPjrzgcpczIfAJjaZowq1R9UJpR4zNjRxrXj2jKE X-Received: by 2002:a17:902:c9c2:: with SMTP id q2mr5279745pld.18.1644009510329; Fri, 04 Feb 2022 13:18:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644009510; cv=none; d=google.com; s=arc-20160816; b=wv8YqOxuh/TZF5LdOMHjMdbLkDDIZBquSI0q24ncffbLIzbCocKKmvTiPd2bJgdZrb yG8AnNnn8n/CsIM/ud9vupyDcdFGOsA/EQi3IabbWHpr4NvN032Dasq7O0tia6SuMJpk 2IIVw7fYgq3plz9Gury6ffS1UE7VGbwrQcvEvlypXHukVEwN83g94Z0Xr67ihRyeCRjs a4S6hQghEF5mbN5qYu+ugwOIzUOW8IFnO/KX/vNafM27aC9+FzW+KHUyDgld9hbThscb 8Jjb4CgM4Ju94XrwEdYSPWj6ZK79tN9RQiZxroUGVpYx8+4B01d2csCwoxpnIw0XGwJb i20g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=E70LwbaAzc8/ZE2v9lMrvMphV1O+HQEQseRRz7cwEvg=; b=stCvE9Q5PSFQ6JlBV8ujVJE/cxgji+zLvHdvkbPT0HUhBkgchcuT0m83OzVIiIrxt2 R1z4KIiqx0/suwl7ZILlrl32jT3q2/MNwFv6A7e1i7bUuGTfJffjkivyrFVPMUEwrCP1 hc+TmXAbCzxdSq9v1LdzemsY7gS7WGylNTuFseluOnVScIoNWSDe9+VEO2jXPxgeKz41 uc4eK/3pvy6eCHo28HXLK1S9MsN1Y7OUeaS7LtoK76M5TMD67wVGB5wnTD37dkJTTWXQ 1TVRdU2FM4f89b+GvLjHG4RwT67fg7s6Q69qxFMsJ87ME6M9Z0gG4wjxhE+sYql2ONQY 1UxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d70si2996097pgc.182.2022.02.04.13.18.18; Fri, 04 Feb 2022 13:18:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349369AbiBCHji (ORCPT + 99 others); Thu, 3 Feb 2022 02:39:38 -0500 Received: from muru.com ([72.249.23.125]:45812 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230204AbiBCHjh (ORCPT ); Thu, 3 Feb 2022 02:39:37 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 411DD80EE; Thu, 3 Feb 2022 07:39:21 +0000 (UTC) From: Tony Lindgren To: linux-kernel@vger.kernel.org Cc: Rob Herring , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org, Tero Kristo Subject: [PATCHv2] dt-bindings: clock: Add binding for TI clksel Date: Thu, 3 Feb 2022 09:39:29 +0200 Message-Id: <20220203073929.59296-1-tony@atomide.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to prepare for fixing lots of devicetree unique_unit_address warnings for the TI clock nodes, let's add a binding for the TI clksel clocks. This allows us to move the overlapping reg properties for the component clocks to be children of the related clksel nodes. And with that we need the reg property only for the parent clksel node making the reg property unique like it should be. We want to set #clock-cells = <2> in case we ever start parsing ranges of clkcsel instances directly using a clksel driver rather than using the existing component clock drivers and child nodes. And before the devicetree files can be updated, we need to update the TI clock drivers to get the IO address from the parent clksel node. Cc: Tero Kristo Signed-off-by: Tony Lindgren --- Changes since V1: - Set additionalProperties to type object as suggested by Rob - Changed #clock-cells to 2 for parsing ranges of clksel instances - Updated patch description for more info on why this is needed .../bindings/clock/ti/ti,clksel.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml diff --git a/Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml b/Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml new file mode 100644 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/ti/ti,clksel.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Binding for TI clksel clock + +maintainers: + - Tony Lindgren + +description: | + The TI CLKSEL clocks consist of consist of input clock mux bits, and in some + cases also has divider, multiplier and gate bits. + +properties: + compatible: + const: ti,clksel + + reg: + maxItems: 1 + description: The CLKSEL register range + + '#address-cells': + enum: [ 0, 1, 2 ] + + '#size-cells': + enum: [ 0, 1, 2 ] + + ranges: true + + "#clock-cells": + const: 2 + description: The CLKSEL register and bit offset + +required: + - compatible + - reg + - "#clock-cells" + +additionalProperties: + type: object + +examples: + - | + clksel_gfx_fclk: clock@52c { + compatible = "ti,clksel"; + reg = <0x25c 0x4>; + #clock-cells = <2>; + }; +... -- 2.35.1