1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00
Commit Graph

86792 Commits

Author SHA1 Message Date
Ondrej Jirman
222aa75ace config: pinebook-pro: Remove unused features
Signed-of-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
c140c145df config: rockpro64: Remove unused features
Signed-of-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
c7260a2687 config: pinephone-pro: Enable video out and boot menu
Also remove unused features.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
110261e4af board: pine64: Enable DMC on pinebook pro and rockpro64
Automatically enabled DMC node in the kernel when using rkbin blobs
that support DMC.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
4ecfbba990 pinephone-pro: Sync Pinephone Pro device tree with Linux
Update it so that it matches my orange-pi-6.3 branch.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Samuel Dionne-Riel
bf868e4146 pinephone-pro: Sync RK3399 device tree with Linux
Update it so that it matches my orange-pi-6.3 branch.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
5910ef9356 board: pinephone-pro: RINT calibration on boot [wip]
... not yet

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
ced7bf1bc5 board: pinephone-pro: Handle low battery during boot, increase current limit
The limit needs to be raised as soon as possible to prevent boot loops
on empty or removed battery. The default 450mA limit is crossed when
eMMC or SD card starts seeing reads in SPL after DRAM was already
enabled in TPL.

But this fix is good enough to prevent boot loops when the phone can still
get ~100mA from the battery to cover the difference between 450 mA current
limit and ~550 mA needed to load main U-Boot from eMMC while the DRAM
is already initialized by TPL.

Detect low battery voltage and prevent boot, set current limit to
something even USB 3.0 port can handle, and charge the battery
until at least 3.5V is reached. Typically the charging power will
be ~2W in this mode, which will reach the target voltage within 15
minutes or so and the phone will then boot.

If the USB power is not available, just blink the red led quickly
and power off. If USB power is available, indicate progress of charging:

- dead battery: 100ms green LED flash each second
- trickle charging: 200ms green LED flash each second
- cc-cv: duty cycle indicates charging current (5-95% of 2A)
  with period of 2s
- various failures while USB power is connected, blink red LED
  5 times quickly, wait 1s, and repeat until the failure clears

TODO:

