Received: by 2002:a89:2d5:0:b0:1ef:f8eb:5d24 with SMTP id d21csp23902lqs; Sun, 17 Mar 2024 08:53:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtfttiNruXi+1EMwCBLFUyE8Gxb6nlBQpw/OhBsRTLytC9NK0Bfu2nA8zpaNWrsDo9mjocHZ058qXHkvZr2bVz+/x7DUTCqrpJsTBdOw== X-Google-Smtp-Source: AGHT+IFJ62Z1laOHSn5khC0EECeqIg3xmHARd43yJZTmSkCU3urz7WBz9ZDlYcjSziaM4kg09/9U X-Received: by 2002:a05:6830:1082:b0:6e6:9422:d70c with SMTP id y2-20020a056830108200b006e69422d70cmr63911oto.17.1710690795682; Sun, 17 Mar 2024 08:53:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710690795; cv=pass; d=google.com; s=arc-20160816; b=SKKzS2jcdCkhlnbtFt9LtYlX6sqilKCEwbh00+TOhCovYcflhX+TL63V0TTIX0sSv4 4TGlbAUQRNE+YOQk5xcfHQldo9+jD1MSVjyx4j2Mz9LQkHlXrkL9WnG5m7q76hfvFczM 2xrI+q4175Z9x9CDCAog6Mr2d7kOG4N/yPUVFKykDuzHEbobtKIRVzEewdIBrYXkxieK VnvbpYImVF9fRCvv9HQ5FOtw4NrqcCTF6KgpxnokH98ASYIsCX7+9zK1JKW1ul/Bol9l b7IJNZurT8xajKZ2n5IuL7l9F5SGs+cc3sDZnzMq5M8iRS7p3qiJKeAxcbmOlptrXqIM dNNQ== ARC-Message-Signature: i=2; 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 :dkim-filter; bh=2fXEQU7bzeWiACJtGqRgHPd3Ag2CN/m9BE/2cm5CYJ0=; fh=hLleFeu6uDONyAeqJ86u3VAx1OjzokaFegQG+c2/QtM=; b=z0DyaIPsHjp7AxBy1qwfbAodg4iVhfP5XieuB0giMHSCFlGPA9yxIf57CGmx3j82ri iVi+SwKmRnmW6nGT6VC3KUhGRdYhGRFk56wWIMSbLlba+3YtLb61h8mzjBxHgc+htjjr +1eRVqOT4vHkCcsZb1MZ2gmd/QPmZNFEN00YPVSqBxhMW46fqhHNyR8p7fSkt3ABevWf 1JvGZ2sMMrfNbIwo9CfiPmbkG1dNvXfnreUsnsA9BnS/St14RBzE8hA/rnjLIhyCPKoR cspz8Dkq94D5qcDI+e4hWxK5fqUNxr1x73peg60ZRdcLgn0Qda0BYKWz4LdqmF77U9Iq qE/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=Im5kzRqy; arc=pass (i=1 spf=pass spfdomain=sberdevices.ru dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-105459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gg8-20020a056214252800b0068efcba558fsi6841307qvb.480.2024.03.17.08.53.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 08:53:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=Im5kzRqy; arc=pass (i=1 spf=pass spfdomain=sberdevices.ru dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-105459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 547321C210D8 for ; Sun, 17 Mar 2024 15:53:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D7D11CAAF; Sun, 17 Mar 2024 15:53:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="Im5kzRqy" Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E19471CA89; Sun, 17 Mar 2024 15:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.89.224.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710690786; cv=none; b=pXBNwi08XvND0EzGr13NQmd2XkYn5fKWWS7cIRjSwhb5pQY4cUiQ7ypPSaJW/dCea9ty9jjdvfZ9pQ10HCT8PrC25W6QGxafb/DnLg7BtZqYHK2tfjNwNvuWbLx5za7GCCmCEJnXcxr5R/j8+9UmYq7O+Lr67WehQkZ4wwhBCNg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710690786; c=relaxed/simple; bh=qsTKkYK8XLaq+bP09hviff9XCpX1URpEQAcuflFdBMI=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=PwXfzTfTayJys/WYr+VZQcm/Hb++QyN3jq3/oc73UXhrhgmqgKmBUkdtkST43e8/BJ5MI0wHgixpFiikmnD8mYeT2T4DOxo4f15eXW6adMAqOFSIvKYcFFPwafkikPFWDRis9LH2xGJRPGpXFEsqRKrumBG8RFYiZzexdMBDMc8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=sberdevices.ru; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=Im5kzRqy; arc=none smtp.client-ip=45.89.224.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sberdevices.ru Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 1D9C6120006; Sun, 17 Mar 2024 18:52:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 1D9C6120006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1710690778; bh=2fXEQU7bzeWiACJtGqRgHPd3Ag2CN/m9BE/2cm5CYJ0=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:From; b=Im5kzRqyELCdF4Gjpz1R3jykdpheWCh6sK9BUQtGC88e8Z/8fMeV2MIbXm5q5Wrn2 /WBs2dSQ9ZnQ/sqJKRTg8O49Td+5xztyGIXVC2nmDK+7TfYdpcAm/OfDyJLUZ30Lqi XyZMLcbSa//eOm3uxhk+dIn/OqYYbv4AcxhapXXAOMFrfl+Cn4agxPa3QWueneIbzT BmXP4C+ADdarEvFqUtPjQYH6SMM2Jzz7BL4tg/A0COchOXB6NK+4l3pPcuow1LSLxz Dde27KRXh7qD8nkNcMjQzufxcFTzzKQQzklGkT1ruHGzeF7pZfahNWb7mIZETGIX5r cj1bQWsurQ6Mw== Received: from smtp.sberdevices.ru (p-i-exch-sc-m02.sberdevices.ru [172.16.192.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Sun, 17 Mar 2024 18:52:57 +0300 (MSK) Received: from [172.28.160.49] (100.64.160.123) by p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Sun, 17 Mar 2024 18:52:57 +0300 Message-ID: <6feba9ff-8bbf-4494-93f0-732679bc4032@salutedevices.com> Date: Sun, 17 Mar 2024 18:52:15 +0300 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 13/25] ASoC: dt-bindings: meson: axg-pdm: document 'sysrate' property Content-Language: en-US To: Jerome Brunet , Krzysztof Kozlowski CC: Neil Armstrong , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Kevin Hilman , Martin Blumenstingl , Liam Girdwood , Mark Brown , Linus Walleij , Jaroslav Kysela , Takashi Iwai , , , , , , , , , References: <20240314232201.2102178-1-jan.dakinevich@salutedevices.com> <20240314232201.2102178-14-jan.dakinevich@salutedevices.com> <1jil1nhjwd.fsf@starbuckisacylon.baylibre.com> From: Jan Dakinevich In-Reply-To: <1jil1nhjwd.fsf@starbuckisacylon.baylibre.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 183875 [Feb 29 2024] X-KSMG-AntiSpam-Version: 6.1.0.3 X-KSMG-AntiSpam-Envelope-From: YVDakinevich@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 7 0.3.7 6d6bf5bd8eea7373134f756a2fd73e9456bb7d1a, {Tracking_smtp_not_equal_from}, {Tracking_bl_eng_cat, c15}, {Tracking_from_domain_doesnt_match_to}, FromAlignment: n, {Tracking_smtp_domain_mismatch}, {Tracking_smtp_domain_2level_mismatch}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/02/29 19:21:00 #23899999 X-KSMG-AntiVirus-Status: Clean, skipped On 3/15/24 13:22, Jerome Brunet wrote: > > On Fri 15 Mar 2024 at 11:00, Krzysztof Kozlowski wrote: > >> On 15/03/2024 00:21, Jan Dakinevich wrote: >>> This option allow to redefine the rate of DSP system clock. >> >> And why is it suitable for bindings? Describe the hardware, not what you >> want to do in the driver. >> >>> >>> Signed-off-by: Jan Dakinevich >>> --- >>> Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml >>> index df21dd72fc65..d2f23a59a6b6 100644 >>> --- a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml >>> +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml >>> @@ -40,6 +40,10 @@ properties: >>> resets: >>> maxItems: 1 >>> >>> + sysrate: >>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> + description: redefine rate of DSP system clock >> >> No vendor prefix, so is it a generic property? Also, missing unit >> suffix, but more importantly I don't understand why this is a property >> of hardware. > > +1. > > The appropriate way to set rate of the clock before the driver take over > is 'assigned-rate', if you need to customize this for different > platform. > It would be great, but it doesn't work. Below, is what I want to see: assigned-clocks = <&clkc_audio AUD2_CLKID_PDM_SYSCLK_SEL>, <&clkc_audio AUD2_CLKID_PDM_SYSCLK_DIV>; assigned-clock-parents = <&clkc_pll CLKID_FCLK_DIV3>, <0>; assigned-clock-rates = <0>, <256000000>; But regardles of this declaration, PDM's driver unconditionally sets sysclk'rate to 250MHz and throws away everything that was configured before, reparents audio2_pdm_sysclk_mux to hifi_pll and changes hifi_pll's rate. This value 250MHz is declared here: static const struct axg_pdm_cfg axg_pdm_config = { .filters = &axg_default_filters, .sys_rate = 250000000, }; The property 'sysrate' is intended to redefine hardcoded 'sys_rate' value in 'axg_pdm_config'. > Then you don't have to deal with it in the device driver. > >> >> Best regards, >> Krzysztof > > -- Best regards Jan Dakinevich