From: Lars Povlsen <lars.povlsen@microchip.com>
To: Serge Semin <Sergey.Semin@baikalelectronics.ru>,
Mark Brown <broonie@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
Serge Semin <fancer.lancer@gmail.com>,
"Lars Povlsen" <lars.povlsen@microchip.com>,
Peter Rosin <peda@axentia.se>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
<linux-spi@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 5/8] dt-bindings: snps,dw-apb-ssi: Add sparx5 support, plus snps,rx-sample-delay-ns property
Date: Tue, 14 Jul 2020 10:30:51 +0200 [thread overview]
Message-ID: <87zh82jy6c.fsf@soft-dev15.microsemi.net> (raw)
In-Reply-To: <20200713195219.xfvqknioqw7yyr74@mobilestation>
Serge Semin writes:
> On Mon, Jul 13, 2020 at 01:22:59PM -0600, Rob Herring wrote:
>> On Thu, Jul 02, 2020 at 12:13:28PM +0200, Lars Povlsen wrote:
> ...
>>
>> > +
>> > patternProperties:
>> > "^.*@[0-9a-f]+$":
>> > type: object
>> > @@ -107,6 +122,14 @@ patternProperties:
>> > spi-tx-bus-width:
>> > const: 1
>> >
>> > + snps,rx-sample-delay-ns:
>>
>
>> We already have 'rx-sample-delay-ns' from Rockchip SPI, so use that. But
>> note that it applies to the SPI node. Does this need to be per SPI
>> child?
>
> It was me, who suggested to Lars to have that parameter moved to the SPI
> sub-nodes. As I see it the property is highly dependent on the SPI slave device
> the controller is communicating to. Some of the them may need the delay some
> may not. It's not always the capacitance thing, but also depends on how good
> the MISO signal a particular slave generates. So IMO the Rockchip SPI driver
> developer should have moved that property to the sub-nodes too.
>
In the case with sparx5, having two bus interfaces, spi slaves may be on
different busses - making it obvious why you may need different settings.
But I guess even on the same bus the physical length of SPI connections
and device response delay to each device could play in as well.
Nevertheless, it *does* make sense to be able to specify per slave, but
a default could make the DT more terse. Should I add this to my patch?
I will remove the "snps," prefix now that the property is globally
established.
---Lars
> On the other hand if the Rx errors are caused by the MISO lane capacitance,
> then it will be cumbersome to have the same property duplicated for each
> sub-node. Then what about having the property supported by both the SPI
> controller and the SPI-child nodes? For instance the SPI-controller
> "rx-sample-delay-ns" will provide a default sample delay for each sub-node
> instead of zero by default, while the individual sub-node "rx-sample-delay-ns"
> property can be used to override the default value.
>
> -Sergey
>
>>
>> BTW, the Rockchip controller appears to be a version of the DW
>> controller.
>>
>> > + description: SPI Rx sample delay offset, unit is nanoseconds.
>> > + The delay from the default sample time before the actual
>> > + sample of the rxd input signal occurs. The "rx_sample_delay"
>> > + is an optional feature of the designware controller, and the
>> > + upper limit is also subject to controller configuration.
>> > + $ref: /schemas/types.yaml#/definitions/uint32
>> > +
>> > unevaluatedProperties: false
>> >
>> > required:
>> > @@ -129,5 +152,10 @@ examples:
>> > num-cs = <2>;
>> > cs-gpios = <&gpio0 13 0>,
>> > <&gpio0 14 0>;
>> > + spi-flash@1 {
>> > + compatible = "spi-nand";
>> > + reg = <1>;
>> > + snps,rx-sample-delay-ns = <7>;
>> > + };
>> > };
>> > ...
>> > --
>> > 2.27.0
--
Lars Povlsen,
Microchip
next prev parent reply other threads:[~2020-07-14 8:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 10:13 [PATCH v3 0/8] spi: Adding support for Microchip Sparx5 SoC Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 1/8] spi: dw: Add support for RX sample delay register Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 2/8] arm64: dts: sparx5: Add SPI controller and SPI mux Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 3/8] spi: dw: Add Microchip Sparx5 support Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 4/8] mux: sparx5: Add Sparx5 SPI mux driver Lars Povlsen
2020-07-02 11:33 ` Lars Povlsen
2020-07-02 11:36 ` Peter Rosin
2020-07-03 9:14 ` Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 5/8] dt-bindings: snps,dw-apb-ssi: Add sparx5 support, plus snps,rx-sample-delay-ns property Lars Povlsen
2020-07-13 19:22 ` Rob Herring
2020-07-13 19:52 ` Serge Semin
2020-07-14 8:30 ` Lars Povlsen [this message]
2020-07-02 10:13 ` [PATCH v3 6/8] dt-bindings: microchip,sparx5-spi-mux: Add Sparx5 SPI mux driver bindings Lars Povlsen
2020-07-13 19:29 ` Rob Herring
2020-07-14 8:52 ` Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 7/8] arm64: dts: sparx5: Add spi-nor support Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 8/8] arm64: dts: sparx5: Add spi-nand devices Lars Povlsen
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=87zh82jy6c.fsf@soft-dev15.microsemi.net \
--to=lars.povlsen@microchip.com \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=UNGLinuxDriver@microchip.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fancer.lancer@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=peda@axentia.se \
--cc=robh@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