platform/kernel/u-boot.git
13 months agovideo: tegra-dc: request timings from panel driver first
Svyatoslav Ryhel [Mon, 27 Mar 2023 08:11:43 +0000 (11:11 +0300)]
video: tegra-dc: request timings from panel driver first

Check if panel driver has display timings and get those.
If panel driver does not pass timing, try to find timing
under rgb node for backwards compatibility.

Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00
Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agovideo: tegra-dc: get clocks from device tree
Svyatoslav Ryhel [Mon, 27 Mar 2023 08:11:42 +0000 (11:11 +0300)]
video: tegra-dc: get clocks from device tree

DISP1 clock may use PLLP, PLLC and PLLD as parents.
Instead of hardcoding, lets pass clock and its
parent from device tree. Default parent is PLLP.

Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00
Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # HTC One X T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agovideo: move tegra dc driver into own folder
Svyatoslav Ryhel [Mon, 27 Mar 2023 08:11:41 +0000 (11:11 +0300)]
video: move tegra dc driver into own folder

Move tegra dc driver to tegra20 directory and also mention
T30 in description of the driver's config option.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
[agust: add commit description]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 months agotegra: lcd: video: integrate display driver for t30
Marcel Ziswiler [Mon, 27 Mar 2023 08:11:40 +0000 (11:11 +0300)]
tegra: lcd: video: integrate display driver for t30

On popular request make the display driver from T20 work on T30 as
well. Turned out to be quite straight forward. However a few notes
about some things encountered during porting: Of course the T30 device
tree was completely missing host1x as well as PWM support but it turns
out this can simply be copied from T20. The only trouble compiling the
Tegra video driver for T30 had to do with some hard-coded PWM pin
muxing for T20 which is quite ugly anyway. On T30 this gets handled by
a board specific complete pin muxing table. The older Chromium U-Boot
2011.06 which to my knowledge was the only prior attempt at enabling a
display driver for T30 for whatever reason got some clocking stuff
mixed up. Turns out at least for a single display controller T20 and
T30 can be clocked quite similar. Enjoy.

Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
Tested-by: Jonas Schwöbel <jonasschwoebel@yahoo.de> # Surface RT T30
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agosandbox: video: Fix building without SDL
Simon Glass [Fri, 17 Feb 2023 22:45:47 +0000 (15:45 -0700)]
sandbox: video: Fix building without SDL

