Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1266026pxf; Fri, 26 Mar 2021 04:45:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVEval+oVzbrG004H0JEa5CbYRiGyOntf6Mc6IWN8/7L8kCfvD9eqpTmwCaJVWgh53drPZ X-Received: by 2002:a17:906:a86:: with SMTP id y6mr15127604ejf.354.1616759137589; Fri, 26 Mar 2021 04:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616759137; cv=none; d=google.com; s=arc-20160816; b=qj4FuFndKatvg5kVCHBukqdjIb7PFT7dzPE8q/yWBIgdLyTHKJhxYk1ogS30p+Qqgl aI7XbkTkponsiANe53l9ScHDx4wda5Fd6AFiDj4Yp2c38yWy+y7mDwjnvBPn1kqIQcce EI4qaC22rywYlwdgy+6+Oh9cW2k1XXso/a8N9pXVcA4EN3n1dY56oP/PkLK4lbRN/IrJ B6abACeX+lLn+6YmRDZeNNWkey3CFoyaraXZHBqyRsOKmIAJyVfc9ayvaqgnlo4CHShr WvK2Ib+QYEssOndOPfefTcuTE3VH754xfqrFwPMPmekCDvQ4qFX3Hp/nP0F5qF0JbpCx S3UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=z+ymJSzw3ln9nUitY5At2Wj8e4yU6qkv/jQhmBCnIRk=; b=sKB53yhkdjzsPjBIY2hXQB0bv17WibQ7G0qdUgEHV+GYe1TfzNn6JB951Goh/p0FL4 M+kcy5wb4ykmTL0LNVW5GOQjY8akxK6A/i/biXcW22JM4feNALXoFwNlKxXX2/75PYQY rvswJ74/aPqT4kAaGcI44x/vSDEFTbStiniHzvlgSz23MzD2iGCA3SMbYkmY+CxS3tkx qII/TItN7GCw1DR8XqlL84ZzqWWMEztc2TP4/he/rya/4of/d9DYq8obCL2Swxf2ktG8 IdvKLonYPAcwYGQLXM9tcWdqPo4IPcv2fvRyj/lpHLtGCI9PESKPhOPAZApSsZnFVwhf W1Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Lg5VsvvS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si7131185edf.499.2021.03.26.04.45.12; Fri, 26 Mar 2021 04:45:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Lg5VsvvS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229604AbhCZLnz (ORCPT + 99 others); Fri, 26 Mar 2021 07:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbhCZLnb (ORCPT ); Fri, 26 Mar 2021 07:43:31 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D96AC0613AA; Fri, 26 Mar 2021 04:43:31 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id h10so5913715edt.13; Fri, 26 Mar 2021 04:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=z+ymJSzw3ln9nUitY5At2Wj8e4yU6qkv/jQhmBCnIRk=; b=Lg5VsvvSMZwrY0AX0IIYoKWiFzGfqNcvuplWclN9n72qraY5rgU8AKSdarVfDUrzhY 7kAL/vhh5vARC1DBWCrp7ie6vv4ja3HsUhqbNCUnL8h8swmoUH44H2LoIF5SeLCqNquj JHclq6jCJ6QDf4DPWQoEA46J7gQtcXosCIqgdEyOUaR4GExnmC3AnAHL2IfUQgpZiyCT 6o5PZ3CnOt9oHHcgk4w76HLus1bpVpYeWQrRQ2iSYfFLurrgVsKhqjbptkilYrzylvvv gCeIGFGbQQglQPnitZTlmTUzh5slv+mW/MDSHlBDOCIWDqIm6A0uuv40tNqt/GauU/zd y27Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=z+ymJSzw3ln9nUitY5At2Wj8e4yU6qkv/jQhmBCnIRk=; b=dT9rvVm7tNWCQNiPO/vXjnEvt/kCCIhOJMHQnszC00IokedjB2aA58sq8fbaKlc5vX x/yVVqLbWEXq/awRbWRY1E8QAIUE90smEsUPInkrLr7Y+8MGA6JD/5SVr1BHIPS/QeCs m9k0mp3UxZnW7b7+QRcoI6yfrd8u5DfpRUGoTom11uBeZojvykvlPnJRbuNG4SXJVs4h UoHdynIOlG2TXhuOhKL0jgK6d+uruBCOzb5eiaZ82NVVU5ci6AEfW8T4YCIIh2/i4cam OvLG2jmaeVcVUrW2Y595tfzX4fu2ChBln1r/nlKiCnKgeqo4qscQesa2VmguI8hx9KnE SMuA== X-Gm-Message-State: AOAM5331AzosQgsZMnkKB5vFSrt+MfOfviJCwC7k9/Lvf6xjfXVHFw88 72VyrUZms0OF3aGrypyRWVk= X-Received: by 2002:aa7:c903:: with SMTP id b3mr14486867edt.156.1616759009626; Fri, 26 Mar 2021 04:43:29 -0700 (PDT) Received: from [192.168.2.2] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id q2sm3750836eje.24.2021.03.26.04.43.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Mar 2021 04:43:29 -0700 (PDT) Subject: Re: [PATCH v6 09/11] dt-bindings: power: rockchip: Convert to json-schema To: Elaine Zhang , robh+dt@kernel.org, heiko@sntech.de Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, cl@rock-chips.com, huangtao@rock-chips.com, kever.yang@rock-chips.com, tony.xie@rock-chips.com, finley.xiao@rock-chips.com References: <20210326102738.14767-1-zhangqing@rock-chips.com> <20210326103036.15173-1-zhangqing@rock-chips.com> From: Johan Jonker Message-ID: Date: Fri, 26 Mar 2021 12:43:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20210326103036.15173-1-zhangqing@rock-chips.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Elaine, You've changed the license ones again. Could someone advise about GPL2.0 and legal stuff here? On 3/26/21 11:30 AM, Elaine Zhang wrote: > Convert the soc/rockchip/power_domain.txt binding document to > json-schema and move to the power bindings directory. > > Signed-off-by: Elaine Zhang > From: Enric Balletbo i Serra Is this the correct position for that? > Link:https://patchwork.kernel.org/project/linux-rockchip/patch/20210225102643.653095-1-enric.balletbo@collabora.com/ Normally the original author of a patch should be honored with help of this command below: git commit --amend --author="Enric Balletbo i Serra " This places a "From: ...." on top of the commit message. But this is still a conversion/restyle to YAML. Meanwhile various other authors in the past have made contributions/comments to this document as well that was GPL2.0 only at the time. (I'm just saying: Claiming to be the only author sounds a bit strange here) Johan > --- > .../power/rockchip,power-controller.yaml | 291 ++++++++++++++++++ > .../bindings/soc/rockchip/power_domain.txt | 136 -------- > 2 files changed, 291 insertions(+), 136 deletions(-) > create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml > delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt > > diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml > new file mode 100644 > index 000000000000..9fec9e227432 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml > @@ -0,0 +1,291 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause This is a conversion of an excising document. When distributing derived works, the source code of the work must be made available under the same license. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Rockchip Power Domains > + > +maintainers: > + - Elaine Zhang > + - Heiko Stuebner > + > +description: | > + Rockchip processors include support for multiple power domains which can be > + powered up/down by software based on different application scenarios to save power. > + > + Power domains contained within power-controller node are generic power domain > + providers documented in Documentation/devicetree/bindings/power/power-domain.yaml. > + > + IP cores belonging to a power domain should contain a "power-domains" > + property that is a phandle for the power domain node representing the domain. > + > +properties: > + $nodename: > + const: power-controller > + > + compatible: > + enum: > + - rockchip,px30-power-controller > + - rockchip,rk3036-power-controller > + - rockchip,rk3066-power-controller > + - rockchip,rk3128-power-controller > + - rockchip,rk3188-power-controller > + - rockchip,rk3228-power-controller > + - rockchip,rk3288-power-controller > + - rockchip,rk3328-power-controller > + - rockchip,rk3366-power-controller > + - rockchip,rk3368-power-controller > + - rockchip,rk3399-power-controller > + > + "#power-domain-cells": > + const: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + clocks: true > + > + assigned-clocks: > + minItems: 1 > + > + assigned-clock-parents: > + minItems: 1 > + > +patternProperties: > + "^power-domain@[0-9a-f]+$": > + type: object > + description: | > + Represents the power domains within the power controller node as documented > + in Documentation/devicetree/bindings/power/power-domain.yaml. > + > + properties: > + > + "#power-domain-cells": > + description: > + Must be 0 for nodes representing a single PM domain and 1 for nodes > + providing multiple PM domains. > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + reg: > + maxItems: 1 > + description: | > + Power domain index. Valid values are defined in > + "include/dt-bindings/power/px30-power.h" > + "include/dt-bindings/power/rk3036-power.h" > + "include/dt-bindings/power/rk3066-power.h" > + "include/dt-bindings/power/rk3128-power.h" > + "include/dt-bindings/power/rk3188-power.h" > + "include/dt-bindings/power/rk3228-power.h" > + "include/dt-bindings/power/rk3288-power.h" > + "include/dt-bindings/power/rk3328-power.h" > + "include/dt-bindings/power/rk3366-power.h" > + "include/dt-bindings/power/rk3368-power.h" > + "include/dt-bindings/power/rk3399-power.h" > + > + clocks: > + description: | > + A number of phandles to clocks that need to be enabled while power domain > + switches state. > + > + pm_qos: > + description: | > + A number of phandles to qos blocks which need to be saved and restored > + while power domain switches state. > + > + patternProperties: > + "^power-domain@[0-9a-f]+$": > + type: object > + description: | > + Represents a power domain child within a power domain parent node. > + > + properties: > + > + "#power-domain-cells": > + description: > + Must be 0 for nodes representing a single PM domain and 1 for nodes > + providing multiple PM domains. > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + reg: > + maxItems: 1 > + > + clocks: > + description: | > + A number of phandles to clocks that need to be enabled while power domain > + switches state. > + > + pm_qos: > + description: | > + A number of phandles to qos blocks which need to be saved and restored > + while power domain switches state. > + > + patternProperties: > + "^power-domain@[0-9a-f]+$": > + type: object > + description: | > + Represents a power domain child within a power domain parent node. > + > + properties: > + > + "#power-domain-cells": > + description: > + Must be 0 for nodes representing a single PM domain and 1 for nodes > + providing multiple PM domains. > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + reg: > + maxItems: 1 > + > + clocks: > + description: | > + A number of phandles to clocks that need to be enabled while power domain > + switches state. > + > + pm_qos: > + description: | > + A number of phandles to qos blocks which need to be saved and restored > + while power domain switches state. > + > + required: > + - reg > + > + additionalProperties: false > + > + required: > + - reg > + > + additionalProperties: false > + > + required: > + - reg > + > + additionalProperties: false > + > +required: > + - compatible > + - "#power-domain-cells" > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + soc { > + #address-cells = <2>; > + #size-cells = <2>; > + > + qos_hdcp: qos@ffa90000 { > + compatible = "rockchip,rk3399-qos", "syscon"; > + reg = <0x0 0xffa90000 0x0 0x20>; > + }; > + > + qos_iep: qos@ffa98000 { > + compatible = "rockchip,rk3399-qos", "syscon"; > + reg = <0x0 0xffa98000 0x0 0x20>; > + }; > + > + qos_rga_r: qos@ffab0000 { > + compatible = "rockchip,rk3399-qos", "syscon"; > + reg = <0x0 0xffab0000 0x0 0x20>; > + }; > + > + qos_rga_w: qos@ffab0080 { > + compatible = "rockchip,rk3399-qos", "syscon"; > + reg = <0x0 0xffab0080 0x0 0x20>; > + }; > + > + qos_video_m0: qos@ffab8000 { > + compatible = "rockchip,rk3399-qos", "syscon"; > + reg = <0x0 0xffab8000 0x0 0x20>; > + }; > + > + qos_video_m1_r: qos@ffac0000 { > + compatible = "rockchip,rk3399-qos", "syscon"; > + reg = <0x0 0xffac0000 0x0 0x20>; > + }; > + > + qos_video_m1_w: qos@ffac0080 { > + compatible = "rockchip,rk3399-qos", "syscon"; > + reg = <0x0 0xffac0080 0x0 0x20>; > + }; > + > + power-management@ff310000 { > + compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd"; > + reg = <0x0 0xff310000 0x0 0x1000>; > + > + power-controller { > + compatible = "rockchip,rk3399-power-controller"; > + #power-domain-cells = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + /* These power domains are grouped by VD_CENTER */ > + power-domain@RK3399_PD_IEP { > + reg = ; > + clocks = <&cru ACLK_IEP>, > + <&cru HCLK_IEP>; > + pm_qos = <&qos_iep>; > + #power-domain-cells = <0>; > + }; > + power-domain@RK3399_PD_RGA { > + reg = ; > + clocks = <&cru ACLK_RGA>, > + <&cru HCLK_RGA>; > + pm_qos = <&qos_rga_r>, > + <&qos_rga_w>; > + #power-domain-cells = <0>; > + }; > + power-domain@RK3399_PD_VCODEC { > + reg = ; > + clocks = <&cru ACLK_VCODEC>, > + <&cru HCLK_VCODEC>; > + pm_qos = <&qos_video_m0>; > + #power-domain-cells = <0>; > + }; > + power-domain@RK3399_PD_VDU { > + reg = ; > + clocks = <&cru ACLK_VDU>, > + <&cru HCLK_VDU>; > + pm_qos = <&qos_video_m1_r>, > + <&qos_video_m1_w>; > + #power-domain-cells = <0>; > + }; > + power-domain@RK3399_PD_VIO { > + reg = ; > + #power-domain-cells = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + power-domain@RK3399_PD_HDCP { > + reg = ; > + clocks = <&cru ACLK_HDCP>, > + <&cru HCLK_HDCP>, > + <&cru PCLK_HDCP>; > + pm_qos = <&qos_hdcp>; > + #power-domain-cells = <0>; > + }; > + }; > + }; > + }; > + }; > diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt > deleted file mode 100644 > index 8304eceb62e4..000000000000 > --- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt > +++ /dev/null > @@ -1,136 +0,0 @@ > -* Rockchip Power Domains > - > -Rockchip processors include support for multiple power domains which can be > -powered up/down by software based on different application scenes to save power. > - > -Required properties for power domain controller: > -- compatible: Should be one of the following. > - "rockchip,px30-power-controller" - for PX30 SoCs. > - "rockchip,rk3036-power-controller" - for RK3036 SoCs. > - "rockchip,rk3066-power-controller" - for RK3066 SoCs. > - "rockchip,rk3128-power-controller" - for RK3128 SoCs. > - "rockchip,rk3188-power-controller" - for RK3188 SoCs. > - "rockchip,rk3228-power-controller" - for RK3228 SoCs. > - "rockchip,rk3288-power-controller" - for RK3288 SoCs. > - "rockchip,rk3328-power-controller" - for RK3328 SoCs. > - "rockchip,rk3366-power-controller" - for RK3366 SoCs. > - "rockchip,rk3368-power-controller" - for RK3368 SoCs. > - "rockchip,rk3399-power-controller" - for RK3399 SoCs. > -- #power-domain-cells: Number of cells in a power-domain specifier. > - Should be 1 for multiple PM domains. > -- #address-cells: Should be 1. > -- #size-cells: Should be 0. > - > -Required properties for power domain sub nodes: > -- reg: index of the power domain, should use macros in: > - "include/dt-bindings/power/px30-power.h" - for PX30 type power domain. > - "include/dt-bindings/power/rk3036-power.h" - for RK3036 type power domain. > - "include/dt-bindings/power/rk3066-power.h" - for RK3066 type power domain. > - "include/dt-bindings/power/rk3128-power.h" - for RK3128 type power domain. > - "include/dt-bindings/power/rk3188-power.h" - for RK3188 type power domain. > - "include/dt-bindings/power/rk3228-power.h" - for RK3228 type power domain. > - "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain. > - "include/dt-bindings/power/rk3328-power.h" - for RK3328 type power domain. > - "include/dt-bindings/power/rk3366-power.h" - for RK3366 type power domain. > - "include/dt-bindings/power/rk3368-power.h" - for RK3368 type power domain. > - "include/dt-bindings/power/rk3399-power.h" - for RK3399 type power domain. > -- clocks (optional): phandles to clocks which need to be enabled while power domain > - switches state. > -- pm_qos (optional): phandles to qos blocks which need to be saved and restored > - while power domain switches state. > - > -Qos Example: > - > - qos_gpu: qos_gpu@ffaf0000 { > - compatible ="syscon"; > - reg = <0x0 0xffaf0000 0x0 0x20>; > - }; > - > -Example: > - > - power: power-controller { > - compatible = "rockchip,rk3288-power-controller"; > - #power-domain-cells = <1>; > - #address-cells = <1>; > - #size-cells = <0>; > - > - pd_gpu { > - reg = ; > - clocks = <&cru ACLK_GPU>; > - pm_qos = <&qos_gpu>; > - }; > - }; > - > - power: power-controller { > - compatible = "rockchip,rk3368-power-controller"; > - #power-domain-cells = <1>; > - #address-cells = <1>; > - #size-cells = <0>; > - > - pd_gpu_1 { > - reg = ; > - clocks = <&cru ACLK_GPU_CFG>; > - }; > - }; > - > -Example 2: > - power: power-controller { > - compatible = "rockchip,rk3399-power-controller"; > - #power-domain-cells = <1>; > - #address-cells = <1>; > - #size-cells = <0>; > - > - pd_vio { > - #address-cells = <1>; > - #size-cells = <0>; > - reg = ; > - > - pd_vo { > - #address-cells = <1>; > - #size-cells = <0>; > - reg = ; > - > - pd_vopb { > - reg = ; > - }; > - > - pd_vopl { > - reg = ; > - }; > - }; > - }; > - }; > - > -Node of a device using power domains must have a power-domains property, > -containing a phandle to the power device node and an index specifying which > -power domain to use. > -The index should use macros in: > - "include/dt-bindings/power/px30-power.h" - for px30 type power domain. > - "include/dt-bindings/power/rk3036-power.h" - for rk3036 type power domain. > - "include/dt-bindings/power/rk3128-power.h" - for rk3128 type power domain. > - "include/dt-bindings/power/rk3128-power.h" - for rk3228 type power domain. > - "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain. > - "include/dt-bindings/power/rk3328-power.h" - for rk3328 type power domain. > - "include/dt-bindings/power/rk3366-power.h" - for rk3366 type power domain. > - "include/dt-bindings/power/rk3368-power.h" - for rk3368 type power domain. > - "include/dt-bindings/power/rk3399-power.h" - for rk3399 type power domain. > - > -Example of the node using power domain: > - > - node { > - /* ... */ > - power-domains = <&power RK3288_PD_GPU>; > - /* ... */ > - }; > - > - node { > - /* ... */ > - power-domains = <&power RK3368_PD_GPU_1>; > - /* ... */ > - }; > - > - node { > - /* ... */ > - power-domains = <&power RK3399_PD_VOPB>; > - /* ... */ > - }; >