Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2509859rdd; Fri, 12 Jan 2024 11:35:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IF76I+/v0c5ds9oEKFGl8wJUz0SVImwSfe6f222twCm1xNcRI+8cZzMdwQF61ryUX74JVjZ X-Received: by 2002:a05:6402:2303:b0:558:f5d2:addb with SMTP id l3-20020a056402230300b00558f5d2addbmr4937eda.56.1705088149336; Fri, 12 Jan 2024 11:35:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705088149; cv=none; d=google.com; s=arc-20160816; b=TqEhwyFpTN3lTxSdzijZ0+5X6HhlsWPgkFAV1bVSuIXI4drHYKRclaqfyLTXVNSjWd cbrwHn9R4hNXiwmfIMe3+QcdO/1zyFoaK+fIwG3wUmmqkmLwoPtaPv/rUhIHPmmjGDTm eTr2BpKDc02Lque5ehHeNaYFnogh5BndID6GV+qJuAGDrxFbe3Na50m/DEV4KDJrdFnr VtHFLRT3081HEn6/quzAtNYnmnyb8mZXcPQ7RRkIbd6nhP3SMP1LUCepSat90twO4rA2 FVAuUHuccnEbaf2jg5ugjYZyktEI79VqaVDJYI7S8JGB/20frjG8/hDb9x6Vk9APgxHN YZlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=j7IwvYEPmaSHyWVulXMha0dJbxFMc8lO+ii/l4e0nSY=; fh=XQ7yx8U16fVxk6YY9ta/qyy/SKDkcTfr/Wilv2hUx5M=; b=b5Wm91H7uI09nE1lpTES5ZQgzW9TTHdQ8UrauI8iCPhwXQKbPjJXdjSOohX9eeEfCM +h416Lf/x/z7dVA+xK7N9jzDamdJubCzMGnmGSxX+msAr0398UrNmgnFeN4NdSCaY9+4 ijzdd5/yh7mtgUW9nOZOKV2JOroiPe7E0HZtJcHW90nv13XvdatlCXu8BJ6an+mlqGu0 zDx3lcFM6O00rXymsrw3BR70MzfhPHwctUDX1lgNm+wyIHYWVwY8DE1KLOVSqGXJwZYz F6uyVFG7H0OKtK2LRgodPWSPlHXL1SDxo5LjbLaG40Hb/pYUsB0gqIr0/B/D8qVjHGyk fGqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=HT+iXscA; spf=pass (google.com: domain of linux-kernel+bounces-25002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25002-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h5-20020a0564020e0500b005541fd5ea35si1691106edh.338.2024.01.12.11.35.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 11:35:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=HT+iXscA; spf=pass (google.com: domain of linux-kernel+bounces-25002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25002-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 109A21F24E15 for ; Fri, 12 Jan 2024 19:35:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72D1F15E9C; Fri, 12 Jan 2024 19:35:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="HT+iXscA" Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D31215E98 for ; Fri, 12 Jan 2024 19:35:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-7831386ee01so672630385a.3 for ; Fri, 12 Jan 2024 11:35:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1705088139; x=1705692939; darn=vger.kernel.org; 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=j7IwvYEPmaSHyWVulXMha0dJbxFMc8lO+ii/l4e0nSY=; b=HT+iXscAX/vrZbRA3+pLZAzUEht3XwTpHbLCbV/4wQ2o9+JJXxKL17sqjmLFD0y0dR Z4QVCnsbQAt4gmDLZ3YUJXd6n2DklHBkHKPqtD12vRRn2lMQC5kJHnaZk//IjchRwvJL /PE7MxLXBqnlZzbbkxJiimyDRLuGmj2wXHdu4zcr9fj41eIJVkoxr8TwDC5epRH7wv/T f7dOY/fJaoUxBcTyMT+BZL2K8JCjdXL/0m+6SBXZhO7zvJEhXbpnQ8RmyK9cG70uxiNl ONmVtgzA8rz2e5KxPr0Re2zWrSVIw3GqmBSlM+NRZ40Bi2SKJJoAehkF7ieVOZkf200R 2xcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705088139; x=1705692939; 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=j7IwvYEPmaSHyWVulXMha0dJbxFMc8lO+ii/l4e0nSY=; b=FyrIGz3HKLHIhIINGcjCrWge8DP41G1RCX9jYobZZ2VLXSrfco9c3SvWMw/QRgxbkU sU+YqnMVI55LMZICGvEOm8plhQoVehnTiX8mbfVONMpYWlAerJTIQ+eZAe8fl+t5Aq3Z vTw79l56RCmnC87cdMzcXwAJwx//nf9XGILETgfrF8QIXJoy0JftvOdjYxCY3/AyZ5Gl Z2CrhckvifkJUI+LRttaUz6WdRvm86/E51uyUih3WvZHnQ+0Ikwhieez59HubSlUkCME hZu+s2F6AliPncUrPfmarxPMJvvl59i1a9Rs7uxSqy28k96vUDAhvOUFD+i/XdCoyyDM ry6g== X-Gm-Message-State: AOJu0Yz+cEPqeamXc3Ko/BuW7bOVNgO4YfK/EkQDAZXhSjmq13hGiBcD gP9o/PhhTyHxLyAmqB0BZZTVUamnW24JZA== X-Received: by 2002:a05:620a:2a08:b0:783:4a3f:cb9b with SMTP id o8-20020a05620a2a0800b007834a3fcb9bmr1551707qkp.146.1705088139195; Fri, 12 Jan 2024 11:35:39 -0800 (PST) Received: from [100.64.0.1] ([170.85.8.192]) by smtp.gmail.com with ESMTPSA id oo18-20020a05620a531200b0078190599d4dsm1279999qkn.39.2024.01.12.11.35.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Jan 2024 11:35:38 -0800 (PST) Message-ID: Date: Fri, 12 Jan 2024 13:35:36 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 2/4] dt-bindings: clock: sophgo: support SG2042 Content-Language: en-US To: Conor Dooley , Chen Wang 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: Samuel Holland In-Reply-To: <20240111-jolly-prize-930931cc648a@spud> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Regards, Samuel