From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Hsin-Yi Wang <hsinyi@chromium.org>, Michael Walle <michael@walle.cc>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Bjorn Andersson <andersson@kernel.org>,
Pratyush Yadav <pratyush@kernel.org>,
"Miquel Raynal )" <miquel.raynal@bootlin.com>,
"Richard Weinberger )" <richard@nod.at>,
"Vignesh Raghavendra )" <vigneshr@ti.com>,
Rob Herring <robh+dt@kernel.org>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
cros-qcom-dts-watchers@chromium.org,
Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: Re: [PATCH 0/4] Add a property to override the quad mode
Date: Tue, 15 Aug 2023 21:19:34 +0200 [thread overview]
Message-ID: <fb85c288-2ea9-3343-ff19-cd58940b44ec@linaro.org> (raw)
In-Reply-To: <CAJMQK-iw7ikyHKPPC8+hnpXuRq-_nq_N+21BKgWxD2nx=vAeJA@mail.gmail.com>
On 15/08/2023 19:21, Hsin-Yi Wang wrote:
> On Tue, Aug 15, 2023 at 11:59 PM Michael Walle <michael@walle.cc> wrote:
>>
>> Hi,
>>
>>> On gigadevice gd25lq64c, the quad mode is enabled after BFPT is parsed.
>>> According to datasheet[1], Quad enable (QE) bit needs to be set to 0 to
>>> use write protection (WP) pin. It also recommends setting default value of
>>> QE to 0 to avoid a potential short issue.
>>
>> So you are using either dual or single io mode. Why can't you use the device tree property spi-{tx,rx}-bus-width?
>
> I tried setting spi-tx-bus-width and spi-rx-bus-width to either 0 or 1
> and WP still doesn't work.
> For this chip, quad_enable will be set to spi_nor_sr2_bit1_quad_enable
> (QER flag is BFPT_DWORD15_QER_SR2_BIT1_BUGGY)[1]
>
> spi_nor_write_sr_and_check() calls
> spi_nor_write_16bit_sr_and_check()[2] and the function sets QE bit if
> quad_enable is not NULL.
>
> [1] https://elixir.bootlin.com/linux/latest/source/drivers/mtd/spi-nor/sfdp.c#L575
> [2] https://elixir.bootlin.com/linux/latest/source/drivers/mtd/spi-nor/core.c#L879
>
> Setting spi-{tx,rx}-bus-width still falls to this function and cases.
with tx/rx bus width = 2, how quad mode is still possible? IOW, why do
you need new property? You wrote here about driver, but I ask about
bindings.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-08-15 19:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 15:31 Hsin-Yi Wang
2023-08-15 15:31 ` [PATCH 1/4] dt-bindings: mtd: jedec,spi-nor: Add disable-quad-mode property Hsin-Yi Wang
2023-08-15 15:31 ` [PATCH 2/4] mtd: spi-nor: sfdp: read " Hsin-Yi Wang
2023-08-15 15:31 ` [PATCH 3/4] arm64: dts: mediatek: mt8183: disable quad mode for spi nor Hsin-Yi Wang
2023-08-16 11:17 ` Eugen Hristev
2023-08-15 15:31 ` [PATCH 4/4] arm64: dts: qcom: sc7180: " Hsin-Yi Wang
2023-08-15 19:32 ` Doug Anderson
2023-08-15 15:59 ` [PATCH 0/4] Add a property to override the quad mode Michael Walle
2023-08-15 17:21 ` Hsin-Yi Wang
2023-08-15 19:19 ` Krzysztof Kozlowski [this message]
2023-08-16 10:48 ` Hsin-Yi Wang
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=fb85c288-2ea9-3343-ff19-cd58940b44ec@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=hsinyi@chromium.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=vigneshr@ti.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
all inboxes | Powered by JetHome®