[PATCH] ramips: mt7621: add TP-Link EAP235-Wall support

Adrian Schmutzler mail at adrianschmutzler.de
Thu Feb 18 12:14:25 EST 2021


Hi,

> > > +
> > > +       gpio-export {
> > > +               compatible = "gpio-export";
> > > +
> > > +               poe_passthrough {
> > > +                       gpio-export,name = "tp-link:poe-
> > > passthrough:enable";
> >
> > I'd consider to drop the prefix, although we have no policy on this,
> > so it's pure matter of taste.
> > Actually, I'd drop this led-label-mimic entirely, and just call it
> > "poe-passthrough".
> 
> Will update.
> This was the same label as I used earlier for the EAP225-Wall. Maybe we
> should change that one too then?

Touching the old ones will require migration, so I would not do that unless we really agree on a commen scheme (which is unprobable for a downstream solution). This this is totally inconsistent anyway, I'd still go with the short version here, but you are totally free to choose what you prefer.

> 
> >
> >
> > state_default is missing?
> 
> It appears to work correctly without an explicit state_default. Is there and
> advantage (e.g. power saving) to setting unused functions to 'gpio'?

I'm talking about the gpios used by leds/keys/gpio-export.

I've also observed defining them was not necessary for leds/keys to work in several cases, but it's still the way to go.

> > > +
> > > +&gmac0 {
> > > +       mtd-mac-address = <&info 0x8>; };
> > > +
> > > +&switch0 {
> > > +       ports {
> > > +               port at 0 {
> > > +                       status = "okay";
> > > +                       label = "lan0";
> >
> > Is the zero-based indexing founded on some labels? If not, one-based
> > would be the common way to do it.
> 
> The port on the back of the device is actually labelled 'eth0', so I chose the
> lanX naming to reflect that. That's also why the order of the other port labels
> is reversed compared to their HW index.

Okay.

> > > diff --git a/target/linux/ramips/image/mt7621.mk
> > > b/target/linux/ramips/image/mt7621.mk
> > > index 203ca1b908..6efda9eb90 100644
> > > --- a/target/linux/ramips/image/mt7621.mk
> > > +++ b/target/linux/ramips/image/mt7621.mk
> > > @@ -1114,6 +1114,18 @@ define Device/totolink_x5000r  endef
> > > TARGET_DEVICES += totolink_x5000r
> > >
> > > +define Device/tplink_eap235-wall-v1
> >
> > dsa-migration needs to be added for new devices as well, so all
> > mt7621
> > start with compat version 1.1.
> 
> I realised this already while trying to sysupgrade the device. I originally
> thought as this was named 'migration', it wouldn't be needed since this
> device had always been a DSA device.

Yes, this was actually the least annoying of two options. The other would have been to have a big switch case for setting the compat-level in board.d.

Best

Adrian

> 
> 
> Best,
> Sander
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210218/b0ea291f/attachment.sig>


More information about the openwrt-devel mailing list