linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Mergnat <amergnat@baylibre.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	Alexandre Mergnat <amergnat@baylibre.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm64: dts: mediatek: add spidev support for mt8365-evk board
Date: Thu, 19 Jan 2023 17:28:49 +0100	[thread overview]
Message-ID: <20230118-mt8365-spi-support-v1-1-842a21e50494@baylibre.com> (raw)
In-Reply-To: <20230118-mt8365-spi-support-v1-0-842a21e50494@baylibre.com>

Add SPI pins and spidev support for mt8365-evk.

Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
 arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts
index 275ea3a0e708..c1d603cb129a 100644
--- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts
@@ -142,6 +142,17 @@ pins {
 				 <MT8365_PIN_116_I2S_BCK__FUNC_PWM_C>;
 		};
 	};
+
+	spi_pins: spi-pins {
+		pins {
+			pinmux = <MT8365_PIN_26_SPI_CS__FUNC_SPI_CSB>,
+				 <MT8365_PIN_27_SPI_CK__FUNC_SPI_CLK>,
+				 <MT8365_PIN_28_SPI_MI__FUNC_SPI_MI>,
+				 <MT8365_PIN_29_SPI_MO__FUNC_SPI_MO>;
+			bias-disable;
+		};
+	};
+
 };
 
 &pwm {
@@ -150,6 +161,19 @@ &pwm {
 	status = "okay";
 };
 
+&spi {
+	pinctrl-0 = <&spi_pins>;
+	pinctrl-names = "default";
+	mediatek,pad-select = <0>;
+	status = "okay";
+
+	spidev@0 {
+		compatible = "mediatek,genio";
+		spi-max-frequency = <5000000>;
+		reg = <0>;
+	};
+};
+
 &uart0 {
 	pinctrl-0 = <&uart0_pins>;
 	pinctrl-names = "default";

-- 
b4 0.10.1

  reply	other threads:[~2023-01-19 16:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 16:28 [PATCH 0/2] Add MediaTek MT8365 SPI support Alexandre Mergnat
2023-01-19 16:28 ` Alexandre Mergnat [this message]
2023-01-19 16:28 ` [PATCH 2/2] spi: spidev: add new mediatek support Alexandre Mergnat
2023-01-19 16:39   ` Mark Brown
2023-01-19 16:40   ` Matthias Brugger
2023-01-19 16:49   ` Krzysztof Kozlowski
2023-01-19 19:18     ` Alexandre Mergnat
2023-01-20  7:44       ` Krzysztof Kozlowski
2023-01-20  7:58         ` Krzysztof Kozlowski
2023-01-20  7:47       ` Krzysztof Kozlowski
2023-01-23 10:06         ` Alexandre Mergnat
2023-01-23 15:55           ` Krzysztof Kozlowski
2023-01-20  8:20   ` Michael Walle
2023-01-23  9:37     ` Alexandre Mergnat
2023-01-23 10:44       ` Michael Walle
2023-01-23 14:57         ` Alexandre Mergnat
2023-01-23 12:19       ` Mark Brown
2023-01-23 15:07         ` Alexandre Mergnat

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=20230118-mt8365-spi-support-v1-1-842a21e50494@baylibre.com \
    --to=amergnat@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.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-spi@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --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).