[LEDE-DEV] [PATCH 2/3] ramips-mt7621: add GPIO-config for Ubiquiti-EdgeRouterX(-SFP)
Jo-Philipp Wich
jo at mein.io
Sat May 6 05:49:29 PDT 2017
Hi,
comments inline.
> define GPIOs for ubnt-erx and ubnt-erx-sfp
> ---
> .../ramips/base-files/etc/board.d/03_gpio_switches | 28 ++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
> create mode 100755 target/linux/ramips/base-files/etc/board.d/03_gpio_switches
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches
> new file mode 100755
> index 0000000..21d1aa2
> --- /dev/null
> +++ b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches
> @@ -0,0 +1,28 @@
> +#!/bin/sh
> +#
> +# Copyright (C) 2017 LEDE-project.org
Please use your own copyright here or none at all.
> +#
> +
> +. /lib/functions/uci-defaults.sh
> +. /lib/ramips.sh
> +
> +board_config_update
> +
> +board=$(ramips_board_name)
> +
> +case "$board" in
> +ubnt-erx)
> + ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "4"
> + ;;
> +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
>
More information about the Lede-dev
mailing list