Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6963037ybn; Mon, 30 Sep 2019 06:37:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+vy4z7Nq3JrzGL2ZkrNrAFZPEtNFvE4G7gs9F72px2txsAyTNdN/Fcc7sBV7KjT6zqzFk X-Received: by 2002:aa7:d718:: with SMTP id t24mr19354971edq.300.1569850659517; Mon, 30 Sep 2019 06:37:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569850659; cv=none; d=google.com; s=arc-20160816; b=G2Pb+zl90Vc/5Zk0erkp66Kqo749Ulp5bMDOWOBt6ueQqjFdw3jRKfnZDBQu1ccqnZ ZPf5aLa2V4cnfbLF1h782RCXxAeQRbdgw6CBq4f1G7ywN/H7Fmw1A750OGTFWtIX4RJc 6JVp2AZYyCWQOZFPLHQj8C/c4ExEQsAx7afoh2Heu1dMuC1DnQ/PYLTtFCrNjVTT/6ME rKLHwU6s3eE+IM0IC7d7nHCdu3poAmJ9zxpIx3ARGcOW/vRWgeNuzeCL5ayC5NbhDxGW MBJ1kPxuWBrpWcc+ixhGqa4As54Ml8PVQyuTv/1FPs4CJcqasIoPe5emLzDK2stplif7 vljA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=a9jR1BNKDDZGZvIL5lhodG0XnQTe5HRm6UzcjXJdIrE=; b=D9FPcHlfsp38Dw9mX1DeDAlSgDZhyygqP2WhuwPc57jRT7yMYckaiDBHCkGhH2WTYT hiwgS7BuqIZmAFDQ/ruVFKAWIqrbHZAMbly9KYzkGoHE4SAneDk3UPyIN5XB7FVT/ocB NDSiwNkjp9w7GBZfllbP0Yd2pNM6X93FQV/OBl9TgAN/gwUr/dEySEF73fjVPmJBh9nm HHZ9KxViRNbt+DbFY1h6ZSskbIt5Vlt44hOPXI+G5fGn/hs5ic6gW8wOWuXvzZKqBQdW AN8sIsM1ixTdW5Vqsjn6FaTg03Z2d0rn8U/kRarRN0fAYKCxOQHaHR8uBlpFdyQElgNK LbCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si6678171edq.391.2019.09.30.06.37.14; Mon, 30 Sep 2019 06:37:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731413AbfI3Nfw (ORCPT + 99 others); Mon, 30 Sep 2019 09:35:52 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:41209 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728214AbfI3Nfv (ORCPT ); Mon, 30 Sep 2019 09:35:51 -0400 Received: by mail-oi1-f196.google.com with SMTP id w17so11092680oiw.8; Mon, 30 Sep 2019 06:35:50 -0700 (PDT) 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:in-reply-to:user-agent; bh=a9jR1BNKDDZGZvIL5lhodG0XnQTe5HRm6UzcjXJdIrE=; b=ZD7c2trCFm35L1fJ3YCTdHFNIz4hNjr0XpWFhv6sMWPJmeW9jUypB8uY1phogYFYYR Yxao9vB+AzeCkrlrUWru6uTI0LLRcdF3OKffHhxQi5WVwnLNlOZhFk8WDFdsgqKaXL2Q vQ+j2McWcD6KEnzru760G6bj0fbu/RXrw1pgO5BpiX0xpuybyo+TMEvwQdoT3bMLdstk 0QkNVpc2kDTDRkrGdUsi80FiLA8YWtINJFWLGhJlYL550XcBWnDPHkvk7nAL9pexQ4+D wKg+Nqk2+7u8gYKUuVTSFtMKEwm9DfCYi6l6lswnlUfQ5crYKOgGzJDYOZRTdl9WjloI yqtw== X-Gm-Message-State: APjAAAU3P2tCiM+zB4jDTS3uk+++9DXQF4GSCugrSf4ev3rqUDI7Ywq+ 8VGfvuO2nOnSh1+FhKVZVw== X-Received: by 2002:aca:cf13:: with SMTP id f19mr17629022oig.154.1569850549773; Mon, 30 Sep 2019 06:35:49 -0700 (PDT) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id 11sm3864751otg.62.2019.09.30.06.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 06:35:49 -0700 (PDT) Date: Mon, 30 Sep 2019 08:35:48 -0500 From: Rob Herring To: Roger Lu Cc: Kevin Hilman , Nicolas Boichat , Stephen Boyd , Fan Chen , HenryC Chen , yt.lee@mediatek.com, Angus Lin , Mark Rutland , Matthias Brugger , Nishanth Menon , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v5 1/3] dt-bindings: soc: add mtk svs dt-bindings Message-ID: <20190930133548.GA24574@bogus> References: <20190906100514.30803-1-roger.lu@mediatek.com> <20190906100514.30803-2-roger.lu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190906100514.30803-2-roger.lu@mediatek.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 06, 2019 at 06:05:13PM +0800, Roger Lu wrote: > Document the binding for enabling mtk svs on MediaTek SoC. > > Signed-off-by: Roger Lu > --- > .../devicetree/bindings/power/mtk-svs.txt | 88 +++++++++++++++++++ > 1 file changed, 88 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/mtk-svs.txt > > diff --git a/Documentation/devicetree/bindings/power/mtk-svs.txt b/Documentation/devicetree/bindings/power/mtk-svs.txt > new file mode 100644 > index 000000000000..6a71992ef162 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/mtk-svs.txt > @@ -0,0 +1,88 @@ > +* Mediatek Smart Voltage Scaling (MTK SVS) > + > +This describes the device tree binding for the MTK SVS controller (bank) > +which helps provide the optimized CPU/GPU/CCI voltages. This device also > +needs thermal data to calculate thermal slope for accurately compensate > +the voltages when temperature change. > + > +Required properties: > +- compatible: > + - "mediatek,mt8183-svs" : For MT8183 family of SoCs > +- reg: Address range of the MTK SVS controller. > +- interrupts: IRQ for the MTK SVS controller. > +- clocks, clock-names: Clocks needed for the svs controller. required > + clocks are: > + "main_clk": Main clock needed for register access '_clk' is redundant. > +- nvmem-cells: Phandle to the calibration data provided by a nvmem device. > +- nvmem-cell-names: Should be "svs-calibration-data" and "calibration-data" > + > +Subnodes: > +- svs_cpu_little: SVS bank device node of little CPU > + compatible: "mediatek,mt8183-svs-cpu-little" > + operating-points-v2: OPP table hooked by SVS little CPU bank. > + SVS will optimze this OPP table voltage part. > + vcpu-little-supply: PMIC buck of little CPU > +- svs_cpu_big: SVS bank device node of big CPU > + compatible: "mediatek,mt8183-svs-cpu-big" > + operating-points-v2: OPP table hooked by SVS big CPU bank. > + SVS will optimze this OPP table voltage part. > + vcpu-big-supply: PMIC buck of big CPU > +- svs_cci: SVS bank device node of CCI > + compatible: "mediatek,mt8183-svs-cci" > + operating-points-v2: OPP table hooked by SVS CCI bank. > + SVS will optimze this OPP table voltage part. > + vcci-supply: PMIC buck of CCI > +- svs_gpu: SVS bank device node of GPU > + compatible: "mediatek,mt8183-svs-gpu" > + operating-points-v2: OPP table hooked by SVS GPU bank. > + SVS will optimze this OPP table voltage part. > + vgpu-spply: PMIC buck of GPU > + > +Example: > + > + svs: svs@1100b000 { > + compatible = "mediatek,mt8183-svs"; > + reg = <0 0x1100b000 0 0x1000>; > + interrupts = ; GIC interrupts are 3 cells, you have 4. > + clocks = <&infracfg CLK_INFRA_THERM>; > + clock-names = "main_clk"; > + nvmem-cells = <&svs_calibration>, <&thermal_calibration>; > + nvmem-cell-names = "svs-calibration-data", "calibration-data"; > + > + svs_cpu_little: svs_cpu_little { Don't use '_' in node names. > + compatible = "mediatek,mt8183-svs-cpu-little"; > + operating-points-v2 = <&cluster0_opp>; > + }; > + > + svs_cpu_big: svs_cpu_big { > + compatible = "mediatek,mt8183-svs-cpu-big"; > + operating-points-v2 = <&cluster1_opp>; > + }; > + > + svs_cci: svs_cci { > + compatible = "mediatek,mt8183-svs-cci"; > + operating-points-v2 = <&cci_opp>; > + }; > + > + svs_gpu: svs_gpu { > + compatible = "mediatek,mt8183-svs-gpu"; > + power-domains = <&scpsys MT8183_POWER_DOMAIN_MFG_2D>; > + operating-points-v2 = <&gpu_opp_table>; > + }; > + }; > + > + &svs_cpu_little { > + vcpu-little-supply = <&mt6358_vproc12_reg>; It's already defined to have OPP and supply in the cpu nodes. Parse them to get this information rather than duplicating it here. The same should apply to the CCI and GPU. Rob