Re: [OpenWrt-Devel] [PATCH 2/4] ath79: add QCA955x SGMII link loss workaround
On Sat, Jun 1, 2019 at 12:26 AM Christian Lamparter wrote: > > On Friday, May 31, 2019 4:44:50 PM CEST Chuanhong Guo wrote: > > Hi! > > > > On Fri, May 31, 2019 at 9:34 PM Christian Lamparter > > wrote: > > > > > > Not to be a party pooper. The ag71xx is well on its way to upstream. > > > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/drivers/net/ethernet/atheros/ag71xx.c?id=d51b6ce441d356369387d20bc1de5f2edb0ab71e > > > > > > So sadly this all would need to be somehow upstreamed first and then > > > backported again. *sight* :( > > > > > The upstream driver is pretty much broken on every SoCs with external > > PHY/switch. Getting every ath79 SoC working with that driver is > > already a headache. > > > > I think we should just keep maintaining our ag71xx driver until > > someone having a pile of ath79 routers get that driver working. > > Well, look what happend to ar71xx then. The development on it is being > defered in favor of the upstream ath79 dts. So what do you think will > happen to the special out-of-tree ag71xx drivers now? That happens after we got ath79 target working. There is a period of time when ath79 has broken wireless support, during which ar71xx patches were still accepted. Author of upstream ag71xx driver did a 'rework' of OpenWrt ag71xx driver dropped all mii interface configuration stuff. Unless someone patches it back, it won't work on qca9558 in this case. To upstream this particular patch, we need to: 1. patch mii interface configuration code back. (Somehow we named it PLL and the author thought it's a clock register that doesn't belong to ethernet driver.) 2. patch the miscellaneous ethernet-related configuration code back. (gmac-config in our driver which is used by this patch.) Our current code for both of them will have little chance being accepted by upstream. Since this patch depends on gmac-config that doesn't exist in upstream ag71xx yet and we won't be using the upstream driver in upcoming 19.x release, I think it's fine to have this problem fixed in our driver and then port it upstream (likely to be a rework) with gmac-config code. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/2] gpio-button-hotplug: support interrupt properties
On Thu, May 30, 2019 at 8:09 AM Christian Lamparter wrote: > > Hello, > > On Thursday, May 30, 2019 12:00:27 PM CEST Petr Štetiar wrote: > > Christian Lamparter [2019-05-29 21:58:29]: > > > Upstream Linux's input gpio-keys driver supports > > > specifying a external interrupt for a gpio via the > > > 'interrupts' properties as well as having support > > > for software debounce. > > > > [...] > > > > I've just checked this on ath79 (archer-c7-v5) and on ramips/mt7620 > > (bdcom,wap2100-sk) with WPS buttons. > > > > Acked-by: Petr Štetiar > > Can you tell me what you tested? Was it the software debounce? > Because this should be the only bit that will affect the ath79 > platform I think (since it already has support for interrupts > through the gpio controller). > > From what I can tell, ramips should use gpio-keys-polled exclusivly > for now. This is because the rt2880-pinmux driver doesn't implement > and irq support (though some of the chips should support it). > all gpio-keys-polled should work as before. The upstream driver fixes this. See https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpio/gpio-mt7621.c?h=v4.19.47 > > Cheers, > Christian > > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20190531
On Fri, May 31, 2019 at 6:50 PM Jason A. Donenfeld wrote: > > * tools: add wincompat layer to wg(8) > > Consistent with a lot of the Windows work we've been doing this last cycle, > wg(8) now supports the WireGuard for Windows app by talking through a named > pipe. You can compile this as `PLATFORM=windows make -C src/tools` with mingw. > Because programming things for Windows is pretty ugly, we've done this via a > separate standalone wincompat layer, so that we don't pollute our pretty *nix > utility. > > * compat: udp_tunnel: force cast sk_data_ready > > This is a hack to work around broken Android kernel wrapper scripts. > > * wg-quick: freebsd: workaround SIOCGIFSTATUS race in FreeBSD kernel > > FreeBSD had a number of kernel race conditions, some of which we can vaguely > work around. These are in the process of being fixed upstream, but probably > people won't update for a while. > > * wg-quick: make darwin and freebsd path search strict like linux > > Correctness. > > * socket: set ignore_df=1 on xmit > > This was intended from early on but didn't work on IPv6 without the ignore_df > flag. It allows sending fragments over IPv6. > > * qemu: use newer iproute2 and kernel > * qemu: build iproute2 with libmnl support > * qemu: do not check for alignment with ubsan > > The QEMU build system has been improved to compile newer versions. Linking > against libmnl gives us better error messages. As well, enabling the alignment > check on x86 UBSAN isn't realistic. > > * wg-quick: look up existing routes properly > * wg-quick: specify protocol to ip(8), because of inconsistencies > > The route inclusion check was wrong prior, and Linux 5.1 made it break > entirely. This makes a better invocation of `ip route show match`. > > * netlink: use new strict length types in policy for 5.2 > * kbuild: account for recent upstream changes > * zinc: arm64: use cpu_get_elf_hwcap accessor for 5.2 > > The usual churn of changes required for the upcoming 5.2. > > * timers: add jitter on ack failure reinitiation > > Correctness tweak in the timer system. > > * blake2s,chacha: latency tweak > * blake2s: shorten ssse3 loop > > In every odd-numbered round, instead of operating over the state > x00 x01 x02 x03 > x05 x06 x07 x04 > x10 x11 x08 x09 > x15 x12 x13 x14 > we operate over the rotated state > x03 x00 x01 x02 > x04 x05 x06 x07 > x09 x10 x11 x08 > x14 x15 x12 x13 > The advantage here is that this requires no changes to the 'x04 x05 x06 x07' > row, which is in the critical path. This results in a noticeable latency > improvement of roughly R cycles, for R diagonal rounds in the primitive. As > well, the blake2s AVX implementation is now SSSE3 and considerably shorter. > > * tools: allow setting WG_ENDPOINT_RESOLUTION_RETRIES > > System integrators can now specify things like > WG_ENDPOINT_RESOLUTION_RETRIES=infinity when building wg(8)-based init > scripts and services, or 0, or any other integer. > > Signed-off-by: Jason A. Donenfeld Patch applied to master; thx Hans > --- > package/network/services/wireguard/Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/package/network/services/wireguard/Makefile > b/package/network/services/wireguard/Makefile > index c04762b..e3471d0 100644 > --- a/package/network/services/wireguard/Makefile > +++ b/package/network/services/wireguard/Makefile > @@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk > > PKG_NAME:=wireguard > > -PKG_VERSION:=0.0.20190406 > +PKG_VERSION:=0.0.20190531 > PKG_RELEASE:=1 > > PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz > PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/ > -PKG_HASH:=2f06f3adf70b95e74a7736a22dcf6e9ef623b311a15b7d55b5474e57c3d0415b > +PKG_HASH:=8b0280322ec4c46fd1a786af4db0c4d0c600053542c4563582baac478e4127b1 > > PKG_LICENSE:=GPL-2.0 Apache-2.0 > PKG_LICENSE_FILES:=COPYING > -- > 2.21.0 > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [openwrt] Patch notification: 1 patch updated
Hello, The following patch (submitted by you) has been updated in Patchwork: * openwrt: [OpenWrt-Devel,18.06] openssl: update to 1.0.2s - http://patchwork.ozlabs.org/patch/1108496/ - for: OpenWrt development was: New now: Superseded This email is a notification only - you do not need to respond. Happy patchworking. -- This is an automated mail sent by the Patchwork system at patchwork.ozlabs.org. To stop receiving these notifications, edit your mail settings at: http://patchwork.ozlabs.org/mail/ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] [18.06] openssl: update to 1.0.2s
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- Highlights of this version: - Change default RSA, DSA and DH size to 2048 bit - Reject invalid EC point coordinates This avoids CVE-2019-9498 and CVE-2019-9499 in hostapd Signed-off-by: Eneas U de Queiroz --- Notes: Run-tested on mvebu/arm/WRT3200ACM & brcm47xx/mipsel/WRT610N, using openssl-util Change Log: v2: corrected typo in commit message diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 2902ce15c7..99f1b861b4 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.0.2 -PKG_BUGFIX:=r +PKG_BUGFIX:=s PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) PKG_RELEASE:=1 PKG_USE_MIPS16:=0 @@ -24,7 +24,7 @@ PKG_SOURCE_URL:= \ http://gd.tuwien.ac.at/infosys/security/openssl/source/ \ http://www.openssl.org/source/ \ http://www.openssl.org/source/old/$(PKG_BASE)/ -PKG_HASH:=ae51d08bba8a83958e894946f15303ff894d75c2b8bbd44a852b64e3fe11d0d6 +PKG_HASH:=cabd5c9492825ce5bd23f3c3aeed6a97f8142f606d893df216411f07d1abab96 PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE --- End Message --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [18.06] openssl: update to 1.0.2s
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- Highlits of this version: - Change default RSA, DSA and DH size to 2048 bit - Reject invalid EC point coordinates This avoids CVE-2019-9498 and CVE-2019-9499 in hostapd Signed-off-by: Eneas U de Queiroz --- Notes: Run-tested on mvebu/arm/WRT3200ACM & brcm47xx/mipsel/WRT610N, using openssl-util diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 2902ce15c7..99f1b861b4 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.0.2 -PKG_BUGFIX:=r +PKG_BUGFIX:=s PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) PKG_RELEASE:=1 PKG_USE_MIPS16:=0 @@ -24,7 +24,7 @@ PKG_SOURCE_URL:= \ http://gd.tuwien.ac.at/infosys/security/openssl/source/ \ http://www.openssl.org/source/ \ http://www.openssl.org/source/old/$(PKG_BASE)/ -PKG_HASH:=ae51d08bba8a83958e894946f15303ff894d75c2b8bbd44a852b64e3fe11d0d6 +PKG_HASH:=cabd5c9492825ce5bd23f3c3aeed6a97f8142f606d893df216411f07d1abab96 PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE --- End Message --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20190531
* tools: add wincompat layer to wg(8) Consistent with a lot of the Windows work we've been doing this last cycle, wg(8) now supports the WireGuard for Windows app by talking through a named pipe. You can compile this as `PLATFORM=windows make -C src/tools` with mingw. Because programming things for Windows is pretty ugly, we've done this via a separate standalone wincompat layer, so that we don't pollute our pretty *nix utility. * compat: udp_tunnel: force cast sk_data_ready This is a hack to work around broken Android kernel wrapper scripts. * wg-quick: freebsd: workaround SIOCGIFSTATUS race in FreeBSD kernel FreeBSD had a number of kernel race conditions, some of which we can vaguely work around. These are in the process of being fixed upstream, but probably people won't update for a while. * wg-quick: make darwin and freebsd path search strict like linux Correctness. * socket: set ignore_df=1 on xmit This was intended from early on but didn't work on IPv6 without the ignore_df flag. It allows sending fragments over IPv6. * qemu: use newer iproute2 and kernel * qemu: build iproute2 with libmnl support * qemu: do not check for alignment with ubsan The QEMU build system has been improved to compile newer versions. Linking against libmnl gives us better error messages. As well, enabling the alignment check on x86 UBSAN isn't realistic. * wg-quick: look up existing routes properly * wg-quick: specify protocol to ip(8), because of inconsistencies The route inclusion check was wrong prior, and Linux 5.1 made it break entirely. This makes a better invocation of `ip route show match`. * netlink: use new strict length types in policy for 5.2 * kbuild: account for recent upstream changes * zinc: arm64: use cpu_get_elf_hwcap accessor for 5.2 The usual churn of changes required for the upcoming 5.2. * timers: add jitter on ack failure reinitiation Correctness tweak in the timer system. * blake2s,chacha: latency tweak * blake2s: shorten ssse3 loop In every odd-numbered round, instead of operating over the state x00 x01 x02 x03 x05 x06 x07 x04 x10 x11 x08 x09 x15 x12 x13 x14 we operate over the rotated state x03 x00 x01 x02 x04 x05 x06 x07 x09 x10 x11 x08 x14 x15 x12 x13 The advantage here is that this requires no changes to the 'x04 x05 x06 x07' row, which is in the critical path. This results in a noticeable latency improvement of roughly R cycles, for R diagonal rounds in the primitive. As well, the blake2s AVX implementation is now SSSE3 and considerably shorter. * tools: allow setting WG_ENDPOINT_RESOLUTION_RETRIES System integrators can now specify things like WG_ENDPOINT_RESOLUTION_RETRIES=infinity when building wg(8)-based init scripts and services, or 0, or any other integer. Signed-off-by: Jason A. Donenfeld --- package/network/services/wireguard/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile index c04762b..e3471d0 100644 --- a/package/network/services/wireguard/Makefile +++ b/package/network/services/wireguard/Makefile @@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=wireguard -PKG_VERSION:=0.0.20190406 +PKG_VERSION:=0.0.20190531 PKG_RELEASE:=1 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/ -PKG_HASH:=2f06f3adf70b95e74a7736a22dcf6e9ef623b311a15b7d55b5474e57c3d0415b +PKG_HASH:=8b0280322ec4c46fd1a786af4db0c4d0c600053542c4563582baac478e4127b1 PKG_LICENSE:=GPL-2.0 Apache-2.0 PKG_LICENSE_FILES:=COPYING -- 2.21.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/4] ath79: add QCA955x SGMII link loss workaround
On Friday, May 31, 2019 4:44:50 PM CEST Chuanhong Guo wrote: > Hi! > > On Fri, May 31, 2019 at 9:34 PM Christian Lamparter > wrote: > > > > Not to be a party pooper. The ag71xx is well on its way to upstream. > > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/drivers/net/ethernet/atheros/ag71xx.c?id=d51b6ce441d356369387d20bc1de5f2edb0ab71e > > > > So sadly this all would need to be somehow upstreamed first and then > > backported again. *sight* :( > > > The upstream driver is pretty much broken on every SoCs with external > PHY/switch. Getting every ath79 SoC working with that driver is > already a headache. > > I think we should just keep maintaining our ag71xx driver until > someone having a pile of ath79 routers get that driver working. Well, look what happend to ar71xx then. The development on it is being defered in favor of the upstream ath79 dts. So what do you think will happen to the special out-of-tree ag71xx drivers now? Cheers, Christian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/4] ath79: add QCA955x SGMII link loss workaround
Hi! On Fri, May 31, 2019 at 9:34 PM Christian Lamparter wrote: > > Not to be a party pooper. The ag71xx is well on its way to upstream. > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/drivers/net/ethernet/atheros/ag71xx.c?id=d51b6ce441d356369387d20bc1de5f2edb0ab71e > > So sadly this all would need to be somehow upstreamed first and then > backported again. *sight* :( > The upstream driver is pretty much broken on every SoCs with external PHY/switch. Getting every ath79 SoC working with that driver is already a headache. I think we should just keep maintaining our ag71xx driver until someone having a pile of ath79 routers get that driver working. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Call for participation for BattleMesh V12 (8-14 July 2019, Paris)
Hello, The local organization team is proud to announce that this year's Battlemesh will be held near Paris, from 8 to 14 July! The event aims to bring together people from across the globe who are interested in community networks, including wireless mesh network technologies, fiber infrastructure, Do-It-Yourself Internet Access Providers, and more generally how to create and maintain a thriving community of people involved in building their own networks. We envision 7 days full of expert presentations, practical workshops, late-night hacking sessions, and fruitful discussions: whether you are a mesh networking enthusiast, community networking activist, protocol developer, or have an interest in networking in general, come and join us! More information about the event is available below or on the website: https://www.battlemesh.org/BattleMeshV12 Where = Le 6B, 6-10 quai de Seine, 93200 Saint-Denis, France (very close to Paris). GPS: geo:48.93835,2.34259 Map: https://www.openstreetmap.org/?mlat=48.93835=2.34259#map=18/48.93835/2.34259 Web: https://www.le6b.fr/ Travel directions: https://www.battlemesh.org/BattleMeshV12#Where What We will have organized talks, workshops and discussion panels on community networks and wireless mesh networks. There will also be more informal activities: cooperative hacking, self-organized projects, and (we hope) delightful conversations! A first draft of the schedule (handle with care!) is available here: https://www.battlemesh.org/BattleMeshV12#Talk_Schedule_and_Workshops How to register === The event itself is free of charge and open for all! However, it makes the organisation much easier if you tell us in advance that you plan to come. To register: https://www.battlemesh.org/BattleMeshV12#How_to_register Current list of participants: https://battlemesh.org/BattleMeshV12/Participants Accommodation package = For those of you who are looking for a convenient and low cost accommodation option in Paris: we negotiated a special group reservation for 24 people at an hostel. There are still a few beds left, register now before we run out! https://www.battlemesh.org/BattleMeshV12#Accommodation_package Call for participation == We invite participants to propose workshops, talks or panel discussions relating to network infrastructure in general, how it can be built and operated as a common, and how to sustain a community around networking. We welcome contributions that broadly address these questions from any of several perspectives: technical, organisational, economical, regulatory, juridical, political. Deadline: 10 May 2019, now extended to June 7th! To submit an event: https://www.battlemesh.org/BattleMeshV12#Call_for_participation Endorsements If your organization wants to support the event by spreading the word, you can endorse the event. For this, just write an article on your website / blog / social media, and send us an email with the link and your logo to: (v12) at (battlemesh) dot (org) See existing endorsements for a template: https://www.battlemesh.org/BattleMeshV12#Endorsements Contact === * Web: https://battlemesh.org/BattleMeshV12 * Contact email (preferred): v12 at battlemesh.org * Public mailing list: https://ml.ninux.org/mailman/listinfo/battlemesh * IRC: irc.freenode.net #battlemesh * Twitter: https://twitter.com/battlemesh/ * Mastodon: https://toot.aquilenet.fr/@battlemesh12 The Local Organization Team === Aube Baptiste Daniele Dash Vi and many other volunteers! signature.asc Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] ath79: Add support for ZBT-WD323
ZBT-WD323 is a dual-LTE router based on AR9344. The detailed specifications are: * AR9344 560MHz/450MHz/225MHz (CPU/DDR/AHN). * 128 MB RAM * 16MB of flash(SPI-NOR, 22MHz) * 1x 2.4GHz wifi (Atheros AR9340) * 3x 10/100Mbos Ethernet (AR8229) * 1x USB2.0 port * 2x miniPCIe-slots (USB2.0 only) * 2x SIM slots (standard size) * 4x LEDs (1 gpio controlled) * 1x reset button * 1x 10 pin terminal block (RS232, RS485, 4x GPIO) * 2x CP210x UART bridge controllers (used for RS232 and RS485) * 1x 2 pin 5mm industrial interface (input voltage 12V~36V) * 1x DC jack * 1x RTC (PCF8563) Tested: - Ethernet switch - Wifi - USB port - MiniPCIe-slots (+ SIM slots) - Sysupgrade - Reset button - RS232 Intallation and recovery: The board ships with OpenWRT, but sysupgrade does not work as a different firmware format than what is expected is generated. The easiest way to install (and recover) the router, is to use the web-interface provided by the bootloader (Breed). While the interface is in Chinese, it is easy to use. First, in order to access the interface, you need to hold down the reset button for around five seconds. Then, go to 192.168.1.1 in your browser. Click on the second item in the list on the left to access the recovery page. The second item on the next page is where you select the firmware. Select the menu item containing "Atheros SDK" and "16MB" in the dropdown close to the buttom, and click on the button at the bottom to start installation/recovery. Notes: * RS232 is available on /dev/ttyUSB0 and RS485 on /dev/ttyUSB1 Signed-off-by: Kristian Evensen --- v1->v2: * Added WLAN trigger to DTS (thanks Petr Štetiar). * Fixed typo in compatible string (ar9334->ar9344, thanks Petr Štetiar). * Removed a reundant alias (thanks Petr Štetiar). * Changed compatible-value for keys (Petr Štetiar). * Fixed LAN-port LEDs. I did not noticed that the LEDs did not work peroply when I submitted v1. --- .../ath79/base-files/etc/board.d/01_leds | 4 + .../ath79/base-files/etc/board.d/02_network | 1 + .../base-files/etc/board.d/03_gpio_switches | 6 + .../ath79/dts/ar9344_zbtlink_zbt-wd323.dts| 163 ++ target/linux/ath79/image/generic.mk | 9 + 5 files changed, 183 insertions(+) create mode 100644 target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 69e26a4773..a23f2e7c73 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -210,6 +210,10 @@ yuncore,a770) ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x10" ;; +zbtlink,zbt-wd323) + ucidef_set_led_switch "lan1" "LAN1" "zbt-wd323:orange:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "zbt-wd323:orange:lan2" "switch0" "0x08" + ;; esac board_config_flush diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index c2e994530d..200782812b 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -258,6 +258,7 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "5:lan" "1:wan" ;; + zbtlink,zbt-wd323|\ xiaomi,mi-router-4q) ucidef_set_interface_wan "eth0" ucidef_add_switch "switch0" \ diff --git a/target/linux/ath79/base-files/etc/board.d/03_gpio_switches b/target/linux/ath79/base-files/etc/board.d/03_gpio_switches index 6a51a79790..1c8a46df19 100755 --- a/target/linux/ath79/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ath79/base-files/etc/board.d/03_gpio_switches @@ -29,6 +29,12 @@ ubnt,nanostation-ac) ubnt,acb-isp) ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "11" ;; +zbtlink,zbt-wd323) + ucidef_add_gpio_switch "io0" "IO#0" "0" + ucidef_add_gpio_switch "io1" "IO#1" "1" + ucidef_add_gpio_switch "io2" "IO#2" "2" + ucidef_add_gpio_switch "io14" "IO#14" "14" + ;; esac board_config_flush diff --git a/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts new file mode 100644 index 00..6a7259a2fc --- /dev/null +++ b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts @@ -0,0 +1,163 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9344.dtsi" + +/ { + model = "ZBT WD323"; + compatible = "zbtlink,zbt-wd323", "qca,ar9344"; + + keys { + compatible = "gpio-keys"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = < 16 GPIO_ACTIVE_HIGH>; +
Re: [OpenWrt-Devel] [PATCH 2/4] ath79: add QCA955x SGMII link loss workaround
On Thursday, April 11, 2019 5:59:43 PM CEST David Bauer wrote: > This commit adds a workaround for the loss of the SGMII link observed on > the QCA955x generation of SoCs. The workaround originates part from the > U-Boot source code, part from the implementation from AVM found in the > GPL tarball for the AVM FRITZ!WLAN Repeater 450E. > > The bug results in a stuck SGMII link between the PHY device and the SoC > side. This has only been observed with the Atheros AR8033 PHY and most > likely all devices using such combination are affected. > > It is worked around by reading a hidden SGMII status register and > issuing a SGMII PHY reset until the link becomes useable again. > > Signed-off-by: David Bauer > --- Not to be a party pooper. The ag71xx is well on its way to upstream. https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/drivers/net/ethernet/atheros/ag71xx.c?id=d51b6ce441d356369387d20bc1de5f2edb0ab71e So sadly this all would need to be somehow upstreamed first and then backported again. *sight* :( > .../net/ethernet/atheros/ag71xx/ag71xx_main.c | 108 ++ > ...9-add-missing-QCA955x-GMAC-registers.patch | 91 +++ > ...9-add-missing-QCA955x-GMAC-registers.patch | 91 +++ > 3 files changed, 290 insertions(+) > create mode 100644 > target/linux/ath79/patches-4.14/0038-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch > create mode 100644 > target/linux/ath79/patches-4.19/0038-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch > > diff --git > a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c > b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c > index 8cff56a11a..a7565e6ffb 100644 > --- > a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c > +++ > b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c > @@ -559,6 +559,112 @@ static void ath79_set_pll(struct ag71xx *ag) > udelay(100); > } > > +static void ag71xx_bit_set(void __iomem *reg, u32 bit) > +{ > + u32 val; > + > + val = __raw_readl(reg) | bit; > + __raw_writel(val, reg); > + __raw_readl(reg); > +} > + > +static void ag71xx_bit_clear(void __iomem *reg, u32 bit) > +{ > + u32 val; > + > + val = __raw_readl(reg) & ~bit; > + __raw_writel(val, reg); > + __raw_readl(reg); > +} > + > +static void ag71xx_sgmii_init_qca955x(struct device_node *np) > +{ > + struct device_node *np_dev; > + void __iomem *gmac_base; > + u32 mr_an_status; > + u32 sgmii_status; > + u8 tries = 0; > + int err = 0; > + > + np = of_get_child_by_name(np, "gmac-config"); > + if (!np) > + return; > + > + np_dev = of_parse_phandle(np, "device", 0); > + if (!np_dev) > + goto out; > + > + gmac_base = of_iomap(np_dev, 0); > + if (!gmac_base) { > + pr_err("%pOF: can't map GMAC registers\n", np_dev); > + err = -ENOMEM; > + goto err_iomap; > + } > + > + mr_an_status = __raw_readl(gmac_base + QCA955X_GMAC_REG_MR_AN_STATUS); > + if (!(mr_an_status & QCA955X_MR_AN_STATUS_AN_ABILITY)) > + goto sgmii_out; > + > + /* SGMII reset sequence */ > + __raw_writel(QCA955X_SGMII_RESET_RX_CLK_N_RESET, > + gmac_base + QCA955X_GMAC_REG_SGMII_RESET); > + __raw_readl(gmac_base + QCA955X_GMAC_REG_SGMII_RESET); > + udelay(10); > + > + ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET, > +QCA955X_SGMII_RESET_HW_RX_125M_N); > + udelay(10); > + > + ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET, > +QCA955X_SGMII_RESET_RX_125M_N); > + udelay(10); > + > + ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET, > +QCA955X_SGMII_RESET_TX_125M_N); > + udelay(10); > + > + ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET, > +QCA955X_SGMII_RESET_RX_CLK_N); > + udelay(10); > + > + ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET, > +QCA955X_SGMII_RESET_TX_CLK_N); > + udelay(10); > + > + /* > + * The following is what QCA has to say about what happens here: > + * > + * Across resets SGMII link status goes to weird state. > + * If SGMII_DEBUG register reads other than 0x1f or 0x10, > + * we are for sure in a bad state. > + * > + * Issue a PHY reset in MR_AN_CONTROL to keep going. > + */ > + do { > + ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_MR_AN_CONTROL, > +QCA955X_MR_AN_CONTROL_PHY_RESET | > +QCA955X_MR_AN_CONTROL_AN_ENABLE); > + udelay(200); > + ag71xx_bit_clear(gmac_base + QCA955X_GMAC_REG_MR_AN_CONTROL, > + QCA955X_MR_AN_CONTROL_PHY_RESET); > + mdelay(300); > + sgmii_status =
Re: [OpenWrt-Devel] [PATCH] ath79: Add support for ZBT-WD323
Kristian Evensen [2019-05-20 20:07:32]: Hi, > +zbtlink,zbt-wd323) > + ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wifi" "phy0tpt" > + ;; > esac Please add this trigger to the DTS. > +#include "ar9344.dtsi" > + compatible = "zbtlink,zbt-wd323", "qca,ar9334"; Is it really ar9334 ? > + aliases { > + serial0 = > + }; Why do you need this alias? Does it work without it? ar9344 has ns16550a UART which doesn't need this alias. > + keys { > + compatible = "gpio-keys-polled"; Does it work for you with "gpio-keys" compatible? It's interrupt driven, so should be preferred. -- ynezz ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel