Re: [linux-sunxi] [PATCH 04/17] i2c: mvtwsi: sunxi: update macro

2021-01-03 Thread Samuel Holland
r those SoCs. > > Signed-off-by: Jernej Skrabec Reviewed-by: Samuel Holland

Re: [linux-sunxi] [PATCH 02/17] sunxi: Introduce common symbol for H6 like SoCs

2021-01-03 Thread Samuel Holland
On 1/3/21 3:26 AM, Jernej Skrabec wrote: > It turns out that there are at least 2 other SoCs which have basically > the same memory map, similar clocks and other features as H6. It's very > likely that we'll see more such SoCs in the future. In order to ease > porting to new SoCs and lower ifdef

Re: [linux-sunxi] [PATCH 05/17] sunxi: prcm: Add memory map for H6 like SoCs

2021-01-03 Thread Samuel Holland
On 1/3/21 3:26 AM, Jernej Skrabec wrote: > There was no need to have prcm definitions for H6 and similar SoCs till > now. However, support R_I2C will be needed soon in SPL. > > Move old definitions to prcm_sun6i.h and add new ones in prcm_sun50i.h. > One of those files will be selected in common

Re: [linux-sunxi] [PATCH 06/17] sunxi: Add support for I2C on H6 like SoCs

2021-01-03 Thread Samuel Holland
On 1/3/21 3:26 AM, Jernej Skrabec wrote: > I2C support, especially R_I2C port, will be needed in future. Upcoming > support for H616 will need R_I2C to adjust DRAM voltage. > > Signed-off-by: Jernej Skrabec Reviewed-by: Samuel Holland

Re: [linux-sunxi] [PATCH v6 3/3] arm64: dts: sun50i: Add support for Orange Pi 3

2021-01-10 Thread Samuel Holland
On 1/10/21 1:29 PM, Jernej Skrabec wrote: > From: Andre Heider > > dts file is taken from Linux 5.11-rc1 tag. > > The Bluetooth controller of this device ships with a default address, > use the new CONFIG_FIXUP_BDADDR option to fix it up. This still references the old config name. It should be

Re: [linux-sunxi] Re: [PATCH v2 05/21] sunxi: prcm: Add memory map for H6 like SoCs

2021-01-21 Thread Samuel Holland
On 1/21/21 7:14 PM, Andre Przywara wrote: > On Mon, 11 Jan 2021 21:11:37 +0100 > Jernej Skrabec wrote: > >> There was no need to have prcm definitions for H6 and similar SoCs till >> now. However, support R_I2C will be needed soon in SPL. >> >> Move old definitions to prcm_sun6i.h and add new

Re: [PATCH v2 16/21] sunxi: Add H616 FEL support

2021-01-19 Thread Samuel Holland
On 1/11/21 2:11 PM, Jernej Skrabec wrote: > H616 uses different address for reset. Add it. > > Signed-off-by: Jernej Skrabec > --- > arch/arm/cpu/armv8/fel_utils.S | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/cpu/armv8/fel_utils.S

Re: [linux-sunxi] [PATCH] sunxi: Properly check for SATAPWR and MACPWR

2021-01-18 Thread Samuel Holland
andalone compiler switches. Ethernet still works, and the speed-up is welcome. Tested-by: Samuel Holland # Orange Pi WinPlus Cheers, Samuel

Re: [linux-sunxi] [PATCH 10/17] sunxi: add support for R_I2C on H616

2021-01-03 Thread Samuel Holland
e you checked if that is the case? Either way: Reviewed-by: Samuel Holland > #define SUN9I_GPN_R_RSB 3 > > diff --git a/board/sunxi/board.c b/board/sunxi/board.c > index 54ff9bc92396..727e8320318f 100644 > --- a/board/sunxi/board.c > +++ b/board/sunxi/board.c &g

Re: [linux-sunxi] [PATCH 07/17] sunxi: support loading with SPL > 32KB

2021-01-03 Thread Samuel Holland
On 1/3/21 3:26 AM, Jernej Skrabec wrote: > From: Andre Przywara > > H616 supports and needs bigger SPL than 32 KiB, mostly due to big DRAM > driver and need for PMIC configuration, which pull several drivers which > are not needed otherwise. > > Signed-off-by: Andre Przywara > Signed-off-by:

Re: [linux-sunxi] [PATCH 08/17] sunxi: introduce support for H616 clocks

2021-01-03 Thread Samuel Holland
+#ifdef CONFIG_MACH_SUN50I_H6 > + int m = 4; > +#else > + int m = 2; > +#endif This looks like a good place for an IS_ENABLED ternary. > uint32_t rval = readl(>pll6_cfg); > int n = ((rval & CCM_PLL6_CTRL_N_MASK) >> CCM_PLL6_CTRL_N_SHIFT); > @@ -9

Re: [linux-sunxi] [PATCH 09/17] sunxi: add support for H616 uart0

2021-01-03 Thread Samuel Holland
On 1/3/21 3:26 AM, Jernej Skrabec wrote: > This port is used for debug terminal on all known H616 boards. > > Signed-off-by: Jernej Skrabec Reviewed-by: Samuel Holland

Re: [linux-sunxi] [PATCH 11/17] sunxi: Add H616 DRAM support

2021-01-03 Thread Samuel Holland
On 1/3/21 3:26 AM, Jernej Skrabec wrote: > Allwinner H616 supports many types of DRAM. Most notably it supports > LPDDR4. However, all commercially available boards at this time use > only DDR3, so this commit adds only DDR3 support. > > Controller and MBUS are very similar to H6 but PHY is

Re: [linux-sunxi] [PATCH 12/17] sunxi: Add support for H616 SoC

2021-01-03 Thread Samuel Holland
On 1/3/21 3:26 AM, Jernej Skrabec wrote: > H616 is very similar to H6 so most of the infrastructure can be reused. > However, two big differences are that it doesn't have functional SRAM A2 > which is usually used for TF-A and it doesn't have ARISC co-processor. > It also needs bigger SPL size -

Re: [linux-sunxi] [PATCH 11/17] sunxi: Add H616 DRAM support

2021-01-04 Thread Samuel Holland
On 1/4/21 12:39 PM, Jernej Škrabec wrote: > Dne ponedeljek, 04. januar 2021 ob 03:39:52 CET je Samuel Holland napisal(a): >> On 1/3/21 3:26 AM, Jernej Skrabec wrote: >>> Allwinner H616 supports many types of DRAM. Most notably it supports >>> LPDDR4. However, all co

[PATCH 2/4] tools: mkimage: Add Allwinner TOC0 support

2021-06-20 Thread Samuel Holland
. These items include signed firmware and a key chain linking to a root-of-trust public key (ROTPK) hash burned to eFuses in the SoC. Signatures are made using RSA-2048 + SHA256. This TOC0 implementation has been verified to work with the A64, H5, H6, and H616 SBROMs. Signed-off-by: Samuel Holland

[PATCH 3/4] sunxi: Support both SPL image types

2021-06-20 Thread Samuel Holland
SPL uses the image header to detect the boot device and to find the offset of U-Boot proper. Since this information is stored differently in eGON and TOC0 image headers, add code to find the correct value based on the image type currently in use. Signed-off-by: Samuel Holland --- arch/arm

[PATCH 4/4] sunxi: Support building a SPL as a TOC0 image

2021-06-20 Thread Samuel Holland
Now that mkimage can generate TOC0 images, and the SPL can interpret them, hook up the build infrastructure so the user can choose which image type to build. Signed-off-by: Samuel Holland --- arch/arm/mach-sunxi/Kconfig | 2 ++ board/sunxi/Kconfig | 24 scripts

[PATCH 1/4] tools: Refactor mkimage linking with OpenSSL

2021-06-20 Thread Samuel Holland
Estevam Cc: "NXP i.MX U-Boot Team" Cc: Stefan Roese Cc: Simon Glass Signed-off-by: Samuel Holland --- arch/arm/mach-imx/mxs/Kconfig | 2 ++ arch/arm/mach-mvebu/Kconfig | 1 + common/Kconfig.boot | 2 ++ scripts/config_whitelist.txt | 1 - tools/Kconfig

[PATCH 0/4] sunxi: TOC0 image type support

2021-06-20 Thread Samuel Holland
Zero 2 Samuel Holland (4): tools: Refactor mkimage linking with OpenSSL tools: mkimage: Add Allwinner TOC0 support sunxi: Support both SPL image types sunxi: Support building a SPL as a TOC0 image arch/arm/Kconfig | 1 + arch/arm/include/asm/arch-sunxi/spl.h | 2

Re: Reset cause register for Allwinner H3/R16 SOC's

2021-06-13 Thread Samuel Holland
On 6/13/21 11:37 PM, Suniel Mahesh wrote: > Hi Andre, > > On Mon, Jun 14, 2021 at 3:44 AM Andre Przywara wrote: >> >> On Sat, 12 Jun 2021 10:17:08 +0530 >> Suniel Mahesh wrote: >> >>> Hi All, >>> >>> I am working on an Allwinner R16 and H3 based targets and I am implementing >>> system update.

Re: [PATCH 0/8] sunxi: mmc: Fixes and speed increase

2021-07-04 Thread Samuel Holland
ing merge window, to expose them > to a wider testing audience, but would really like to have some > people's eyes on it. > > Also testing this on different boards would be much appreciated, > especially patch 7/8 deserves some scrutiny, I guess. For the series: Tested-by: Samuel Hol

[PATCH 3/6] phy: sun50i-usb3: Add a driver for the H6 USB3 PHY

2021-02-07 Thread Samuel Holland
This driver is needed for XHCI to work on the Allwinner H6 SoC. The driver is copied from Linux v5.10. Signed-off-by: Samuel Holland --- drivers/phy/allwinner/Kconfig | 8 ++ drivers/phy/allwinner/Makefile | 1 + drivers/phy/allwinner/phy-sun50i-usb3.c | 171

[PATCH 4/6] usb: xhci-pci: Move reset logic out of XHCI core

2021-02-07 Thread Samuel Holland
, and where it cannot interfere with other platform drivers. Fixes: 0b80371b350e ("usb: xhci: Add reset controller support") Signed-off-by: Samuel Holland --- drivers/usb/host/xhci-mem.c | 2 -- drivers/usb/host/xhci-pci.c | 38 +++-- drivers/usb/host/xhci.

[PATCH 5/6] usb: xhci-dwc3: Add support for clocks/resets

