blob: 17e6b5af7a2b682ab0fc8f1b86f96067e52a4ca3 [file] [log] [blame]
developer15dd2c82022-09-09 19:59:16 +08001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2022 MediaTek Inc.
4 * Author: Sam Shih <sam.shih@mediatek.com>
5 */
6
7/dts-v1/;
8#include "mt7981.dtsi"
9#include <dt-bindings/gpio/gpio.h>
10
11/ {
12 #address-cells = <1>;
13 #size-cells = <1>;
14 model = "mt7981-rfb";
15 compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
16 chosen {
17 stdout-path = &uart0;
18 tick-timer = &timer0;
19 };
developer87bf1bc2023-07-19 17:15:41 +080020
21 memory@40000000 {
22 device_type = "memory";
23 reg = <0x40000000 0x10000000>;
24 };
developer15dd2c82022-09-09 19:59:16 +080025};
26
27&uart0 {
28 status = "okay";
29};
30
31&uart1 {
32 pinctrl-names = "default";
33 pinctrl-0 = <&uart1_pins>;
34 status = "disabled";
35};
36
37&eth {
38 status = "okay";
39 mediatek,gmac-id = <0>;
developer31f7ad62023-07-19 17:17:18 +080040 phy-mode = "2500base-x";
developer27686ad2025-02-05 09:24:37 +080041 mediatek,switch = "auto";
Christian Marangi68d05782025-01-27 14:40:43 +010042 reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
developer15dd2c82022-09-09 19:59:16 +080043
44 fixed-link {
developer31f7ad62023-07-19 17:17:18 +080045 speed = <2500>;
developer15dd2c82022-09-09 19:59:16 +080046 full-duplex;
47 };
48};
49
Christian Marangi68d05782025-01-27 14:40:43 +010050&pio {
developer15dd2c82022-09-09 19:59:16 +080051 spi_flash_pins: spi0-pins-func-1 {
52 mux {
53 function = "flash";
54 groups = "spi0", "spi0_wp_hold";
55 };
56
57 conf-pu {
58 pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
59 drive-strength = <MTK_DRIVE_8mA>;
60 bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
61 };
62
63 conf-pd {
64 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
65 drive-strength = <MTK_DRIVE_8mA>;
66 bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
67 };
68 };
69
70 spi2_flash_pins: spi2-spi2-pins {
71 mux {
72 function = "spi";
73 groups = "spi2", "spi2_wp_hold";
74 };
75
76 conf-pu {
77 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
78 drive-strength = <MTK_DRIVE_8mA>;
79 bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
80 };
81
82 conf-pd {
83 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
84 drive-strength = <MTK_DRIVE_8mA>;
85 bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
86 };
87 };
88
89 spic_pins: spi1-pins-func-1 {
90 mux {
91 function = "spi";
92 groups = "spi1_1";
93 };
94 };
95
96 uart1_pins: spi1-pins-func-3 {
97 mux {
98 function = "uart";
99 groups = "uart1_2";
100 };
101 };
102
103 /* pin15 as pwm0 */
104 one_pwm_pins: one-pwm-pins {
105 mux {
106 function = "pwm";
107 groups = "pwm0_1";
108 };
109 };
110
111 /* pin15 as pwm0 and pin14 as pwm1 */
112 two_pwm_pins: two-pwm-pins {
113 mux {
114 function = "pwm";
115 groups = "pwm0_1", "pwm1_0";
116 };
117 };
118
119 /* pin15 as pwm0, pin14 as pwm1, pin7 as pwm2 */
120 three_pwm_pins: three-pwm-pins {
121 mux {
122 function = "pwm";
123 groups = "pwm0_1", "pwm1_0", "pwm2";
124 };
125 };
developerd24fd7e2025-01-17 17:18:06 +0800126
127 /* pin13 as pwm0, pin15 as pwm1, pin7 as pwm2 */
128 three_pwm_pins_1: three-pwm-pins {
129 mux {
130 function = "pwm";
131 groups = "pwm0_0", "pwm1_1", "pwm2";
132 };
133 };
developer15dd2c82022-09-09 19:59:16 +0800134};
135
136&spi0 {
137 #address-cells = <1>;
138 #size-cells = <0>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&spi_flash_pins>;
141 status = "okay";
142 must_tx;
143 enhance_timing;
144 dma_ext;
145 ipm_design;
146 support_quad;
147 tick_dly = <2>;
148 sample_sel = <0>;
149
150 spi_nand@0 {
151 compatible = "spi-nand";
152 reg = <0>;
153 spi-max-frequency = <52000000>;
developer2c98ba82025-01-17 17:18:01 +0800154 spi-rx-bus-width = <4>;
155 spi-tx-bus-width = <4>;
developer15dd2c82022-09-09 19:59:16 +0800156 };
157};
158
159&spi2 {
160 #address-cells = <1>;
161 #size-cells = <0>;
162 pinctrl-names = "default";
163 pinctrl-0 = <&spi2_flash_pins>;
164 status = "okay";
165 must_tx;
166 enhance_timing;
167 dma_ext;
168 ipm_design;
169 support_quad;
170 tick_dly = <2>;
171 sample_sel = <0>;
172
173 spi_nor@0 {
174 compatible = "jedec,spi-nor";
175 reg = <0>;
176 spi-max-frequency = <52000000>;
developer2c98ba82025-01-17 17:18:01 +0800177 spi-rx-bus-width = <4>;
178 spi-tx-bus-width = <4>;
developer15dd2c82022-09-09 19:59:16 +0800179 };
180};
181
182&pwm {
183 pinctrl-names = "default";
184 pinctrl-0 = <&two_pwm_pins>;
185 status = "okay";
186};
187
188&watchdog {
189 status = "disabled";
190};