From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (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 7937039A05D for ; Tue, 9 Jun 2026 10:02:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780999360; cv=none; b=LdoCwgTxPShbfdcjjRbZs3TFcaoJIGLfOVtGU6fYlNoE6TplrHL9xYREj5jTwZXkDnHJA3vaSiQ3chtp3N4DBAD+CDYabtuOfoiaJ5EpBVcFhkWm4TrdB8CoHbaQS6LbvZSO2/ZqxyrRnR+WhFMHcVGB25NU5VEpQHPgSbhS4NA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780999360; c=relaxed/simple; bh=gdAUuZofKnrle2BTgBTbnsod5CATJdUinz3qgrlBraY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nUSygga9ZGrha9dHjnEB0RWTbL9k/m3B7AtN75aId2r2LDIBHCFQ0CeVsW7vzm2UEjdfeQRBl8frKKPnG97gByTRoPStr3vuVQ+uu9+62CH7W2XYjQ+Om0H29+bxU10KGbFZg38Vl9WPMsJgeWrTr7E82JiMsj25m9+KUnoW/6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=cwoSlbi6; arc=none smtp.client-ip=209.85.208.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cwoSlbi6" Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-68c5eecdd56so7934535a12.3 for ; Tue, 09 Jun 2026 03:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780999357; x=1781604157; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=6z/t2eDlRmRAKpgcgdbz/fpbtWYE2knoiu/ZUm5WZLo=; b=cwoSlbi6O1TAQue0nVfqqpsulcyQFaoA2Z9nHkkiDFG222n9xTangDpOsGtOEOKdQk 0TrZT8uB++lWdeFw3AVxpimAVcXxtbSgjGdAo3eLcrIVr7cSkV0ArFFmUD4CC9YVRuhQ ocMtpDgHg1GsVpK9V3nCuhOo8J7pSrbRgtLfHJ3ai4a9fMpX2a/CESNz2CQ578jYFoen l1GToe3gvNycu/aD1ykqYgP118xiiqCzN7zK95Nj8lL8m963b863mRrlqcplY++2+Rek Amjyiij3PT1/QoKJXKzEIuQupWDORuNAdbeULZ0K0rpbcM4I5zxe4bWWjlEf4yk1IQi6 gNTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780999357; x=1781604157; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6z/t2eDlRmRAKpgcgdbz/fpbtWYE2knoiu/ZUm5WZLo=; b=F+u/0dpuU+A3D0RsuFlgkkXKKxiW8DQsJSXV6CQZb/62TBMrt/ctA5IeCfAEJEWhCV frdhq0ZFdro+DpWN9En/Rq+8aRintkDbyTsTSjhb0RXB9anB3vtaj83xHiVK6CVusBJ/ maMzJm3YI0wMyD2o0ZzFPOV2GS0Sbtv5EbGzkJblKf5ADxA8rt5JJo/hZbVLdGx1qQDU gVdyQS3YPfhoBdXXlZfR7C0o8GPhTB96T9oSOtfdEHLWCHQumyRGsAQ6cMehG/hWCQH8 XBmILBZFHC1n3ssVeW9ZU5Z9KCXECZObfCBoFluvgDLqbIJkv4vnb570syGAhTvYgeJm F4Sg== X-Forwarded-Encrypted: i=1; AFNElJ9iP+V9Xnui2UcB1rTcxGPS3lVBe+bdnT1Jq+V/wWJ32H7nW3vkuF+KbiSJ37jLTUsOU2kP+eIkmmBKY/Y=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3URBEUvcgvGlsmLvxWrfsHmx69/zyzXkAVLPIFdIqalnJEb85 mciSZzQJNtpEMDVVaCrwCZQXQeGQD7zxx47qFjTTLwiNtZrWk69JEOYFNIgpaqCn5vY= X-Gm-Gg: Acq92OEgEw8WUV1l3Cn+1np3vHr7DPXp/KQVLRAeu9YbsqOynYzBn4tYqC47Mk6AJ4k gtaHI/qUJM35mgftOQcBbTDx0iFp8lwniSyTEkZu4TyNIusMStNKRZvzWBw/LiitFxU3swGRUPo pyS/lGypU5E5sM9agzjX9nL7giUc4/JCzpXeX3J/GqxUTLtZ5R9wy5ECBaSMg6YfIEzEbjimeRC 1Vuy012Bjwm68Znou59pRpc2lUSy55WkuIZRFJXHimR2/pApP5muTIEwQguVKz/QbEsSiDhLFXZ vCSqbJbH1lS8avSjuXpUrpqDiiKF1rHC0M5Iff7w2/e5v800bkzbKB/HYwpwT76F1ARdQVmu0QO N2cTExVLgzXiAdmslxb1kLEsbjupbjaWvy5ppgC/NSCFlcRo11WEkvdz2WIy7ZQImslMR6j//GC tNrbHmuLxoU7zFL9WPxz1aDJ9IVK7209jvx5oN//qcQcwvPQ== X-Received: by 2002:a05:6402:1914:b0:68f:c62d:b36e with SMTP id 4fb4d7f45d1cf-68fc62db44emr8021823a12.28.1780999356589; Tue, 09 Jun 2026 03:02:36 -0700 (PDT) Received: from linaro.org ([2a02:2454:ff23:4410:919a:5e38:ea48:32e9]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-68e65b55d81sm8461678a12.27.2026.06.09.03.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 03:02:36 -0700 (PDT) Date: Tue, 9 Jun 2026 12:02:30 +0200 From: Stephan Gerhold To: Miquel Raynal Cc: Konrad Dybcio , Krzysztof Kozlowski , Manivannan Sadhasivam , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-mtd@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] dt-bindings: mtd: qcom,nandc: Add MDM9607 QPIC NAND controller Message-ID: References: <20260608-qcom-nandc-mdm9607-v1-0-4639a0492274@linaro.org> <20260608-qcom-nandc-mdm9607-v1-1-4639a0492274@linaro.org> <20260609-quirky-rat-of-criticism-aea1fe@quoll> <87mrx4b164.fsf@bootlin.com> <35c7513b-6aea-48cf-aea8-da8604616601@oss.qualcomm.com> <87o6hk9i29.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o6hk9i29.fsf@bootlin.com> On Tue, Jun 09, 2026 at 11:30:54AM +0200, Miquel Raynal wrote: > On 09/06/2026 at 11:08:03 +02, Stephan Gerhold wrote: > > > On Tue, Jun 09, 2026 at 11:01:18AM +0200, Konrad Dybcio wrote: > >> On 6/9/26 10:55 AM, Konrad Dybcio wrote: > >> > On 6/9/26 10:10 AM, Stephan Gerhold wrote: > >> >> On Tue, Jun 09, 2026 at 09:52:51AM +0200, Miquel Raynal wrote: > >> >>>>> On MDM9607, there is only a single controllable clock for the NAND > >> >>>>> controller (RPM_SMD_QPIC_CLK). The same situation also applies e.g. for > >> >>>>> qcom,sdx55-nand, but the corresponding device tree (qcom-sdx55.dtsi) works > >> >>>>> around that by assigning a dummy clock (&nand_clk_dummy) to the second > >> >>>>> clock ("aon") that is required by the dt-bindings. This is not really > >> >>>>> useful, so avoid doing that for new platforms by excluding the second "aon" > >> >>>>> clock entry in the dt-bindings. > >> >>>> > >> >>>> Reviewed-by: Krzysztof Kozlowski > >> >>> > >> >>> What is the problem in giving twice the same clock? If this is what is > >> >>> done in the hardware routing, I do not see the reason for more > >> >>> complexity in the binding? > >> >>> > >> >> > >> >> I had that in my first draft for this series, but this would be wrong > >> >> IMO. I suspect there is no QPIC/NAND related "aon" (always-on) clock on > >> >> this platform at all. I'm not sure about MDM9607 in particular (maybe > >> >> someone from Qualcomm can confirm), but a similar platform I was looking > >> >> into at some point actually had *3* separate clocks for QPIC in the > >> >> hardware and none of them were called "aon" ... > >> > > >> > gcc_qpic_ahb_clk (50/100/133.(3) MHz sourced from PCNoC_bfdcd_clk_src) > >> > gcc_qpic_clk (likewise, sourced from qpic_clk_src which is sourced > >> > from GPLLs) > >> > gcc_qpic_system_clk (32 KHz) > >> > > >> > No clock containing the substring 'aon' in its name on this platform > >> > >> Looking at SDX65, perhaps the 32 Khz clock is the "aon" one after all.. > >> The NAND documentation says > >> > >> CC_QPIC_SYSTEM_CLK - Always-on timeout clock (32 KHz) > >> > > > > Thanks for looking this up. > > > > IMO, if we want to describe the actual hardware routing, we should > > describe all 3 clocks and assign all of them to RPM_SMD_QPIC_CLK for > > MDM9607). > > Sounds more accurate to me. > > > The resulting diff would be basically the same as this patch just > > inversed (3 clocks for MDM9607+SDX(?) and 2 clocks for the IPQ* SoCs. > > Diff would not be simpler but more accurate. So if we go for a > modification of the bindings, I would prefer that path. > IMO the result wouldn't be much more accurate from the perspective of the kernel. If we assign RPM_SMD_QPIC_CLK to all 3 clocks we would be effectively saying "there is a single clock with a single rate that is sourcing 'core', 'ahb' and 'system'(/'aon')". But in reality, these are 3 separate clock domains with separate rates, as shown by Konrad above. We could try defining dummy clocks like the &nand_clk_dummy in qcom-sdx55.dtsi, but this isn't very accurate either. Presumably, all of these clocks are toggled by RPM_SMD_QPIC_CLK. So if we define a dummy clock for 'ahb', then enabling that clock without also enabling the non-dummy 'core' (RPM_SMD_QPIC_CLK) will do nothing. At the end, the truth for the OS/kernel running on this hardware is that it can only see the 'core' clock (with the option to change its rate). All others are invisible, with no way to influence or check the status, so pretending that we have separate resources for them doesn't really make things more accurate in my opinion. But yeah, let's leave the decision up to Krzysztof. I'm happy to change this patch as needed as long it works at the end. :-) Thanks, Stephan