2021-02-07 Thread Samuel Holland
Some platforms, like the Allwinner H6, do not have a separate glue layer around the dwc3. Instead, they rely on the clocks/resets/phys referenced from the dwc3 DT node itself. Add support for enabling the clocks/resets referenced from the dwc3 DT node. Signed-off-by: Samuel Holland --- drivers

[PATCH 1/6] clk: sunxi: Add a dummy clock driver for the RTC

2021-02-07 Thread Samuel Holland
ementation is trivial. Signed-off-by: Samuel Holland --- drivers/clk/sunxi/Makefile| 2 ++ drivers/clk/sunxi/clk_sun6i_rtc.c | 35 +++ 2 files changed, 37 insertions(+) create mode 100644 drivers/clk/sunxi/clk_sun6i_rtc.c diff --git a/drivers/clk/sunxi/

[PATCH] sunxi: Remove dead ifdefs in sunxi-common.h

2021-02-07 Thread Samuel Holland
As variables were moved to Kconfig, some of the surrounding ifdefs were left around, even though they were empty. Clean them up. Signed-off-by: Samuel Holland --- include/configs/sunxi-common.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/include/configs/sunxi-common.h b

[PATCH 0/6] Allwinner H6 USB3 support

2021-02-07 Thread Samuel Holland
4mA) |071044991D8D6A81 | +-3 Hub (480 Mb/s, 100mA) GenesysLogic USB2.1 Hub 1 Hub (480 Mb/s, 0mA) u-boot EHCI Host Controller 1 Hub (12 Mb/s, 0mA) U-Boot Root Hub Samuel Holland (6): clk: sunxi: Add a dummy clock driver for the RTC clk: su

[PATCH 6/6] configs: Enable USB3 on Allwinner H6 boards

2021-02-07 Thread Samuel Holland
Pine H64 and Orange Pi 3 both provide a USB3 type A port. Enable it in U-Boot. Signed-off-by: Samuel Holland --- configs/orangepi_3_defconfig | 5 + configs/pine_h64_defconfig | 5 + 2 files changed, 10 insertions(+) diff --git a/configs/orangepi_3_defconfig b/configs

[PATCH 2/6] clk: sunxi: h6: Add XHCI clocks

2021-02-07 Thread Samuel Holland
The XHCI controller has its own clock and reset. Add them. Signed-off-by: Samuel Holland --- drivers/clk/sunxi/clk_h6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/sunxi/clk_h6.c b/drivers/clk/sunxi/clk_h6.c index ac8656fe895..df93d96b3b0 100644 --- a/drivers/clk/sunxi

[PATCH 2/2] sunxi: binman: Do not hardcode U-Boot load address

2021-02-07 Thread Samuel Holland
The FIT description has access to the configuration variables. Use the appropriate variable instead of hardcoding the address. Signed-off-by: Samuel Holland --- arch/arm/dts/sunxi-u-boot.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b

[PATCH 1/2] sunxi: binman: Respect the default FIT configuration

2021-02-07 Thread Samuel Holland
T. Signed-off-by: Samuel Holland --- arch/arm/dts/sunxi-u-boot.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi index abe629c55e5..a9062316f1d 100644 --- a/arch/arm/dts/sunxi-u-boot.dtsi +++ b/arch/arm/d

Re: [PATCH 4/6] usb: xhci-pci: Move reset logic out of XHCI core

2021-02-08 Thread Samuel Holland
On 2/8/21 5:43 AM, Marek Vasut wrote: > On 2/8/21 6:57 AM, Samuel Holland wrote: >> Resetting an XHCI controller inside xhci_register undoes any register >> setup performed by the platform driver. And at least on the Allwinner >> H6, resetting the XHCI controller also

Re: [PATCH 5/6] usb: xhci-dwc3: Add support for clocks/resets

2021-02-08 Thread Samuel Holland
On 2/8/21 7:42 PM, Andre Przywara wrote: > On Sun, 7 Feb 2021 23:57:23 -0600 > Samuel Holland wrote: > > (CC:ing Simon and Kever) > >> Some platforms, like the Allwinner H6, do not have a separate glue layer >> around the dwc3. Instead, they rely on the clocks/res

Re: [PATCH 4/6] usb: xhci-pci: Move reset logic out of XHCI core

2021-02-08 Thread Samuel Holland
On 2/8/21 8:27 PM, Samuel Holland wrote: > On 2/8/21 5:43 AM, Marek Vasut wrote: >> On 2/8/21 6:57 AM, Samuel Holland wrote: >>> Resetting an XHCI controller inside xhci_register undoes any register >>> setup performed by the platform driver. And at least on the

Re: [PATCH 1/2] sunxi: H616: Change TF-A load address to beginning of DRAM

2021-03-30 Thread Samuel Holland
any issues with > incompatible versions later on (the TF-A patches are about to be merged). > > Signed-off-by: Andre Przywara Reviewed-by: Samuel Holland > --- > arch/arm/dts/sunxi-u-boot.dtsi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a

Re: [PATCH 2/2] sunxi: dts: H616: Drop reserved-memory node

2021-03-30 Thread Samuel Holland
ight clash with the actual values >> (which have also changed), and rely on TF-A to add the node. >> >> [1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/7770 >> >> Signed-off-by: Andre Przywara Reviewed-by: Samuel Holland >> --- >> arch/

[PATCH] sunxi: Load sun8i secure monitor to SRAM A2

2021-04-18 Thread Samuel Holland
for the monitor, and the last 16 KiB for the SCP firmware. With this change, the monitor no longer needs to reserve a region in DRAM. Signed-off-by: Samuel Holland --- arch/arm/include/asm/arch-sunxi/cpu_sun4i.h | 11 +++ include/configs/sun8i.h | 7 +++ 2 files changed

[PATCH] sunxi: Select environment MMC based on boot device

2021-04-18 Thread Samuel Holland
mmc_get_env_dev, we will always use the environment from the boot device when booting from SD/eMMC. Signed-off-by: Samuel Holland --- board/sunxi/board.c | 14 ++ env/Kconfig | 3 +-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/board/sunxi/board.c b/board/sunxi

[PATCH] MAINTAINERS: Add allwinner/sunxi driver directories

2021-04-18 Thread Samuel Holland
These drivers are sunxi platform-specific, and so are of interest to the sunxi maintainers. In fact, as there is no PHY driver maintainer, drivers/phy/allwinner had no maintainer at all. Signed-off-by: Samuel Holland --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [PATCH v2 2/4] usb: xhci-pci: Move reset logic out of XHCI core

2021-04-21 Thread Samuel Holland
On 4/21/21 5:36 AM, Andre Przywara wrote: > On Sat, 17 Apr 2021 09:20:57 -0500 > Samuel Holland wrote: > > Hi, > >> Resetting an XHCI controller inside xhci_register undoes any register >> setup performed by the platform driver. And at least on the Allwinner >>

Re: [PATCH] sunxi-common: support loading compressed kernel images on ARMv8

2021-04-17 Thread Samuel Holland
Andre, On 3/31/21 10:39 AM, Andre Przywara wrote: > On 20/02/2021 12:14, Nicolas Boulenguez wrote: > > Hi Arnaud, > >> From: Arnaud Ferraris > > as mentioned before, this looks useful, so can you re-send this with a > commit message and your Signed-off-by:? It looks like you picked up this

Re: [linux-sunxi] [PATCH] net: sun8i-emac: Fix pinmux setup for Allwinner H5

2021-04-18 Thread Samuel Holland
icitly list each supported SoC, and have an error message in the > fallback case, to avoid those problems in the future. > > This fixes Ethernet support on all H5 boards. > > Signed-off-by: Andre Przywara Tested-by: Samuel Holland # Orange Pi PC2 Also tested on H3 (Orange Pi Plus 2E) and A64 (Orange Pi Win) to verify no regression.

Re: [PATCH] sunxi-common: support loading compressed kernel images on ARMv8

2021-04-18 Thread Samuel Holland
Andre, On 4/17/21 1:23 PM, Andre Przywara wrote: > On Sat, 17 Apr 2021 12:47:23 -0500 Samuel Holland wrote: >> On 3/31/21 10:39 AM, Andre Przywara wrote: >>> On 20/02/2021 12:14, Nicolas Boulenguez wrote: >>> >>> Hi Arnaud, >>> >>>

Re: [PATCH 0/6] Allwinner H6 USB3 support

2021-04-17 Thread Samuel Holland
On 2/9/21 4:46 AM, Andre Heider wrote: > Hi Samuel, > > On 08/02/2021 06:57, Samuel Holland wrote: >> This series adds clock, PHY, and XHCI driver support for the USB3 >> controller found in the Allwinner H6 SoC. Below is a log showing it >> functioning on the Orange Pi

[PATCH v2 3/4] usb: xhci-dwc3: Add support for clocks/resets

2021-04-17 Thread Samuel Holland
Some platforms, like the Allwinner H6, do not have a separate glue layer around the dwc3. Instead, they rely on the clocks/resets/phys referenced from the dwc3 DT node itself. Add support for enabling the clocks/resets referenced from the dwc3 DT node. Signed-off-by: Samuel Holland --- drivers

[PATCH v2 4/4] configs: Enable USB3 on Allwinner H6 boards

2021-04-17 Thread Samuel Holland
Pine H64 and Orange Pi 3 both provide a USB3 type A port. Enable it in U-Boot. Signed-off-by: Samuel Holland --- configs/orangepi_3_defconfig | 5 + configs/pine_h64_defconfig | 5 + 2 files changed, 10 insertions(+) diff --git a/configs/orangepi_3_defconfig b/configs

[PATCH v2 0/4] Allwinner H6 USB3 support

2021-04-17 Thread Samuel Holland
: - Dropped patches 1-2 (already in u-boot-sunxi/master) and rebased - Added Andre's Reviewed-by on the PHY driver - Fixed error handling in xhci_pci_probe Samuel Holland (4): phy: sun50i-usb3: Add a driver for the H6 USB3 PHY usb: xhci-pci: Move reset logic out of XHCI core usb: xhci-dwc3

[PATCH v2 2/4] usb: xhci-pci: Move reset logic out of XHCI core

2021-04-17 Thread Samuel Holland
, and where it cannot interfere with other platform drivers. This also fixes a failure to call reset_free if xhci_register failed. Fixes: 0b80371b350e ("usb: xhci: Add reset controller support") Signed-off-by: Samuel Holland --- drivers/usb/host/xhci-mem.c | 2 -- drivers/usb/host/xhci-

[PATCH v2 1/4] phy: sun50i-usb3: Add a driver for the H6 USB3 PHY

2021-04-17 Thread Samuel Holland
This driver is needed for XHCI to work on the Allwinner H6 SoC. The driver is copied from Linux v5.10. Reviewed-by: Andre Przywara Signed-off-by: Samuel Holland --- drivers/phy/allwinner/Kconfig | 8 ++ drivers/phy/allwinner/Makefile | 1 + drivers/phy/allwinner/phy

[PATCH] arm: zimage: Use correct symbol to hide messages in SPL

2021-04-17 Thread Samuel Holland
IS_ENABLED to drop the #ifdef. Fixes: 431889d6ad9a ("spl: zImage support in Falcon mode") Signed-off-by: Samuel Holland --- arch/arm/lib/zimage.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c index

Re: [PATCH 0/4] sunxi: TOC0 image type support

2021-08-21 Thread Samuel Holland
Hi Andre, On 6/21/21 6:56 PM, Andre Przywara wrote: > On Mon, 21 Jun 2021 16:35:37 -0400 > Tom Rini wrote: >> On Mon, Jun 21, 2021 at 04:43:00PM +0100, Andre Przywara wrote: >>> On Sun, 20 Jun 2021 21:55:51 -0500 >>> Samuel Holland wrote: >>> >>

Re: [PATCH 01/11] i2c: Add a DM_I2C wrapper for the sun6i_p2wi controller

2021-08-22 Thread Samuel Holland
Hi Heiko, On 8/22/21 3:38 AM, Heiko Schocher wrote: > Hello Samuel, > > On 22.08.21 01:05, Samuel Holland wrote: >> This bus controller is used to communicate with an X-Powers AXP PMIC. >> Currently, various drivers access PMIC registers through a platform- >>

[PATCH v2 1/4] tools: Separate image types which depend on OpenSSL

2021-08-21 Thread Samuel Holland
, it is required for the build to complete. Signed-off-by: Samuel Holland --- Changes in v2: - Refactored the first patch on top of TOOLS_LIBCRYPTO arch/arm/mach-imx/mxs/Kconfig | 2 ++ arch/arm/mach-mvebu/Kconfig | 1 + scripts/config_whitelist.txt | 1 - tools/Makefile| 19

[PATCH v2 2/4] tools: mkimage: Add Allwinner TOC0 support

2021-08-21 Thread Samuel Holland
embled; this is done to work around bugs/quirks in the boot ROM, which vary between SoCs. This TOC0 implementation has been verified to work with the A50, A64, H5, H6, and H616 SBROMs, and it may work with other SoCs. Signed-off-by: Samuel Holland --- Changes in v2: - Moved certificate and key

[PATCH v2 3/4] sunxi: Support SPL in both eGON and TOC0 images

2021-08-21 Thread Samuel Holland
SPL uses the image header to detect the boot device and to find the offset of the next U-Boot stage. Since this information is stored differently in the eGON and TOC0 image headers, add code to find the correct value based on the image type currently in use. Signed-off-by: Samuel Holland

[PATCH v2 0/4] sunxi: TOC0 image type support

2021-08-21 Thread Samuel Holland
out of sunxi_image.h - Refactored SPL header signature checks to use fewer casts - Rebase on top of Icenowy's RISC-V support series - Rename Kconfig symbols to include the full image type name Samuel Holland (4): tools: Separate image types which depend on OpenSSL tools: mkimage: Add Allwinner

[PATCH v2 4/4] sunxi: Support building a SPL as a TOC0 image

2021-08-21 Thread Samuel Holland
Now that mkimage can generate TOC0 images, and the SPL can interpret them, hook up the build infrastructure so the user can choose which image type to build. Signed-off-by: Samuel Holland --- Changes in v2: - Rebase on top of Icenowy's RISC-V support series - Rename Kconfig symbols to include

[PATCH 1/4] sysreset: Add uclass Kconfig dependency to drivers

2021-08-22 Thread Samuel Holland
The drivers enabled by SYSRESET_SYSCON, SYSRESET_WATCHDOG, and SYSRESET_RESETCTL do nothing beyond providing sysreset uclass ops. Therefore, they should depend on the sysreset uclass. Signed-off-by: Samuel Holland --- drivers/sysreset/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 2/4] sysreset: Mark driver probe functions as static

