From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 9321E3B6C17 for ; Mon, 15 Jun 2026 22:01:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781560902; cv=none; b=giGjTN/7BshUVMR9sSIWVGgr0aJBFKxg72iz3Vte/yTkiJCWR5/PvCjQVuL5pIJwZRAUQEOprHvKLi9xcUBW+vjv8hYFIm6bZWB2tEqfyukiZ+o+DDJ+hoocYlz/dHV1bmhvjXJMh57llQhEOPjKGPDPG2Pu5yVQp2rk/Zj6eFM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781560902; c=relaxed/simple; bh=KQya+UdDlavUkX/Dssd0LzS1SHmdLAk2q4vV5a+8SBM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YcbRcHPV6fplO06H5O5gMouxc0ToC2KYDZd4DHQzkhdGvy8aV+5qiZfGnpty1WkCMwD19zn8gVZZCUirb0QntiOdZro6qo0iuQf2IPh+PVgMU7TwzSLG1AKFbtOaDLHGDZldUDt4NYcYK4ysyAJ+Fbf8wTHjndHJIpdcyAuyxLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JH5Z5qNN; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=oIEGhYRe; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JH5Z5qNN"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="oIEGhYRe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781560900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=baYX1Qtzf/n+O1i7trf2KNQTHTp/T36Knv9xiG+6gR8=; b=JH5Z5qNN59p9SJ+eEdx80qhOKxLbU03oMIfTQBJAd5YgY9LNhcEoF0tQXAm8pVj1Gm6MPI QHj4dkmFRdJTun34UShFEnZf4oXW2hvdjmswE0F+rRoD8c/0hA1V4ztiFXsTSloZC4xPO1 QOCmBCq3W3BfY7twIDhtTV4IPp4W7HM= Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-26-CDwlnxWoPfaEV7ZP2n2WJg-1; Mon, 15 Jun 2026 18:01:39 -0400 X-MC-Unique: CDwlnxWoPfaEV7ZP2n2WJg-1 X-Mimecast-MFC-AGG-ID: CDwlnxWoPfaEV7ZP2n2WJg_1781560899 Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-4867683976aso5319257b6e.0 for ; Mon, 15 Jun 2026 15:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1781560899; x=1782165699; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=baYX1Qtzf/n+O1i7trf2KNQTHTp/T36Knv9xiG+6gR8=; b=oIEGhYReqAd+KDF2ru4E89MAZ59pndWgn8PbK0DyUmd+FIG5MIUWGo0e6iReycdrR/ 0baWBIdLsRRTEpK5BjuSsR8HrgpyLQekREOepgUBJ5+q+JReTbB9txuTgtt0IzlpdQMA u0iJGSw10Y7FzdOnHs2D8gY7/W8HILf+dNzDcEfBvLcCP84yMH1NvVmwoPfSu6Y7nZcG qgfXR3ez4lpZkOpjKjzereqy0wJzOyhcR7LLwse/jHGOsRbsLnnGF3kalbeIVA3ZWHB3 uU91qoWkDjOyBZSu2+nzCwnvoH4/6u1+k3pSxXEHyM5Fz2O4iC5Q6Kt8QlkHthTBY1MX uKDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781560899; x=1782165699; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=baYX1Qtzf/n+O1i7trf2KNQTHTp/T36Knv9xiG+6gR8=; b=CFvFKcd1VDROHuwclNjIJetv48AWJ4JUjwz8SQAgjKnn0A3sa0o8K1P5m13+OMbKVd ybQq0+8fajAa6G9YgIpR1PSnd23QmDNIIPvE3HYYH+0Ne4Oo9iijfGq9FIy4Ki3HU/De wfVtYJ67oVVPqVTf2xwolwpQyy6sPL479nL0mVI8aaorD9IWxjSNdQDZGMQJFR80vdDo +W5CBYcFjcUZxcbaFlX5XyvgMOV8CkfA669yOpf7VbXjyWONh9ytUDsFI6DLvs7pSWA+ QyRkMLmleldd5iOS30f/UxFzHRK6aLuuGlqr4czl9SwMNxi9JcP3eqnjt0XiYKfTs6MK ND6A== X-Forwarded-Encrypted: i=1; AFNElJ/eYcGlTj0cB6KiXi4/HvTFxjJrBpzbhSRN0r0oBBmjFacMeoYHoct/p+Np3EeOs8xTcQN+4Dpelk7Kp2o=@vger.kernel.org X-Gm-Message-State: AOJu0YxBPeftgtCoj9+BmniUyERd7MJIBaQLGOcqhoI+Z0PN9Qkn++cC 9iVWi9AhUP/6kCvZ4R6mKST6/xugX+qrMi+rVuzJBnu7lTPI9PGCNLgnUZNTplU3VKcWEgYvTbp +xRJt2lkQAZbN26nrxmDGQxrsdjXjRMSYe8CcyRLwWD6EKU8Ah4AhR2wYKgs+wSCqqw== X-Gm-Gg: Acq92OG2r9DHbaHZWbuazwmhst6o+IrNvmh03cKEfqM6gET7GGImUUgVkwKlIn5BKg0 fD9YohKPacY5ss0x5cl5Ss5qnj8ZELvHUoeGlFPqy6C5gjpPphgxLeF5bWAZedWvNBW0AMluM0U Lb5Vvsy0UTsTeDP+3S9zrXj1FSDB0xXUzKrMXauV4KeG+yBcUiAyedIN6sYqh+qqHKj4HOu6NCj VLpfYDnGlnnOk/l9yxwuvQ36ARc+CX5JZSkjJpFcoMQ1Nu6boURZ3Vgy3/Mt0133sRygIl2XDCc +p94EHB7oSh55StYY269AejuBS3qqrZbD4uHDu967bHus59zcAI2Nd4V2a9R9VKC9bDvCz+/Qpv LrVFXR0mU/130tv2KGYunNohGgLMGNTABlfdmkAmQrbiVg8qipYHgASga X-Received: by 2002:a05:6808:159b:b0:487:5b1f:2bce with SMTP id 5614622812f47-4875b1ffd23mr5600480b6e.36.1781560898277; Mon, 15 Jun 2026 15:01:38 -0700 (PDT) X-Received: by 2002:a05:6808:159b:b0:487:5b1f:2bce with SMTP id 5614622812f47-4875b1ffd23mr5600362b6e.36.1781560897194; Mon, 15 Jun 2026 15:01:37 -0700 (PDT) Received: from redhat.com (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-517fb61eaf4sm120318231cf.4.2026.06.15.15.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 15:01:36 -0700 (PDT) Date: Mon, 15 Jun 2026 18:01:34 -0400 From: Brian Masney To: V.Yurkov.EXT@bruker.com Cc: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Vyacheslav Yurkov Subject: Re: [PATCH v3 1/2] dt-bindings: Add GPIO-locked fixed clock Message-ID: References: <20260603-feature-clock-guard-v3-0-01cca0aa04a5@bruker.com> <20260603-feature-clock-guard-v3-1-01cca0aa04a5@bruker.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260603-feature-clock-guard-v3-1-01cca0aa04a5@bruker.com> User-Agent: Mutt/2.3.1 (2026-03-20) Hi Vyacheslav, On Wed, Jun 03, 2026 at 11:16:42AM +0000, Vyacheslav Yurkov via B4 Relay wrote: > From: Vyacheslav Yurkov > > Some hardware designs provide fixed-frequency clocks generated outside > software control, such as by FPGA-resident PLLs. While the clock rate is > fixed, a separate GPIO signal indicates whether the clock source is > locked and producing a valid output. > > Describe a GPIO-locked fixed clock provider that exposes a fixed-rate > clock whose availability depends on one or more GPIO lock-status > signals. > > Signed-off-by: Vyacheslav Yurkov > Signed-off-by: Vyacheslav Yurkov > --- > .../bindings/clock/gpio-locked-fixed-clock.yaml | 70 ++++++++++++++++++++++ > 1 file changed, 70 insertions(+) > > diff --git a/Documentation/devicetree/bindings/clock/gpio-locked-fixed-clock.yaml b/Documentation/devicetree/bindings/clock/gpio-locked-fixed-clock.yaml > new file mode 100644 > index 000000000000..9106b800b673 > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/gpio-locked-fixed-clock.yaml > @@ -0,0 +1,70 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/clock/gpio-locked-fixed-clock.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: GPIO Locked Fixed Clock > + > +maintainers: > + - Vyacheslav Yurkov > + > +description: | > + Provides a clock output whose availability depends on a set of > + prerequisite conditions. These conditions include the presence of > + one or more parent clocks and the asserted state of one or more > + GPIO lock indicators. An example of such clocks is FPGA clock that > + are outside CPU control, with the lock status exposed through GPIO > + signal. > + > + The output clock is considered available only when all configured > + prerequisites are satisfied. I'm stepping outside my usual review of just the clk drivers. Krzysztof in v1 and v2 asked for more detailed hardware explanation. This feels to me like this is a policy that says to not use these clocks until the GPIO says they are ready. My gut feeling is that details like this should live in a clk driver instead of a dt-binding. Alternatively, if this is generic enough, then could Documentation/devicetree/bindings/clock/gated-fixed-clock.yaml be extended? Brian > + > +properties: > + compatible: > + const: gpio-locked-fixed-clock > + > + "#clock-cells": > + const: 0 > + > + clocks: > + description: Input clocks whose validity is monitored by this provider. > + > + clock-output-names: > + description: Names of the clock provided by this controller. > + maxItems: 1 > + > + locked-gpios: > + description: | > + GPIOs to check the lock state. > + minItems: 1 > + maxItems: 32 > + > +required: > + - compatible > + - "#clock-cells" > + > +anyOf: > + - required: > + - clocks > + - required: > + - locked-gpios > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + clk_gpio_locked: gpio-locked-fixed-clock { > + compatible = "gpio-locked-fixed-clock"; > + #clock-cells = <0>; > + > + clocks = <&clk0 0>, <&pll 0>; > + > + locked-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>, > + <&gpio0 5 GPIO_ACTIVE_HIGH>, > + <&gpio1 2 GPIO_ACTIVE_LOW>; > + > + clock-output-names = "clkout0"; > + }; > > -- > 2.34.1 > >