octeon: add support for Ubiquiti UniFi Security Gateway
[openwrt/staging/dedeckeh.git] / target / linux / octeon / files / arch / mips / boot / dts / cavium-octeon / cn5020_ubnt_usg.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Device tree source for Ubiquity UniFi Security Gateway.
4 *
5 * Written for EdgeRouter Lite by: Aaro Koskinen <aaro.koskinen@iki.fi>
6 * Adapted for USG by: Clemens Hopfer <openwrt@wireloss.net>
7 */
8
9 /include/ "octeon_3xxx.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12
13 / {
14 compatible = "ubnt,usg";
15 model = "Ubiquiti UniFi Security Gateway";
16
17 soc@0 {
18 smi0: mdio@1180000001800 {
19 phy5: ethernet-phy@5 {
20 reg = <5>;
21 compatible = "ethernet-phy-ieee802.3-c22";
22 };
23 phy6: ethernet-phy@6 {
24 reg = <6>;
25 compatible = "ethernet-phy-ieee802.3-c22";
26 };
27 phy7: ethernet-phy@7 {
28 reg = <7>;
29 compatible = "ethernet-phy-ieee802.3-c22";
30 };
31 };
32
33 pip: pip@11800a0000000 {
34 interface@0 {
35 ethernet@0 {
36 phy-handle = <&phy7>;
37 rx-delay = <0>;
38 tx-delay = <0x10>;
39 };
40 ethernet@1 {
41 phy-handle = <&phy6>;
42 rx-delay = <0>;
43 tx-delay = <0x10>;
44 };
45 ethernet@2 {
46 phy-handle = <&phy5>;
47 rx-delay = <0>;
48 tx-delay = <0x10>;
49 };
50 };
51 };
52
53 uart0: serial@1180000000800 {
54 clock-frequency = <500000000>;
55 };
56
57 usbn: usbn@1180068000000 {
58 refclk-frequency = <12000000>;
59 refclk-type = "crystal";
60 };
61
62 };
63
64 leds {
65 compatible = "gpio-leds";
66
67 led_dome_white: led-0 {
68 label = "white:dome";
69 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
70 };
71
72 led_dome_blue: led-1 {
73 label = "blue:dome";
74 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
75 };
76 };
77
78 keys {
79 compatible = "gpio-keys-polled";
80 poll-interval = <20>;
81
82 key-restart {
83 label = "reset";
84 linux,code = <KEY_RESTART>;
85 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
86 debounce-interval = <60>;
87 };
88 };
89
90 aliases {
91 pip = &pip;
92 led-boot = &led_dome_white;
93 led-failsafe = &led_dome_blue;
94 led-running = &led_dome_blue;
95 led-upgrade = &led_dome_blue;
96 };
97 };