Skip to content
Snippets Groups Projects
Commit 2d38983c authored by Markus Gothe's avatar Markus Gothe :ok_hand: Committed by Sukru Senli
Browse files

brcm63xx: correct LED handling of panther and tiger

parent 0099bfe8
Branches
Tags
No related merge requests found
...@@ -59,32 +59,81 @@ config gpio_led gpio_leds ...@@ -59,32 +59,81 @@ config gpio_led gpio_leds
list leds pon_green list leds pon_green
list leds power_on_green list leds power_on_green
list leds alarm_red list leds alarm_red
list leds lan1_green
list leds lan1_yellow
list leds lan2_green
list leds lan2_yellow
list leds lan3_green
list leds lan3_yellow
list leds lan4_green
list leds lan4_yellow
config gpio_led catv_green config gpio_led catv_green
option addr 6 option active high
option active high option sysfs_attr 29s
option mode sr option mode led_linux
config gpio_led pon_green config gpio_led pon_green
option addr 5 option active high
option active high option sysfs_attr 28s
option mode sr option mode led_linux
config gpio_led power_on_green config gpio_led power_on_green
option addr 1 option active high
option active high option sysfs_attr 27s
option mode sr option mode led_linux
config gpio_led alarm_red config gpio_led alarm_red
option addr 0 option active high
option active high option sysfs_attr 26s
option mode sr option mode led_linux
config gpio_led lan1_yellow
option active high
option sysfs_attr 24s
option mode led_linux
config gpio_led lan1_green
option active high
option sysfs_attr 25s
option mode led_linux
config gpio_led lan2_yellow
option active high
option sysfs_attr 22s
option mode led_linux
config gpio_led lan2_green
option active high
option sysfs_attr 23s
option mode led_linux
config gpio_led lan3_yellow
option active high
option sysfs_attr 20s
option mode led_linux
config gpio_led lan3_green
option active high
option sysfs_attr 21s
option mode led_linux
config gpio_led lan4_yellow
option active high
option sysfs_attr 18s
option mode led_linux
config gpio_led lan4_green
option active high
option sysfs_attr 19s
option mode led_linux
############### mapping led function to driver led ############### mapping led function to driver led
config led_map led_map config led_map led_map
list functions status list functions status
list functions internet list functions internet
list functions wan_speed list functions wan_speed
list functions lan
config led_map led_status config led_map led_status
...@@ -112,3 +161,21 @@ config led_map led_catv ...@@ -112,3 +161,21 @@ config led_map led_catv
list led_action_notice catv_green=FLASH_SLOW list led_action_notice catv_green=FLASH_SLOW
list led_action_alert catv_green=FLASH_SLOW list led_action_alert catv_green=FLASH_SLOW
list led_action_error catv_green=FLASH_FAST list led_action_error catv_green=FLASH_FAST
config led_map led_lan
list led_action_ok lan1_green=ON
list led_action_ok lan1_yellow=ON
list led_action_ok lan2_green=ON
list led_action_ok lan2_yellow=ON
list led_action_ok lan3_green=ON
list led_action_ok lan3_yellow=ON
list led_action_ok lan4_green=ON
list led_action_ok lan4_yellow=ON
list led_action_off lan1_green=OFF
list led_action_off lan1_yellow=OFF
list led_action_off lan2_green=OFF
list led_action_off lan2_yellow=OFF
list led_action_off lan3_green=OFF
list led_action_off lan3_yellow=OFF
list led_action_off lan4_green=OFF
list led_action_off lan4_yellow=OFF
...@@ -51,43 +51,91 @@ config gpio_led gpio_leds ...@@ -51,43 +51,91 @@ config gpio_led gpio_leds
list leds usb_green list leds usb_green
list leds power_on_green list leds power_on_green
list leds alarm_red list leds alarm_red
list leds lan1_green
list leds lan1_yellow
list leds lan2_green
list leds lan2_yellow
list leds lan3_green
list leds lan3_yellow
list leds lan4_green
list leds lan4_yellow
list leds ext_green list leds ext_green
list leds ext_yellow list leds ext_yellow
config gpio_led wan_yellow config gpio_led wan_yellow
option addr 0 option active high
option active high option sysfs_attr 3s
option mode sr option mode led_linux
config gpio_led wan_green config gpio_led wan_green
option addr 1 option active high
option active high option sysfs_attr 4s
option mode sr option mode led_linux
config gpio_led usb_green config gpio_led usb_green
option addr 8 option active high
option active high option sysfs_attr 15s
option mode sr option mode led_linux
config gpio_led power_on_green config gpio_led power_on_green
option addr 5 option active high
option active high option sysfs_attr 5s
option mode sr option mode led_linux
config gpio_led alarm_red config gpio_led alarm_red
option addr 6 option active high
option active high option sysfs_attr 6s
option mode sr option mode led_linux
config gpio_led lan1_yellow
option active high
option sysfs_attr 7s
option mode led_linux
config gpio_led lan1_green
option active high
option sysfs_attr 8s
option mode led_linux
config gpio_led lan2_yellow
option active high
option sysfs_attr 9s
option mode led_linux
config gpio_led lan2_green
option active high
option sysfs_attr 10s
option mode led_linux
config gpio_led lan3_yellow
option active high
option sysfs_attr 11s
option mode led_linux
config gpio_led lan3_green
option active high
option sysfs_attr 12s
option mode led_linux
config gpio_led lan4_yellow
option active high
option sysfs_attr 13s
option mode led_linux
config gpio_led lan4_green
option active high
option sysfs_attr 14s
option mode led_linux
config gpio_led ext_green config gpio_led ext_green
option addr 2 option active high
option active high option sysfs_attr 0s
option mode sr option mode led_linux
config gpio_led ext_yellow config gpio_led ext_yellow
option addr 3 option active high
option active high option sysfs_attr 1s
option mode sr option mode led_linux
############### mapping led function to driver led ############### mapping led function to driver led
...@@ -96,6 +144,7 @@ config led_map led_map ...@@ -96,6 +144,7 @@ config led_map led_map
list functions usb list functions usb
list functions wan_speed list functions wan_speed
list functions ext list functions ext
list functions lan
config led_map led_status config led_map led_status
...@@ -132,3 +181,21 @@ config led_map led_ext ...@@ -132,3 +181,21 @@ config led_map led_ext
list led_action_off ext_yellow=OFF list led_action_off ext_yellow=OFF
list led_action_notice ext_green=OFF list led_action_notice ext_green=OFF
list led_action_notice ext_yellow=ON list led_action_notice ext_yellow=ON
config led_map led_lan
list led_action_ok lan1_green=ON
list led_action_ok lan1_yellow=ON
list led_action_ok lan2_green=ON
list led_action_ok lan2_yellow=ON
list led_action_ok lan3_green=ON
list led_action_ok lan3_yellow=ON
list led_action_ok lan4_green=ON
list led_action_ok lan4_yellow=ON
list led_action_off lan1_green=OFF
list led_action_off lan1_yellow=OFF
list led_action_off lan2_green=OFF
list led_action_off lan2_yellow=OFF
list led_action_off lan3_green=OFF
list led_action_off lan3_yellow=OFF
list led_action_off lan4_green=OFF
list led_action_off lan4_yellow=OFF
#!/bin/sh
readonly BASENAME="$(basename "$DEVPATH")"
[ "${BASENAME:0:3}" = "usb" -a "$ACTION" = "add" ] && exit 0
[ "${BASENAME:0:3}" = "usb" ] && ACTION="notice" # A root-hub disappeared, this SHOULD NOT happen!
case "$ACTION" in
add)
ubus call led.usb set '{ "state": "ok" }'
;;
notice)
ubus call led.usb set '{ "state": "notice" }'
;;
*)
ubus call led.usb set '{ "state": "off" }'
;;
esac
#!/bin/sh /etc/rc.common
START=21
STOP=90
USE_PROCD=1
FIBER_WAN=$(which fiber_wan)
start_service() {
[ -n "$FIBER_WAN" ] && {
procd_open_instance
procd_set_param command "$FIBER_WAN"
procd_set_param respawn
procd_close_instance
}
}
stop_service() {
[ -n "$FIBER_WAN" ] && service_stop "$FIBER_WAN"
}
boot() {
# Only run for XG6846B board
[ "$(db -q get hw.board.model_name)" != "XG6846B" ] && exit 0
start
}
reload_service() {
stop
start
}
#!/bin/sh /etc/rc.common
START=9
boot() {
# steady status led to indicate boot process is complete
ubus call led.status set '{"state":"ok"}' 2>/dev/null
echo "All init.d scripts started." | tee /dev/console
# Cold plug trigger - USB LED etc..
udevtrigger
}
...@@ -16,7 +16,4 @@ boot() { ...@@ -16,7 +16,4 @@ boot() {
# and enable port forwarding. # and enable port forwarding.
port_forwarding port_forwarding
activate_phys activate_phys
# Continously probe for link on 100 and 1000 Mbps.
/usr/sbin/fiber_wan &
} }
...@@ -46,7 +46,6 @@ get_link() { ...@@ -46,7 +46,6 @@ get_link() {
else else
ubus call led.wan_speed set {\"state\":\"OFF\"} ubus call led.wan_speed set {\"state\":\"OFF\"}
fi fi
sleep 5
else else
#wan copper mode #wan copper mode
disable_ext_led disable_ext_led
...@@ -60,8 +59,8 @@ get_link() { ...@@ -60,8 +59,8 @@ get_link() {
else else
ubus call led.wan_speed set {\"state\":\"OFF\"} ubus call led.wan_speed set {\"state\":\"OFF\"}
fi fi
sleep 5
fi fi
sleep 5
done done
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment