Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp535010lqp; Fri, 5 Apr 2024 00:48:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV92I4lMMFCUKNBvMV/X+xvy1z4Ri78BK6bnsVBWeVoS6E0UKrAHvnqH47p2S3nY2N7CLjOTZMJTvn1Ahew+NRHsscR8rXQ64id0dCJMQ== X-Google-Smtp-Source: AGHT+IHv6vT2goh9ZdZo6/NGXE1zb++YB/GwRePDtcMnx+4+gNodUXcRzR6tq2SBQN9UgxQHy+Lt X-Received: by 2002:a05:6870:e813:b0:22a:9d7a:3f4f with SMTP id o19-20020a056870e81300b0022a9d7a3f4fmr753972oan.16.1712303320201; Fri, 05 Apr 2024 00:48:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712303320; cv=pass; d=google.com; s=arc-20160816; b=IaoYUg4bRnqnSvxwj1rbu1LKoe+Pti6fiPgeTX6prx6QlpPpJPHR/4B/C47c1u4waW iqw1G4AeRJCHjkwHbeXf5fy6vH/xdu+cyTis1yjAOSMhUOfdQvPRZHbPU+qVfJfd7CY6 81XO43Ydw/jSU/HpOBvSvz6I0DeOqkrJVVhCgQ4s7Odcu3Pgy3WNIHa4eN5BKZDgVaaI SQD/Eb3JeaX+8b+hHFcjpuW8NhhaVSSLYfer7M96zHj/Nz7nEeX05GVqmKUEY9kk7FFC +szcG1kaBvj32P2L7Wt9Wa36jnPdyVCBHvb4LFvxTIk5Iqwa3jPIO13A0pgr+EaOkkIs RQgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=zYQYHc96aAqkJY4oGXNQ40gKh1E9/vfyHDywYKQqVgk=; fh=GMHzvoCUdWtjJmVwSvTmy+2sL3jsvVO36QECXgIsrC8=; b=xDAvUXs0dja2hHB3PBEbw4qhFE+zLfjLnEA+t99HCaVPlHSzp0UOkwexKmM3tqzoV/ WYf0MMDWnCSJ2jFHrOo2+ZaxCep7pMAR4NxjIYsFOgxMIjGB1lC8LsIbodUAQRURNdk0 mh0aHw9HZqjMYghRyYVw28S/76ygLqL17UWs7qa2HZXVLzlSfFgn+oJmPhfRKZ+eAAsU LnKD9Q5opduIuny6Q63UvdTGvPEoqmcHtKGAcMU54Y3nU+GMIDY9R4QYj4QuB8Mm53EA fR4IVVUpsTWxETQ25Z3isWpzqljUO3CyIT/zL/Y9WnF9GH42aP1NoyqJT1GYasL0QESa L8Lg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c84w0mMz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-132579-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132579-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id j5-20020a63fc05000000b005e430f46834si953968pgi.19.2024.04.05.00.48.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 00:48:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132579-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c84w0mMz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-132579-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132579-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C8B6CB24167 for ; Fri, 5 Apr 2024 07:45:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0030113DBBB; Fri, 5 Apr 2024 07:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="c84w0mMz" Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (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 F283B13D289 for ; Fri, 5 Apr 2024 07:44:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712303077; cv=none; b=Ze96H/XgILHzu78nKANdIBHPNpdSl7zHtyHiYDxwdof0sDm2DucwUNvvC04LF05NYdFkpiPUlyYM4rRlEEjrKOJDzYWDLjhzl3nfuts9jFnhWQpXKhwJJL/3voX/K4JO0Z4OvuV32rBuP49j3/mg5r7vOcaGKLULRQBxdrDACOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712303077; c=relaxed/simple; bh=bxMd5VtoFtZ5IA+lfWe6irnCCj68qYa5NaOxVXPK+Zs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=RXQ5SU7/F6XT4KU6l/76loIE/IbLmZLf7HMkAurIAZeHn2fHS0QqsrLC+QNoxTqpY3GuuPYcU4cnMj/0shW//NAxsZzVR8VdCwjcr4dvtvzA3NRL+n7JQ3hNqIt8TbgOJCfjvkiWCs1/0xNuPtV+p92TWAY0WFUWjk5239pgLyM= 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=c84w0mMz; arc=none smtp.client-ip=209.85.219.178 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 Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-dcbc6a6808fso1947767276.2 for ; Fri, 05 Apr 2024 00:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712303075; x=1712907875; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zYQYHc96aAqkJY4oGXNQ40gKh1E9/vfyHDywYKQqVgk=; b=c84w0mMzteKparFyfWw+KzRpMnkX2NbKQICh758hUtWdlVr1o5Js8TXjfy+lwLBjux X+p+a2ddT36Cwt07YJUmepMSAbjJyDzgkfuf8LaosV2ktpDU4dbV5a5XX098dR+OAVVJ MKCnODMoZBOHELCnHl6acIc+X097JlZmhPByWfXyVTQ1ZrEoOivMEvbUje204gGc0xDr HtK1kTzCGI8R4VW2ynBUtqTeH0AlQ/aSZcM0G6Chta0I9hoJjvqg7YzgnwEij6KuRTCf btiZrKx7kPDoAskNk87fFq0CkfRoLMT1cBcLjOU53/I4dBSz/16amjzSMI5mMJbN/wdt 7YFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712303075; x=1712907875; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zYQYHc96aAqkJY4oGXNQ40gKh1E9/vfyHDywYKQqVgk=; b=UBj7dohpxHNVZ+d7Tr2dljotH7HElpXTakCzHjm97kklwZ1kHWjI+09Z1JQY5hcasw 7l1CkmvjtmJyV36YyXdj8pxwST/qyhWziv1Y+F6Jylv1cFDmeNswVvzsLU6hDbXWbC/h /vUuaSL1uf5i1DaKegn1i5TqKFr4JrV2BYUR0A3jUqsFrf0Wj4Kd9szaA8aMPwZnj4gP znLq4oAYEojUTW3QPnvrVNg4+y+l0/cSz6U/360CEBId5cztIaGZw3SXjj7vyZmH3MIA 4iHoaf/SLREguMx7HBzXv6V9YlH+GJmJ5FZIcdY/W/EvDzJFbJ9qPcFUqK4khLrZ9Mib 6uqg== X-Forwarded-Encrypted: i=1; AJvYcCVOd2srywp9VaeRYVzzsQfqRBz5vdKlRbE9SOzJVCgqb/JFc6Rmqz1nfCZaZktxuxajufm7tDqeqjpBCxdjffHoJqhuJcUVQw1o2VXX X-Gm-Message-State: AOJu0YzbxQBWB05zG+8bqp8fUS4kYjCKpX+j6t1ZaYeni2CQDOfyQb1x 8+jpemSgAnF/yHxKewS10D2vvJRwImO6iejFV9cEoYaZnPHGtyh+CFfgoaL/2x1dgcs0UOnmKDY AuJhftuel1Da2vJKX0D60oQ05rhHt/FofmuMSgw== X-Received: by 2002:a25:800c:0:b0:dc7:4367:2527 with SMTP id m12-20020a25800c000000b00dc743672527mr599078ybk.49.1712303075009; Fri, 05 Apr 2024 00:44:35 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240321092529.13362-1-quic_jkona@quicinc.com> <20240321092529.13362-7-quic_jkona@quicinc.com> <008d574f-9c9e-48c6-b64e-89fb469cbde4@quicinc.com> <8a5a3cf8-5b4f-487f-ad91-00499509f8ec@quicinc.com> <03f8d2ee-2467-48aa-9b76-06eb13202b8c@quicinc.com> In-Reply-To: <03f8d2ee-2467-48aa-9b76-06eb13202b8c@quicinc.com> From: Dmitry Baryshkov Date: Fri, 5 Apr 2024 10:44:23 +0300 Message-ID: Subject: Re: [PATCH V2 RESEND 6/6] arm64: dts: qcom: sm8650: Add video and camera clock controllers To: Jagadeesh Kona Cc: Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vladimir Zapolskiy , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Taniya Das , Satya Priya Kakitapalli , Ajit Pandey , Imran Shaik Content-Type: text/plain; charset="UTF-8" On Fri, 5 Apr 2024 at 09:01, Jagadeesh Kona wrote: > > > > On 4/4/2024 9:35 PM, Dmitry Baryshkov wrote: > > On Thu, 4 Apr 2024 at 13:06, Jagadeesh Kona wrote: > >> > >> > >> > >> On 4/4/2024 11:00 AM, Dmitry Baryshkov wrote: > >>> On Thu, 4 Apr 2024 at 08:13, Jagadeesh Kona wrote: > >>>> > >>>> > >>>> > >>>> On 4/3/2024 9:24 PM, Dmitry Baryshkov wrote: > >>>>> On Wed, 3 Apr 2024 at 10:16, Jagadeesh Kona wrote: > >>>>>> > >>>>>> > >>>>>> > >>>>>> On 3/25/2024 11:38 AM, Jagadeesh Kona wrote: > >>>>>>> > >>>>>>> > >>>>>>> On 3/21/2024 6:43 PM, Dmitry Baryshkov wrote: > >>>>>>>> On Thu, 21 Mar 2024 at 11:27, Jagadeesh Kona > >>>>>>>> wrote: > >>>>>>>>> > >>>>>>>>> Add device nodes for video and camera clock controllers on Qualcomm > >>>>>>>>> SM8650 platform. > >>>>>>>>> > >>>>>>>>> Signed-off-by: Jagadeesh Kona > >>>>>>>>> --- > >>>>>>>>> arch/arm64/boot/dts/qcom/sm8650.dtsi | 28 ++++++++++++++++++++++++++++ > >>>>>>>>> 1 file changed, 28 insertions(+) > >>>>>>>>> > >>>>>>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi > >>>>>>>>> b/arch/arm64/boot/dts/qcom/sm8650.dtsi > >>>>>>>>> index 32c0a7b9aded..d862aa6be824 100644 > >>>>>>>>> --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi > >>>>>>>>> +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi > >>>>>>>>> @@ -4,6 +4,8 @@ > >>>>>>>>> */ > >>>>>>>>> > >>>>>>>>> #include > >>>>>>>>> +#include > >>>>>>>>> +#include > >>>>>>>>> #include > >>>>>>>>> #include > >>>>>>>>> #include > >>>>>>>>> @@ -3110,6 +3112,32 @@ opp-202000000 { > >>>>>>>>> }; > >>>>>>>>> }; > >>>>>>>>> > >>>>>>>>> + videocc: clock-controller@aaf0000 { > >>>>>>>>> + compatible = "qcom,sm8650-videocc"; > >>>>>>>>> + reg = <0 0x0aaf0000 0 0x10000>; > >>>>>>>>> + clocks = <&bi_tcxo_div2>, > >>>>>>>>> + <&gcc GCC_VIDEO_AHB_CLK>; > >>>>>>>>> + power-domains = <&rpmhpd RPMHPD_MMCX>; > >>>>>>>>> + required-opps = <&rpmhpd_opp_low_svs>; > >>>>>>>> > >>>>>>>> The required-opps should no longer be necessary. > >>>>>>>> > >>>>>>> > >>>>>>> Sure, will check and remove this if not required. > >>>>>> > >>>>>> > >>>>>> I checked further on this and without required-opps, if there is no vote > >>>>>> on the power-domain & its peer from any other consumers, when runtime > >>>>>> get is called on device, it enables the power domain just at the minimum > >>>>>> non-zero level. But in some cases, the minimum non-zero level of > >>>>>> power-domain could be just retention and is not sufficient for clock > >>>>>> controller to operate, hence required-opps property is needed to specify > >>>>>> the minimum level required on power-domain for this clock controller. > >>>>> > >>>>> In which cases? If it ends up with the retention vote, it is a bug > >>>>> which must be fixed. > >>>>> > >>>> > >>>> The minimum non-zero level(configured from bootloaders) of MMCX is > >>>> retention on few chipsets but it can vary across the chipsets. Hence to > >>>> be on safer side from our end, it is good to have required-opps in DT to > >>>> specify the minimum level required for this clock controller. > >>> > >>> We are discussing sm8650, not some abstract chipset. Does it list > >>> retention or low_svs as a minimal level for MMCX? > >>> > >> > >> Actually, the minimum level for MMCX is external to the clock > >> controllers. > > > > Yes, it comes from cmd-db > > > >> But the clock controller requires MMCX to be atleast at > >> lowsvs for it to be functional. > > > > Correct > > > >> Hence we need to keep required-opps to > >> ensure the same without relying on the actual minimum level for MMCX. > > > > And this is not correct. There is no need for the DT to be redundant. > > I plan to send patches removing the existing required-opps when they > > are not required. > > > I agree this is not required if cmd-db minimum level is already at > lowsvs. But since MMCX running at lowsvs is a mandatory requirement for > clock controller to operate, I believe it is good to have required-opps > to ensure we meet this requirement in all cases, rather than relying on > the cmd-db minimum level which we have no control over. IIf we follow this logic, we should throw cmd-db away and hardcode all those values in the RPMh drivers. We have cmd-db. If it is correct, there is no need to duplicate it. If it is incorrect, it is a bug that should be fixed or worked around. > > Thanks, > Jagadeesh > -- With best wishes Dmitry