From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 200C82FDC57 for ; Sat, 31 Jan 2026 15:51:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769874691; cv=none; b=n8WB5NeqPtNss3mGvopjB+my5yc/3GWi/sLwk75tczdxYm10OC9EOfKxBugzZrNEauuE8p0r41vBQBKetExWY9hyBnPqACWW0ry1ReweDUoRCHO83ovEi8czWZ6FZTCbHIB/616X/Rr7x/Cf/JlH01BMbsV9aF2cAIf0VB4b8i4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769874691; c=relaxed/simple; bh=TVk5ElutLIGUZzribaf5OoNHg/tQPy9b2l4SVewIvpA=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=hA4h6pMhY7xs/ViQDXbrcMONQMnmFKeIifoNyc30Tmx4VZxiAClRgGtVBFJBEfOwBc8RDMdpA1idEx7ZDhVWHxxdVsozycFz/i4sUNNyzmHxQGEv8Zzewg4CZH/aDLIIFjvC4TfEOkKr9Ik5BeqxcD5i9luwB1+ijHMwXXfUEMA= 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=Xb1PpMHY; arc=none smtp.client-ip=209.85.128.51 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="Xb1PpMHY" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-47d59da3d81so29033805e9.0 for ; Sat, 31 Jan 2026 07:51:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1769874686; x=1770479486; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=dVDUraBCahPU+SZAz6Hk9ua2W/itIqCdoSUr1zPU1VM=; b=Xb1PpMHY8p9Kke8j9m3C5g2qQbVqC35/xXer67dvX1qRZgpLb3i1bLXNHXnNju6H3T ZKVe666vYLupD/WHZtbath4N6y3ZR3kYxwPZIHKLg+9nfaM++HXdKPy7em1ZBtRFpqVH thv8pkzExQjE9PlLdefkfm9xNhzL3keu+/keF3ZwmrNxp625xXtTliXs3342sPbJ/Nxe NEnIsFhBB/nMgcAvCwbvaQ5PEO3CwpVu1/UH4/lDk5Mkry6lyoAMjGsdbkUoI2ckYUR3 PSLY8EyvZ9OpqbxIRyVTSry9DYbcsmyWeQFHX7GXZ5FlnpJSP3cpwPEBDSv4Ki4KuNuR bujA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769874686; x=1770479486; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from: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=dVDUraBCahPU+SZAz6Hk9ua2W/itIqCdoSUr1zPU1VM=; b=j/3LBENe/qG2lKJlQMOvOjUDPcASb9wgLvdPRIOJ5IKJoKFf6vwQsrSa+6GxUdXCCw h7T/ERzyUHq0NwCb07EXKg8tSoHXQCIu85Pg93W3lrNNagRsZKeVizWEOuUCn/9iCRpf ICscx0EXo8PD9w0c2qgycZ49Im9mdYxV54gb8XrcWObr8viMe7XMxB8pW8WE94W6Y8ii EF4P/9n98rj9BmsV+9sLn1n8/w4iMgW4SHz/vjSHlFHnykxvxvuWYm8hFO5118B465C0 ogFRwg1IkWTBc8E6UoyZ1vtbcKJpnkndHW5jgdx4wxqGOQODMWkb6HQ6pEgVASTOWTWF RR+g== X-Forwarded-Encrypted: i=1; AJvYcCWExkvg+nGM52koyc8wYkBuNp1HiHw3hLlfuNq/oSWUNO2iRJl5UftpEKJBErK2KEhKtAYJPR7EIiZukBo=@vger.kernel.org X-Gm-Message-State: AOJu0YwGmlT+vgBFbS12LzFMNqVtDy16L9PrUvapQKD105gyEMc9mBL6 gza25U1qDU130W9M1VoVZzG+XAksfbWIjkgUL3+av4SFDOvA15kU9lVQ9EWW8+uysAw= X-Gm-Gg: AZuq6aIslPJX5upF1Skca9995JTQrHPkIK5y+fnS10G9iFK/S1yKePHGdPrRQSt1cUn LqEiv4ciebrrhW2KN3rvnxv01r0Nzni9y3cNU1v1NvKIU0DYAjcbUUposCs13z7jZO8jRkqwafg 79hauDysZvixK0iu3EXuDkobgWS1FiO2r9hhWtX5jbm6uyu31jz1H93k2R6xjlWpedscXgByZuL 6vDjeTUthr6pjyKDj8pLYsf/RBJZ5aiiE1cudp/kwclazWzGZVWXRDgJWr42GOO+EARDwLzICHw BcgKMy69DkMAJ67IAcKqNtYAY4tmQXPGFI0GN9c+bzYZwBNUZsLfPRASV++nJ3rxwQb3lfbu8Yb mKS796FAxPmRw2rjBz4Ia3EkLNSeeoA0o0LO/wSZfvrbrOl8zBrCrcVJFao2JV1ljxBK5dUm4p6 aRO6qRLT+qVyWIkmAVgA== X-Received: by 2002:a05:600c:3b85:b0:46f:a2ba:581f with SMTP id 5b1f17b1804b1-482db49b0b4mr84546485e9.16.1769874686453; Sat, 31 Jan 2026 07:51:26 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.31]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-482dbd3953esm56113895e9.4.2026.01.31.07.51.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 31 Jan 2026 07:51:25 -0800 (PST) Message-ID: Date: Sat, 31 Jan 2026 17:51:24 +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 From: Claudiu Beznea 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 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/31/26 17:47, Claudiu Beznea wrote: > > > 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. Ah, wait, you can't propagate it as a fix as you don't have the necessary clocks exported in device tree in the older kernels. And you are just handling it in this series. > > 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 = ; >