26008 Commits

Author SHA1 Message Date
Padmarao Begari
1621851495 spi: cadence_qspi: Fix OSPI DDR mode alignment issue
If the least significant bit of the address is set to one when
using the DDR protocol for data transfer then the results are
indeterminate for few flash devices. To fix this the least
significant bit of the address is set to zero.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250106095120.800753-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-02-05 16:22:55 +01:00
Marek Vasut
30a8c830e9 net: miiphybb: Update debug() print
Update the debug() print, use __func__ to always print matching
function name, and also print bus name in case there are multiple
busses.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-02-04 23:34:42 +01:00
Marek Vasut
b1001835f1 net: miiphybb: Convert ifdef DEBUG to debug()
Replace ifdeffery with plain debug() function call. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-02-04 23:34:37 +01:00
Marek Vasut
5392ad2fd9 remoteproc: renesas: Synchronize caches across cores
Explicitly flush icache on the CR52 core before jumping to the next
stage software to make sure it does not contain any invalid content.
Explicitly flash and invalidate dcache on the CA76 core both over the
trampoline buffer and over the CR52 firmware, and then trigger full
system synchronization, to make sure the data surely land in DRAM,
from where the CR52 can surely pick them up.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-02-04 23:32:00 +01:00
Tom Rini
bfaed6969c Merge patch series "mediatek: final preparation for OF_UPSTREAM support"
Christian Marangi <ansuelsmth@gmail.com> says:

This is the last batch of part to push actual support of
OF_UPSTREAM for the mediatek SoC.

The plan is to make the current downstream DTS on part with
upstream implementation so we can permit a gradual transition to
it while we don't cause any regression to any user.

This is to have the same node downstream and upstream.
Mediatek is working hard upstream to also push all the remaining
nodes.

All patch are the final changes after the pinctrl patch
merged previously.

All patch pass CI tests

Link: https://github.com/u-boot/u-boot/pull/731
Link: https://lore.kernel.org/r/20250127134046.26345-1-ansuelsmth@gmail.com
2025-02-04 11:57:36 -06:00
Christian Marangi
8b1ea8a4b9 pinctrl: mediatek: mt7981: rename reg-names to upstream linux format
Rename reg-names to upstream linux format. Upstream linux drop the
"_base". To make use of upstream DTSI, align to the upstream naming.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Weijie Gao <weijie.gao@mediatek.com>
2025-02-04 10:20:36 -06:00
Simon Glass
00ae9b2ac3 mmc: Allow controlling DM_MMC for VPL builds
VPL may want to use driver model for MMC even if TPL does not. Update
the rule in this driver to support that.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-02-03 16:00:42 -06:00
Hal Feng
b6d150b949 pinctrl: starfive: Correct driver declaration for starfive_gpio
Use the driver macros so that the driver appears in the
linker list.

Reported-by: Simon Glass <sjg@chromium.org>
Fixes: 732f01aabf53 ("pinctrl: starfive: Add StarFive JH7110 driver")
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
2025-02-03 11:33:04 +08:00
Weijie Gao
7f95b5d7e6 net: mediatek: fix coding style of AN8855 switch driver
This patch fixed the following coding style suggested by checkpatch.pl:
1. Use tab instead of space
2. Use BIT() instead of <<
3. Use mdelay for long time delay
4. Remove useless parenthesises

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-31 11:29:01 -06:00
Weijie Gao
ea02a07728 pinctrl: mediatek: update mt7981 pinctrl driver based on upstream kernel
Update mt7981 pinctrl driver based on upstream kernel

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-31 11:28:59 -06:00
Neil Armstrong
664a257777 scsi: do not fill the LUN in the second CDB byte
The SCSI specification originally required that the second
Command Data Byte contain the LUN value in its high-order bits,
but this field has been marked as reserved since the SCSI-3 spec
from 1996.

Some vendors uses this byte to pass vendor specific data,
and specifying the LUN can trigger strange behaviors.
For the record, this happened on an UFS device where LUN0 was
working perfectly and reading the other LUNs would get the last
buffer data that was read for LUN0, making this issue very very
hard to debug.

It's sane to assume U-Boot will probably never encounter
an SCSI-2 multi-LUN device, if somehow it happens the enquiry
command would need to get the SCSI level to handle this case.

The Linux fix was added in [1] to fix the exact same issue.

[1] https://lore.kernel.org/all/Pine.LNX.4.44L0.1409021108380.2308-100000@iolanthe.rowland.org/

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2025-01-31 11:28:55 -06:00
Tom Rini
a582e48533 STM32 MPU:
- Remove dt-bindings headers available in dts/upstream
 - Fixes for stm32prog
 - Enable CONFIG_SYS_64BIT_LBA for STM32MP15/13/25 defconfigs
 - Add upport of ck_usbo_48m in pre-reloc stage for STM32MP13
 - Clean env_get_location() for STM32MP1
 - Fix board_get_usable_ram_top() to fix infinite loop in cache
   management for STM32MP2.
 - Fix ck_flexgen_08 frequency for STM32MP2
 
 STM32 MCU:
 - Tune CYCLIC_MAX_CPU_TIME_US to avoid cyclic warning for STM32F469-Disco
 - Tune CYCLIC_MAX_CPU_TIME_US to avoid cyclic warning for STM32F769-Disco
 -----BEGIN PGP SIGNATURE-----
 
 iQJQBAABCgA6FiEEXyrViUccKBz9c35Jysd4L3sz/6YFAmecl/gcHHBhdHJpY2Uu
 Y2hvdGFyZEBmb3NzLnN0LmNvbQAKCRDKx3gvezP/pns8D/oCH3arsB5lw1Mb6iMV
 bP5J8gVUQzCSGlm45XHd0I0VDZoVuxfCvzTPSmQaAajix8B92brpIq+nA59pm6rD
 hu4pyuBt+KpE7amiqw+KCiGqucHcWHpWCf5kLBgkyejXjpaNWCR9Z660NNpT4Aop
 LFi0KEhMlU2VYacDBRnc6zquFaYXOkmdbifFy1df3Dq+bCttB7MzBYcu4tjqHhjQ
 V3Q3Sp0oLJr5nTLzTP0QIOMyUPKOT/Mc1YkYCDYYpLdko1y4msn6p90sCNB/HVos
 3GjwaGxH3inaz6pljASXrWIDyIl7OiGamKsijs/51Tnpp4DkG+yfwceji9MF+B7a
 bRrSB4vqZ1a4gNWOnOnVlFA0+LdMuvMEv0qH25HvVKOTTnrgxfc+M2ITs6MxPRyu
 7DiDiWxMeAovdYcMJEcwFuSOgelqOfVGO1sJF4VqoIaYzEpVW7qotq2fXwMgsO+z
 iwCiTT7wCLllV9+HAW0UF7zfzQSOyZ1AFBetCMy43UOJsK2v86D//vB2WObbGwZb
 vBIXtZ5+KwZDUrNvpGDrz+hKhfVMZFCEDzNvd79NX6VUICRgEk7Bwz/Rl+3QBS9Y
 LVn7q8GPGh7qVYWATj/7d8udCK/nsKb3YSwTGtvPCVjtv1RJSW1UKd9vUmgLAuJM
 Mva68ypnWwUOcSdEPwOstOJGXg==
 =sq48
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20250131' of https://source.denx.de/u-boot/custodians/u-boot-stm

STM32 MPU:
- Remove dt-bindings headers available in dts/upstream
- Fixes for stm32prog
- Enable CONFIG_SYS_64BIT_LBA for STM32MP15/13/25 defconfigs
- Add upport of ck_usbo_48m in pre-reloc stage for STM32MP13
- Clean env_get_location() for STM32MP1
- Fix board_get_usable_ram_top() to fix infinite loop in cache
  management for STM32MP2.
- Fix ck_flexgen_08 frequency for STM32MP2

STM32 MCU:
- Tune CYCLIC_MAX_CPU_TIME_US to avoid cyclic warning for STM32F469-Disco
- Tune CYCLIC_MAX_CPU_TIME_US to avoid cyclic warning for STM32F769-Disco
2025-01-31 08:32:11 -06:00
Patrice Chotard
eb04f32c9b fastboot: Fix warning when CONFIG_SYS_64BIT_LBA is enable
If CONFIG_SYS_64BIT_LBA is enable, following compilation warning is
triggered:

 CC      drivers/fastboot/fb_mmc.o
