From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 AC29F15EFA1 for ; Tue, 18 Jun 2024 19:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718737927; cv=none; b=WoRAvys3RjY3vGrMQI+Xz0D4BYHPU32ZGHFrUvrfevri42aMrnfK3JH8DuNy6m6VrHw13WRgzHXny7vx5LKWgYB9aleB9e+rJco60WtH4unK0czcXbo17L9mFoAephdO8NlpPXUnXsWnS8gLtvh5xcYZOPNXYhN5jwjIsL/t6QM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718737927; c=relaxed/simple; bh=V6TUkHZXRl29GH5tB+9zD1O+XS7wyCwcd/6nrTmB+zo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AMZBug6UBb7GWW5qbQh69zXvwjPuJwEKxRPfYFc78HoikIAkDmkVr92aIvsNGz8D00jS/7ELN0u7nRn3/wQxV/lnXvQU74bZhbSfkbPcDhFAkHHKV/850o9t308PIeww3iIw2/pSlMl3/OrmDOT3ZQRJkaMUvdTp7SJut9JgNH0= 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=oH0hcvFJ; arc=none smtp.client-ip=209.85.128.52 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="oH0hcvFJ" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-421a1b834acso48992335e9.3 for ; Tue, 18 Jun 2024 12:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718737924; x=1719342724; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=f8+/cR8dmnRCIY8KO1c6EzfyrRTOkElOzLEANvqSOFw=; b=oH0hcvFJ7FmVmxz8THavBoaaaDNUg/2g4Z6LQuingacqxNEXmPzSba9sw4TOfi492Q ooW+qyu7XLOz22qJtfnr6/AwZa8qp6je324y00HxdtdPZebey5DLkLE2XUdSAgZntRq7 3ULheWyKCY99KmTO1ePsCu4PxnXk5M7s1jZcGlXhssPN5elk8ATtHOYNi0t+I5f6qvd+ TWe2H/5jBl+xtvh7NRA+yfKJWXBGFq7fVgRTq1xBECGXEvF2iXCxeq2jal3oJgtrDO4i TC1F+3uLJu3LyNbchFfqH23CB1Xg9OeZsZvFWA0qVcA8y0cYcLSFg7DPyiKuyCGqdLre 5lLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718737924; x=1719342724; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f8+/cR8dmnRCIY8KO1c6EzfyrRTOkElOzLEANvqSOFw=; b=fGXMaHYWflKoVNDeFLzoaukxHX3FYg9SZUpNLpIKvj30oP7/Bx4kqZBZ3QinPC8SSy VIrIeXlPdufLlR/aW0wUUsCq4Fh0PJsxsTKxwe+iMebjQr/UQgnWnuKWbi/nApEHrjPS 3qqSisZ6EqE3UzdZ7X866O0UCG/H90OUYr1cYmY+elpzXmwSmY2KXP8/PnnuLiq8c5Rr UGhTlG4A84X3hE432WH5w2ZKXQH93DPdAox7+2JG+LHeDUX4Ehm91XXVaUW5G6JA82z2 5ixnjuv30U1d54dshSItI32jrP5AOufzvFQ/jWNacFcKXA8odkogCMa+GeS7TG0Opdf5 w7Eg== X-Forwarded-Encrypted: i=1; AJvYcCWOYQe4774RVPpFaehJq9Tuwez6svXV3Nt0d7hxqiCXZQoc0pkb0iSbm2dRMVoRCSytSNM3OZHIT50gSWg9x4Dnyy/EGcnPI10aqw== X-Gm-Message-State: AOJu0Yz5lx5/l9ge7l362cwjrWr3v96nZIY1aL7tf4hcArP6/laC8w3P 9ASxTm1+zz890MmjBGnNUjUxuAuKRGxHuWhwn8DHMAeS+ilxJjX0e0AmplqlBUc= X-Google-Smtp-Source: AGHT+IHdn2YVcteO5gHaAZyTpV2RKc9NRMuQMnYAe8emYCZSQL9/iTeEcqYKL05YMuGAZiFOdSXtsQ== X-Received: by 2002:adf:fe11:0:b0:35e:5bf6:5432 with SMTP id ffacd0b85a97d-363175b8c65mr437516f8f.21.1718737923890; Tue, 18 Jun 2024 12:12:03 -0700 (PDT) Received: from ?IPV6:2a00:f41:9028:9df3:5d11:7fa7:8997:f811? ([2a00:f41:9028:9df3:5d11:7fa7:8997:f811]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-361a85074a2sm2280828f8f.25.2024.06.18.12.11.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jun 2024 12:12:03 -0700 (PDT) Message-ID: <85e03d10-59a2-4f15-bb85-7b2c0354a5d1@linaro.org> Date: Tue, 18 Jun 2024 21:11:58 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 02/23] gcc-sdm845: Add rates to the GP clocks To: Dmitry Baryshkov Cc: Dzmitry Sankouski , Sebastian Reichel , Bjorn Andersson , Michael Turquette , Stephen Boyd , Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Dmitry Torokhov , Pavel Machek , Liam Girdwood , Mark Brown , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Krzysztof Kozlowski , Chanwoo Choi , phone-devel@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, linux-pwm@vger.kernel.org, linux-samsung-soc@vger.kernel.org References: <20240618-starqltechn_integration_upstream-v3-0-e3f6662017ac@gmail.com> <20240618-starqltechn_integration_upstream-v3-2-e3f6662017ac@gmail.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/18/24 20:55, Dmitry Baryshkov wrote: > On Tue, Jun 18, 2024 at 08:50:52PM GMT, Konrad Dybcio wrote: >> >> >> On 6/18/24 19:50, Dmitry Baryshkov wrote: >>> On Tue, Jun 18, 2024 at 04:59:36PM GMT, Dzmitry Sankouski wrote: >>>> sdm845 has "General Purpose" clocks that can be muxed to >>>> SoC pins. >>>> >>>> Those clocks may be used as e.g. PWM sources for external peripherals. >>>> Add more frequencies to the table for those clocks so it's possible >>>> for arbitrary peripherals to make use of them. >>>> >>>> See also: bf8bb8eaccf(clk: qcom: gcc-msm8916: Add rates to the GP clocks) >>> >>> Each time I look at the table attached to the GP CLK, I feel that it's >>> plain wrong. In the end the GPCLK can in theory have arbitrary value >>> depending on the usecase. >>> >>> Bjorn, Konrad, maybe we should add special clk_ops for GP CLK which >>> allow more flexibility than a default clk_rcg2_ops? >> >> If we can somehow get max m/n/d values for all possible parents, sure > > Calculate them at runtime? We'd be calculating the mnd values for a frequency that's either equal or reasonably close to the one requested. My worry is that we somehow need to get the maximum values they can take (unless they're well-known) Konrad