2021-08-22 Thread Samuel Holland
These driver probe functions are not (and should not be) called from outside the respective driver source files. Therefore, the functions should be marked static. Signed-off-by: Samuel Holland --- drivers/sysreset/sysreset_resetctl.c | 2 +- drivers/sysreset/sysreset_syscon.c | 2 +- drivers

[PATCH 4/4] watchdog: Automatically register device with sysreset

2021-08-22 Thread Samuel Holland
Add an option to automatically register the first watchdog device with the wdt_reboot driver for use with sysreset. This allows sysreset to be a drop-in replacement for platform-specific watchdog reset code, without needing any device tree changes. Signed-off-by: Samuel Holland --- drivers

[PATCH 3/4] sysreset: watchdog: Move watchdog reference to plat data

2021-08-22 Thread Samuel Holland
the OF node if it is not already provided. Signed-off-by: Samuel Holland --- drivers/sysreset/sysreset_watchdog.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/sysreset/sysreset_watchdog.c b/drivers/sysreset/sysreset_watchdog.c index c7ae368d41a

[PATCH] sunxi: Avoid duplicate reset_cpu with SYSRESET enabled

2021-08-22 Thread Samuel Holland
-by: Samuel Holland --- arch/arm/mach-sunxi/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index d9b04f75fc4..f867a28c30c 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -347,6 +347,7 @@ void

