Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2644027rdd; Fri, 12 Jan 2024 17:16:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4nFyBBs68BwJvXaYvOo8DwLV7qonJe4h9Rydp0B/CbrVlgoRa5SP/TbTLZ/8to8ZaBeJH X-Received: by 2002:a05:6e02:1a2d:b0:360:869f:75a6 with SMTP id g13-20020a056e021a2d00b00360869f75a6mr2474194ile.106.1705108563909; Fri, 12 Jan 2024 17:16:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705108563; cv=pass; d=google.com; s=arc-20160816; b=nyl5IEf+HF7NaabsU7O9VuU9PwHXjAolFlJdZfrK3L5KtYRABMo966l2yKIkdlG9Pw sSIhDOe3bwEBLDzO7PD8sW5uX4RFbLIAyqH9iAMb2aPeoPDYEVwRzFiLOZDjn7UpnVZD uD2bJDJzYPpbu6OmFHQqnON3YmNZ/IK3oMftWFd4BnDsUe4somB58YBmYjRoHNubms5H 2XGvhMFGBvls+nGu5HUD1p1Lwqu+1RYkT3Tv9S9arxryJlmzR/2RyIS3zqi7eWRdy6y1 RxAiPfat4RDV+1JUa0vGUR1wLLI6yTHAa4g9VozFT1qUNiRCzFPUVIop06mHmw+AHYUL 7Xjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=228Be95lbJRa1auM9J0dbPVjZ3Blb3lC8z/EsqcsUFE=; fh=c73dIbyyGAeOmsxBPpaz0v7qQiqBddaBl4FWNTtSqdw=; b=Q7zIZChRvDYmJmiS0cTu5s6lMUxRKSlGKg28ovmYxzS0tUGJTSlY6T9IjrlWh94BXN ujx1eY8d39tKaRjBDJbfyEkglNcvcAMc6AAZ9zejqYEcZCVvgIC0YdNexBpQ6/JmPnXf ajzCs5vCCJlTwLPZFZ6Xuooo9FgAbHM3SWYkb/i0RNb/8HspVeoYTIlgHWFou2AUBWBq 49pjcUS0L0QJZUiaxz+IQM3TBPhoRYbQJD6SOpY3aFqvDSw8wnz3GylyKwZ6N5NfvTGS 4SiNiCCYSpA9xNJD2CrrT6BJS4XzeDAL1UaLIzuLbJsRwMo7B8OH3SH4i+gjWbpoR3GP 0zMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=FtK45PQz; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-25151-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25151-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t71-20020a63814a000000b005cd8723fab0si4255530pgd.557.2024.01.12.17.16.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 17:16:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25151-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=FtK45PQz; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-25151-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25151-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 87F1E28594C for ; Sat, 13 Jan 2024 01:16:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E61F912E64; Sat, 13 Jan 2024 01:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="FtK45PQz" Received: from IND01-MAX-obe.outbound.protection.outlook.com (mail-maxind01olkn2038.outbound.protection.outlook.com [40.92.102.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 143CC12B79; Sat, 13 Jan 2024 01:15:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bekqavMp9B7N1N3gNc7C/FJPdkocqvto8v758MnPk5Ci6QzpSCTZe2itJcjC7lKK4uwD9cPycxNmxVeIzh1cwNJDCgsChhqJ0c0zJRKA+JeM/+YT9dsfo4sg+1yaDW8e2MGkeSu9fvM1B+HfeEwC8GUDoKm1dlrBMzewhqJCDJiXVlx4iXgcuEcK0rlzIPgLr46TLDn7gQi7O7fP6tKovXA4qZhM4hLmXBhrruR3uHIi8hLovzNc2ZOmbBReH9nPqm3zlPIc/scYn4n6nd7Qq9+WE/GVkZ+2gJKS6aL7RyUSZhRwJo9fc/ex1S7mK2Q77z5GHNgqGFkRmGqBuDsWvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=228Be95lbJRa1auM9J0dbPVjZ3Blb3lC8z/EsqcsUFE=; b=LSAs4Io0l2GWVyC+RWv74StbtmWTj0b9dEd1tSLW/WQcISSi3X+4ymmSuF1Q3ZyxcOSjLH/f1Rp13RG0u6inNwt+cqG7oRjG00iF0lyMKbg1jCzFEEz60DGuUACR3L15QZWKKB1L7T7jzaSFCHvfD36deiBqEEB5wIZf8h/lLFCIp5CeFuKII1Oj4GhVb37i+waypc/IrnLXBZymYW4oVXYZhaboMcJ9vjFUJ7pv68PsMxRatwDomgO4hAzrsIWRcSu8tSvsLHCU1vrnHBILLX3nqf4XzH4LhsABjiL6v4JOu5RLF3JYp0Sk+zQ/2MHN4GaInyHa0Ue5wZaUzXNh+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=228Be95lbJRa1auM9J0dbPVjZ3Blb3lC8z/EsqcsUFE=; b=FtK45PQz8dm1oOjqD6UMiBxcRn68wI8Hl4hV/VMBitnQnAbjiXzoiLUPKa7nnaW1qgBBnaVU4Ziu4wh1n5+t3tPBDAoE/WeZtlQOYu3gP9IJpKSJ0AIj5gTTpDbu4Mn7tDEOvqX5zmYm+dAtpcZ83XcSHSvsy+cYbQ7W6lMMBLd2P5huZR9wuJEEsXwrnyU/GjiUfYeXI9rJlOSVJDDrNQDxbZHAAeqYa/JKgfAychSe2D/XBgNJ6woFXP6X1vmy/OmA6L32agNdxkK4sjAJm1Yz3fzneIm72dTJQsh5f/GeHN36NRUhLYNYyr4zYHPgjU56W2Zg5RcBMgPLWeKmPg== Received: from MA0P287MB2822.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:138::5) by MA0P287MB1180.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:de::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23; Sat, 13 Jan 2024 01:15:47 +0000 Received: from MA0P287MB2822.INDP287.PROD.OUTLOOK.COM ([fe80::6e80:69e1:f2e7:d70d]) by MA0P287MB2822.INDP287.PROD.OUTLOOK.COM ([fe80::6e80:69e1:f2e7:d70d%3]) with mapi id 15.20.7181.022; Sat, 13 Jan 2024 01:15:47 +0000 Message-ID: Date: Sat, 13 Jan 2024 09:15:41 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 2/4] dt-bindings: clock: sophgo: support SG2042 To: Samuel Holland , Conor Dooley Cc: Krzysztof Kozlowski , Chen Wang , aou@eecs.berkeley.edu, chao.wei@sophgo.com, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, palmer@dabbelt.com, paul.walmsley@sifive.com, richardcochran@gmail.com, robh+dt@kernel.org, sboyd@kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, haijiao.liu@sophgo.com, xiaoguang.xing@sophgo.com, guoren@kernel.org, jszhang@kernel.org, inochiama@outlook.com, Conor Dooley References: <925d99d5b4ece01337cb3389aaea4b631894dd1d.1704694903.git.unicorn_wang@outlook.com> <20240110-untoasted-underfed-fe81479506f6@spud> <20240111-jolly-prize-930931cc648a@spud> From: Chen Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TMN: [RhGdYnw04k+M/bkviVPFovx8TvTIEksF] X-ClientProxiedBy: SG2PR03CA0092.apcprd03.prod.outlook.com (2603:1096:4:7c::20) To MA0P287MB2822.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:138::5) X-Microsoft-Original-Message-ID: <8364d287-3aa1-4c3e-ada5-2fc8d95fc2d1@outlook.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MA0P287MB2822:EE_|MA0P287MB1180:EE_ X-MS-Office365-Filtering-Correlation-Id: b226b22f-47dd-46c8-4fa5-08dc13d52afd X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o6gvCE5gprqCmp+yg35b6ycd3hw+YsQtzGFMgeDuIPX0WVsEoZa3oj9J24dUX81yY3i6n5KHz6t6SsgZXOmHiIyx1VvDrzgXEcAtpDIia2lSNY65UA4dHDRZ1sGYpy+6L1AfnMWtAd4+udgRpa3eMvVylKz2Vxcj8bo75w1agdNRosw04fpv0py7DlWDbOI3VS1vFDl8i07uPGs5lOTCJhJJ9b1N1FbI0o6F+J2A3pRqynJj8AQnyyf4FWXk53za3kYJ/DoknpcAeTv4JOV/wvAz1S35avLsKi7lSe7H9jEJon5mwmaYJxp7Nbz/YZKyafn9WnJOpkkhjgJ3Jp7X2fw/YBn9w34izcuGUTOY2mlgUQpuEU3CEQxqzOPjYkzdnwLV/xi7VITUpMNrPWUCwxf49IQVi6c2ILdxhUAMa/avBFgqn9BfXmFXumOR+sWOVLAt3xbL6yNzuAcAxS7y6Wj1QxtvZ7wmlH7EUwS3FuQM4QoOmVh/VjwhuYi6vFYsXe2vda2dpvPAFEmsaQ4ycozyGy1+Ahv0l4Try48CIYEnKyIKkptTXy0u7FL3f754 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VGNLUFE1Q0ZNYXd3clJ5ZGNpTkRodlIwOG5YU1NIV3V0SnBvVHNEUjBHQVZQ?= =?utf-8?B?bFU5NzJHZTJGdUZtREZwWTN3aDlVN0RLU0JqU0owSWhlM25DcTZrbm1lVHlp?= =?utf-8?B?TVV6UDZIM2lyRm1rbGVNbjFmeXJIQXNiYUtQU21qWVNUZkREQkJyRnJ3R0hw?= =?utf-8?B?MllVZmhJQlhMODJDbHNzZkhWZXgzY1czb1J3QmNlMEZDVDJm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N4bzBFRlhyc3hZMDdkM2Jw?= =?utf-8?B?VnpYUnNuWDB3ZGxLSmI0bFlIRXVVTFlWVytma0NxVzBrU0hJSGQrU0hKLzdq?= =?utf-8?B?M0wyWVY4Z002ZFBxeGFUSmdCS0RqdlhleHkvOThNSUZ3bmg0Vi9GSVFtQjh1?= =?utf-8?B?amxWbkQxKy9hUUozL09iMjBvaFhuZmkxUlBYWUpldEV0ak9kSVZUUHFQYm9s?= =?utf-8?B?MmRRZHlnYWNaYXFseVJZaE1aZDZMYzlDcmhucnJqT2o0dWllbHVjNHlBRkx3?= =?utf-8?B?aUM4MVBabUo1ZjBkUmxXMVlDbVFlNmR1MG9ZWlRTY3lDVVF6WnNYUDF6S002?= =?utf-8?B?YXZmMThwUnFWZTJvV201Ky9UNER0QWVyLzkwclpwQ1kwVVd6V0Q1OHZYa3U2?= =?utf-8?B?Nmh6RnMxOVBTS09JQ0JEVHBEMCtQcE1ybzBJT21OZ20rWkRvajlqMSsraW43?= =?utf-8?B?d3BTaC8wSjljbTdzQXdLNWM1WTZKWE13dUU5eUhnOFphOE8wUjdjUFZXSUY1?= =?utf-8?Q?iFvKZtrHuaphVfvLxBARGjHVRts2722JrEd4yQeZ7+/Q=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b226b22f-47dd-46c8-4fa5-08dc13d52afd X-MS-Exchange-CrossTenant-AuthSource: MA0P287MB2822.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2024 01:15:46.9782 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MA0P287MB1180 On 2024/1/13 3:35, Samuel Holland wrote: > Hi Conor, Chen, > > On 2024-01-11 10:58 AM, Conor Dooley wrote: >> On Thu, Jan 11, 2024 at 04:00:04PM +0800, Chen Wang wrote: >>> With this change, we describe the plls defined in system control as pllclk, >>> as a child node of system controller. clkgen will use pllclk as "input" >>> because pll clocks are parent of div clocks . >>> >>> But there is another remaining question about the gate clock. For those gate >>> clocks controlled by CLOCK, no problem we will provide then in clkgen, but >>> for those gate clocks controlled by registers in SYS_CTRL, they are child >>> gate of the "clk_gate_rp_cpu_normal", which is a gate clock provided by >>> clkgen. If I extracted those SYS_CTRL gate clocks and define them in system >>> controller dts node, I may have to use "clk_gate_rp_cpu_normal" as their >>> input, it looks a bit wierd becasue there are cases where each other serves >>> as input. I try to draft below DTS to explan what I meant. I'm not sure if >>> it can work and I'd love to hear your guidance. >> I'm not sure how this sort of circular relationship works for probing >> works either. Stephen etc would know more than me here. > It generally works fine. The common clock framework can handle the child clock > being registered before its parent, even when using a DT (fw_name) reference. > See for example clk_core_fill_parent_index() and > clk_core_reparent_orphans_nolock() in drivers/clk/clk.c Learned and thank you. > > Regards, > Samuel >