From mboxrd@z Thu Jan 1 00:00:00 1970 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 3953BC4320A for ; Sun, 25 Jul 2021 18:27:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1EB5560F23 for ; Sun, 25 Jul 2021 18:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230507AbhGYRqs (ORCPT ); Sun, 25 Jul 2021 13:46:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbhGYRqr (ORCPT ); Sun, 25 Jul 2021 13:46:47 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9749C061757 for ; Sun, 25 Jul 2021 11:27:16 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id x15so8295784oic.9 for ; Sun, 25 Jul 2021 11:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=tjZy0yxM4bICaX53nnUwJplVpr2U4hx6m3PxNQuPd3g=; b=WQeC84A+geBcNAHWJpZASnDakrpxpr1k50gczrFr+YSl4puCRmr1IL0MLrdOIVu/4v aG8xU1hV3ZvJH29DLuCUywYnaC49kPcy3exkYOczdxBqFgJiWgLzu1iziKu/7y25orTT JX9RztS5VzvMING7wAanV2xp0C9NVQ4U5kZ1mTlWPqWw2U2M1+L2xgRYjOkctMdBxJ9j cSciDSBzJGZv0szPOjzpPfylXH2STON80QZSz7uhQI6PE4in/CG4RV7itiHc9I9DPOZu gkgCMWGvub2kRzuqfGotCdmt2gGJeCJ7IoEpI4mBd0CQ23CkPKF94Rt+nIjVRE3oS8eF fZJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=tjZy0yxM4bICaX53nnUwJplVpr2U4hx6m3PxNQuPd3g=; b=I/Hqwo9U0oDKDnKXLnUK+F6mjEheCM3UfO9if1MS7/luA5vN1AK2wTVgA+3lU2XIoS dhILezykWsX61m8uuvSLZum/8xTL318gT/255CkkABZPzd3VVzk5Czo9wPuT9nVpuowM K9EXGi9xt1T3L5PGn/6HYgujzAY0zJiDRsYexePZBEuCelsQJ0efogrxGpTPX9wThPfI 0cVKLANeqQUgOvXgtrzBUaKSQZzm9GZ5yHtOL0yeNIda2UIClmO3GA2L8aWK++xNfIth 93KDYVeGbm8kHYLQnUHQcpB6NlmdeQFYnJD/C6PztDacc76wxKLhwUOmMe5L+qW8ooFE 8RAA== X-Gm-Message-State: AOAM5332qBYvGQAh97LakKeB1qwRyx0V6WR8PG3GN9p/d0ulCaiZs3pa g9Qmcmw0X9J9OLpZFH3szsRnAw== X-Google-Smtp-Source: ABdhPJwQHdnbIWUHBriC4kZkOhE6fOKo+sw2FqC+WTLU5+JDvcFE4VlXDjDOiGdqxSTKeWIQ+4ro0g== X-Received: by 2002:aca:1802:: with SMTP id h2mr14390070oih.146.1627237636142; Sun, 25 Jul 2021 11:27:16 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id u7sm2263004oop.11.2021.07.25.11.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 11:27:15 -0700 (PDT) Date: Sun, 25 Jul 2021 13:27:13 -0500 From: Bjorn Andersson To: Baruch Siach , Rob Herring Cc: Thierry Reding , Uwe Kleine-K?nig , Lee Jones , Andy Gross , Balaji Prakash J , Robert Marko , Kathiravan T , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 3/4] dt-bindings: pwm: add IPQ6018 binding Message-ID: References: <889aae1b88f120cb6281919d27164a959fbe69d0.1626948070.git.baruch@tkos.co.il> <70f0522a9394e9da2f31871442d47f6ad0ff41aa.1626948070.git.baruch@tkos.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <70f0522a9394e9da2f31871442d47f6ad0ff41aa.1626948070.git.baruch@tkos.co.il> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu 22 Jul 05:01 CDT 2021, Baruch Siach wrote: > DT binding for the PWM block in Qualcomm IPQ6018 SoC. > > Signed-off-by: Baruch Siach > --- > v6: > > Device node is child of TCSR; remove phandle (Rob Herring) > > Add assigned-clocks/assigned-clock-rates (Uwe Kleine-König) > > v5: Use qcom,pwm-regs for phandle instead of direct regs (Bjorn > Andersson, Kathiravan T) > > v4: Update the binding example node as well (Rob Herring's bot) > > v3: s/qcom,pwm-ipq6018/qcom,ipq6018-pwm/ (Rob Herring) > > v2: Make #pwm-cells const (Rob Herring) > --- > .../devicetree/bindings/pwm/ipq-pwm.yaml | 69 +++++++++++++++++++ > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/ipq-pwm.yaml > > diff --git a/Documentation/devicetree/bindings/pwm/ipq-pwm.yaml b/Documentation/devicetree/bindings/pwm/ipq-pwm.yaml > new file mode 100644 > index 000000000000..ee2bb03a1223 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/ipq-pwm.yaml > @@ -0,0 +1,69 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/ipq-pwm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm IPQ6018 PWM controller > + > +maintainers: > + - Baruch Siach > + > +properties: > + "#pwm-cells": > + const: 2 > + > + compatible: > + const: qcom,ipq6018-pwm > + > + offset: > + description: | '|' maintains the formatting of the text, you don't need that. > + Offset of PWM register in the TCSR block. > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + clock-names: > + const: core With a single clock, it's nice to skip the -names. > + > + assigned-clocks: > + maxItems: 1 > + > + assigned-clock-rates: > + maxItems: 1 These (assigned-*) are generic properties that may be used on a lot of nodes, should they really be part of the individual binding, Rob? > + > +required: > + - "#pwm-cells" > + - compatible > + - clocks > + - clock-names > + - assigned-clocks > + - assigned-clock-rates > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + soc { > + #address-cells = <2>; > + #size-cells = <2>; > + Skip soc and *-cells... > + tcsr: syscon@1937000 { > + compatible = "syscon", "simple-mfd"; > + reg = <0x0 0x01937000 0x0 0x21000>; > + ..and just make this "reg = <0x01937000 0x21000>", in the example. Then as we put this in the particular dts we adjust for whatever *-cells that has defined for the parent bus. > + pwm: pwm { > + #pwm-cells = <2>; I know it's important that this is a pwm thing, but I would prefer to see the node start with compatible, offset/reg, clocks. And then end with whatever is exposed (i.e. #pwm-cells) Regards, Bjorn > + compatible = "qcom,ipq6018-pwm"; > + offset = <0xa010>; > + clocks = <&gcc GCC_ADSS_PWM_CLK>; > + clock-names = "core"; > + assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>; > + assigned-clock-rates = <100000000>; > + status = "disabled"; > + }; > + }; > + }; > -- > 2.30.2 > From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.5 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 autolearn=ham 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 AC9A5C4338F for ; Sun, 25 Jul 2021 18:29:04 +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 53B8960F23 for ; Sun, 25 Jul 2021 18:29:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 53B8960F23 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u0P7J4RNZUuOtkb/u8vqJKH8t3TaKO7l/AOlAq72/hs=; b=r5mlnicdQFNZv0 /GWQtVwI/tsxtTopkPZjZgm6gvNIoMAONQYySW3x3oBAJMsSdo+KrErnk4kOSEUDeZ2bV/6EHR8AQ 0YhrdYgswDFWnhzDF/N0O5rmfRVsG5f9dmXdBKHDw95HUUSK2Us+/7UJO31d42oV1V4bsG7K8WFKF zPt5Xepg9Cbyr/1ZekjAG2GGDNGPeu/tYoBozRWT6fhKCtxYs8/nH8iQRTIC0jFe8Exa0U2W1gbo4 FlCKSp16Pbsba0PX+gVj+g3wJzddV7tS4L56oZT6tbtk4z6PeAAjjJ9ZpZ7ewKjszvGCXZkiTcPMY Vn5eADvDNJj1lvE5QLPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7iqQ-0090kr-PK; Sun, 25 Jul 2021 18:27:22 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7iqM-0090kE-2L for linux-arm-kernel@lists.infradead.org; Sun, 25 Jul 2021 18:27:19 +0000 Received: by mail-oi1-x22a.google.com with SMTP id a19so8307544oiw.6 for ; Sun, 25 Jul 2021 11:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=tjZy0yxM4bICaX53nnUwJplVpr2U4hx6m3PxNQuPd3g=; b=WQeC84A+geBcNAHWJpZASnDakrpxpr1k50gczrFr+YSl4puCRmr1IL0MLrdOIVu/4v aG8xU1hV3ZvJH29DLuCUywYnaC49kPcy3exkYOczdxBqFgJiWgLzu1iziKu/7y25orTT JX9RztS5VzvMING7wAanV2xp0C9NVQ4U5kZ1mTlWPqWw2U2M1+L2xgRYjOkctMdBxJ9j cSciDSBzJGZv0szPOjzpPfylXH2STON80QZSz7uhQI6PE4in/CG4RV7itiHc9I9DPOZu gkgCMWGvub2kRzuqfGotCdmt2gGJeCJ7IoEpI4mBd0CQ23CkPKF94Rt+nIjVRE3oS8eF fZJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=tjZy0yxM4bICaX53nnUwJplVpr2U4hx6m3PxNQuPd3g=; b=lZOWfURCHF77f0q7gvAxmdHMPsY+cahggBUBvQ444HqrZ3/ITYKXb0AHDkgHGBCf7J TdO6kCqztufFcZhFUTTQ8u28xQptJptdQjM1MC9rlizJKQjvJqpQCtoegaJluRWJPAiQ GUGf2H5cv99ge0Y1YbqRzFuWRgV5VNthgh6Bi/poDTbw51p6Q1/5T4bylGxphdX3k2X9 fb72YpokENJ7NlMjBoT4Fagka3mKUO07jZXttkvyd4olqOgPK9NR/esL2UnfGoNdbLP0 TLrDcMlrmEBQqWzLMXEPc9Zi93fqoK6atvUCwDqbe1xgIbc/GkKD9z8X3Ix0H7h8x7aW jNBQ== X-Gm-Message-State: AOAM5339oqwtHwuwQB01H7i3CHo8/SmoclD0mjDM7Lsc0UhtulIZ5iPZ pyJLmo671j1KQ0wB0ZrhKxVXfg== X-Google-Smtp-Source: ABdhPJwQHdnbIWUHBriC4kZkOhE6fOKo+sw2FqC+WTLU5+JDvcFE4VlXDjDOiGdqxSTKeWIQ+4ro0g== X-Received: by 2002:aca:1802:: with SMTP id h2mr14390070oih.146.1627237636142; Sun, 25 Jul 2021 11:27:16 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id u7sm2263004oop.11.2021.07.25.11.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 11:27:15 -0700 (PDT) Date: Sun, 25 Jul 2021 13:27:13 -0500 From: Bjorn Andersson To: Baruch Siach , Rob Herring Cc: Thierry Reding , Uwe Kleine-K?nig , Lee Jones , Andy Gross , Balaji Prakash J , Robert Marko , Kathiravan T , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 3/4] dt-bindings: pwm: add IPQ6018 binding Message-ID: References: <889aae1b88f120cb6281919d27164a959fbe69d0.1626948070.git.baruch@tkos.co.il> <70f0522a9394e9da2f31871442d47f6ad0ff41aa.1626948070.git.baruch@tkos.co.il> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <70f0522a9394e9da2f31871442d47f6ad0ff41aa.1626948070.git.baruch@tkos.co.il> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210725_112718_219029_3DD4D0F0 X-CRM114-Status: GOOD ( 22.48 ) 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: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu 22 Jul 05:01 CDT 2021, Baruch Siach wrote: > DT binding for the PWM block in Qualcomm IPQ6018 SoC. > = > Signed-off-by: Baruch Siach > --- > v6: > = > Device node is child of TCSR; remove phandle (Rob Herring) > = > Add assigned-clocks/assigned-clock-rates (Uwe Kleine-K=F6nig) > = > v5: Use qcom,pwm-regs for phandle instead of direct regs (Bjorn > Andersson, Kathiravan T) > = > v4: Update the binding example node as well (Rob Herring's bot) > = > v3: s/qcom,pwm-ipq6018/qcom,ipq6018-pwm/ (Rob Herring) > = > v2: Make #pwm-cells const (Rob Herring) > --- > .../devicetree/bindings/pwm/ipq-pwm.yaml | 69 +++++++++++++++++++ > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/ipq-pwm.yaml > = > diff --git a/Documentation/devicetree/bindings/pwm/ipq-pwm.yaml b/Documen= tation/devicetree/bindings/pwm/ipq-pwm.yaml > new file mode 100644 > index 000000000000..ee2bb03a1223 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/ipq-pwm.yaml > @@ -0,0 +1,69 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/ipq-pwm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm IPQ6018 PWM controller > + > +maintainers: > + - Baruch Siach > + > +properties: > + "#pwm-cells": > + const: 2 > + > + compatible: > + const: qcom,ipq6018-pwm > + > + offset: > + description: | '|' maintains the formatting of the text, you don't need that. > + Offset of PWM register in the TCSR block. > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + clock-names: > + const: core With a single clock, it's nice to skip the -names. > + > + assigned-clocks: > + maxItems: 1 > + > + assigned-clock-rates: > + maxItems: 1 These (assigned-*) are generic properties that may be used on a lot of nodes, should they really be part of the individual binding, Rob? > + > +required: > + - "#pwm-cells" > + - compatible > + - clocks > + - clock-names > + - assigned-clocks > + - assigned-clock-rates > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + soc { > + #address-cells =3D <2>; > + #size-cells =3D <2>; > + Skip soc and *-cells... > + tcsr: syscon@1937000 { > + compatible =3D "syscon", "simple-mfd"; > + reg =3D <0x0 0x01937000 0x0 0x21000>; > + ..and just make this "reg =3D <0x01937000 0x21000>", in the example. Then as we put this in the particular dts we adjust for whatever *-cells that has defined for the parent bus. > + pwm: pwm { > + #pwm-cells =3D <2>; I know it's important that this is a pwm thing, but I would prefer to see the node start with compatible, offset/reg, clocks. And then end with whatever is exposed (i.e. #pwm-cells) Regards, Bjorn > + compatible =3D "qcom,ipq6018-pwm"; > + offset =3D <0xa010>; > + clocks =3D <&gcc GCC_ADSS_PWM_CLK>; > + clock-names =3D "core"; > + assigned-clocks =3D <&gcc GCC_ADSS_PWM_CLK>; > + assigned-clock-rates =3D <100000000>; > + status =3D "disabled"; > + }; > + }; > + }; > -- = > 2.30.2 > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel