6ba58b7b02
Always enable the pwr led and use the usr led for boot status indication. Rename nodes in the dts, to match what is recommend in the devicetree specification. Increase the maximum spi frequency to 20MHz and drop the m25p,chunked-io which isn't required on mt7621. Use the BTN_0 keycode for the mode button. This board doesn't have any wireless. Use a more descriptive label for the reset button and the GPIO enabling the usb vcc supply. Use the beeper kernel module for the buzzer. Fix the pinmux to switch only pins used as GPIOs to the GPIO function. Add support for the PoE enable GPIO to the userspace. The PoE power status can be read via GPIO7. Since OpenWrt doesn't have support for reading inputs from userspace, prepare only the pinmux for the GPIO. Signed-off-by: Anton Arapov <arapov@gmail.com> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: Mathias Kresin <dev@kresin.me>
28 lines
651 B
Bash
Executable File
28 lines
651 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
mikrotik,rb750gr3)
|
|
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "17"
|
|
;;
|
|
ubnt-erx)
|
|
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "0"
|
|
;;
|
|
ubnt-erx-sfp)
|
|
ucidef_add_gpio_switch "poe_power_port0" "PoE Power Port0" "496"
|
|
ucidef_add_gpio_switch "poe_power_port1" "PoE Power Port1" "497"
|
|
ucidef_add_gpio_switch "poe_power_port2" "PoE Power Port2" "498"
|
|
ucidef_add_gpio_switch "poe_power_port3" "PoE Power Port3" "499"
|
|
ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "500"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|