devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 0/2] Mediatek MT7986 pinctrl support
@ 2021-11-22 12:35 Sam Shih
  2021-11-22 12:35 ` [PATCH v10 1/2] arm64: dts: mediatek: add pinctrl support for mt7986a Sam Shih
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sam Shih @ 2021-11-22 12:35 UTC (permalink / raw)
  To: Matthias Brugger, Rob Herring, linux-arm-kernel, linux-mediatek,
	linux-kernel, devicetree
  Cc: John Crispin, Ryder Lee, Sam Shih

This patch series add pinctrl support for mediatek mt7986 SoC series.
It is based on patch series "Add basic SoC support for mediatek mt7986"
https://lore.kernel.org/all/20211122123222.8016-1-sam.shih@mediatek.com/

This patch series base on the following patches
https://lore.kernel.org/all/20211022124036.5291-2-sam.shih@mediatek.com/
https://lore.kernel.org/all/20211022124036.5291-3-sam.shih@mediatek.com/
that have been applied to the pin control tree

---
v10: used mt7986b.dtsi to include mt7986a.dtsi to reduce duplicate dts nodes
v9: added Acked-by and Reviewed-by tag
v8: fixed uart node in yaml dts example
v7: separate pinctrl part into a single patch series

According to the maintainer’s suggestion, this patch splits the previous
thread into independent patch series.
This patch include clock driver and device tree update

Original thread:
https://lore.kernel.org/all/20210914085137.31761-1-sam.shih@mediatek.com/
---

Sam Shih (2):
  arm64: dts: mediatek: add pinctrl support for mt7986a
  arm64: dts: mediatek: add pinctrl support for mt7986b

 arch/arm64/boot/dts/mediatek/Makefile        |  1 +
 arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 20 ++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi    | 21 ++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 29 ++++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7986b.dtsi    | 12 ++++++++
 5 files changed, 83 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7986b.dtsi

-- 
2.29.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v10 1/2] arm64: dts: mediatek: add pinctrl support for mt7986a
  2021-11-22 12:35 [PATCH v10 0/2] Mediatek MT7986 pinctrl support Sam Shih
@ 2021-11-22 12:35 ` Sam Shih
  2021-11-22 12:35 ` [PATCH v10 2/2] arm64: dts: mediatek: add pinctrl support for mt7986b Sam Shih
  2021-12-15 20:07 ` [PATCH v10 0/2] Mediatek MT7986 pinctrl support Matthias Brugger
  2 siblings, 0 replies; 4+ messages in thread
From: Sam Shih @ 2021-11-22 12:35 UTC (permalink / raw)
  To: Matthias Brugger, Rob Herring, linux-arm-kernel, linux-mediatek,
	linux-kernel, devicetree
  Cc: John Crispin, Ryder Lee, Sam Shih

Add mt7986a pinctrl node, and update pinmux setting for mt7986a

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 20 +++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi    | 21 ++++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts
index 6911862390d7..5cd760abff51 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts
@@ -29,9 +29,29 @@ &uart0 {
 };
 
 &uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>;
 	status = "okay";
 };
 
 &uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
 	status = "okay";
 };
