~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: 8bc3b1673ac47756ea3fde05769db3a13576dfe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2020 MediaTek Inc.
 *
 * Author: Weijie Gao <weijie.gao@mediatek.com>
 */

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include "mt7620.dtsi"

/ {
	compatible = "mediatek,mt7620-mt7530-rfb", "mediatek,mt7620-soc";
	model = "MediaTek MT7620-MT7530 RFB (MTKC712)";

	aliases {
		serial0 = &uartlite;
		spi0 = &spi0;
	};

	chosen {
		stdout-path = &uartlite;
	};
};

&uartlite {
	status = "okay";
};

&pinctrl {
	state_default: pin_state {
		pleds {
			groups = "ephy led", "wled";
			function = "led";
		};

		gpios {
			groups = "pa", "uartf";
			function = "gpio";
		};
	};

	gsw_pins: gsw_pins {
		mdio {
			groups = "mdio";
			function = "mdio";
		};

		rgmii1 {
			groups = "rgmii1";
			function = "rgmii1";
		};
	};
};

&spi0 {
	status = "okay";
	num-cs = <2>;

	spi-flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "jedec,spi-nor";
		spi-max-frequency = <25000000>;
		reg = <0>;
	};
};

&gpio0 {
	pa0_pull_low {
		gpio-hog;
		output-low;
		gpios = <20 GPIO_ACTIVE_HIGH>;
	};

	pa1_pull_low {
		gpio-hog;
		output-low;
		gpios = <21 GPIO_ACTIVE_HIGH>;
	};
};

&eth {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&gsw_pins>;

	port5 {
		phy-mode = "rgmii";
		phy-addr = <5>;
		fixed-link {
			full-duplex;
			speed = <1000>;
			mediatek,mt7530;
			mediatek,mt7530-reset = <&gpio0 10 GPIO_ACTIVE_HIGH>;
		};
	};
};