This is currently broken. If SDL is not installed, SANDBOX_SDL becomes
false and build errors are generated, e.g.:

   test/dm/video.c:424: undefined reference to `sandbox_sdl_set_bpp'

Fix it by making the function return an error in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 months agoARM: renesas: Add R8A779G0 V4H White Hawk board code
Hai Pham [Tue, 28 Feb 2023 21:37:08 +0000 (22:37 +0100)]
ARM: renesas: Add R8A779G0 V4H White Hawk board code

Add board code for R8A779G0 V4H White Hawk board.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Synchronize configuration symbols which are now switched to Kconfig
        Mallocate gd->bd->bi_boot_params, i.e. drop the assignment
        Sort headers, use clrbits_le32(), use BIT macros where appropriate
        Use CONFIG_SYS_CLK_FREQ for counter frequency instead of custom macro]

13 months agoARM: renesas: Add R8A779G0 V4H Kconfig entry and PRR ID
Hai Pham [Tue, 28 Feb 2023 21:37:07 +0000 (22:37 +0100)]
ARM: renesas: Add R8A779G0 V4H Kconfig entry and PRR ID

Add Kconfig entry and PRR ID to support R8A779G0 V4H SoC.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Update commit message]

13 months agoARM: dts: renesas: Add R8A779G0 V4H White Hawk DTs
Tho Vu [Tue, 28 Feb 2023 21:37:06 +0000 (22:37 +0100)]
ARM: dts: renesas: Add R8A779G0 V4H White Hawk DTs

Add DTs for R8A779G0 V4H White Hawk CPU and BreakOut boards.

Based on Linux next 20230228 DTs up to
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tho Vu <tho.vu.wh@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Sync with Linux next 20230228, update commit message
        Rename DTs to match Linux, which has dash between white-hawk]

13 months agoARM: dts: renesas: Add R8A779G0 V4H DT extras
Hai Pham [Tue, 28 Feb 2023 21:37:05 +0000 (22:37 +0100)]
ARM: dts: renesas: Add R8A779G0 V4H DT extras

Add R8A779G0 V4H DT extras for U-Boot.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Update compatible string to match latest upstream]

13 months agoARM: dts: renesas: Add R8A779G0 V4H DT
Phong Hoang [Tue, 28 Feb 2023 21:37:04 +0000 (22:37 +0100)]
ARM: dts: renesas: Add R8A779G0 V4H DT

Add initial DT support for R8A779G0 (R-Car V4H). Based on Linux next
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Phong Hoang <phong.hoang.wz@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Sync with Linux next 20230228, update commit message]

13 months agopinctrl: renesas: Add R8A779G0 V4H PFC tables
Hai Pham [Tue, 28 Feb 2023 21:37:03 +0000 (22:37 +0100)]
pinctrl: renesas: Add R8A779G0 V4H PFC tables

Add pinctrl tables for R8A779G0 V4H SoC.

Based on Linux next 20230228 PFC tables tables up to
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: LUU HOAI <hoai.luu.ub@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Phong Hoang <phong.hoang.wz@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Sync with Linux next 20230228, sort sh_pfc_pinconf_set voltage args]

13 months agoclk: renesas: Add R8A779G0 V4H clock tables
Hai Pham [Tue, 28 Feb 2023 21:37:02 +0000 (22:37 +0100)]
clk: renesas: Add R8A779G0 V4H clock tables

Add clock tables for R8A779G0 V4H SoC from Linux next
commit 058f4df42121 ("Add linux-next specific files for 20230228")

There is an adjustment to the clock tables to make them easier suitable
for U-Boot, PLL2 is not treated as GEN4 PLL type PLL2_VAR, but rather a
plain PLL2. This should be sufficient until PLL2_VAR is implemented in
the clock core.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Sync with Linux next 20230228 . Update from CLK to CPG core driver
        Treat PLL2 as non-PLL2_VAR for now]

13 months agodt-bindings: clock: Add R8A779G0 V4H CPG Core Clock Definitions
Tho Vu [Tue, 28 Feb 2023 21:37:01 +0000 (22:37 +0100)]
dt-bindings: clock: Add R8A779G0 V4H CPG Core Clock Definitions

Add all Clock Pulse Generator Core Clock Outputs for the
Renesas R-Car V4H (R8A779G0) SoC from Linux next
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tho Vu <tho.vu.wh@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Update to linux next 20230228 state]

13 months agodt-bindings: power: Add R8A779G0 V4H SYSC power domain definitions
Tho Vu [Tue, 28 Feb 2023 21:37:00 +0000 (22:37 +0100)]
dt-bindings: power: Add R8A779G0 V4H SYSC power domain definitions

Add power domain indices for R-Car V4H (R8A779G0) from Linux next
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tho Vu <tho.vu.wh@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Update to linux next 20230228 state]

13 months agoARM: renesas: Add R8A779F0 S4 Spider board code
Hai Pham [Tue, 28 Feb 2023 21:34:46 +0000 (22:34 +0100)]
ARM: renesas: Add R8A779F0 S4 Spider board code

Add board code for R8A779F0 S4 Spider board.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Synchronize configuration symbols which are now switched to Kconfig
        Mallocate gd->bd->bi_boot_params, i.e. drop the assignment
Sort headers, use clrbits_le32(), use BIT macros where appropriate
Use CONFIG_SYS_CLK_FREQ for counter frequency instead of custom macro]

13 months agoARM: renesas: Add R8A779F0 S4 Kconfig entry and PRR ID
Hai Pham [Tue, 28 Feb 2023 21:34:45 +0000 (22:34 +0100)]
ARM: renesas: Add R8A779F0 S4 Kconfig entry and PRR ID

Add Kconfig entry and PRR ID to support R8A779F0 S4 SoC.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Update commit message]

13 months agoARM: dts: renesas: Add R8A779F0 S4 Spider DTs
Hai Pham [Tue, 28 Feb 2023 21:34:44 +0000 (22:34 +0100)]
ARM: dts: renesas: Add R8A779F0 S4 Spider DTs

Add DTs for R8A779F0 S4 Spider CPU boards and Breakout boards.

Based on Linux next 20230228 DTs up to
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Sync with Linux next 20230228, update commit message]

13 months agoARM: dts: renesas: Add R8A779F0 S4 DT extras
Hai Pham [Tue, 28 Feb 2023 21:34:43 +0000 (22:34 +0100)]
ARM: dts: renesas: Add R8A779F0 S4 DT extras

Add R8A779F0 S4 DT extras for U-Boot.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Update compatible string to match latest upstream]

13 months agoARM: dts: renesas: Add R8A779F0 S4 DT
Hai Pham [Tue, 28 Feb 2023 21:34:42 +0000 (22:34 +0100)]
ARM: dts: renesas: Add R8A779F0 S4 DT

Add initial DT for R8A779F0 S4 SoC. Based on Linux next
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Sync with Linux next 20230228, update commit message]

13 months agoARM: rmobile: Turn R-Car V3U into R-Car Gen4
Hai Pham [Tue, 28 Feb 2023 21:34:41 +0000 (22:34 +0100)]
ARM: rmobile: Turn R-Car V3U into R-Car Gen4

Despite the name, R-Car V3U is the first member of the R-Car Gen4
family [1]. Hence reflect this in related files, select appropriate
configuration options and split DT build into its own GEN4 entry.

[1] https://www.renesas.com/us/en/products/automotive-products/automotive-system-chips-socs/r-car-v3u-best-class-r-car-v3u-asil-d-system-chip-automated-driving

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Deduplicate DTC_FLAGS addition using RCAR_64 symbol
        Update commit message]

13 months agopinctrl: renesas: Add R8A779F0 S4 PFC tables
LUU HOAI [Tue, 28 Feb 2023 21:34:40 +0000 (22:34 +0100)]
pinctrl: renesas: Add R8A779F0 S4 PFC tables

Add pinctrl tables for R8A779F0 S4 SoC.

Based on Linux next 20230228 PFC tables tables up to
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: LUU HOAI <hoai.luu.ub@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Use RCAR_64 Kconfig, sync with Linux next 20230228]

13 months agoclk: renesas: Add R8A779F0 S4 clock tables
Hai Pham [Tue, 28 Feb 2023 21:34:39 +0000 (22:34 +0100)]
clk: renesas: Add R8A779F0 S4 clock tables

Add clock tables for R8A779F0 S4 SoC

Based on Linux commit 24aaff6a6ce4 ("clk: renesas: cpg-mssr: Add support
for R-Car S4-8") by Yoshihiro Shimoda and sync the tables up to Linux next
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Sync with Linux next 20230228 . Update from CLK to CPG core driver]

13 months agoclk: renesas: Update R-Car Gen3 driver Gen4 support
Marek Vasut [Tue, 28 Feb 2023 21:34:38 +0000 (22:34 +0100)]
clk: renesas: Update R-Car Gen3 driver Gen4 support

Update R-Car Gen4 support in Gen3 clock driver. This patch renames the
V3U clock parts to Gen4 and extends them by new PLL2, PLL3, PLL4, PLL6
as well as SDSRC clock which use undocumented bits so far, and RPCSRC
clock which uses its own more capable divider table. The Gen4 module
standby and reset tables are also updated.

This patch makes use of union to alias Gen3 and more extensive Gen4
PLL tables, as the driver cannot ever be instantiated on hardware
that would identify itself as both Gen3 and Gen4.

The V3U clock driver is updated to match Gen4 clock driver behavior,
it is augmented with a more extensive PLL table and a valid MODEMR
register offset.

This supersedes "clk: renesas: Introduce R-Car Gen4 CPG driver"
from Hai Pham as the R-Car Gen3 and Gen4 clock core drivers are
extremely similar. That implementation was in turn based on Linux
commit 470e3f0d0b15 ("clk: renesas: rcar-gen4: Introduce R-Car Gen4 CPG driver")
by Yoshihiro Shimoda .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
13 months agodt-bindings: clock: Add R8A779F0 S4 CPG Core Clock headers
Tho Vu [Tue, 28 Feb 2023 21:34:37 +0000 (22:34 +0100)]
dt-bindings: clock: Add R8A779F0 S4 CPG Core Clock headers

Add definitions for R8A779F0 S4 CPG Core Clock headers from Linux next
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tho Vu <tho.vu.wh@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Update to linux next 20230228 state]

13 months agodt-bindings: power: Add R8A779F0 S4 SYSC power domain definitions
Tho Vu [Tue, 28 Feb 2023 21:34:36 +0000 (22:34 +0100)]
dt-bindings: power: Add R8A779F0 S4 SYSC power domain definitions

Add power domain indices for R-Car S4 (R8A779F0) from Linux next
commit 058f4df42121 ("Add linux-next specific files for 20230228")

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tho Vu <tho.vu.wh@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Update to linux next 20230228 state]

13 months agospi: renesas: Make driver available on R-Car Gen4
Marek Vasut [Tue, 28 Feb 2023 21:28:30 +0000 (22:28 +0100)]
spi: renesas: Make driver available on R-Car Gen4

Use CONFIG_RCAR_64 to make the driver available on both
R-Car Gen3 and R-Car Gen4.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
13 months agoserial: sh: Add HSCIF support for R-Car SoC
Hai Pham [Tue, 28 Feb 2023 21:29:19 +0000 (22:29 +0100)]
serial: sh: Add HSCIF support for R-Car SoC

Provide the basic HSCIF support for R-Car SoC.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Fill in HSSRR offset for Gen2 and SCBRR calculation for Gen2 and Gen3]
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agoserial: sh: Add R-Car Gen4 support
Hai Pham [Tue, 28 Feb 2023 21:29:18 +0000 (22:29 +0100)]
serial: sh: Add R-Car Gen4 support

Add R-Car Gen4 family support. The basic function is as same as previous
R-Car Generation.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Swap RZ/A1 and Gen4 to keep the GenN sequence, use RCAR_64]

13 months agonet: ravb: Add R-Car Gen4 support
Hai Pham [Fri, 7 Apr 2023 15:12:17 +0000 (17:12 +0200)]
net: ravb: Add R-Car Gen4 support

Add support for R-Car Gen4 SoCs and a matching DT compatible.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Drop SoC specific compatible, use RCAR_64 Kconfig symbol, update commit message]

13 months agommc: renesas-sdhi: Add R-Car Gen4 support
Hai Pham [Tue, 28 Feb 2023 21:24:06 +0000 (22:24 +0100)]
mmc: renesas-sdhi: Add R-Car Gen4 support

Support R-Car Gen4 family. The default quirk is similar to previous
generation.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Use RCAR_64 Kconfig
13 months agommc: tmio: Replace ifdeffery with IS_ENABLED/CONFIG_IS_ENABLED macros
Marek Vasut [Tue, 28 Feb 2023 21:18:13 +0000 (22:18 +0100)]
mmc: tmio: Replace ifdeffery with IS_ENABLED/CONFIG_IS_ENABLED macros

Instead of #if and #ifdef, use IS_ENABLED and CONFIG_IS_ENABLED macros.
This improves build test coverage. The CONFIG_SPL_BUILD must remain an
ifdef, as CONFIG_SPL_STACK may not always be defined, e.g. in U-Boot
proper build. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
13 months agommc: tmio: Check 'addr' width before checking for 64bit limitation
Marek Vasut [Tue, 28 Feb 2023 21:18:12 +0000 (22:18 +0100)]
mmc: tmio: Check 'addr' width before checking for 64bit limitation

The 64bit limitation check is compiled and optimized out on 32bit
platforms, but generates a type width warning:

drivers/mmc/tmio-common.c: In function ‘tmio_sd_addr_is_dmaable’:
drivers/mmc/tmio-common.c:376:26: warning: right shift count >= width of type [-Wshift-count-overflow]
  376 |                 if (addr >> 32)
      |                          ^~

Fix the warning by checking the addr type width to see whether the
shift even makes sense in the first place. The width check is also
optimized out at compile time.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
13 months agoi2c: rcar_i2c: Add R-Car Gen4 support
Hai Pham [Tue, 28 Feb 2023 21:25:51 +0000 (22:25 +0100)]
i2c: rcar_i2c: Add R-Car Gen4 support

Add support for R-Car Gen4 SoCs into the driver.

While I2C on R-Car Gen4 does support some extra features (Slave Clock
Stretch Select), for now it is treated the same as I2C on R-Car Gen3,
which let us share the same driver.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Use RCAR_64 Kconfig
Reviewed-by: Heiko Schocher <hs@denx.de>
13 months agoMerge branch 'master_net/phy/prep-cleanup' of https://source.denx.de/u-boot/custodian...
Tom Rini [Fri, 7 Apr 2023 14:51:49 +0000 (10:51 -0400)]
Merge branch 'master_net/phy/prep-cleanup' of https://source.denx.de/u-boot/custodians/u-boot-sh

- PHY framework cleanups

13 months agoMerge branch '2023-04-06-assorted-updates'
Tom Rini [Fri, 7 Apr 2023 14:44:19 +0000 (10:44 -0400)]
Merge branch '2023-04-06-assorted-updates'

- Make use of the semi-formal "fallthrough" mechanism, update env tools
  to use /run for lockfile, add 2048 game (as a way to test console
  changes), update some CONFIG option logic in Kconfig, have lmb command
  show regions in use, remove some duplicate serial code, add
  __gnu_thumb1_case_si code and fix m68k custodian email address.

13 months agogpio: renesas: Add R-Car Gen4 support
Hai Pham [Tue, 28 Feb 2023 21:23:07 +0000 (22:23 +0100)]
gpio: renesas: Add R-Car Gen4 support

Add support for the GPIO controller block in the R-Car Gen4 family.

It has a General Input Enable Register (INEN), whose reset state is to
have all inputs disabled.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
13 months agoARM: rmobile: Add R-Car Generation 4 support
Hai Pham [Tue, 28 Feb 2023 21:22:03 +0000 (22:22 +0100)]
ARM: rmobile: Add R-Car Generation 4 support

This adds R-Car Generation 4 (Gen4) support as Renesas ARM64 SoC.

In this version, reusing R-Car Gen3 lowlevel initialize routine [1]
and R-Car Gen3 memory map tables [2] .

[1] arch/arm/mach-rmobile/lowlevel_init_gen3.S
[2] arch/arm/mach-rmobile/memmap-gen3.c

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: - Enable DTO support by default
        - Sort the Kconfig lists
- Select RCAR_64 Kconfig option to pull in all the shared
  Kconfig options with Gen3, and use where applicable to
  deduplicate entries.
- Fix reference [2] typo in commit message
- Drop config options moved to Kconfig, rename rest to CFG_
  accordingly to synchronize with upstream changes. Drop
  removed CONFIG_VERY_BIG_RAM.
        - Move board size limit to arch/Kconfig
- Move GICR_BASE to headers instead of common config]

13 months agophy: Add .set_mode and .set_speed callbacks
Marek Vasut [Sun, 19 Mar 2023 17:09:42 +0000 (18:09 +0100)]
phy: Add .set_mode and .set_speed callbacks

Add two new callbacks matching the Linux ones. The .set_mode is used to set
PHY mode and submode, where mode is either USB, Ethernet, and so on, while
submode is e.g. for Ethernet case RGMII, RMII, and so on. The .set_speed is
used to configure link speed into the PHY. Unlike the existing configure
callback, which is used to pass arbitrary custom information to the PHY,
these two callbacks are used to pass standardized set of information to
the PHY.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
13 months agophy: Fix kerneldoc alignment
Marek Vasut [Sun, 19 Mar 2023 17:09:41 +0000 (18:09 +0100)]
phy: Fix kerneldoc alignment

Insert missing space in front of asterisk to avoid checkpatch warning.
Replace 'beeing' with 'being' as well, to fix another checkpatch warning.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
13 months agophy: Add empty generic_phy_configure() implementation for PHY disabled case
Marek Vasut [Sun, 19 Mar 2023 17:09:40 +0000 (18:09 +0100)]
phy: Add empty generic_phy_configure() implementation for PHY disabled case

In case PHY is not enabled, the generic_phy_configure() implementation is
missing. Add an empty one so that the list of empty functions is complete.

Fixes: f8da8a82c57 ("generic-phy: add configure op")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
13 months agonet: phy: marvell10g: Adapt Marvell 10G PHY driver from Linux
Marek Vasut [Sun, 19 Mar 2023 17:08:10 +0000 (18:08 +0100)]
net: phy: marvell10g: Adapt Marvell 10G PHY driver from Linux

Pull Marvell 10G PHY driver from Linux 6.1.y as of commit
d6d29292640d3 ("net: phy: marvell10g: select host interface configuration")
and heavily adapt to match U-Boot PHY framework. Support for
hwmon is removed as is much other functionality which could
not be tested, this results in much simpler driver which can
only bring the PHY up and set MAC type.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
13 months agonet: phy: Add MDIO PCS 2.5G and 5G speed macros from Linux
Marek Vasut [Sun, 19 Mar 2023 17:08:09 +0000 (18:08 +0100)]
net: phy: Add MDIO PCS 2.5G and 5G speed macros from Linux

Add MDIO PCS 2.5G and 5G speed macros from Linux 5.1.y as of commit
7fd8afa8933a0 ("net: phy: Add generic support for 2.5GBaseT and 5GBaseT")
This is used by the upcoming Marvell 10G PHY driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
13 months agonet: phy: Add phy_read_mmd_poll_timeout() from Linux
Marek Vasut [Sun, 19 Mar 2023 17:08:08 +0000 (18:08 +0100)]
net: phy: Add phy_read_mmd_poll_timeout() from Linux

Add phy_read_mmd_poll_timeout() from Linux 5.7.y as of commit
bd971ff0b7392 ("net: phy: introduce phy_read_mmd_poll_timeout macro")
This is used by the upcoming Marvell 10G PHY driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
13 months agonet: phy: Add phy_modify_mmd() and phy_modify_mmd_changed() from Linux
Marek Vasut [Sun, 19 Mar 2023 17:08:07 +0000 (18:08 +0100)]
net: phy: Add phy_modify_mmd() and phy_modify_mmd_changed() from Linux

Add phy_modify_mmd()/phy_modify_mmd_changed() from Linux 5.1.y as of commit
b8554d4f7288f ("net: phy: add register modifying helpers returning 1 on change")
This is used by the upcoming Marvell 10G PHY driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
13 months agonet: phy: marvell: Import and use marvell_phy.h from Linux
Marek Vasut [Sun, 19 Mar 2023 17:08:06 +0000 (18:08 +0100)]
net: phy: marvell: Import and use marvell_phy.h from Linux

Import marvell_phy.h from Linux 5.14.y as of commit
a5de4be0aaaa6 ("net: phy: marvell10g: fix differentiation of 88X3310 from 88X3340")
and use it in marvell PHY driver instead of current ad-hoc macros.
Two of the PHY IDs are unknown to Linux, 88E1149S and 88E1680, for
those two, only sync the length of the hexadecimal number to 8 digits.

No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
13 months agonet: phy: Synchronize PHY interface modes with Linux
Marek Vasut [Tue, 21 Mar 2023 17:25:54 +0000 (18:25 +0100)]
net: phy: Synchronize PHY interface modes with Linux

Synchronize PHY interface modes with Linux next 6.2.y commit:
0194b64578e90 ("net: phy: improve phy_read_poll_timeout")

Retain LX2160A/LX2162A PHY modes as those are not yet supported
by the Linux kernel, but isolate those with ifdeffery.

Isolate NCSI which are also not supported by Linux kernel. Note
that the ifdeffery cannot be avoided with IS_ENABLED() here due
to compilation of the entire conditional, which would fail in
case NCSI symbols are not available.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
13 months agonet: mvpp2: Replace PHY_INTERFACE_MODE_SFI with 5GBASER/10GBASER/XAUI
Marek Vasut [Tue, 21 Mar 2023 17:25:53 +0000 (18:25 +0100)]
net: mvpp2: Replace PHY_INTERFACE_MODE_SFI with 5GBASER/10GBASER/XAUI

Replace PHY_INTERFACE_MODE_SFI with PHY_INTERFACE_MODE_5GBASER,
PHY_INTERFACE_MODE_10GBASER and PHY_INTERFACE_MODE_XAUI to match
Linux PHY interface modes.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
13 months agonet: mvpp2: Drop PHY_INTERFACE_MODE_SGMII_2500 support
Marek Vasut [Tue, 21 Mar 2023 17:25:52 +0000 (18:25 +0100)]
net: mvpp2: Drop PHY_INTERFACE_MODE_SGMII_2500 support

This mode does not seem to be well defined and used anywhere, remove support for it.
Based on discussion:
- 1000baseX does c37 AN of duplex+pause
- SGMII does AN of duplex+pause+speed, at lower speed bytes are repeated 10x/100x
- 2500baseX does not do AN, or does very different c73 AN
- SGMII 2500 behavior is unclear

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
13 months agonet: phy: Only call phy_init() on systems needing manual relocation
Marek Vasut [Sun, 19 Mar 2023 17:03:17 +0000 (18:03 +0100)]
net: phy: Only call phy_init() on systems needing manual relocation

The phy_init() is now used only to perform manual relocation of PHY
driver callbacks. Wrap it in ifdeffery and only call it on systems
which still require manual relocation, i.e. m68k .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: Re-inline phy_drv_reloc()
Marek Vasut [Sun, 19 Mar 2023 17:03:16 +0000 (18:03 +0100)]
net: phy: Re-inline phy_drv_reloc()

Wrap phy_drv_reloc() back into phy_init() to reduce ifdeffery,
since phy_drv_reloc() is now called only from one call site.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: Drop unused phy_register()
Marek Vasut [Sun, 19 Mar 2023 17:03:15 +0000 (18:03 +0100)]
net: phy: Drop unused phy_register()

This function is no longer used, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: Drop static phy_drivers list
Marek Vasut [Sun, 19 Mar 2023 17:03:14 +0000 (18:03 +0100)]
net: phy: Drop static phy_drivers list

The static phy_drivers list is superseded by linker list of struct phy_drivers
now that all drivers have been converted to the later. Drop the phy_drivers
list as well as list_head from struct phy_driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: gen10g: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:13 +0000 (18:03 +0100)]
net: phy: gen10g: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: genphy: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:12 +0000 (18:03 +0100)]
net: phy: genphy: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: xilinx-gmii2rgmii: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:11 +0000 (18:03 +0100)]
net: phy: xilinx-gmii2rgmii: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: ncsi: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:10 +0000 (18:03 +0100)]
net: phy: ncsi: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: fixed: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:09 +0000 (18:03 +0100)]
net: phy: fixed: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: mscc: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:08 +0000 (18:03 +0100)]
net: phy: mscc: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: intel-xway: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:07 +0000 (18:03 +0100)]
net: phy: intel-xway: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: xilinx: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:06 +0000 (18:03 +0100)]
net: phy: xilinx: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: vitesse: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:05 +0000 (18:03 +0100)]
net: phy: vitesse: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: ti: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:04 +0000 (18:03 +0100)]
net: phy: ti: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

This particular PHY driver is slightly more spread out across additional
source files. Since the phy_register() calls are no longer necessary, all
the registration calls across those source files is dropped. Furthermore,
the Makefile can now be updated to only compile generic TI PHY support if
matching Kconfig symbol is enabled and the ifdeffery in the generic TI PHY
driver can be dropped.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: teranetics: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:03 +0000 (18:03 +0100)]
net: phy: teranetics: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: smsc: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:02 +0000 (18:03 +0100)]
net: phy: smsc: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: realtek: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:01 +0000 (18:03 +0100)]
net: phy: realtek: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: nxp-tja11xx: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:03:00 +0000 (18:03 +0100)]
net: phy: nxp-tja11xx: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: nxp-c45-tja11xx: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:59 +0000 (18:02 +0100)]
net: phy: nxp-c45-tja11xx: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: natsemi: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:58 +0000 (18:02 +0100)]
net: phy: natsemi: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: meson-gxl: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:57 +0000 (18:02 +0100)]
net: phy: meson-gxl: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: ksz90x1: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:56 +0000 (18:02 +0100)]
net: phy: ksz90x1: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: ksz8xxx: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:55 +0000 (18:02 +0100)]
net: phy: ksz8xxx: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: marvell: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:54 +0000 (18:02 +0100)]
net: phy: marvell: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: lxt: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:53 +0000 (18:02 +0100)]
net: phy: lxt: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: et1011c: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:52 +0000 (18:02 +0100)]
net: phy: et1011c: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: mv88e61xx: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:51 +0000 (18:02 +0100)]
net: phy: mv88e61xx: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: davicom: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:50 +0000 (18:02 +0100)]
net: phy: davicom: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: cortina: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:49 +0000 (18:02 +0100)]
net: phy: cortina: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: ca_phy: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:48 +0000 (18:02 +0100)]
net: phy: ca_phy: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: broadcom: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:47 +0000 (18:02 +0100)]
net: phy: broadcom: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: b53: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:46 +0000 (18:02 +0100)]
net: phy: b53: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: atheros: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:45 +0000 (18:02 +0100)]
net: phy: atheros: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: aquantia: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:44 +0000 (18:02 +0100)]
net: phy: aquantia: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: adin: Convert to U_BOOT_PHY_DRIVER()
Marek Vasut [Sun, 19 Mar 2023 17:02:43 +0000 (18:02 +0100)]
net: phy: adin: Convert to U_BOOT_PHY_DRIVER()

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: Iterate over both registered PHYs and struct phy_driver linker list
Marek Vasut [Sun, 19 Mar 2023 17:02:42 +0000 (18:02 +0100)]
net: phy: Iterate over both registered PHYs and struct phy_driver linker list

Introduce U_BOOT_PHY_DRIVER() macro which is used to add struct phy_driver
into a new linker list section containing all compiled in struct phy_driver
drivers. This is so far empty until PHY drivers are converted over to this
macro.

Iterate over both drivers registered using soon to be legacy phy_register()
as well as drivers in the new linker list when looking up a suitable PHY
driver. This way, PHY drivers can be converted over to the new macro one
driver at a time.

The relocation of callbacks for linker list based drivers now happens in
phy_init() call as the drivers are available at that point in time, and
phy_register() is not called for those drivers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: Factor manual relocation into separate function
Marek Vasut [Sun, 19 Mar 2023 17:02:41 +0000 (18:02 +0100)]
net: phy: Factor manual relocation into separate function

Create separate function to implement manual relocation of PHY driver
functions and make use of that function. This is a preparatory patch
for introduction of PHY driver definition using linker lists.

No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: teranetics: Staticize PHY driver entries
Marek Vasut [Sun, 19 Mar 2023 17:02:40 +0000 (18:02 +0100)]
net: phy: teranetics: Staticize PHY driver entries

These struct phy_driver ... instances are local to this source code
file, staticize them. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: cortina: Staticize PHY driver entries
Marek Vasut [Sun, 19 Mar 2023 17:02:39 +0000 (18:02 +0100)]
net: phy: cortina: Staticize PHY driver entries

These struct phy_driver ... instances are local to this source code
file, staticize them. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: ca_phy: Staticize PHY driver entries
Marek Vasut [Sun, 19 Mar 2023 17:02:38 +0000 (18:02 +0100)]
net: phy: ca_phy: Staticize PHY driver entries

These struct phy_driver ... instances are local to this source code
file, staticize them. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
13 months agonet: phy: aquantia: Staticize PHY driver entries
Marek Vasut [Sun, 19 Mar 2023 17:02:37 +0000 (18:02 +0100)]
net: phy: aquantia: Staticize PHY driver entries

These struct phy_driver ... instances are local to this source code
file, staticize them. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
13 months agocmd: Add 2048 game
Simon Glass [Tue, 7 Feb 2023 21:33:53 +0000 (14:33 -0700)]
cmd: Add 2048 game

Add the 2048 game, a good demo of ANSI sequences and a way to waste a
little time.

Bring it it from Barebox, modified for code style.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 months agoserial-uclass: drop redundant code in serial_check_stdout()
Rasmus Villemoes [Wed, 29 Mar 2023 07:57:51 +0000 (09:57 +0200)]
serial-uclass: drop redundant code in serial_check_stdout()

As the updated comment says, this is already handled by
fdt_path_offset_namelen() itself.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13 months agocmd: CONFIG_CMD_SCSI depends on CONFIG_SCSI
Heinrich Schuchardt [Sun, 26 Mar 2023 17:10:38 +0000 (19:10 +0200)]
cmd: CONFIG_CMD_SCSI depends on CONFIG_SCSI

Compiling with CONFIG_CMD_SCSI=y, CONFIG_SCSI results in

    cmd/scsi.c:46: undefined reference to `scsi_scan'

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agoata: don't use SYS_SCSI_MAX_SCSI_ID for SATA
Heinrich Schuchardt [Sun, 26 Mar 2023 16:58:26 +0000 (18:58 +0200)]
ata: don't use SYS_SCSI_MAX_SCSI_ID for SATA

