blob: 0c4e3e878fa941ee0aea9d8117af46f15b8a4441 [file] [log] [blame]
developer56ed64c2022-09-09 19:59:13 +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 "mt7986.dtsi"
9#include <dt-bindings/gpio/gpio.h>
10
11/ {
12 #address-cells = <1>;
13 #size-cells = <1>;
14 model = "mt7986-rfb";
15 compatible = "mediatek,mt7986", "mediatek,mt7986-rfb";
16 chosen {
17 stdout-path = &uart0;
18 tick-timer = &timer0;
19 };
20
21 reg_3p3v: regulator-3p3v {
22 compatible = "regulator-fixed";
23 regulator-name = "fixed-3.3V";
24 regulator-min-microvolt = <3300000>;
25 regulator-max-microvolt = <3300000>;
26 regulator-boot-on;
27 regulator-always-on;
28 };
29};
30
31&uart0 {
32 status = "okay";
33};
34
35&uart1 {
36 pinctrl-names = "default";
37 pinctrl-0 = <&uart1_pins>;
38 status = "disabled";
39};
40
41&eth {
42 status = "okay";
43 mediatek,gmac-id = <0>;
44 phy-mode = "sgmii";
45 mediatek,switch = "mt7531";
46 reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
47
48 fixed-link {
49 speed = <1000>;
50 full-duplex;
51 };
52};
53
54&pinctrl {
55 spi_flash_pins: spi0-pins-func-1 {
56 mux {
57 function = "flash";
58 groups = "spi0", "spi0_wp_hold";
59 };
60
61 conf-pu {
62 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
63 drive-strength = <MTK_DRIVE_8mA>;
64 bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
65 };
66
67 conf-pd {
68 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
69 drive-strength = <MTK_DRIVE_8mA>;
70 bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
71 };
72 };
73
74 snfi_pins: snfi-pins-func-1 {
75 mux {
76 function = "flash";
77 groups = "snfi";
78 };
79
80 clk {
81 pins = "SPI0_CLK";
82 drive-strength = <MTK_DRIVE_8mA>;
83 bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
84 };
85
86 conf-pu {
87 pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
88 drive-strength = <MTK_DRIVE_6mA>;
89 bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
90 };
91
92 conf-pd {
93 pins = "SPI0_MOSI", "SPI0_MISO";
94 drive-strength = <MTK_DRIVE_6mA>;
95 bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
96 };
97 };
98
99 spic_pins: spi1-pins-func-1 {
100 mux {
101 function = "spi";
102 groups = "spi1_2";
103 };
104 };
105
106 uart1_pins: spi1-pins-func-3 {
107 mux {
108 function = "uart";
109 groups = "uart1_2";
110 };
111 };
112
113 pwm_pins: pwm0-pins-func-1 {
114 mux {
115 function = "pwm";
116 groups = "pwm0";
117 };
118 };
119
120 mmc0_pins_default: mmc0default {
121 mux {
122 function = "flash";
123 groups = "emmc_45";
124 input-schmitt-enable;
125 };
126
127 conf-cmd-dat {
128 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
129 "SPI0_CS", "SPI0_HOLD", "SPI0_WP",
130 "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
131 input-enable;
132 drive-strength = <MTK_DRIVE_4mA>;
133 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
134 };
135
136 conf-clk {
137 pins = "SPI1_CS";
138 drive-strength = <MTK_DRIVE_6mA>;
139 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
140 };
141
142 conf-rst {
143 pins = "PWM1";
144 drive-strength = <MTK_DRIVE_4mA>;
145 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
146 };
147 };
148};
149
150&snand {
151 pinctrl-names = "default";
152 pinctrl-0 = <&snfi_pins>;
153 status = "okay";
154 quad-spi;
155};
156
157&spi0 {
158 #address-cells = <1>;
159 #size-cells = <0>;
160 pinctrl-names = "default";
161 pinctrl-0 = <&spi_flash_pins>;
162 status = "okay";
163 must_tx;
164 enhance_timing;
165 dma_ext;
166 ipm_design;
167 support_quad;
168 tick_dly = <2>;
169 sample_sel = <0>;
170
171 spi_nor@0 {
172 compatible = "jedec,spi-nor";
173 reg = <0>;
174 spi-max-frequency = <52000000>;
175 };
176
177 spi_nand@1 {
178 compatible = "spi-nand";
179 reg = <1>;
180 spi-max-frequency = <52000000>;
181 };
182};
183
184&pwm {
185 pinctrl-names = "default";
186 pinctrl-0 = <&pwm_pins>;
187 status = "okay";
188};
189
190&watchdog {
191 status = "disabled";
192};
193
194&mmc0 {
195 pinctrl-names = "default";
196 pinctrl-0 = <&mmc0_pins_default>;
197 bus-width = <8>;
198 max-frequency = <52000000>;
199 cap-mmc-highspeed;
200 cap-mmc-hw-reset;
201 vmmc-supply = <&reg_3p3v>;
202 non-removable;
203 status = "okay";
204};