diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 31f6793cb3..a381f9e504 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -52,6 +52,7 @@ realtek_setup_macs() local label_mac="" case $board in + datto,l8|\ edgecore,ecs4100-12ph|\ linksys,lgs310c|\ linksys,lgs328c|\ @@ -186,6 +187,9 @@ realtek_setup_poe() netgear,gs110tpp-v1) ucidef_set_poe 130 "$(filter_port_list "$lan_list" "lan9 lan10")" ;; + datto,l8) + ucidef_set_poe 55 "lan5 lan6 lan7 lan8 lan4 lan3 lan2 lan1" + ;; engenius,ews2910p-v1|\ engenius,ews2910p-v3) ucidef_set_poe 60 "$(filter_port_list "$lan_list" "lan9 lan10")" diff --git a/target/linux/realtek/dts/rtl8380_datto_l8.dts b/target/linux/realtek/dts/rtl8380_datto_l8.dts new file mode 100644 index 0000000000..174b7b0492 --- /dev/null +++ b/target/linux/realtek/dts/rtl8380_datto_l8.dts @@ -0,0 +1,212 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include +#include +#include + +#include "rtl838x.dtsi" + +/ { + compatible = "datto,l8", "realtek,rtl838x-soc"; + + model = "Datto L8"; + + aliases { + label-mac-device = ðernet0; + led-boot = &led_power; + led-failsafe = &led_fault; + led-running = &led_power; + led-upgrade = &led_power; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; + + leds: leds { + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_disable_sys_led>; + compatible = "gpio-leds"; + + led_power: led-0 { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; + }; + + /* high: LAN Mode, low: PoE Mode */ + led_lan_mode: led-1 { + label = "green:lan-mode"; + gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; + }; + + led_fault: led-2 { + function = LED_FUNCTION_FAULT; + color = ; + gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; + }; + + led_poe_max: led-3 { + label = "amber:poe-max"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + mode { + label = "mode"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio-restart { + compatible = "gpio-restart"; + gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; + open-source; + }; + + virtual_flash { + compatible = "mtd-concat"; + + devices = <&fwconcat0>, <&fwconcat1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "firmware"; + reg = <0x0 0x1a60000>; + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = <0x00703400>; + }; + }; + }; +}; + +&mdio_aux { + status = "okay"; + + gpio1: expander@0 { + compatible = "realtek,rtl8231"; + reg = <0>; + + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&gpio1 0 0 37>; + + led-controller { + compatible = "realtek,rtl8231-leds"; + status = "disabled"; + }; + }; +}; + +&uart1 { + status = "okay"; +}; + +&mdio_bus0 { + INTERNAL_PHY(8) + INTERNAL_PHY(9) + INTERNAL_PHY(10) + INTERNAL_PHY(11) + INTERNAL_PHY(12) + INTERNAL_PHY(13) + INTERNAL_PHY(14) + INTERNAL_PHY(15) +}; + +&switch0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + SWITCH_PORT(8, 1, internal) + SWITCH_PORT(9, 2, internal) + SWITCH_PORT(10, 3, internal) + SWITCH_PORT(11, 4, internal) + SWITCH_PORT(12, 5, internal) + SWITCH_PORT(13, 6, internal) + SWITCH_PORT(14, 7, internal) + SWITCH_PORT(15, 8, internal) + + port@28 { + ethernet = <ðernet0>; + reg = <28>; + phy-mode = "internal"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; + +ðernet0 { + nvmem-cells = <&macaddr_ubootenv_ethaddr 0>; + nvmem-cell-names = "mac-address"; +}; + +&spi0 { + status = "okay"; + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x80000>; + read-only; + }; + partition@80000 { + label = "u-boot-env"; + reg = <0x80000 0x10000>; + nvmem-layout { + compatible = "u-boot,env"; + + macaddr_ubootenv_ethaddr: ethaddr { + #nvmem-cell-cells = <1>; + }; + }; + }; + partition@90000 { + label = "u-boot-env2"; + reg = <0x90000 0x20000>; + }; + partition@a0000 { + label = "cfg"; + reg = <0xa0000 0x400000>; + }; + partition@4a0000 { + label = "log"; + reg = <0x4a0000 0x100000>; + }; + fwconcat0: partition@5a0000 { + label = "runtime"; + reg = <0x5a0000 0xd30000>; + }; + fwconcat1: partition@12d0000 { + label = "runtime2"; + reg = <0x12d0000 0xd30000>; + }; + }; + }; +}; diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk index 0564741c6c..7dbfad449f 100644 --- a/target/linux/realtek/image/rtl838x.mk +++ b/target/linux/realtek/image/rtl838x.mk @@ -91,6 +91,19 @@ define Device/d-link_dgs-1210-28p-f endef TARGET_DEVICES += d-link_dgs-1210-28p-f +define Device/datto_l8 + $(Device/uimage-rt-loader) + SOC := rtl8380 + DEVICE_VENDOR := Datto + DEVICE_MODEL := L8 + DEVICE_ALT0_VENDOR := Open Mesh + DEVICE_ALT0_MODEL := S8-L + DEVICE_PACKAGES += realtek-poe + UIMAGE_MAGIC := 0x00703400 + IMAGE_SIZE := 13504k +endef +TARGET_DEVICES += datto_l8 + define Device/engenius_ews2910p-v1 $(Device/engenius_ews2910p) SOC := rtl8380