| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | #include "mt7621.dtsi" |
| 2 | |
| 3 | #include <dt-bindings/gpio/gpio.h> |
| 4 | #include <dt-bindings/input/input.h> |
| 5 | |
| 6 | / { |
| 7 | compatible = "firefly,firewrt", "mediatek,mt7621-soc"; |
| 8 | model = "Firefly FireWRT"; |
| 9 | |
| 10 | aliases { |
| 11 | led-boot = &led_power; |
| 12 | led-failsafe = &led_power; |
| 13 | led-running = &led_power; |
| 14 | led-upgrade = &led_power; |
| 15 | }; |
| 16 | |
| 17 | leds { |
| 18 | compatible = "gpio-leds"; |
| 19 | |
| 20 | led_power: power { |
| 21 | label = "green:power"; |
| 22 | gpios = <&gpio 22 GPIO_ACTIVE_LOW>; |
| 23 | }; |
| 24 | }; |
| 25 | |
| 26 | keys { |
| 27 | compatible = "gpio-keys"; |
| 28 | |
| 29 | wps { |
| 30 | label = "wps"; |
| 31 | gpios = <&gpio 18 GPIO_ACTIVE_LOW>; |
| 32 | linux,code = <KEY_WPS_BUTTON>; |
| 33 | }; |
| 34 | |
| 35 | power { |
| 36 | label = "power"; |
| 37 | gpios = <&gpio 23 GPIO_ACTIVE_LOW>; |
| 38 | linux,code = <KEY_POWER>; |
| 39 | }; |
| 40 | }; |
| 41 | }; |
| 42 | |
| 43 | &sdhci { |
| 44 | status = "okay"; |
| 45 | }; |
| 46 | |
| 47 | &spi0 { |
| 48 | status = "okay"; |
| 49 | |
| 50 | flash@0 { |
| 51 | compatible = "jedec,spi-nor"; |
| 52 | reg = <0>; |
| 53 | spi-max-frequency = <10000000>; |
| 54 | |
| 55 | partitions { |
| 56 | compatible = "fixed-partitions"; |
| 57 | #address-cells = <1>; |
| 58 | #size-cells = <1>; |
| 59 | |
| 60 | partition@0 { |
| 61 | label = "u-boot"; |
| 62 | reg = <0x0 0x30000>; |
| 63 | read-only; |
| 64 | }; |
| 65 | |
| 66 | partition@30000 { |
| 67 | label = "u-boot-env"; |
| 68 | reg = <0x30000 0x10000>; |
| 69 | read-only; |
| 70 | }; |
| 71 | |
| 72 | factory: partition@40000 { |
| 73 | label = "factory"; |
| 74 | reg = <0x40000 0x10000>; |
| 75 | read-only; |
| 76 | }; |
| 77 | |
| 78 | partition@50000 { |
| 79 | compatible = "denx,uimage"; |
| 80 | label = "firmware"; |
| 81 | reg = <0x50000 0xfb0000>; |
| 82 | }; |
| 83 | }; |
| 84 | }; |
| 85 | }; |
| 86 | |
| 87 | &pcie { |
| 88 | status = "okay"; |
| 89 | }; |
| 90 | |
| 91 | &pcie0 { |
| 92 | mt76@0,0 { |
| 93 | reg = <0x0000 0 0 0 0>; |
| 94 | mediatek,mtd-eeprom = <&factory 0x8000>; |
| 95 | ieee80211-freq-limit = <5000000 6000000>; |
| 96 | }; |
| 97 | }; |
| 98 | |
| 99 | &pcie1 { |
| 100 | mt76@0,0 { |
| 101 | reg = <0x0000 0 0 0 0>; |
| 102 | mediatek,mtd-eeprom = <&factory 0x0000>; |
| 103 | ieee80211-freq-limit = <2400000 2500000>; |
| 104 | }; |
| 105 | }; |
| 106 | |
| 107 | &gmac0 { |
| 108 | mtd-mac-address = <&factory 0xe000>; |
| 109 | }; |
| 110 | |
| 111 | &switch0 { |
| 112 | ports { |
| 113 | port@0 { |
| 114 | status = "okay"; |
| 115 | label = "lan1"; |
| 116 | }; |
| 117 | |
| 118 | port@1 { |
| 119 | status = "okay"; |
| 120 | label = "lan2"; |
| 121 | }; |
| 122 | |
| 123 | port@2 { |
| 124 | status = "okay"; |
| 125 | label = "lan3"; |
| 126 | }; |
| 127 | |
| 128 | port@3 { |
| 129 | status = "okay"; |
| 130 | label = "lan4"; |
| 131 | }; |
| 132 | |
| 133 | port@4 { |
| 134 | status = "okay"; |
| 135 | label = "wan"; |
| 136 | mtd-mac-address = <&factory 0xe000>; |
| 137 | mtd-mac-address-increment = <1>; |
| 138 | }; |
| 139 | }; |
| 140 | }; |
| 141 | |
| 142 | &state_default { |
| 143 | gpio { |
| 144 | groups = "wdt", "rgmii2"; |
| 145 | function = "gpio"; |
| 146 | }; |
| 147 | }; |