aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bmips
Commit message (Collapse)AuthorAgeFilesLines
* bmips: b43-sprom: fix build when SSB/BCMA disabledÁlvaro Fernández Rojas2023-04-101-16/+16
| | | | | | Fix build of B43 SPROM fallback when SSB or BCMA are disabled. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: allow disabling mdio-mux-bcm6368Álvaro Fernández Rojas2023-04-101-0/+10
| | | | | | This controller is only present on SoCs with B53 MMAP switch. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: switch to LED kernel modulesÁlvaro Fernández Rojas2023-04-093-13/+19
| | | | | | | Disable LED controllers from kernel config and switch to per device kernel modules. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add LED kernel modulesÁlvaro Fernández Rojas2023-04-091-0/+30
| | | | | | | Add BCM6328 and BCM6358 LED kernel modules. This allows selecting the LED controllers only for those devices using them. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add support for Sercomm SHG2500Álvaro Fernández Rojas2023-04-096-1/+776
| | | | | | | | Sercomm SHG2500 is a BCM63168 with 128M of RAM, 256M of NAND, an external BCM53124S switch for the LAN ports and internal/external Broadcom wifi. LEDs are connected to an external MSP430G2513 MCU controlled via SPI. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: use sercomm-pid scriptÁlvaro Fernández Rojas2023-04-092-21/+14
| | | | | | | Make use of sercomm-pid script for generating the Sercomm PID, which avoids having to add an array of hex bytes for every new Sercomm device. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: image: rename SERCOMM_VERSION to SERCOMM_FSVERÁlvaro Fernández Rojas2023-04-092-7/+7
| | | | | | | SERCOMM_VERSION is ambiguous and it should be more clear that it refers to the version used for the filesystem. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6362/bcm63268: enable HW RNGÁlvaro Fernández Rojas2023-03-312-0/+24
| | | | | | | This enables the HW Random Number Generator on the BCM6362 and BCM63268 SoCs, which is the same one used on BCM6368 SoC. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6348-enet: register emac driver from iudmaÁlvaro Fernández Rojas2023-03-291-2/+15
| | | | | | | | Register the ethernet driver from iudma, which avoids the attempt to probe the emac driver before iudma and its consequent deferral. The ethernet driver can't work without iudma anyway. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6348-enet: add PHY supportÁlvaro Fernández Rojas2023-03-292-0/+119
| | | | | | | We should ensure that the PHY is properly configured. This is specially needed in devices using the internal PHY for ethernet0. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add basic BCM6358 ethernet supportÁlvaro Fernández Rojas2023-03-286-0/+1732
| | | | | | | | The MDIO bus is supported but there are errors when trying to probe and configure the external BCM5325E switch through B53 DSA. Therefore, let's add basic ethernet (but working) support for now. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6368-enetsw: refactor probeÁlvaro Fernández Rojas2023-03-281-23/+29
| | | | | | | | | - Switch to devm functions where possible. - Fix probing when no resets provided. - Properly check pointers (IS_ERR_OR_NULL/PTR_ERR). - Add probe info. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6368-enetsw: remove unneeded variablesÁlvaro Fernández Rojas2023-03-281-35/+16
| | | | | | Change the code to use defines instead of variables. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6368-enetsw: harmonize dev variablesÁlvaro Fernández Rojas2023-03-281-76/+83
| | | | | | | | The current implementation of bcm6368-enetsw is a mess of dev, ndev and kdev variables, which have refer to different things depending on the function. This commit harmonizes it and resolves the issue. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: sercomm,h500-s: add Quantenna gpio switchÁlvaro Fernández Rojas2023-03-281-0/+16
| | | | | | | Sercomm H500-s has a Quantenna SoC for external wifi which can be activated or deactivated through GPIO #20. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: sercomm,h500-s: fix upgradeÁlvaro Fernández Rojas2023-03-251-3/+1
| | | | | | | | Sercomm H500-s devices don't need the JFFS2 cleanmarkers as opposed to the other bmips NAND devices. Fixes: 6df12200d903 ("bmips: add support for Sercomm H-500s") Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: sercomm,h500-s: add Quantenna network configÁlvaro Fernández Rojas2023-03-241-1/+4
| | | | | | Sercomm H500-s has an external Quantenna QT3740BC SoC connected by RGMII. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* kernel: add more dsa b53 pending patchesÁlvaro Fernández Rojas2023-03-243-145/+1
| | | | | | | | | | | | | | | | | These patches have now received a positive review upstream, so let's add them to pending patches. 776-net-dsa-b53-mmap-add-phy-ops.patch: This is mostly bmips/bcm63xx-specific to get external switches working without hanging the device when accessing certain registers. 777-net-dsa-b53-mdio-add-support-for-BCM53134: This adds support for BCM53134 switch on DSA B53, so any target using DSA B53 can benefit from it. Also fix sercomm-h500-s external switch IMP port phy-mode. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add support for Sercomm H-500sÁlvaro Fernández Rojas2023-03-228-1/+502
| | | | | | | | | | | | | Sercomm H-500s is a BCM63268 with 128M, internal and external (Quantenna) wifi and external BCM53134S switch. This device is already supported in bcm63xx target, so more information can be found in https://openwrt.org/toh/sercomm/h500-s. It's a perfect example of a device with internal and external switch coexistance since most devices only have ports on one of the switches but not both of them. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: drop unneded cpu labels from external switchesÁlvaro Fernández Rojas2023-03-222-2/+0
| | | | | | | | | These labels aren't needed and were accidentally added when adding external switches support for bmips. Fixes: 80a3ecc89489 ("bmips: add Huawei HG253s v2 support") Fixes: 61f3c3b1eebd ("bmips: dgnd3700v2: enable external BCM53125 switch") Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* kernel: add pending patches for bcm63268-timer-clocksÁlvaro Fernández Rojas2023-03-224-401/+0
| | | | | | | | | bcm63268-timer-clocks have been sent upstream with a positive review, so let's add them to pending v5.15. Also add devm_clk_hw_register_gate() patch from v5.17 to backports since it's needed for upstream bcm63268-timer-clocks patches. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: dts: nand: add missing address/size cellsÁlvaro Fernández Rojas2023-03-212-0/+6
| | | | | | | | | | | Fixes the following warnings for Netgear DGND3700v2 and Comtrend VR-3032u: [ 1.059540] 7 fixed-partitions partitions found on MTD device brcmnand.0 [ 1.066570] OF: Bad cell count for /ubus/nand@10000200/nandcs@0/partitions [ 1.073766] OF: Bad cell count for /ubus/nand@10000200/nandcs@0/partitions [ 1.081927] OF: Bad cell count for /ubus/nand@10000200/nandcs@0/partitions [ 1.089128] OF: Bad cell count for /ubus/nand@10000200/nandcs@0/partitions Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add Huawei HG253s v2 supportÁlvaro Fernández Rojas2023-03-214-0/+264
| | | | | | | | | | | | | Huawei HG253s v2 is a BCM6362 with 128M RAM, internal wifi and external BCM53124S switch. This device is already supported in bcm63xx target, so more information can be found in https://openwrt.org/toh/huawei/hg253s_v2. It's a perfect example of a device with internal and external switch coexistance since most devices only have ports on one of the switches but not both of them. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: dgnd3700v2: enable external BCM53125 switchÁlvaro Fernández Rojas2023-03-212-2/+56
| | | | | | | The Netgear DGND3700v2 has an external BCM53125 switch which can now be enabled as a DSA disjoint switch tree setup. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: disable B53 MMAP phy read/write opsÁlvaro Fernández Rojas2023-03-212-1/+47
| | | | | | | | | | Without this change, internal and external B53 switches couldn't coexist as reported in https://github.com/openwrt/openwrt/issues/10313. In order to fix this we need to force the B53 MMAP DSA switch driver to use bcm6368-mdio-mux for accessing the PHY registers instead of its own phy_read() and phy_write() functions. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: dts: fix switch compatible stringsÁlvaro Fernández Rojas2023-03-204-4/+4
| | | | | | Use the proper string for each SoC. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* kernel: add pending bmips patchesÁlvaro Fernández Rojas2023-03-207-246/+10
| | | | | | Add patches sent upstream for bmips and b53 and remove downstream ones. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: tweak Kconfig optionsÁlvaro Fernández Rojas2023-03-163-16/+49
| | | | | | Add patch to reduce and improve selected bmips kernel config options. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: irq-bcm6345-l1: register memory regionÁlvaro Fernández Rojas2023-03-161-0/+38
| | | | | | | Add new patch sent upstream for requesting the memory region in the bcm6345-l1 interrupt controller. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: update patches sent upstreamÁlvaro Fernández Rojas2023-03-162-20/+42
| | | | | | Update bmips patches with the latest version sent upstream Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: dts: fix warningsÁlvaro Fernández Rojas2023-03-097-2/+22
| | | | | | | | - Add missing interrupt-parent to ext_intc. - Add missing #address-cells and #size-cells to gpio_cntl. - Use proper gpio handle for gpios (ar-5315u). Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* Revert "bmips: add missing switch cpu label"Álvaro Fernández Rojas2023-03-055-5/+0
| | | | | | | | This reverts commit dc0de05e10a9c6e1ef66ca2934e8a0ff0d488943. As pointed out by @BKPepe and @arinc9 this was removed by 9df035b since it isn't needed. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add missing switch cpu labelÁlvaro Fernández Rojas2023-03-045-0/+5
| | | | Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: check for DMA error when refilling RxSieng-Piaw Liew2023-03-041-8/+20
| | | | | | | dma_mapping_error() should be called as dma_map_single() could fail and return error. Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
* bmips: fix Tx cleanup when NAPI poll budget is zeroSieng-Piaw Liew2023-03-041-4/+5
| | | | | | | | | | | | NAPI poll() function may be passed a budget value of zero, i.e. during netpoll, which isn't NAPI context. Therefore, napi_consume_skb() must be given budget value instead of !force to truly discern netpoll-like scenarios. https://lore.kernel.org/netdev/20220707141056.2644-1-liew.s.piaw@gmail.com/t/#m470f5c20225e76fb08c44d6cfa2f1b739ffaaea4 Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com> [improve code format] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add BQL supportSieng Piaw Liew2023-03-041-0/+8
| | | | | | Add Byte Queue Limits support to reduce/remove bufferbloat. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: batch process eth_type_trans() in rx pathSieng Piaw Liew2023-03-041-2/+3
| | | | | | Improve cache efficiency by running eth_type_trans() in its own loop. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: batch process rx pathSieng Piaw Liew2023-03-041-1/+5
| | | | | | | Use netif_receive_skb_list() to batch process rx skb. This improves cache efficiency. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: improve rx loopSieng Piaw Liew2023-03-041-2/+3
| | | | | | | | | Use existing rx processed count to track against budget, thereby making budget decrement operation redundant. rx_desc_count can be calculated outside the rx loop, making the loop a bit smaller. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: switch to napi_build_skb() to reuse skbuff_headsSieng Piaw Liew2023-03-041-2/+2
| | | | | | | | | | napi_build_skb() reuses NAPI skbuff_head cache in order to save some cycles on freeing/allocating skbuff_heads on every new rx or completed tx. Use napi_consume_skb() to feed the cache with skbuff_heads of completed tx so it's never empty. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: check NAPI context when refilling rx SKBSieng Piaw Liew2023-03-041-6/+10
| | | | | | | | | | | Check if we're in NAPI context when refilling rx. Normally we're almost always running in NAPI context. Dispatch to napi_alloc_frag() directly instead of relying on netdev_alloc_frag() which does the same but with the overhead of local_bh_disable/enable. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com> [improve code format] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: convert to build_skb()Sieng Piaw Liew2023-03-041-41/+61
| | | | | | | | | | | | | We can increase the efficiency of rx path by using buffers to receive packets then build SKBs around them just before passing into the network stack. In contrast, preallocating SKBs too early reduces CPU cache efficiency. Performance is slightly increased but the changes allow more potential optimizations. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com> [improve code format] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: use netdev_alloc_skb() for copybreakSieng Piaw Liew2023-03-041-1/+1
| | | | | | | | | | | bmips is using Broadcom B53 DSA driver which means the ethernet driver must compensate for 6 bytes tags from the internal switch. This means using NET_IP_ALIGN actually misaligns the skb, lowering performance significantly. Therefore napi_alloc_skb() which uses NET_IP_ALIGN is changed to netdev_alloc_skb(). Performance in iperf3 is increased from ~47Mbps to 52Mbps. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: loader-lzma: drop unused RAMSIZE parameterÁlvaro Fernández Rojas2023-03-021-3/+1
| | | | | | This parameter has never been used. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* treewide: remove label = "cpu" from DSA dt-bindingArınç ÜNAL2023-02-265-5/+0
| | | | | | | This is not used by the DSA dt-binding, so remove it from all devicetrees. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9cc115d8d6f73dd260de1609182f3645844d6907 Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
* treewide: replace wpad-basic-wolfssl defaultRosen Penev2023-02-041-2/+2
| | | | | | | The newly merged mbedtls backend is smaller and has fewer ABI related issues than the wolfSSL one. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic configAleksander Jan Bajkowski2022-10-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Endianness depends on CPU architecture. CONFIG_CPU_(BIG/LITTLE)_ENDIAN should be enabled on target or subtarget based on SoC architecture. Fixes warning: $ make kernel_oldconfig CONFIG_TARGET=subtarget ... .config:1008:warning: override: CPU_LITTLE_ENDIAN changes choice state .... Summary: - ARC - only the CONFIG_CPU_BIG_ENDIAN symbol is defined for this architeture. If it is disabled then the processor operates in LITTLE_ENDIAN mode (default), - ARM32 - CONFIG_CPU_LITTLE_ENDIAN symbol available since kernel 5.19. This option should be enabled after OpenWRT moves to kernel 6.x. After refreshing the kernel, the symbol disappears, - ARM64 - enabled CONFIG_CPU_LITTLE_ENDIAN, - MIPS - enabled relevant symbols, - POWERPC - enabled CONFIG_CPU_BIG_ENDIAN, - UML - Symbols are not defined for this architecture, - X86 - always little endian. Symbols are not defined for this architecture. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* kernel: bump 5.15 to 5.15.67John Audia2022-09-091-1/+1
| | | | | | | | | | All patches automatically rebased Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: Activate CONFIG_GPIOLIB in generic configurationHauke Mehrtens2022-08-101-1/+0
| | | | | | | | All targets expect the malta target already activate the CONFIG_GPIOLIB option. Move it to generic kernel configuration and also activate it for malta. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]Tomasz Maciej Nowak2022-06-241-0/+2
| | | | | | | | | | | | This is now built-in, enable so it won't propagate on target configs. Link: https://lkml.org/lkml/2022/1/3/168 Fixes: 79e7a2552e89 ("kernel: bump 5.15 to 5.15.44") Fixes: 0ca93670693b ("kernel: bump 5.10 to 5.10.119") Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (Link to Kernel's commit taht made it built-in, CRYPTO_LIB_BLAKE2S[_ARM|_X86] as it's selectable, 5.10 backport) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>