From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 A53EE19DF58 for ; Fri, 14 Jun 2024 17:05:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718384751; cv=none; b=kLopyyJXzaMxEtUYSRMuJnJM/ZvKY8ZtO6KwsirEMpmFnKqE9Ii02MK2rgVUQkEvNay3bZ/vTpVy67OZGI8PV2HSvogooOE4EuWC0Cw6tY1UBwqmvUSkpfPp6Iei+x/PALfCj2jWB2Mk/9kII5zHGl3iR5PrSm7kK6SNiBlp/Qw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718384751; c=relaxed/simple; bh=8KzlyxUtiQH9n4+dt2WeZEnMMpuBU8HGGEn+yCT/YA4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=oW9nkG53YAm14E2altgtTFofOQ42h9pwysr+AdZag4v/XmzwBdkbEcMixfbilcA5T3B72G7zj2T0bl5ZXQTHfdtHzyKTTdpQvSc1iTzQno4lmUblJuTC3eAi/k5n1CZ9L5L8dFUEjc8neDXeNT27LL/XrwK+N1dS1JP5NBE518E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=PH8QfGvY; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="PH8QfGvY" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-35f1c490c13so2678560f8f.3 for ; Fri, 14 Jun 2024 10:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718384746; x=1718989546; darn=vger.kernel.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ZU9Tq2gv3Xr+OOG2Lgc2duprsrRaO/sCpRyvLtLfjWU=; b=PH8QfGvYVcHP0ipWc2zOj9zaQFRNiX+g8mHrYoassBdoubZeSv6dgBOHaQz8ddYOtY jEVnJczC0QcfQNwmo3HZ0q4ZMzdPxygv+guwzzuyX1WRnVSFQsQzWK4Nqp6KOHJ40J2Y qYmP+gjNRIyL+6O1LO0md/duFWNyS7yQKX+SrhU5otMP3kPwbHSW8289Sz6ct8c/nTde Q2LK0zvcOUJ7DmE7LDLxqTF4g7DQ61aAQ/HnAhyAsVxGAY3XVbL/yzGqEvJw9lZecFX9 O0slPWX98fhCLIvlXPPzyRa3NsGlPN5TSXD59wHMM04zMV6+FnjLUhWLJ4DK4/572cLO jRrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718384746; x=1718989546; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZU9Tq2gv3Xr+OOG2Lgc2duprsrRaO/sCpRyvLtLfjWU=; b=ZzacQ0LUdP+Qv2TbhgYC9EdmlJgGofB0EHA9ajAYGGU3iLnXBoRZp5DM2Mzp+Cxyur Gh1YNNgFDX+gceIy6QeJFL3YgDK7ciTm4NBmJzmYKak9ZeBbnzdK+HqINiIPPoceGzyC Dbsni5ImyKKMm05TOPCPCbo4FHha3GnwiLCmj0P5vLoWzmWdntLU8WBWN4mUrrGdRtLE CWtkTJcvzkbVcGNQ5G7rjzKtVfxtitrHUShGuvbqKwaD+IyUexaAFblMU6RsmYYzj04W DM2GJQxg/JaHUXoFFLYAzpJVEEptLKUxNY4VB1A6Pb/jD8G3v6HJ/fMg49gloK2sSr2R U+Kg== X-Forwarded-Encrypted: i=1; AJvYcCWJxfjlcDTj/O+UtoviocXLP1gh9PkRJVM21D8koH6tqgAauOdpMarewxSEdWXCulyS2+uhzjNyUNX87s05iucJavr4D9rgULa+/+U= X-Gm-Message-State: AOJu0Yxk0pthPA7PqJEMCb14myMSLpQuYJE9bAxyHPCGtethVfNcIm/O o31+tOeIJfunVQVgE6TM+Q6QOBHcbXT0T+adHKU7upwByaBZI/Oh5IqgeVkThxY= X-Google-Smtp-Source: AGHT+IEiODVYEmrk+Rx+CKhFGkqkyheheemcrZvIKgkrbQLv/Jnn/OxMF175J3qFIGVvLOazoNSL1w== X-Received: by 2002:adf:e2d1:0:b0:360:7c17:5936 with SMTP id ffacd0b85a97d-3607c175a00mr2323310f8f.58.1718384745808; Fri, 14 Jun 2024 10:05:45 -0700 (PDT) Received: from localhost ([2a01:e0a:3c5:5fb1:5374:7bd2:13de:845]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f0d71sm4896045f8f.86.2024.06.14.10.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 10:05:45 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong Cc: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Martin Blumenstingl , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Subject: Re: [PATCH RFC 1/3] ASoC: dt-bindings: amlogic,axg-sound-card: document clocks and clock-names In-Reply-To: <20240614-topic-amlogic-upstream-bindings-fixes-audio-snd-card-v1-1-9f57d9e01834@linaro.org> (Neil Armstrong's message of "Fri, 14 Jun 2024 18:24:01 +0200") References: <20240614-topic-amlogic-upstream-bindings-fixes-audio-snd-card-v1-0-9f57d9e01834@linaro.org> <20240614-topic-amlogic-upstream-bindings-fixes-audio-snd-card-v1-1-9f57d9e01834@linaro.org> Date: Fri, 14 Jun 2024 19:05:44 +0200 Message-ID: <1j7cerihef.fsf@starbuckisacylon.baylibre.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri 14 Jun 2024 at 18:24, Neil Armstrong wrote: > The sound card design is based on 3 reference PLL frequencies that > are the root of all clock rates calculations. > > Today, those 3 frequencies are specified in DT via assigned-clocks, > because they correspond to the basic audio use-case. > > It makes no sense to setup clock rates for a sound card without > referencing the clocks for the sound card, mainly because at > some point more complex audio use cases will be supported > and those root rates would need to change. > > To solve this situation, let's legitimize the presence of assigned-clocks > in the sound card by documenting those clocks, as it describes a true > dependency of the sound card and paths the way of more complex > audio uses-cases involving those root frequencies. > > Signed-off-by: Neil Armstrong > --- > .../devicetree/bindings/sound/amlogic,axg-sound-card.yaml | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml > index 5db718e4d0e7..676ff2731b86 100644 > --- a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml > +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml > @@ -26,6 +26,18 @@ properties: > A list off component DAPM widget. Each entry is a pair of strings, > the first being the widget type, the second being the widget name > > + clocks: > + maxItems: 3 > + description: > + Base PLL clocks of audio susbsytem, used to configure base clock > + frequencies for different audio use-cases. > + > + clock-names: > + items: > + - const: mpll0 > + - const: mpll1 > + - const: mpll2 > + Thanks a lot for this series. This is going in the right direction but requiring 3 clocks or naming them (whatever the name) is not appropriate. The purpose is for the sound card to get the necessary base rates it needs for its operation. So far it has always been 3 clocks because of the 3 usual family rates and enough PLLs are available. But this is not required. There could be none (very unlikely but possible if fixed clocks are or with slave setups), one (probable on a1 from what I can tell), or even more than 3, if one needs supports for unusual rates. Also the PLLs are not necessarily the mplls, HiFi PLL is used on some device. It could even be the GP0 or external slave clocks which is why putting a limit the number of clocks would be arbitrary. I think the following would better describe the HW: clocks: true assigned-clocks: true assigned-clock-parents: true assigned-clock-rates: true Maybe just 'clocks: true' is enough since the presence of would allow 'assigned-clocks' For sure, clock-names is not useful, for axg of gx compatible card at least. All inputs are equal to the card, so index are enough if the card needed to change rates are runtime (but it is very unlikely to happen, the whole axg or gx system are meant to operate with fixed PLLs so it would not be compatible) > patternProperties: > "^dai-link-[0-9]+$": > type: object PS: I just noticed that my reply to your previous series was private. It was not meant to be. Sorry about that. -- Jerome