aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek
Commit message (Collapse)AuthorAgeFilesLines
* realtek: backport GPIO IRQ index fixSander Vanheule2021-11-011-0/+21
| | | | | | | | Backport the patch queued upstream for 5.16. The patch differs slightly from the upstream patch due to an upstream change that added a convenience function. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* kernel: bump 5.10 to 5.10.76Rui Salvaterra2021-10-304-6/+6
| | | | | | | | | | | | | | | | Deleted (upstreamed): bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch [1] Manually rebased: bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch Note: although automatically rebaseable, the last patch has been edited to avoid conflicting bit definitions. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=b6f32897af190d4716412e156ee0abcc16e4f1e5 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* realtek: re-enable IPv6 routingBjørn Mork2021-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Commit 03e1d93e0779 ("realtek: add driver support for routing offload") added routing offload for IPv4, but broke IPv6 routing completely. The routing table is empty and cannot be updated: root@gs1900-10hp:~# ip -6 route root@gs1900-10hp:~# ip -6 route add unreachable default RTNETLINK answers: Invalid argument As a side effect, this breaks opkg on IPv4 only systems too, since uclient-fetch fails when there are no IPv6 routes: root@gs1900-10hp:~# uclient-fetch http://192.168.99.1 Downloading 'http://192.168.99.1' Failed to send request: Operation not permitted Fix by returning NOTIFY_DONE when offloading is unsupported, falling back to default behaviour. Fixes: 03e1d93e0779 ("realtek: add driver support for routing offload") Signed-off-by: Bjørn Mork <bjorn@mork.no>
* realtek: fix ZyXEL initramfs image generationBjørn Mork2021-10-301-2/+2
| | | | | | | | | | | | | | | | The current rule produces empty trailers, causing the OEM firmware update application to reject our images. The double expansion of a makefile variable does not work inside shell code. The second round is interpreted as a shell expansion, attempting to run the command ZYXEL_VERS instead of expanding the $(ZYXEL_VERS) makefile variable. Fix by removing one level of variable indirection. Fixes: c6c8d597e183 ("realtek: Add generic zyxel_gs1900 image definition") Tested-by: Sander Vanheule <sander@svanheule.net> Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: bump 5.10 to 5.10.75Rui Salvaterra2021-10-211-1/+1
| | | | | | | | | Deleted (upstreamed): bcm27xx/patches-5.10/950-0735-xhci-guard-accesses-to-ep_state-in-xhci_endpoint_res.patch [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=dc3e0a20dbb9dbaa22f4a33dea34230f8c663c40 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.10 to 5.10.74Rui Salvaterra2021-10-211-1/+1
| | | | | | Patches automatically refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.4 to 5.4.155John Audia2021-10-211-1/+1
| | | | | | All patches automatically rebased. Signed-off-by: John Audia <graysky@archlinux.us>
* kernel: bump 5.4 to 5.4.154John Audia2021-10-211-1/+1
| | | | | | All patches automatically rebased. Signed-off-by: John Audia <graysky@archlinux.us>
* realtek: switch to kernel 5.10Adrian Schmutzler2021-10-201-2/+1
| | | | | | | The usual testers did their tests. Now we need testers who use the master builds. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 5.10 to 5.10.72John Audia2021-10-103-7/+7
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B Run-tested: bcm2711/RPi4B Signed-off-by: John Audia <graysky@archlinux.us>
* realtek: add legacy realtek GPIO driver for rtl9300 supportBirger Koblitz2021-10-094-0/+507
| | | | | | | The otto GPIO driver does not work with rtl9300 SoCs. Add the legacy driver again and use that by default in the 9300 .dtsi Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: enable Aquantia PHY supportBirger Koblitz2021-10-091-0/+1
| | | | | | Enables Aquantia PHY support in the kernel Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Fix bug when accessing external PHYs on SoCs older than Revision CBirger Koblitz2021-10-091-3/+22
| | | | | | | | | | RTL8393 SoCs older than Revision C hang on accesses to PHYs with PHY address larger or equal to the CPU-port (52). This will make scanning the MDIO bus hang forever. Since the RTL8390 platform does not support more than 52 PHYs, return -EIO for phy addresses >= 52. Note that the RTL8390 family of SoCs has a fixed mapping between port number and PHY-address. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: cleanup PHY driverBirger Koblitz2021-10-091-8/+6
| | | | | | Removes unnecessary output from the RTL PHY drivers. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add debugfs support for RTL9300Birger Koblitz2021-10-092-1/+130
| | | | | | Adds support for debugfs on RTL9300, in particular the drop counters. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add SoC-specific routing offload implementationBirger Koblitz2021-10-094-165/+938
| | | | | | | | Adds SoC specific routing offload implementations for RTL8380/90 and RTL9300. RTL83xx supports merely nexthop routing, RTL9300 full host and prefix routes. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: add driver support for routing offloadBirger Koblitz2021-10-092-20/+946
| | | | | | | | Add generic support for listening to FIB and Event notifier updates and use this information to hook into the L3 hardware capabilities of the RTL SoCs. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Improve MDIO bus probing for RTL9300Birger Koblitz2021-10-091-21/+11
| | | | | | | Improve handling of multi-gig ports on the RTL9300 when probing the MDIO bus. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Fix bug in VLAN ingress and egress filteringBirger Koblitz2021-10-091-4/+4
| | | | | | | | | | | The ingress filter registers use 2 bits for each port to define the filtering state, whereas the egress filter uses 1 bit. So for for the ingress filter the register offset for a given port is: (port >> 4) << 4: since there are 16 entries in a register of 32 bits and for the egress filter: (port >> 5) << 4: since there are 32 entries in a register of 32 bits Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Configure initial L2 learning setupBirger Koblitz2021-10-095-1/+63
| | | | | | | | Configure a sane L2 learning configuration upon DSA driver load so that the switch can start learning L2 addresses. Also configure the correct flood masks for broadcast and unknown unicast traffice. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add phylink configuration routines for RTL93xxBirger Koblitz2021-10-093-20/+260
| | | | | | | | This adds RTL93xx-specific MAC configuration routines that allow also configuration of 10GBit links for phylink. There is support for the Realtek-specific HISGMI protocol. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Packet Inspection Engine support for RTL930x SoCsBirger Koblitz2021-10-091-0/+678
| | | | | | Adds the RTL930x-specific PIE support routines. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Packet Inspection Engine support for RTL839x SoCsBirger Koblitz2021-10-091-0/+875
| | | | | | Adds the RTL839x-specific PIE support routines. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Packet Inspection Engine support for RTL838x SoCsBirger Koblitz2021-10-091-0/+1007
| | | | | | Adds the RTL838x-specific PIE support routines. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add driver support for TC offloadingBirger Koblitz2021-10-098-3/+730
| | | | | | | | This adds support for offloading TC flower by using the Packet Inspection Engine of the RTL-SoCs. Basic infrastructure support is provide with callbacks to the tc subsystem and support for HW packet counters. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add port to smi-bus address mappingBirger Koblitz2021-10-091-32/+69
| | | | | | | | All RTL SoCs addresss PHYs via their port number, which is mapped to an SMI address. Add support for configuring this mapping via the .dts on all SoCs apart from the 839x, where the mapping to the 64 ports is fixed. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Increase maximum RX ring buffer lengthBirger Koblitz2021-10-091-4/+5
| | | | | | | Increase the maximum ring buffer length in order to improve performance on RTL839x devices. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Improve TX CPU-Tag usageBirger Koblitz2021-10-091-20/+29
| | | | | | | | | On RTL83xx enable learning of the MAC source address of the CPU port from outgoing packets. Add documentation on bit fields. On RTL93xx enable port-mask usage and the use of internal priority, these SoCs automatically learn the MAC. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Remove storm control and attack warningsBirger Koblitz2021-10-091-25/+0
| | | | | | | | Remove the storm control and attack warnings from the IRQ handler of the Ethernet driver. There was no consequence to the detection and the kernel can also handle at least the attacks itself. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Correct TX ring size in ethernet driverBirger Koblitz2021-10-091-2/+1
| | | | | | | This enlarges the size of the TX ring buffer, which prevents warnings when the buffer runs out of space. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: ensure output drivers are enabled in RTL8231Paul Fertser2021-10-022-10/+14
| | | | | | | | | | | | | The bootloader can leave the GPIO expander in a state which doesn't have output drivers enabled so GPIOs will properly work for input but output operations will have no effect. To avoid disrupting the boot in case the bootloader left direction and data registers in an inconsistent state (e.g. pulling SoC's reset to 0) reconfigure everything as input. Reviewed-by: Sander Vanheule <sander@svanheule.net> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
* kernel: bump 5.10 to 5.10.70Rui Salvaterra2021-09-301-2/+2
| | | | | | | Deleted (upstreamed): bcm53xx/patches-5.10/181-Revert-USB-bcma-Add-a-check-for-devm_gpiod_get.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.10 to 5.10.69Rui Salvaterra2021-09-303-18/+0
| | | | | | Patches automatically refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* realtek: add Kernel 5.10 as testing versionINAGAKI Hiroshi2021-09-261-0/+1
| | | | | | | This patch adds "KERNEL_TESTING_PATCHVER:=5.10" to the Makefile in realtek target to allow using Kernel 5.10 for testing. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: enable uart1 on the devices with PoE support in 5.10INAGAKI Hiroshi2021-09-267-0/+28
| | | | | | | | | | | | | | | | On the devices with PoE support, the secondary UART (uart1) on the SoC is used to communicate between the SoC and controller. Enable the secondary UART on the following devices: - D-Link DGS-1210-10P - Netgear GS110TPP v1 - Netgear GS310TP v1 - ZyXEL GS1900-8HP v1/v2 - ZyXEL GS1900-10HP - ZyXEL GS1900-24HP v2 Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: use physical addresses in soc dtsi in 5.10INAGAKI Hiroshi2021-09-262-12/+12
| | | | | | Use physical addresses instead of virtual address in dts files. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: use gpio-keys instead of "-polled" if SoC GPIO is used in 5.10INAGAKI Hiroshi2021-09-262-4/+2
| | | | | | | | The new backported GPIO driver supports interrupt, so use gpio-keys instead of gpio-keys-polled for keys connected to the internal GPIO controller. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: update GPIO bindings in the dts files in dts-5.10INAGAKI Hiroshi2021-09-266-33/+29
| | | | | | | | | | | | | | | | | | | this patch includes the following changes: - adjust mapping for the new driver - GPIO 24 -> GPIO 0 - GPIO 47 -> GPIO 0 (+ disabling system LED) - disable pins in the invalid range (out of the range 0-31 of the new driver) - are these pins on the external RTL8231 (&gpio1)? - GPIO 67 (-> GPIO 3 on &gpio1?) - GPIO 94 (-> GPIO 30 on &gpio1?) - drop "indirect-access-bus-id" property from gpio0 node in device dts files Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: fix kernel panic in DSA driver for 5.10INAGAKI Hiroshi2021-09-261-2/+8
| | | | | | | | | | dsa_to_port function in 5.10 returns dsa_port from the port list in dsa_switch_tree, but the tree is built when the switch is registered by dsa_register_switch and it's null in rtl83xx_mdio_probe. So, we need to use dsa_to_port after the registration of the switch. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: add pinmux node of LED_GLB_CTRL to rtl838x.dtsi in dts-5.10INAGAKI Hiroshi2021-09-261-0/+16
| | | | | | | This patch adds a pinctrl-single pinmux node to allow disabling system LED and enabling GPIO 0 (old driver: GPIO 24). Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: fix compile errors in dsa driver for 5.10INAGAKI Hiroshi2021-09-262-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | this patch fixes the following errors when compiling: - dsa_switch_alloc is removed[1] - a parameter "enum dsa_tag_protocol mprot" is added to dsa_tag_protocol in dsa_switch_ops (include/net/dsa.h) - several paramters are added to "phylink_mac_link_up" in dsa_switch_ops (include/net/dsa.h) added: - int speed - int duplex - bool tx_pause - bool rx_pause - a parameter "struct switchdev_trans *trans" is added to port_vlan_filtering in dsa_switch_ops (include/net/dsa.h) [1]: https://lore.kernel.org/lkml/20191020031941.3805884-17-vivien.didelot@gmail.com/ Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: fix compile errors in rtl838x_eth.c for 5.10INAGAKI Hiroshi2021-09-261-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | this patch fixes the following errors when compiling: - "unsigned int txqueue" is added as an additional parameter of ndo_tx_timeout in net_device_ops (include/linux/netdevice.h) - "mac_link_state" in phylink_mac_ops (include/linux/phylink.h) is renamed to "mac_pcs_get_state" and changed the return value to void from int - several parameters are added to "mac_link_up" in phylink_mac_ops (include/linux/phylink.h) and the order of the parameters is changed added: - int speed - int duplex - bool tx_pause - bool rx_pause - a parameter "phy_interface_t *interface" is added to of_get_phy_mode (drivers/of/of_net.c) and returns the state instead of phy mode Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: add "soc" node to soc dtsi in dts-5.10INAGAKI Hiroshi2021-09-262-129/+147
| | | | | | Add a "soc" node as a simple-bus to rtl838x.dtsi and rtl930x.dtsi. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: update soc dtsi in 5.10 for backported driversINAGAKI Hiroshi2021-09-262-6/+41
| | | | | | | | | | | | | | | this patch updates SoC dtsi (rtl838x.dtsi, rtl930x.dtsi) for the following backported drivers: - gpio-realtek-otto (5.13) - spi-realtek-rtl (5.12) - irq-realtek-rtl (5.12) And, disable SoC GPIO node (gpio0) in rtl930x.dtsi in dts-5.10. Currently, the upstreamed driver doesn't support the GPIO controller on RTL930x SoC. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: cleanup and update soc dtsi in 5.10INAGAKI Hiroshi2021-09-262-28/+11
| | | | | | | | | | the following changes are included in this patch: - node is enabled by default, drop 'status = "okay"' - adjust order of "compatible" lines and "reg" lines - add a new blank line before fixed-link node in rtl830x.dtsi Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: copy dts directory for Kernel 5.10INAGAKI Hiroshi2021-09-2643-1/+1708
| | | | | | | | | | | | | This patch adds "dts-5.10" directory to use backported drivers. There are several specification changes in the new drivers, so there are some compatibility issues in using dts/dtsi files for 5.4. The old DTS files are moved to "dts-5.4", so their corresponding kernel version is obvious as well. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [change "dts" to "dts-5.4", adjust Makefile] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* realtek: refresh and update config-5.10INAGAKI Hiroshi2021-09-261-16/+15
| | | | | | | | | | This patch adjusts config-5.10 by running kernel_menuconfig. Note: - disable psb6970 phy driver (unused in realtek target?) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: refresh patches for Kernel 5.10INAGAKI Hiroshi2021-09-2610-51/+44
| | | | | | | This patch refresh all patches in patches-5.10/ to adjust for Kernel 5.10. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: remove unnecessary line from rtl838x/Platform in 5.10INAGAKI Hiroshi2021-09-261-1/+0
| | | | | | | | | The following line is already defined in arch/mips/Kbuild.platforms by 300-mips-add-rtl838x-platform.patch. platform-$(CONFIG_RTL838X) += rtl838x/ Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: drop fixup_bigphys_addr from ioremap.h in 5.10INAGAKI Hiroshi2021-09-261-5/+0
| | | | | | | A macro with the same name is provided in asm/pgtable.h in Kernel 5.10, use it and drop from ioremap.h. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>