- allow volume key input (raise / lower input current limit)
- power button, skip the algorithm and continue boot at user's
  own risk

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
12dd2a2044 [HACK] pinephone-pro: Don't enable vcc5v0_usb regulator in main u-boot
Not needed for me.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
2dc07372a2 [HACK] spl: Speedup SPL FIT loading a bit
Don't record loadables into DT. It's useless and slow.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
502bbe3540 pinephone-pro: Enable DMC node when booting from U-Boot using RK blobs
Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
0d5ea014fa mtd: spi-nor: Add device info for gd25lq128e
This is used on Pinephone Pro.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
dcd6891318 mtd: Print jedec id of unrecognized flashes
Hell to debug otherwise.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
d8eba94ac1 power: Allow to enable RK8XX regulator in SPL 2023-07-31 17:53:56 +02:00
Ondrej Jirman
d1836c0cd4 regulator: rk8xx: Fix USB voltage limit setting function
Value to be set into the register needs to be shifted to match
the mask.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:56 +02:00
Ziyuan Xu
9fe810734a mmc: dw_mmc: reset controller after data error
Per dw_mmc databook, it's recommended to reset the host controller if
some data-related error occurred.
Implement a reset mechanism.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Co-developed-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
[eugen.hristev@collabora.com: modified a bit the variables initialization]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-07-31 17:53:56 +02:00
Jonas Karlman
0fdcbc8ed5 rockchip: spl: Enable caches to speed up checksum validation
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2023-07-31 17:53:56 +02:00
Ondrej Jirman
1cf3ef6abf cmd: tmenu: Add support for UMS
Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:51 +02:00
Ondrej Jirman
7cf94969a3 cmd: tmenu: Add bootflow+extlinux support
Automatically generate menu from bootflow and extlinux data.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:53:51 +02:00
Ondrej Jirman
81c57d18b1 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>
2023-07-31 17:53:46 +02:00
Ondrej Jirman
46a5616f01 input: goodix: Add support for Goodix touchscreens
As the title says. :)

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 17:52:43 +02:00
Ondrej Jirman
c85b276a78 input: 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>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
ba4c4e4d43 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>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
ad568deaa8 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>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
f2fde9893f video: dw-mipi-dsi: Sync-up with Linux driver
Add changes made to the Linux driver in the last few years.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
9140529e2e video: rockchip: dw-mipi-dsi: Align clock rate calculations with Linux
Just to be on the same page

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
d148c59846 clk: rockchip: Add clocks used by mipi-dsi on rk3399
Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
581741bf76 video: rockchip: rk3399-vop: Don't enable hardcoded regulator 2023-07-31 16:27:10 +02:00
Ondrej Jirman
4a62ecb75b 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>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
3f86099f54 video: rockchip: Add support for RK3399 to dw-mipi-dsi bridge
This just needs some extra clocks enabled, and different registers
configured. Copied from Linux, just like the original submitter
of this driver did for rk3568.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
69792e82c4 video: hx8394: Add panel driver for hannstar,hsd060bhw4
The driver is for panels based on the Himax HX8394 controller, such as the
HannStar HSD060BHW4 720x1440 TFT LCD panel that uses a MIPI-DSI interface.
This panel is used in Pinephone Pro.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
Cc: Anatolij Gustschin <agust@denx.de>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
6d93126fd9 clk: rk3399: Static clock settings for VOPs
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>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
be2650db1c dt-bindings: Add missing rockchip clock ids
These are needed for updated upstream rk3399 dtsi.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
22292aba2f pinephone-pro: Fix pmugrf io voltage
On poweron this register is 0 (as opposed to what TRM says, that it
should be 0x300). Make it 0x300.
2023-07-31 16:27:10 +02:00
Ondrej Jirman
d23589d3b4 video: rockchip: dw_mipi_dsi: Sync calculations with Linux
This was all weird and broken.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
48c76ad44f video: console: Fix default font selection
Some callers expect to call this with NULL font name to select the
default font (eg. boot/scene.c). Without handling the NULL condition
U-Boot crashes instead of displaying a bootflow GUI menu.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
efc3dbea5a video: rockchip: dw_mipi_dsi: Fix GRF access
Use proper register base and access method to access GRF registers.
GRF registers start at a completely different base, and need special
access method, that sets the change mask in the 16 MSBs.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
c0dda34080 video: rockchip: dw_mipi_dsi: Correct check for lacking phy phandle
If phy is not defined in DT (eg. on rk3399), generic_phy_get_by_name
will return -ENODATA. Handle that case correctly.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:10 +02:00
Ondrej Jirman
c463332209 video: rockchip: dw_mipi_dsi: Fix best_rate calculation
pllref_clk is unused after being retrieved. fin needs to be set
to dsi->ref clock's rate for the following calculation to work.
Otherwise fin is undefined, and calculation return bogus number
based on undefined variable.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:09 +02:00
Ondrej Jirman
02ad158f61 video: rockchip: dw_mipi_dsi: Return 0 from dsi_phy_init on success
ret is undefined if external phy is not used resulting in bogus
error being returned in that scenario.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:09 +02:00
Ondrej Jirman
45118cbffe video: rockchip: dw_mipi_dsi: Fix error path checks in probe function
Wrong return codes were checked in several places. Check the proper ones.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:09 +02:00
Ondrej Jirman
b3bd4bc7ab video: rockchip: dw_mipi_dsi: Fix external phy existnece check
&priv->phy is always true. Compiler warns about this loudly.

Use a propper check for phy device allocation. Without this fix
using this driver with SoC that doesn't use external phy (eg. RK3399)
doesn't work.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:09 +02:00
Ondrej Jirman
b58db81a01 video: dw_mipi_dsi: Fix hsync/vsync settings
These must be read from timings->flags, like other DSI HOST drivers do.

And they must not be inverted either. Low means low.

Without this fix, panel drivers that set *SYNC_LOW produce corrupted
output on screen (shifted horizobnntally and vertivally by back porch
distance).

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:09 +02:00
Ondrej Jirman
5d4b89d6f9 video: rockchip: vop: Fix whitespace
Fix confusing use of indentation.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:09 +02:00
Ondrej Jirman
b90c2ae79b Add support for Quartz Pro 64
Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:09 +02:00
Ondrej Jirman
e87310ea48 Import dt-bindings for LEDs from Linux 6.5
Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:09 +02:00
Ondrej Jirman
c1401ce581 rk3588: Disable JTAG on SD card pins
Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-31 16:27:09 +02:00
Ondrej Jirman
80bebaa3af arm: rk3588: Sync up DT with Linux
Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-21 22:00:48 +02:00
Ondrej Jirman
56dc31ec4a Add support for Orange Pi 5 Plus
Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-21 22:00:48 +02:00
Ondrej Jirman
4cae9a1e0e Add Quartz64-A support
U-Boot has terrible support for SPL stage regulators setup needed for
sdmmc0 to work on Quartz64-A. We avoid all the regulator setup dance
by using pwren pinmux on sdmmc0 in U-Boot and we achieve the needed
polarity for the enable pin (active low) via a new
CONFIG_MMC_DW_PWREN_POLARITY config property.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-21 22:00:48 +02:00