From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Stanley Chu <stanley.chuys@gmail.com>,
robh@kernel.org, krzk+dt@kernel.org,
linux-i3c@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org,
tomer.maimon@nuvoton.com, kwliu@nuvoton.com, yschu@nuvoton.com,
cpchiang1@nuvoton.com
Subject: Re: [PATCH v1 1/2] dt-bindings: i3c: Add NPCM845 i3c controller
Date: Fri, 2 Aug 2024 01:06:31 +0200 [thread overview]
Message-ID: <202408012306316257ee23@mail.local> (raw)
In-Reply-To: <c3ee7783-6891-4917-9935-21d46d8ac9a7@kernel.org>
On 01/08/2024 16:53:52+0200, Krzysztof Kozlowski wrote:
> On 01/08/2024 09:19, Stanley Chu wrote:
> > The npcm845 i3c devicetree binding follows the basic i3c bindings
> > and add the properties for allowing to adjust the SDA/SCL timing
> > to meet different requirements.
> >
> > Signed-off-by: Stanley Chu <yschu@nuvoton.com>
> > Signed-off-by: James Chiang <cpchiang1@nuvoton.com>
> > ---
> > .../bindings/i3c/nuvoton,i3c-master.yaml | 123 ++++++++++++++++++
>
> Use compatible as filename. Anyway word "master" was dropped.
>
> > 1 file changed, 123 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/i3c/nuvoton,i3c-master.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/i3c/nuvoton,i3c-master.yaml b/Documentation/devicetree/bindings/i3c/nuvoton,i3c-master.yaml
> > new file mode 100644
> > index 000000000000..a40b37b16872
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/i3c/nuvoton,i3c-master.yaml
> > @@ -0,0 +1,123 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/i3c/nuvoton,i3c-master.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Nuvoton NPCM845 I3C master
>
> Use new terminology. Since 2021 there was a change... three years ago.
>
> > +
> > +maintainers:
> > + - Stanley Chu <yschu@nuvoton.com>
> > + - James Chiang <cpchiang1@nuvoton.com>
> > +
> > +allOf:
> > + - $ref: i3c.yaml#
> > +
> > +properties:
> > + compatible:
> > + const: nuvoton,npcm845-i3c
> > +
> > + reg:
> > + items:
> > + - description: I3C registers
> > + - description: GDMA registers
> > + - description: GDMA request control register
> > +
> > + reg-names:
> > + items:
> > + - const: i3c
> > + - const: dma
> > + - const: dma_ctl
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + clocks:
> > + items:
> > + - description: system clock
> > + - description: bus clock
> > +
> > + clock-names:
> > + items:
> > + - const: pclk
> > + - const: fast_clk
> > +
> > + resets:
> > + maxItems: 1
> > +
> > + i3c-pp-scl-hi-period-ns:
> > + description: |
>
> Do not need '|' unless you need to preserve formatting.
>
> > + If need to configure SCL with required duty cycle, specify the clock high/low period directly.
> > + i3c-pp-scl-hi-perios-ns specifies the high period ns of the SCL clock cycle in push pull mode
> > + When i3c-pp-scl-hi-period-ns and i3c-pp-scl-lo-period-ns are specified, the i3c pp frequency is
> > + decided by these two properties.
>
> Wrap according to Linux Coding Style (and read coding style to figure
> the proper wrapping...).
>
> > +
> > + i3c-pp-scl-lo-period-ns:
> > + description: |
> > + The low period ns of the SCL clock cycle in push pull mode. i3c-pp-scl-lo-period-ns should not
> > + be less than i3c-pp-scl-hi-period-ns and the maximal value is i3c-pp-scl-hi-period-ns + 150.
>
> Everywhere: defaults, constraints.
>
> > +
> > + i3c-pp-sda-rd-skew:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: |
> > + The number of MCLK clock periods to delay the SDA transition from the SCL clock edge at push
> > + pull operation when transfers i3c private read.
> > + maximum: 7
> > + default: 0
> > +
> > + i3c-pp-sda-wr-skew:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: |
> > + The number of MCLK clock periods to delay the SDA transition from the SCL clock edge at push
> > + pull operation when transfers i3c private write.
> > + maximum: 7
> > + default: 0
> > +
> > + i3c-od-scl-hi-period-ns:
> > + description: |
> > + The i3c open drain frequency is 1MHz by default.
> > + If need to use different frequency, specify the clock high/low period directly.
> > + i3c-od-scl-hi-perios-ns specifies the high period ns of the SCL clock cycle in open drain mode.
> > + When i3c-od-scl-hi-period-ns and i3c-od-scl-lo-period-ns are specified, the i3c od frequency is
> > + decided by these two properties.
> > + i3c-od-scl-hi-period-ns should be equal to i3c-pp-scl-hi-period-ns or i3c-od-scl-lo-period-ns.
> > +
> > + i3c-od-scl-lo-period-ns:
> > + description: |
> > + The low period ns of the SCL clock cycle in open drain mode. i3c-od-scl-lo-period-ns should be
> > + multiple of i3c-pp-scl-hi-period-ns.
> > +
> > + enable-hj:
> > + type: boolean
> > + description: |
> > + Enable SLVSTART interrupt for receiving hot-join request.
>
> You described the desired Linux feature or behavior, not the actual
> hardware. The bindings are about the latter, so instead you need to
> rephrase the property and its description to match actual hardware
> capabilities/features/configuration etc.
>
This has to be runtime configurable, see hotjoin in
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-i3c
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2024-08-01 23:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 7:19 [PATCH v1 0/2] Add Nuvoton NPCM845 i3c master driver Stanley Chu
2024-08-01 7:19 ` [PATCH v1 1/2] dt-bindings: i3c: Add NPCM845 i3c controller Stanley Chu
2024-08-01 14:53 ` Krzysztof Kozlowski
2024-08-01 23:06 ` Alexandre Belloni [this message]
2024-08-05 5:37 ` Stanley Chu
2024-08-05 6:04 ` Stanley Chu
2024-08-01 14:57 ` Krzysztof Kozlowski
2024-08-01 7:19 ` [PATCH v1 2/2] i3c: master: Add Nuvoton npcm845 i3c master driver Stanley Chu
2024-08-01 8:42 ` [PATCH " Markus Elfring
2024-08-01 15:02 ` Krzysztof Kozlowski
2024-08-01 9:06 ` Markus Elfring
2024-08-01 15:02 ` [PATCH v1 " Krzysztof Kozlowski
2024-08-05 6:27 ` Stanley Chu
2024-08-02 16:16 ` Frank Li
2024-08-05 7:19 ` Stanley Chu
2024-08-05 15:17 ` Frank Li
2024-08-06 0:47 ` Stanley Chu
2024-08-06 3:08 ` Frank Li
2024-08-02 21:53 ` kernel test robot
2024-08-02 23:25 ` kernel test robot
2024-08-03 2:12 ` kernel test robot
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=202408012306316257ee23@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=cpchiang1@nuvoton.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=kwliu@nuvoton.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=robh@kernel.org \
--cc=stanley.chuys@gmail.com \
--cc=tomer.maimon@nuvoton.com \
--cc=yschu@nuvoton.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox