ramips: mt7621-dts: add pinctrl properties for ethernet
[openwrt/staging/noltari.git] / target / linux / ramips / dts / mt7621_gnubee_gb-pc1.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc";
8 model = "GB-PC1";
9
10 aliases {
11 led-boot = &led_status;
12 led-failsafe = &led_status;
13 led-running = &led_status;
14 led-upgrade = &led_status;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
23 linux,code = <KEY_RESTART>;
24 };
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 system {
31 label = "green:system";
32 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
33 };
34
35 led_status: status {
36 label = "green:status";
37 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
38 };
39
40 lan1 {
41 label = "green:lan1";
42 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
43 };
44
45 lan2 {
46 label = "green:lan2";
47 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
48 };
49 };
50 };
51
52 &sdhci {
53 status = "okay";
54 };
55
56 &spi0 {
57 status = "okay";
58
59 flash@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <80000000>;
63 broken-flash-reset;
64 m25p,fast-read;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x30000>;
74 read-only;
75 };
76
77 partition@30000 {
78 label = "u-boot-env";
79 reg = <0x30000 0x10000>;
80 read-only;
81 };
82
83 factory: partition@40000 {
84 label = "factory";
85 reg = <0x40000 0x10000>;
86 read-only;
87 };
88
89 partition@50000 {
90 compatible = "denx,uimage";
91 label = "firmware";
92 reg = <0x50000 0x1fb0000>;
93 };
94 };
95 };
96 };
97
98 &pcie {
99 status = "okay";
100 };
101
102 &ethernet {
103 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
104 };
105
106 &gmac0 {
107 nvmem-cells = <&macaddr_factory_e000>;
108 nvmem-cell-names = "mac-address";
109 };
110
111 &switch0 {
112 ports {
113 port@0 {
114 status = "okay";
115 label = "lan1";
116 };
117
118 port@4 {
119 status = "okay";
120 label = "lan2";
121 };
122 };
123 };
124
125 &state_default {
126 gpio {
127 groups = "jtag", "rgmii2", "uart3", "wdt";
128 function = "gpio";
129 };
130 };
131
132 &factory {
133 compatible = "nvmem-cells";
134 #address-cells = <1>;
135 #size-cells = <1>;
136
137 macaddr_factory_e000: macaddr@e000 {
138 reg = <0xe000 0x6>;
139 };
140 };