diff --git a/target/linux/ath79/dts/ar9330_dragino_dragino2.dtsi b/target/linux/ath79/dts/ar9330_dragino_dragino2.dtsi new file mode 100644 index 00000000000..bfbaa03fd09 --- /dev/null +++ b/target/linux/ath79/dts/ar9330_dragino_dragino2.dtsi @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9330.dtsi" + +#include +#include +#include + +/ { + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins>; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + label-mac-device = &wmac; + }; + + gpio_leds: leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&switch_led_disable_pins>; + + led_system: system { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 28 GPIO_ACTIVE_HIGH>; + default-state = "on"; + panic-indicator; + }; + }; + + gpio_keys: keys { + compatible = "gpio-keys"; + }; +}; + +&usb { + status = "okay"; + + dr_mode = "host"; +}; + +&usb_phy { + status = "okay"; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + reg = <0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0xfa0000>; + }; + + partition@fe0000 { + label = "config"; + reg = <0xfe0000 0x10000>; + read-only; + }; + partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; + + cal_art_1000: calibration@1000 { + reg = <0x1000 0x440>; + }; + }; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +ð1 { + status = "okay"; + + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; + + gmac-config { + device = <&gmac>; + + switch-phy-addr-swap = <0>; + switch-phy-swap = <0>; + }; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&macaddr_art_1002>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; +}; diff --git a/target/linux/ath79/dts/ar9330_dragino_ms14.dts b/target/linux/ath79/dts/ar9330_dragino_ms14.dts new file mode 100644 index 00000000000..9901df958ca --- /dev/null +++ b/target/linux/ath79/dts/ar9330_dragino_ms14.dts @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9330_dragino_dragino2.dtsi" + +/ { + model = "Dragino MS14"; + compatible = "dragino,ms14", "qca,ar9330"; +}; + +&gpio_leds { + lan { + function = LED_FUNCTION_LAN; + color = ; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + wan { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; +}; + +&gpio_keys { + jumpstart { + label = "jumpstart"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; +}; + +&wmac { + led { + led-sources = <0>; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index ffe1f5d7b61..ef999afd071 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -252,6 +252,10 @@ dlink,dap-1365-a1) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100" ;; +dragino,ms14) + ucidef_set_led_netdev "lan" "LAN" "red:lan" "eth0" + ucidef_set_led_netdev "wan" "WAN" "red:wan" "eth1" + ;; engenius,ens202ext-v1|\ engenius,enstationac-v1) ucidef_set_rssimon "wlan0" "200000" "1" diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration index e9b0fade381..51289026318 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration @@ -11,6 +11,9 @@ dlink,dap-1330-a1) "green:signal1=green:rssimediumhigh" \ "green:signal2=green:rssihigh" ;; +dragino,ms14) + migrate_leds "red:system=red:status" + ;; engenius,epg5000) migrate_leds ":wlan-2g=:wlan2g" ":wlan-5g=:wlan5g" ;; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index b1a37807991..be1658801f6 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1315,6 +1315,16 @@ define Device/dlink_dir-842-c3 endef TARGET_DEVICES += dlink_dir-842-c3 +define Device/dragino_ms14 + SOC := ar9330 + DEVICE_VENDOR := Dragino + DEVICE_MODEL := MS14 + DEVICE_PACKAGES := kmod-usb-chipidea2 + IMAGE_SIZE := 16000k + SUPPORTED_DEVICES += dragino2 +endef +TARGET_DEVICES += dragino_ms14 + define Device/elecom_wab DEVICE_VENDOR := ELECOM IMAGE_SIZE := 14336k