../drivers/fastboot/fb_mmc.c: In function 'fb_mmc_erase_mmc_hwpart':
../drivers/fastboot/fb_mmc.c:215:35: warning: format '%lu' expects
argument of type 'long unsigned int', but argument 2 has type
'long long unsigned int' [-Wformat=]
  215 |         printf("........ erased %lu bytes from mmc hwpart[%u]\n",
      |                                 ~~^
      |                                   |
      |                                   long unsigned int
      |                                 %llu
  216 |                dev_desc->lba * dev_desc->blksz, dev_desc->hwpart);
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              long long unsigned int
../drivers/fastboot/fb_mmc.c: In function 'fb_mmc_boot_ops':
../drivers/fastboot/fb_mmc.c:261:42: warning: format '%lu' expects
argument of type 'long unsigned int', but argument 2 has type
'long long unsigned int' [-Wformat=]
  261 |                 printf("........ wrote %lu bytes to EMMC_BOOT%d\n",
      |                                        ~~^
      |                                          |
      |                                          long unsigned int
      |                                        %llu
  262 |                        blkcnt * blksz, hwpart);
      |                        ~~~~~~~~~~~~~~
      |                               |
      |                               long long unsigned int

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-01-31 08:57:39 +01:00
Patrick Delaunay
2599223fa7 stm32: remove dt-binding headers that are available upstream
Some dt-binding headers mask the upstream ones which can lead to build
failures, or worse: super weird bugs, if they get out of sync.

Remove these headers so our devicetree and binding headers will both be
in sync with upstream.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-01-31 08:46:51 +01:00
Marek Vasut
487b254702 net: phy: Add RGMII RX/TX delay handling to DP83822 PHY
The TI DP83822 does have support for configurable RGMII RX/TX clock
shift, add support for parsing DT properties which describe the RX/TX
clock shift configuration and configuration of the matching bits in
RCSR register.

The shift is only configurable on DP83822, the other PHYs supported
by this PHY driver, namely DP83825/DP83826 variants, do not implement
this functionality and the RCSR bits used to configure the clock shift
are missing from those PHYs.

The shift is configurable separately for RX and TX path. Each path can
either enable the shift or disable the shift using single bit. In case
the shift is disabled, a delay of 0ns is added to the path, otherwise
a delay of 3.5ns is added to the path.

Note that the two RCSR bits 11 and 12 have inverted logic, RCSR bit 12
enables RX internal shift when SET, while RCSR bit 11 enables TX shift
when UNSET.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-30 19:28:33 -06:00
Tom Rini
ac3eeb1542 Merge patch series "Add support for MediaTek MT7987 SoC"
Weijie Gao <weijie.gao@mediatek.com> says:

This patch series add support for MediaTek MT7987 SoC with its reference
boards and related drivers.

This patch series add basic boot support on eMMC/SD/SPI-NOR/SPI-NAND for these
boards. The clock, pinctrl drivers and the SoC initializaton code are also
included.

Link: https://lore.kernel.org/r/cover.1737621362.git.weijie.gao@mediatek.com
2025-01-30 14:35:30 -06:00
Weijie Gao
e5d20906f7 mmc: mediatek: add support for MediaTek MT7987 SoCs
This patch adds eMMC/SD support for MT7987 SoC

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-30 14:35:14 -06:00
Weijie Gao
21fb382845 pinctrl: mediatek: add pinctrl driver for MT7987 SoC
This patch adds pinctrl and gpio support for MT7987 SoC

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-30 14:35:14 -06:00
Weijie Gao
ece4e5804f clk: mediatek: add clock driver support for MediaTek MT7987 SoC
This patch adds clock driver support for MediaTek MT7987 SoC

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-30 14:35:14 -06:00
Marek Vasut
25f19f4158 net: ravb: Staticize bb_miiphy functions
These functions can be static as they are referenced only in this file.
Make them static. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-01-29 22:52:23 +01:00
Marek Vasut
4cf712a3be net: miiphybb: configs: Drop CONFIG_BITBANGMII_MULTI
It seems that every remaining system which enables BITBANGMII also
enables BITBANGMII_MULTI . Remove the BITBANGMII_MULTI symbol and
assume it is always enabled. This allows removal of a bit of legacy
code. No functional change intended.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-01-29 22:52:23 +01:00
Tom Rini
021baf7b08 We have use cases where a previous stage boot loader doesn't have any
TPM drivers. Instead of extending the hardware PCRs it produces an
 EventLog that U-Boot later replays on the hardware.
 
 The only real example we have is TF-A, which produces the EventLog using
 hashing algorithms created at compile time. This creates a problem to the
 TPM since measurements need to extend all active PCR banks. Up to now
 we were exiting refusing the extend measurements.
 
 TPMs can be instructed to change their active PCR banks, as long as the
 device resets immediately after a reconfiguration. This PR is adding
 that functionality. U-Boot can now scan the currently active TPM PCR
 banks, the ones it was compiled to support and the ones present in an
 EventLog. It the reconfigures the TPM on the fly with the correct algorithms.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEgWII69YpahbL5iK5gS8AYozs+qIFAmeYhMUACgkQgS8AYozs
 +qIzfxAAv0vngk2MycOWsQY1Mch0799o+QPN+J4avl52duLSCmiFUpoXOQCiRZSG
 5SpjqygrWXOL6T0EUMVjv8qaGJTZY5uY296G8zt+Nboq08XRMb76kV3vl/9XQ9oh
 lsF44QcoSpWM+NCfQ00yWsmy1FQZg5soQMU1liW8qJH1yUuDZP7WGDG2N2Kng5ag
 MW38SWXVM8+RiA1UeuaQtVvH5BfL/kotsG4U2LZwp6k4eJttzbUQylF09K/h+4Qf
 8nIwl6TQ7j59DRA2r7WHVmxFpYf+BOzf7wnLbAKKP9/QlEEo8+K8GabrNqcm/dx+
 Bav6dzZUzAJ024ocvouanQmjJfj2WnqryfRNJrU3ggt2j6JXkjNW9xHXdBZoKRBj
 WNTXMUIxe1t+5jD9KXyAg/C7FE1EaJDZu0JfK0xeXHvnnYbL6eYHyRkZCA6MZ95O
 ZCvDXv9x7zhZkUj9VY5kFvmWbemjX33CHMToIafu7fZtsCe6oIrISzMW4T3/74pS
 y6142Ceoy7qxYCkBgTzt5UTj4pTS2ZYaiqZXUTftFtmaNt56lcFWqaTR7Fz1U8CV
 1K8I3wKs8Fs5P326Y9fJ/kHfhHFTaVVDxWIhxK5Mg+vAIPeNECDybYH4q0FzAf1K
 h9ni39KC629MpMB2drYmYCtrzGk4nSyAwha1vSS9twltFi4Rgmo=
 =jn1D
 -----END PGP SIGNATURE-----

Merge tag 'tpm-master-28012025' of https://source.denx.de/u-boot/custodians/u-boot-tpm

CI: https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/24375

We have use cases where a previous stage boot loader doesn't have any
TPM drivers. Instead of extending the hardware PCRs it produces an
EventLog that U-Boot later replays on the hardware.

The only real example we have is TF-A, which produces the EventLog using
hashing algorithms created at compile time. This creates a problem to the
TPM since measurements need to extend all active PCR banks. Up to now
we were exiting refusing the extend measurements.

TPMs can be instructed to change their active PCR banks, as long as the
device resets immediately after a reconfiguration. This PR is adding
that functionality. U-Boot can now scan the currently active TPM PCR
banks, the ones it was compiled to support and the ones present in an
EventLog. It the reconfigures the TPM on the fly with the correct algorithms.
2025-01-29 08:12:21 -06:00
Duje Mihanović
2d84e1519c serial: ns16550: Add Intel XScale support
Add compatible string for the Intel XScale variant of the 16550. Needed
to match upstream.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
2025-01-28 09:08:44 +01:00
Raymond Mao
afe26a74dd tcg2: decouple eventlog size from efi
Move default eventlog size from efi to tpm for using in both
efi and measured boot.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-01-28 08:59:23 +02:00
Santhosh Kumar K
5a42996c49 ram: k3-ddrss: Set SDRAM_IDX using device private data, ddr_ram_size
The SDRAM_IDX in DDRSS_V2A_CTL_REG describes the number of address bits
minus 16 that are used to determine the mask used to detect memory
rollover and prevent aliasing and false coherency issues.

Set SDRAM_IDX using the device private data, ddr_ram_size for K3 family
of SoCs.

Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2025-01-27 13:26:00 -06:00
Tom Rini
b39b3c9a43 Merge tag 'u-boot-imx-master-20250127' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/24366

- Refactor the imx pinctrl driver.
- Enable optional ENETREF clock on i.MX95
- Remove optional from tee-os entry on the i.MX8M u-boot devicetrees.
2025-01-27 12:46:48 -06:00
Marek Vasut
219b048820 net: fsl_enetc: Enable optional ENETREF clock on i.MX95
The ENETCv4 port DT nodes on i.MX95 may contain optional clock phandle
to IMX95_CLK_ENETREF "ref" clock. These "ref" clock must be enabled for
the ethernet to work. These "ref" clock are enabled after cold boot, but
when the system booted Linux and rebooted, those "ref" clock might have
been disabled in the process, which would make ethernet inoperable after
reboot. Make sure those "ref" clock are always correctly enabled.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-27 00:27:54 -03:00
Tom Rini
6121676720 Merge a patch series for mx313xx RTC drivers
This series of patches from Mark Tomlinson fixes two problems with the
mx313xx series of RTC devices.

Link: https://lore.kernel.org/r/20250120015941.1849667-1-mark.tomlinson@alliedtelesis.co.nz
2025-01-26 11:33:17 -06:00
Mark Tomlinson
0e4c345ecf drivers: rtc: max313xx: Ensure correct date is read after setting
When setting the time on the MAX31343, the time is not updated
for one second, and reading the time in this interval will give
the old time. Wait one second after writing so that the date
command will show the correct time when setting the clock.

Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Cc: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
2025-01-26 11:33:13 -06:00
Mark Tomlinson
d86da7e2bd drivers: rtc: max313xx: Fix setting years 2100-2199
An invalid calculation made setting years 2100-2199 impossible.

Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Cc: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
2025-01-26 11:33:13 -06:00
Marek Vasut
07358b7ac6 pinctrl: imx: Split MMIO accessors into pinctrl-imx-mmio.c
Split MMIO accessors into pinctrl-imx-mmio.c and build this
file only if Kconfig symbol PINCTRL_IMX_MMIO is selected.
Select PINCTRL_IMX_MMIO Kconfig symbol for all but pinctrl-imx8.c
driver, which does not use the MMIO accessors. This reduces the
amount of code compiled on platforms which do not use the code.

No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
90890e9086 pinctrl: imx: Fold imx_pinctrl_set_state_scu() from pinctrl-imx8.c
The only user of the SCU pinctrl code is pinctrl-imx8.c , fold
the entire pinctrl-scu.c code into pinctrl-imx8.c and remove the
matching Kconfig symbols and Makefile entries. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
fe40330471 pinctrl: imx: Split imx_pinctrl_set_state_scu() from imx_pinctrl_set_state_mmio()
Call imx_pinctrl_set_state_common() from imx_pinctrl_scu_conf_pins(),
rename imx_pinctrl_scu_conf_pins() to imx_pinctrl_set_state_scu().
Get rid of the unnecessary ifdeffery in pinctrl-imx.h in the process.
Remove all SCU support from pinctrl-imx.c imx_pinctrl_set_state_mmio()
which makes that function a pure MMIO pinctrl configuration accessor.
Update pinctrl-imx8.c to call imx_pinctrl_set_state_scu directly.

No functional change.

This patch is best viewed with git show -w due to indent change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
40c477c71c pinctrl: imx: Split imx_pinctrl_set_state() into common and mmio parts
Split imx_pinctrl_set_state() into imx_pinctrl_set_state_common() and
imx_pinctrl_set_state_mmio(). The former does the common configuration
parsing, the later does call imx_pinctrl_set_state_common() and then
does pin configuration using either SCU or MMIO accesses. The SCU part
is going to be moved out in follow up patches.

