diff --git a/root/target/linux/ipq40xx/base-files/bin/board_track b/root/target/linux/ipq40xx/base-files/bin/board_track deleted file mode 100755 index 3f620e73..00000000 --- a/root/target/linux/ipq40xx/base-files/bin/board_track +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -. /lib/functions/uci-defaults.sh - -CFG=/etc/board.json -SLP=30 - -check_modem() { - json_select "$2" - json_get_vars id - - [ -z "$id" ] && { - json_select .. - return 0 - } - - ttys=$(ls -d /sys/bus/usb/devices/$id/${id}*/tty?*) - - [ -n "$ttys" ] || { #FAILED TO FIND MODEM - mctl -s - sleep 1 - mctl -p - json_select .. - return 1 - } - - #MODEM UP - json_select .. -} - -board_config_update -while true; do - json_for_each_item check_modem modems - sleep $SLP - [ $SLP -lt 300 ] && SLP=$((SLP+30)) -done diff --git a/root/target/linux/ipq40xx/base-files/bin/ipk-sig.sh b/root/target/linux/ipq40xx/base-files/bin/ipk-sig.sh deleted file mode 100755 index 016f5f56..00000000 --- a/root/target/linux/ipq40xx/base-files/bin/ipk-sig.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -sig="/tmp/.$(cat /proc/sys/kernel/random/uuid).sig" - -check() { - local ipk="$1" - [ -z "$ipk" ] && return 1 - - tar -xzOf "$ipk" ./control+data.sig > $sig || return 2 - - tar -xzOf "$ipk" ./control.tar.gz ./data.tar.gz | usign -V -m - -P /etc/opkg/keys -x $sig || return 3 -} - -check $1 -status=$? -rm -f $sig -return $status diff --git a/root/target/linux/ipq40xx/base-files/etc/board.d/1-board_json b/root/target/linux/ipq40xx/base-files/etc/board.d/1-board_json index 6d26ba42..619e0062 100755 --- a/root/target/linux/ipq40xx/base-files/etc/board.d/1-board_json +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/1-board_json @@ -193,9 +193,7 @@ setup_json() { } #~ Get model name for RUTX products -if ! model="$(mnf_info --name)" 2>/dev/null; then - model="$(mnf_info --prod-code)" 2>/dev/null -fi +model="$(mnf_info --name)" 2>/dev/null platform="$(cat /proc/device-tree/platform)" 2>/dev/null diff --git a/root/target/linux/ipq40xx/base-files/etc/init.d/modem_tracker b/root/target/linux/ipq40xx/base-files/etc/init.d/modem_tracker deleted file mode 100755 index 3a3d06bc..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/init.d/modem_tracker +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2021 Teltonika Networks - -START=96 - -USE_PROCD=1 - -PROG=/bin/board_track -NAME=board_track -PIDCOUNT=1 - -start_service() { - config_load system - - config_get modem_track system modem_track 1 - - [ "$modem_track" != 0 ] || return - - local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid" - - procd_open_instance - procd_set_param command "$PROG" - procd_set_param file /etc/config/system - - procd_set_param respawn - - procd_set_param stdout 1 - procd_set_param pidfile $pid_file - procd_close_instance -} - -reload_service() { - stop - start -} - -service_triggers() { - procd_add_reload_trigger "system" -} diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/02_simcard b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/02_simcard deleted file mode 100644 index 7e8dbc6a..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/02_simcard +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -. /lib/functions.sh -. /lib/functions/board.sh - - -set_pin() { - local sim="$1" - local modem position num builtin - - config_get modem "$sim" modem - builtin=$(is_builtin_modem "$modem") - [ "$builtin" = "0" ] && return - - config_get position "$sim" position - #If modem builtin and primary then position num 3 or 4 else 1 or 2 - [ "$builtin" = "2" ] && num=$((position + 2)) || num=$position - - pin=`/sbin/mnf_info --simpin $num` - [ -z "$pin" ] && return - - uci -q set "simcard"."$sim"."pincode"="$pin" -} - -config_load simcard -config_foreach set_pin sim -uci commit simcard - -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/03_side-widget b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/03_side-widget deleted file mode 100644 index 36c60051..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/03_side-widget +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh -. /lib/functions.sh - -CONFIG="widget" -MOBILE_CONFIG="/etc/config/simcard" -RMS_CONFIG="/etc/config/rms_connect_mqtt" -WIFI_CONFIG="/etc/config/wireless" -ETHERNET=$(uci -q get network.@switch[0].name) -ethernet_widget_exists=0 -mobile_widget_exists=0 -system_widget_exists=0 -wifi_widget_exists=0 -rms_widget_exists=0 -position=1 -radio0_network=1 -radio1_network=1 - -check_for_widgets() { - local widget="$1" - local type - config_get type "$widget" type - - if [ "$type" = "ethernet" ]; then - ethernet_widget_exists=1 - elif [ "$type" = "mobile" ]; then - mobile_widget_exists=1 - elif [ "$type" = "system" ]; then - system_widget_exists=1 - elif [ "$type" = "wifi" ]; then - wifi_widget_exists=1 - elif [ "$type" = "rms" ]; then - rms_widget_exists=1 - fi -} - -setup_wifi_fields() { - local iface_section="$1" - local device - config_get device "$iface_section" device - - section=$(uci -q add widget widget) - - if [ "$device" == "radio0" ]; then - uci -q set $CONFIG."${section}.id"=$device."network${radio0_network}" - let "radio0_network=radio0_network + 1" - elif [ "$device" == "radio1" ]; then - uci -q set $CONFIG."${section}.id"=$device."network${radio1_network}" - let "radio1_network=radio1_network + 1" - fi - uci -q set $CONFIG."${section}.type=wifi" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" -} - -check_if_config_exists() { - if [ ! -f "/etc/config/${CONFIG}" ]; then - touch "/etc/config/${CONFIG}" - fi -} - -setup_side_widget() { - config_load widget - config_foreach check_for_widgets widget - - if [ $ethernet_widget_exists -eq 0 -a -n "$ETHERNET" ]; then - check_if_config_exists - section=$(uci -q add widget widget) - uci -q set $CONFIG."${section}.id=widget1" - uci -q set $CONFIG."${section}.type=ethernet" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" - fi - - if [ $mobile_widget_exists -eq 0 -a -s "$MOBILE_CONFIG" -a -f "$MOBILE_CONFIG" ]; then - check_if_config_exists - modem_count=$(jsonfilter -q -i /etc/board.json -e '@["modems"][*]' | wc -l) - for i in $(seq $modem_count) - do - section=$(uci -q add widget widget) - uci -q set $CONFIG."${section}.id=mobile-widget$i" - uci -q set $CONFIG."${section}.type=mobile" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" - done - fi - - if [ $system_widget_exists -eq 0 ]; then - check_if_config_exists - section=$(uci -q add widget widget) - uci -q set $CONFIG."${section}.id=widget3" - uci -q set $CONFIG."${section}.type=system" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" - fi - - if [ $wifi_widget_exists -eq 0 -a -f "$WIFI_CONFIG" ]; then - check_if_config_exists - config_load wireless - config_foreach setup_wifi_fields wifi-iface - fi - - if [ $rms_widget_exists -eq 0 -a -f "$RMS_CONFIG" ]; then - check_if_config_exists - section=$(uci -q add widget widget) - uci -q set $CONFIG."${section}.id=widget5" - uci -q set $CONFIG."${section}.type=rms" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" - fi - - uci -q commit $CONFIG -} -setup_side_widget -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/05_add_mctl_cfg b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/05_add_mctl_cfg deleted file mode 100644 index 431c38ae..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/05_add_mctl_cfg +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -[ -n "$(uci -q get system.modem.disable)" ] || { - for m in /sys/class/gpio/modem*_power; do - local label="$(basename $m | awk -F_ '{print $1}')" - uci set "system.${label}=mctl" - uci set "system.${label}.disable=0" - - # modem is turned on in preinit but others are not - [ "${label}" != "modem" ] && /sbin/mctl -p -m "${label}" - done - - uci commit system -} - -exit 0 \ No newline at end of file diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/13_migrate-groups b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/13_migrate-groups deleted file mode 100755 index c4b6e3d1..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/13_migrate-groups +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -. /lib/functions.sh - -CONFIG="/etc/config/user_groups" - -migrate_tel_list() { - local tel="$1" - local new_section="$2" - - uci -q add_list user_groups."$new_section".tel="$tel" -} - -migrate_group() { - local group="$1" - local name - - config_get name "$group" name "" - local new_section=`uci -q add user_groups phone` - uci -q set user_groups."$new_section".name="$name" - config_list_foreach "$group" tel migrate_tel_list "$new_section" - - uci -q delete sms_utils."$group" -} - -if [ ! -e "$CONFIG" ]; then - touch "$CONFIG" -fi - -config_load sms_utils -config_foreach migrate_group group - -uci -q commit user_groups -uci -q commit sms_utils - -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/40_strongswan_to_ipsec b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/40_strongswan_to_ipsec deleted file mode 100755 index 88497cbc..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/40_strongswan_to_ipsec +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh - -[ -e /etc/config/strongswan ] || exit 0 - -. /lib/functions.sh -ENABLED=0 - -move_config() { - - local name=$1 - - #get old config - config_get_bool enabled "$1" "enabled" "0" - config_get keyexchange "$1" "keyexchange" - config_get aggressive "$1" "aggressive" - config_get ipsec_type "$1" "ipsec_type" - config_get my_identifier_type "$1" "my_identifier_type" - config_get my_identifier "$1" "my_identifier" - config_get leftfirewall "$1" "leftfirewall" - config_get forceencaps "$1" "forceencaps" - config_get dpdaction "$1" "dpdaction" "none" - config_get dpddelay "$1" "dpddelay" - config_get dpdtimeout "$1" "dpdtimeout" - config_get psk_key "$1" "psk_key" - config_get right "$1" "right" - config_get rightfirewall "$1" "rightfirewall" - config_get ike_encryption_algorithm "$1" "ike_encryption_algorithm" - config_get ike_authentication_algorithm "$1" "ike_authentication_algorithm" - config_get ike_dh_group "$1" "ike_dh_group" - config_get ikelifetime "$1" "ikelifetime" - config_get esp_encryption_algorithm "$1" "esp_encryption_algorithm" - config_get esp_hash_algorithm "$1" "esp_hash_algorithm" - config_get esp_pfs_group "$1" "esp_pfs_group" - config_get keylife "$1" "keylife" - config_get leftsubnet "$1" "leftsubnet" - config_get rightsubnet "$1" "rightsubnet" - config_get leftprotoport "$1" "leftprotoport" - config_get rightprotoport "$1" "rightprotoport" - - [ "$enabled" = 1 ] && ENABLED=1 - #set new config structure - - config_set - uci_add "ipsec" "proposal" "${name}_ph1" - uci_set "ipsec" $CONFIG_SECTION "encryption_algorithm" "$ike_encryption_algorithm" - uci_set "ipsec" $CONFIG_SECTION "hash_algorithm" "$ike_authentication_algorithm" - uci_set "ipsec" $CONFIG_SECTION "dh_group" "$ike_dh_group" - - uci_add "ipsec" "proposal" "${name}_ph2" - uci_set "ipsec" $CONFIG_SECTION "encryption_algorithm" "$esp_encryption_algorithm" - uci_set "ipsec" $CONFIG_SECTION "hash_algorithm" "$esp_hash_algorithm" - uci_set "ipsec" $CONFIG_SECTION "dh_group" "$esp_pfs_group" - - uci_add "ipsec" "connection" "${name}_c" - uci_set "ipsec" $CONFIG_SECTION "mode" "start" - uci_set "ipsec" $CONFIG_SECTION "type" "$ipsec_type" - uci_set "ipsec" $CONFIG_SECTION "local_subnet" "$leftsubnet" - uci_set "ipsec" $CONFIG_SECTION "remote_subnet" "$rightsubnet" - uci_set "ipsec" $CONFIG_SECTION "remote_firewall" "$rightfirewall" - uci_set "ipsec" $CONFIG_SECTION "keyexchange" "$keyexchange" - uci_set "ipsec" $CONFIG_SECTION "aggressive" "$aggressive" - uci_set "ipsec" $CONFIG_SECTION "ikelifetime" "$ikelifetime" - uci_set "ipsec" $CONFIG_SECTION "lifetime" "$lifetime" - [ -n "$dpdaction" ] && { - uci_set "ipsec" $CONFIG_SECTION "_dpd" "1" - uci_set "ipsec" $CONFIG_SECTION "dpdaction" "$dpdaction" - uci_set "ipsec" $CONFIG_SECTION "dpddelay" "$dpddelay" - } - uci_set "ipsec" $CONFIG_SECTION "crypto_proposal" "${name}_ph2" - uci_set "ipsec" $CONFIG_SECTION "leftprotoport" "$leftprotoport" - uci_set "ipsec" $CONFIG_SECTION "rightprotoport" "$rightprotoport" - uci_set "ipsec" $CONFIG_SECTION "lifetime" "$keylife" - uci_set "ipsec" $CONFIG_SECTION "forceencaps" "$forceencaps" - - uci_add "ipsec" "remote" "${name}" - uci_set "ipsec" $CONFIG_SECTION "enabled" "$enabled" - uci_set "ipsec" $CONFIG_SECTION "gateway" "$right" - uci_set "ipsec" $CONFIG_SECTION "remote_identifier" "%any" - uci_set "ipsec" $CONFIG_SECTION "authentication_method" "psk" - uci_set "ipsec" $CONFIG_SECTION "pre_shared_key" "$psk_key" - uci_set "ipsec" $CONFIG_SECTION "local_identifier" "$my_identifier" - uci_set "ipsec" $CONFIG_SECTION "crypto_proposal" "${name}_ph1" - - [ "$ipsec_type" = "tunnel" ] && uci -q add_list "ipsec"."${CONFIG_SECTION}"."tunnel"="${name}_c" - [ "$ipsec_type" = "transport" ] && uci -q add_list "ipsec"."${CONFIG_SECTION}"."transport"="${name}_c" - - uci_commit "ipsec" -} - -config_load 'strongswan' -config_foreach move_config 'conn' - -[ "$ENABLED" = 1 ] && { - uci_add firewall rule - uci_set firewall "$CONFIG_SECTION" src 'wan' - uci_set firewall "$CONFIG_SECTION" name 'Allow-IPsec-ESP' - uci_set firewall "$CONFIG_SECTION" target 'ACCEPT' - uci_set firewall "$CONFIG_SECTION" vpn_type 'IPsec' - uci_set firewall "$CONFIG_SECTION" proto 'esp' - - uci_add firewall rule - uci_set firewall "$CONFIG_SECTION" dest_port '4500' - uci_set firewall "$CONFIG_SECTION" src 'wan' - uci_set firewall "$CONFIG_SECTION" name 'Allow-IPsec-NAT-T' - uci_set firewall "$CONFIG_SECTION" target 'ACCEPT' - uci_set firewall "$CONFIG_SECTION" vpn_type 'IPsec' - uci_set firewall "$CONFIG_SECTION" proto 'udp' - - uci_add firewall rule - uci_set firewall "$CONFIG_SECTION" dest_port '500' - uci_set firewall "$CONFIG_SECTION" src 'wan' - uci_set firewall "$CONFIG_SECTION" name 'Allow-IPsec-IKE' - uci_set firewall "$CONFIG_SECTION" target 'ACCEPT' - uci_set firewall "$CONFIG_SECTION" vpn_type 'IPsec' - uci_set firewall "$CONFIG_SECTION" proto 'udp' - - uci_add firewall rule - uci_set firewall "$CONFIG_SECTION" src 'wan' - uci_set firewall "$CONFIG_SECTION" name 'Allow-IPsec-Forward' - uci_set firewall "$CONFIG_SECTION" extra '-m policy --dir in --pol ipsec' - uci_set firewall "$CONFIG_SECTION" target 'ACCEPT' - uci_set firewall "$CONFIG_SECTION" vpn_type 'IPsec' - uci_set firewall "$CONFIG_SECTION" dest '*' - uci_set firewall "$CONFIG_SECTION" proto 'all' - - uci_add firewall redirect - uci_set firewall "$CONFIG_SECTION" proto any - uci_set firewall "$CONFIG_SECTION" name Exclude-IPsec-from-NAT - uci_set firewall "$CONFIG_SECTION" extra '-m policy --dir out --pol ipsec' - uci_set firewall "$CONFIG_SECTION" vpn_type IPsec - uci_set firewall "$CONFIG_SECTION" target ACCEPT - uci_set firewall "$CONFIG_SECTION" dest wan - uci_set firewall "$CONFIG_SECTION" enabled 1 - - uci_commit firewall -} - -rm -f /etc/config/strongswan - -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/50_migrate_pptp_l2tp_sstp b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/50_migrate_pptp_l2tp_sstp deleted file mode 100644 index 2c470f93..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/50_migrate_pptp_l2tp_sstp +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh -#this script move configuration from 1.x firmware -#it should rename some sections and add option disabled to network config - -move_config() { - local section="$1" - local file="$2" - - config_get_bool enabled "$1" "enabled" "0" - config_get _name "$1" "_name" - config_get _type "$1" "_type" - [ -z "$_type" ] && config_get _type "$1" "type" - [ "$enabled" -eq 1 ] && [ "$_type" = "client" ] && { - uci set network."$1".auto=1 - uci_commit "${config}" - } - [ "${_type}_${_name}" = "$section" ] && return - uci_rename "$file" "$section" "${_type:+${_type}_}${_name}" - uci_commit "${config}" -} - -move_network() { - local section="$1" - local net_proto net_name net_type net_enabled - - config_get net_proto "$section" "proto" - - case "$net_proto" in - pptp|\ - l2tp) - config_get net_name "$1" "_name" - config_get_bool net_enabled "$1" "enabled" - [ "client_${net_name}" = "$section" ] && return - [ -n "$net_enabled" ] && { - [ "$net_enabled" = "1" ] && uci_set network "$section" disabled 0 || uci_set network "$section" disabled 1 - uci_remove network "$section" enabled - } - uci_rename network "$section" "${net_type:+${net_type}_}${net_name}" - uci_commit network - - ;; - sstp) - config_get_bool net_enabled "$1" "enabled" - [ -z "$net_enabled" ] && return - [ "$net_enabled" = "1" ] && uci_set network "$section" disabled 0 || uci_set network "$section" disabled 1 - uci_remove network "$section" enabled - uci_commit network - ;; - *) - return - ;; - esac -} - -# removes client configurations, because they reside in network and with vuci became unncessary -remove_network() { - local section="$1" - local current_config="$2" - local sectionType - config_get sectionType "$1" "type" - if [ "$sectionType" = "client" ]; then - uci_remove "$current_config" "$section" - uci_commit "$current_config" - fi -} - -configs="pptpd xl2tpd" - -for config in $configs; do - [ -s /etc/config/${config} ] || continue - config_load "$config" - config_foreach move_config "service" "$config" - config_foreach remove_network "service" "$config" -done - -[ -s /etc/config/network ] || exit 0 -config_load "network" -config_foreach move_network "interface" - -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/lib/preinit/75_stm32_autoflash b/root/target/linux/ipq40xx/base-files/lib/preinit/75_stm32_autoflash deleted file mode 100644 index 5d96b340..00000000 --- a/root/target/linux/ipq40xx/base-files/lib/preinit/75_stm32_autoflash +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -do_stm32_autoflash() { - # launch STM32 flash utility - [ -e "/sys/r2ec/reset" -a -f /usr/bin/autoflash ] && { - /usr/bin/autoflash - } -} - -[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_stm32_autoflash diff --git a/root/target/linux/ipq40xx/base-files/lib/preinit/82_version_migrate b/root/target/linux/ipq40xx/base-files/lib/preinit/82_version_migrate deleted file mode 100644 index 565ac215..00000000 --- a/root/target/linux/ipq40xx/base-files/lib/preinit/82_version_migrate +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006 OpenWrt.org -# Copyright (C) 2010 Vertical Communications - -do_check_version() { - version="$(uci -q get system.@system[0].device_fw_version)" - [ -z "$version" ] && { - return 0 - } - - numeric_version="${version##*_}" - client_removed="${numeric_version#*.}" - major="${client_removed%%.*}" - - [ -f /sysupgrade.tgz ] && [ -n "$major" ] && [ "$major" -lt 2 ] && { - echo "- migration work -" - cp /rom/etc/inittab /etc/inittab - } -} - -[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_check_version diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-08_10.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-08_10.dts deleted file mode 100644 index 0404ede3..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-08_10.dts +++ /dev/null @@ -1,57 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-shiftreg.dtsi" - -/ { - model = "RUTX08/10"; - - soc { - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>; - }; - - gpio_sim_select { - gpio-export,name = "sim_sel"; - gpio-export,output = <1>; - gpios = <&shift_io 3 GPIO_ACTIVE_HIGH>; - }; - - gpio_out_1 { - gpio-export,name = "gpio23"; - gpio-export,output = <0>; - gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>; - }; - - gpio_in_1 { - gpio-export,name = "gpio24"; - gpio-export,input = <0>; - gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wifi_24 { - label = "wifi_gen_2"; - gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_wifi_50 { - label = "wifi_gen_5"; - gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-09_11.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-09_11.dts deleted file mode 100644 index 707011a4..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-09_11.dts +++ /dev/null @@ -1,122 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-shiftreg.dtsi" - -/ { - model = "RUTX09/11"; - - soc { - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>; - }; - - gpio_sim_select { - gpio-export,name = "sim_sel"; - gpio-export,output = <1>; - gpios = <&shift_io 3 GPIO_ACTIVE_LOW>; - }; - - gpio_out_1 { - gpio-export,name = "gpio23"; - gpio-export,output = <0>; - gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>; - }; - - gpio_in_1 { - gpio-export,name = "gpio24"; - gpio-export,input = <0>; - gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wan_sim1 { - label = "wan_sim_1"; - gpios = <&shift_io 21 GPIO_ACTIVE_HIGH>; - }; - - led_wan_sim2 { - label = "wan_sim_2"; - gpios = <&shift_io 22 GPIO_ACTIVE_HIGH>; - }; - - led_wan_eth { - label = "wan_wifi_4"; // not wan_eth_3 ! - gpios = <&shift_io 13 GPIO_ACTIVE_HIGH>; - }; - - led_wan_wifi { - label = "wan_eth_3"; // not wan_wifi_4 ! - gpios = <&shift_io 20 GPIO_ACTIVE_HIGH>; - }; - - led_gen_2 { - label = "mob_gen_2"; - gpios = <&shift_io 7 GPIO_ACTIVE_HIGH>; - }; - - led_gen_3 { - label = "mob_gen_3"; - gpios = <&shift_io 8 GPIO_ACTIVE_HIGH>; - }; - - led_gen_4 { - label = "mob_gen_4"; - gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>; - }; - - led_ssid_1 { - label = "mob_ssid_1"; - gpios = <&shift_io 10 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_2 { - label = "mob_ssid_2"; - gpios = <&shift_io 11 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_3 { - label = "mob_ssid_3"; - gpios = <&shift_io 12 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_4 { - label = "mob_ssid_4"; - gpios = <&shift_io 14 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_5 { - label = "mob_ssid_5"; - gpios = <&shift_io 15 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_wifi_24 { - label = "wifi_gen_2"; - gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_wifi_50 { - label = "wifi_gen_5"; - gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-12.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-12.dts deleted file mode 100644 index d39f64e9..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-12.dts +++ /dev/null @@ -1,149 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-shiftreg.dtsi" - -/ { - model = "RUTX12"; - - soc { - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 16 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&shift_io 17 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem2_reset { - gpio-export,name = "modem2_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 18 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem2_power { - gpio-export,name = "modem2_power"; - gpio-export,output = <0>; - gpios = <&shift_io 19 GPIO_ACTIVE_HIGH>; - }; - - gpio_out_1 { - gpio-export,name = "gpio23"; - gpio-export,output = <0>; - gpios = <&shift_io 20 GPIO_ACTIVE_HIGH>; - }; - - gpio_in_1 { - gpio-export,name = "gpio24"; - gpio-export,input = <0>; - gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wan_sim1 { - label = "wan_sim_1"; - gpios = <&shift_io 14 GPIO_ACTIVE_HIGH>; - }; - - led_wan_sim2 { - label = "wan_sim_2"; - gpios = <&shift_io 15 GPIO_ACTIVE_HIGH>; - }; - - led_wan_eth { - label = "wan_wifi_4"; // not wan_eth_3 ! - gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>; - }; - - led_wan_wifi { - label = "wan_eth_3"; // not wan_wifi_4 ! - gpios = <&shift_io 7 GPIO_ACTIVE_HIGH>; - }; - - led_gen_2 { - label = "mob_gen_2"; - gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_gen_3 { - label = "mob_gen_3"; - gpios = <&shift_io 4 GPIO_ACTIVE_HIGH>; - }; - - led_gen_4 { - label = "mob_gen_4"; - gpios = <&shift_io 3 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_2 { - label = "mob2_gen_2"; - gpios = <&shift_io 11 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_3 { - label = "mob2_gen_3"; - gpios = <&shift_io 12 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_4 { - label = "mob2_gen_4"; - gpios = <&shift_io 13 GPIO_ACTIVE_HIGH>; - }; - - led_ssid_1 { - label = "mob_ssid_1"; - gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_3 { - label = "mob_ssid_3"; - gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_5 { - label = "mob_ssid_5"; - gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_1 { - label = "mob2_ssid_1"; - gpios = <&shift_io 8 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_3 { - label = "mob2_ssid_3"; - gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_5 { - label = "mob2_ssid_5"; - gpios = <&shift_io 10 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_wifi_24 { - label = "wifi_gen_2"; - gpios = <&shift_io 22 GPIO_ACTIVE_HIGH>; - }; - - led_wifi_50 { - label = "wifi_gen_5"; - gpios = <&shift_io 23 GPIO_ACTIVE_HIGH>; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-R1.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-R1.dts deleted file mode 100644 index 5f30195b..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-R1.dts +++ /dev/null @@ -1,84 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-shiftreg.dtsi" -#include "qcom-ipq4018-rutx-i2c.dtsi" // SFP - -/ { - model = "RUTXR1"; - - soc { - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>; - }; - - gpio_sim_select { - gpio-export,name = "sim_sel"; - gpio-export,output = <1>; - gpios = <&shift_io 3 GPIO_ACTIVE_LOW>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wan_sim1 { - label = "wan_sim_1"; - gpios = <&shift_io 4 GPIO_ACTIVE_HIGH>; - }; - - led_wan_sim2 { - label = "wan_sim_2"; - gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_wan_eth { - label = "wan_wifi_4"; // not wan_eth_3 ! - gpios = <&shift_io 11 GPIO_ACTIVE_HIGH>; - }; - - led_wan_mob { - label = "wan_mob_5"; - gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>; - }; - - led_gen_3 { - label = "mob_gen_3"; - gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>; - }; - - led_gen_4 { - label = "mob_gen_4"; - gpios = <&shift_io 7 GPIO_ACTIVE_HIGH>; - }; - - led_ssid_1 { - label = "mob_ssid_1"; - gpios = <&shift_io 8 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_3 { - label = "mob_ssid_3"; - gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_5 { - label = "mob_ssid_5"; - gpios = <&shift_io 10 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-STM32.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-STM32.dts deleted file mode 100644 index c6e53f02..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-STM32.dts +++ /dev/null @@ -1,188 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-i2c.dtsi" - -/ { - model = "RUTX STM32"; - io_expander = "stm32"; - - soc { - i2c_0: i2c@78b7000 { - stm32_io: stm32@74 { - #gpio-cells = <2>; - compatible = "tlt,stm32v1"; - reg = <0x74>; - gpio-controller; - interrupt-parent = <&tlmm>; - interrupts = <5 2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&stm32_io 21 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&stm32_io 20 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem2_reset { - gpio-export,name = "modem2_reset"; - gpio-export,output = <0>; - gpios = <&stm32_io 13 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem2_power { - gpio-export,name = "modem2_power"; - gpio-export,output = <0>; - gpios = <&stm32_io 14 GPIO_ACTIVE_HIGH>; - }; - - gpio_sim_select { - gpio-export,name = "sim_sel"; - gpio-export,output = <1>; - gpios = <&stm32_io 22 GPIO_ACTIVE_LOW>; - }; - - gpio_out_1 { - gpio-export,name = "gpio23"; - gpio-export,output = <0>; - gpio-export,direction_may_change; - gpios = <&stm32_io 23 GPIO_ACTIVE_HIGH>; - }; - - gpio_in_1 { - gpio-export,name = "gpio24"; - gpio-export,input = <0>; - gpio-export,direction_may_change; - gpios = <&stm32_io 24 GPIO_ACTIVE_LOW>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wan_sim1 { - label = "wan_sim_1"; - gpios = <&stm32_io 0 GPIO_ACTIVE_HIGH>; - }; - - led_wan_sim2 { - label = "wan_sim_2"; - gpios = <&stm32_io 1 GPIO_ACTIVE_HIGH>; - }; - - led_wan_eth { - label = "wan_eth_3"; - gpios = <&stm32_io 2 GPIO_ACTIVE_HIGH>; - }; - - led_wan_wifi { - label = "wan_wifi_4"; - gpios = <&stm32_io 3 GPIO_ACTIVE_HIGH>; - }; - - led_wan_mob { - label = "wan_mob_5"; - gpios = <&stm32_io 16 GPIO_ACTIVE_HIGH>; - }; - - led_gen_2 { - label = "mob_gen_2"; - gpios = <&stm32_io 4 GPIO_ACTIVE_HIGH>; - }; - - led_gen_3 { - label = "mob_gen_3"; - gpios = <&stm32_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_gen_4 { - label = "mob_gen_4"; - gpios = <&stm32_io 6 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_2 { - label = "mob2_gen_2"; - gpios = <&stm32_io 32 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_3 { - label = "mob2_gen_3"; - gpios = <&stm32_io 33 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_4 { - label = "mob2_gen_4"; - gpios = <&stm32_io 34 GPIO_ACTIVE_HIGH>; - }; - - led_ssid_1 { - label = "mob_ssid_1"; - gpios = <&stm32_io 7 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_2 { - label = "mob_ssid_2"; - gpios = <&stm32_io 8 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_3 { - label = "mob_ssid_3"; - gpios = <&stm32_io 9 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_4 { - label = "mob_ssid_4"; - gpios = <&stm32_io 10 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_5 { - label = "mob_ssid_5"; - gpios = <&stm32_io 11 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_1 { - label = "mob2_ssid_1"; - gpios = <&stm32_io 31 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_3 { - label = "mob2_ssid_3"; - gpios = <&stm32_io 30 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_5 { - label = "mob2_ssid_5"; - gpios = <&stm32_io 29 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_wifi_24 { - label = "wifi_gen_2"; - gpios = <&stm32_io 19 GPIO_ACTIVE_HIGH>; - }; - - led_wifi_50 { - label = "wifi_gen_5"; - gpios = <&stm32_io 18 GPIO_ACTIVE_HIGH>; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-common.dtsi b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-common.dtsi deleted file mode 100644 index 974ebfaf..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-common.dtsi +++ /dev/null @@ -1,84 +0,0 @@ -#include "qcom-ipq4019-ap.dk01.1.dtsi" -#include -//#include "platform_name.dtsi" - -/ { - compatible = "teltonika,rutx", "qcom,ap-dk01.1-c2", "qcom,ipq4019"; - - memory { - device_type = "memory"; - reg = <0x80000000 0x10000000>; - }; - - soc { - mdio@90000 { - status = "ok"; - pinctrl-0 = <&mdio_pins>; - pinctrl-names = "default"; - phy-reset-gpio = <&tlmm 62 0>; - - ethphy4: ethernet-phy@4 { - qcom,fiber-enable; - }; - }; - - pinctrl@1000000 { - mdio_pins: mdio_pinmux { - mux_1 { - pins = "gpio53"; - function = "mdio"; - bias-pull-up; - }; - mux_2 { - pins = "gpio52"; - function = "mdc"; - bias-pull-up; - }; - }; - }; - - spi_0: spi@78b5000 { - cs-gpios = <&tlmm 54 0>, <&tlmm 63 0>; - num-cs = <2>; - - mx25l25635f@0 { - compatible = "n25q128a11", "mx25l25635f", "jedec,spi-nor"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0>; - spi-max-frequency = <24000000>; - }; - - mt29f@1 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "spi-nand","spinand,mt29f"; - reg = <1>; - spi-max-frequency = <24000000>; - }; - }; - - gpio_keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&tlmm 4 1>; - linux,code = <0x198>; - }; - }; - - usb3: usb3@8af8800 { - dwc3@8a00000 { - snps,dis_u2_susphy_quirk; - snps,dis_u3_susphy_quirk; - }; - }; - - usb2: usb2@60f8800 { - dwc3@6000000 { - snps,dis_u2_susphy_quirk; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-i2c.dtsi b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-i2c.dtsi deleted file mode 100644 index eab95a62..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-i2c.dtsi +++ /dev/null @@ -1,20 +0,0 @@ -/ { - soc { - pinctrl@1000000 { - i2c_0_pins: i2c_0_pinmux { - mux { - pins = "gpio58", "gpio59"; - function = "blsp_i2c0"; - bias-disable; - }; - }; - }; - - i2c_0: i2c@78b7000 { /* BLSP1 QUP2 */ - pinctrl-0 = <&i2c_0_pins>; - pinctrl-names = "default"; - clock-frequency = <400000>; - status = "ok"; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-shiftreg.dtsi b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-shiftreg.dtsi deleted file mode 100644 index 38810ce7..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-shiftreg.dtsi +++ /dev/null @@ -1,25 +0,0 @@ -/ { - io_expander = "shiftreg_1"; - - soc { - ext_io { - compatible = "spi-gpio"; - #address-cells = <1>; - #size-cells = <0>; - - gpio-sck = <&tlmm 1 GPIO_ACTIVE_HIGH>; // SRCLK - gpio-mosi = <&tlmm 3 GPIO_ACTIVE_HIGH>; // SER - cs-gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; // RCLK - num-chipselects = <1>; - - shift_io: shift_io@0 { - compatible = "fairchild,74hc595"; - reg = <0>; - gpio-controller; - #gpio-cells = <2>; - registers-number = <3>; - spi-max-frequency = <10000000>; - }; - }; - }; -};