diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds index eee259b872..78d84d562d 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -60,7 +60,8 @@ mikrotik,lhgg-60ad) ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" ;; meraki,gx20|\ -meraki,z3) +meraki,z3|\ +meraki,z3c) ucidef_set_led_netdev "wan_link" "WAN (link)" "green:wan-0" "wan" "link" ucidef_set_led_netdev "wan_act" "WAN (txrx)" "green:wan-1" "wan" "tx rx" ucidef_set_led_netdev "lan1_link" "LAN2 (link)" "green:lan-2" "lan2" "link" diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 77749e3f0c..183f039e8b 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -108,7 +108,8 @@ ipq40xx_setup_interfaces() ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" ;; meraki,gx20|\ - meraki,z3) + meraki,z3|\ + meraki,z3c) ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan" ;; meraki,mr30h) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches index 003fd685b9..37884f5bb2 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches @@ -22,7 +22,8 @@ compex,wpj428) ucidef_add_gpio_switch "sim_card_select" "SIM card select" "3" "0" ;; meraki,gx20|\ -meraki,z3) +meraki,z3|\ +meraki,z3c) ucidef_add_gpio_switch "lan5_poe_disable" "LAN5 PoE disable" "540" "0" ;; mikrotik,cap-ac) diff --git a/target/linux/ipq40xx/base-files/etc/init.d/modem_switch b/target/linux/ipq40xx/base-files/etc/init.d/modem_switch index 9aeeec8dad..e66a0a1007 100755 --- a/target/linux/ipq40xx/base-files/etc/init.d/modem_switch +++ b/target/linux/ipq40xx/base-files/etc/init.d/modem_switch @@ -19,6 +19,15 @@ boot() { sleep 1 echo "1" > /sys/class/gpio/lte_pwrkey/value ;; + meraki,z3c) + echo "0" > /sys/class/gpio/lte_estop/value + sleep 1 + echo "1" > /sys/class/gpio/lte_en/value + sleep 1 + echo "1" > /sys/class/gpio/lte_rst/value + sleep 1 + echo "0" > /sys/class/gpio/lte_rst/value + ;; esac } @@ -30,5 +39,9 @@ shutdown() { echo "1" > /sys/class/gpio/lte_pwrkey/value sleep 10 ;; + meraki,z3c) + echo "1" > /sys/class/gpio/lte_estop/value + echo "0" > /sys/class/gpio/lte_en/value + ;; esac } diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 4b50575d69..25b4e00939 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -191,7 +191,8 @@ platform_do_upgrade() { meraki,mr20|\ meraki,mr70|\ meraki,gx20|\ - meraki,z3) + meraki,z3|\ + meraki,z3c) # DO NOT set CI_KERNPART to part.safe, # that is used for chain-loading an unlocked u-boot # if part.safe is overwritten, then u-boot is lost! diff --git a/target/linux/ipq40xx/dts/qcom-ipq4029-z3c.dts b/target/linux/ipq40xx/dts/qcom-ipq4029-z3c.dts new file mode 100644 index 0000000000..90c21715a7 --- /dev/null +++ b/target/linux/ipq40xx/dts/qcom-ipq4029-z3c.dts @@ -0,0 +1,209 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Device Tree Source for Meraki Z3C (Heart of Gold) + +#include "qcom-ipq4029-meraki-insect.dtsi" + +/ { + model = "Meraki Z3C LTE Router"; + compatible = "meraki,z3c"; + + soc { + ess_tcsr@1953000 { + qcom,ess-interface-select = ; + }; + + tcsr@194b000 { + /* select hostmode */ + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + status = "okay"; + }; + }; + + leds { + compatible = "gpio-leds"; + + power_orange: power { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&tlmm 49 GPIO_ACTIVE_LOW>; + panic-indicator; + }; + + led-1 { + /* WAN left */ + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <0>; + gpios = <&tlmm 46 GPIO_ACTIVE_LOW>; + }; + + led-2 { + /* WAN right */ + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <1>; + gpios = <&tlmm 30 GPIO_ACTIVE_LOW>; + }; + + led-3 { + /* port 2 left */ + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; + gpios = <&tlmm 23 GPIO_ACTIVE_LOW>; + }; + + led-4 { + /* port 2 right */ + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; + gpios = <&tlmm 22 GPIO_ACTIVE_LOW>; + }; + + led-5 { + /* port 3 left */ + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; + gpios = <&tlmm 25 GPIO_ACTIVE_LOW>; + }; + + led-6 { + /* port 3 right */ + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <5>; + gpios = <&tlmm 24 GPIO_ACTIVE_LOW>; + }; + + led-7 { + /* port 4 left */ + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <6>; + gpios = <&tlmm 29 GPIO_ACTIVE_LOW>; + }; + + led-8 { + /* port 4 right */ + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <7>; + gpios = <&tlmm 26 GPIO_ACTIVE_LOW>; + }; + + led-9 { + /* port 5 left */ + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <8>; + gpios = <&tlmm 33 GPIO_ACTIVE_LOW>; + }; + + led-10 { + /* port 5 right */ + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <9>; + gpios = <&tlmm 32 GPIO_ACTIVE_LOW>; + }; + }; + + gpio_export { + compatible = "gpio-export"; + + lte_en { + gpio-export,name = "lte_en"; + gpio-export,output = <1>; + gpios = <&tlmm 39 GPIO_ACTIVE_LOW>; + }; + + lte_rst { + gpio-export,name = "lte_rst"; + gpio-export,output = <0>; + gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>; + }; + + ble_rst { + gpio-export,name = "ble_rst"; + gpio-export,output = <0>; + gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>; + }; + + pse_det { + gpio-export,name = "pse_det"; + gpio-export,input = <0>; + gpios = <&tlmm 43 GPIO_ACTIVE_LOW>; + }; + + ble_load { + gpio-export,name = "ble_load"; + gpio-export,output = <1>; + gpios = <&tlmm 52 GPIO_ACTIVE_LOW>; + }; + + lte_estop { + gpio-export,name = "lte_estop"; + gpio-export,output = <0>; + gpios = <&tlmm 61 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&usb2_hs_phy { + status = "okay"; +}; + +&usb2 { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&usb3 { + status = "okay"; +}; + +&swport1 { + label = "wan"; + status = "okay"; +}; + +&swport2 { + label = "lan2"; + status = "okay"; +}; + +&swport3 { + label = "lan3"; + status = "okay"; +}; + +&swport4 { + label = "lan4"; + status = "okay"; +}; + +&swport5 { + label = "lan5"; + status = "okay"; +}; + +&wifi0 { + status = "okay"; + qcom,ath10k-calibration-variant = "Meraki-Z3"; +}; + +&wifi1 { + status = "okay"; + qcom,ath10k-calibration-variant = "Meraki-Z3"; +}; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index c93c377954..6a8d06e1a3 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -885,6 +885,14 @@ define Device/meraki_gx20 endef TARGET_DEVICES += meraki_gx20 +define Device/meraki_z3c + $(call Device/meraki_common) + DEVICE_MODEL := Z3C + DEVICE_DTS_CONFIG := config@3 + DEVICE_PACKAGES := kmod-usb-acm kmod-usb-net kmod-usb-net-cdc-ether -ath10k-firmware-qca9887-ct +endef +TARGET_DEVICES += meraki_z3c + define Device/mobipromo_cm520-79f $(call Device/FitzImage) $(call Device/UbiFit)