1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-02-12 15:19:28 +01:00
Commit Graph

96699 Commits

Author SHA1 Message Date
Dang Huynh
8dc4a136b1 video: rockchip: Add HDMI support for RK3568
HDMI on RK3568 is mostly simplified, all this does is enabling
DDC for display timings and HPD.

Signed-off-by: Dang Huynh <danct12@riseup.net>
2025-01-30 23:41:36 +01:00
Dang Huynh
bc5dcbbd1a configs: quartz64: Enable vidconsole
Now that we have VOP2 support, we should enable vidconsole.

Signed-off-by: Dang Huynh <danct12@riseup.net>
2025-01-30 23:41:36 +01:00
Dang Huynh
b283f64016 dts: rockchip: rk356x: Prerelocate VOP in U-Boot proper
We need to prerelocate VOP2 memory so the driver can work. This
will only support U-Boot proper.

Signed-off-by: Dang Huynh <danct12@riseup.net>
2025-01-30 23:41:36 +01:00
Dang Huynh
28415b4c96 video: rockchip: vop2: Add video bridge support
Add support for the MIPI DSI bridge driver that we have.

Signed-off-by: Dang Huynh <danct12@riseup.net>
2025-01-30 23:41:36 +01:00
Dang Huynh
ad5332a9a0 video: rockchip: Add VOP2 support
VOP2 (Video Output Processor v2) is a display controller on Rockchip
SoCs. It can be found on RK3566/8 and RK3588.

This commit currently only supports RK3566/8.

Signed-off-by: Dang Huynh <danct12@riseup.net>
2025-01-30 23:41:36 +01:00
Dang Huynh
d66f990b5d video: Add BOE TH101MB31IG002-28A MIPI-DSI panel
BOE TH101MB31IG002-28A is a MIPI-DSI panel used in the Pine64
PineTab2.

Signed-off-by: Dang Huynh <danct12@riseup.net>
2025-01-30 23:41:36 +01:00
Dang Huynh
def84f8abd video: rockchip: dw-mipi-dsi: Depend on CONFIG_VIDEO_BRIDGE
The driver is in video bridge class, so we must depend on it or
the driver will fail to init.

Signed-off-by: Dang Huynh <danct12@riseup.net>
2025-01-30 23:41:36 +01:00
Ondrej Jirman
691de76886 config: pinephone-pro: Enable video out and boot menu
Also remove unused features.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
fbd098ea07 config: pinebook-pro: Personal optimizations
Just personal stuff, if you don't like it, make your own build.

Signed-of-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
2173f28b98 config: rockpro64: Personal optimizations
Just personal stuff, if you don't like it, make your own build.

Signed-of-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
050bb68b50 config: pinetab2: Personal optimizations
Just personal stuff, if you don't like it, make your own build.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
484482f2b7 config: quartzpro64: Personal optimizations
Just personal stuff, if you don't like it, make your own build.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
03ee581795 config: orange-pi-5-plus: Personal optimizations
Just personal stuff, if you don't like it, make your own build.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
28c187fb0a board: Add support for EBAZ4205
This is without the SD controller support, because I have a broken
uSD slot on my board. Until that's fixed, it needs to be disabled.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
2a449af55f spl: Try loading bitstream first, before falling back to fpga_load
There's no other way to load bitstream file to Zynq 7000 via SPL
otherwise, and SPL just reports:

  zynq_validate_bitstream: Bitstream is not validated yet (diff 6c)
  spl_fit_upload_fpga: Cannot load the image to the FPGA

This is similar to code in boot/image-board.c

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
895e7f1d76 rockchip: rk3399: DTS video output/menu support on Pinephone Pro
See comments in the DT.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
7366d2d3c9 board: pine64: Configure PMIC charger on Pinephone Pro
Charger chip needs some sane defaults.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
a45b233b2b board: pine64: Configure PMIC on Pinephone Pro for touchscreen
Touchscreen needs 3V on LDO2.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
7cab3d122a board: pine64: Enable DMC on Pinephone Pro
Automatically enable DMC node in the kernel when using rkbin blobs
that support DMC.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:59 +01:00
Ondrej Jirman
f10f58cd09 board: pine64: Enable DMC on RockPro64
Automatically enable DMC node in the kernel when using rkbin blobs
that support DMC.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
ca4c339a2c board: pine64: Enable DMC on Pinebook Pro
Automatically enable DMC node in the kernel when using rkbin blobs
that support DMC.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
4cace675ba clk: rockchip: Static clock settings for VOPs on Pinephone Pro
cpll in U-Boot runs at 384 MHz, set various VOP related clocks to produce
roughly 400 and 100 MHz just like in Linux.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
d6117dff88 clk: rockchip: Add clocks used by VOP and mipi-dsi on rk3399
These need to be handled for VOP/MIPI-DSI support.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
15bee1875e video: rockchip: rk3399-vop: Don't enable hardcoded regulator 2025-01-11 20:50:58 +01:00
Ondrej Jirman
26f1dfed28 video: rockchip: Add video bridge support to VOP driver
This is used for video output using video bridge implementation of
MIPI-DSI, like with the recently added dw_mipi_dsi_rockchip.c
driver.

