Commit graph

97382 commits

Author SHA1 Message Date
Tianling Shen
30db98ed87 arm64: dts: rockchip: enable eMMC HS200 mode for NanoPi R3S
It is required to boot from eMMC without additional patch in u-boot.

Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241022193537.1117919-5-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

[ upstream commit: 1b5365034410f1ca21adadadd492b99bdf4f2c55 ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:16 -06:00
Tianling Shen
d3c686212f arm64: dts: rockchip: sort props in pmu_io_domains node for NanoPi R3S
The status prop is typically the last prop.

Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241022193537.1117919-4-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

[ upstream commit: 17e150fdd983c7e59b9240e34a166285f3c3fb39 ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:16 -06:00
Tianling Shen
b9afcf4062 arm64: dts: rockchip: replace deprecated snps, reset props for NanoPi R3S
Replace deprecated snps,reset props and move them to the PHY node.

Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241022193537.1117919-3-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

[ upstream commit: 82b2868937883b65732da498b26366d34db61510 ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:16 -06:00
Tianling Shen
2222224bf9 arm64: dts: rockchip: fix model name for FriendlyElec NanoPi R3S
Use the marketing name for model name, this matches the dt-binding.
Also update the website url in copyright.

Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241022193537.1117919-2-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

[ upstream commit: b5bf84206a5c77528f9dd4cbca4e72caa063c102 ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:16 -06:00
Tianling Shen
09ffc136aa arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
Ethernet ports designed and developed by FriendlyElec for IoT
applications.

Specification:
- Rockchip RK3566
- 2GB LPDDR4X RAM
- optional 32GB eMMC module
- SD card slot
- 2x 1000 Base-T
- 3x LEDs (POWER, LAN, WAN)
- 2x Buttons (Reset, MaskROM)
- 1x USB 3.0 Port
- Type-C 5V 2A Power

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241020173946.225960-2-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

[ upstream commit: 50decd493c8394c52d04561fe4ede34df27a46ba ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
514839d5b1 rockchip: rk3288-firefly: Change to use FIT
Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
dc691ef150 rockchip: rk3288-firefly: Fix slow Ethernet initializion
For some reason the Ethernet PHY reset delay is set to 1 second, this
cause an unneccecery long boot delay.

Firefly-RK3288 use RTL8211 Ethernet PHY, datasheet list an initial 10ms
delay and then a 30-76ms delay before accessing registers.

Change to use 80ms delay instead of a full second to speed up Ethernet
initializion in U-Boot.

Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY
support in U-Boot.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
338cfeac31 rockchip: rk3288-firefly: Migrate to OF_UPSTREAM
The device tree for Firefly-RK3288 in dts/upstream can be used as-is by
U-Boot, migrate board to use OF_UPSTREAM.

Add chosen stdout-path prop to board u-boot.dtsi as it is missing in DT
from dts/upstream. Also change to use the upstream power_led symbol.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
4a18711f54 rockchip: rk3288-firefly: Drop USE_PREBOOT Kconfig option
After the migration to use standard boot, storage media devices should
automatically be initialized in the order listed in boot_targets env.

Drop USE_PREBOOT to speed up boot when booting from SD-card or eMMC.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
c18f00c331 rockchip: rk3288-firefly: Drop use of silent console and late boardinfo
Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.

A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
cf84730409 rockchip: rk3288-firefly: Include sdmmc regulator in SPL
Add bootph props and enable related Kconfig options to include the sdmmc
regulator in SPL. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is
handled correctly in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
8baa2d8958 rockchip: rk3288-firefly: Include required DT nodes in xPL
Add bootph- props to emmc, sdmmc, uart and related pinctrl nodes to
ensure devices and pinctrl can be used in xPL and U-Boot pre-reloc.

Remove the explicit bootph-all prop from the pinctrl node, any bootph-
prop will automatically be propagated to the pinctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
14c13f295a rockchip: rk3288-firefly: Use common bss and stack addresses
Migrate to use common bss, stack and malloc heap size and addresses to
unify memory use in TPL, SPL and pre-reloc.

ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
35ae87eff6 rockchip: rk3288-firefly: Set ethaddr env based on cpuid
Enable Kconfig options to read cpuid from efuse and set cpuid#, serial#
and ethaddr env vars based on the value read from efuse.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
20ff82dc51 rockchip: rk3288-firefly: Sort u-boot.dtsi nodes alphabetically
Sort the nodes in rk3288-firefly-u-boot.dtsi in alphabetical order.

This has no intended change to board DT, this only rearrange nodes in
preparation for future changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
1e3e3534a9 rockchip: rk3288-firefly: Drop unused SPL_LED related code
The firefly-rk3288_defconfig build target does not enable the SPL_LED
Kconfig option.

Drop the unused SPL_LED related code and replace it with a default-state
prop to ensure the LED driver enable the LED at U-Boot proper phase.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Paul Kocialkowski
e3c11f96b8 rockchip: rk3399-rockpro64: Disable bootstage instrumentation config
The boot timing and reporting (bootstage) infrastructure is useful for
performance analysis and debug but adds overhead and console noise when
using the device normally. Remove it from the device config.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-01-10 18:56:15 -06:00
Paul Kocialkowski
95433be7ac rockchip: rk3399-rockpro64: Hook sysreset gpio to enable full reset
The reset mechanism used by Linux to reset the SoC is known to only
partially reset the logic. A mechanism is implemented in
rk3399_force_power_on_reset to use a GPIO connected to the PMIC's
over-temperature (OTP) reset pin, which fully resets all logic.

Hook the associated GPIO where the function expects it to enable this
reset mechanism and avoid any possible side-effect of partially-reset
units.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-01-10 18:56:15 -06:00
Paul Kocialkowski
d7882f556e rockchip: rk3399-roc-pc: Hook sysreset gpio to enable full reset
The reset mechanism used by Linux to reset the SoC is known to only
partially reset the logic. A mechanism is implemented in
rk3399_force_power_on_reset to use a GPIO connected to the PMIC's
over-temperature (OTP) reset pin, which fully resets all logic.

Hook the associated GPIO where the function expects it to enable this
reset mechanism and avoid any possible side-effect of partially-reset
units.

Without this patch, reading from the micro sd slot fails after a reset.
With this mechanism, U-Boot is able to boot from it reliably.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-01-10 18:56:15 -06:00
Jacobe Zang
c990398674 board: rockchip: add Khadas Edge2 RK3588 board
Khadas Edge2 is a Rockchip RK3588S based SBC (Single Board Computer)
by Khadas.

There are tree variants depending on the DRAM size : 8G and 16G.

Specification:

    Rockchip RK3588S SoC
    4x ARM Cortex-A76, 4x ARM Cortex-A55
    8/16GB memory LPDDR4x
    Mali G610MP4 GPU
    3x MIPI CSI 4x lanes
    2x MIPI-DSI DPHY 4x lanes
    32/64GB eMMC
    1x USB 2.0, 1x USB 3.0, 2x USB-Type-C
    1x HDMI 2.1 output, 1x DP 1.4 output
    USB PD over USB Type-C

Kernel commit:
04d552993522 ("arm64: dts: rockchip: Add Khadas edge2 board")

Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
60649ea8aa rockchip: rk3288-miqi: Change to use FIT
Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
61f4e5f9cf rockchip: rk3288-miqi: Fix slow Ethernet initializion
For some reason the Ethernet PHY reset delay is set to 1 second, this
cause an unneccecery long boot delay.

MiQi use RTL8211 Ethernet PHY, datasheet list an initial 10ms delay and
then a 30-76ms delay before accessing registers.

Change to use 80ms delay instead of a full second to speed up Ethernet
initializion in U-Boot.

Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY
support in U-Boot.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
c33617d3bb rockchip: rk3288-miqi: Migrate to OF_UPSTREAM
The device tree for mqmaker MiQi in dts/upstream can be used as-is by
U-Boot, migrate board to OF_UPSTREAM.

The change to use DT from dts/upstream will include minor changes and
fixes related to work led and usb otg.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
e4b4ed9651 rockchip: rk3288-miqi: Drop USE_PREBOOT Kconfig option
After the migration to use standard boot, storage media devices should
automatically be initialized in the order listed in boot_targets env.

Drop USE_PREBOOT to speed up boot when booting from SD-card or eMMC.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
1e4806defd rockchip: rk3288-miqi: Drop use of silent console and late boardinfo
Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.

A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
a9ad8e143f rockchip: rk3288-miqi: Include sdmmc regulator in SPL
Add bootph props and enable related Kconfig options to include the sdmmc
regulator in SPL. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is
handled correctly in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
7e94567e10 rockchip: rk3288-miqi: Include required DT nodes in xPL
Add bootph- props to emmc, sdmmc, uart and related pinctrl nodes to
ensure devices and pinctrl can be used in xPL and U-Boot pre-reloc.

Remove the explicit bootph-all prop from the pinctrl node, any bootph-
prop will automatically be propagated to the pinctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
68412a237f rockchip: rk3288-miqi: Use TPL with common bss and stack addresses
Migrate to use TPL, common bss, stack and malloc heap size and addresses
to unify memory use in TPL, SPL and pre-reloc.

ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
8d00122325 rockchip: rk3288-miqi: Set ethaddr env based on cpuid
Enable Kconfig options to read cpuid from efuse and set cpuid#, serial#
and ethaddr env vars based on the value read from efuse.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
0bcaa88245 rockchip: rk3288-miqi: Remove unused work led node from xPL
The work led is not used in xPL on rk3288-miqi, remove bootph props from
the work led node to exclude it from xPL control FDT.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
98ba08b6c5 rockchip: rk3288-miqi: Sort u-boot.dtsi nodes alphabetically
Sort the nodes in rk3288-miqi-u-boot.dtsi in alphabetical order.

This has no intended change to board DT, this only rearrange nodes in
preparation for future changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
39c9a94ea6 rockchip: rk3288-tinker: Change to use FIT
Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.

Checksum validation of FIT adds around 140 ms to boot time:

Before:

       Mark    Elapsed  Stage
          0          0  reset
         13         13  TPL
      6,957      6,944  end tpl
     25,102     18,145  SPL
    131,932    106,830  end phase
    132,137        205  board_init_f
    444,277    312,140  board_init_r
  1,404,987    960,710  eth_common_init
  1,519,110    114,123  eth_initialize
  1,524,734      5,624  main_loop
  1,525,452        718  cli_loop

After:

       Mark    Elapsed  Stage
          0          0  reset
         13         13  TPL
      6,957      6,944  end tpl
     35,744     28,787  SPL
    271,220    235,476  end phase
    271,420        200  board_init_f
    588,474    317,054  board_init_r
  1,548,950    960,476  eth_common_init
  1,663,105    114,155  eth_initialize
  1,668,734      5,629  main_loop
  1,669,417        683  cli_loop

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
57237c7f41 rockchip: rk3288-tinker: Fix slow Ethernet initializion
For some reason the Ethernet PHY reset delay is set to 1 second, this
cause an unneccecery long boot delay.

Tinker Board use RTL8211E or RTL8211F Ethernet PHY, datasheet list an
initial 10ms delay and then a 30-76ms delay before accessing registers.

Change to use 80ms delay instead of a full second to speed up Ethernet
initializion in U-Boot.

Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY
support in U-Boot.

Before:

  1,404,971    960,924  eth_common_init
  2,438,830  1,033,859  eth_initialize
  2,444,449      5,619  main_loop
  2,445,153        704  cli_loop

After:

  1,404,987    960,710  eth_common_init
  1,519,110    114,123  eth_initialize
  1,524,734      5,624  main_loop
  1,525,452        718  cli_loop

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
a0a880942b rockchip: rk3288-tinker: Migrate to OF_UPSTREAM
The device tree for ASUS Tinker Board and S variant in dts/upstream can
be used as-is by U-Boot, migrate board to OF_UPSTREAM.

The change to use DT from dts/upstream will include minor changes and
fixes related to leds and regulators.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
c33c245e30 rockchip: rk3288-tinker: Drop USE_PREBOOT Kconfig option
After the migration to use standard boot, storage media should
automatically be initialized in the order listed in boot_targets env.

Drop USE_PREBOOT to speed up boot with ~12 seconds when booting from
e.g. SD-card or eMMC.

Before:

  3,048,599      2,056  main_loop
  3,050,717      2,118  usb_start
 15,070,499 12,019,782  cli_loop

After:

  3,058,244      2,054  main_loop
  3,063,260      5,016  cli_loop

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
4ae0e5cd4d rockchip: rk3288-tinker: Drop use of silent console and late boardinfo
Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.

A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
826267d3ea rockchip: rk3288-tinker: Use common bss and stack addresses
Migrate to use common bss, stack and malloc heap size and addresses to
unify memory use in TPL, SPL and pre-reloc.

Ensure SYS_MALLOC_F_LEN and TPL variant stay at 0x2000 and is unaffected
on other boards not changed to use common malloc heap size.

ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
ab08413368 rockchip: rk3288-tinker: Sync defconfig options from rk3288-tinker-s
Add missing Kconfig options used by the rk3288-tinker-s variant.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
b8ff4be966 rockchip: rk3288-tinker: Set cpuid and serial env var
Enable MISC_INIT_R and ROCKCHIP_EFUSE to read cpuid from efuse and set
the cpuid# and serial# env vars.

Change to read mac address from eeprom in rockchip_early_misc_init_r()
to ensure the ethaddr env var is set before rockchip_setup_macaddr() try
to set ethaddr based on cpuid.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
5b95daa832 rockchip: rk3288-tinker: Include mmc nodes in pre-reloc for env load
Include mmc related nodes in U-Boot proper pre-reloc phase to ensure
environment can be loaded from mmc devices.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
fcd4949192 rockchip: rk3288-tinker: Drop unused vcc_sd regulator from SPL
The sdmmc power come from vcc33_sd pmic regulator and not from the
vcc_sd fixed regulator, as currently defined in the in-tree DT.

Drop vcc_sd and the related gpio7 and sdmmc_pwr nodes from being
included in SPL along with any related Kconfig option. Also enable
SPL_DM_SEQ_ALIAS to ensure aliases is handled correctly in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
7f13ffa280 rockchip: rk3288-tinker: Only include required DT nodes in TPL
Drop the unneeded bootph-all prop from dmc node, it is already defined
in soc u-boot.dtsi.

Remove booth-all prop from gpio7 node, this node is not needed in TPL.

Adjust bootph props to include pinctrl related nodes for UART2.

Remove the explicit bootph-all prop from the pinctrl node, any bootph-
prop will automatically be propagated to the pinctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
cabe2ef766 rockchip: rk3288-tinker: Sort u-boot.dtsi nodes alphabetically
Sort the nodes in rk3288-tinker u-boot.dtsi files in alphabetical order.

This has no intended change to board DTs and only rearrange nodes in
preparation for future changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
4d1c5a838a board: rockchip: rk3288-tinker: Add myself as reviewer to MAINTAINERS
Add myself as a reviewer for Tinker Board and S variant so that I can
help with review and testing of defconfig and device tree changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
8b6227c229 rockchip: rk3288: Fix bootph prop for vop nodes
The vop nodes does not need to be included in xPL control FDT, they only
need to be included at U-Boot proper pre-reloc phase.

Change to use bootph-some-ram prop to fix this.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
934a2d49f8 rockchip: rk3288: Use rk3288.dtsi from dts/upstream
rk3288.dtsi from arch/arm/dts is almost identical to the rk3288.dtsi
from dts/upstream, it differs only with a minor change in hdmi port
nodes, something that does not affect U-Boot.

Remove arch/arm/dts/rk3288.dtsi to use rk3288.dtsi from dts/upstream.
Also drop gpio aliases from -u-boot.dtsi that has been part of
rk3288.dtsi for some time.

No functional change to board DTs is intended with this removal.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
c63eae2817 rockchip: clk: rk3288: Drop use of SCLK_MAC_PLL
The SCLK_MAC_PLL id is not exported or referenced upstream. It is also
not referenced in vendor U-Boot or vendor kernel 4.4, 4.19, 5.10 or 6.1.

Relax the check for parent id SCLK_MAC_PLL when using internal clock
source for gmac to allow use of clock/rk3288-cru.h from dts/upstream.

All in-tree and upstream rk3288 DTs use an external clock as parent,
so no functional change to boards is expected with this change.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:09 -06:00
Jonas Karlman
2247b8aa20 rockchip: rk3288: Use rk3288-power.h from dts/upstream
power/rk3288-power.h in include/dt-bindings is identical to the version
in dts/upstream, remove the copy from include/dt-bindings to only use
the version from dts/upstream.

No functional change to board DTs is intended with this removal.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 14:52:27 +08:00
Tom Rini
121e62e8af Merge https://source.denx.de/u-boot/custodians/u-boot-watchdog
- rti: support SPL (or re-start) (Alexander)
- rti: drop hack manipulating WDT clock rate (Alexander)
2025-01-09 15:25:36 -06:00
Marek Vasut
addcb09fd5 usb: ehci-mx6: Use regulator_set_enable_if_allowed
With the commit 4fcba5d556 ("regulator: implement basic reference
counter") the return value of regulator_set_enable may be EALREADY or
EBUSY for fixed/gpio regulators.

Change to use the more relaxed regulator_set_enable_if_allowed to
continue if regulator already was enabled or disabled.

Based on 335799b725 ("usb: dwc2: Use regulator_set_enable_if_allowed")

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2025-01-09 21:09:05 +01:00