blob: 22a022acb62c6dc20cbf3dc97fe7f9397af27c71 [file] [log] [blame]
Weijie Gaoe053ccf2022-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 };
Weijie Gao5fd6d4c2023-07-19 17:15:41 +080020
21 memory@40000000 {
22 device_type = "memory";
23 reg = <0x40000000 0x10000000>;
24 };
Weijie Gaoe053ccf2022-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>;
Weijie Gaoaef54ea2023-07-19 17:17:18 +080040 phy-mode = "2500base-x";
Weijie Gaoe053ccf2022-09-09 19:59:16 +080041 mediatek,switch = "mt7531";
42 reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
43
44 fixed-link {
Weijie Gaoaef54ea2023-07-19 17:17:18 +080045 speed = <2500>;
Weijie Gaoe053ccf2022-09-09 19:59:16 +080046 full-duplex;
47 };
48};
49
50&pinctrl {
51 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 };
126};
127
128&spi0 {
129 #address-cells = <1>;
130 #size-cells = <0>;
131 pinctrl-names = "default";
132 pinctrl-0 = <&spi_flash_pins>;
133 status = "okay";
134 must_tx;
135 enhance_timing;
136 dma_ext;
137 ipm_design;
138 support_quad;
139 tick_dly = <2>;
140 sample_sel = <0>;
141
142 spi_nand@0 {
143 compatible = "spi-nand";
144 reg = <0>;
145 spi-max-frequency = <52000000>;
146 };
147};
148
149&spi2 {
150 #address-cells = <1>;
151 #size-cells = <0>;
152 pinctrl-names = "default";
153 pinctrl-0 = <&spi2_flash_pins>;
154 status = "okay";
155 must_tx;
156 enhance_timing;
157 dma_ext;
158 ipm_design;
159 support_quad;
160 tick_dly = <2>;
161 sample_sel = <0>;
162
163 spi_nor@0 {
164 compatible = "jedec,spi-nor";
165 reg = <0>;
166 spi-max-frequency = <52000000>;
167 };
168};
169
170&pwm {
171 pinctrl-names = "default";
172 pinctrl-0 = <&two_pwm_pins>;
173 status = "okay";
174};
175
176&watchdog {
177 status = "disabled";
178};