The original code path when the UCLASS_DISPLAY device is found is
untouched. The video bridge branch is taken only when the
UCLASS_VIDEO_BRIDGE device is found at the remote endpoint's parent.

This was tested to work on Pinephone Pro.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@vrull.eu>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Chris Morgan <macromorgan@hotmail.com>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
105da2ee36 video: rockchip: dw_mipi_dsi: Proceed when external PHY is not defined
In this case the DM returns ENOENT, not ENODATA.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
6597a47259 video: rockchip: dw_mipi_dsi: Improve pixel clock calculations
Calculate burst mode overhead in one place for both internal
and external PHY use case and exit if out of range, instead
of ignoring the wrong value.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
b51bb511fd video: dw_mipi_dsi: Sync driver with Linux
Just a simple update of code from Linux driver, where this driver was
copied from originally.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
709768fbd1 mtd: spi-nor: Add support for as25f1128mq
Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
acf6baf787 mtd: spi-nor: Add device info for gd25lq128e
This is used on Pinephone Pro.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
5f21a63165 mtd: spi-nor: Print jedec id of unrecognized flashes
Hell to debug otherwise.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
3442b275ac cmd: tmenu: Add tmenu command for touch menu user interface
Shows a menu of items that can be controlled using touch panel.
This is useful for touch based devices like tablets to select
alternative boot options (multi-boot).

Signed-off-by: Ondrej Jirman <megous@megous.com>
2025-01-11 20:50:58 +01:00
Ondrej Jirman
a31d4ce45d input: goodix: Add support for Goodix touchscreens
As the title says. :)

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2025-01-11 13:49:41 +01:00
Ondrej Jirman
29c1412851 input: edt-ft5x06: Add support for edt,edt-ft5x06 touchpanel controller
This is a direct port of the Linux driver from Linux v4.18.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2025-01-11 13:49:41 +01:00
Ondrej Jirman
15b23000bb cmd: Add 'touch' command to enumerate touchpanel devices
This command can be used to list and access devices with uclass
UCLASS_TOUCHPANEL.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2025-01-11 13:49:41 +01:00
Ondrej Jirman
517b25ddf5 input: Implemented touchpanel uclass for touchpanel devices
Touchapnel devices are useful in u-boot for implementation of boot
menu user interfaces on tablets and other touch based devices.

This uclass implements start, stop and get_touches interface methods.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2025-01-11 13:49:41 +01:00
Jonas Karlman
02ace54f68 rockchip: rk3588: Skip serial pinctrl at pre-reloc phase
UART pinctrl for serial is typically applied multiple times:
- in external TPL
- in SPL for DEBUG_UART in board_debug_uart_init()
- in SPL using pinctrl from DT
- in pre-reloc phase using pinctrl from DT
- after relocation using pinctrl from DT

Skip including UART pinctrl for the the pre-reloc phase to save time
during boot. On a Radxa ROCK 5B this reduce boot time by ~150 ms.

After this a warning may be shown with LOGLEVEL=5 (or higher), it is
safe to ignore this warning as device probe is successful even when
pinctrl cannot be applied:

  ns16550_serial serial@feb50000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2025-01-11 13:49:41 +01:00
Jonas Karlman
b174b79a55 rockchip: rk356x: Skip serial pinctrl at pre-reloc phase
UART pinctrl for serial is typically applied multiple times:
- in external TPL
- in SPL for DEBUG_UART in board_debug_uart_init()
- in SPL using pinctrl from DT
- in pre-reloc phase using pinctrl from DT
- after relocation using pinctrl from DT

Skip including UART pinctrl for the the pre-reloc phase to save time
during boot. On a Radxa ZERO 3W this reduce boot time by ~120 ms.

After this a warning may be shown with LOGLEVEL=5 (or higher), it is
safe to ignore this warning as device probe is successful even when
pinctrl cannot be applied:

  ns16550_serial serial@fe660000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2025-01-11 13:49:41 +01:00
Jonas Karlman
04339be206 rockchip: rk3308: Skip serial pinctrl at pre-reloc phase
UART pinctrl for serial is typically applied multiple times:
- in external TPL
- in SPL using pinctrl from DT
- in pre-reloc phase using pinctrl from DT
- after relocation using pinctrl from DT

Skip including UART pinctrl for the the pre-reloc phase to save time
during boot. On a Radxa ROCK Pi S this reduce boot time by ~80 ms.

After this a warning may be shown with LOGLEVEL=5 (or higher), it is
safe to ignore this warning as device probe is successful even when
pinctrl cannot be applied:

  ns16550_serial serial@ff0a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2025-01-11 13:49:41 +01:00
