[openwrt/openwrt] bmips: add support for Actiontec T1200H

LEDE Commits lede-commits at lists.infradead.org
Wed Apr 2 10:09:51 PDT 2025


noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/65b8a978deac05894d1fd20dfe63494f4b43848d

commit 65b8a978deac05894d1fd20dfe63494f4b43848d
Author: Kyle Hendry <kylehendrydev at gmail.com>
AuthorDate: Sat Jan 11 11:33:22 2025 -0800

    bmips: add support for Actiontec T1200H
    
    Specifications:
    - SoC: Broadcom BCM63168 dual 400MHz MIPS
    - Flash: 128MB NAND ESMT F59L1G81A
    - RAM: 128MB DDR3
    - Ethernet: 5x 1000M
    - Wifi: BCM435F
    - 1x USB 2.0 port
    - 2x Button
    - 11x LED
    - Coax HPNA (unsupported)
    - RJ11 xDSL (unsupported)
    
    Install instructions:
    The booloader will only install signed firmware so the image has to
    be manually flashed.
    
    - Set up a TFTP server on 192.168.1.0/24 to serve the initramfs image
    - Interrupt the bootloader and run from RAM with
      r 192.168.1.100:openwrt-bmips-bcm63268-actiontec_t1200h-initramfs.elf
    - On the openwrt console, copy the wfi image using wget/tftp/scp, i.e
      scp user at 192.168.1.100:~/openwrt/bin/targets/bmips/bcm63268/openwrt-bmips-bcm63268-actiontec_t1200h-squashfs-cfe.bin /tmp/
    - Erase half the flash partition where openwrt will be installed with
      flash_erase -j /dev/mtd1 0 491
    - Flash the openwrt image with
      nandwrite -p /dev/mtd1 /tmp/openwrt-bmips-bcm63268-actiontec_t1200h-squashfs-cfe.bin
    - Reboot
    - Interrupt the bootloader again and use the c command to boot from
      previous firmware if vendor image is loaded
    
    Signed-off-by: Kyle Hendry <kylehendrydev at gmail.com>
    [Minor improvements to DTS file]
    Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
 .../bcm63268/base-files/etc/board.d/02_network     |  13 +-
 .../bcm63268/base-files/lib/upgrade/platform.sh    |   1 +
 .../linux/bmips/dts/bcm63168-actiontec-t1200h.dts  | 253 +++++++++++++++++++++
 target/linux/bmips/image/bcm63268.mk               |  19 ++
 4 files changed, 280 insertions(+), 6 deletions(-)

diff --git a/target/linux/bmips/bcm63268/base-files/etc/board.d/02_network b/target/linux/bmips/bcm63268/base-files/etc/board.d/02_network
index 328fb13df4..70e5db0522 100644
--- a/target/linux/bmips/bcm63268/base-files/etc/board.d/02_network
+++ b/target/linux/bmips/bcm63268/base-files/etc/board.d/02_network
@@ -5,6 +5,13 @@
 board_config_update
 
 case "$(board_name)" in
+actiontec,t1200h |\
+comtrend,vg-8050 |\
+sagem,fast-3864-op |\
+sercomm,shg2500)
+	ucidef_set_bridge_device switch
+	ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
+	;;
 comtrend,vr-3032u |\
 smartrg,sr505n)
 	ucidef_set_bridge_device switch
@@ -17,12 +24,6 @@ sercomm,h500-s-vfes)
 	ucidef_set_interface "qtn" device "wifi" protocol "static" ipaddr "1.1.1.1" netmask "255.255.255.252"
 	uci add_list firewall. at zone[0].network='qtn'
 	;;
-comtrend,vg-8050 |\
-sagem,fast-3864-op |\
-sercomm,shg2500)
-	ucidef_set_bridge_device switch
-	ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
-	;;
 esac
 
 board_config_flush
