Re: [PATCH] ramips: support TP-Link EAP615-Wall

2022-02-06 Thread Sander Vanheule
On Fri, 2022-02-04 at 20:05 +0200, Stijn Tintel wrote:
> > > diff --git a/target/linux/ramips/image/mt7621.mk
> > > b/target/linux/ramips/image/mt7621.mk
> > > index a461c57f15..617c8adc37 100644
> > > --- a/target/linux/ramips/image/mt7621.mk
> > > +++ b/target/linux/ramips/image/mt7621.mk
> > > @@ -1461,6 +1461,18 @@ define Device/tplink_eap235-wall-v1
> > >  endef
> > >  TARGET_DEVICES += tplink_eap235-wall-v1
> > >  
> > > +define Device/tplink_eap615-wall-v1
> > > +  $(Device/tplink-safeloader)
> > Missing $(Device/dsa-migration).
> This is a new device, so there isn't anything to migrate. This sounds weird?
> 

The same was needed for the EAP235-Wall, even though that device also only ever 
used DSA.
See
https://patchwork.ozlabs.org/project/openwrt/patch/20210214100322.246853-1-san...@svanheule.net/#2633386

Best,
Sander

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] ramips: support TP-Link EAP615-Wall

2022-02-05 Thread Sander Vanheule
On Sat, 2022-02-05 at 13:36 +0200, Stijn Tintel wrote:
> On 4/02/2022 20:05, Stijn Tintel wrote:
> > > > +  DEVICE_MODEL := EAP615-Wall
> > > > +  DEVICE_VARIANT := v1
> > > > +  DEVICE_PACKAGES := kmod-mt7915e
> > > > +  TPLINK_BOARD_ID := EAP615-WALL-V1
> > > > +  KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword
> > > > $$(DEVICE_DTS)).dtb | pad-to 64k
> > > > +  KERNEL_INITRAMFS := kernel-bin | lzma | fit lzma 
> > > > $$(KDIR)/image-$$(firstword
> > > > $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
> > > Is the 'pad-to 64k' required? mtdsplit can split at arbitrary boundaries, 
> > > so I think
> > > the
> > > padding here isn't very useful. The other device with FIT images on 
> > > mt7621 also
> > > don't add
> > > padding to the kernel.
> > Removed.
> 
> Removing the padding causes this logging line during boot:
> 
> [    0.712046] mtd: partition "rootfs" doesn't start on an erase/write
> block boundary -- force read-only
> 
> While it doesn't cause any real issues, I prefer to not have this
> message. The datasheet leaves me clueless about the erase block size,
> but in sysfs I can find 64k, so I'm going to add back pad-to 64k to KERNEL.

You should also be able to use the BLOCKSIZE variable instead of "64k".

The warning you get was patched out previously with 
target/linux/generic/pending-5.4/411-
mtd-partial_eraseblock_write.patch, but I don't remember seeing that on my own 
5.10
builds...

Can anyone more experienced with mtd(split) tell if the padding is required 
here?

Best,
Sander


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] ramips: support TP-Link EAP615-Wall

2022-02-05 Thread Stijn Tintel
On 5/02/2022 14:21, Sander Vanheule wrote:
> On Fri, 2022-02-04 at 20:05 +0200, Stijn Tintel wrote:
>> On 29/01/2022 15:03, Sander Vanheule wrote:
>>> Hi Stijn,
>>>
>>> Thanks for the patch, been looking forward to this!
>>>
>>> On Fri, 2022-01-28 at 00:00 +0200, Stijn Tintel wrote:
 Add support for the TP-Link EAP615-Wall, an AX1800 Wall Plate WiFi 6 AP.
 The device is very similar to the TP-Link EAP235-Wall.

 Hardware:
 * SoC: MediaTek MT7621AT
 * RAM: 128MiB
 * Flash: 16MiB SPI-NOR
 * Ethernet: 4x GbE
   * Back: ETH0 (PoE-PD)
   * Bottom: ETH1, ETH2, ETH3 (PoE-PT)
>>> PT > passthrough
>> Not sure what else PoE-PT can refer to. I like that it's the same style
>> as PoE-PD.
> AFAICT the PD (powered device) and PSE (power sourcing equipment) names are 
> part of the
> PoE standard, while 'PT' isn't.
Ok.
>
 * WiFi: MT7915E 2.4/5 GHz 2T2R
 * LEDS: 1x white
 * Buttons: 1x LED, 1x reset

 Stock firmware uses a random MAC address for ethernet. OpenWrt uses the
 MAC address that is on the device label for ethernet and the wireless
 interfaces. MAC address must not be incremented, as this will cause MAC
 address conflicts in case you have two devices with consecutive MAC
 addresses. Instead, different locally administered addresses will be
 generated automatically, based on the MAC on the label.

 Installation via stock firmware:
 * Enable SSH in the TP-Link web interface
 * SSH to the device
 * Run `cliclientd stopcs`
 * Upload the OpenWrt factory image via the TP-Link webinterface

 Installation via bootloader:
 * Solder TTL header. Pinout: 1: TX, 2: RX, 3: GND, 4: VCC, with pin 1
   closest to ETH1. Baud rate 115200
 * Interrupt boot process by holding a key during boot
 * Boot the OpenWrt initramfs:
   # tftpboot 0x8400 
 openwrt-ramips-mt7621-tplink_eap615-wall-v1-initramfs-
 kernel.bin
   # bootm
 * Copy openwrt-ramips-mt7621-tplink_eap615-wall-v1-squashfs-sysupgrade.bin
   to /tmp and use sysupgrade to install it

 Thanks to Sander Vanheule for his work on the EAP235-Wall, which made
 adding support for the EAP615-Wall very easy.

 Signed-off-by: Stijn Tintel 
 ---
  .../dts/mt7621_tplink_eap615-wall-v1.dts  | 250 ++
  target/linux/ramips/image/mt7621.mk   |  12 +
  .../mt7621/base-files/etc/board.d/02_network  |   3 +-
  tools/firmware-utils/patches/999-eap615.patch |  55 
  4 files changed, 319 insertions(+), 1 deletion(-)
  create mode 100644 
 target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
  create mode 100644 tools/firmware-utils/patches/999-eap615.patch

 diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
 b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
 new file mode 100644
 index 00..fd5a68973b
 --- /dev/null
 +++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
 @@ -0,0 +1,250 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +
 +#include "mt7621.dtsi"
 +
 +#include 
 +#include 
 +#include 
 +
 +/ {
 +   compatible = "tplink,eap615-wall-v1", "mediatek,mt7621-soc";
 +   model = "TP-Link EAP615-Wall v1";
 +
 +   aliases {
 +   label-mac-device = 
 +   led-boot = _status;
 +   led-failsafe = _status;
 +   led-running = _status;
 +   led-upgrade = _status;
 +   };
 +
 +   chosen {
 +   bootargs = "console=ttyS0,115200";
 +   };
 +
 +   leds {
 +   compatible = "gpio-leds";
 +
 +   led_status: status {
 +   label = "white:status";
 +   color = ;
 +   function = LED_FUNCTION_STATUS;
 +   gpios = < 12 GPIO_ACTIVE_LOW>;
 +   };
 +   };
 +
 +   keys {
 +   compatible = "gpio-keys";
 +
 +   led {
 +   label = "led";
 +   gpios = < 10 GPIO_ACTIVE_LOW>;
 +   linux,code = ;
 +   };
 +
 +   reset {
 +   label = "reset";
 +   gpios = < 8 GPIO_ACTIVE_LOW>;
 +   linux,code = ;
 +   };
 +   };
 +
 +   gpio-export {
 +   compatible = "gpio-export";
 +
 +   poe_passthrough {
 +   gpio-export,name = "poe-passthrough";
 +   gpio-export,output = <0>;
 +   gpios = < 7 GPIO_ACTIVE_HIGH>;
 +   };
 +   };
 +
 +   ethernet@1e10 {
 +  

Re: [PATCH] ramips: support TP-Link EAP615-Wall

2022-02-05 Thread Sander Vanheule
On Fri, 2022-02-04 at 20:05 +0200, Stijn Tintel wrote:
> On 29/01/2022 15:03, Sander Vanheule wrote:
> > Hi Stijn,
> > 
> > Thanks for the patch, been looking forward to this!
> > 
> > On Fri, 2022-01-28 at 00:00 +0200, Stijn Tintel wrote:
> > > Add support for the TP-Link EAP615-Wall, an AX1800 Wall Plate WiFi 6 AP.
> > > The device is very similar to the TP-Link EAP235-Wall.
> > > 
> > > Hardware:
> > > * SoC: MediaTek MT7621AT
> > > * RAM: 128MiB
> > > * Flash: 16MiB SPI-NOR
> > > * Ethernet: 4x GbE
> > >   * Back: ETH0 (PoE-PD)
> > >   * Bottom: ETH1, ETH2, ETH3 (PoE-PT)
> > PT > passthrough
> Not sure what else PoE-PT can refer to. I like that it's the same style
> as PoE-PD.

AFAICT the PD (powered device) and PSE (power sourcing equipment) names are 
part of the
PoE standard, while 'PT' isn't.

> > 
> > > * WiFi: MT7915E 2.4/5 GHz 2T2R
> > > * LEDS: 1x white
> > > * Buttons: 1x LED, 1x reset
> > > 
> > > Stock firmware uses a random MAC address for ethernet. OpenWrt uses the
> > > MAC address that is on the device label for ethernet and the wireless
> > > interfaces. MAC address must not be incremented, as this will cause MAC
> > > address conflicts in case you have two devices with consecutive MAC
> > > addresses. Instead, different locally administered addresses will be
> > > generated automatically, based on the MAC on the label.
> > > 
> > > Installation via stock firmware:
> > > * Enable SSH in the TP-Link web interface
> > > * SSH to the device
> > > * Run `cliclientd stopcs`
> > > * Upload the OpenWrt factory image via the TP-Link webinterface
> > > 
> > > Installation via bootloader:
> > > * Solder TTL header. Pinout: 1: TX, 2: RX, 3: GND, 4: VCC, with pin 1
> > >   closest to ETH1. Baud rate 115200
> > > * Interrupt boot process by holding a key during boot
> > > * Boot the OpenWrt initramfs:
> > >   # tftpboot 0x8400 
> > > openwrt-ramips-mt7621-tplink_eap615-wall-v1-initramfs-
> > > kernel.bin
> > >   # bootm
> > > * Copy openwrt-ramips-mt7621-tplink_eap615-wall-v1-squashfs-sysupgrade.bin
> > >   to /tmp and use sysupgrade to install it
> > > 
> > > Thanks to Sander Vanheule for his work on the EAP235-Wall, which made
> > > adding support for the EAP615-Wall very easy.
> > > 
> > > Signed-off-by: Stijn Tintel 
> > > ---
> > >  .../dts/mt7621_tplink_eap615-wall-v1.dts  | 250 ++
> > >  target/linux/ramips/image/mt7621.mk   |  12 +
> > >  .../mt7621/base-files/etc/board.d/02_network  |   3 +-
> > >  tools/firmware-utils/patches/999-eap615.patch |  55 
> > >  4 files changed, 319 insertions(+), 1 deletion(-)
> > >  create mode 100644 
> > > target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
> > >  create mode 100644 tools/firmware-utils/patches/999-eap615.patch
> > > 
> > > diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
> > > b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
> > > new file mode 100644
> > > index 00..fd5a68973b
> > > --- /dev/null
> > > +++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
> > > @@ -0,0 +1,250 @@
> > > +// SPDX-License-Identifier: GPL-2.0-or-later
> > > +
> > > +#include "mt7621.dtsi"
> > > +
> > > +#include 
> > > +#include 
> > > +#include 
> > > +
> > > +/ {
> > > +   compatible = "tplink,eap615-wall-v1", "mediatek,mt7621-soc";
> > > +   model = "TP-Link EAP615-Wall v1";
> > > +
> > > +   aliases {
> > > +   label-mac-device = 
> > > +   led-boot = _status;
> > > +   led-failsafe = _status;
> > > +   led-running = _status;
> > > +   led-upgrade = _status;
> > > +   };
> > > +
> > > +   chosen {
> > > +   bootargs = "console=ttyS0,115200";
> > > +   };
> > > +
> > > +   leds {
> > > +   compatible = "gpio-leds";
> > > +
> > > +   led_status: status {
> > > +   label = "white:status";
> > > +   color = ;
> > > +   function = LED_FUNCTION_STATUS;
> > > +   gpios = < 12 GPIO_ACTIVE_LOW>;
> > > +   };
> > > +   };
> > > +
> > > +   keys {
> > > +   compatible = "gpio-keys";
> > > +
> > > +   led {
> > > +   label = "led";
> > > +   gpios = < 10 GPIO_ACTIVE_LOW>;
> > > +   linux,code = ;
> > > +   };
> > > +
> > > +   reset {
> > > +   label = "reset";
> > > +   gpios = < 8 GPIO_ACTIVE_LOW>;
> > > +   linux,code = ;
> > > +   };
> > > +   };
> > > +
> > > +   gpio-export {
> > > +   compatible = "gpio-export";
> > > +
> > > +   poe_passthrough {
> > > +   gpio-export,name = "poe-passthrough";
> > > +   gpio-export,output = <0>;
> > > +   gpios = < 7 GPIO_ACTIVE_HIGH>;
> > > +   

Re: [PATCH] ramips: support TP-Link EAP615-Wall

2022-02-05 Thread Stijn Tintel
On 4/02/2022 20:05, Stijn Tintel wrote:
>>> +  DEVICE_MODEL := EAP615-Wall
>>> +  DEVICE_VARIANT := v1
>>> +  DEVICE_PACKAGES := kmod-mt7915e
>>> +  TPLINK_BOARD_ID := EAP615-WALL-V1
>>> +  KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword
>>> $$(DEVICE_DTS)).dtb | pad-to 64k
>>> +  KERNEL_INITRAMFS := kernel-bin | lzma | fit lzma 
>>> $$(KDIR)/image-$$(firstword
>>> $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
>> Is the 'pad-to 64k' required? mtdsplit can split at arbitrary boundaries, so 
>> I think the
>> padding here isn't very useful. The other device with FIT images on mt7621 
>> also don't add
>> padding to the kernel.
> Removed.

Removing the padding causes this logging line during boot:

[    0.712046] mtd: partition "rootfs" doesn't start on an erase/write
block boundary -- force read-only

While it doesn't cause any real issues, I prefer to not have this
message. The datasheet leaves me clueless about the erase block size,
but in sysfs I can find 64k, so I'm going to add back pad-to 64k to KERNEL.

Stijn


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] ramips: support TP-Link EAP615-Wall

2022-02-04 Thread Nathan Lutchansky

On 2/4/22 1:05 PM, Stijn Tintel wrote:

On 29/01/2022 15:03, Sander Vanheule wrote:


Is this the partition layout as defined in partition-table, or the runtime one 
from
/proc/mtd? We've noticed they can be different, and the runtime one is actually 
the one
that should be used in order to not erase the stock configuration.

I honestly don't recall, and I don't have an unmodified EAP615-Wall
anymore. Can anyone get me that runtime OEM partition layout?


I've got a new EAP615-Wall on the way, but due to the winter storms here 
in the eastern US, it won't be here until Monday. When it arrives I can 
check.  -Nathan



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] ramips: support TP-Link EAP615-Wall

2022-02-04 Thread Stijn Tintel
On 29/01/2022 15:03, Sander Vanheule wrote:
> Hi Stijn,
>
> Thanks for the patch, been looking forward to this!
>
> On Fri, 2022-01-28 at 00:00 +0200, Stijn Tintel wrote:
>> Add support for the TP-Link EAP615-Wall, an AX1800 Wall Plate WiFi 6 AP.
>> The device is very similar to the TP-Link EAP235-Wall.
>>
>> Hardware:
>> * SoC: MediaTek MT7621AT
>> * RAM: 128MiB
>> * Flash: 16MiB SPI-NOR
>> * Ethernet: 4x GbE
>>   * Back: ETH0 (PoE-PD)
>>   * Bottom: ETH1, ETH2, ETH3 (PoE-PT)
> PT > passthrough
Not sure what else PoE-PT can refer to. I like that it's the same style
as PoE-PD.
>
>> * WiFi: MT7915E 2.4/5 GHz 2T2R
>> * LEDS: 1x white
>> * Buttons: 1x LED, 1x reset
>>
>> Stock firmware uses a random MAC address for ethernet. OpenWrt uses the
>> MAC address that is on the device label for ethernet and the wireless
>> interfaces. MAC address must not be incremented, as this will cause MAC
>> address conflicts in case you have two devices with consecutive MAC
>> addresses. Instead, different locally administered addresses will be
>> generated automatically, based on the MAC on the label.
>>
>> Installation via stock firmware:
>> * Enable SSH in the TP-Link web interface
>> * SSH to the device
>> * Run `cliclientd stopcs`
>> * Upload the OpenWrt factory image via the TP-Link webinterface
>>
>> Installation via bootloader:
>> * Solder TTL header. Pinout: 1: TX, 2: RX, 3: GND, 4: VCC, with pin 1
>>   closest to ETH1. Baud rate 115200
>> * Interrupt boot process by holding a key during boot
>> * Boot the OpenWrt initramfs:
>>   # tftpboot 0x8400 
>> openwrt-ramips-mt7621-tplink_eap615-wall-v1-initramfs-kernel.bin
>>   # bootm
>> * Copy openwrt-ramips-mt7621-tplink_eap615-wall-v1-squashfs-sysupgrade.bin
>>   to /tmp and use sysupgrade to install it
>>
>> Thanks to Sander Vanheule for his work on the EAP235-Wall, which made
>> adding support for the EAP615-Wall very easy.
>>
>> Signed-off-by: Stijn Tintel 
>> ---
>>  .../dts/mt7621_tplink_eap615-wall-v1.dts  | 250 ++
>>  target/linux/ramips/image/mt7621.mk   |  12 +
>>  .../mt7621/base-files/etc/board.d/02_network  |   3 +-
>>  tools/firmware-utils/patches/999-eap615.patch |  55 
>>  4 files changed, 319 insertions(+), 1 deletion(-)
>>  create mode 100644 target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
>>  create mode 100644 tools/firmware-utils/patches/999-eap615.patch
>>
>> diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
>> b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
>> new file mode 100644
>> index 00..fd5a68973b
>> --- /dev/null
>> +++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
>> @@ -0,0 +1,250 @@
>> +// SPDX-License-Identifier: GPL-2.0-or-later
>> +
>> +#include "mt7621.dtsi"
>> +
>> +#include 
>> +#include 
>> +#include 
>> +
>> +/ {
>> +   compatible = "tplink,eap615-wall-v1", "mediatek,mt7621-soc";
>> +   model = "TP-Link EAP615-Wall v1";
>> +
>> +   aliases {
>> +   label-mac-device = 
>> +   led-boot = _status;
>> +   led-failsafe = _status;
>> +   led-running = _status;
>> +   led-upgrade = _status;
>> +   };
>> +
>> +   chosen {
>> +   bootargs = "console=ttyS0,115200";
>> +   };
>> +
>> +   leds {
>> +   compatible = "gpio-leds";
>> +
>> +   led_status: status {
>> +   label = "white:status";
>> +   color = ;
>> +   function = LED_FUNCTION_STATUS;
>> +   gpios = < 12 GPIO_ACTIVE_LOW>;
>> +   };
>> +   };
>> +
>> +   keys {
>> +   compatible = "gpio-keys";
>> +
>> +   led {
>> +   label = "led";
>> +   gpios = < 10 GPIO_ACTIVE_LOW>;
>> +   linux,code = ;
>> +   };
>> +
>> +   reset {
>> +   label = "reset";
>> +   gpios = < 8 GPIO_ACTIVE_LOW>;
>> +   linux,code = ;
>> +   };
>> +   };
>> +
>> +   gpio-export {
>> +   compatible = "gpio-export";
>> +
>> +   poe_passthrough {
>> +   gpio-export,name = "poe-passthrough";
>> +   gpio-export,output = <0>;
>> +   gpios = < 7 GPIO_ACTIVE_HIGH>;
>> +   };
>> +   };
>> +
>> +   ethernet@1e10 {
>> +   reg = <0x1e10 0xe000>;
>> +
>> +   mac@0 {
>> +   phy-mode = "rgmii";
>> +
>> +   fixed-link {
>> +   pause;
>> +   speed = <1000>;
>> +   };
>> +   };
>> +
>> +   mac@1 {
>> +   status = "okay";
>> +
>> +   phy-mode = "rgmii";
>> +
>> +   fixed-link {
>> +

Re: [PATCH] ramips: support TP-Link EAP615-Wall

2022-01-29 Thread Arınç ÜNAL

On 29/01/2022 16:03, Sander Vanheule wrote:

Hi Stijn,

Thanks for the patch, been looking forward to this!

On Fri, 2022-01-28 at 00:00 +0200, Stijn Tintel wrote:

Add support for the TP-Link EAP615-Wall, an AX1800 Wall Plate WiFi 6 AP.
The device is very similar to the TP-Link EAP235-Wall.

Hardware:
* SoC: MediaTek MT7621AT
* RAM: 128MiB
* Flash: 16MiB SPI-NOR
* Ethernet: 4x GbE
   * Back: ETH0 (PoE-PD)
   * Bottom: ETH1, ETH2, ETH3 (PoE-PT)


PT > passthrough


* WiFi: MT7915E 2.4/5 GHz 2T2R
* LEDS: 1x white
* Buttons: 1x LED, 1x reset

Stock firmware uses a random MAC address for ethernet. OpenWrt uses the
MAC address that is on the device label for ethernet and the wireless
interfaces. MAC address must not be incremented, as this will cause MAC
address conflicts in case you have two devices with consecutive MAC
addresses. Instead, different locally administered addresses will be
generated automatically, based on the MAC on the label.

Installation via stock firmware:
* Enable SSH in the TP-Link web interface
* SSH to the device
* Run `cliclientd stopcs`
* Upload the OpenWrt factory image via the TP-Link webinterface

Installation via bootloader:
* Solder TTL header. Pinout: 1: TX, 2: RX, 3: GND, 4: VCC, with pin 1
   closest to ETH1. Baud rate 115200
* Interrupt boot process by holding a key during boot
* Boot the OpenWrt initramfs:
   # tftpboot 0x8400 
openwrt-ramips-mt7621-tplink_eap615-wall-v1-initramfs-kernel.bin
   # bootm
* Copy openwrt-ramips-mt7621-tplink_eap615-wall-v1-squashfs-sysupgrade.bin
   to /tmp and use sysupgrade to install it

Thanks to Sander Vanheule for his work on the EAP235-Wall, which made
adding support for the EAP615-Wall very easy.

Signed-off-by: Stijn Tintel 
---
  .../dts/mt7621_tplink_eap615-wall-v1.dts  | 250 ++
  target/linux/ramips/image/mt7621.mk   |  12 +
  .../mt7621/base-files/etc/board.d/02_network  |   3 +-
  tools/firmware-utils/patches/999-eap615.patch |  55 
  4 files changed, 319 insertions(+), 1 deletion(-)
  create mode 100644 target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
  create mode 100644 tools/firmware-utils/patches/999-eap615.patch

diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
new file mode 100644
index 00..fd5a68973b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
@@ -0,0 +1,250 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7621.dtsi"
+
+#include 
+#include 
+#include 
+
+/ {
+   compatible = "tplink,eap615-wall-v1", "mediatek,mt7621-soc";
+   model = "TP-Link EAP615-Wall v1";
+
+   aliases {
+   label-mac-device = 
+   led-boot = _status;
+   led-failsafe = _status;
+   led-running = _status;
+   led-upgrade = _status;
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_status: status {
+   label = "white:status";
+   color = ;
+   function = LED_FUNCTION_STATUS;
+   gpios = < 12 GPIO_ACTIVE_LOW>;
+   };
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   led {
+   label = "led";
+   gpios = < 10 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   reset {
+   label = "reset";
+   gpios = < 8 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   gpio-export {
+   compatible = "gpio-export";
+
+   poe_passthrough {
+   gpio-export,name = "poe-passthrough";
+   gpio-export,output = <0>;
+   gpios = < 7 GPIO_ACTIVE_HIGH>;
+   };
+   };
+
+   ethernet@1e10 {
+   reg = <0x1e10 0xe000>;
+
+   mac@0 {
+   phy-mode = "rgmii";
+
+   fixed-link {
+   pause;
+   speed = <1000>;
+   };
+   };
+
+   mac@1 {
+   status = "okay";
+
+   phy-mode = "rgmii";
+
+   fixed-link {
+   full-duplex;
+   pause;
+   speed = <1000>;
+   };
+   };


This node is labeled as "gmac1" in mt7621.dtsi, so you don't need to redefine
/ethernet@1e10/mac@1 here to be able to modify the node. Use  {...} 
like you do
with spi0.

You can also drop the references to ethernet@1e10 and mac@0, since you 
don't modify
any of their properties.


+   };
+
+};
+
+ {
+   

Re: [PATCH] ramips: support TP-Link EAP615-Wall

2022-01-29 Thread Sander Vanheule
Hi Stijn,

Thanks for the patch, been looking forward to this!

On Fri, 2022-01-28 at 00:00 +0200, Stijn Tintel wrote:
> Add support for the TP-Link EAP615-Wall, an AX1800 Wall Plate WiFi 6 AP.
> The device is very similar to the TP-Link EAP235-Wall.
> 
> Hardware:
> * SoC: MediaTek MT7621AT
> * RAM: 128MiB
> * Flash: 16MiB SPI-NOR
> * Ethernet: 4x GbE
>   * Back: ETH0 (PoE-PD)
>   * Bottom: ETH1, ETH2, ETH3 (PoE-PT)

PT > passthrough

> * WiFi: MT7915E 2.4/5 GHz 2T2R
> * LEDS: 1x white
> * Buttons: 1x LED, 1x reset
> 
> Stock firmware uses a random MAC address for ethernet. OpenWrt uses the
> MAC address that is on the device label for ethernet and the wireless
> interfaces. MAC address must not be incremented, as this will cause MAC
> address conflicts in case you have two devices with consecutive MAC
> addresses. Instead, different locally administered addresses will be
> generated automatically, based on the MAC on the label.
> 
> Installation via stock firmware:
> * Enable SSH in the TP-Link web interface
> * SSH to the device
> * Run `cliclientd stopcs`
> * Upload the OpenWrt factory image via the TP-Link webinterface
> 
> Installation via bootloader:
> * Solder TTL header. Pinout: 1: TX, 2: RX, 3: GND, 4: VCC, with pin 1
>   closest to ETH1. Baud rate 115200
> * Interrupt boot process by holding a key during boot
> * Boot the OpenWrt initramfs:
>   # tftpboot 0x8400 
> openwrt-ramips-mt7621-tplink_eap615-wall-v1-initramfs-kernel.bin
>   # bootm
> * Copy openwrt-ramips-mt7621-tplink_eap615-wall-v1-squashfs-sysupgrade.bin
>   to /tmp and use sysupgrade to install it
> 
> Thanks to Sander Vanheule for his work on the EAP235-Wall, which made
> adding support for the EAP615-Wall very easy.
> 
> Signed-off-by: Stijn Tintel 
> ---
>  .../dts/mt7621_tplink_eap615-wall-v1.dts  | 250 ++
>  target/linux/ramips/image/mt7621.mk   |  12 +
>  .../mt7621/base-files/etc/board.d/02_network  |   3 +-
>  tools/firmware-utils/patches/999-eap615.patch |  55 
>  4 files changed, 319 insertions(+), 1 deletion(-)
>  create mode 100644 target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
>  create mode 100644 tools/firmware-utils/patches/999-eap615.patch
> 
> diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
> b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
> new file mode 100644
> index 00..fd5a68973b
> --- /dev/null
> +++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
> @@ -0,0 +1,250 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +
> +#include "mt7621.dtsi"
> +
> +#include 
> +#include 
> +#include 
> +
> +/ {
> +   compatible = "tplink,eap615-wall-v1", "mediatek,mt7621-soc";
> +   model = "TP-Link EAP615-Wall v1";
> +
> +   aliases {
> +   label-mac-device = 
> +   led-boot = _status;
> +   led-failsafe = _status;
> +   led-running = _status;
> +   led-upgrade = _status;
> +   };
> +
> +   chosen {
> +   bootargs = "console=ttyS0,115200";
> +   };
> +
> +   leds {
> +   compatible = "gpio-leds";
> +
> +   led_status: status {
> +   label = "white:status";
> +   color = ;
> +   function = LED_FUNCTION_STATUS;
> +   gpios = < 12 GPIO_ACTIVE_LOW>;
> +   };
> +   };
> +
> +   keys {
> +   compatible = "gpio-keys";
> +
> +   led {
> +   label = "led";
> +   gpios = < 10 GPIO_ACTIVE_LOW>;
> +   linux,code = ;
> +   };
> +
> +   reset {
> +   label = "reset";
> +   gpios = < 8 GPIO_ACTIVE_LOW>;
> +   linux,code = ;
> +   };
> +   };
> +
> +   gpio-export {
> +   compatible = "gpio-export";
> +
> +   poe_passthrough {
> +   gpio-export,name = "poe-passthrough";
> +   gpio-export,output = <0>;
> +   gpios = < 7 GPIO_ACTIVE_HIGH>;
> +   };
> +   };
> +
> +   ethernet@1e10 {
> +   reg = <0x1e10 0xe000>;
> +
> +   mac@0 {
> +   phy-mode = "rgmii";
> +
> +   fixed-link {
> +   pause;
> +   speed = <1000>;
> +   };
> +   };
> +
> +   mac@1 {
> +   status = "okay";
> +
> +   phy-mode = "rgmii";
> +
> +   fixed-link {
> +   full-duplex;
> +   pause;
> +   speed = <1000>;
> +   };
> +   };

This node is labeled as "gmac1" in mt7621.dtsi, so you don't need to redefine
/ethernet@1e10/mac@1