Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp102607rwr; Wed, 3 May 2023 23:23:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5LLf0PQrJGMKwtISI8aj3D7rY0TteIE6fEKl73lA5BytWOzQ/D1uwz3xRA8vkeyABavNjB X-Received: by 2002:a05:6a00:2352:b0:63f:158a:6e7b with SMTP id j18-20020a056a00235200b0063f158a6e7bmr1722904pfj.6.1683181401273; Wed, 03 May 2023 23:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683181401; cv=none; d=google.com; s=arc-20160816; b=JQUtcOY9c8A3soT1wN1gQPW9SvjbVbv7ariG3Rui+3keToVu0f4q+6z8BR3vndIEKc LOmXtYMpk3El29dvslzBvkZG0Ass6x25Vout9ats6iuqfGzc/8CSGtzlnB7G+bvpn7Gr 5ry791279llZs9BXMKCcZ8VWMGIoGCYZRtUrdLwlvKsTJkxJSwmtsDoKGTVae8nx5eMg LxvOu4C3qxXK2yPUkwR9vThiJNjWZSCTtsPzRWAU7u6UCYLfXjo2TB9C221qMDIQhs2v ysM5AAiXJguocbLnjgMztaEHC/Bp9VnTnTLKpfgZz3eBmzxJR7EjQCIQ6wbgY1xoVkrh YF7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=LR67W3cu8TbdbHHvCQSzQmbTfNOrONMNhQlzXKF5QhY=; b=zG9J4K4mau6L9NFfGakmj4AdNQIB0/fKvYPm7bmdPV1SDfHjho1nemApPYs52AeeVl n61WLlxUO9Zt6JIkffm34twZwOyYdNyhKM6IVhCFq1+qMbafcVtDCpTLOsyrrAPor2qn fkPP6SDQPK4TjrzUGaPc9hNnSqbddvtOgE6tqjkvm/A1pzRiKd984AYufj968X8popuT cWPysaKZFNNThE+1tbc5OQ54c0A+C1Ovgt1Raz9D+P2FNzhad0Dc/9q4HXWpCoqjK/qv DnmN8o6PEuDUbJGbXW1Bsc6a9/+xF3zyvUrckiCVui6jmFbbrTrN3NfOD8zMAO2YWA2Z jzGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="C/inxBvj"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x13-20020aa79acd000000b0063b8a36cbedsi35423728pfp.148.2023.05.03.23.23.08; Wed, 03 May 2023 23:23:21 -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=@linaro.org header.s=google header.b="C/inxBvj"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229502AbjEDGNr (ORCPT + 99 others); Thu, 4 May 2023 02:13:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229598AbjEDGNo (ORCPT ); Thu, 4 May 2023 02:13:44 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57B5B1992 for ; Wed, 3 May 2023 23:13:41 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-50b383222f7so33591a12.3 for ; Wed, 03 May 2023 23:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683180820; x=1685772820; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=LR67W3cu8TbdbHHvCQSzQmbTfNOrONMNhQlzXKF5QhY=; b=C/inxBvjHBKX6ieqG1SKbI5iXHvEGIAYZJ81VWBub4NdV61svnrIu0nxr3RpLn0swe rjArbctnnIy5zRRZt98Mr6T9r/Km0X8LgbmGISWJJWl7MgdobOkBLexzz7MZcggE57iw kd8uRxX2gxAXP6u2fQtsg7eshSojRfGyIBYQXi6VQwf/ZHIh/5/BXAAm5eCZHmun+Ypc K8glI3FPoZTp0lKA5KEB4j+Xu8WZp2EPfkNi3NAssh89TXL9u4olIzEZXpIuEbfKYN5c aoHVqEA7Ju8fvu8c0WE0CnlkJ3RQbFKlov+yUuQGAHQBJBOfEU5Cm+3yRZf/FYqvP/Gp LZdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683180820; x=1685772820; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LR67W3cu8TbdbHHvCQSzQmbTfNOrONMNhQlzXKF5QhY=; b=B3cxukFp89H0OOQRYHVpoAqXzrl6aZgu3X5DFilvM8gsbQ8L/EitowPAYiFaIVc/zH nOMD9lR67ZwBPAE4WuPT2eh6JwcTLFfDBe69oh6B9BJuZIFDb9+yOU6aEhFYQHvRmuEk W81KTLnOeZ7DxvnxkPqRZU9gAsOqf59kJCImnhZZZkuEWSRMuKCDOBIMVwGE8gAcqp0c 5jfmA4wEhBQM1w953SbKICu4mQW1L0e76xwSvRUNI9A+njqN18km9XOfLR4Ijh5ca0+R n10YD3odz6ZjIZDpCvHml3g0/KlR4ZRrDLO4m9/uL+kzknGO0USWTGwBnV9v/WQMLWep HYtQ== X-Gm-Message-State: AC+VfDxsVWw49e3UNAyjNa8ssDCTXbgKyn0YczYum4m0NOPAAQAEz1Ja WVpeWhK3iPuchiWXtFwIAyZacg== X-Received: by 2002:a17:907:60d6:b0:960:c5fe:a35a with SMTP id hv22-20020a17090760d600b00960c5fea35amr6542406ejc.64.1683180819754; Wed, 03 May 2023 23:13:39 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:cbf1:e7ef:fb81:e912? ([2a02:810d:15c0:828:cbf1:e7ef:fb81:e912]) by smtp.gmail.com with ESMTPSA id o19-20020a1709062e9300b0094f281bd279sm18333085eji.198.2023.05.03.23.13.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 May 2023 23:13:38 -0700 (PDT) Message-ID: <3ed72340-accc-4ad1-098f-4a2eb6448828@linaro.org> Date: Thu, 4 May 2023 08:13:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [RESEND v2 1/6] dt-bindings: power: Add JH7110 AON PMU support Content-Language: en-US To: Changhuang Liang , Conor Dooley Cc: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Paul Walmsley , Palmer Dabbelt , Albert Ou , Walker Chen , Hal Feng , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, vkoul@kernel.org, linux-phy@lists.infradead.org References: <20230419-labored-camper-644d51a7ca96@spud> <1a5b15fa-4f20-51c2-2ba1-a04a2911a694@starfivetech.com> <20230424-baffle-punch-ec73098f2b6a@spud> <20230425-unquote-eligible-09f743d81981@wendy> <68cb565d-bf39-10b0-9e3e-35ba7f54b90b@linaro.org> <0988495f-b87a-7f69-f222-37c67d6eae23@starfivetech.com> <20230425-resale-footrest-de667778c4fe@wendy> <663e9933-b9b3-a48f-98b6-2207215a8ed7@starfivetech.com> <20230425-commotion-prewashed-876247bed4ab@spud> <0b0f9187-ad6b-a1d9-6ec4-beb8989ca731@starfivetech.com> From: Krzysztof Kozlowski In-Reply-To: <0b0f9187-ad6b-a1d9-6ec4-beb8989ca731@starfivetech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org On 04/05/2023 03:34, Changhuang Liang wrote: > > > On 2023/4/26 0:56, Conor Dooley wrote: >> On Tue, Apr 25, 2023 at 08:26:35PM +0800, Changhuang Liang wrote: >>> On 2023/4/25 17:35, Conor Dooley wrote: >>>> On Tue, Apr 25, 2023 at 05:18:10PM +0800, Changhuang Liang wrote: >>>>> On 2023/4/25 16:19, Krzysztof Kozlowski wrote: >>>>>> On 25/04/2023 09:57, Changhuang Liang wrote: >>>>>>> Yes, "starfive,jh7110-aon-pmu" is a child-node of "starfive,jh7110-aon-syscon". >>>>>>> In my opinion, "0x17010000" is "aon-syscon" on JH7110 SoC, and this "aon-pmu" is just >>>>>>> a part of "aon-syscon" function, so I think it is inappropriate to make "aon-syscon" >>>>>>> to a power domain controller. I think using the child-node description is closer to >>>>>>> JH7110 SoC. >>>>>> >>>>>> Unfortunately, I do not see the correlation between these, any >>>>>> connection. Why being a child of syscon block would mean that this >>>>>> should no be power domain controller? Really, why? These are two >>>>>> unrelated things. >>>>> >>>>> Let me summarize what has been discussed above. >>>>> >>>>> There has two ways to describe this "starfive,jh7110-aon-syscon"(0x17010000). >>>>> 1. (0x17010000) is power-controller node: >>>>> >>>>> aon_pwrc: power-controller@17010000 { >>>>> compatible = "starfive,jh7110-aon-pmu", "syscon"; >>>>> reg = <0x0 0x17010000 0x0 0x1000>; >>>>> #power-domain-cells = <1>; >>>>> }; >>>>> >>>>> >>>>> 2. (0x17010000) is syscon node, power-controller is child-node of syscon: >>>>> >>>>> aon_syscon: syscon@17010000 { >>>>> compatible = "starfive,jh7110-aon-syscon", "syscon", "simple-mfd"; >>>>> reg = <0x0 0x17010000 0x0 0x1000>; >>>>> >>>>> aon_pwrc: power-controller { >>>>> compatible = "starfive,jh7110-aon-pmu"; >>>>> #power-domain-cells = <1>; >>>>> }; >>>>> }; >>>> >>>> I thought that Rob was suggesting something like this: >>>> aon_syscon: syscon@17010000 { >>>> compatible = "starfive,jh7110-aon-syscon", ... >>>> reg = <0x0 0x17010000 0x0 0x1000>; >>>> #power-domain-cells = <1>; >>>> }; >> >>> I see the kernel: >>> https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/mediatek/mt8167.dtsi >>> this file line 42: >>> it's power-controller also has no meaningful properties. >>> What do you think? >> >> I'm not sure that I follow. It has a bunch of child-nodes does it not, >> each of which is a domain? >> >> I didn't see such domains in your dts patch, they're defined directly in >> the driver instead AFAIU. Assuming I have understood that correctly, >> your situation is different to that mediatek one? >> >> Cheers, >> Conor. > > Conor and Rob, > > How about this way: > > aon_syscon: syscon@17010000 { > compatible = "starfive,jh7110-aon-syscon", "syscon", "simple-mfd"; > reg = <0x0 0x17010000 0x0 0x1000>; > > aon_pwrc: power-controller { > compatible = "starfive,jh7110-aon-pmu"; > regmap = <&aon_syscon>; > #power-domain-cells = <1>; > }; > }; > > Add a "regmap" property which is phandle. And it can keep the present child-node > structure. This is more consistent with our soc design. Adding property from child to parent does not make any sense. Didn't you already receive comment on this? Best regards, Krzysztof