Re: [PATCH v2 1/4] tools: Separate image types which depend on OpenSSL

2021-08-22 Thread Samuel Holland
On 8/22/21 4:58 AM, Pali Rohár wrote: > Hello! > > On Saturday 21 August 2021 23:46:45 Samuel Holland wrote: >> Some image types always depend on OpenSSL, so they can only be included >> in mkimage when TOOLS_LIBCRYPTO is selected. Instead of using arbitrary >&g

Re: [PATCH v2 2/4] tools: mkimage: Add Allwinner TOC0 support

2021-08-22 Thread Samuel Holland
On 8/22/21 5:07 AM, Pali Rohár wrote: > Hello! > > On Saturday 21 August 2021 23:46:46 Samuel Holland wrote: >> Most Allwinner sunxi SoCs have separate boot ROMs in non-secure and >> secure mode. The "non-secure" or "normal" boot ROM (NBROM) uses the >

[PATCH 1/3] watchdog: Add a driver for the sunxi watchdog

2021-08-22 Thread Samuel Holland
This driver supports the sun4i/sun6i/sun20i watchdog timers. They have a maximum timeout of 16 seconds. Signed-off-by: Samuel Holland --- drivers/watchdog/Kconfig | 8 ++ drivers/watchdog/Makefile| 1 + drivers/watchdog/sunxi_wdt.c | 188 +++ 3 files

[PATCH 3/3] sunxi: dts: H616: Enable the watchdog

2021-08-22 Thread Samuel Holland
by the driver. Signed-off-by: Samuel Holland --- arch/arm/dts/sun50i-h616.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/dts/sun50i-h616.dtsi b/arch/arm/dts/sun50i-h616.dtsi index dd4d2f3..2f71e853e96 100644 --- a/arch/arm/dts/sun50i-h616.dtsi +++ b/arch/arm/dts/sun50i-h616

[PATCH 2/3] sunxi: Enable watchdog timer support by default

2021-08-22 Thread Samuel Holland
A watchdog helps recover from hangs or failure to boot an OS. It can also be used by the sysreset framework to intentionally reset the system. Now that a driver is available, let's enable this functionality on sunxi boards. Signed-off-by: Samuel Holland --- arch/arm/Kconfig | 1 + 1 file

[PATCH 2/4] include: axp_pmic: Include headers for all variants

2021-08-22 Thread Samuel Holland
the relevant feature. An exception is the GPIO-related definitions, which do not use unique identifiers. So for now, keep them like before. They will be cleaned up along with the GPIO driver. Signed-off-by: Samuel Holland --- include/axp152.h | 2 ++ include/axp209.h | 2 ++ include/axp221.h

[PATCH 3/4] power: axp: Avoid do_poweroff conflict with sysreset

2021-08-22 Thread Samuel Holland
firmware driver. This driver can be enabled even if CONFIG_PSCI_RESET is disabled, so make sure to use the right symbol in the condition. Signed-off-by: Samuel Holland --- drivers/power/axp152.c | 2 ++ drivers/power/axp209.c | 2 ++ drivers/power/axp221.c | 2 ++ drivers/power/axp305.c | 2

[PATCH 4/4] power: pmic: axp: Implement poweroff via sysreset

2021-08-22 Thread Samuel Holland
rigger bit is the same on all PMIC variants, use the register definitions from the oldest supported PMIC. Signed-off-by: Samuel Holland --- drivers/power/pmic/Kconfig | 2 ++ drivers/power/pmic/axp.c | 36 2 files changed, 38 insertions(+) diff --git a/dri

[PATCH 0/4] Improved sysreset/watchdog uclass integration

2021-08-22 Thread Samuel Holland
things up automatically makes sense to me; this is what Linux does. (In fact, Linux does this for every watchdog device.) However, I put the code behind a new option to avoid surprises for other platforms. Samuel Holland (4): sysreset: Add uclass Kconfig dependency to drivers sysreset: Mark

[PATCH 1/4] include: axp_pmic: Add missing header guard definition

2021-08-22 Thread Samuel Holland
This header attempted to avoid multiple inclusion using a header guard. But the preprocessor symbol was never defined, so the guard had no effect. Fix this by defining the symbol. Signed-off-by: Samuel Holland --- include/axp_pmic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include

[PATCH 0/4] power: axp: Move poweroff to DM_PMIC/SYSRESET driver

2021-08-22 Thread Samuel Holland
of the other series I sent can be applied independently. Samuel Holland (4): include: axp_pmic: Add missing header guard definition include: axp_pmic: Include headers for all variants power: axp: Avoid do_poweroff conflict with sysreset power: pmic: axp: Implement poweroff via sysreset drivers

[PATCH] sunxi: Select SPL_SEPARATE_BSS

2021-08-22 Thread Samuel Holland
sunxi-common.h defines CONFIG_SPL_BSS_START_ADDR to put SPL's BSS in DRAM. Due to this, we must select SPL_SEPARATE_BSS, or else SPL will attempt to load its DTB from the wrong address (after BSS in DRAM). This change fixes booting with SPL_OF_CONTROL=y. Signed-off-by: Samuel Holland --- arch

[PATCH] ARM: Prevent the compiler from using NEON registers

2021-08-15 Thread Samuel Holland
on that platform, as NEON is not available in SPL. Fix this by restricting the compiler to using GPRs only, not vector registers. Signed-off-by: Samuel Holland --- arch/arm/config.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 16c63e12667..964c6b026ec

Re: [PATCH 11/13] Convert CONFIG_SYS_I2C_SOFT et al to Kconfig

2021-08-17 Thread Samuel Holland
Hi Tom, On 8/17/21 4:59 PM, Tom Rini wrote: > This converts the following to Kconfig: >CONFIG_SYS_I2C_SOFT >CONFIG_SYS_I2C_SOFT_SPEED >CONFIG_SYS_I2C_SOFT_SLAVE > > Signed-off-by: Tom Rini > --- > board/sunxi/board.c | 2 +- > configs/Colombus_defconfig

Re: U-Boot sunxi DM_I2C migration?

2021-08-17 Thread Samuel Holland
Hi all, On 8/17/21 2:23 PM, Tom Rini wrote: > On Thu, Aug 12, 2021 at 05:40:34PM -0400, Tom Rini wrote: >> On Thu, Aug 12, 2021 at 10:22:07PM +0100, Andre Przywara wrote: >>> On Thu, 12 Aug 2021 13:49:30 -0400 >>> Tom Rini wrote: >>> >>> Hi Tom, >>> As I try and migrate more CONFIG symbols

[PATCH 01/11] i2c: Add a DM_I2C wrapper for the sun6i_p2wi controller

2021-08-21 Thread Samuel Holland
s a DM_I2C driver. Since the non-DM bus controller driver is still needed in SPL, the quick solution is to implement the DM_I2C ops using the existing functions. The register for switching between I2C/P2WI/RSB mode is the same across all PMIC variants, so move that to the common header. Signed-off-

[PATCH 00/11] sunxi: Migrate to DM_I2C

2021-08-21 Thread Samuel Holland
ero2 (H616). Samuel Holland (11): i2c: Add a DM_I2C wrapper for the sun6i_p2wi controller i2c: Add a DM_I2C wrapper for the sun8i_rsb controller power: pmic: Consistently depend on DM_PMIC power: pmic: Make the uclass optional in SPL power: pmic: Add a driver for X-Powers AXP PMICs sun

[PATCH 02/11] i2c: Add a DM_I2C wrapper for the sun8i_rsb controller

2021-08-21 Thread Samuel Holland
y a couple of pairs of hardware/runtime addresses used across all PMIC variants. So far the code expected only the "primary" pair, but some PMICs like the AXP305 and AXP805 use the secondary pair, so add support for that to the DM driver as well. Signed-off-by: Samuel Holland ---

[PATCH 03/11] power: pmic: Consistently depend on DM_PMIC

2021-08-21 Thread Samuel Holland
driver. Signed-off-by: Samuel Holland --- drivers/power/pmic/Kconfig | 43 +++--- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig index fd6648b313e..56c0ef70312 100644 --- a/drivers/power/pmic/Kconfig

[PATCH 05/11] power: pmic: Add a driver for X-Powers AXP PMICs

2021-08-21 Thread Samuel Holland
for SoCs that normally pair with a PMIC. Signed-off-by: Samuel Holland --- drivers/power/pmic/Kconfig | 14 +++ drivers/power/pmic/Makefile | 1 + drivers/power/pmic/axp.c| 49 + 3 files changed, 64 insertions(+) create mode 100644 drivers/power/pmic

[PATCH 04/11] power: pmic: Make the uclass optional in SPL

2021-08-21 Thread Samuel Holland
option. Signed-off-by: Samuel Holland --- drivers/power/pmic/Kconfig | 17 - drivers/power/pmic/Makefile | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig index 56c0ef70312..0c4da9c5536 100644

[PATCH 09/11] sunxi: pmic_bus: Use the DM PMIC interface when possible

2021-08-21 Thread Samuel Holland
functions or the newly-added PMIC_AXP driver (which uses DM_I2C). In turn, this allows platforms to start transitioning to DM_I2C in U-Boot proper, without breaking boards that still depend on the legacy I2C interface for other reasons. Signed-off-by: Samuel Holland --- arch/arm/mach-sunxi/Kconfig

[PATCH 08/11] sunxi: pmic_bus: Clean up preprocessor conditions

2021-08-21 Thread Samuel Holland
ecause all of the PMICs support I2C in addition to other interfaces. Signed-off-by: Samuel Holland --- arch/arm/mach-sunxi/pmic_bus.c | 90 +++--- 1 file changed, 39 insertions(+), 51 deletions(-) diff --git a/arch/arm/mach-sunxi/pmic_bus.c b/arch/arm/mach-sunxi/

[PATCH 07/11] sunxi: pmic_bus: Fix Kconfig dependencies

2021-08-21 Thread Samuel Holland
on a specific PMIC header to pick up register definitions. Both of these changes have no impact on any existing configs, since the code does not compile if the dependencies are not met. Signed-off-by: Samuel Holland --- arch/arm/mach-sunxi/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH 06/11] sunxi: Select SUN8I_RSB more carefully

2021-08-21 Thread Samuel Holland
SUN8I_RSB should not be selected by MACH_SUN8I, because the hardware is not present in half of those SoCs (H3/H5, R40, and V3s). Move the selection to the SoCs where the hardware actually exists. Signed-off-by: Samuel Holland --- arch/arm/mach-sunxi/Kconfig | 4 +++- 1 file changed, 3

[PATCH 10/11] sunxi: video: Convert panel I2C to use DM_I2C

2021-08-21 Thread Samuel Holland
-gpio nodes are not referenced by any other node in the device trees (the device trees have no panel node), the I2C bus is selected by its node name. This panel initialization code was the only i2c_soft user, so the i2c_soft GPIO setup code can be removed now as well. Signed-off-by: Samuel Holland

[PATCH 11/11] sunxi: Enable DM_I2C for all sunxi boards

2021-08-21 Thread Samuel Holland
Now that the last users of legacy I2C (outside of SPL) have been resolved, we can enable DM_I2C at the sunxi architecture level. Signed-off-by: Samuel Holland --- arch/arm/Kconfig| 1 + arch/arm/mach-sunxi/Kconfig | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH] i2c: i2c-gpio: Support the named GPIO binding

2021-08-21 Thread Samuel Holland
. Signed-off-by: Samuel Holland --- drivers/i2c/i2c-gpio.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c index cf8f8f40359..1aedad5c8ed 100644 --- a/drivers/i2c/i2c-gpio.c +++ b/drivers/i2c/i2c-gpio.c @@ -336,8 +336,17 @@ static int

[PATCH v2] ARM: Prevent the compiler from using NEON registers

2021-08-21 Thread Samuel Holland
future surprises relating to NEON use as well. Signed-off-by: Samuel Holland --- Changes in v2: - Updated commit message to describe problem more precisely arch/arm/config.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 16c63e12667..964c6b026ec

Re: [PATCH v2 0/4] mkimage: sunxi_egon: add riscv support

2021-08-21 Thread Samuel Holland
e > > scripts/Makefile.spl | 2 +- > tools/imagetool.h| 1 + > tools/mkimage.c | 1 + > tools/sunxi_egon.c | 86 > 4 files changed, 82 insertions(+), 8 deletions(-) This works great on D1. For the whole series: Tested-by: Samuel Holland

Re: [PATCH 05/11] power: pmic: Add a driver for X-Powers AXP PMICs

2021-09-02 Thread Samuel Holland
On 9/2/21 6:17 PM, Jaehoon Chung wrote: > On 8/22/21 8:05 AM, Samuel Holland wrote: >> These PMICs provide some combination of battery charger, fuel gauge, >> GPIOs, regulators, and VBUS routing. These functions are represented >> as child nodes in the device tree. Add the

Re: [PATCH v2 2/2] pinephone_defconfig: add support for early-boot status LED

2021-09-08 Thread Samuel Holland
On 9/8/21 2:14 PM, Arnaud Ferraris wrote: > This commit enables the green status LED (PD18/GPIO 114) on boot in the > SPL, in order to provide visual feedback that the PinePhone is booting. > > Signed-off-by: Arnaud Ferraris > Reviewed-by: Andre Przywara Reviewed-by: Samuel

Re: [PATCH v2 1/2] board: sunxi: enable status LED early

2021-09-08 Thread Samuel Holland
ual feedback as soon as possible. > > In order achieve this goal, this patch initializes the status LED (if > configured) in the SPL. > > Signed-off-by: Arnaud Ferraris Reviewed-by: Samuel Holland

[PATCH 1/2] sunxi: Simplify MMC pinmux selection

2021-09-12 Thread Samuel Holland
to be chosen by the preprocessor, instead of having the code parse a string at runtime (for a build-time option!). Not only does this reduce code size, but it also allows this Kconfig option to be used in a table-driven DM pinctrl driver. Signed-off-by: Samuel Holland --- arch/arm/include/asm/arch

[PATCH 2/2] gpio: sunxi: Remove the sunxi_name_to_gpio_bank function

2021-09-12 Thread Samuel Holland
The only caller of this function was the MMC pinmux code, which used it to parse a string given from a Kconfig symbol. As the Kconfig symbol has been converted to a Boolean, this function is no longer needed. Signed-off-by: Samuel Holland --- arch/arm/include/asm/arch-sunxi/gpio.h | 1

[PATCH 3/3] phy: sun4i-usb: Support VBUS detection via power supply

2021-09-12 Thread Samuel Holland
to the PHY driver. Signed-off-by: Samuel Holland --- drivers/phy/allwinner/Kconfig | 1 + drivers/phy/allwinner/phy-sun4i-usb.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/phy/allwinner/Kconfig b/drivers/phy/allwinner/Kconfig index dba3bae61c4..aa9d0e7e6a5 100644

[PATCH 0/3] phy: sun4i-usb: Support VBUS detection via power supply

2021-09-12 Thread Samuel Holland
hurt anything either. Samuel Holland (3): phy: sun4i-usb: Remove a couple of debug messages phy: sun4i-usb: Refactor VBUS detection to match Linux phy: sun4i-usb: Support VBUS detection via power supply drivers/phy/allwinner/Kconfig | 1 + drivers/phy/allwinner/phy-sun4i-usb.c

<    1   2   3   4   5   6   7   >