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.2 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,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_SANE_2 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 C2028C433B4 for ; Fri, 16 Apr 2021 03:56:44 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 3A7326101B for ; Fri, 16 Apr 2021 03:56:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A7326101B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Date:CC:To:From: Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nGJmU+zWYdCjtvIBHvdvWI1jvT6R+QjmtvWJMKGUUwI=; b=gN4/IvvWsT/gKMtbptfvwlpb9 mKxttXR0gFzbpNSRkslc8TK68GzfaPlNBVyI3Biifq+1tzOAra9CDWf0fp7/VYAWhuVs55HGWBhOj DtwdyN1m5mfiH1Me3UwDrseEhHi7N2QkUyU1ZwsyaV5PUt0oH4kAx11g5Q5++djwWBJTpaXqB79Ky fhF0m94AV4jfF8w6O8t/qrwjW3IxaVVdY+XlFSTb/1i2P3bV8BBdXxuOWpmpNCsCts/Z/7wNyh7NV ZtManzrpBG3A2ZBBYTVspHJ2HEVU9dQzrn3k1omfogJvikEIoa72lTncKj3o6u8YsETIsDWqoEP1e bt3FCOyyQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXFYp-000glm-Or; Fri, 16 Apr 2021 03:54:27 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXFYk-000gky-V2; Fri, 16 Apr 2021 03:54:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=NDHFGcF3B1jg010RNKdlQbBkhOaYGmBmo6W0xffwExI=; b=I5cKMo/XdHAZq5OlhiY1NkljKV WnCw09mNnCofy3VldxoIT67O76vyqqudzpbG0op2UPlnlJN3iV0bBjIlvII6Gt+1N3wdvZeURaKK4 H0Plrl/yhX04sNXEa8ZRs6hsqYruipH82FldxhGE/oHP/ylxg6hgDVyAxpebdbk/3/xou0837PaQN CRsh9chLLlcFTeytweyjEL0ahwsXpnsqnQgcyHkLifnk642JqpnBfC0vr63Oyu5p10wANZ4FJ3kUC oWYp0OjFvoBrKMsjZQVa3Uhee6tnN0gLaVP6lUbCXVO3VygTWR7M3hbsnkkFJ9UV42tnrIhODN5c1 O3w4OXfg==; Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXFYh-0093tZ-1G; Fri, 16 Apr 2021 03:54:21 +0000 X-UUID: 6ec0353d4dad44999b6627b1c4743a44-20210415 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=NDHFGcF3B1jg010RNKdlQbBkhOaYGmBmo6W0xffwExI=; b=KOfBYwZAH/4s8EboFVTNasZe9Z/dHfIhDpfG3fYnG9Zf6qFFBPFonO9l6mjHynXIvPdiqyjzi2kc/DeSyfw0uVM7MiQx0UhtzayJ0GNNO4QRu6gegrrXO/Io5zbW0afPTylx5c5BTr3minyKNRZKCxPr8KAhzDwc8bf6Yz7I7Jw=; X-UUID: 6ec0353d4dad44999b6627b1c4743a44-20210415 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 283086904; Thu, 15 Apr 2021 20:54:17 -0700 Received: from MTKMBS02N2.mediatek.inc (172.21.101.101) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 15 Apr 2021 20:54:16 -0700 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 16 Apr 2021 11:54:07 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 16 Apr 2021 11:54:07 +0800 Message-ID: <1618545247.1478.21.camel@mtksdccf07> Subject: Re: [PATCH v2 4/7] dt-bindings: soc: mediatek: apusys: Add new document for APU power domain From: Flora Fu To: Rob Herring CC: Matthias Brugger , Michael Turquette , Stephen Boyd , Liam Girdwood , Mark Brown , Pi-Cheng Chen , Chiawen Lee , Chun-Jie Chen , , , , , , Date: Fri, 16 Apr 2021 11:54:07 +0800 In-Reply-To: <20210415152500.GA1424680@robh.at.kernel.org> References: <1618465960-3013-1-git-send-email-flora.fu@mediatek.com> <1618465960-3013-5-git-send-email-flora.fu@mediatek.com> <20210415152500.GA1424680@robh.at.kernel.org> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-TM-SNTS-SMTP: D0E2C189EE26BC0DE04A52CF893FE75B3723BC096B505982667A1212E4CA59372000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210415_205419_105157_6D0274FA X-CRM114-Status: GOOD ( 31.57 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 2021-04-15 at 10:25 -0500, Rob Herring wrote: > On Thu, Apr 15, 2021 at 01:52:37PM +0800, Flora Fu wrote: > > Document the bindings for APU power domain on MediaTek SoC. > > > > Signed-off-by: Flora Fu > > --- > > Note: > > This patch depends on MT8192 clock[1] patches which haven't yet been accepted. > > [1] https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/patch/20210324104110.13383-7-chun-jie.chen@mediatek.com/__;!!CTRNKA9wMg0ARbw!zINTC3jweo4_C2yxqf9kHaxAXhO-k-I_JplIY4OQ390IeSfk5QCR4ojmFz2gPbBV$ > > --- > > .../soc/mediatek/mediatek,apu-pm.yaml | 145 ++++++++++++++++++ > > 1 file changed, 145 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,apu-pm.yaml > > > > diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,apu-pm.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,apu-pm.yaml > > new file mode 100644 > > index 000000000000..6ff966920917 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,apu-pm.yaml > > @@ -0,0 +1,145 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: https://urldefense.com/v3/__http://devicetree.org/schemas/soc/mediatek/mediatek,apu-pm.yaml*__;Iw!!CTRNKA9wMg0ARbw!zINTC3jweo4_C2yxqf9kHaxAXhO-k-I_JplIY4OQ390IeSfk5QCR4ojmF_yHpQUx$ > > +$schema: https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!zINTC3jweo4_C2yxqf9kHaxAXhO-k-I_JplIY4OQ390IeSfk5QCR4ojmFy1L2FzU$ > > + > > +title: Mediatek APU Power Domains > > + > > +maintainers: > > + - Flora Fu > > + > > +description: | > > + Mediatek AI Process Unit (APU) include support for power domains which can be > > + powered up/down by software. > > + APU subsys belonging to a power domain should contain a 'power-domains' > > + property that is a phandle for apuspm node representing the domain. > > + > > +properties: > > + compatible: > > + items: > > + - enum: > > + - mediatek,mt8192-apu-pm > > + - const: syscon > > + > > + reg: > > + description: Address range of the APU power domain controller. > > + maxItems: 1 > > + > > + '#address-cells': > > + const: 1 > > + > > + '#size-cells': > > + const: 0 > > + > > + '#power-domain-cells': > > + const: 1 > > + > > + vsram-supply: > > + description: apu sram regulator supply. > > + > > + mediatek,scpsys: > > + $ref: /schemas/types.yaml#/definitions/phandle > > + description: | > > + phandle to the device containing the scpsys register range. > > + > > + mediatek,apu-conn: > > + $ref: /schemas/types.yaml#/definitions/phandle > > + description: | > > + phandle to the device containing the scpsys apu conn register range. > > + > > + mediatek,apu-conn1: > > + $ref: /schemas/types.yaml#/definitions/phandle > > + description: | > > + phandle to the device containing the scpsys apu conn1 register range. > > + > > + mediatek,apu-vcore: > > + $ref: /schemas/types.yaml#/definitions/phandle > > + description: | > > + phandle to the device containing the scpsys apu vcore register range. > > + > > +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: > > + reg: > > + description: | > > + Power domain index. Valid values are defined in: > > + "include/dt-bindings/power/mt8182-apu-power.h" > > + maxItems: 1 > > + > > + '#power-domain-cells': > > + description: | > > + Must be 0 for nodes representing a single PM domain and 1 for nodes > > + providing multiple PM. > > + > > + clocks: > > + description: | > > + List of phandles of clocks list. Specify by order according to > > + power-up sequence. > > + > > + clock-names: > > + description: | > > + List of names of clocks. Specify by order according to power-up > > + sequence. > > + > > + assigned-clocks: > > + maxItems: 2 > > + > > + assigned-clock-parents: > > + maxItems: 2 > > + > > + domain-supply: > > + description: domain regulator supply. > > + > > + required: > > + - reg > > + - '#power-domain-cells' > > + > > + additionalProperties: false > > + > > +required: > > + - compatible > > + - reg > > + - '#power-domain-cells' > > + - vsram-supply > > + - mediatek,scpsys > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include > > + apuspm: power-domain@190f0000 { > > + compatible = "mediatek,mt8192-apu-pm", "syscon"; > > + reg = <0x190f0000 0x1000>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + #power-domain-cells = <1>; > > So you have domains provided by this node and then... > > > + vsram-supply = <&mt6359_vsram_md_ldo_reg>; > > + mediatek,scpsys = <&scpsys>; > > + mediatek,apu-conn = <&apu_conn>; > > + mediatek,apu-vcore = <&apu_vcore>; > > + > > + apu_top: power-domain@0 { > > + reg = <0>; > > + #power-domain-cells = <0>; > > ...each child node provides a domain. What's the difference? The hardware @190f0000 have controller for several child power domains in apu subsys and now only one domain (apu_top) is exposed to mt8192 kernel. For the software extension purpose, the driver parses child nodes even if it has only one child. In previous v1 patch, I add a domain id index in a header file but it seems not necessary to create a standalone file for the case. So I just set the index in the device tree but keep dts structure to present hardware design. > > > + clocks = <&topckgen CLK_TOP_DSP_SEL>, > > + <&topckgen CLK_TOP_IPU_IF_SEL>, > > + <&clk26m>, > > + <&topckgen CLK_TOP_UNIVPLL_D6_D2>; > > + clock-names = "clk_top_conn", > > + "clk_top_ipu_if", > > + "clk_off", > > + "clk_on_default"; > > + assigned-clocks = <&topckgen CLK_TOP_DSP_SEL>, > > + <&topckgen CLK_TOP_IPU_IF_SEL>; > > + assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D6_D2>, > > + <&topckgen CLK_TOP_UNIVPLL_D6_D2>; > > + domain-supply = <&mt6359_vproc1_buck_reg>; > > + }; > > + }; > > -- > > 2.18.0 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel