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

55818 Commits

Author SHA1 Message Date
Ondrej Jirman
c2675f18c0 Fix unreliable detection of DRAM size on Orange Pi 3
In mctl_mem_matches() we need to flush/invalidate cache, so that
we can be sure, we're actually reading back data from DRAM, and
not values cached in data cache.

This fixes unreliable detection of DRAM size on Orange Pi 3.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-17 02:28:23 +02:00
Andre Przywara
cb9c7bcb92 sunxi: H6: DRAM: follow recommended PHY init algorithm
The DRAM controller manual suggests to first program the PHY
initialisation parameters to the PHY_PIR register, and then set bit 0 to
trigger the initialisation. This is also used in boot0.

Follow this recommendation by setting bit 0 in a separate step.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-07-17 00:28:06 +02:00
Andre Przywara
0edd36766a sunxi: H6: DRAM: avoid memcpy() on MMIO registers
Using memcpy() is, however tempting, not a good idea: It depends on the
specific implementation of memcpy, also lacks barriers. In this
particular case the first registers were written using 64-bit writes,
and the last register using four separate single-byte writes.

Replace the memcpy with a proper loop using the writel() accessor.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-07-17 00:28:01 +02:00
Ondrej Jirman
dfde4c0e07 Orange Pi 3 fix 2019-04-25 10:33:13 +02:00
Ondrej Jirman
456daf3e49 sunxi: Fix SoC reset on H6 SoC by using R_WDOG
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
5cfb187ad1 sunxi: Add basic Orange Pi 3 support 2019-04-17 17:51:44 +02:00
Ondrej Jirman
7fcd7a1f78 pwm: sunxi-pwm: Add compatible for H3
A83T DTS from Linux uses allwinner,sun8i-h3-pwm.

So we need this driver to support it too.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
c822548857 axp: Support more LED blinking modes
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
47c0de0231 configs: tbs_a711: Enable axp command
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
4259b67a97 configs: tbs_a711: Enable BMP command
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
3a8e1a4d76 configs: tbs_a711: Enable LVDS/DE2
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
8935f6ce7a configs: tbs_a711: Enable backlight
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
0b2fc853ef configs: tbs_a711: Enable touch panel and tmenu command
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
441cd747c0 configs: tbs_a711: Enable mydbg command
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
1889b224b0 configs: tbs_a711: Disable boot delay
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
8fe915345f configs: tbs_a711: Streamline u-boot by disabling DISTRO_DEFAULTS and NET
Not needed on this board.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
fb86e37e5c sunxi: Enable support for BMP image format (plain and gzip compressed)
This is needed in order to be able to use `bmp` command on sunxi boards.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
a10a363753 cmd: Add axp command for reading values from AXP81x PMIC
This is useful for boot scripts to be able to decide whether to
boot or not and whether to notify the user of what is wrong.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
2dfa2ae65b power: axp818: Add various helper functions for accessing AXP81x PMIC status
These will be used by the upcomming `axp` command.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
bf8d675ba8 power: axp818: Suport DCDC6 in AXP818 2019-04-17 17:51:44 +02:00
Ondrej Jirman
66b9d7ef7b sunxi: dts: Add nodes for LCD panel and backlight
Device tree is slightly different from Linux kernel one, because of
different ABI for display timings between u-boot and Linux.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
e4dc089284 sunxi: Enable DE2/LVDS support on A83T
Now that the code is in place, enable SUNXI_DE2 and LCD panel support
for MACH_SUN8I_A83T.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
7e7b9745d3 video: sunxi: de2: Support A83T SoC
DE2 PLL on A83T does not have selectable parent, nor is it separately
gateable.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
f4730e6065 video: sunxi: Support LVDS output on A83T (mess)
This is probably useless ATM.

Except for hsync/vsync polarity (seems to be wrong in the kernel).

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
b6a71ee439 video: sunxi: Support LVDS output on A83T
- Enable LVDS pins (PD18-PD27)
- De-assert LVDS interface reset line
- Enable sunxi_lcd platform device for A83T
- Really disable all interrupts
- A83T does have only a simple clock gate for TCON0 clock
  (no need to select source)
- Lifted some analog circuitry setup magic from the Linux driver

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
506702a28d video: sunxi: Don't build HDMI code when HDMI is not enabled
This prevents compile errors for A83T build, that does not support
HDMI yet.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
a0acd92884 video: pwm_backlight: Support PWM polarity setting in DTS
User can set PWM polarity in devicetree, but this setting was not
passed on to a PWM driver.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
ae8b86a379 video: pwm_backlight: Fix broken build when DM_REGULATOR is disabled
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
08774eb5c9 sunxi: A83T doesn not have display frontend
This was probably copy pasted in from sun6i header.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
d6ee196b46 sunxi: Add clock support for pll3 and pll_de for A83T SoC
This is needed in order to support DE2 on A83T. PLL3 is for TCON0.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
71ded8dc01 sunxi: Rename pll10 to pll_de to avoid confusion
A83T SoC has PLL_DE at pll9. Change the name to make it less
confusing when we'll add DE2 support for A83T.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
f67392426f cmd: Add mydbg command (A83T SoC debugging helpers)
This can be used to dump various registers and do other kinds of
mischief when developing drivers.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
726775c046 cmd: 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>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
4957500719 dts: Add touchscreen device connected to i2c0 on TBS A711 tablet
We don't have DM support for PMIC/GPIO/regulators, so this needs
to be handled via config options and some custom board initialization
code for now.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
5ecfdd60b7 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>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
bb65c82be0 power: axp818: Add support for configuring GPIO0 LDO voltage on AXP81x
To enable LDO on GPIO0 and set it to required voltage define
CONFIG_AXP_GPIO_LDO0_VOLT=<mV> in your defconfig. Eg. <mV> can
be 3100 for 3.1V.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
48a5cc73de sunxi: Add support for i2c0 pinctrl/clock initialization on Allwinner A83T
To enable I2C0 on A83T add CONFIG_I2C0_ENABLE=y to defconfig and
enable appropriate node in device tree.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
98e1be8664 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>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
b19948de49 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>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
4f80f3dade cmd: Add ariscrun command for starting CPUS
CPUS is a power management co-processor on some Allwinner SoCs (H3,
A83T).

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
70531427aa sunxi: defconfig: Customize configs for my Orange Pi boards
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:44 +02:00
Ondrej Jirman
6fa3ff3267 sunxi: h3: Fix PLL1 setup to never use dividers
Kernel would lower the divider on first CLK change and cause the
lock up.
2019-04-17 17:51:44 +02:00
Ondrej Jirman
de345ef6ed sunxi: h3: Improve PLL lock detection on H3 2019-04-17 17:51:43 +02:00
Ondrej Jirman
7f0db8ab9e Use snprintf in confdata.c to avoid possible buffer overflow
And gcc8 warnings.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:43 +02:00
Ondrej Jirman
3b89917df9 Disable new gcc8 warnings in Makefile
As I can't fix broken generated swig code.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-04-17 17:51:43 +02:00
Ondrej Jirman
cbbf1754ec sunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled 2019-04-17 17:51:43 +02:00
Tom Rini
3c99166441 Prepare v2019.04
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-04-08 21:40:40 -04:00
Jagan Teki
85c3d46322 arm: sunxi: Enable DM_MMC on required SoCs
Enabling DM_MMC is forcing CONFIG_BLK=y so if any board which uses
SCSI must need to enable DM_SCSI otherwise SCSI reads on that particular
target making invalid reading to the disk drive.

Allwinner platform do support SCSI on A10, A20 and R40 SoC's out of
these only A10 have DM_SCSI enabled. So enabling DM_MMC on A20, R40
would eventually end-up with scsi disk read failures like [1]

So, enable DM_MMC in all places of respective SoC's instead of enabling
them globally to Allwinner platform.

Now, DM_MMC is enabled in Allwinner SoC's except A20 and R40.

[1] https://lists.denx.de/pipermail/u-boot/2019-April/364057.html

Reported-by: Pablo Sebastián Greco <pgreco@centosproject.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2019-04-08 16:35:15 -04:00
Tom Rini
c48b07a9fd Merge tag 'fixes-for-2019.04-rc4' of git://git.denx.de/u-boot-staging
- i.MX8QXP-MEK ethernet fix
2019-04-08 10:11:29 -04:00
Andrejs Cainikovs
e82fa10b3e dts: imx8qxp-mek: Add PHY post reset delay
PHY cannot be detected unless we wait about 150 ms.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@netmodule.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-04-08 15:24:39 +02:00