From: Andre Przywara <andre.przywara@arm.com>
To: Samuel Holland <samuel@sholland.org>
Cc: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Mesih Kilinc <mesihkilinc@gmail.com>,
Icenowy Zheng <icenowy@aosc.io>,
Jesse Taube <mr.bossman075@gmail.com>,
Giulio Benetti <giulio.benetti@benettiengineering.com>,
George Hilliard <thirtythreeforty@gmail.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, Mark Brown <broonie@kernel.org>,
linux-spi@vger.kernel.org
Subject: Re: [PATCH 11/14] ARM: dts: suniv: F1C100: add SPI support
Date: Fri, 11 Mar 2022 13:33:14 +0000 [thread overview]
Message-ID: <20220311133314.739ebab4@donnerap.cambridge.arm.com> (raw)
In-Reply-To: <15ed4319-9645-089c-9977-94dfd2fd79c5@sholland.org>
On Thu, 10 Mar 2022 20:19:57 -0600
Samuel Holland <samuel@sholland.org> wrote:
Hi Samuel,
many thanks for having a look!
> On 3/7/22 8:34 AM, Andre Przywara wrote:
> > The F1C100 series contains two SPI controllers, and many boards use SPI0
> > for a SPI flash, as the BROM is able to boot from that.
> >
> > Describe the two controllers in the SoC .dtsi, and also add the PortC
> > pins for SPI0, since this is where BROM looks at when trying to boot
> > from the commonly used SPI flash.
> >
> > The SPI controller seems to be the same as in the H3 chips, but it lacks
> > a separate mod clock. The manual says it's connected to AHB directly.
> > We don't export that AHB clock directly, but can use the AHB *gate* clock
> > as a clock source, since the MMC driver is not supposed to change the AHB
>
> Do you mean the SPI driver here?
Yes, indeed.
>
> > frequency anyway.
> >
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > ---
> > arch/arm/boot/dts/suniv-f1c100s.dtsi | 33 ++++++++++++++++++++++++++++
> > 1 file changed, 33 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/suniv-f1c100s.dtsi b/arch/arm/boot/dts/suniv-f1c100s.dtsi
> > index 6f2f97458fe0..f8ec1c7a2ca9 100644
> > --- a/arch/arm/boot/dts/suniv-f1c100s.dtsi
> > +++ b/arch/arm/boot/dts/suniv-f1c100s.dtsi
> > @@ -105,6 +105,34 @@ mmc1: mmc@1c10000 {
> > #size-cells = <0>;
> > };
> >
> > + spi0: spi@1c05000 {
> > + compatible = "allwinner,suniv-f1c100s-spi",
> > + "allwinner,sun8i-h3-spi";
> > + reg = <0x01c05000 0x1000>;
> > + interrupts = <10>;
> > + clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_BUS_SPI0>;
> > + clock-names = "ahb", "mod";
> > + resets = <&ccu RST_BUS_SPI0>;
> > + status = "disabled";
> > + num-cs = <1>;
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + };
> > +
> > + spi1: spi@1c06000 {
> > + compatible = "allwinner,suniv-f1c100s-spi",
> > + "allwinner,sun8i-h3-spi";
> > + reg = <0x01c06000 0x1000>;
> > + interrupts = <11>;
> > + clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_BUS_SPI1>;
> > + clock-names = "ahb", "mod";
> > + resets = <&ccu RST_BUS_SPI1>;
> > + status = "disabled";
> > + num-cs = <1>;
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + };
> > +
>
> Please keep the nodes sorted by address. These should come before the MMC
> controllers.
Argh, sorry, I thought I fixed that up, but it must have messed that
up after a rebase.
Will send a fixed version.
Cheers,
Andre
>
> > ccu: clock@1c20000 {
> > compatible = "allwinner,suniv-f1c100s-ccu";
> > reg = <0x01c20000 0x400>;
> > @@ -138,6 +166,11 @@ mmc0_pins: mmc0-pins {
> > drive-strength = <30>;
> > };
> >
> > + spi0_pc_pins: spi0-pc-pins {
> > + pins = "PC0", "PC1", "PC2", "PC3";
> > + function = "spi0";
> > + };
> > +
> > uart0_pe_pins: uart0-pe-pins {
> > pins = "PE0", "PE1";
> > function = "uart0";
> >
>
next prev parent reply other threads:[~2022-03-11 13:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220307143421.1106209-1-andre.przywara@arm.com>
2022-03-07 14:34 ` [PATCH 10/14] dt-bindings: spi: sunxi: document F1C100 controllers Andre Przywara
2022-03-08 16:10 ` Rob Herring
2022-03-11 2:19 ` Samuel Holland
2022-03-07 14:34 ` [PATCH 11/14] ARM: dts: suniv: F1C100: add SPI support Andre Przywara
2022-03-11 2:19 ` Samuel Holland
2022-03-11 13:33 ` Andre Przywara [this message]
2022-03-07 14:34 ` [PATCH 12/14] ARM: dts: suniv: licheepi-nano: add SPI flash Andre Przywara
2022-03-11 2:20 ` Samuel Holland
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=20220311133314.739ebab4@donnerap.cambridge.arm.com \
--to=andre.przywara@arm.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=giulio.benetti@benettiengineering.com \
--cc=icenowy@aosc.io \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mesihkilinc@gmail.com \
--cc=mr.bossman075@gmail.com \
--cc=mripard@kernel.org \
--cc=robh+dt@kernel.org \
--cc=samuel@sholland.org \
--cc=thirtythreeforty@gmail.com \
--cc=wens@csie.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).