Skip to contentSkip to conversation

Add dts nodes to MT7986 SoC

PATCH New Sam Shih 1 participant 6 messages Apr 27, 2022

Subsystems (2)
lore
Share & tools
lore

Sam Shih

author
#0 lore raw

cover Add dts nodes to MT7986 SoC

This patch series adds spi, pcie, usb and crypto engines support to the MT7986 SoC.

Sam Shih (5):
arm64: dts: mt7986: harmonize device node order
arm64: dts: mt7986: add spi related device nodes
arm64: dts: mt7986: add pcie related device nodes
arm64: dts: mt7986: add usb related device nodes
arm64: dts: mt7986: add crypto related device nodes

 arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts |  96 +++++++++++-
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi    | 150 +++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts |  69 +++++++++
 3 files changed, 309 insertions(+), 6 deletions(-)
Signature · 7 lines
2.18.0


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
author
#1 lore raw

PATCH 1/5 arm64: dts: mt7986: harmonize device node order

This arrange device tree nodes in alphabetical order.

---
 arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 32 ++++++++++----------
 1 file changed, 16 insertions(+), 16 deletions(-)
arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +16 -16
index 21e420829572..5a1a605a7828 100644
@@ -25,22 +25,6 @@
 	};
 };
 
-&uart0 {
-	status = "okay";
-};
-
-&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 {
@@ -56,3 +40,19 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>;
+	status = "okay";
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
+	status = "okay";
+};
Signature · 7 lines
2.18.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#2 lore raw

PATCH 2/5 arm64: dts: mt7986: add spi related device nodes

In reply to Sam Shih

This patch adds spi support for MT7986.

---
 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 | 37 ++++++++++++++++++++
 3 files changed, 100 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +35 -0
index 5a1a605a7828..eb14e82d74b1 100644
@@ -26,6 +26,20 @@
 };
 
 &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";
@@ -41,6 +55,27 @@
 	};
 };
 
+&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";
 };
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +28 -0
index 694acf8f5b70..069d3a9bdac9 100644
@@ -106,6 +106,34 @@
 			#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>;
arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +37 -0
index d73467ea3641..f159f1ac618b 100644
@@ -25,6 +25,43 @@
 	};
 };
 
+&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";
+		};
+	};
+};
+
+&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";
 };
Signature · 7 lines
2.18.0


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
author
#3 lore raw

PATCH 3/5 arm64: dts: mt7986: add pcie related device nodes

In reply to Sam Shih

This patch adds PCIe support for MT7986.

---
 arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 17 +++++++
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi    | 52 ++++++++++++++++++++
 2 files changed, 69 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +17 -0
index eb14e82d74b1..4a555df1eff4 100644
@@ -25,7 +25,24 @@
 	};
 };
 
+&pcie {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie_pins>;
+	status = "okay";
+};
+
+&pcie_phy {
+	status = "okay";
+};
+
 &pio {
+	pcie_pins: pcie-pins {
+		mux {
+			function = "pcie";
+			groups = "pcie_clk", "pcie_wake", "pcie_pereset";
+		};
+	};
+
 	spi_flash_pins: spi-flash-pins {
 		mux {
 			function = "spi";
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +52 -0

64 lines not on this page · raw message

Signature · 7 lines
2.18.0


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
author
#4 lore raw

PATCH 4/5 arm64: dts: mt7986: add usb related device nodes

In reply to Sam Shih

This patch adds USB support for MT7986.

---
 arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 28 ++++++++++
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi    | 55 ++++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 28 ++++++++++
 3 files changed, 111 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +28 -0
index 4a555df1eff4..de6475078568 100644
@@ -23,6 +23,24 @@
 		device_type = "memory";
 		reg = <0 0x40000000 0 0x40000000>;
 	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
 };
 
 &pcie {
@@ -93,6 +111,12 @@
 	status = "okay";
 };
 
+&ssusb {
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
+	status = "okay";
+};
+
 &uart0 {
 	status = "okay";
 };
@@ -108,3 +132,7 @@
 	pinctrl-0 = <&uart2_pins>;
 	status = "okay";
 };
+
+&usb_phy {
+	status = "okay";
+};
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +55 -0

67 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +28 -0
index f159f1ac618b..6bd477e1f484 100644
@@ -23,6 +23,24 @@
 		device_type = "memory";
 		reg = <0 0x40000000 0 0x40000000>;
 	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
 };
 
 &pio {
@@ -62,6 +80,16 @@
 	status = "okay";
 };
 
+&ssusb {
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
+	status = "okay";
+};
+
 &uart0 {
 	status = "okay";
 };
+
+&usb_phy {
+	status = "okay";
+};
Signature · 1 line
2.18.0
author
#5 lore raw

PATCH 5/5 arm64: dts: mt7986: add crypto related device nodes

In reply to Sam Shih

This patch adds crypto engine support for MT7986.

---
 arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts |  4 ++++
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi    | 15 +++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts |  4 ++++
 3 files changed, 23 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +4 -0
index de6475078568..714a4e73fe0b 100644
@@ -43,6 +43,10 @@
 	};
 };
 
+&crypto {
+	status = "okay";
+};
+
 &pcie {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pcie_pins>;
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +15 -0
index ff685900baa4..6de9b941a513 100644
@@ -200,6 +200,21 @@
 			status = "disabled";
 		};
 
+		crypto: crypto@10320000 {
+			compatible = "inside-secure,safexcel-eip97";
+			reg = <0 0x10320000 0 0x40000>;
+			interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "ring0", "ring1", "ring2", "ring3";
+			clocks = <&infracfg CLK_INFRA_EIP97_CK>;
+			clock-names = "infra_eip97_ck";
+			assigned-clocks = <&topckgen CLK_TOP_EIP_B_SEL>;
+			assigned-clock-parents = <&apmixedsys CLK_APMIXED_NET2PLL>;
+			status = "disabled";
+		};
+
 		uart0: serial@11002000 {
 			compatible = "mediatek,mt7986-uart",
 				     "mediatek,mt6577-uart";
arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +4 -0
index 6bd477e1f484..d4078feb4aad 100644
@@ -43,6 +43,10 @@
 	};
 };
 
+&crypto {
+	status = "okay";
+};
+
 &pio {
 	spi_flash_pins: spi-flash-pins {
 		mux {
Signature · 1 line
2.18.0