diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8-16m.dts b/target/linux/ramips/dts/mt7628an_jotale_js76x8-16m.dts new file mode 100644 index 0000000000..8e924aeec7 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8-16m.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an_jotale_js76x8.dtsi" + +/ { + compatible = "jotale,js76x8-16m", "jotale,js76x8", "mediatek,mt7628an-soc"; + model = "Jotale JS76x8 (16M)"; +}; + +&firmware { + reg = <0x50000 0xfb0000>; +}; diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8-32m.dts b/target/linux/ramips/dts/mt7628an_jotale_js76x8-32m.dts new file mode 100644 index 0000000000..12544fd521 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8-32m.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an_jotale_js76x8.dtsi" + +/ { + compatible = "jotale,js76x8-32m", "jotale,js76x8", "mediatek,mt7628an-soc"; + model = "Jotale JS76x8 (32M)"; +}; + +&firmware { + reg = <0x50000 0x1fb0000>; +}; diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8-8m.dts b/target/linux/ramips/dts/mt7628an_jotale_js76x8-8m.dts new file mode 100644 index 0000000000..7dc23349bf --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8-8m.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an_jotale_js76x8.dtsi" + +/ { + compatible = "jotale,js76x8-8m", "mediatek,mt7628an-soc"; + model = "Jotale JS76x8 (8M)"; +}; + +&firmware { + reg = <0x50000 0x7b0000>; +}; diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi new file mode 100644 index 0000000000..61c5d7b7c4 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7628an.dtsi" + +#include +#include + +/ { + compatible = "jotale,js76x8", "mediatek,mt7628an-soc"; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_system: system { + label = "js76x8:green:system"; + gpios = <&gpio 37 GPIO_ACTIVE_LOW>; + }; + + wifi { + label = "js76x8:green:wifi"; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 38 GPIO_ACTIVE_HIGH>; + linux,code = ; + }; + }; +}; + +&state_default { + gpio { + groups = "refclk", "wdt", "wled_an"; + function = "gpio"; + }; +}; + +&spi0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + m25p,chunked-io = <32>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + firmware: partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + /* reg property is set based on flash size in DTS files */ + }; + }; + }; +}; + +&i2c { + status = "okay"; +}; + +&i2s { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&sdhci { + status = "okay"; + mediatek,cd-low; +}; + +&wmac { + status = "okay"; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 4b2255bd6a..00c8fbe43e 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -160,6 +160,33 @@ define Device/iptime_a604m endef TARGET_DEVICES += iptime_a604m +define Device/jotale_js76x8 + DEVICE_VENDOR := Jotale + DEVICE_MODEL := JS76x8 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci +endef + +define Device/jotale_js76x8-8m + $(Device/jotale_js76x8) + IMAGE_SIZE := 7872k + DEVICE_VARIANT := 8M +endef +TARGET_DEVICES += jotale_js76x8-8m + +define Device/jotale_js76x8-16m + $(Device/jotale_js76x8) + IMAGE_SIZE := 16064k + DEVICE_VARIANT := 16M +endef +TARGET_DEVICES += jotale_js76x8-16m + +define Device/jotale_js76x8-32m + $(Device/jotale_js76x8) + IMAGE_SIZE := 32448k + DEVICE_VARIANT := 32M +endef +TARGET_DEVICES += jotale_js76x8-32m + define Device/mediatek_linkit-smart-7688 IMAGE_SIZE := 32448k DEVICE_VENDOR := MediaTek diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index 0809109c13..cf7e88ebf1 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -92,6 +92,12 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0" ;; + jotale,js76x8-8m|\ + jotale,js76x8-16m|\ + jotale,js76x8-32m) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "6@eth0" + ;; netgear,r6020|\ netgear,r6080|\ netgear,r6120) @@ -174,6 +180,13 @@ ramips_setup_macs() totolink,a3) wan_mac=$(mtd_get_mac_binary u-boot 0x1fc40) ;; + jotale,js76x8-8m|\ + jotale,js76x8-16m|\ + jotale,js76x8-32m|\ + skylab,skw92a|\ + totolink,lr1200) + wan_mac=$(mtd_get_mac_binary factory 0x2e) + ;; mediatek,linkit-smart-7688|\ onion,omega2|\ onion,omega2p) @@ -189,10 +202,6 @@ ramips_setup_macs() wiznet,wizfi630s) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 1) ;; - skylab,skw92a|\ - totolink,lr1200) - wan_mac=$(mtd_get_mac_binary factory 0x2e) - ;; tplink,archer-c20-v4|\ tplink,archer-c50-v3|\ tplink,tl-mr3420-v5|\