All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Taniya Das <taniya.das@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	 Abel Vesa <abelvesa@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
	 Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	 Linus Walleij <linusw@kernel.org>,
	Richard Cochran <richardcochran@gmail.com>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Ajit Pandey <ajit.pandey@oss.qualcomm.com>,
	 Imran Shaik <imran.shaik@oss.qualcomm.com>,
	Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>,
	 linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v2 01/12] dt-bindings: clock: qcom: Add bindings for PDM GP_MN clock divider
Date: Tue, 27 Oct 2026 19:47:39 +0100	[thread overview]
Message-ID: <20261027-inescapable-rough-viper-6cd56d@quoll> (raw)
In-Reply-To: <20261026-b4-pdm_clk_gp_mnd_v2-v2-1-ff8e4bc8d567@oss.qualcomm.com>

On Mon, Oct 26, 2026 at 04:59:27PM +0530, Taniya Das wrote:
> Add device tree bindings for the Qualcomm Peripheral Web's PDM GP_MN
> clock divider. The hardware generates a fractional output frequency
> from a fixed input clock (typically TCXO4) using the relation
> Fout = Fin * (M / N), with duty cycle controlled by a separate D
> register. The clock output is routed over a gpio controlled pin.
> 
> Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
> ---
>  .../devicetree/bindings/clock/qcom,clk-gp-mnd.yaml | 98 ++++++++++++++++++++++
>  1 file changed, 98 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,clk-gp-mnd.yaml b/Documentation/devicetree/bindings/clock/qcom,clk-gp-mnd.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..8141f392c5d70acfc42cf1ff4b1722e1eff23afa
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,clk-gp-mnd.yaml

Use fallback as filename, so qcom,sc7280-gp-mnd.yaml

> @@ -0,0 +1,98 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/qcom,clk-gp-mnd.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Peripheral Web's PDM GP_MN Clock Divider
> +
> +maintainers:
> +  - Taniya Das <taniya.das@oss.qualcomm.com>
> +
> +description: |
> +  The Peripheral Web's PDM GP_MN clock divider receives an input clock
> +  (TCXO4) with frequency Fin and generates an output clock with
> +  frequency Fout = Fin * (M / N) and a duty cycle controlled by D
> +  and routed over a gpio pin.
> +
> +  The divider is configured using three registers:
> +
> +  - GP_MN_CLK_MDIV: holds the M value.
> +  - GP_MN_CLK_NDIV: holds the ones complement of (N - M).
> +  - GP_MN_CLK_DUTY: holds the D value.
> +
> +  For every N input clock cycles the GP_MN produces M output clock
> +  cycles. D is the number of native clock cycles in which the GP_MN
> +  output is low, counted over 2^13 native clock cycles.
> +
> +  Hardware constraints:
> +
> +    M <= 511
> +    N <= 8191
> +    N > 2 * M
> +    M < D < (N - M)
> +    M and N must be coprime (no common divisor)
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: qcom,sc7280-gp-mnd
> +      - items:
> +          - enum:
> +              - qcom,sa8775p-gp-mnd
> +              - qcom,qcs8300-gp-mnd
> +              - qcom,qcs615-gp-mnd
> +          - const: qcom,sc7280-gp-mnd
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    items:
> +      - description: PDM XO4 source clock
> +      - description: PDM AHB bus clock for register access
> +
> +  clock-names:
> +    items:
> +      - const: pdm_clk

pdm

> +      - const: ahb_clk

ahb

> +
> +  '#clock-cells':
> +    const: 0
> +
> +  assigned-clocks:
> +    maxItems: 1
> +    description: Parent clock phandle used to set the input frequency.
> +
> +  assigned-clock-rates:
> +    maxItems: 1
> +    description: |
> +      Rate for the parent clock in Hz.
> +      Supported rates: 19200000, 9600000, 6400000, 4800000.

Neither assigned-clocks nor assigned-clock-rates should be needed.
Parent clock is outside of scope of this binding.


> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - '#clock-cells'
> +  - assigned-clocks
> +  - assigned-clock-rates

And these two should not be required, either.

Best regards,
Krzysztof


  parent reply	other threads:[~2026-10-27 18:47 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 11:29 [PATCH v2 00/12] clk: qcom: Add PDM GP_MN fractional clock divider driver and DT support Taniya Das
2026-10-26 11:29 ` [PATCH v2 01/12] dt-bindings: clock: qcom: Add bindings for PDM GP_MN clock divider Taniya Das
2026-10-27 11:31   ` sashiko-bot
2026-10-27 18:47   ` Krzysztof Kozlowski [this message]
2026-10-29 10:57     ` Taniya Das
2026-10-26 11:29 ` [PATCH v2 02/12] dt-bindings: clock: qcom: Add PDM XO4 divider clock IDs Taniya Das
2026-10-28 11:28   ` Krzysztof Kozlowski
2026-10-26 11:29 ` [PATCH v2 03/12] clk: qcom: Add a driver for PDM GP_MN fractional clock divider Taniya Das
2026-10-27 11:31   ` sashiko-bot
2026-10-26 11:29 ` [PATCH v2 04/12] clk: qcom: gcc: Add configurable PDM XO4 div clocks across targets Taniya Das
2026-10-26 15:04   ` Abel Vesa
2026-10-26 11:29 ` [PATCH v2 05/12] pinctrl: qcom: qcs8300: Add gp_mn mux function Taniya Das
2026-10-26 11:29 ` [PATCH v2 06/12] pinctrl: qcom: sa8775p: " Taniya Das
2026-10-26 11:29 ` [PATCH v2 07/12] pinctrl: qcom: sc7280: " Taniya Das
2026-10-26 11:29 ` [PATCH v2 08/12] pinctrl: qcom: qcs615: " Taniya Das
2026-10-28 15:32   ` Abel Vesa
2026-10-29  8:15   ` Konrad Dybcio
2026-10-26 11:29 ` [PATCH v2 09/12] arm64: dts: qcom: qcs8300: Add GP M/N clock controller Taniya Das
2026-10-27 11:31   ` sashiko-bot
2026-10-26 11:29 ` [PATCH v2 10/12] arm64: dts: qcom: sa8775p: " Taniya Das
2026-10-27 11:31   ` sashiko-bot
2026-10-26 11:29 ` [PATCH v2 11/12] arm64: dts: qcom: sc7280: " Taniya Das
2026-10-26 16:27   ` Abel Vesa
2026-10-27 11:31   ` sashiko-bot
2026-10-26 11:29 ` [PATCH v2 12/12] arm64: dts: qcom: qcs615: " Taniya Das
2026-10-26 16:27   ` Abel Vesa
2026-10-27 11:31   ` sashiko-bot
2026-10-28  9:44 ` [PATCH v2 00/12] clk: qcom: Add PDM GP_MN fractional clock divider driver and DT support Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261027-inescapable-rough-viper-6cd56d@quoll \
    --to=krzk@kernel.org \
    --cc=abelvesa@kernel.org \
    --cc=ajit.pandey@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=bmasney+clk@redhat.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imran.shaik@oss.qualcomm.com \
    --cc=jagadeesh.kona@oss.qualcomm.com \
    --cc=jbrunet+clk@baylibre.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=taniya.das@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.