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 12c89237015..7926836526e 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -67,6 +67,7 @@ realtek_setup_macs() linksys,lgs328mpc-v2|\ linksys,lgs352c|\ netgear,gs108t-v3|\ + netgear,gs110tp-v3|\ netgear,gs110tpp-v1|\ netgear,gs110tup-v1|\ netgear,gs308t-v1|\ diff --git a/target/linux/realtek/dts/rtl8380_netgear_gs110tp-v3.dts b/target/linux/realtek/dts/rtl8380_netgear_gs110tp-v3.dts new file mode 100644 index 00000000000..3247de87931 --- /dev/null +++ b/target/linux/realtek/dts/rtl8380_netgear_gs110tp-v3.dts @@ -0,0 +1,128 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl8380_netgear_gigabit.dtsi" + +#include + +/ { + compatible = "netgear,gs110tp-v3", "realtek,rtl838x-soc"; + model = "Netgear GS110TP v3"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_amber; + led-running = &led_power_green; + led-upgrade = &led_power_amber; + }; + + leds { + compatible = "gpio-leds"; + + led_power_amber: led-0 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio1 32 GPIO_ACTIVE_LOW>; + }; + + led_power_green: led-1 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; + }; + }; + + /* i2c of the left SFP cage: port 9 */ + i2c0: i2c-gpio-0 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 36 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp0: sfp-p9 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; + mod-def0-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + tx-disable-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + }; + + /* i2c of the right SFP cage: port 10 */ + i2c1: i2c-gpio-1 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 36 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp1: sfp-p10 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + los-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; + mod-def0-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + tx-disable-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; + }; +}; + +&firmware { + openwrt,ih-magic = <0x4e474520>; +}; + +&uart1 { + status = "okay"; + + pse: ethernet-pse { + compatible = "netgear,gs110tp-v3-pse", "realtek,pse-mcu-gen1"; + current-speed = <19200>; + disable-ports-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + + pse-pis { + #address-cells = <1>; + #size-cells = <0>; + + PSE_PI(0) + PSE_PI(1) + PSE_PI(2) + PSE_PI(3) + PSE_PI(4) + PSE_PI(5) + PSE_PI(6) + PSE_PI(7) + }; + }; +}; + +/* Copper ports lan1..lan8 (phy8..phy15) -> MCU PoE ports 0..7 */ +&phy8 { pses = <&pse_pi0>; }; +&phy9 { pses = <&pse_pi1>; }; +&phy10 { pses = <&pse_pi2>; }; +&phy11 { pses = <&pse_pi3>; }; +&phy12 { pses = <&pse_pi4>; }; +&phy13 { pses = <&pse_pi5>; }; +&phy14 { pses = <&pse_pi6>; }; +&phy15 { pses = <&pse_pi7>; }; + +&switch0 { + ethernet-ports { + port24: port@24 { + reg = <24>; + label = SWITCH_PORT_LABEL(9); + pcs-handle = <&serdes4 0>; + phy-mode = "1000base-x"; + managed = "in-band-status"; + sfp = <&sfp0>; + }; + port26: port@26 { + reg = <26>; + label = SWITCH_PORT_LABEL(10); + pcs-handle = <&serdes5 0>; + phy-mode = "1000base-x"; + managed = "in-band-status"; + sfp = <&sfp1>; + }; + }; +}; diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk index a2827b05c23..a51425b498e 100644 --- a/target/linux/realtek/image/rtl838x.mk +++ b/target/linux/realtek/image/rtl838x.mk @@ -264,6 +264,14 @@ define Device/netgear_gs108t-v3 endef TARGET_DEVICES += netgear_gs108t-v3 +define Device/netgear_gs110tp-v3 + $(Device/netgear_nge) + DEVICE_MODEL := GS110TP + DEVICE_VARIANT := v3 + DEVICE_PACKAGES += kmod-pse-realtek-mcu-uart +endef +TARGET_DEVICES += netgear_gs110tp-v3 + define Device/netgear_gs110tpp-v1 $(Device/netgear_nge) DEVICE_MODEL := GS110TPP