aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts
blob: 4dc26a783ac70e38bc83b9616576dbf0484c3b0d (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2018, Linaro Limited

/dts-v1/;

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

/ {
	model = "Qualcomm Technologies, Inc. QCS404 EVB 4000";
	compatible = "qcom,qcs404-evb";
};

#define AR8035

&ethernet {
	status = "ok";

	snps,reset-gpio = <&tlmm 60 GPIO_ACTIVE_LOW>;
	snps,reset-active-low;
	snps,reset-delays-us = <0 10000 10000>;

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

#ifdef AR8035
	phy-handle = <&phy1>;
	phy-mode = "rgmii";
	mdio {
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		compatible = "snps,dwmac-mdio";
		phy1: phy@4 {
			device_type = "ethernet-phy";
			reg = <0x4>;
		};
	};
#endif

#ifdef QCA8K
	phy-mode = "rgmii";

	fixed-link {
		speed = <1000>;
		full-duplex;
	};

	mdio {
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		compatible = "snps,dwmac-mdio";

		phy_port2: phy@1 {
			reg = <1>;
		};

		phy_port3: phy@2 {
			reg = <2>;
		};

		switch0@16 {
			compatible = "qca,qca8334";
			#address-cells = <1>;
			#size-cells = <0>;

			reg = <16>;

			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				cpu_port1: port@0 {
					reg = <0>;
					label = "cpu";
					ethernet = <&ethernet>;
					phy-mode = "rgmii";
					fixed-link {
						speed = <1000>;
						full-duplex;
					};
				};

				port@2 {
					reg = <2>;
					label = "top";
					cpu = <&cpu_port1>;
					phy-handle = <&phy_port2>;
				};

				port@3 {
					reg = <3>;
					label = "bottom";
					cpu = <&cpu_port1>;
					phy-handle = <&phy_port3>;
				};
			};
		};
	};
#endif

};

&tlmm {
	ethernet_defaults: ethernet-defaults {
		int {
			pins = "gpio61";
			function = "rgmii_int";
			bias-disable;
			drive-strength = <2>;
		};
		mdc {
			pins = "gpio76";
			function = "rgmii_mdc";
			bias-pull-up;
		};
		mdio {
			pins = "gpio75";
			function = "rgmii_mdio";
			bias-pull-up;
		};
		tx {
			pins = "gpio67", "gpio66", "gpio65", "gpio64";
			function = "rgmii_tx";
			bias-pull-up;
			drive-strength = <16>;
		};
		rx {
			pins = "gpio73", "gpio72", "gpio71", "gpio70";
			function = "rgmii_rx";
			bias-disable;
			drive-strength = <2>;
		};
		tx-ctl {
			pins = "gpio68";
			function = "rgmii_ctl";
			bias-pull-up;
			drive-strength = <16>;
		};
		rx-ctl {
			pins = "gpio74";
			function = "rgmii_ctl";
			bias-disable;
			drive-strength = <2>;
		};
		tx-ck {
			pins = "gpio63";
			function = "rgmii_ck";
			bias-pull-up;
			drive-strength = <16>;
		};
		rx-ck {
			pins = "gpio69";
			function = "rgmii_ck";
			bias-disable;
			drive-strength = <2>;
		};
	};
};