CONFIG_SYS_SCSI_MAX_SCSI_ID is not defined if CONFIG_SCSI=n.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agoata: fix requirements for CONFIG_AHCI_PCI
Heinrich Schuchardt [Sun, 26 Mar 2023 16:58:25 +0000 (18:58 +0200)]
ata: fix requirements for CONFIG_AHCI_PCI

Building with CONFIG_AHCI_PCI=y and CONFIG_SCSI_AHCI=n leads to

    drivers/ata/ahci-pci.o: in function `ahci_pci_probe':
    drivers/ata/ahci-pci.c:21: undefined reference to `ahci_probe_scsi_pci'

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agospi: Kconfig: add dependency on CONFIG_MPC85xx for FSL_ESPI entry
Corentin Guillevic [Fri, 24 Mar 2023 09:54:19 +0000 (10:54 +0100)]
spi: Kconfig: add dependency on CONFIG_MPC85xx for FSL_ESPI entry

The Freescale ESPI driver (CONFIG_FSL_ESPI) relies to the MPC85xx platform
(PowerPC) through arch/powerpc/include/asm/immap_85xx.h. The driver can't
compile on another architecture/platform.

Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
13 months agodoc: arch: m68k: fix maintainer email
Angelo Dureghello [Tue, 4 Apr 2023 23:19:03 +0000 (01:19 +0200)]
doc: arch: m68k: fix maintainer email

