aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn5020_ubnt_usg.dts
blob: 24d8abe4ad1d0a76d64d824f6835b21f52a9329c (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
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Device tree source for Ubiquity UniFi Security Gateway.
 *
 * Written for EdgeRouter Lite by: Aaro Koskinen <aaro.koskinen@iki.fi>
 * Adapted for USG by: Clemens Hopfer <openwrt@wireloss.net>
 */

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

/ {
	compatible = "ubnt,usg";
	model = "Ubiquiti UniFi Security Gateway";

	soc@0 {
		smi0: mdio@1180000001800 {
			phy5: ethernet-phy@5 {
				reg = <5>;
				compatible = "ethernet-phy-ieee802.3-c22";
			};
			phy6: ethernet-phy@6 {
				reg = <6>;
				compatible = "ethernet-phy-ieee802.3-c22";
			};
			phy7: ethernet-phy@7 {
				reg = <7>;
				compatible = "ethernet-phy-ieee802.3-c22";
			};
		};

		pip: pip@11800a0000000 {
			interface@0 {
				ethernet@0 {
					phy-handle = <&phy7>;
					rx-delay = <0>;
					tx-delay = <0x10>;
				};
				ethernet@1 {
					phy-handle = <&phy6>;
					rx-delay = <0>;
					tx-delay = <0x10>;
				};
				ethernet@2 {
					phy-handle = <&phy5>;
					rx-delay = <0>;
					tx-delay = <0x10>;
				};
			};
		};

		uart0: serial@1180000000800 {
			clock-frequency = <500000000>;
		};

		usbn: usbn@1180068000000 {
			refclk-frequency = <12000000>;
			refclk-type = "crystal";
		};

	};

	leds {
		compatible = "gpio-leds";

		led_dome_white: led-0 {
			label = "white:dome";
			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
		};

		led_dome_blue: led-1 {
			label = "blue:dome";
			gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
		};
	};

	keys {
		compatible = "gpio-keys-polled";
		poll-interval = <20>;

		key-restart {
			label = "reset";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
			debounce-interval = <60>;
		};
	};

	aliases {
		pip = &pip;
		led-boot = &led_dome_white;
		led-failsafe = &led_dome_blue;
		led-running = &led_dome_blue;
		led-upgrade = &led_dome_blue;
	};
};