From: Matthias Brugger <matthias.bgg@gmail.com>
To: Frank Wunderlich <linux@fw-web.de>, linux-mediatek@lists.infradead.org
Cc: Frank Wunderlich <frank-w@public-files.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Sam Shih <sam.shih@mediatek.com>
Subject: Re: [RFC v3 02/11] arm64: dts: mt7986: add spi related device nodes
Date: Fri, 11 Nov 2022 09:54:31 +0100 [thread overview]
Message-ID: <1eb8cbba-5e8a-df34-9c0c-4d5d24de4e18@gmail.com> (raw)
In-Reply-To: <20221106085034.12582-3-linux@fw-web.de>
On 06/11/2022 09:50, Frank Wunderlich wrote:
> From: Sam Shih <sam.shih@mediatek.com>
>
> This patch adds spi support for MT7986.
>
> Signed-off-by: Sam Shih <sam.shih@mediatek.com>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 35 ++++++++++++++++++++
> arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 28 ++++++++++++++++
> arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 35 ++++++++++++++++++++
> 3 files changed, 98 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts
> index 6189436fe31d..58f7e6b169bf 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts
> @@ -55,6 +55,20 @@ switch: switch@0 {
> };
>
> &pio {
> + spi_flash_pins: spi-flash-pins {
> + mux {
> + function = "spi";
> + groups = "spi0", "spi0_wp_hold";
> + };
> + };
> +
> + spic_pins: spic-pins {
> + mux {
> + function = "spi";
> + groups = "spi1_2";
> + };
> + };
> +
> uart1_pins: uart1-pins {
> mux {
> function = "uart";
> @@ -101,6 +115,27 @@ conf {
> };
> };
>
> +&spi0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&spi_flash_pins>;
> + cs-gpios = <0>, <0>;
> + status = "okay";
> + spi_nand: spi_nand@0 {
> + compatible = "spi-nand";
> + reg = <0>;
> + spi-max-frequency = <10000000>;
> + spi-tx-buswidth = <4>;
> + spi-rx-buswidth = <4>;
> + };
> +};
> +
> +&spi1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&spic_pins>;
> + cs-gpios = <0>, <0>;
> + status = "okay";
> +};
> +
> &switch {
> ports {
> #address-cells = <1>;
> diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
> index 226648f48df2..6d881095d933 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
> @@ -112,6 +112,34 @@ infracfg: infracfg@10001000 {
> #clock-cells = <1>;
> };
>
> + spi0: spi@1100a000 {
> + compatible = "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0 0x1100a000 0 0x100>;
> + interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&topckgen CLK_TOP_MPLL_D2>,
> + <&topckgen CLK_TOP_SPI_SEL>,
> + <&infracfg CLK_INFRA_SPI0_CK>,
> + <&infracfg CLK_INFRA_SPI0_HCK_CK>;
> + clock-names = "parent-clk", "sel-clk", "spi-clk", "hclk";
> + status = "disabled";
> + };
> +
> + spi1: spi@1100b000 {
> + compatible = "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0 0x1100b000 0 0x100>;
> + interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&topckgen CLK_TOP_MPLL_D2>,
> + <&topckgen CLK_TOP_SPIM_MST_SEL>,
> + <&infracfg CLK_INFRA_SPI1_CK>,
> + <&infracfg CLK_INFRA_SPI1_HCK_CK>;
> + clock-names = "parent-clk", "sel-clk", "spi-clk", "hclk";
> + status = "disabled";
> + };
> +
> topckgen: topckgen@1001b000 {
> compatible = "mediatek,mt7986-topckgen", "syscon";
> reg = <0 0x1001B000 0 0x1000>;
> diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts
> index 7459ddb6b6f0..7673aa3fa6ae 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts
> @@ -96,6 +96,20 @@ fixed-link {
> };
>
> &pio {
> + spi_flash_pins: spi-flash-pins {
> + mux {
> + function = "spi";
> + groups = "spi0", "spi0_wp_hold";
Waiting on pinctrl binding:
https://patchwork.kernel.org/project/linux-mediatek/patch/20221106080114.7426-2-linux@fw-web.de/
Please resend once merged.
Regards,
Matthias
> + };
> + };
> +
> + spic_pins: spic-pins {
> + mux {
> + function = "spi";
> + groups = "spi1_2";
> + };
> + };
> +
> wf_2g_5g_pins: wf-2g-5g-pins {
> mux {
> function = "wifi";
> @@ -128,6 +142,27 @@ conf {
> };
> };
>
> +&spi0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&spi_flash_pins>;
> + cs-gpios = <0>, <0>;
> + status = "okay";
> + spi_nand: spi_nand@0 {
> + compatible = "spi-nand";
> + reg = <0>;
> + spi-max-frequency = <10000000>;
> + spi-tx-buswidth = <4>;
> + spi-rx-buswidth = <4>;
> + };
> +};
> +
> +&spi1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&spic_pins>;
> + cs-gpios = <0>, <0>;
> + status = "okay";
> +};
> +
> &uart0 {
> status = "okay";
> };
next prev parent reply other threads:[~2022-11-11 8:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-06 8:50 [RFC v3 00/11] Add BananaPi R3 Frank Wunderlich
2022-11-06 8:50 ` [RFC v3 01/11] arm64: dts: mt7986: harmonize device node order Frank Wunderlich
2022-11-11 8:55 ` Matthias Brugger
2022-11-11 9:05 ` Matthias Brugger
2022-11-06 8:50 ` [RFC v3 02/11] arm64: dts: mt7986: add spi related device nodes Frank Wunderlich
2022-11-11 8:54 ` Matthias Brugger [this message]
2022-11-06 8:50 ` [RFC v3 03/11] arm64: dts: mt7986: add usb " Frank Wunderlich
2022-11-11 8:52 ` Matthias Brugger
2022-11-06 8:50 ` [RFC v3 04/11] arm64: dts: mt7986: add crypto " Frank Wunderlich
2022-11-11 8:56 ` Matthias Brugger
2022-11-06 8:50 ` [RFC v3 05/11] arm64: dts: mt7986: add mmc " Frank Wunderlich
2022-11-11 8:58 ` Matthias Brugger
2022-11-11 12:45 ` Aw: " Frank Wunderlich
2022-11-06 8:50 ` [RFC v3 06/11] arm64: dts: mt7986: add i2c node Frank Wunderlich
2022-11-11 9:06 ` Matthias Brugger
2022-11-06 8:50 ` [RFC v3 07/11] arm64: dts: mt7986: add pcie related device nodes Frank Wunderlich
2022-11-06 8:50 ` [RFC v3 08/11] dt-bindings: arm64: dts: mediatek: add compatible for bananapi r3 Frank Wunderlich
2022-11-06 8:50 ` [RFC v3 09/11] arm64: dts: mt7986: add Bananapi R3 Frank Wunderlich
2022-11-06 8:50 ` [RFC v3 10/11] arm64: dts: mt7986: add PCIe nodes to BananaPi-R3 Frank Wunderlich
2022-11-06 8:50 ` [RFC v3 11/11] arm64: dts: mt7986: add BPI-R3 nand/nor overlays Frank Wunderlich
2022-11-11 9:16 ` Matthias Brugger
2022-11-15 16:50 ` Aw: " Frank Wunderlich
2022-11-18 21:23 ` Rob Herring
2022-11-10 17:03 ` Aw: [RFC v3 00/11] Add BananaPi R3 Frank Wunderlich
2022-11-11 9:17 ` Matthias Brugger
2022-11-11 12:37 ` Aw: " Frank Wunderlich
2022-11-13 22:28 ` Matthias Brugger
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=1eb8cbba-5e8a-df34-9c0c-4d5d24de4e18@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=frank-w@public-files.de \
--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@fw-web.de \
--cc=robh+dt@kernel.org \
--cc=sam.shih@mediatek.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;
as well as URLs for NNTP newsgroup(s).