This is a preparatory patch for follow up pinctrl drivers which
do not use the MMIO accessors, but some other means, like SCU or
otherwise. Those will call the common imx_pinctrl_set_state_common()
function wrapped into some other imx_pinctrl_set_state_*() function,
in a way similar to imx_pinctrl_set_state_mmio() does so for MMIO
accesses.

Update all imx_pinctrl_set_state_mmio() call sites to call
imx_pinctrl_set_state_mmio() instead.

No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
ecd087dffe pinctrl: imx: Rename imx_pinctrl_remove() to imx_pinctrl_remove_mmio()
The current implementation of imx_pinctrl_remove() is specific
to the MMIO accessor implementation, rename the function to
imx_pinctrl_remove_mmio() to make this obvious. No functional
change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
7ddd6d3c21 pinctrl: imx: Split imx_pinctrl_probe() into common and mmio parts
Split imx_pinctrl_probe() into imx_pinctrl_probe_common() and
imx_pinctrl_probe_mmio(). The former does the common setup, the
later does the common setup and MMIO access configuration. The
common setup can be used as-is for SCU based systems, update
the pinctrl-imx8 to call only the common setup, update all the
other pinctrl drivers to call imx_pinctrl_probe_mmio().

No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
def8012d5b pinctrl: imx: Inline struct imx_pinctrl_soc_info access into probe
The probe function is identical across all the pinctrl drivers.
Inline the imx_pinctrl_soc_info access into imx_pinctrl_probe()
and drop all the duplicate probe functions. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
106cc434e0 pinctrl: imx: Drop .remove callback for SCU variant
The return callback for SCU variant of the pinctrl drivers does
nothing but returns 0. Remove the return callback from the SCU
driver itself, that has the same effect. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
a8f628040d pinctrl: imx: Rename imx_pinctrl_ops to match drivers
Rename the structure instances to match driver names, so they
can be easily looked up e.g. in objdump and readelf outputs.
No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
a27409be4d pinctrl: imx: Push imx_pinctrl_ops into drivers and staticize
Move imx_pinctrl_ops into drivers and staticize. This is preparatory
patch for follow up pinctrl drivers which will not use this variant
of imx_pinctrl_ops content. This should not change size, as most of
the deployments compiled in one pinctrl driver anyway. No functional
change.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25 09:06:32 -03:00
Marek Vasut
87f9f591be treewide: Replace Maximumm with Maximum in Kconfig symbol description
Replace Maximumm with Maximum in Kconfig symbol description, fix a typo.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Michal Simek <michal.simek@amd.com>
2025-01-24 14:15:05 -06:00
Tom Rini
f409054d6a Merge tag 'u-boot-socfpga-next-20250124' of https://source.denx.de/u-boot/custodians/u-boot-socfpga
1.  Bug fixed for doorbell in secure device manager mailbox driver
2.  Enhancement on SoCFPGA dwc_eth_xgmac driver
3.  Enhancement on DW MAC driver
4.  Improved the error message and status for SoC64 device FPGA
    configuration driver
5.  Updated existing watchdog in system manager to support new SM device
2025-01-23 22:40:25 -06:00
Boon Khai Ng
60d96038d7 fpga: intel_sdm_mb: add support for query SDM config error and status
Currently the FPGA reconfig status only return a single error status
which make the debugging of FPGA reconfiguration hard.

This patch is to expose the error status, major error code and
minor error code, for the FPGA reconfig to upper layer app.

Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-01-24 09:56:34 +08:00
Boon Khai Ng
1130ad4ee4 net: dwc_eth_xgmac_socfpga: Add support for distinct mac-mode and phy mode.
This patch adds support for configuring the ethernet MAC mode independently
from the PHY mode on our SoC FPGA board. Specifically, this is necessary
for a scenario where the ethernet controller MAC is connected to the
FPGA HVIO with a different GMII interface, and the FPGA output is routed
to the PHY using a RGMII interface.

To support this configuration, a mechanism is introduced to handle
separate MAC mode settings, ensuring that the MAC controller and PHY
can operate correctly with their respective interface modes.

