public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
Date: Fri, 4 Nov 2022 19:00:31 +0200	[thread overview]
Message-ID: <20221104170031.zr76bv6u5yuxhsyq@skbuf> (raw)
In-Reply-To: <6056fe63-26f8-bbda-112a-5b7cf25570ad@linaro.org>

On Fri, Nov 04, 2022 at 09:09:02AM -0400, Krzysztof Kozlowski wrote:
> It is not valid to put spi-max-frequency = 1 GHz in
> spi-peripheral-props.yaml.
...
> IOW, CPHA/CPOL are not valid for most devices, so they cannot be in
> spi-peripheral-props.yaml.

Your understanding of SPI clock polarity/phase is probably not the same
as mine. "Not valid for most devices" is a gross misrepresentation.
There are 4 electrical modes of communication between a SPI controller
and a peripheral, formed by the 0/1 combination of the CPOL and CPHA bits.
Some peripherals support only a subset of these modes of operation, that
is completely true and I agree with it. But they're still SPI devices,
and all 4 modes of communication apply to them all. That's why I made
the comparison with the 1 GHz frequency. The spi-peripheral-props.yaml
schema only says what properties are valid for a peripheral, and both
CPOL and CPHA are valid for all SPI peripherals, even if some combos
don't work (when neither spi-cpol nor spi-cpha is present, they are 0
and 0, so the connection works in SPI mode 0).

      parent reply	other threads:[~2022-11-04 17:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 18:52 [PATCH v2] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha Krzysztof Kozlowski
2022-11-03 23:33 ` Vladimir Oltean
2022-11-04  1:44   ` Krzysztof Kozlowski
2022-11-04  2:03     ` Vladimir Oltean
2022-11-04 13:09       ` Krzysztof Kozlowski
2022-11-04 16:52         ` Vladimir Oltean
2022-11-04 17:13           ` Krzysztof Kozlowski
2022-11-04 17:31             ` Vladimir Oltean
2022-11-04 17:00         ` Vladimir Oltean [this message]

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=20221104170031.zr76bv6u5yuxhsyq@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=vivien.didelot@gmail.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