78268 Commits

Author SHA1 Message Date
Cezary Sobczak
a53389af5e sun20i: set CONFIG_SYS_BOOTM_LEN for RISC-V
If this value is not increased, the error occurs during loading
uncompressed kernel from fitImage:
"Error: inflate() returned -5
Image too large: increase CONFIG_SYS_BOOTM_LEN"

Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
d1-2022-03-18
2022-03-18 00:02:45 -05:00
Samuel Holland
00db730a70 sunxi: Use sunxi-common.h for D1 port
This shows the changes needed to sunxi-common.h, so it makes upstreaming
a little bit easier.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
Samuel Holland
72195d6519 sunxi: Add a U-Boot port for the Lichee RV 86 Panel
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
Jisheng Zhang
66de75ee48 sunxi: Add a U-Boot port for the Lichee RV and its dock
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
[Samuel: licheepi -> lichee; drop DRAM size; other changes]
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
TekkamanV
4b375703ff riscv64: update nezha_defconfig for development/testing
Signed-off-by: TekkamanV <tekkamanv@163.com>
[Samuel: Kept default prompt, trimmed things to stay under 1 MiB]
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
TekkamanV
5ffe0f6d74 sun20i: Add some variables to the default environment
Signed-off-by: TekkamanV <tekkamanv@163.com>
[Samuel: Only kept the non-Fedora-specific subset of changes]
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
Samuel Holland
b124274412 sunxi: Add a U-Boot port for the Allwinner D1 Nezha
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
Samuel Holland
fe9ab6afca sunxi: Convert some Kconfig defaults to implies
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
Samuel Holland
75f553177a board: riscv: Sort target configs alphabetically
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
Samuel Holland
e7f9ea0a7d riscv: cpu: Add cache operations for T-HEAD CPUs
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
Samuel Holland
e3541ca58e usb: musb-new: Hack up the driver for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
Samuel Holland
bb9385760a [BROKEN] spi: sunxi: Add support for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:45 -05:00
Samuel Holland
a385864fc0 spi: sunxi: Hack up the driver for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
22fa2b3626 pinctrl: sunxi: Hack up the driver for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
dfc078d7e4 pinctrl: sunxi: Add support for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
dbdcfe9231 phy: sun4i-usb: Add support for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
ffaebb3e96 phy: sun4i-usb: Hack up the driver for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Andre Przywara
5f344b50fa phy: sun4i-usb: Rework HCI PHY (aka. "pmu_unk1") handling
As Icenowy pointed out, newer manuals (starting with H6) actually
document the register block at offset 0x800 as "HCI controller and PHY
interface", also describe the bits in our "PMU_UNK1" register.
Let's put proper names to those "unknown" variables and symbols.

While we are at it, generalise the existing code by allowing a bitmap
of bits to clear and set, to cover newer SoCs: The A100 and H616 use a
different bit for the SIDDQ control.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
4ad8e32787 net: sun8i-emac: Downgrade printf in probe to debug
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
dbacdeaa23 net: sun8i_emac: Hack up the driver for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
f14e84087a mmc: sunxi: Hack up the driver for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
8432543a1e gpio: sunxi: Hack up the driver for the D1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
4a432a19ac clk: sunxi: Add support for D1 CCU
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
70bac0b386 dt-bindings: leds: Update common binding
Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-18 00:02:44 -05:00
Samuel Holland
da3bea429b Merge branch 'patch/axp-gpio' into allwinner
# Conflicts:
#	arch/arm/mach-sunxi/Kconfig
2022-03-17 23:43:43 -05:00
Samuel Holland
92a3de0b52 Merge branch 'patch/axp-vbus' into allwinner
# Conflicts:
#	arch/arm/include/asm/arch-sunxi/gpio.h
2022-03-17 23:43:38 -05:00
Samuel Holland
64da08b720 Merge branch 'patch/dm-i2c' into allwinner 2022-03-17 23:43:30 -05:00
Samuel Holland
b9cbe59bfc Merge branch 'patch/dm-pinctrl' into allwinner 2022-03-17 23:43:28 -05:00
Samuel Holland
46322617a6 Merge branch 'patch/h6-dts' into allwinner 2022-03-17 23:43:26 -05:00
Samuel Holland
eca24c30ef Merge branch 'patch/dt-sync' into allwinner 2022-03-17 23:43:23 -05:00
Samuel Holland
5001f243a1 Merge branch 'patch/h3-scp' into allwinner 2022-03-17 23:43:22 -05:00
Samuel Holland
9fd8cea961 Merge branch 'patch/h3-fit' into allwinner 2022-03-17 23:43:20 -05:00
Samuel Holland
a09f8e652d Merge branch 'patch/mkimage-toc1' into allwinner 2022-03-17 23:43:17 -05:00
Samuel Holland
3a2254ab61 Merge branch 'patch/mkimage-toc0' into allwinner 2022-03-17 23:43:15 -05:00
Samuel Holland
226053a04a Merge branch 'patch/mkimage-riscv' into allwinner 2022-03-17 23:43:12 -05:00
Samuel Holland
cc140bca41 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-03-17 23:41:14 -05:00
Samuel Holland
86680ef02b 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-03-17 23:41:14 -05:00
Samuel Holland
fa2e69b860 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-03-17 23:41:14 -05:00
Samuel Holland
c424a1faae 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-03-17 23:41:14 -05:00
Samuel Holland
a73b3739cb 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-03-17 23:41:14 -05:00
Samuel Holland
030fe5df59 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-03-17 23:41:13 -05:00
Samuel Holland
e03e25e58c 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-03-17 23:41:13 -05:00
Samuel Holland
469878ae11 phy: sun4i-usb: Use DM_GPIO for id/vbus_det GPIOs
Now that the sunxi_gpio driver handles pull-up/down via the driver
model, we can switch to DM_GPIO for these pins with no loss in
functionality. Since the driver now gets its pin configuration from
the device tree, we can remove the Kconfig symbols.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-17 23:41:10 -05:00
Samuel Holland
f6b9fbe0c2 gpio: axp/sunxi: Remove virtual VBUS enable GPIO
Now that this functionality is modeled using the device tree and
regulator uclass, the named GPIO is not referenced anywhere. Remove
it, along with the rest of the support for AXP virtual GPIOs.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-17 23:41:10 -05:00
Samuel Holland
d699110da4 sunxi: Remove obsolete USBx_VBUS_PIN Kconfig symbols
Now that the USB PHY driver uses the device tree to get VBUS supply
regulators, these Kconfig symbols are unused. Remove them.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-17 23:41:10 -05:00
Samuel Holland
b9a1e34480 phy: sun4i-usb: Control USB supplies via regulator uclass
The device tree binding for the PHY provides VBUS supplies as regulator
references. Now that all boards have the appropriate regulator uclass
drivers enabled, the PHY driver can switch to using them. This replaces
direct GPIO usage, which in some cases needed a special DM-incompatible
"virtual" GPIO from the PMIC.

The following boards provided a value for CONFIG_USB0_VBUS_PIN, but are
missing the "usb0_vbus-supply" property in their device tree. None of
them have the MUSB controller enabled in host or OTG mode, so they
should see no impact:
 - Ainol_AW1_defconfig / sun7i-a20-ainol-aw1
 - Ampe_A76_defconfig / sun5i-a13-ampe-a76
 - CHIP_pro_defconfig / sun5i-gr8-chip-pro
 - Cubieboard4_defconfig / sun9i-a80-cubieboard4
 - Merrii_A80_Optimus_defconfig / sun9i-a80-optimus
 - Sunchip_CX-A99_defconfig / sun9i-a80-cx-a99
 - Yones_Toptech_BD1078_defconfig / sun7i-a20-yones-toptech-bd1078
 - Yones_Toptech_BS1078_V2_defconfig /
   sun6i-a31s-yones-toptech-bs1078-v2
 - iNet_3F_defconfig / sun4i-a10-inet-3f
 - iNet_3W_defconfig / sun4i-a10-inet-3w
 - iNet_86VS_defconfig / sun5i-a13-inet-86vs
 - iNet_D978_rev2_defconfig / sun8i-a33-inet-d978-rev2
 - icnova-a20-swac_defconfig / sun7i-a20-icnova-swac
 - sun8i_a23_evb_defconfig / sun8i-a23-evb

Similarly, the following boards set CONFIG_USB1_VBUS_PIN, but do not
have "usb1_vbus-supply" in their device tree. Neither of them have USB
enabled at all, so again there should be no impact:
 - Cubieboard4_defconfig / sun9i-a80-cubieboard4 (also for USB3)
 - sun8i_a23_evb_defconfig / sun8i-a23-evb

The following boards use a different pin for USB1 VBUS between their
defconfig and their device tree. Depending on which is correct, they
may be broken:
 - Linksprite_pcDuino3_Nano_defconfig (PH11) /
   sun7i-a20-pcduino3-nano (PD2)
 - icnova-a20-swac_defconfig (PG10) / sun7i-a20-icnova-swac (PH6)

Finally, this board has conflicting pins given for its USB2 VBUS:
 - Lamobo_R1_defconfig (PH3) / sun7i-a20-lamobo-r1 (PH12)

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-17 23:41:10 -05:00
Samuel Holland
2cc77cb5e0 sunxi: Enable fixed regulator support for USB supplies
On many boards, the USB ports are powered by a GPIO-controlled fixed
regulator. In preparation for switching the USB PHY driver to use the
regulator uclass instead of driving the GPIO directly, ensure these
boards have fixed regulator support enabled.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-17 23:41:10 -05:00
Samuel Holland
f5258fe344 sunxi: Enable PMIC drivevbus regulator support for USB supplies
On many boards, the USB ports are powered by the PMIC's "drivevbus"
regulator. In preparation for switching the USB PHY driver to use the
regulator uclass instead of a virtual GPIO pin, ensure these boards
have AXP PMIC regulator support enabled.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-17 23:41:10 -05:00
Samuel Holland
b35fe88648 power: pmic: axp: Probe the drivevbus regulator from the DT
Now that some regulator driver exists for this PMIC, add support for
probing regulator drivers from the device tree subnodes.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-17 23:41:09 -05:00
Samuel Holland
c10b3c9e33 power: regulator: Add a driver for the AXP PMIC drivevbus
The first AXP regulator converted to use the regulator uclass is the
drivevbus switch, since it is used by the USB PHY driver.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-03-17 23:41:09 -05:00