Fix email with currently used address.

Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
13 months agoarm: lib: add __gnu_thumb1_case_si
Francis Laniel [Sat, 1 Apr 2023 21:54:39 +0000 (22:54 +0100)]
arm: lib: add __gnu_thumb1_case_si

The assembly for __gnu_thumb1_case_si was taken from upstream gcc and adapted
as width suffix was removed for the add instruction [1].

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Tested-by: Tony Dinh <mibodhi@gmail.com>
[1] https://github.com/gcc-mirror/gcc/blob/4f181f9c7ee3efc509d185fdfda33be9018f1611/libgcc/config/arm/lib1funcs.S#L2156
Acked-by: Pali Rohár <pali@kernel.org>
Acked-by: Tony Dinh <mibodhi@gmail.com>
13 months agocmd/regulator: missing fallthrough in do_dev()
Heinrich Schuchardt [Sat, 1 Apr 2023 08:07:30 +0000 (10:07 +0200)]
cmd/regulator: missing fallthrough in do_dev()

Add missing fallthrough macro.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agocmd: missing fallthrough macro in do_pci()
Heinrich Schuchardt [Sat, 1 Apr 2023 07:43:33 +0000 (09:43 +0200)]
cmd: missing fallthrough macro in do_pci()

Add a missing fallthrough macro to avoid a -Wimplicit-fallthrough warning.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agocmd: convert fallthrough comment.
Heinrich Schuchardt [Sat, 1 Apr 2023 07:14:11 +0000 (09:14 +0200)]
cmd: convert fallthrough comment.

gcc does not understand /* FALL TROUGH */ and emits a warning:

    cmd/date.c: In function ‘do_date’:
    cmd/date.c:62:20: warning:
    this statement may fall through [-Wimplicit-fallthrough=]
       62 |                 if (strcmp(argv[1],"reset") == 0) {
          |                    ^
    cmd/date.c:102:9: note: here
      102 |         case 1:                 /* get date & time */
          |         ^~~~

Use the fallthrough macro instead.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>