summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2024-12-31Merge patch series "Cumulative fixes and updates for MediaTek ethernet driver"Tom Rini
Weijie Gao <weijie.gao@mediatek.com> says: This patch series contains fixes and updates for mtk_eth driver. Link: https://lore.kernel.org/r/cover.1734406967.git.weijie.gao@mediatek.com
2024-12-31net: mediatek: fix usability with wget commandWeijie Gao
The wget command currently cannot work correctly with mtk_eth driver. This patch fixed this by increase DMA ring size and invalidate ring data after use. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: don't enable GDMA cpu bridge unconditionally for NETSYSv3Weijie Gao
Enable GDMA cpu bridge only when 10Gb interface is enabled for GMAC other than GMAC0, or when MT7988 internal switch is used. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: make sgmii/usxgmii optionalWeijie Gao
Not all platforms supports sgmii and/or usxgmii. So we add Kconfig options for these features and enable them only for supported platforms. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: add support for 10GBASE-RWeijie Gao
This patch adds support for 10GBASE-R interface mode Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: fix gmac2 usability for mt7629Weijie Gao
MT7629 need extra setting for gmac2 to work. So additional capability is added for mt7629 to handle this case. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: fix sgmii selection for mt7622Weijie Gao
Unlike other platforms, mt7622 has only one SGMII and it can be attached to either gmac1 or gmac2. So the register field of the sgmii selection differs from other platforms as newer platforms can control each sgmii individually. This patch adds a new capability for mt7622 to handle this case. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: correct register name of ethsys syscfg1Weijie Gao
The SYSCFG0 should be SYSCFG1 according to the programming guide. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: use correct register field for SGMII speed selectionWeijie Gao
The register field for SGMII speed selection is a 2-bit field with value 0 for 1Gbps and 1 for 2.5Gbps (2/3 are reserved). So it's necessary to set both bits instead of just setting/clearing only the lower bit. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31clk: mediatek: mt7629: fix parent clock of some top clock muxesWeijie Gao
According to the mt7629 programming guide, the CLK_TOP_F10M_REF_SEL shares the same parent selection with CLK_TOP_IRRX_SEL, while the present parent selection for CLK_TOP_F10M_REF_SEL is actually used for CLK_TOP_SGMII_REF_1_SEL. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31Merge tag 'v2025.01-rc6' into nextTom Rini
Prepare v2025.01-rc6
2024-12-30Merge patch series "Misc. PowerPC MPC83xx fixes/cleanups"Tom Rini
J. Neuschäfer <j.ne@posteo.net> says: This patchset contains a few small fixes/cleanups for the MPC83xx platform. Link: https://lore.kernel.org/r/20241220-mpc83xx-misc-v2-0-ff4c17ee5fa4@posteo.net
2024-12-30gpio: mpc8xxx: Preserve pre-init state of outputsJ. Neuschäfer
The mpc8xxx_gpio driver contains a workaround for certain chips where the previously written state of outputs cannot be read back from the GPIO data (GPDAT) register (MPC8572/MPC8536). This workaround consists of tracking the state of GPDAT in a "shadow register" (i.e. a software variable). The shadow register is initialized to zero. This results in a problem w.r.t. outputs that are configured to a high (1) state before U-Boot runs, but not touched by U-Boot itself: Due to the zero-initialization, these GPIOs end up being set to zero, the first time that any other output is set. To avoid such issues initialize the GPDAT shadow register to the value previously held by any outputs, if possible. On MPC8572/MPC8536 this should make no difference, i.e. the shadow register should be initialized to zero on these chips. This patch has been tested on a MPC8314E-based board. Reviewed-by: Sinan Akman <sinan@writeme.com> Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2024-12-30powerpc: mpc83xx: Fix timer value calculationJ. Neuschäfer
TBU and TBL are specified as two 32-bit registers that form a 64-bit value, but the calculation only shifted TBU by 16 bits. Fix this by actually shifting 32 bits. Reviewed-by: Sinan Akman <sinan@writeme.com> Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2024-12-30gpio: npcm: Add persist feature to sgpio moduleJim Liu
Base on GPIO hog to support sgpio persist enable feature. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2024-12-30mtd: spi-nor: Fix the spi_nor_read() when config SPI_STACKED_PARALLEL is enabledVenkatesh Yadav Abbarapu
Update the spi_nor_read() function based on the config SPI_FLASH_BAR and update the length and bank calculation by spliting the memory of 16MB size banks only when the address width is 3byte. Fix the read issue for 4byte address width by passing the entire length to the read function. Fixes: 5d40b3d384 ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2024-12-29net: rswitch: Implement C22 to C45 accessMarek Vasut
Add support for mapping C22 register access to C45-only PHYs. This is mainly useful for 'mii info' command, which performs C22 only access to determine PHY ID and link state and does not work well with this driver so far. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29net: rswitch: Add PHY C22 access supportMarek Vasut
Implement C22 PHY access support in addition to C45 PHY access support which is already present. This is used for PHYs which do not support C45 access or which are C22 only. The C22 access can be recognized when devad is set to -1 or 0xffffffff hex, which also matches MDIO_DEVAD_NONE macro. Test for this special devad value and if it is set this way, perform C22 access, otherwise perform C45 access. Based on work by LUU HOAI <hoai.luu.ub@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29net: rswitch: Fold MPSM C45 setting into rswitch_mii_access_c45()Marek Vasut
The Set Station Management Mode : Clause 45 setting of MFF bit in MPSM register can be done in rswitch_mii_access_c45() once, instead of this being done before each rswitch_mii_access_c45() call. Deduplicate the bit setting into rswitch_mii_access_c45(). No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29net: rswitch: Simplify code using clrsetbits_le32()Marek Vasut
Use clrsetbits_le32() to make this complicated construct simpler. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29net: rswitch: Fix up macro indentMarek Vasut
Update the macro indent, replace multiple spaces with tabs proper. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29net: rswitch: Replace enum rswitch_reg with plain macrosMarek Vasut
Replace enum rswitch_reg with plain #define REGISTER OFFSET macros. The enum rswitch_reg was not referenced anywhere, so there was no benefit of keeping it around. Include register block labels. Turn all register offsets into lowercase hex values. No functional change. Rename EATDQDC to EATDQDCR, GWTRC to GWTRCR, GWDCC to GWDCCR, FWPC0 to FWPC, FWPBFC to FWPBFCR, FWPBFCSDC to FWPBFCSDCR because there are both register names which used to be part of this enum and also macros with the same name, each used for slightly different purpose. Make sure there is no collission. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29remoteproc: renesas: Add Renesas R-Car Gen4 remote processor driverMarek Vasut
Add R-Car Gen4 APMU controller remoteproc driver capable of starting the Cortex-R52 cores in Renesas R8A779G0 V4H/V4M SoC. The APMU IP is in fact a power management unit capable of additional operations, but those are not used by U-Boot so far. This requires slight adjustment to the SPL entry point code, as that is being executed on the Cortex-R52 #0 and the Cortex-R52 #0 enters an endless loop once it starts the rest of the SPL on Cortex-A76 core. The endless loop now checks for content of APMU CRBARP registers and tests whether valid VLD_BARP and BAREN_VALID bits are set, if so, the Cortex-R52 core exits the endless loop and jumps to address started in CRBARP[31:18] register in ARM mode, which is a trampoline code to jump to the final entry point. The trampoline code is in place to avoid limitation of CRBARP[31:18] address field, which limits the core start address to memory addresses aligned to 0x40000 or 256 kiB . The trampoline is placed at 0x40000 aligned address and jumps to the final entry point, which can be at an address with arbitrary alignment at instruction granularity. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29ram: renesas: Add Renesas R-Car Gen4 DBSC5 driverMarek Vasut
Add Renesas R-Car Gen4 DBSC5 DRAM controller driver. This driver is currently capable of bringing LPDDR5 DRAM on Renesas R-Car V4H Whitehawk board. Further boards can be supported by supplying board specific DRAM configuration data via dbsc5_get_board_data(). Support for R-Car V4M is not implemented, however the driver is already mostly prepared to support this SoC. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29pinctrl: renesas: Convert to IS_ENABLED() macroMarek Vasut
Use the IS_ENABLED() macro to reduce amount of #ifdef use in the driver and improve code coverage. With IS_ENABLED() macro, the code is compiled and then optimized out, which prevents bitrot. In case no PFC table matches the SoC in use, do not probe the driver and instead exit with -ENODEV. This should never happen under normal conditions, because this would mean the driver DT compatible string match happened, but the list in probe() cannot match the model listed in match data associated with the compatible string on which the match did happen. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25Merge tag 'v2025.01-rc5' into nextTom Rini
Prepare v2025.01-rc5
2024-12-25pinctrl: renesas: Minimize R8A779H0 V4M PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN/CANFD - INTC/INTC-EX - MSIOF - PWM - SSI Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A779G0 V4H PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN/CANFD - DU - INTC-EX - MSIOF - PWM - SSI Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A779F0 S4 PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - INTC-EX - MSIOF Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A779A0 V3U PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - CAN/CANFD - DU - INTC-EX - MSIOF - PWM Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A77995 D3 PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN/CANFD - DU - MSIOF - PWM - SSI - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A77990 E3 PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN/CANFD - DU - INTC/INTC-EX - MSIOF - PWM - SSI - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A77980 V3H PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - CANFD - DU - INTC-EX - MSIOF - PWM - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A77970 V3M PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - CANFD - DU - INTC-EX - MSIOF - PWM - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A77965 M3-N PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN/CANFD - DU - INTC-EX - MSIOF - PWM - SSI - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A77960 M3-W and R8A77961 M3-W+ PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN/CANFD - DU - INTC-EX - MSIOF - PWM - SSI - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A77951 H3 PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN/CANFD - DU - INTC-EX - MSIOF - PWM - SSI - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A7794 E2 PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN - DU - INTC - MSIOF - PWM - SSI - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A7792 V2H PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - CAN - DU - INTC - MSIOF - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A7791 M2-W and R8A7793 M2-N PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN - DU - INTC - MSIOF - PWM - SSI - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Minimize R8A7790 H2 PFC tablesMarek Vasut
Reduce the PFC tables by ifdeffing out pinmux settings which are unlikely to be used by U-Boot. This helps reduce the size of the bootloader in the 10 kiB range. This includes conditional build of these PFC additions: - Audio - CAN - DU - INTC - MSIOF - PWM - SSI - VIN Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-25pinctrl: renesas: Add Kconfig symbol for conditional build of full PFC tablesMarek Vasut
By default the pin multiplexing tables used by U-Boot are reduced to keep the size of the bootloader low. This option allows build of full pin multiplexing tables the same way they are included in the Linux kernel. This includes pin multiplexing options for Audio, CAN, CANFD, DU, INTC, INTC-EX, MSIOF, PWM, SSI, for which there is no U-Boot driver. This option is disabled by default. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-24crypto: typo volatgeHeinrich Schuchardt
%s/volatge/voltage/g Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2024-12-23imx: Use per board ddrphy_trained_csrPeng Fan
Drop global ddrphy_trained_csr which maybe different with per board ddrphy_trained_csr. DDR TOOL generates ddrphy_trained_csr for each board, using the global ddrphy_trained_csr has risk that values may be not up to date. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-12-23net: fec_mxc: add DM_FLAG_ACTIVE_DMA flag for FEC network driverMeng Li
When FEC network card works as the prime one in u-boot, and is in active status, kernel might crash during booting up stage, especially working with grub. Because the DMA of FEC is still in active status, and copy data into memory if there is network data received. In this case, if kernel allocated a part of memory that has overlay with the memory used by DMA, kernel memory may be destroyed and cause kernel crashes. Because before kernel boots up really, u-boot dm_remove_devices_flags() can call the remove callback of FEC driver with DM_FLAG_ACTIVE_DMA flag. In fecmxc_remove(), phy power is disabled, so there is no data received. In this way, it makes sure that there is no DMA action, so that avoid kernel crashing occurs. Signed-off-by: Meng Li <Meng.Li@windriver.com>
2024-12-23drivers: misc: gsc: add support for prescaledTim Harvey
Add support for Gateworks System Controller pre-scaled ADC input. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-12-23drivers: misc: gsc: add support for fan controllerTim Harvey
Add support for Gateworks System Controller fan tach input. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-12-23spi: mxc_spi: use proper clock for SPI busTim Harvey
The mxc_get_clock function is around for compatibility with older drivers that are not clock aware. In this case asking for the clk for MXC_CSPI_CLK does not take into account there are multiple SPI busses on modern IMX SoC's and it will return the clock for the first bus which may not be used or configured. In the case you are not using the first bus you will not get the proper clock. Fix this by obtaining the clock rate from the bus clock. This resolves an invalid SPI clock frequency configuration for SPI2 on a board where SPI1 is not used. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-12-22net: rswitch: Do not register disabled ports as ethernet devicesMarek Vasut
In case an rswitch port is described as disabled in DT, do not register it as ethernet device in U-Boot. This way, such ports cannot be accessed from U-Boot command line. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-20net: rswitch: Add missing cache invalidate of TX descriptorMarek Vasut
TFTP transfers of large files, for example 128 MiB, can sporadically get stuck and the transfer slows down considerably. This happens because the TX DMA descriptor in DRAM becomes out of sync with the view of the TX DMA descriptor content from the CPU side, which is viewed through the CPU caches. In order to guarantee these two views are consistent, the cache over TX DMA descriptor that has possibly been written by the rswitch hardware must first be invalidated, only then can the descriptor be cleared and updated by the CPU, and finally the cache over that area must be flushed back into DRAM to make sure the rswitch hardware has consistent view of the updated descriptor content. The very first invalidation operation was missing, which led to sporadic corruption of the TX DMA descriptor. Fix it, add the missing invalidation operation. Reported-by: Enric Balletbo i Serra <eballetb@redhat.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Tested-by: Enric Balletbo i Serra <eballetb@redhat.com>