devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brenda Streiff <brenda.streiff@ni.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: ilpo.jarvinen@linux.intel.com,
	Gratian Crisan <gratian.crisan@ni.com>,
	Jason Smith <jason.smith@ni.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 tty-next 1/2] dt-bindings: serial: ni,ni16650: add bindings
Date: Thu, 13 Apr 2023 15:44:13 -0500	[thread overview]
Message-ID: <c7adbaf3-346e-cafd-e831-95f9c2900d13@ni.com> (raw)
In-Reply-To: <6f9cfd54-c8cf-7395-e7bd-c350a06c8f16@linaro.org>



On 4/13/23 02:39, Krzysztof Kozlowski wrote:
> On 13/04/2023 00:24, Brenda Streiff wrote:
>> On 4/11/23 00:44, Krzysztof Kozlowski wrote:
>>> On 10/04/2023 23:11, Brenda Streiff wrote:
>>>> +
>>>> +  interrupts:
>>>> +    maxItems: 1
>>>> +
>>>> +  clock-frequency: true
>>>
>>> I missed it last time - why do you need this property? You do not have
>>> any clock input, so which clock's frequency is it?
>>>
>>
>> This is the clock frequency of the UART; on our x86-based platforms this
>> comes from the LPC clock, on Zynq-7000 it's derived from a clock in the
>> FPGA. This is used to set struct uart_port::uartclk in the serial core,
>> as it is for other UARTs.
>>
>> This clock frequency can vary based on board design (especially on the
>> x86 side, due to different LPC clocks) but for a given design is fixed-
>> frequency.
> 
> So you must have clock input - clocks property. Once you add this, use
> assigned-clocks to get the rate you want.
> 
>>
>> Would you prefer this be documented further? I was following 8250.yaml's
>> lead here with the simple `true`.
> 
> I prefer to drop it. It is not correct and a legacy property. Without
> clock inputs how can you even configure some clock?

Configure in what respect? Software can't change this clock; it's
effectively a fixed oscillator.

In practice, this would always be pointing at a compatible="fixed-clock"
which declares a clock-frequency; this seems like "clock-frequency but
more steps". I can add that, but I'm not clear on what value that adds.

We also have shipping devices with ACPI tables using "clock-frequency",
so independent of support for "clocks" and "assigned-clocks" for
devicetree-using systems, I would still have to keep support in the
driver for a "clock-frequency" device property for ACPI-using systems.

(Is there documentation on a standalone clock-property being a legacy
property that I've missed? I don't see anything of the sort in
writing-bindings.rst or in dt-schema and I want to make sure that I
haven't missed the proper guidance here.)

  reply	other threads:[~2023-04-13 20:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 15:42 [PATCH tty-next 0/2] serial: Add driver for National Instruments UARTs Brenda Streiff
2023-03-29 15:42 ` [PATCH tty-next 1/2] dt-bindings: serial: ni,ni16650: add bindings Brenda Streiff
2023-03-29 21:40   ` Rob Herring
2023-03-30  7:28   ` Krzysztof Kozlowski
2023-03-31 17:59     ` Brenda Streiff
2023-03-31 20:00       ` Krzysztof Kozlowski
2023-03-29 15:42 ` [PATCH tty-next 2/2] serial: 8250: add driver for NI UARTs Brenda Streiff
2023-03-29 16:30   ` Greg Kroah-Hartman
2023-03-31 17:59     ` Brenda Streiff
2023-03-30  6:28   ` kernel test robot
2023-03-30  7:30   ` Krzysztof Kozlowski
2023-03-31 11:46   ` Ilpo Järvinen
2023-03-31 17:59     ` Brenda Streiff
2023-04-05 10:17       ` Ilpo Järvinen
2023-04-10 21:11 ` [PATCH v2 tty-next 0/2] serial: Add driver for National Instruments UARTs Brenda Streiff
2023-04-10 21:11   ` [PATCH v2 tty-next 1/2] dt-bindings: serial: ni,ni16650: add bindings Brenda Streiff
2023-04-11  5:44     ` Krzysztof Kozlowski
2023-04-12 22:24       ` Brenda Streiff
2023-04-13  7:39         ` Krzysztof Kozlowski
2023-04-13 20:44           ` Brenda Streiff [this message]
2023-04-14  7:42             ` Krzysztof Kozlowski
2023-04-10 21:11   ` [PATCH v2 tty-next 2/2] serial: 8250: add driver for NI UARTs Brenda Streiff
2023-04-18 22:37   ` [PATCH v3 tty-next 0/2] serial: Add driver for National Instruments UARTs Brenda Streiff
2023-04-18 22:37     ` [PATCH v3 tty-next 1/2] dt-bindings: serial: ni,ni16650: add bindings Brenda Streiff
2023-04-19  8:46       ` Krzysztof Kozlowski
2023-04-18 22:38     ` [PATCH v3 tty-next 2/2] serial: 8250: add driver for NI UARTs Brenda Streiff
2023-04-19 11:43       ` Ilpo Järvinen
2023-04-28 21:03         ` Brenda Streiff

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=c7adbaf3-346e-cafd-e831-95f9c2900d13@ni.com \
    --to=brenda.streiff@ni.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gratian.crisan@ni.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jason.smith@ni.com \
    --cc=jirislaby@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).