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 1768d90ee0..dd2456d9dc 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -48,6 +48,7 @@ hpe,1920-48g-poe) lan_mac_end=$(macaddr_add $lan_mac $((mac_count2-mac_count1))) ;; plasmacloud,psx8|\ +plasmacloud,psx10|\ tplink,sg2008p-v1|\ tplink,sg2210p-v3|\ tplink,sg2452p-v4|\ diff --git a/target/linux/realtek/base-files/lib/upgrade/platform.sh b/target/linux/realtek/base-files/lib/upgrade/platform.sh index 4d6da9a7b1..b4236cdf42 100644 --- a/target/linux/realtek/base-files/lib/upgrade/platform.sh +++ b/target/linux/realtek/base-files/lib/upgrade/platform.sh @@ -27,7 +27,8 @@ platform_do_upgrade() { local board=$(board_name) case "$board" in - plasmacloud,psx8) + plasmacloud,psx8|\ + plasmacloud,psx10) PART_NAME="inactive" platform_do_upgrade_dualboot_plasmacloud "$1" ;; diff --git a/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh index 91ffaa03ab..4b390869e5 100644 --- a/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh +++ b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh @@ -4,7 +4,8 @@ set_boot_part() { local board=$(board_name) case "$board" in - plasmacloud,psx8) + plasmacloud,psx8|\ + plasmacloud,psx10) if [ "$part_num" = "1" ]; then echo "bootargs mtdparts=spi0.0:896k(u-boot),64k(u-boot-env),64k(u-boot-env2),15872k(firmware1),15872k(inactive)" > $setenv_script echo "bootcmd rtk init; bootm 0xb4100000" >> $setenv_script @@ -56,7 +57,8 @@ platform_do_upgrade_dualboot_plasmacloud() { # identify "inactive" slot id based on the expected partition id # of the primary ("firmware1") slot case "$(board_name)" in - plasmacloud,psx8) + plasmacloud,psx8|\ + plasmacloud,psx10) primary_firmware_mtd=3 ;; *) diff --git a/target/linux/realtek/dts/rtl9302_plasmacloud_psx10.dts b/target/linux/realtek/dts/rtl9302_plasmacloud_psx10.dts new file mode 100644 index 0000000000..b451bc24e3 --- /dev/null +++ b/target/linux/realtek/dts/rtl9302_plasmacloud_psx10.dts @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/dts-v1/; + +#include "rtl9302_plasmacloud_common.dtsi" + +/ { + compatible = "plasmacloud,psx10", "realtek,rtl838x-soc"; + model = "Plasma Cloud PSX10"; + + i2c1: i2c-gpio1 { + compatible = "i2c-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + sda-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + scl-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; + + i2c-gpio,delay-us = <5>; /* ~100 kHz */ + }; + + sfp0: sfp-lan9 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 12 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio0 22 GPIO_ACTIVE_HIGH>; + }; + + sfp1: sfp-lan10 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + los-gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 20 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>; + }; +}; + +&mdio { + INTERNAL_PHY_SDS(26, 8) + INTERNAL_PHY_SDS(27, 9) +}; + +&switch0 { + ports { + port@26 { + reg = <26>; + label = "lan9"; + phy-mode = "1000base-x"; + phy-handle = <&phy26>; + sfp = <&sfp0>; + led-set = <0>; + managed = "in-band-status"; + + nvmem-cells = <&macaddr_ubootenv_ethaddr 9>; + nvmem-cell-names = "mac-address"; + }; + + port@27 { + reg = <27>; + label = "lan10"; + phy-mode = "1000base-x"; + phy-handle = <&phy27>; + sfp = <&sfp1>; + led-set = <0>; + managed = "in-band-status"; + + nvmem-cells = <&macaddr_ubootenv_ethaddr 10>; + nvmem-cell-names = "mac-address"; + }; + }; +}; diff --git a/target/linux/realtek/image/rtl930x.mk b/target/linux/realtek/image/rtl930x.mk index eb90b4678f..8f53855b5b 100644 --- a/target/linux/realtek/image/rtl930x.mk +++ b/target/linux/realtek/image/rtl930x.mk @@ -34,6 +34,12 @@ define Device/plasmacloud_psx8 endef TARGET_DEVICES += plasmacloud_psx8 +define Device/plasmacloud_psx10 + $(Device/plasmacloud-common) + DEVICE_MODEL := PSX10 +endef +TARGET_DEVICES += plasmacloud_psx10 + define Device/tplink_tl-st1008f_v2 SOC := rtl9303 UIMAGE_MAGIC := 0x93030000