summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target/linux/realtek/base-files/etc/board.d/02_network4
-rw-r--r--target/linux/realtek/base-files/etc/uci-defaults/04_dlinkfan2
-rw-r--r--target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts45
-rw-r--r--target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28p-f.dts13
-rw-r--r--target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28p_common.dtsi48
-rw-r--r--target/linux/realtek/image/rtl838x.mk9
6 files changed, 76 insertions, 45 deletions
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 e856ad7479..5073dbcc31 100644
--- a/target/linux/realtek/base-files/etc/board.d/02_network
+++ b/target/linux/realtek/base-files/etc/board.d/02_network
@@ -82,6 +82,10 @@ d-link,dgs-1210-28mp-f)
ucidef_set_poe 370 "lan8 lan7 lan6 lan5 lan4 lan3 lan2 lan1 lan16 lan15 lan14 lan13 lan12 lan11 lan10 lan9 lan24 lan23
lan22 lan21 lan20 lan19 lan18 lan17"
;;
+d-link,dgs-1210-28p-f)
+ ucidef_set_poe 193 "lan8 lan7 lan6 lan5 lan4 lan3 lan2 lan1 lan16 lan15 lan14 lan13 lan12 lan11 lan10 lan9 lan24 lan23
+ lan22 lan21 lan20 lan19 lan18 lan17"
+ ;;
engenius,ews2910p)
ucidef_set_poe 60 "$(filter_port_list "$lan_list" "lan9 lan10")"
;;
diff --git a/target/linux/realtek/base-files/etc/uci-defaults/04_dlinkfan b/target/linux/realtek/base-files/etc/uci-defaults/04_dlinkfan
index 1a5fd3606f..17cc649438 100644
--- a/target/linux/realtek/base-files/etc/uci-defaults/04_dlinkfan
+++ b/target/linux/realtek/base-files/etc/uci-defaults/04_dlinkfan
@@ -7,7 +7,7 @@
board=$(board_name)
case "$board" in
-d-link,dgs-1210-28mp-f)
+d-link,dgs-1210-28p-f|d-link,dgs-1210-28mp-f)
# Enable fan control
FAN_CTRL='/sys/class/hwmon/hwmon0'
echo 1 > "$FAN_PATH/pwm1_enable"
diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts
index 4c20a4ae6e..4aa6498b03 100644
--- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts
+++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts
@@ -5,53 +5,10 @@
#include "rtl83xx_d-link_dgs-1210_gpio.dtsi"
#include "rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi"
#include "rtl8382_d-link_dgs-1210-28_common.dtsi"
+#include "rtl8382_d-link_dgs-1210-28p_common.dtsi"
/ {
compatible = "d-link,dgs-1210-28mp-f", "realtek,rtl8382-soc", "realtek,rtl838x-soc";
model = "D-Link DGS-1210-28MP F";
- /* LM63 */
- i2c-gpio-4 {
- compatible = "i2c-gpio";
- sda-gpios = <&gpio1 32 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
- scl-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
- i2c-gpio,delay-us = <2>;
- i2c-gpio,scl-open-drain; /* should be replaced by i2c-gpio,scl-has-no-pullup in kernel 6.6 */
- #address-cells = <1>;
- #size-cells = <0>;
-
- lm63@4c {
- compatible = "national,lm63";
- reg = <0x4c>;
- };
- };
-};
-
-&leds {
- link_act {
- label = "green:link_act";
- gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
- };
-
- poe {
- label = "green:poe";
- gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
- };
-
- poe_max {
- label = "yellow:poe_max";
- gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
- };
-};
-
-&keys {
- mode {
- label = "mode";
- gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
- linux,code = <BTN_0>;
- };
-};
-
-&uart1 {
- status = "okay";
};
diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28p-f.dts b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28p-f.dts
new file mode 100644
index 0000000000..6cb8db81bc
--- /dev/null
+++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28p-f.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "rtl838x.dtsi"
+#include "rtl83xx_d-link_dgs-1210_common.dtsi"
+#include "rtl83xx_d-link_dgs-1210_gpio.dtsi"
+#include "rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi"
+#include "rtl8382_d-link_dgs-1210-28_common.dtsi"
+#include "rtl8382_d-link_dgs-1210-28p_common.dtsi"
+
+/ {
+ compatible = "d-link,dgs-1210-28p-f", "realtek,rtl8382-soc", "realtek,rtl838x-soc";
+ model = "D-Link DGS-1210-28P F";
+};
diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28p_common.dtsi b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28p_common.dtsi
new file mode 100644
index 0000000000..8aaa637afe
--- /dev/null
+++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28p_common.dtsi
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/ {
+ /* LM63 */
+ i2c-gpio-4 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&gpio1 32 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+ i2c-gpio,delay-us = <2>;
+ i2c-gpio,scl-open-drain; /* should be replaced by i2c-gpio,scl-has-no-pullup in kernel 6.6 */
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ lm63@4c {
+ compatible = "national,lm63";
+ reg = <0x4c>;
+ };
+ };
+};
+
+&leds {
+ link_act {
+ label = "green:link_act";
+ gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
+ };
+
+ poe {
+ label = "green:poe";
+ gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
+ };
+
+ poe_max {
+ label = "yellow:poe_max";
+ gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&keys {
+ mode {
+ label = "mode";
+ gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+};
+
+&uart1 {
+ status = "okay";
+};
diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk
index c44e3a74f7..c8e1c481ec 100644
--- a/target/linux/realtek/image/rtl838x.mk
+++ b/target/linux/realtek/image/rtl838x.mk
@@ -75,6 +75,15 @@ define Device/d-link_dgs-1210-28mp-f
endef
TARGET_DEVICES += d-link_dgs-1210-28mp-f
+define Device/d-link_dgs-1210-28p-f
+ $(Device/d-link_dgs-1210)
+ SOC := rtl8382
+ DEVICE_MODEL := DGS-1210-28P
+ DEVICE_VARIANT := F
+ DEVICE_PACKAGES += realtek-poe kmod-hwmon-lm63
+endef
+TARGET_DEVICES += d-link_dgs-1210-28p-f
+
# The "IMG-" uImage name allows flashing the iniramfs from the vendor Web UI.
# Avoided for sysupgrade, as the vendor FW would do an incomplete flash.
define Device/engenius_ews2910p