diff --git a/target/linux/bmips/bcm63268/base-files/lib/upgrade/platform.sh b/target/linux/bmips/bcm63268/base-files/lib/upgrade/platform.sh
index 00b23f742f..b41b5e9140 100644
--- a/target/linux/bmips/bcm63268/base-files/lib/upgrade/platform.sh
+++ b/target/linux/bmips/bcm63268/base-files/lib/upgrade/platform.sh
@@ -9,6 +9,7 @@ platform_check_image() {
 
 platform_do_upgrade() {
 	case "$(board_name)" in
+	actiontec,t1200h |\
 	comtrend,vg-8050 |\
 	comtrend,vr-3032u |\
 	sagem,fast-3864-op)
diff --git a/target/linux/bmips/dts/bcm63168-actiontec-t1200h.dts b/target/linux/bmips/dts/bcm63168-actiontec-t1200h.dts
new file mode 100644
index 0000000000..86fce53a79
--- /dev/null
+++ b/target/linux/bmips/dts/bcm63168-actiontec-t1200h.dts
@@ -0,0 +1,253 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "bcm63268.dtsi"
+
+/ {
+	model = "Actiontec T1200H";
+	compatible = "actiontec,t1200h", "brcm,bcm63168", "brcm,bcm63268";
+
+	aliases {
+		led-boot = &led_power_green;
+		led-failsafe = &led_power_red;
+		led-running = &led_power_green;
+		led-upgrade = &led_power_green;
+	};
+
+	keys {
+		compatible = "gpio-keys-polled";
+		poll-interval = <100>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+			debounce-interval = <60>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-0 {
+			label = "red:internet";
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+		};
+
+		led-1 {
+			label = "green:internet";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		led-9 {
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
+		};
+
+		led_power_green: led-20 {
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
+		};
+
+		led-22 {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+		};
+
+		led_power_red: led-35 {
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
+			panic-indicator;
+		};
+
+		led-39 {
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+		};
+
+		led-43 {
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+		};
+
+		led-44 {
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+		};
+
+		led-46 {
+			label = "green:dsl";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+		};
+
+		led-49 {
+			label = "red:dsl";
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&gpio 49 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&ehci {
+	status = "okay";
+};
+
+&ethernet {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_cferom_6a0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&mdio_ext {
+	switch at 1e {
+		compatible = "brcm,bcm53125";
+		reg = <0x1e>;
+
+		dsa,member = <1 0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+				label = "lan4";
+			};
+
+			port at 1 {
+				reg = <1>;
+				label = "lan3";
+			};
+
+			port at 2 {
+				reg = <2>;
+				label = "lan2";
+			};
+
+			port at 3 {
+				reg = <3>;
+				label = "lan1";
+			};
+
+			port at 8 {
+				reg = <0x8>;
+
+				phy-mode = "rgmii";
+				ethernet = <&switch0port6>;
+
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+				};
+			};
+		};
+	};
+};
+
+&nflash {
+	status = "okay";
+
+	nandcs at 0 {
+		compatible = "brcm,nandcs";
+		reg = <0>;
+		nand-ecc-step-size = <512>;
+		nand-ecc-strength = <15>;
+		nand-on-flash-bbt;
+		brcm,nand-oob-sector-size = <64>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "cferom";
+				reg = <0x0 0x20000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_cferom_6a0: macaddr at 6a0 {
+						reg = <0x6a0 0x6>;
+					};
+				};
+			};
+
+			partition at 20000 {
+				compatible = "brcm,wfi-split";
+				label = "wfi";
+				reg = <0x20000 0x7ac0000>;
+			};
+
+			partition at 7b00000 {
+				label = "data";
+				reg = <0x7b00000 0x400000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&ohci {
+	status = "okay";
+};
+
+&pcie {
+	status = "okay";
+};
+
+&switch0 {
+	dsa,member = <0 0>;
+
+	ports {
+		port at 3 {
+			reg = <3>;
+			label = "wan";
+
+			phy-handle = <&phy4>;
+		};
+
+		switch0port6: port at 6 {
+			reg = <6>;
+			label = "extsw";
+
+			phy-mode = "rgmii";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&usbh {
+	status = "okay";
+};
diff --git a/target/linux/bmips/image/bcm63268.mk b/target/linux/bmips/image/bcm63268.mk
index ed45bead7f..3f98acc56f 100644
--- a/target/linux/bmips/image/bcm63268.mk
+++ b/target/linux/bmips/image/bcm63268.mk
@@ -1,5 +1,24 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 
+define Device/actiontec_t1200h
+  $(Device/bcm63xx-nand)
+  DEVICE_VENDOR := Actiontec
+  DEVICE_MODEL := T1200H
+  CHIP_ID := 63268
+  SOC := bcm63168
+  CFE_RAM_FILE := actiontec,t1200h/cferam.000
+  CFE_RAM_JFFS2_NAME := cferam.000
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  SUBPAGESIZE := 512
+  VID_HDR_OFFSET := 2048
+  DEVICE_PACKAGES += $(USB2_PACKAGES) \
+    kmod-leds-gpio
+  CFE_WFI_FLASH_TYPE := 3
+  CFE_WFI_VERSION := 0x5732
+endef
+TARGET_DEVICES += actiontec_t1200h
+
 define Device/comtrend_vg-8050
   $(Device/bcm63xx-nand)
   DEVICE_VENDOR := Comtrend




More information about the lede-commits mailing list