From: Sean Anderson <sean.anderson@linux.dev>
To: David Lechner <dlechner@baylibre.com>,
Mark Brown <broonie@kernel.org>,
Michal Simek <michal.simek@amd.com>,
linux-spi@vger.kernel.org
Cc: "Jinjie Ruan" <ruanjinjie@huawei.com>,
linux-arm-kernel@lists.infradead.org,
"Amit Kumar Mahapatra" <amit.kumar-mahapatra@amd.com>,
linux-kernel@vger.kernel.org,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Conor Dooley" <conor+dt@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Rob Herring" <robh@kernel.org>,
devicetree@vger.kernel.org,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>
Subject: Re: [PATCH 1/7] dt-bindings: spi: zynqmp-qspi: Split the bus
Date: Thu, 23 Jan 2025 17:37:16 -0500 [thread overview]
Message-ID: <2784cc3b-0b8f-4116-b34d-0de4ff56cf92@linux.dev> (raw)
In-Reply-To: <6afc379a-2f9f-4462-ae30-ef6945a83236@baylibre.com>
On 1/23/25 16:59, David Lechner wrote:
> On 1/23/25 10:24 AM, Sean Anderson wrote:
>> On 1/21/25 19:16, David Lechner wrote:
>>> On 1/16/25 5:21 PM, Sean Anderson wrote:
>
> ...
>
>>> Could we make a single device connected to both buses like this work using
>>> the proposed spi-lower and spi-upper or should we consider a different binding
>>> like the one I suggested?
>>
>> If you are willing to do the work to rewrite the SPI subsystem to handle
>> this, then I don't object to it in principle. Using a property would
>> also help with forwards compatibility. On the other hand, separate
>> busses are easier to implement since they integrate better with the SPI
>> subsystem (e.g. you can just call spi_register_controller to create all
>> the slaves).
>>
>> There have been some previous patches from Xilinx to handle this
>> use case [1], but IMO they were pretty hacky. They got this feature
>> merged into U-Boot and it broke many other boards and took a lot of
>> cleanup to fix. So I have intentionally only tackled the unsynchronized
>> use case since that requires no modification to areas outside of this
>> driver. I don't need the "parallel" use case and I am not interested in
>> doing the work required to implement it.
>>
>> --Sean
>>
>> [1] https://lore.kernel.org/linux-spi/20221017121249.19061-1-amit.kumar-mahapatra@amd.com/
>
> Fair enough, and I think it can be done without breaking things like the multi
> CS support did.
>
> Here are a couple of patches. Feel free to resubmit them with your series if
> they work for you. To make it work with your series, you should just need to
> modify the .dts to look like this:
>
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-buses = <0>; /* lower */
> + };
> +
> + flash@1 {
> + reg = <1>;
> + compatible = "jedec,spi-nor";
> + /* also OK to omit property in case of spi-buses = <0>; */
> + };
> +
> + flash@2 {
> + reg = <2>;
> + compatible = "jedec,spi-nor";
> + spi-buses = <1>; /* upper */
> + };
>
>
> Then drop patch "spi: zynqmp-gqspi: Split the bus" of course.
>
> In zynqmp_qspi_probe(), add a line:
>
> ctlr->num_buses = 2;
>
> And in the zynqmp_qspi_transfer_one() function, use spi->buses to select the
> correct bus:
>
> xqspi->genfifobus = FIELD_PREP(GQSPI_GENFIFO_BUS_MASK, spi->buses);
>
> I don't have a SPI controller on hand with multiple buses, so I don't have
> any patch adding support to a specific controller. But I did build and run this
> and hacked in some stuff to the drivers I am working on to make sure it is
> working as advertised as best as I could with a single bus.
Your patches LGTM. I will use them for v2. Mark do you have any comments on this
approach?
--Sean
next prev parent reply other threads:[~2025-01-23 22:39 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 23:21 [PATCH 0/7] spi: zynqmp-gqspi: Split the bus and add GPIO support Sean Anderson
2025-01-16 23:21 ` [PATCH 1/7] dt-bindings: spi: zynqmp-qspi: Split the bus Sean Anderson
2025-01-22 0:16 ` David Lechner
2025-01-23 16:24 ` Sean Anderson
2025-01-23 21:59 ` David Lechner
2025-01-23 22:37 ` Sean Anderson [this message]
2025-01-24 13:35 ` Mark Brown
2025-06-12 23:44 ` Sean Anderson
2025-06-13 14:20 ` David Lechner
2025-06-13 15:57 ` Sean Anderson
2025-06-13 16:44 ` Sean Anderson
2025-06-13 16:53 ` David Lechner
2025-01-16 23:21 ` [PATCH 2/7] spi: zynqmp-gqspi: Pass speed/mode directly to config_op Sean Anderson
2025-01-16 23:21 ` [PATCH 3/7] spi: zynqmp-gqspi: Configure SPI mode dynamically Sean Anderson
2025-01-16 23:21 ` [PATCH 4/7] spi: zynqmp-gqspi: Refactor out controller initialization Sean Anderson
2025-01-16 23:21 ` [PATCH 5/7] spi: zynqmp-gqspi: Split the bus Sean Anderson
2025-01-21 13:19 ` Mahapatra, Amit Kumar
2025-01-21 15:53 ` Sean Anderson
2025-01-21 16:01 ` Mark Brown
2025-01-21 16:17 ` Sean Anderson
2025-01-16 23:21 ` [PATCH 6/7] spi: zynqmp-gqspi: Support GPIO chip selects Sean Anderson
2025-01-16 23:21 ` [PATCH 7/7] ARM64: xilinx: zynqmp: Convert to split QSPI bus Sean Anderson
2025-01-16 23:24 ` [PATCH 0/7] spi: zynqmp-gqspi: Split the bus and add GPIO support Sean Anderson
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=2784cc3b-0b8f-4116-b34d-0de4ff56cf92@linux.dev \
--to=sean.anderson@linux.dev \
--cc=amit.kumar-mahapatra@amd.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=miquel.raynal@bootlin.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=ruanjinjie@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.