xref: /freebsd/sys/contrib/device-tree/src/arm64/mediatek/mt7981b.dtsi (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
101950c46SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only OR MIT
201950c46SEmmanuel Vadot
301950c46SEmmanuel Vadot#include <dt-bindings/clock/mediatek,mt7981-clk.h>
401950c46SEmmanuel Vadot#include <dt-bindings/interrupt-controller/arm-gic.h>
50e8011faSEmmanuel Vadot#include <dt-bindings/reset/mt7986-resets.h>
601950c46SEmmanuel Vadot
701950c46SEmmanuel Vadot/ {
801950c46SEmmanuel Vadot	compatible = "mediatek,mt7981b";
901950c46SEmmanuel Vadot	interrupt-parent = <&gic>;
1001950c46SEmmanuel Vadot	#address-cells = <2>;
1101950c46SEmmanuel Vadot	#size-cells = <2>;
1201950c46SEmmanuel Vadot
1301950c46SEmmanuel Vadot	cpus {
1401950c46SEmmanuel Vadot		#address-cells = <1>;
1501950c46SEmmanuel Vadot		#size-cells = <0>;
1601950c46SEmmanuel Vadot
1701950c46SEmmanuel Vadot		cpu@0 {
1801950c46SEmmanuel Vadot			compatible = "arm,cortex-a53";
1901950c46SEmmanuel Vadot			reg = <0x0>;
2001950c46SEmmanuel Vadot			device_type = "cpu";
2101950c46SEmmanuel Vadot			enable-method = "psci";
2201950c46SEmmanuel Vadot		};
2301950c46SEmmanuel Vadot
2401950c46SEmmanuel Vadot		cpu@1 {
2501950c46SEmmanuel Vadot			compatible = "arm,cortex-a53";
2601950c46SEmmanuel Vadot			reg = <0x1>;
2701950c46SEmmanuel Vadot			device_type = "cpu";
2801950c46SEmmanuel Vadot			enable-method = "psci";
2901950c46SEmmanuel Vadot		};
3001950c46SEmmanuel Vadot	};
3101950c46SEmmanuel Vadot
3201950c46SEmmanuel Vadot	oscillator-40m {
3301950c46SEmmanuel Vadot		compatible = "fixed-clock";
3401950c46SEmmanuel Vadot		clock-frequency = <40000000>;
3501950c46SEmmanuel Vadot		clock-output-names = "clkxtal";
3601950c46SEmmanuel Vadot		#clock-cells = <0>;
3701950c46SEmmanuel Vadot	};
3801950c46SEmmanuel Vadot
3901950c46SEmmanuel Vadot	psci {
4001950c46SEmmanuel Vadot		compatible = "arm,psci-1.0";
4101950c46SEmmanuel Vadot		method = "smc";
4201950c46SEmmanuel Vadot	};
4301950c46SEmmanuel Vadot
4401950c46SEmmanuel Vadot	soc {
4501950c46SEmmanuel Vadot		compatible = "simple-bus";
4601950c46SEmmanuel Vadot		ranges;
4701950c46SEmmanuel Vadot		#address-cells = <2>;
4801950c46SEmmanuel Vadot		#size-cells = <2>;
4901950c46SEmmanuel Vadot
5001950c46SEmmanuel Vadot		gic: interrupt-controller@c000000 {
5101950c46SEmmanuel Vadot			compatible = "arm,gic-v3";
5201950c46SEmmanuel Vadot			reg = <0 0x0c000000 0 0x40000>,  /* GICD */
5301950c46SEmmanuel Vadot			      <0 0x0c080000 0 0x200000>; /* GICR */
5401950c46SEmmanuel Vadot			interrupt-parent = <&gic>;
5501950c46SEmmanuel Vadot			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
5601950c46SEmmanuel Vadot			interrupt-controller;
5701950c46SEmmanuel Vadot			#interrupt-cells = <3>;
5801950c46SEmmanuel Vadot		};
5901950c46SEmmanuel Vadot
6001950c46SEmmanuel Vadot		infracfg: clock-controller@10001000 {
6101950c46SEmmanuel Vadot			compatible = "mediatek,mt7981-infracfg", "syscon";
6201950c46SEmmanuel Vadot			reg = <0 0x10001000 0 0x1000>;
6301950c46SEmmanuel Vadot			#clock-cells = <1>;
6401950c46SEmmanuel Vadot		};
6501950c46SEmmanuel Vadot
660e8011faSEmmanuel Vadot		topckgen: clock-controller@1001b000 {
6701950c46SEmmanuel Vadot			compatible = "mediatek,mt7981-topckgen", "syscon";
6801950c46SEmmanuel Vadot			reg = <0 0x1001b000 0 0x1000>;
6901950c46SEmmanuel Vadot			#clock-cells = <1>;
7001950c46SEmmanuel Vadot		};
7101950c46SEmmanuel Vadot
720e8011faSEmmanuel Vadot		watchdog: watchdog@1001c000 {
730e8011faSEmmanuel Vadot			compatible = "mediatek,mt7986-wdt";
740e8011faSEmmanuel Vadot			reg = <0 0x1001c000 0 0x1000>;
750e8011faSEmmanuel Vadot			interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
760e8011faSEmmanuel Vadot			#reset-cells = <1>;
770e8011faSEmmanuel Vadot		};
780e8011faSEmmanuel Vadot
7901950c46SEmmanuel Vadot		clock-controller@1001e000 {
8001950c46SEmmanuel Vadot			compatible = "mediatek,mt7981-apmixedsys";
8101950c46SEmmanuel Vadot			reg = <0 0x1001e000 0 0x1000>;
8201950c46SEmmanuel Vadot			#clock-cells = <1>;
8301950c46SEmmanuel Vadot		};
8401950c46SEmmanuel Vadot
8501950c46SEmmanuel Vadot		pwm@10048000 {
8601950c46SEmmanuel Vadot			compatible = "mediatek,mt7981-pwm";
8701950c46SEmmanuel Vadot			reg = <0 0x10048000 0 0x1000>;
8801950c46SEmmanuel Vadot			clocks = <&infracfg CLK_INFRA_PWM_STA>,
8901950c46SEmmanuel Vadot				 <&infracfg CLK_INFRA_PWM_HCK>,
9001950c46SEmmanuel Vadot				 <&infracfg CLK_INFRA_PWM1_CK>,
9101950c46SEmmanuel Vadot				 <&infracfg CLK_INFRA_PWM2_CK>,
9201950c46SEmmanuel Vadot				 <&infracfg CLK_INFRA_PWM3_CK>;
9301950c46SEmmanuel Vadot			clock-names = "top", "main", "pwm1", "pwm2", "pwm3";
9401950c46SEmmanuel Vadot			#pwm-cells = <2>;
9501950c46SEmmanuel Vadot		};
9601950c46SEmmanuel Vadot
97*b2d2a78aSEmmanuel Vadot		serial@11002000 {
98*b2d2a78aSEmmanuel Vadot			compatible = "mediatek,mt7981-uart", "mediatek,mt6577-uart";
99*b2d2a78aSEmmanuel Vadot			reg = <0 0x11002000 0 0x100>;
100*b2d2a78aSEmmanuel Vadot			interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
101*b2d2a78aSEmmanuel Vadot			interrupt-names = "uart", "wakeup";
102*b2d2a78aSEmmanuel Vadot			clocks = <&infracfg CLK_INFRA_UART0_SEL>,
103*b2d2a78aSEmmanuel Vadot				 <&infracfg CLK_INFRA_UART0_CK>;
104*b2d2a78aSEmmanuel Vadot			clock-names = "baud", "bus";
105*b2d2a78aSEmmanuel Vadot			status = "disabled";
106*b2d2a78aSEmmanuel Vadot		};
107*b2d2a78aSEmmanuel Vadot
108*b2d2a78aSEmmanuel Vadot		serial@11003000 {
109*b2d2a78aSEmmanuel Vadot			compatible = "mediatek,mt7981-uart", "mediatek,mt6577-uart";
110*b2d2a78aSEmmanuel Vadot			reg = <0 0x11003000 0 0x100>;
111*b2d2a78aSEmmanuel Vadot			interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
112*b2d2a78aSEmmanuel Vadot			interrupt-names = "uart", "wakeup";
113*b2d2a78aSEmmanuel Vadot			clocks = <&infracfg CLK_INFRA_UART1_SEL>,
114*b2d2a78aSEmmanuel Vadot				 <&infracfg CLK_INFRA_UART1_CK>;
115*b2d2a78aSEmmanuel Vadot			clock-names = "baud", "bus";
116*b2d2a78aSEmmanuel Vadot			status = "disabled";
117*b2d2a78aSEmmanuel Vadot		};
118*b2d2a78aSEmmanuel Vadot
119*b2d2a78aSEmmanuel Vadot		serial@11004000 {
120*b2d2a78aSEmmanuel Vadot			compatible = "mediatek,mt7981-uart", "mediatek,mt6577-uart";
121*b2d2a78aSEmmanuel Vadot			reg = <0 0x11004000 0 0x100>;
122*b2d2a78aSEmmanuel Vadot			interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
123*b2d2a78aSEmmanuel Vadot			interrupt-names = "uart", "wakeup";
124*b2d2a78aSEmmanuel Vadot			clocks = <&infracfg CLK_INFRA_UART2_SEL>,
125*b2d2a78aSEmmanuel Vadot				 <&infracfg CLK_INFRA_UART2_CK>;
126*b2d2a78aSEmmanuel Vadot			clock-names = "baud", "bus";
127*b2d2a78aSEmmanuel Vadot			status = "disabled";
128*b2d2a78aSEmmanuel Vadot		};
129*b2d2a78aSEmmanuel Vadot
1300e8011faSEmmanuel Vadot		i2c@11007000 {
1310e8011faSEmmanuel Vadot			compatible = "mediatek,mt7981-i2c";
1320e8011faSEmmanuel Vadot			reg = <0 0x11007000 0 0x1000>,
1330e8011faSEmmanuel Vadot			      <0 0x10217080 0 0x80>;
1340e8011faSEmmanuel Vadot			interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
1350e8011faSEmmanuel Vadot			clocks = <&infracfg CLK_INFRA_I2C0_CK>,
1360e8011faSEmmanuel Vadot				 <&infracfg CLK_INFRA_AP_DMA_CK>,
1370e8011faSEmmanuel Vadot				 <&infracfg CLK_INFRA_I2C_MCK_CK>,
1380e8011faSEmmanuel Vadot				 <&infracfg CLK_INFRA_I2C_PCK_CK>;
1390e8011faSEmmanuel Vadot			clock-names = "main", "dma", "arb", "pmic";
1400e8011faSEmmanuel Vadot			#address-cells = <1>;
1410e8011faSEmmanuel Vadot			#size-cells = <0>;
1420e8011faSEmmanuel Vadot			status = "disabled";
1430e8011faSEmmanuel Vadot		};
1440e8011faSEmmanuel Vadot
145*b2d2a78aSEmmanuel Vadot		spi@11009000 {
146*b2d2a78aSEmmanuel Vadot			compatible = "mediatek,mt7981-spi-ipm", "mediatek,spi-ipm";
147*b2d2a78aSEmmanuel Vadot			reg = <0 0x11009000 0 0x1000>;
148*b2d2a78aSEmmanuel Vadot			interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
149*b2d2a78aSEmmanuel Vadot			clocks = <&topckgen CLK_TOP_CB_M_D2>,
150*b2d2a78aSEmmanuel Vadot				 <&topckgen CLK_TOP_SPI_SEL>,
151*b2d2a78aSEmmanuel Vadot				 <&infracfg CLK_INFRA_SPI2_CK>,
152*b2d2a78aSEmmanuel Vadot				 <&infracfg CLK_INFRA_SPI2_HCK_CK>;
153*b2d2a78aSEmmanuel Vadot			clock-names = "parent-clk", "sel-clk", "spi-clk", "hclk";
154*b2d2a78aSEmmanuel Vadot			#address-cells = <1>;
155*b2d2a78aSEmmanuel Vadot			#size-cells = <0>;
156*b2d2a78aSEmmanuel Vadot			status = "disabled";
157*b2d2a78aSEmmanuel Vadot		};
158*b2d2a78aSEmmanuel Vadot
159*b2d2a78aSEmmanuel Vadot		spi@1100a000 {
160*b2d2a78aSEmmanuel Vadot			compatible = "mediatek,mt7981-spi-ipm", "mediatek,spi-ipm";
161*b2d2a78aSEmmanuel Vadot			reg = <0 0x1100a000 0 0x1000>;
162*b2d2a78aSEmmanuel Vadot			interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
163*b2d2a78aSEmmanuel Vadot			clocks = <&topckgen CLK_TOP_CB_M_D2>,
164*b2d2a78aSEmmanuel Vadot				 <&topckgen CLK_TOP_SPI_SEL>,
165*b2d2a78aSEmmanuel Vadot				 <&infracfg CLK_INFRA_SPI0_CK>,
166*b2d2a78aSEmmanuel Vadot				 <&infracfg CLK_INFRA_SPI0_HCK_CK>;
167*b2d2a78aSEmmanuel Vadot			clock-names = "parent-clk", "sel-clk", "spi-clk", "hclk";
168*b2d2a78aSEmmanuel Vadot			#address-cells = <1>;
169*b2d2a78aSEmmanuel Vadot			#size-cells = <0>;
170*b2d2a78aSEmmanuel Vadot			status = "disabled";
171*b2d2a78aSEmmanuel Vadot		};
172*b2d2a78aSEmmanuel Vadot
173*b2d2a78aSEmmanuel Vadot		spi@1100b000 {
174*b2d2a78aSEmmanuel Vadot			compatible = "mediatek,mt7981-spi-ipm", "mediatek,spi-ipm";
175*b2d2a78aSEmmanuel Vadot			reg = <0 0x1100b000 0 0x1000>;
176*b2d2a78aSEmmanuel Vadot			interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
177*b2d2a78aSEmmanuel Vadot			clocks = <&topckgen CLK_TOP_CB_M_D2>,
178*b2d2a78aSEmmanuel Vadot				 <&topckgen CLK_TOP_SPI_SEL>,
179*b2d2a78aSEmmanuel Vadot				 <&infracfg CLK_INFRA_SPI1_CK>,
180*b2d2a78aSEmmanuel Vadot				 <&infracfg CLK_INFRA_SPI1_HCK_CK>;
181*b2d2a78aSEmmanuel Vadot			clock-names = "parent-clk", "sel-clk", "spi-clk", "hclk";
182*b2d2a78aSEmmanuel Vadot			#address-cells = <1>;
183*b2d2a78aSEmmanuel Vadot			#size-cells = <0>;
184*b2d2a78aSEmmanuel Vadot			status = "disabled";
185*b2d2a78aSEmmanuel Vadot		};
186*b2d2a78aSEmmanuel Vadot
1870e8011faSEmmanuel Vadot		pio: pinctrl@11d00000 {
1880e8011faSEmmanuel Vadot			compatible = "mediatek,mt7981-pinctrl";
1890e8011faSEmmanuel Vadot			reg = <0 0x11d00000 0 0x1000>,
1900e8011faSEmmanuel Vadot			      <0 0x11c00000 0 0x1000>,
1910e8011faSEmmanuel Vadot			      <0 0x11c10000 0 0x1000>,
1920e8011faSEmmanuel Vadot			      <0 0x11d20000 0 0x1000>,
1930e8011faSEmmanuel Vadot			      <0 0x11e00000 0 0x1000>,
1940e8011faSEmmanuel Vadot			      <0 0x11e20000 0 0x1000>,
1950e8011faSEmmanuel Vadot			      <0 0x11f00000 0 0x1000>,
1960e8011faSEmmanuel Vadot			      <0 0x11f10000 0 0x1000>,
1970e8011faSEmmanuel Vadot			      <0 0x1000b000 0 0x1000>;
1980e8011faSEmmanuel Vadot			reg-names = "gpio", "iocfg_rt", "iocfg_rm", "iocfg_rb", "iocfg_lb",
1990e8011faSEmmanuel Vadot				    "iocfg_bl", "iocfg_tm", "iocfg_tl", "eint";
2000e8011faSEmmanuel Vadot			interrupt-controller;
2010e8011faSEmmanuel Vadot			interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
2020e8011faSEmmanuel Vadot			interrupt-parent = <&gic>;
2030e8011faSEmmanuel Vadot			gpio-ranges = <&pio 0 0 56>;
2040e8011faSEmmanuel Vadot			gpio-controller;
2050e8011faSEmmanuel Vadot			#gpio-cells = <2>;
2060e8011faSEmmanuel Vadot			#interrupt-cells = <2>;
2070e8011faSEmmanuel Vadot		};
2080e8011faSEmmanuel Vadot
2090e8011faSEmmanuel Vadot		efuse@11f20000 {
2100e8011faSEmmanuel Vadot			compatible = "mediatek,mt7981-efuse", "mediatek,efuse";
2110e8011faSEmmanuel Vadot			reg = <0 0x11f20000 0 0x1000>;
2120e8011faSEmmanuel Vadot			#address-cells = <1>;
2130e8011faSEmmanuel Vadot			#size-cells = <1>;
2140e8011faSEmmanuel Vadot		};
2150e8011faSEmmanuel Vadot
21601950c46SEmmanuel Vadot		clock-controller@15000000 {
21701950c46SEmmanuel Vadot			compatible = "mediatek,mt7981-ethsys", "syscon";
21801950c46SEmmanuel Vadot			reg = <0 0x15000000 0 0x1000>;
21901950c46SEmmanuel Vadot			#clock-cells = <1>;
22001950c46SEmmanuel Vadot			#reset-cells = <1>;
22101950c46SEmmanuel Vadot		};
2220e8011faSEmmanuel Vadot
2230e8011faSEmmanuel Vadot		wifi@18000000 {
2240e8011faSEmmanuel Vadot			compatible = "mediatek,mt7981-wmac";
2250e8011faSEmmanuel Vadot			reg = <0 0x18000000 0 0x1000000>,
2260e8011faSEmmanuel Vadot			      <0 0x10003000 0 0x1000>,
2270e8011faSEmmanuel Vadot			      <0 0x11d10000 0 0x1000>;
2280e8011faSEmmanuel Vadot			interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
2290e8011faSEmmanuel Vadot				     <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
2300e8011faSEmmanuel Vadot				     <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
2310e8011faSEmmanuel Vadot				     <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
2320e8011faSEmmanuel Vadot			clocks = <&topckgen CLK_TOP_NETSYS_MCU_SEL>,
2330e8011faSEmmanuel Vadot				 <&topckgen CLK_TOP_AP2CNN_HOST_SEL>;
2340e8011faSEmmanuel Vadot			clock-names = "mcu", "ap2conn";
2350e8011faSEmmanuel Vadot			resets = <&watchdog MT7986_TOPRGU_CONSYS_SW_RST>;
2360e8011faSEmmanuel Vadot			reset-names = "consys";
2370e8011faSEmmanuel Vadot		};
23801950c46SEmmanuel Vadot	};
23901950c46SEmmanuel Vadot
24001950c46SEmmanuel Vadot	timer {
24101950c46SEmmanuel Vadot		compatible = "arm,armv8-timer";
24201950c46SEmmanuel Vadot		interrupt-parent = <&gic>;
24301950c46SEmmanuel Vadot		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
24401950c46SEmmanuel Vadot			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
24501950c46SEmmanuel Vadot			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
24601950c46SEmmanuel Vadot			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
24701950c46SEmmanuel Vadot	};
24801950c46SEmmanuel Vadot};
249