|
| 1 | +Index: openwrt/target/linux/ramips/dts/mt7628an_rakwireless_rak636.dts |
| 2 | +=================================================================== |
| 3 | +--- /dev/null |
| 4 | ++++ openwrt/target/linux/ramips/dts/mt7628an_rakwireless_rak636.dts |
| 5 | +@@ -0,0 +1,175 @@ |
| 6 | ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 7 | ++ |
| 8 | ++#include "mt7628an.dtsi" |
| 9 | ++ |
| 10 | ++#include <dt-bindings/gpio/gpio.h> |
| 11 | ++#include <dt-bindings/input/input.h> |
| 12 | ++ |
| 13 | ++/ { |
| 14 | ++ compatible = "rakwireless,rak636", "mediatek,mt7628an-soc"; |
| 15 | ++ model = "Rakwireless RAK636"; |
| 16 | ++ |
| 17 | ++ leds { |
| 18 | ++ compatible = "gpio-leds"; |
| 19 | ++ lora { |
| 20 | ++ label = "rak:green:lora"; |
| 21 | ++ gpios = <&gpio 15 GPIO_ACTIVE_LOW>; |
| 22 | ++ }; |
| 23 | ++ ethernet { |
| 24 | ++ label = "rak:green:eth"; |
| 25 | ++ gpios = <&gpio 43 GPIO_ACTIVE_LOW>; |
| 26 | ++ }; |
| 27 | ++ lora1 { |
| 28 | ++ label = "rak:green:lora1"; |
| 29 | ++ gpios = <&gpio 14 GPIO_ACTIVE_LOW>; |
| 30 | ++ }; |
| 31 | ++ |
| 32 | ++ wifi { |
| 33 | ++ label = "mediatek:orange:wifi"; |
| 34 | ++ gpios = <&gpio 44 GPIO_ACTIVE_LOW>; |
| 35 | ++ }; |
| 36 | ++ }; |
| 37 | ++ |
| 38 | ++ keys { |
| 39 | ++ compatible = "gpio-keys-polled"; |
| 40 | ++ |
| 41 | ++ #address-cells = <1>; |
| 42 | ++ #size-cells = <0>; |
| 43 | ++ poll-interval = <20>; |
| 44 | ++ |
| 45 | ++ reset { |
| 46 | ++ label = "reset"; |
| 47 | ++ gpios = <&gpio 38 1>; |
| 48 | ++ linux,code = <0x198>; |
| 49 | ++ }; |
| 50 | ++ |
| 51 | ++ dying-gasp { |
| 52 | ++ label = "dying-gasp"; |
| 53 | ++ gpios = <&gpio 18 GPIO_ACTIVE_LOW>; |
| 54 | ++ linux,code = <BTN_7>; |
| 55 | ++ }; |
| 56 | ++ }; |
| 57 | ++}; |
| 58 | ++ |
| 59 | ++&state_default { |
| 60 | ++ i2s { |
| 61 | ++ groups = "i2s"; |
| 62 | ++ function = "gpio"; |
| 63 | ++ }; |
| 64 | ++ spis { |
| 65 | ++ groups = "spis"; |
| 66 | ++ function = "gpio"; |
| 67 | ++ }; |
| 68 | ++ p0led_an { |
| 69 | ++ groups = "p0led_an"; |
| 70 | ++ function = "gpio"; |
| 71 | ++ }; |
| 72 | ++ p1led_an { |
| 73 | ++ groups = "p1led_an"; |
| 74 | ++ function = "gpio"; |
| 75 | ++ }; |
| 76 | ++ p2led_an { |
| 77 | ++ groups = "p2led_an"; |
| 78 | ++ function = "gpio"; |
| 79 | ++ }; |
| 80 | ++ p3led_an { |
| 81 | ++ groups = "p3led_an"; |
| 82 | ++ function = "gpio"; |
| 83 | ++ }; |
| 84 | ++ p4led_an { |
| 85 | ++ groups = "p4led_an"; |
| 86 | ++ function = "gpio"; |
| 87 | ++ }; |
| 88 | ++ wled_an { |
| 89 | ++ groups = "wled_an"; |
| 90 | ++ function = "gpio"; |
| 91 | ++ }; |
| 92 | ++}; |
| 93 | ++ |
| 94 | ++&spi0 { |
| 95 | ++ status = "okay"; |
| 96 | ++ |
| 97 | ++ pinctrl-names = "default"; |
| 98 | ++ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>; |
| 99 | ++ |
| 100 | ++ flash@0 { |
| 101 | ++ compatible = "jedec,spi-nor"; |
| 102 | ++ reg = <0>; |
| 103 | ++ spi-max-frequency = <10000000>; |
| 104 | ++ |
| 105 | ++ partitions { |
| 106 | ++ compatible = "fixed-partitions"; |
| 107 | ++ #address-cells = <1>; |
| 108 | ++ #size-cells = <1>; |
| 109 | ++ |
| 110 | ++ partition@0 { |
| 111 | ++ label = "u-boot"; |
| 112 | ++ reg = <0x0 0x30000>; |
| 113 | ++ read-only; |
| 114 | ++ }; |
| 115 | ++ |
| 116 | ++ partition@30000 { |
| 117 | ++ label = "u-boot-env"; |
| 118 | ++ reg = <0x30000 0x10000>; |
| 119 | ++ read-only; |
| 120 | ++ }; |
| 121 | ++ |
| 122 | ++ factory: partition@40000 { |
| 123 | ++ label = "factory"; |
| 124 | ++ reg = <0x40000 0xe000>; |
| 125 | ++ }; |
| 126 | ++ |
| 127 | ++ partition@4e000 { |
| 128 | ++ label = "pst-data"; /* persistent data */ |
| 129 | ++ reg = <0x4e000 0x2000>; |
| 130 | ++ }; |
| 131 | ++ |
| 132 | ++ partition@50000 { |
| 133 | ++ compatible = "denx,uimage"; |
| 134 | ++ label = "firmware"; |
| 135 | ++ reg = <0x50000 0x1fb0000>; /* support 32MB norflash */ |
| 136 | ++ }; |
| 137 | ++ }; |
| 138 | ++ }; |
| 139 | ++ |
| 140 | ++ spidev@1 { |
| 141 | ++ #address-cells = <1>; |
| 142 | ++ #size-cells = <1>; |
| 143 | ++ compatible = "spidev"; |
| 144 | ++ reg = <1>; |
| 145 | ++ spi-max-frequency = <40000000>; |
| 146 | ++ }; |
| 147 | ++}; |
| 148 | ++ |
| 149 | ++&i2c { |
| 150 | ++ status = "okay"; |
| 151 | ++}; |
| 152 | ++ |
| 153 | ++&i2s { |
| 154 | ++ status = "disabled"; |
| 155 | ++}; |
| 156 | ++ |
| 157 | ++&uart1 { |
| 158 | ++ status = "okay"; |
| 159 | ++}; |
| 160 | ++ |
| 161 | ++&uart2 { |
| 162 | ++ status = "okay"; |
| 163 | ++}; |
| 164 | ++ |
| 165 | ++&gdma { |
| 166 | ++ status = "okay"; |
| 167 | ++}; |
| 168 | ++ |
| 169 | ++ðernet { |
| 170 | ++ mtd-mac-address = <&factory 0x4>; |
| 171 | ++}; |
| 172 | ++ |
| 173 | ++&sdhci { |
| 174 | ++ status = "okay"; |
| 175 | ++ mediatek,cd-poll; |
| 176 | ++}; |
| 177 | ++ |
| 178 | ++&wmac { |
| 179 | ++ status = "okay"; |
| 180 | ++}; |
| 181 | +Index: openwrt/target/linux/ramips/image/mt76x8.mk |
| 182 | +=================================================================== |
| 183 | +--- openwrt.orig/target/linux/ramips/image/mt76x8.mk |
| 184 | ++++ openwrt/target/linux/ramips/image/mt76x8.mk |
| 185 | +@@ -489,6 +489,14 @@ define Device/rakwireless_rak633 |
| 186 | + endef |
| 187 | + TARGET_DEVICES += rakwireless_rak633 |
| 188 | + |
| 189 | ++define Device/rakwireless_rak636 |
| 190 | ++ IMAGE_SIZE := 32448k |
| 191 | ++ DEVICE_VENDOR := Rakwireless |
| 192 | ++ DEVICE_MODEL := RAK636 |
| 193 | ++ DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci uboot-envtools kmod-sdhci-mt7620 |
| 194 | ++endef |
| 195 | ++TARGET_DEVICES += rakwireless_rak636 |
| 196 | ++ |
| 197 | + define Device/ravpower_rp-wd009 |
| 198 | + IMAGE_SIZE := 14272k |
| 199 | + DEVICE_VENDOR := RAVPower |
| 200 | +Index: openwrt/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds |
| 201 | +=================================================================== |
| 202 | +--- openwrt.orig/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds |
| 203 | ++++ openwrt/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds |
| 204 | +@@ -65,6 +65,10 @@ oraybox,x1) |
| 205 | + rakwireless,rak633) |
| 206 | + ucidef_set_led_netdev "wifi_led" "wifi" "blue:wifi" "wlan0" |
| 207 | + ;; |
| 208 | ++rakwireless,rak636) |
| 209 | ++ ucidef_set_led_netdev "wifi_led" "wifi" "mediatek:orange:wifi" "ra0" "tx" |
| 210 | ++ ucidef_set_led_switch "eth_led" "eth" "rak:green:eth" "switch0" "0x1" |
| 211 | ++ ;; |
| 212 | + tama,w06) |
| 213 | + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" |
| 214 | + ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" |
| 215 | +Index: openwrt/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network |
| 216 | +=================================================================== |
| 217 | +--- openwrt.orig/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network |
| 218 | ++++ openwrt/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network |
| 219 | +@@ -145,7 +145,8 @@ ramips_setup_interfaces() |
| 220 | + ucidef_add_switch "switch0" \ |
| 221 | + "3:lan" "6@eth0" |
| 222 | + ;; |
| 223 | +- rakwireless,rak633) |
| 224 | ++ rakwireless,rak633|\ |
| 225 | ++ rakwireless,rak636) |
| 226 | + ucidef_add_switch "switch0" \ |
| 227 | + "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" |
| 228 | + ;; |
| 229 | +@@ -260,6 +261,9 @@ ramips_setup_macs() |
| 230 | + zyxel,keenetic-extra-ii) |
| 231 | + wan_mac=$(mtd_get_mac_binary rf-eeprom 0x28) |
| 232 | + ;; |
| 233 | ++ rakwireless,rak636) |
| 234 | ++ wan_mac=$(mtd_get_mac_binary factory 0x4) |
| 235 | ++ ;; |
| 236 | + linksys,e5400) |
| 237 | + wan_mac=$(mtd_get_mac_binary factory 0x22) |
| 238 | + ;; |
0 commit comments