Jonas Karlman
17fce0e52f rockchip: gpio: Add missing gpio aliases
Add aliases for gpio controllers to soc u-boot dtsi files that are
missing aliases in soc dtsi files to ensure dev_seq() return the
expected number when a gpio controller is included in SPL.

Also drop the aliases from rk3288-u-boot.dtsi, they are already part of
rk3288.dtsi.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2025-01-11 13:49:41 +01:00
Jonas Karlman
0fd45b2666 rockchip: gpio: Add gpio-ranges props
Add gpio-ranges props to supported SoCs based on the following Linux
patches:

ARM: dts: rockchip: add gpio-ranges property to gpio nodes
https://lore.kernel.org/all/26007385-81dc-9961-05d5-8b9a0969d0b6@gmail.com/

arm64: dts: rockchip: add gpio-ranges property to gpio nodes
https://lore.kernel.org/all/18c8c89a-9962-40f0-814f-81e2c420c957@gmail.com/

For RK3066 and RK3288 the gpio-ranges props is adjusted to match
https://lore.kernel.org/all/541b7633-af3b-4392-ac29-7ee1f2c6f943@kwiboo.se/

Re-enable gpio6 on RK3066 now that the pinctrl pin offset is used with
get_gpio_mux().

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-11 13:49:41 +01:00
Jonas Karlman
e7351eef7a gpio: rockchip: Add request() ops
Add a request() ops that call pinctrl_gpio_request() when the required
gpio-ranges prop has been defined to signal pinctrl driver to use gpio
pinmux.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2025-01-11 13:49:41 +01:00
Jonas Karlman
57e968110a gpio: rockchip: Use pinctrl pin offset to get_gpio_mux()
Use the pinctrl pin offset to get_gpio_mux() to remove the bank num
dependency and instead only use the bank num to assign a bank name.

Most Rockchip SoCs use all 32 pins of each gpio controller, meaning the
pinctrl pin offset typically is aligned to 32.

However, for gpio0 on RK3288 only 24 pins are used meaning the pinctrl
pin offset start at pin 24 for gpio1. Use DIV_ROUND_UP to get the 32 pin
aligned bank num.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-11 13:49:41 +01:00
Jonas Karlman
eaae156799 gpio: rockchip: Get pinctrl device from gpio-ranges prop
Get pinctrl device from gpio-ranges phandle when the property exists,
fallback to get the first pinctrl device.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-11 13:49:41 +01:00
Jonas Karlman
75fd5d0117 pinctrl: rockchip: Add gpio_request_enable() ops
Implement gpio_request_enable() ops so that the gpio request() ops can
be implemented and a gpio requested pin automatically is pinmuxed for
gpio use, similar to Linux kernel.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2025-01-11 13:49:41 +01:00
Jonas Karlman
9e060e95f3 pinctrl: rockchip: Add pinmux status related ops
Add get_pins_count(), get_pin_name() and get_pin_muxing() ops to support
the pinmux status cmd.

  => pinmux dev pinctrl
  dev: pinctrl
  => pinmux status
  GPIO0_A0  : gpio
  GPIO0_A1  : func-1
  GPIO0_A2  : gpio
  GPIO0_A3  : gpio
  GPIO0_A4  : func-1
  GPIO0_A5  : gpio
  GPIO0_A6  : gpio
  GPIO0_A7  : func-1
  GPIO0_B0  : gpio
  GPIO0_B1  : func-1
  GPIO0_B2  : func-1
  GPIO0_B3  : gpio
  [...]

The change to use ENOENT for unrouted pins also help hide a "Error -22"
message for unrouted pins using the gpio status -a cmd.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-11 13:49:41 +01:00
Jonas Karlman
3f9b21adb5 pinctrl: rockchip: Update get_gpio_mux() ops
Add a way to get_gpio_mux() based on the pinctrl pin offset, use -1 as
banknum to use the pinctrl pin offset mode instead of bank pin offset.

This mode will be used by the gpio driver to ensure a pin used by gpio
request() and get_function() ops always refer to the same pinctrl pin.

Also add verify_config() of banknum and index to avoid an out of range
access of the pin_banks array, i.e. with gpio6 on rk3066a.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-11 13:49:41 +01:00
Jonas Karlman
4c5d67044f pinctrl: rockchip: Add a pin_to_bank() helper
Add a pin_to_bank() helper that can locate a pin bank based on the pin
offset, to be used in get_gpio_mux() and gpio_request_enable() ops.

Reset ctrl->nr_pins to 0 so that pin_to_bank() can locate a bank after
the second probe in U-Boot proper.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2025-01-11 13:49:41 +01:00
Jonas Karlman
803503818b pinctrl: rockchip: Use syscon_regmap_lookup_by_phandle()
Use syscon_regmap_lookup_by_phandle() to simplify the code.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-11 13:49:41 +01:00
Tom Rini
6d41f0a39d Prepare v2025.01
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-01-06 18:54:44 -06:00