devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: spi: Add Socionext F_OSPI controller bindings
Date: Fri, 18 Nov 2022 11:39:07 +0000	[thread overview]
Message-ID: <Y3du24GWN/enGORf@sirena.org.uk> (raw)
In-Reply-To: <20221118005904.23557-2-hayashi.kunihiko@socionext.com>

[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]

On Fri, Nov 18, 2022 at 09:59:03AM +0900, Kunihiko Hayashi wrote:

> +  socionext,cs-start-cycle:
> +  socionext,cs-end-cycle:
> +  socionext,cs-deassert-clk-cycle:

These are all generic SPI properties so we should add them
generically, on the device rather than the controller since this
is something that might vary per client device.  There was also a
core function spi_set_cs_timing() which was in earlier versions
and is about to get reintroduced.

> +  socionext,alternative-byte:
> +    description:
> +      Specify the extra bytes to transfer after address transfer.

This just doesn't seem like something the controller should be
worrying about, the device should just send whatever the device
needs sending.  

> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    items:
> +      - description: the number of bytes to transfer
> +        maximum: 4
> +      - description: value to transfer
> +        default: 0
> +      - description: bit-width to transfer
> +        enum: [0, 1, 2, 4, 8]

This is also something SPI device should set up, as far as I can
tell this should be set vis spi_mem_op.dummy.nbytes.

> +  socionext,data-swap-2byte:
> +    description:
> +      Indicates swap byte order per 2-bytes.
> +    type: boolean

> +  socionext,data-swap-4byte:
> +    description:
> +      Indicates swap byte order per 4-bytes.
> +    type: boolean

Again these should be set by the device.  I think these should be
set based on a combination of bits per word and if the host is in
big endian or little endian mode.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-11-18 11:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18  0:59 [PATCH 0/2] Introduce Socionext F_OSPI SPI flash controller Kunihiko Hayashi
2022-11-18  0:59 ` [PATCH 1/2] dt-bindings: spi: Add Socionext F_OSPI controller bindings Kunihiko Hayashi
2022-11-18 11:39   ` Mark Brown [this message]
2022-11-18 14:16     ` Kunihiko Hayashi
2022-11-18 15:36       ` Mark Brown
2022-11-18 16:41         ` Kunihiko Hayashi
2022-11-18  0:59 ` [PATCH 2/2] spi: Add Socionext F_OSPI SPI flash controller driver Kunihiko Hayashi

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=Y3du24GWN/enGORf@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@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).