Re: [OpenWrt-Devel] Controlling POE passthrough via GPIO

2015-06-22 Thread John Crispin


On 23/06/2015 01:48, Lars Kruse wrote:
> Hi,
> 
> within our wireless community we are using a couple of devices with the
> following features:
> * powered via POE through their first ethernet plug
> * another device can be powered via the second ethernet plug (POE passthrough
>   switchable via GPIO)
> 
> The POE passthrough feature can be controlled via GPIO pins.
> For our most common devices (Nanostation M5 and TP-Link CPE510) these are GPIO
> pins #2, #8 or #20 (depending on the model).
> 
> Currently we are using a custom script (see attached) for these models.
> 
> I have the feeling that this kind of hardware capabilities should be available
> within openwrt (similar to the LED setup).
> 
> Is there anything related already implemented within openwrt?
> If not: where would you recommend to put it?
> 

add some generic uci-sefault functions to add poe sections to uci. then
create a /etc/init.d/poe script that will set the gpios based on what is
written in uci. finally call the new uci-defaults functions from
/etc/uci-default/$my_arch
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Controlling POE passthrough via GPIO

2015-06-22 Thread Florian Fainelli
On 22/06/15 16:48, Lars Kruse wrote:
> Hi,
> 
> within our wireless community we are using a couple of devices with the
> following features:
> * powered via POE through their first ethernet plug
> * another device can be powered via the second ethernet plug (POE passthrough
>   switchable via GPIO)
> 
> The POE passthrough feature can be controlled via GPIO pins.
> For our most common devices (Nanostation M5 and TP-Link CPE510) these are GPIO
> pins #2, #8 or #20 (depending on the model).
> 
> Currently we are using a custom script (see attached) for these models.
> 
> I have the feeling that this kind of hardware capabilities should be available
> within openwrt (similar to the LED setup).
> 
> Is there anything related already implemented within openwrt?
> If not: where would you recommend to put it?

You could eventually utilize the regulator framework to implement such
GPIO toggling to provide/remove power to a given device. I have not
looked at whether this is something controllable from user-space, but
there is an in-kernel API to be a "consumer" of the regulator API.

Of course this information should be made conditional to the device model.

My 2 cents.
--
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Controlling POE passthrough via GPIO

2015-06-22 Thread Lars Kruse
Hi,

within our wireless community we are using a couple of devices with the
following features:
* powered via POE through their first ethernet plug
* another device can be powered via the second ethernet plug (POE passthrough
  switchable via GPIO)

The POE passthrough feature can be controlled via GPIO pins.
For our most common devices (Nanostation M5 and TP-Link CPE510) these are GPIO
pins #2, #8 or #20 (depending on the model).

Currently we are using a custom script (see attached) for these models.

I have the feeling that this kind of hardware capabilities should be available
within openwrt (similar to the LED setup).

Is there anything related already implemented within openwrt?
If not: where would you recommend to put it?

Cheers,
Lars



poe-passthrough.sh
Description: application/shellscript
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel