82743 Commits

Author SHA1 Message Date
Samuel Holland
9d8202dd5c Merge branch 'patch/usb-fam' into allwinner 2022-10-31 22:44:43 -05:00
Samuel Holland
e5dfab78fe Merge branch 'patch/spl-opensbi' into allwinner 2022-10-31 22:44:41 -05:00
Samuel Holland
eb6d1b57c4 Merge branch 'patch/phy-default' into allwinner
# Conflicts:
#	drivers/phy/allwinner/Kconfig
2022-10-31 22:44:24 -05:00
Samuel Holland
127363e341 Merge branch 'patch/nand-dm' into allwinner 2022-10-31 22:44:19 -05:00
Samuel Holland
108af9101a Merge branch 'patch/musb-charging' into allwinner
# Conflicts:
#	drivers/phy/allwinner/phy-sun4i-usb.c
2022-10-31 22:44:16 -05:00
Samuel Holland
66908e01f5 Merge branch 'patch/mkimage-toc1' into allwinner 2022-10-31 22:44:10 -05:00
Samuel Holland
65ab28b4b1 Merge branch 'patch/h6-dts' into allwinner 2022-10-31 22:44:08 -05:00
Samuel Holland
f79dc02433 Merge branch 'patch/h3-scp' into allwinner 2022-10-31 22:44:06 -05:00
Samuel Holland
dab20a30f5 Merge branch 'patch/h3-fit' into allwinner
# Conflicts:
#	arch/arm/Kconfig
2022-10-31 22:44:00 -05:00
Samuel Holland
fd7b044eb5 Merge branch 'patch/fdt-bounds-check' into allwinner 2022-10-31 22:43:30 -05:00
Samuel Holland
d1a727c9cb Merge branch 'patch/d1-serial' into allwinner 2022-10-31 22:43:28 -05:00
Samuel Holland
bfe12620ac Merge branch 'patch/d1-pinctrl' into allwinner 2022-10-31 22:43:26 -05:00
Samuel Holland
3c6a89e366 Merge branch 'patch/d1-mmc' into allwinner
# Conflicts:
#	arch/arm/mach-sunxi/Kconfig
#	configs/A13-OLinuXinoM_defconfig
#	configs/A13-OLinuXino_defconfig
#	configs/A20-OLinuXino-Lime2_defconfig
#	configs/A20-Olimex-SOM204-EVB_defconfig
#	configs/A33-OLinuXino_defconfig
#	configs/Ainol_AW1_defconfig
#	configs/Ampe_A76_defconfig
#	configs/Cubietruck_defconfig
#	configs/Empire_electronix_d709_defconfig
#	configs/Empire_electronix_m712_defconfig
#	configs/Wobo_i5_defconfig
#	configs/Yones_Toptech_BS1078_V2_defconfig
#	configs/bananapi_m2_berry_defconfig
#	configs/colorfly_e708_q1_defconfig
#	configs/difrnce_dit4350_defconfig
#	configs/dserve_dsrv9703c_defconfig
#	configs/gt90h_v4_defconfig
#	configs/iNet_3F_defconfig
#	configs/iNet_3W_defconfig
#	configs/iNet_D978_rev2_defconfig
#	configs/icnova-a20-swac_defconfig
#	configs/inet86dz_defconfig
#	configs/inet98v_rev2_defconfig
#	configs/inet_q972_defconfig
#	configs/polaroid_mid2407pxe03_defconfig
#	configs/polaroid_mid2809pxe04_defconfig
#	configs/q8_a13_tablet_defconfig
#	configs/q8_a23_tablet_800x480_defconfig
#	configs/q8_a33_tablet_1024x600_defconfig
#	configs/q8_a33_tablet_800x480_defconfig
2022-10-31 22:43:20 -05:00
Samuel Holland
31014d4e53 Merge branch 'patch/d1-kconfig' into allwinner
# Conflicts:
#	arch/arm/mach-sunxi/Kconfig
2022-10-31 22:42:45 -05:00
Samuel Holland
4643085196 Merge branch 'patch/d1-emac' into allwinner 2022-10-31 22:42:11 -05:00
Samuel Holland
5136f61816 Merge branch 'patch/d1-clk' into allwinner 2022-10-31 22:42:09 -05:00
Samuel Holland
007054c528 Merge branch 'patch/clk-legacy' into allwinner 2022-10-31 22:42:07 -05:00
Samuel Holland
615c6ad223 Merge branch 'patch/axp-gpio' into allwinner 2022-10-31 22:42:03 -05:00
Samuel Holland
42622d5521 Merge branch 'patch/a33-tablet-dts' into allwinner 2022-10-31 22:42:01 -05:00
Samuel Holland
305893084c spl: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI
This provides a unified configuration across all sunxi boards,
regardless of CPU architecture.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:40:22 -05:00
Samuel Holland
be670018a3 disk: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI
This provides a unified configuration across all sunxi boards,
regardless of CPU architecture.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:36:30 -05:00
Samuel Holland
dc98d5b696 drivers: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI
This provides a unified configuration across all sunxi boards,
regardless of CPU architecture.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:36:29 -05:00
Samuel Holland
a34fd3ce31 env: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI
This ensures the same environment layout will be used across all sunxi
boards, regardless of CPU architecture.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:36:03 -05:00
Samuel Holland
3196c03698 sunxi: Move most board options to the board Kconfig
This excludes options that are inherently ARM-specific or are specific
to legacy non-DM drivers.

Some help text is cleaned up along the way.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:36:00 -05:00
Samuel Holland
ac7381da70 sunxi: Move TEXT_BASE to the board Kconfig
This is how the vast majority of platforms provided TEXT_BASE.
sunxi was the exception here.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:53 -05:00
Samuel Holland
9c3f889d72 sunxi: Move SYS_LOAD_ADDR to the board Kconfig
This will provide a default value for RISC-V when that is added, and it
makes sense to put this option next to the other DRAM layout options.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:53 -05:00
Samuel Holland
0110f352eb sunxi: Move SPL_TEXT_BASE to the board Kconfig
It makes sense to put this near the definition of SUNXI_SRAM_ADDRESS.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:53 -05:00
Samuel Holland
4c0ec2d156 sunxi: Move SPL_BSS_START_ADDR to the board Kconfig
This provides a default value for RISC-V when that is added, and it
makes sense to put this option next to the other DRAM layout options.

While at it, provide sensible values for platforms with less DRAM.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:53 -05:00
Samuel Holland
a759def05c sunxi: Move PRE_CON_BUF_ADDR to the board Kconfig
This provides a default value for RISC-V when that is added, and it
makes sense to put this option next to the other DRAM layout options.

While at it, provide sensible values for platforms with less DRAM.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:53 -05:00
Samuel Holland
b44e50d3f3 sunxi: Clean up the SPL_STACK_R_ADDR defaults
Update this option to be based on SUNXI_MINIMUM_DRAM_MB. This corrects
the value used on V3s, which previously was the MACH_SUN8I default, and
so relied on addresses wrapping modulo the DRAM size.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:53 -05:00
Samuel Holland
665abb4e4a sunxi: Hide the SUNXI_MINIMUM_DRAM_MB symbol
This option affects the ABI between SPL/U-Boot and U-Boot/scripts, so it
should not normally be changed by the user.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:53 -05:00
Samuel Holland
8e5e0e91d5 sunxi: Move default values to the board Kconfig
This keeps all of the defaults for sunxi platforms in one place. Most of
these only depend on architecture-independent features of the SoC (clock
tree or SRAM layout) anyway.

No functional change; just some minor help text cleanup.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:52 -05:00
Samuel Holland
cd193be996 sunxi: Enable the I2C driver by default
This is used by quite a large number of boards, for PMIC/regulator or
LCD panel control.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:52 -05:00
Samuel Holland
7d38e1cf7c sunxi: Downgrade driver selections to implications
While not especially likely, it is plausible that someone wants to build
U-Boot without GPIO or UART support. Don't force building these drivers.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:52 -05:00
Samuel Holland
9a3d746a74 sunxi: Globally enable SUPPORT_SPL
This was already supported by every machine type. It is unlikely that
any new SoC support will be added without SPL support.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:52 -05:00
Samuel Holland
c4a7f99fa2 sunxi: Move most Kconfig selections to the board Kconfig
To maintain consistent behavior across architectures, most of the
options selected by ARCH_SUNXI should be selected for the D1 SoC as
well. To accomplish this, select them from BOARD_SUNXI instead.

No functional change here. Lines are only moved and alphabetized.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:51 -05:00
Samuel Holland
1c30baf6d6 sunxi: Share the board Kconfig across architectures
With the introduction of the Allwinner D1, the sunxi board family now
spans multiple architectures (ARM and RISC-V). Since ARCH_SUNXI depends
on ARM, it cannot be used to gate architecture-independent options.
Specifically, this means the board Kconfig file cannot be sourced from
inside the "if ARCH_SUNXI" block.

Introduce a new BOARD_SUNXI symbol that can be selected by both
ARCH_SUNXI now and the new RISC-V SoC symbols when they are added, and
use it to gate the architecture-independent board options.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:25 -05:00
Samuel Holland
00394be831 sunxi: Hide image type selection if SPL is disabled
This choice is meaningless when SPL is disabled. Hide it to avoid any
possible confusion.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:25 -05:00
Samuel Holland
3cce77c1b2 sunxi: Add missing dependencies to Kconfig selections
Some of the selected symbols have a user-visible dependency. Make the
selections conditional on that dependency to avoid creating invalid
configurations.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:25 -05:00
Samuel Holland
6322810dc7 sunxi: Remove unnecessary Kconfig selections
Two of these selections are redundant and have no effect:
 - DM_KEYBOARD is selected by USB_KEYBOARD
 - DM_MMC is selected by MMC

This selection has no effect by default and is unnecessarily strong:
 - USB_STORAGE is implied by DISTRO_DEFAULTS

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:25 -05:00
Samuel Holland
93087cb2d1 sunxi: Fix default-enablement of USB host drivers
We tried to enable USB_EHCI_GENERIC and USB_OHCI_GENERIC by default.
This did not work because those symbols depend on USB_EHCI_HCD and
USB_OHCI_HCD, which were not enabled. Fix this by implying all four.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:34:25 -05:00
Samuel Holland
4f9ae8c498 sunxi: Regenerate defconfigs
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:32:54 -05:00
Samuel Holland
cfb7b08923 gpio: axp: Report the correct value for outputs
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:32:54 -05:00
Samuel Holland
20575f5984 gpio: axp: Add pull-down support for AXP22x/AXP8xx variant
The AXP221 and newer PMICs support a pull-down function on their GPIOs.
Add support for it.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:32:54 -05:00
Samuel Holland
646df59cdc gpio: axp: Add support for getting the pin function
Implement the .get_function operation, so the gpio command can report
the current function. Since the GPIOF_FUNC (versus GPIOF_UNUSED) mux
values vary among the PMICs, report all non-GPIO mux values as UNKNOWN.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:32:54 -05:00
Samuel Holland
a3a6dde671 gpio: axp: Select variant from compatible at runtime
There are three major variants of the AXP PMIC GPIO functionality (plus
PMICs with no GPIOs at all). Except for GPIO3 on the AXP209, which uses
a different register layout, it is straightforward to support all three
variants with a single driver. Do this, and in the process remove the
GPIO-related definitions from the PMIC-specific headers, and therefore
the dependency on AXP_PMIC_BUS.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:32:54 -05:00
Samuel Holland
d4edb951f7 gpio: axp: Use DM_PMIC functions for register access
Now that the PMIC driver implements the DM_PMIC uclass, those functions
can be used instead of the platform-specific "pmic_bus" functions.

Since the driver still uses the single set of register definitions from
axpXXX.h (as selected by AXPxxx_POWER), it still depends on one of those
choices, and therefore also AXP_PMIC_BUS.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:32:54 -05:00
Samuel Holland
3fe7ba6039 gpio: axp: Bind via device tree
Now that the PMIC has a DM driver and binds device tree subnodes, the
GPIO device can be bound that way, instead of from inside board code.

Since the driver still uses the single set of register definitions from
axpXXX.h (as selected by AXPxxx_POWER), it does not differentiate among
the supported compatibles.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:32:53 -05:00
Samuel Holland
eedbe58ecd gpio: axp: Consistently use the "axp_gpio" order
This is less confusing than half of the driver using "axp_gpio" and the
other half using "gpio_axp".

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:32:53 -05:00
Samuel Holland
23f4f47cd8 ARM: dts: sunxi: Add AXP221 and AXP809 GPIO nodes
These PMICs each have two GPIO pins, and are supported by the axp_gpio
driver. In order to convert the axp_gpio driver to probe using the
device tree, the corresponding device tree nodes must be present. Add
them, following the same binding as the AXP209 and AXP813.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-10-31 22:32:53 -05:00