From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.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 C52623382E6 for ; Sun, 8 Mar 2026 16:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772988232; cv=none; b=WkMpcl/MygOsk97ZftZseLenOBJmdpn/+DC69csih4JSKusIJAOwGvBNqxMFBlzzoTswuTo4VvMdHwEDQGRWfZQrA7J+gc8mxja+6xIDFhqSRDJGtOs2TC3fSxtieXWTo3l27jUhvIlyL4gOSAnDfO42hwFOFt00LC1/Fc+XVj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772988232; c=relaxed/simple; bh=5PdK8ZH0OApCvGCUau4fGFklsQxnHjUokWQFkZsjW+w=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=rpJ2WIsUG7vGEC3gBPzGPA/d1iZctLaH0FYiJVXHH5IP4hGvmsGqvD5bHU2ZXB5J3gno6EbVg0DJSpupxCWghrj43MJYZVvCjQNIwYEt6Zc5+m1MLQhUcR5mvW4ZRXnVlkMhnH97ZkaIGRfaR27cmwDPrDrxf8nY5Zz4WUdxZIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Jf/4yAhp; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Jf/4yAhp" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-439b9cf8cb5so6507460f8f.0 for ; Sun, 08 Mar 2026 09:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1772988228; x=1773593028; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=ptNfJY13rqncPY9fxaxMY/4N9QDNKhiHCS/yjgnBkUM=; b=Jf/4yAhp0pHKyPXb6YSU5ivEM1yRSzsM4WiGp8L62ieZhjqcx2BNXQU3+22OqYNYkP CU5cI564n3DJRImEMIKbxnxIZyqhRyElbSDyF9u7X0Kl23bJNrr/w4/5BCkMvTvRMYmd OuTJ40LSV1bLQRwgvsSKLWw30WnMUu8esvUSDEDjpm8fKEUk+Lt2ZyVPqR3YPHypqrgn dnudXf9eglsE0kXAoY3q7xSJK7GOaBkFLw2F94yJJNMPlHTYLlJA1vs1W6aR8w71Jjo9 kg522LZ4atMz/inQBWJpEfF8xYJ6kdY3nOaDgTvvVfFivOJwVnBLimPo7tdHc6HF6VYK yEgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772988228; x=1773593028; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ptNfJY13rqncPY9fxaxMY/4N9QDNKhiHCS/yjgnBkUM=; b=I3Lm9F2vkaPwckPlOfqkhuJ1imZ/pYlRnOTfxfDPRyM/Ybi+MdW5CbQhCFygHUiYhB K5bvq3vSR9tbsIWcJTgAwaoaBNNwhHOIWypUBYsjP4p3Td9PCI2D9vJkwCEiALXKUKaC HaO1EZQSzYgVscrqDWNJB5nv0xZsS0ZCFAHo7kipiUUeu9xIt3u0KvMvWlvFVqfV+qHF OHQTuL+SzLpcoP/YuhzMGfELZBA7GieT/kBf/Bo1iFhh4+tn4r5Bj4imxbcoVC74U5j1 rpqPAyzFR7QvxLrsJGYj4u/1/A4ukRDS/658OJy8RTYsQJwySoVkU7q00A+MKv2VjZBM SEDw== X-Forwarded-Encrypted: i=1; AJvYcCWmfMZaaoysy8uaIeHe0V0/TAfGkK3nDnCeiow4BSjux35iKrOHjl1zHL4cWni1yuv/AheodTsruXQwt5w=@vger.kernel.org X-Gm-Message-State: AOJu0YzgDjaDLrO1GaJhACRd/l9jJt0LwzZCQtLpRu6hhzvW2YxVtHCK SAfT+FnkuvQv2wcaAJrq7qZHSKoc888/E8DaUGJDYZvm21sz1y7WJPbNZwilcTuo5L4mPdvZJHV T5JIP X-Gm-Gg: ATEYQzw8CIVc5ohyCRaXgt7ld0BXUddG2J2S2eVx80KHwoK5hTr3FnIjR9uGqYeYntl ERoekWfIcns2cdhZvW6rKEQW53TYqVbl1FiyuFNYe2Rizs2Yobkz/wEUAoQz0rcybGDw6SERne8 DC89bUUxt0CKGeoJ5+3jNJ6zTGmKM7qpQ2lPNO1ny8kzJN5xqP3wdzL4HDi4GQXMPMAUmQ9LUhc 82oJE6CNPTkFXrm9PesaYAZAoSDHM/yFAI/V0nJeAYUm1+Mn5kab4TyQExmcmqupV4RTtFBSdsA Z7iKqEN31c47g4hmZ/jVUwQZUZBx3kamH2Bau3D4SKjYaXHqMpROE1tspxIY+uah8ouUGCss0bX 41WoSBWhhcNOZtPzrNGjqiVf5dumzOPLhc8rZXIo8aZn88ADT5yZKkpsVwoytMzlYXqX9YZ5DrM hzQGGKpDOB9WQ3zHxgQYS+wZSX+SKCCQ== X-Received: by 2002:a05:6000:2681:b0:439:c38e:66cc with SMTP id ffacd0b85a97d-439da88ffdamr14319927f8f.46.1772988228077; Sun, 08 Mar 2026 09:43:48 -0700 (PDT) Received: from [192.168.50.4] ([82.78.167.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439dad977f8sm19297489f8f.9.2026.03.08.09.43.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Mar 2026 09:43:47 -0700 (PDT) Message-ID: Date: Sun, 8 Mar 2026 18:43:46 +0200 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 v3 03/19] dt-bindings: clock: at91: Allow referencing main rc oscillator in DT To: Nicolas Ferre , Alexandre Belloni , Ryan Wanner , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexander Dahl References: <20260120143759.904013-1-ada@thorsis.com> <20260120143759.904013-4-ada@thorsis.com> <20260209-amulet-customize-08ef8dfa1c38@thorsis.com> Content-Language: en-US From: Claudiu Beznea In-Reply-To: <20260209-amulet-customize-08ef8dfa1c38@thorsis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Alexander, Sorry for the late reply. On 2/9/26 10:08, Alexander Dahl wrote: > Hello Claudiu, > > Am Sat, Jan 31, 2026 at 05:44:18PM +0200 schrieb Claudiu Beznea: >> Hi, Alexander, >> >> On 1/20/26 16:37, Alexander Dahl wrote: >>> The main rc oscillator will be needed for the OTPC to work properly. >>> >>> The new index introduced here was not used on the four affected SoC >>> clock drivers before, but for sama5d2 only (PMC_I2S1_MUX). >>> >>> Link: https://lore.kernel.org/linux-devicetree/20250207-jailbird-circus-bcc04ee90e05@thorsis.com/T/#u >>> Signed-off-by: Alexander Dahl >>> --- >>> >>> Notes: >>> v3: >>> - adapt to different base changes, added lines are the same >>> v2: >>> - new patch, not present in v1 >>> >>> include/dt-bindings/clock/microchip,sam9x60-pmc.h | 1 + >>> include/dt-bindings/clock/microchip,sam9x7-pmc.h | 1 + >>> include/dt-bindings/clock/microchip,sama7d65-pmc.h | 1 + >>> include/dt-bindings/clock/microchip,sama7g5-pmc.h | 1 + >>> 4 files changed, 4 insertions(+) >>> >>> diff --git a/include/dt-bindings/clock/microchip,sam9x60-pmc.h b/include/dt-bindings/clock/microchip,sam9x60-pmc.h >>> index 91f8f863ea076..1f6bb51780d09 100644 >>> --- a/include/dt-bindings/clock/microchip,sam9x60-pmc.h >>> +++ b/include/dt-bindings/clock/microchip,sam9x60-pmc.h >>> @@ -10,6 +10,7 @@ >>> #define SAM9X60_PMC_MCK 1 >>> #define SAM9X60_PMC_UTMI 2 >>> #define SAM9X60_PMC_MAIN 3 >>> +#define SAM9X60_PMC_MAIN_RC 6 >> >> Why 6 and not another index? In theory, now, you should be able to define >> here all the core clocks IDs (as these are known from the manuals) and >> prepare the driver to allocate memory for all of them such that the driver >> will have to be able to work with old and new device trees w/o further >> changes. > > Was the first common free index for these four clocks. Before split > up would have been nice to have a common index, because it was all > together in include/dt-bindings/clock/at91.h in one file. After > splitup one could just use the first free index, as Krzysztof already > suggested. OK, sounds good. > > From my reading of the SAM9X60 manual, there's no such thing as core > clock IDs in the manual. If there is a section in the manual, please > point it out. There is no such section, AFAIK. > > From my interpretation for SAM9X60 these clocks are provided by the > clock generator (section 40 in the manual): > > - TD_SLCK > - MD_SLCK > - MAINCK > - UPLLCK > - PLLACK > > The "main rc oscillator" clock is somewhat internal here, but for OTPC > we must be able to enable it. > > MCK (not MAINCK) is generated in the Processor Clock Controller block > of the PMC (section 41 in the manual) from one of the above clocks. > > So it's all mixed up from different blocks from Clock Generator and > Power Management Controller already. These indexes are > arbitrary and just for the driver, right? Or am I missing something? If I got your question, some are only internally (currently), some are also used by DT (e.g. the PLL ones). > > Besides, if it is renamed now anyway: > > - Why that PMC prefix? (most of these core clocks come from the > clock controller, not the pmc) The control interface for all of them are on PMC. So, they are all considered to be part of the PMC. From manual, chapter "Description" of "Clock generator": The Clock Generator user interface is embedded within the Power Management Controller and is described in the > > - Why not rename PMC_UTMI to something like xyz_UPLLCK to match the > datasheet/manual (likewise for the other definitions)? That could be done for the SoCs where this applies. Thank you, Claudiu