Message ID | 20230516184626.154892-2-afd@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp635154vqo; Tue, 16 May 2023 11:50:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CWUAhS+9q2TIJ/V2qRCJ3MRhA6PwSbdk0D4f1yU5lA03SJ1zs+ju8jUu9hp3VqgiSutHR X-Received: by 2002:a17:90a:8186:b0:24e:3e07:9e27 with SMTP id e6-20020a17090a818600b0024e3e079e27mr45151143pjn.10.1684263058892; Tue, 16 May 2023 11:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684263058; cv=none; d=google.com; s=arc-20160816; b=h1xVclT/usC2pGNGro6inix1jmA2khUzyehbujeRNw99z9iH2QVHwlCqHXrfJ62FTz oDVIeILH+jcnD4HwzBBYQc2sajlQUHUrDolXw/jkIk9dBeBS5b3e77czqQ8mI1HjvvlH 5VCEhSqR2enXdSsQdT6x7W9U8oaNUBTbdX4WKlf4yU21PqicFifz8moa+uoCGa6Y3AwY bYlKOTWCaOFFApiMXgTRyRMHdjzGkCs2fSt+Nkn2yXB0sqdfi4OWzX6srbeftKZVMEZv 0ncEY4+yYRWhHOwYVEmK7Mp5+UztAtIaBaZxxfcsKefNu7AxtNeenKYe2CrnQKvUOLz1 UHyQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nNBe5P/DBo3Uk1BRjtGrx8bcwS7/b+ZkZy8oqUawqAo=; b=F1aT+6+AjrwO2huZ3e6LvX5wej1rdtu7dy51su8ZpLY7GLfdwO3JZ5R1aO9XRlSKtR 3+zDFhjbq5pyMmCiILLotbZpzew14JVvymKt4FATUEOB+/GJsDOJr/HAEw818Sh39Uwr CO0ocHGczjVXwPfcRZeILAXZTxq9ngb3rF6M+sGqhpLvNZbeoh5LY36zrPeuEQbJFflT LXIpvOMsZ50eSvFf54azrQIdc9ATxqDw69uxz3urIrBkXSWgUlzaEhK7zVgaa63g5ECx 9h0h572h7XgYSG/ZGDj+dPT4LQ1pTXFIspstXRrJUNaqk3BxOqbbykWhLWC1jUGISBGC CMaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Pj1SqnvE; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s71-20020a63774a000000b0053076900facsi14310447pgc.864.2023.05.16.11.50.46; Tue, 16 May 2023 11:50:58 -0700 (PDT) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Pj1SqnvE; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbjEPSqi (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Tue, 16 May 2023 14:46:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbjEPSqg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 16 May 2023 14:46:36 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FF8A7ED5; Tue, 16 May 2023 11:46:35 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 34GIkShJ101895; Tue, 16 May 2023 13:46:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1684262788; bh=nNBe5P/DBo3Uk1BRjtGrx8bcwS7/b+ZkZy8oqUawqAo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Pj1SqnvECNYa2vLo/1a+QKA6B8qQfLfBqrrVZ4C26GAwMM+lOT5Q2P24BsCk0niX0 rshCmWd3/QPb3bDQSTe7row7Jtik50sjFTVG8KCDh6D7C+wOrgM9dveSbqCgZCg5ea BvJ/bxKJ1DGXHbDIQXcfA1uTFiUXxCgI7on9i4yQ= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 34GIkSY5094765 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 16 May 2023 13:46:28 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 16 May 2023 13:46:28 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 16 May 2023 13:46:28 -0500 Received: from lelv0326.itg.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 34GIkRGP025014; Tue, 16 May 2023 13:46:27 -0500 From: Andrew Davis <afd@ti.com> To: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Vignesh Raghavendra <vigneshr@ti.com> CC: <linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Andrew Davis <afd@ti.com> Subject: [PATCH 2/2] dt-bindings: clock: ehrpwm: Remove unneeded syscon compatible Date: Tue, 16 May 2023 13:46:26 -0500 Message-ID: <20230516184626.154892-2-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516184626.154892-1-afd@ti.com> References: <20230516184626.154892-1-afd@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766077821040050496?= X-GMAIL-MSGID: =?utf-8?q?1766077821040050496?= |
Series |
[1/2] clk: keystone: syscon-clk: Allow the clock node to not be of type syscon
|
|
Commit Message
Andrew Davis
May 16, 2023, 6:46 p.m. UTC
This node's register space is not accessed by any other node, which
is the traditional use for the "syscon" hint. It looks to have been
added here to make use of a Linux kernel helper syscon_node_to_regmap().
The Linux driver now uses a more appropriate helper that does not
require the hint, so let's remove it from the binding.
Signed-off-by: Andrew Davis <afd@ti.com>
---
.../devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Comments
On 17/05/23 00:16, Andrew Davis wrote: > This node's register space is not accessed by any other node, which > is the traditional use for the "syscon" hint. Unfortunately that's not the case across SoCs. Eg AM65x See TRM section Table 5-582. CTRLMMR_EPWM0_CTRL Register Field Descriptions TB_CLKEN is clubbed with SYNCIN_SEL and ePWM tripzone configuration signals which may require register to be shared with other drivers in future > It looks to have been > added here to make use of a Linux kernel helper syscon_node_to_regmap(). > The Linux driver now uses a more appropriate helper that does not > require the hint, so let's remove it from the binding. > > Signed-off-by: Andrew Davis <afd@ti.com> > --- > .../devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml b/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml > index 66765116aff5..64b8bce5962c 100644 > --- a/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml > +++ b/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml > @@ -16,7 +16,6 @@ properties: > - ti,am654-ehrpwm-tbclk > - ti,am64-epwm-tbclk > - ti,am62-epwm-tbclk > - - const: syscon > > "#clock-cells": > const: 1 > @@ -33,8 +32,8 @@ additionalProperties: false > > examples: > - | > - ehrpwm_tbclk: syscon@4140 { > - compatible = "ti,am654-ehrpwm-tbclk", "syscon"; > + ehrpwm_tbclk: clock@4140 { > + compatible = "ti,am654-ehrpwm-tbclk"; > reg = <0x4140 0x18>; > #clock-cells = <1>; > };
On Tue, 16 May 2023 13:46:26 -0500, Andrew Davis wrote: > This node's register space is not accessed by any other node, which > is the traditional use for the "syscon" hint. It looks to have been > added here to make use of a Linux kernel helper syscon_node_to_regmap(). > The Linux driver now uses a more appropriate helper that does not > require the hint, so let's remove it from the binding. > > Signed-off-by: Andrew Davis <afd@ti.com> > --- > .../devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.example.dtb: scm-conf@100000: clock-controller@4140:compatible: ['ti,am654-ehrpwm-tbclk', 'syscon'] is too long From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.example.dtb: clock-controller@4140: compatible: ['ti,am654-ehrpwm-tbclk', 'syscon'] is too long From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml See https://patchwork.ozlabs.org/patch/1782200 This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
On 16/05/2023 20:46, Andrew Davis wrote: > This node's register space is not accessed by any other node, which > is the traditional use for the "syscon" hint. It looks to have been > added here to make use of a Linux kernel helper syscon_node_to_regmap(). > The Linux driver now uses a more appropriate helper that does not > require the hint, so let's remove it from the binding. > > Signed-off-by: Andrew Davis <afd@ti.com> > --- Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On 5/16/23 11:36 PM, Vignesh Raghavendra wrote: > > > On 17/05/23 00:16, Andrew Davis wrote: >> This node's register space is not accessed by any other node, which >> is the traditional use for the "syscon" hint. > > Unfortunately that's not the case across SoCs. Eg AM65x See TRM section > Table 5-582. CTRLMMR_EPWM0_CTRL Register Field Descriptions > Not sure what version of the TRM you have, latest (Rev. E) has this register as Table 5-636.. but I found it and see your point here. > TB_CLKEN is clubbed with SYNCIN_SEL and ePWM tripzone configuration > signals which may require register to be shared with other drivers in future > This looks to only be a problem in AM65x, all later devices we have fixed the issue and now group the clock enable bits all together. Do we actually expect this to be an issue and have a user of these other bits? If so then we modeled this region wrong in AM65x DT, these registers are not "tbclk gate registers" any more then they are to the other functions they provide. These registers should be a syscon node and then each function within should be a child node. syscon@4140 { compatible = "ti,am654-epwm-crtl", "syscon"; reg = <0x4140 0x18>; ehrpwm_tbclk: clock { compatible = "ti,am654-ehrpwm-tbclk"; #clock-cells = <1>; }; pwm_mux: mux-controller { compatible = "mmio-mux"; #mux-control-cells = <1>; }; }; Something like that. That way we do not give preference to one device and have to have it give out shared registers. Either that or split the binding compatible, one for AM65x with syscon and one for all later device compatibles that do not share the register: compatible: oneOf: - items: - const: ti,am654-ehrpwm-tbclk - const: syscon - items: - enum: - ti,am64-epwm-tbclk - ti,am62-epwm-tbclk Would rather the first option. Andrew > >> It looks to have been >> added here to make use of a Linux kernel helper syscon_node_to_regmap(). >> The Linux driver now uses a more appropriate helper that does not >> require the hint, so let's remove it from the binding. >> >> Signed-off-by: Andrew Davis <afd@ti.com> >> --- >> .../devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml b/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml >> index 66765116aff5..64b8bce5962c 100644 >> --- a/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml >> +++ b/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml >> @@ -16,7 +16,6 @@ properties: >> - ti,am654-ehrpwm-tbclk >> - ti,am64-epwm-tbclk >> - ti,am62-epwm-tbclk >> - - const: syscon >> >> "#clock-cells": >> const: 1 >> @@ -33,8 +32,8 @@ additionalProperties: false >> >> examples: >> - | >> - ehrpwm_tbclk: syscon@4140 { >> - compatible = "ti,am654-ehrpwm-tbclk", "syscon"; >> + ehrpwm_tbclk: clock@4140 { >> + compatible = "ti,am654-ehrpwm-tbclk"; >> reg = <0x4140 0x18>; >> #clock-cells = <1>; >> }; >
Quoting Andrew Davis (2023-05-16 11:46:26) > This node's register space is not accessed by any other node, which > is the traditional use for the "syscon" hint. It looks to have been > added here to make use of a Linux kernel helper syscon_node_to_regmap(). > The Linux driver now uses a more appropriate helper that does not > require the hint, so let's remove it from the binding. > > Signed-off-by: Andrew Davis <afd@ti.com> > --- Applied to clk-next
On Wed, May 17, 2023 at 1:53 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On Tue, 16 May 2023 13:46:26 -0500, Andrew Davis wrote: > > This node's register space is not accessed by any other node, which > > is the traditional use for the "syscon" hint. It looks to have been > > added here to make use of a Linux kernel helper syscon_node_to_regmap(). > > The Linux driver now uses a more appropriate helper that does not > > require the hint, so let's remove it from the binding. > > > > Signed-off-by: Andrew Davis <afd@ti.com> > > --- > > .../devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.example.dtb: scm-conf@100000: clock-controller@4140:compatible: ['ti,am654-ehrpwm-tbclk', 'syscon'] is too long > From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.example.dtb: clock-controller@4140: compatible: ['ti,am654-ehrpwm-tbclk', 'syscon'] is too long > From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml Now failing in linux-next. Rob
On 6/23/23 2:59 PM, Rob Herring wrote: > On Wed, May 17, 2023 at 1:53 AM Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On Tue, 16 May 2023 13:46:26 -0500, Andrew Davis wrote: >>> This node's register space is not accessed by any other node, which >>> is the traditional use for the "syscon" hint. It looks to have been >>> added here to make use of a Linux kernel helper syscon_node_to_regmap(). >>> The Linux driver now uses a more appropriate helper that does not >>> require the hint, so let's remove it from the binding. >>> >>> Signed-off-by: Andrew Davis <afd@ti.com> >>> --- >>> .../devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml | 5 ++--- >>> 1 file changed, 2 insertions(+), 3 deletions(-) >>> >> >> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' >> on your patch (DT_CHECKER_FLAGS is new in v5.13): >> >> yamllint warnings/errors: >> >> dtschema/dtc warnings/errors: >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.example.dtb: scm-conf@100000: clock-controller@4140:compatible: ['ti,am654-ehrpwm-tbclk', 'syscon'] is too long >> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.example.dtb: clock-controller@4140: compatible: ['ti,am654-ehrpwm-tbclk', 'syscon'] is too long >> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml > > Now failing in linux-next. > Sent fix: https://lore.kernel.org/lkml/20230623201519.194269-1-afd@ti.com/T/#u Andrew
diff --git a/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml b/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml index 66765116aff5..64b8bce5962c 100644 --- a/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml +++ b/Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml @@ -16,7 +16,6 @@ properties: - ti,am654-ehrpwm-tbclk - ti,am64-epwm-tbclk - ti,am62-epwm-tbclk - - const: syscon "#clock-cells": const: 1 @@ -33,8 +32,8 @@ additionalProperties: false examples: - | - ehrpwm_tbclk: syscon@4140 { - compatible = "ti,am654-ehrpwm-tbclk", "syscon"; + ehrpwm_tbclk: clock@4140 { + compatible = "ti,am654-ehrpwm-tbclk"; reg = <0x4140 0x18>; #clock-cells = <1>; };