If mac-mode is not defined, the MAC mode will default to the PHY mode,
ensuring compatibility and proper operation between the MAC and PHY.

Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-01-24 09:56:22 +08:00
Boon Khai Ng
d22da11742 net: dwc_eth_xgmac: Add device name for the error message.
Agilex5 having several ethernet instance, adding the device
name at the error message to differentiate between which
instance is having issue.

Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-01-24 09:56:12 +08:00
Boon Khai Ng
85dccc5e89 net: dwc_eth_xgmac_socfpga: Add support for rgmii-id mode.
An issue was identified where selecting the phy-mode as
rgmii-id in the device tree source (DTS) would cause the
`dwc_eth_xgmac_socfpga` driver to raise an unsupported phy mode error.

From the MAC controller's perspective, the rgmii and rgmii-id
phy modes are effectively identical. To address this, both
modes will now be configured to rgmii in the MAC controller.

This change ensures that the rgmii-id phy mode is properly
supported without error.

Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-01-24 09:56:03 +08:00
Rufus Segar
be54527df5 net: designware: socfpga: Add RGMII-ID support
This patch adds support for the "rgmii-id", "rgmii-rxid", and
"rgmii-txid" modes for the dwmac_socfpga driver.

Signed-off-by: Rufus Segar <rhs@riseup.net>
2025-01-24 09:55:54 +08:00
Tom Rini
1d81cb030e Merge patch series "MediaTek ethernet driver refactor and updates"
Weijie Gao <weijie.gao@mediatek.com> says:

This patch series will split the switch initialization code from mtk_eth
driver into their own files and then add new SoC and switch support.

Link: https://lore.kernel.org/r/cover.1736498083.git.weijie.gao@mediatek.com
2025-01-23 18:51:26 -06:00
Tom Rini
a9813506c4 Merge patch series "Add bitbang feature for npcm8xx and driver"
Michael Chang <zhang971090220@gmail.com> says:

I am resubmitting the patch titled "Add bitbang feature for npcm8xx
and driver" for review and inclusion in the upstream project.

Driver didn't support bitbang feature.
Add bb_miiphy_bus function for driver and open feature for npcm8xx

the log is as below:
-------------------------------------------------
U-Boot 2024.10-g30b9cdaf2df5-dirty (Jan 09 2025 - 00:57:37 +0000)

CPU-0: NPCM845 A1 @ Model: Nuvoton npcm845 Development Board (Device Tree)
DRAM:  1 GiB
RNG: NPCM RNG module bind OK
OTP: NPCM OTP module bind OK
AES: NPCM AES module bind OK
SHA: NPCM SHA module bind OK
I/TC: Reserved shared memory is enabled
I/TC: Dynamic shared memory is enabled
I/TC: Normal World virtualization support is disabled
I/TC: Asynchronous notifications are disabled
Core:  649 devices, 28 uclasses, devicetree: separate
WDT:   Not starting watchdog@901c
MMC:   sdhci@f0842000: 0
Loading Environment from SPIFlash... SF:
Detected w25q512jvq with page size 256 Bytes, erase size 64 KiB,
total 64 MiB
OK
In:    serial@0
Out:   serial@0
Err:   serial@0
Net:   eth0: eth@f0802000, eth1: eth@f0804000, eth3: eth@f0808000
Hit any key to stop autoboot:  0
U-Boot>
U-Boot>
U-Boot>setenv ipaddr 192.168.16.3
U-Boot>ping 192.168.16.12
eth@f0802000 Waiting for PHY auto negotiation to complete
......... TIMEOUT !
Could not initialize PHY eth@f0802000
eth@f0804000 Waiting for PHY auto negotiation to complete
......... TIMEOUT !
Could not initialize PHY eth@f0804000
Speed: 100, full duplex
Using eth@f0808000 device
host 192.168.16.12 is alive

Link: https://lore.kernel.org/r/20250117104540.1580343-1-zhang971090220@gmail.com
2025-01-23 18:51:26 -06:00
Michael Chang
6272fc8a2e net: designware: Add bitbang feature for designware driver.
Add bb_miiphy_bus function for designware bitbang feature.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Signed-off-by: Michael Chang <zhang971090220@gmail.com>
2025-01-23 18:51:26 -06:00