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

57997 Commits

Author SHA1 Message Date
Ondrej Jirman
2294329d17 Add support for AXP805 on H6 2019-07-21 08:33:52 +02:00
Ondrej Jirman
2d112c0ee1 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-18 15:09:00 +02:00
Andre Przywara
b98477ad54 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-18 15:09:00 +02:00
Andre Przywara
bea53c9d1f 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-18 15:09:00 +02:00
Ondrej Jirman
c798186081 Trim down u-boot for Orange Pi 3 2019-07-18 15:09:00 +02:00
Ondrej Jirman
fa0887534c sunxi: Add basic Orange Pi 3 support 2019-07-18 15:08:59 +02:00
Ondrej Jirman
c88677d5d6 sunxi: Sync H6 dtsi with Linux 5.2 2019-07-18 15:08:47 +02:00
Ondrej Jirman
a0ac5eac98 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-07-18 15:08:46 +02:00
Ondrej Jirman
b10b50732f axp: Support more LED blinking modes
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-18 15:08:46 +02:00
Ondrej Jirman
355e7b227b configs: tbs_a711: Enable axp command
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-18 15:08:46 +02:00
Ondrej Jirman
5c13b2d66f configs: tbs_a711: Enable BMP command
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-18 15:08:46 +02:00
Ondrej Jirman
efe9f654cf configs: tbs_a711: Enable LVDS/DE2
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-18 15:08:46 +02:00
Ondrej Jirman
0c29d6ed7b configs: tbs_a711: Enable backlight
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-18 15:08:46 +02:00
Ondrej Jirman
7ea9aa2d14 configs: tbs_a711: Enable touch panel and tmenu command
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-18 15:08:46 +02:00
Ondrej Jirman
9b3bf2c2fb configs: tbs_a711: Enable mydbg command
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-18 15:08:46 +02:00
Ondrej Jirman
0f944455b3 configs: tbs_a711: Disable boot delay
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-18 15:08:46 +02:00
Ondrej Jirman
e0b9f3af75 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-07-18 15:08:46 +02:00
Ondrej Jirman
516b7a3295 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-07-18 15:08:46 +02:00
Ondrej Jirman
3f2f253558 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-07-09 01:39:25 +02:00
Ondrej Jirman
c6c9787f76 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-07-09 01:39:25 +02:00
Ondrej Jirman
93c1c574f5 power: axp818: Suport DCDC6 in AXP818 2019-07-09 01:39:25 +02:00
Ondrej Jirman
6657a3d114 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-07-09 01:39:25 +02:00
Ondrej Jirman
3c416a9ede 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-07-09 01:39:25 +02:00
Ondrej Jirman
666023059d 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-07-09 01:39:24 +02:00
Ondrej Jirman
823ae00489 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-07-09 01:39:24 +02:00
Ondrej Jirman
89bd6de9e5 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-07-09 01:39:24 +02:00
Ondrej Jirman
10bad401f5 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-07-09 01:39:24 +02:00
Ondrej Jirman
17344c9975 video: pwm_backlight: Fix broken build when DM_REGULATOR is disabled
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-09 01:34:47 +02:00
Ondrej Jirman
3cf82704c5 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-07-09 01:34:46 +02:00
Ondrej Jirman
0f055cda88 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-07-09 01:34:46 +02:00
Ondrej Jirman
15835aa989 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-07-09 01:34:46 +02:00
Ondrej Jirman
4a56475dd9 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-07-09 01:34:46 +02:00
Ondrej Jirman
e4f32c8a22 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-07-09 01:34:46 +02:00
Ondrej Jirman
8d2162d608 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-07-09 01:34:46 +02:00
Ondrej Jirman
f5ae1e774b 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-07-09 01:34:46 +02:00
Ondrej Jirman
e50fab346b 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-07-09 01:34:46 +02:00
Ondrej Jirman
1b738c0984 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-07-09 01:34:45 +02:00
Ondrej Jirman
12574a8b9e 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-07-09 01:34:45 +02:00
Ondrej Jirman
7128e732cd 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-07-09 01:34:45 +02:00
Ondrej Jirman
266a269163 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-07-09 01:34:45 +02:00
Ondrej Jirman
221fc73a28 sunxi: defconfig: Customize configs for my Orange Pi boards
Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-09 01:34:45 +02:00
Ondrej Jirman
070633aa26 sunxi: h3: Fix PLL1 setup to never use dividers
Kernel would lower the divider on first CLK change and cause the
lock up.
2019-07-09 01:34:45 +02:00
Ondrej Jirman
ba1c557b69 sunxi: h3: Improve PLL lock detection on H3 2019-07-09 01:34:45 +02:00
Ondrej Jirman
04b9205be0 Use snprintf in confdata.c to avoid possible buffer overflow
And gcc8 warnings.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-09 01:34:44 +02:00
Ondrej Jirman
3605c23290 Disable new gcc8 warnings in Makefile
As I can't fix broken generated swig code.

Signed-off-by: Ondrej Jirman <megous@megous.com>
2019-07-09 01:34:44 +02:00
Tom Rini
e5aee22e4b Prepare v2019.07
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-08 15:23:28 -04:00
Tom Rini
0bd2a92f54 Merge tag 'mips-fixes-for-2019.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-mips
- mtmips: network stability fixes for gardena-smart-gateway
2019-07-08 07:29:33 -04:00
Weijie Gao
d24416c3fa arm: mediatek: remove arch_misc_init
The watchdog of mediatek chips is enabled by bootrom before u-boot is
running. Previously we choose to enable the wdt driver only to disable the
watchdog hardware.

Now wdt service is enabled by default. The function arch_misc_init which is
only used to disable wdt is no longer needed.

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-07-07 17:38:55 -04:00
Weijie Gao
84b2416b6a board_r: move initr_watchdog to be called after initr_serial
The initr_watchdog is currently placed before initr_serial. The
initr_watchdog calls printf and printf finally calls ops->putc of a serial
driver.

However, gd->cur_serial_dev points to a udevice allocated in board_f. The
gd->cur_serial_dev->driver->ops->putc points the the code region before
relocation.

Some serial drivers call WATCHDOG_RESET() in ops->putc. When DM is enabled
for watchdog, watchdog_reset() is called. watchdog_reset() calls get_timer
to get current timer.

On some platforms the timer driver is also a DM driver. initr_watchdog is
placed right after initr_dm, which means the timer driver hasn't been
initialized. So dm_timer_init() is called. To create a new udevice, calloc
is called.

However start from ops->putc, u-boot execution flow is redirected into the
memory region before relocation (board_f). In board_f, dlmalloc hasn't
been initialized. The call to calloc will fail, and this will cause DM to
print out an error message, and it will call printf again, causing
recursive error outputs.

This patch places initr_watchdog after initr_serial to solve this issue.

Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
Tested-by: Suniel Mahesh <sunil.m@techveda.org>
2019-07-07 17:38:17 -04:00
Tom Rini
3c1ead9081 Merge tag 'dm-pull-7jul19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
Fix booting for wandboard
2019-07-07 16:17:56 -04:00