From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.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 1785D3002DF for ; Sat, 31 Jan 2026 15:47:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769874431; cv=none; b=EzfEzMVSr34yT7hJGHLTKpkpodXYIdRxUcO8mGX9sNUsXgpXYNHs5MxdtDaPVLD2ZEG2YoeleWmYjY5xgQofdPt7z7xcvjcLx/SDEq/ht8lLZC36YGjsPUULJhg4GYEhw2a14Q8XlkVDFdK2Tl+ZRS30pFfB5cQlFsDravf/lDE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769874431; c=relaxed/simple; bh=w/+oaKLap8ukpggiur3CZXqekXweHxIJ+9YUIZvq/mU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Qy8/RTEfaPswmG6cjO7dy7LGTo/PDkuGldMYljDcCMwqjUN4/Tm5R4qXF56O1ysk0cP4s8zKhgKBVc2eZEhUvneiHd0+QwQOwS+39GBg29Ovl5p1Cqr5PXM2IS2NlKdneDTBqodvpd35EGG3FwyFa5aBO+OCwFBSKr7+rbgMSeQ= 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=ZY3gSt4e; arc=none smtp.client-ip=209.85.128.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="ZY3gSt4e" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-47ee07570deso25698665e9.1 for ; Sat, 31 Jan 2026 07:47:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1769874428; x=1770479228; 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=bL7VWRVbzv/1ns3vcMzexf+AEseL3f6DgUbURN/e+QA=; b=ZY3gSt4et7nB5A2Psty+5QXZnZlyTD9/mrVuCr0S7+jNXz6G5LdeExnr7fL4/8LKQG Fw9nifH2M8MP8zTxX9CY5pS8NRUB53VGrH1yM691gr9u24HA4IX5HJCIsorz16mhTDCI EWh8jTzd/+yCr7I5SPT0ojutIgCZloV9NLB2coyKta7jIT+tW5BAgfFSEtuFW7+RLG0E ehkBwtJFCxspmukrewQjfGblxjlRBqhtXpzT1R+SY+7GAdHqeVbAXPGp5A+2twvhACpZ HV80wG3sY2+c3hrX5d7XBIB6H+ore/olfWOS4cZ6c4Z32f3iMCbBEm8Sz07fTBAh3JNg Gf1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769874428; x=1770479228; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc: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=bL7VWRVbzv/1ns3vcMzexf+AEseL3f6DgUbURN/e+QA=; b=SPdvWprGd2rTERGUT0/kZTxvLGAWCWNC4rvLWwR8g5eNUbioBMwaj//mEmYPV9I1Dp j1uRNkDc2Rm1U96WurmWTI99EoNT3FNy9AfIN668piB6i3KNLk2CQ0eYJJnq/j5lhd5s lVrbibnXgkbxacKjRQkYXAIeeV0f2moYZqpZpvc9sARmaqwTRDSH5XNz0ni6+Jmo+Qag FeJ8KdI5hwjKhN90dpzXql78oRwhUzL4UiJRtoCQeud0CUnOt/BEKLHuz1FcormeaE6N jVj2KHDziWOmN+WazN/25OTMvyBApdum98TAXjgkOwtxnBCwAnchYSNo/4zxQuToCHN1 yRpw== X-Forwarded-Encrypted: i=1; AJvYcCW5cKzy8wB/25NZc3Hc2h76asElso54FbzBXfWp57OPu+oFPmM38J3xFCGqP1DJLlZcIUYpG7twuEtYzO8=@vger.kernel.org X-Gm-Message-State: AOJu0YxO9b11qJPmubRObbv8JZWiL630Dqxj1HJyXzLXFhXCiCLTVXP7 eLbKYFYY9Q7hmZNPoWHazqjRd4gwwwjA+wf/5n9IvZFTV5+u6P72UW0fW3zGXL0jpm4MHGpwBf2 uhe7+ X-Gm-Gg: AZuq6aIOfLEBe89k+mQgD+AeSDuwRguCFB7eX0yEy2M/xLdUPAhCYBQ6lQ/nKAlqCcx d8jChDrxT/Ir3JjcEbqXdQ0Rh5qVa9ZVmWWNoKZzA1hG0F/O/bAziZZ3e/Y0WwRTuu5W1t7NM7i 8pomZeigh5oeGlVf4dcLcMhr6DavQOo1ZSwbWCIEku5j22Dr/wfKW/EZsgg+veAh5v85cJzJ9i6 5kedJHu3l7kxtnNRVhUd7eREJ3AZU+cMtY60ZLkKiGpNx1r/WZYUeGd/Di5wOXF9sEJhXuFbM8r y5jGZICjxModQfIXNXd5RIvA7x/axVj17rPesbQ0mXlLtxQ5WKFptytgQK6Jc31P3/qpMiuMSO9 fltYsRFTzuHQK/unatsccUFxXD9JT1Id/KZWwYp4CE7zNKiZ0If+F+Ro4mAi6gdg9lHrJa7Hd+/ HOpfhWlArY9OZZZM5zXA== X-Received: by 2002:a05:600c:4443:b0:475:dd8d:2f52 with SMTP id 5b1f17b1804b1-482db4a317bmr78541975e9.32.1769874428509; Sat, 31 Jan 2026 07:47:08 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.31]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-482e2973d57sm40798865e9.18.2026.01.31.07.47.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 31 Jan 2026 07:47:07 -0800 (PST) Message-ID: Date: Sat, 31 Jan 2026 17:47:05 +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 09/19] dt-bindings: nvmem: microchip-otpc: Add required clocks To: Alexander Dahl Cc: 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, Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Conor Dooley References: <20260120143759.904013-1-ada@thorsis.com> <20260120154502.1280938-1-ada@thorsis.com> <20260120154502.1280938-3-ada@thorsis.com> Content-Language: en-US From: Claudiu Beznea In-Reply-To: <20260120154502.1280938-3-ada@thorsis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/20/26 17:44, Alexander Dahl wrote: > The OTPC requires both the peripheral clock through PMC and the main RC > oscillator. Seemed to work without explicitly enabling those clocks on > sama7g5 before, but did not on sam9x60. > > Older datasheets were not clear and explicit about this, but recent are, > e.g. SAMA7G5 series datasheet (DS60001765B), > section 30.4.1 Power Management: > >> The OTPC is clocked through the Power Management Controller (PMC). >> The user must power on the main RC oscillator and enable the >> peripheral clock of the OTPC prior to reading or writing the OTP >> memory. As this was not mentioned in the previous datasheet versions, the current driver don't handle those clocks, and it probably worked as the clocks were enabled by bootloaders, I think the clocks should be marked as required and this patch to be propagated as a fix along with fixes on driver and device trees. I'll let DT binding maintainers for the final decision on this. > > Link: https://lore.kernel.org/linux-clk/ec34efc2-2051-4b8a-b5d8-6e2fd5e08c28@microchip.com/T/#u Why this link here? > Signed-off-by: Alexander Dahl > --- > > Notes: > v3: > - Removed clock-names (led to confusion, and not used by the driver anyways) > - Removed redundant example > > v2: > - new patch, not present in v1 > > .../devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml b/Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml > index 9a7aaf64eef32..847dfb67c6b72 100644 > --- a/Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml > +++ b/Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml > @@ -29,6 +29,11 @@ properties: > reg: > maxItems: 1 > > + clocks: > + items: > + - description: main rc oscillator > + - description: otpc peripheral clock > + > required: > - compatible > - reg > @@ -37,6 +42,8 @@ unevaluatedProperties: false > > examples: > - | > + #include > + #include > #include > > otpc: efuse@e8c00000 { > @@ -44,6 +51,7 @@ examples: > reg = <0xe8c00000 0xec>; > #address-cells = <1>; > #size-cells = <1>; > + clocks = <&pmc PMC_TYPE_CORE SAMA7G5_PMC_MAIN_RC>, <&pmc PMC_TYPE_PERIPHERAL 67>; > > temperature_calib: calib@1 { > reg = ;