+
+&pio {
+	uart1_pins: uart1-pins {
+		mux {
+			function = "uart";
+			groups = "uart1";
+		};
+	};
+
+	uart2_pins: uart2-pins {
+		mux {
+			function = "uart";
+			groups = "uart2";
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
index 77906839cc85..b8da76b6ba47 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -107,6 +107,27 @@ watchdog: watchdog@1001c000 {
 			status = "disabled";
 		};
 
+		pio: pinctrl@1001f000 {
+			compatible = "mediatek,mt7986a-pinctrl";
+			reg = <0 0x1001f000 0 0x1000>,
+			      <0 0x11c30000 0 0x1000>,
+			      <0 0x11c40000 0 0x1000>,
+			      <0 0x11e20000 0 0x1000>,
+			      <0 0x11e30000 0 0x1000>,
+			      <0 0x11f00000 0 0x1000>,
+			      <0 0x11f10000 0 0x1000>,
+			      <0 0x1000b000 0 0x1000>;
+			reg-names = "gpio", "iocfg_rt", "iocfg_rb", "iocfg_lt",
+				    "iocfg_lb", "iocfg_tr", "iocfg_tl", "eint";
+			gpio-controller;
+			#gpio-cells = <2>;
+			gpio-ranges = <&pio 0 0 100>;
+			interrupt-controller;
+			interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-parent = <&gic>;
+			#interrupt-cells = <2>;
+		};
+
 		trng: trng@1020f000 {
 			compatible = "mediatek,mt7986-rng",
 				     "mediatek,mt7623-rng";
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v10 2/2] arm64: dts: mediatek: add pinctrl support for mt7986b
  2021-11-22 12:35 [PATCH v10 0/2] Mediatek MT7986 pinctrl support Sam Shih
  2021-11-22 12:35 ` [PATCH v10 1/2] arm64: dts: mediatek: add pinctrl support for mt7986a Sam Shih
@ 2021-11-22 12:35 ` Sam Shih
  2021-12-15 20:07 ` [PATCH v10 0/2] Mediatek MT7986 pinctrl support Matthias Brugger
  2 siblings, 0 replies; 4+ messages in thread
From: Sam Shih @ 2021-11-22 12:35 UTC (permalink / raw)
  To: Matthias Brugger, Rob Herring, linux-arm-kernel, linux-mediatek,
	linux-kernel, devicetree
  Cc: John Crispin, Ryder Lee, Sam Shih

Add mt7986b pinctrl node

Signed-off-by: Sam Shih <sam.shih@mediatek.com>

---
v10: used mt7986b.dtsi to include mt7986a.dtsi to reduce duplicate dts nodes
---
 arch/arm64/boot/dts/mediatek/Makefile        |  1 +
 arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 29 ++++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7986b.dtsi    | 12 ++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7986b.dtsi

diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index e6c3a73b9e4a..d555e43d1ccc 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts
new file mode 100644
index 000000000000..5fb752edd754
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Sam.Shih <sam.shih@mediatek.com>
+ */
+
+/dts-v1/;
+#include "mt7986b.dtsi"
+
+/ {
+	model = "MediaTek MT7986b RFB";
+	compatible = "mediatek,mt7986b-rfb";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0 0x40000000 0 0x40000000>;
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt7986b.dtsi b/arch/arm64/boot/dts/mediatek/mt7986b.dtsi
new file mode 100644
index 000000000000..23923b9f8944
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt7986b.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Sam.Shih <sam.shih@mediatek.com>
+ */
+
+#include "mt7986a.dtsi"
+
+&pio {
+	compatible = "mediatek,mt7986b-pinctrl";
+	gpio-ranges = <&pio 0 0 41>, <&pio 66 66 35>;
+};
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v10 0/2] Mediatek MT7986 pinctrl support
  2021-11-22 12:35 [PATCH v10 0/2] Mediatek MT7986 pinctrl support Sam Shih
  2021-11-22 12:35 ` [PATCH v10 1/2] arm64: dts: mediatek: add pinctrl support for mt7986a Sam Shih
  2021-11-22 12:35 ` [PATCH v10 2/2] arm64: dts: mediatek: add pinctrl support for mt7986b Sam Shih
@ 2021-12-15 20:07 ` Matthias Brugger
  2 siblings, 0 replies; 4+ messages in thread
From: Matthias Brugger @ 2021-12-15 20:07 UTC (permalink / raw)
  To: Sam Shih, Rob Herring, linux-arm-kernel, linux-mediatek,
	linux-kernel, devicetree
  Cc: John Crispin, Ryder Lee



On 22/11/2021 13:35, Sam Shih wrote:
> This patch series add pinctrl support for mediatek mt7986 SoC series.
> It is based on patch series "Add basic SoC support for mediatek mt7986"
> https://lore.kernel.org/all/20211122123222.8016-1-sam.shih@mediatek.com/
> 
> This patch series base on the following patches
> https://lore.kernel.org/all/20211022124036.5291-2-sam.shih@mediatek.com/
> https://lore.kernel.org/all/20211022124036.5291-3-sam.shih@mediatek.com/
> that have been applied to the pin control tree
> 

Whole series applied to v5.16-next/dts64

Thanks!

> ---
> v10: used mt7986b.dtsi to include mt7986a.dtsi to reduce duplicate dts nodes
> v9: added Acked-by and Reviewed-by tag
> v8: fixed uart node in yaml dts example
> v7: separate pinctrl part into a single patch series
> 
> According to the maintainer’s suggestion, this patch splits the previous
> thread into independent patch series.
> This patch include clock driver and device tree update
> 
> Original thread:
> https://lore.kernel.org/all/20210914085137.31761-1-sam.shih@mediatek.com/
> ---
> 
> Sam Shih (2):
>    arm64: dts: mediatek: add pinctrl support for mt7986a
>    arm64: dts: mediatek: add pinctrl support for mt7986b
> 
>   arch/arm64/boot/dts/mediatek/Makefile        |  1 +
>   arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 20 ++++++++++++++
>   arch/arm64/boot/dts/mediatek/mt7986a.dtsi    | 21 ++++++++++++++
>   arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 29 ++++++++++++++++++++
>   arch/arm64/boot/dts/mediatek/mt7986b.dtsi    | 12 ++++++++
>   5 files changed, 83 insertions(+)
>   create mode 100644 arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts
>   create mode 100644 arch/arm64/boot/dts/mediatek/mt7986b.dtsi
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-15 20:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 12:35 [PATCH v10 0/2] Mediatek MT7986 pinctrl support Sam Shih
2021-11-22 12:35 ` [PATCH v10 1/2] arm64: dts: mediatek: add pinctrl support for mt7986a Sam Shih
2021-11-22 12:35 ` [PATCH v10 2/2] arm64: dts: mediatek: add pinctrl support for mt7986b Sam Shih
2021-12-15 20:07 ` [PATCH v10 0/2] Mediatek MT7986 pinctrl support Matthias Brugger

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).