Orphaning my patches

2024-07-14 Thread John Watts
Hi there, I'm orpahning all the pending patches I've submitted to this project. If you have them in your patch queue, please disregard them. Full list: - boot: Pass baud rate to stdout https://lore.kernel.org/r/20240411-stdout-v1-1-66ebe5bb1...@jookia.org - pwm: sunxi: Add support Allwinner D1

Re: [PATCH v2 2/2] usb: musb-new: sunxi: make compatible with UDC/DM gadget model

2024-06-28 Thread John Watts
Hi, On Fri, Jun 28, 2024 at 04:17:27PM +0100, Andre Przywara wrote: > > I do not know if this patch is still a > > necessity; though if John is nudging about it, it probably is. > > Yes apparently he needs it, though I am not entirely sure why. > USB gadget has worked for ages in sunxi, without

[PATCH] video: Add support for NewVision NV3052C SPI panels

2024-06-14 Thread John Watts
This driver is mostly copied from the Linux kernel and includes support for two physical panels that use this driver. Signed-off-by: John Watts --- This patch is a straightforward port of the kernel NV3052C SPI driver to U-Boot, keeping full compatibility with mainline device tree bindings

[PATCH 2/2] sunxi: video: Support DE_LOW and PIXDATA_NEGEDGE display flags

2024-06-14 Thread John Watts
Implement these by inverting the DE and PCLK polarities. Signed-off-by: John Watts --- arch/arm/include/asm/arch-sunxi/lcdc.h | 2 ++ drivers/video/sunxi/lcdc.c | 4 2 files changed, 6 insertions(+) diff --git a/arch/arm/include/asm/arch-sunxi/lcdc.h b/arch/arm/include/asm

[PATCH 1/2] sunxi: video: Properly invert hsync and vsync polarity

2024-06-14 Thread John Watts
The current code assumes hsync and vsync are active high by default, but they are actually active low by default. This results in panels being driven with the wrong sync polarities. Invert the check to fix it. Signed-off-by: John Watts --- drivers/video/sunxi/lcdc.c | 4 ++-- 1 file changed, 2

[PATCH 0/2] sunxi: video: Fix lcdc polarity display flags

2024-06-14 Thread John Watts
The current LCD controller driver has incorrect polarity masks, so I've provided a fix for that. While I was there I also added support for two new display flags related to polarities. Signed-off-by: John Watts --- John Watts (2): sunxi: video: Properly invert hsync and vsync polarity

[PATCH] sunxi: video: Support driver model LCDs

2024-06-14 Thread John Watts
Currently the LCD code only supports reading panel timings from the device tree. Change that so it can use a real panel. Signed-off-by: John Watts --- I've been working on a panel driver port from Linux for the T113 and found I need this code to have the panel boot correctly. --- drivers/video

[PATCH 5/5] video: add support for MIPI DBI interface

2024-06-14 Thread John Watts
This interface supports sending MIPI commands over an SPI bus. This driver only implements the Type C1 protocol for now. Signed-off-by: John Watts --- drivers/video/Kconfig| 6 drivers/video/Makefile | 1 + drivers/video/mipi_dbi.c | 70

[PATCH 4/5] spi: softspi: Support setting wordlen

2024-06-14 Thread John Watts
The bit-banging soft SPI driver supports any word length, so just blindly return support for all of them. Signed-off-by: John Watts --- drivers/spi/soft_spi.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c index 0fa14339bd..4f2161f0bf

[PATCH 3/5] spi: Implement spi_set_wordlen for driver model

2024-06-14 Thread John Watts
Implement spi_set_wordlen for driver model devices. Not all drivers support this interface, so we will assume the default wordlen is safe and allow setting that unconditionally. Signed-off-by: John Watts --- drivers/spi/spi-uclass.c | 29 + 1 file changed, 29

[PATCH 2/5] spi: Limit spi_set_wordlen to SPI_DEFAULT_WORDLEN

2024-06-14 Thread John Watts
We have no way to tell if we can actually set the wordlen in non-DM code, so limit it to the default wordlen already in use. Signed-off-by: John Watts --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 3649c9c25b

[PATCH 1/5] spi: Return old wordlen in spit_set_wordlen

2024-06-14 Thread John Watts
Return the current wordlen to the caller so they can restore it back when done. This is required to avoid clobbering the bus state. Signed-off-by: John Watts --- drivers/spi/spi.c | 4 +++- include/spi.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/spi

[PATCH 0/5] video: add support for MIPI DBI interface

2024-06-14 Thread John Watts
from the kernel. Signed-off-by: John Watts --- John Watts (5): spi: Return old wordlen in spit_set_wordlen spi: Limit spi_set_wordlen to SPI_DEFAULT_WORDLEN spi: Implement spi_set_wordlen for driver model spi: softspi: Support setting wordlen video: add support

Re: [PATCH RFC 3/4] pwm: sunxi: Add support Allwinner D1 PWM

2024-05-20 Thread John Watts
On Sat, May 18, 2024 at 01:54:45PM +1000, John Watts wrote: > This driver documents and handles setting up PWM on the D1. > > Signed-off-by: John Watts > --- > drivers/pwm/Kconfig| 6 + > drivers/pwm/Makefile | 1 + > drivers/pwm

Re: [PATCH FOR TESTING ONLY RFC 4/4] sunxi-d1s-t113: Add D1 and T113 PWM node

2024-05-20 Thread John Watts
On Mon, May 20, 2024 at 03:58:12PM +0530, Sumit Garg wrote: > This change shouldn't be needed for your testing purposes too. It only > comes into picture once you enable OF_UPSTREAM. BTW, DT source files > in dts/upstream are strictly following/syncing against Linux kernel DT > sources. So all the

Re: [PATCH RFC 3/4] pwm: sunxi: Add support Allwinner D1 PWM

2024-05-20 Thread John Watts
After a long time reading the datasheet I found out my approach was actually wrong and led to an off by on error. Signed-off-by: John Watts --- drivers/pwm/sunxi_pwm_d1.c | 57 +- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/drivers/pwm

Re: [PATCH RFC 3/4] pwm: sunxi: Add support Allwinner D1 PWM

2024-05-20 Thread John Watts
After a long time reading the datasheet I found out my approach was actually wrong and led to an off by on error. Signed-off-by: John Watts --- drivers/pwm/sunxi_pwm_d1.c | 57 +- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/drivers/pwm

[PATCH FOR TESTING ONLY RFC 4/4] sunxi-d1s-t113: Add D1 and T113 PWM node

2024-05-17 Thread John Watts
This is based on the binding from the as yet unmerged kernel series: https://lore.kernel.org/linux-kernel/20240131125920.2879433-2-privates...@gmail.com/ Signed-off-by: John Watts --- arch/riscv/dts/sunxi-d1s-t113.dtsi | 12 dts/upstream/src/riscv/allwinner/sunxi

[PATCH RFC 3/4] pwm: sunxi: Add support Allwinner D1 PWM

2024-05-17 Thread John Watts
This driver documents and handles setting up PWM on the D1. Signed-off-by: John Watts --- drivers/pwm/Kconfig| 6 + drivers/pwm/Makefile | 1 + drivers/pwm/sunxi_pwm_d1.c | 542 + 3 files changed, 549 insertions(+) diff --git

[PATCH RFC 2/4] pinctrl: sunxi: Add PWM7 pinctrl for the D1

2024-05-17 Thread John Watts
This is currently only used for PD22 on the Mango Pi MQ-Dual. Signed-off-by: John Watts --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 37ea93715d..b3f2568ffe

[PATCH RFC 1/4] clk: sunxi: Add PWM bus clock and reset

2024-05-17 Thread John Watts
This is needed for the D1 PWM driver. Signed-off-by: John Watts --- drivers/clk/sunxi/clk_d1.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/clk/sunxi/clk_d1.c b/drivers/clk/sunxi/clk_d1.c index 9dae761de8..6577d86e0b 100644 --- a/drivers/clk/sunxi/clk_d1.c +++ b/drivers/clk

[PATCH RFC 0/4] pwm: sunxi: Add support Allwinner D1 PWM

2024-05-17 Thread John Watts
This patch series adds support for the Allwinner D1, T113 and R329 PWM. This code isn't based on any kernel code but instead written from scratch with the goal of handling the PWM pairs deterministically. I've tested this on T113 hardware and it works very well. Signed-off-by: John Watts

[PATCH 4/4] spi: rockchip_sfc: Select BOUNCE_BUFFER

2024-04-26 Thread John Watts
This is required for compiling. Signed-off-by: John Watts --- drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 025c81adc9..f1c6a838ae 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -417,6 +417,7 @@ config

[PATCH 3/4] spi: ca_sflash: Add missing dm include

2024-04-26 Thread John Watts
This code uses dev_err which is defined in dm/device_compat.h Signed-off-by: John Watts --- drivers/spi/ca_sflash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/ca_sflash.c b/drivers/spi/ca_sflash.c index 38bddd3861..78e442cac9 100644 --- a/drivers/spi/ca_sflash.c +++ b

[PATCH 2/4] spi: mtk_spim: Remove completion.h include

2024-04-26 Thread John Watts
This created a conflict when linking. Signed-off-by: John Watts --- drivers/spi/mtk_spim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/spi/mtk_spim.c b/drivers/spi/mtk_spim.c index 90f4c3cecb..2979487fff 100644 --- a/drivers/spi/mtk_spim.c +++ b/drivers/spi/mtk_spim.c @@ -18,7

[PATCH 1/4] spi: Kconfig: Add some required arch depends for drivers

2024-04-26 Thread John Watts
These dependencies are required for building the drivers and create compile errors if not enabled. Signed-off-by: John Watts --- drivers/spi/Kconfig | 16 1 file changed, 16 insertions(+) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 612434633b..025c81adc9

[PATCH 0/4] spi: Various Kconfig fixes

2024-04-26 Thread John Watts
I'm doing some SPI work so I tried to compile all the drivers on my sunxi board to try and avoid some regressions. This failed, so here are some fixes for this. Signed-off-by: John Watts --- John Watts (4): spi: Kconfig: Add some required arch depends for drivers spi: mtk_spim

[PATCH RFC 9/9] sunxi: video: support HDMI on H6/H616

2024-04-19 Thread John Watts
on the H616 and VIDEO0 elsewhere. Signed-off-by: John Watts --- arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h | 9 +++ arch/arm/mach-sunxi/clock_sun50i_h6.c | 10 drivers/video/sunxi/sunxi_dw_hdmi.c | 70 --- 3 files changed, 80 insertions(+), 9

[PATCH RFC 8/9] sunxi: Enable display engine on H6/D1

2024-04-19 Thread John Watts
Now that all the code is present and can compile, enable the DE2 so people can use it. Signed-off-by: John Watts --- arch/arm/mach-sunxi/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index ddf9414b08..9d76e429ef 100644

[PATCH RFC 7/9] sunxi: video: dummy out HDMI on H6/D1

2024-04-19 Thread John Watts
or VIDEO1 to run the TCON and HDMI encoder based on the chip. Signed-off-by: John Watts --- drivers/video/sunxi/sunxi_dw_hdmi.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c index 0324a050d0..34a6b8bab7

[PATCH RFC 6/9] sunxi: video: silence unused use_mipi_pll warning

2024-04-19 Thread John Watts
This variable is only used sometimes, so gate it behind an #ifdef. Signed-off-by: John Watts --- drivers/video/sunxi/lcdc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/sunxi/lcdc.c b/drivers/video/sunxi/lcdc.c index ea21d602be..1474f6cb2e 100644 --- a/drivers/video

[PATCH RFC 5/9] sunxi: video: enable DE2 on H6/D1

2024-04-19 Thread John Watts
This requires just a little change to clocking and reset logic. Signed-off-by: John Watts --- drivers/video/sunxi/sunxi_de2.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c index e02d359cd2..9b6c41b212

[PATCH RFC 4/9] sunxi: video: support LCD on H6/D1

2024-04-19 Thread John Watts
The H6/D1/R528 don't require any big changes, just some small tweaks to support new clock and reset logic. Signed-off-by: John Watts --- drivers/video/sunxi/lcdc.c | 20 drivers/video/sunxi/sunxi_lcd.c | 6 -- 2 files changed, 24 insertions(+), 2 deletions

[PATCH RFC 3/9] sunxi: sun50i-h6: Specify DE2 and LCD0 base addresses

2024-04-19 Thread John Watts
These are used for operating the LCD on the H6/H616. Signed-off-by: John Watts --- arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h b/arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h index

[PATCH RFC 2/9] sunxi: ncat2: Specify DE2 and LCD0 base addresses

2024-04-19 Thread John Watts
These are used for operating the LCD on the D1/T113. Signed-off-by: John Watts --- arch/arm/include/asm/arch-sunxi/cpu_sunxi_ncat2.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/include/asm/arch-sunxi/cpu_sunxi_ncat2.h b/arch/arm/include/asm/arch-sunxi/cpu_sunxi_ncat2.h

[PATCH RFC 1/9] sunxi: clock: support H6/D1 video clocks

2024-04-19 Thread John Watts
This code adds support for clocking VIDEO0 and VIDEO1, as well as registers used for the DE2. This code deliberately uses a 12MHz step in clocking to align with the DE2 code's expectation of double 6MHz steps. Signed-off-by: John Watts --- arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h | 56

[PATCH RFC 0/9] sunxi: video: Support LCD and HDMI output on H6/D1

2024-04-19 Thread John Watts
to work on it. It compiles and looks like it should work, but I haven't ungated/reset the slow HDMI clock, or HDMI sub. Signed-off-by: John Watts --- John Watts (9): sunxi: clock: support H6/D1 video clocks sunxi: ncat2: Specify DE2 and LCD0 base addresses sunxi: sun50i-h6

Re: [PATCH v2 0/2] sunxi, usb: UDC/DM gadget model support

2024-04-16 Thread John Watts
in the probe func, per feedback from Marek. > I received no other feedback against v1 of this patch. Hi Sam, I did some more testing and I believe my USB issues mentioned in the other subthread are unrelated to this patch. As such, here's my reviewed-by and tested-by. :) John. Reviewed-b

Re: [PATCH RFC 00/15] Support SPI NAND booting on the T113

2024-04-11 Thread John Watts
On Thu, Apr 11, 2024 at 05:27:08PM -0600, Sam Edwards wrote: > Hi John, > > It doesn't look like I was sent the whole series (only 00 and 01), but > I was able to find it on Patchwork and sift through it. A few general > comments follow: > > The introduction of `SUNXI_BOOTED_FROM_SPINAND` is the

Re: [PATCH v2 0/2] sunxi, usb: UDC/DM gadget model support

2024-04-11 Thread John Watts
On Thu, Apr 11, 2024 at 03:53:51PM -0600, Sam Edwards wrote: > Hi John, Hi Sam, > Ahh I see the problem. In U-Boot, `ubi` isn't actually a block device: > it's implemented as a stub in the block layer, and the filesystem > layer redirects `ubi` accesses to the currently-mounted ubifs instead. >

Re: [PATCH] boot: Pass baud rate to stdout-path

2024-04-11 Thread John Watts
On Thu, Apr 11, 2024 at 05:11:46PM +0200, Mark Kettenis wrote: > You probably should fix this by making sure the device tree you're > using has the appropriate stdout-path node. Because I think the > functionality you're trying to use here is deprecated: Hi Mark, Interesting, I'll go with that

Re: [PATCH] usb: musb-new: sunxi: support usage with DM_USB_GADGET

2024-04-11 Thread John Watts
On Sun, Dec 31, 2023 at 03:38:37PM -0500, Aren Moynihan wrote: > Add support for building the sunxi-musb driver with DM_USB_GADGET > including adding a separate IRQ handling function and registering the > driver with the musb system differently. Hi there, Were you aware of this similar patch?

Re: [PATCH v2 0/2] sunxi, usb: UDC/DM gadget model support

2024-04-11 Thread John Watts
Hi there, I've tested this patch and it seems to support the gadget model, but I'm having a lot of USB errors. What device did you test this on? John. On Thu, Jun 08, 2023 at 01:56:29PM -0600, Sam Edwards wrote: > Happy Thursday, U-Boot list! > > Here is attempt 2 at making this USB controller

[PATCH 2/2] sunxi: Support UART2 on the T113

2024-04-10 Thread John Watts
The T113 supports UART2 on PD1 and PD2. Add it as an option. Signed-off-by: John Watts --- arch/arm/mach-sunxi/board.c | 4 include/sunxi_gpio.h| 1 + 2 files changed, 5 insertions(+) diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index f5da50b43a

[PATCH 1/2] sunxi: Support UART1 on the T113

2024-04-10 Thread John Watts
The T113 supports UART1 on pins PG6 and PG7, add support for it here. Signed-off-by: John Watts --- arch/arm/mach-sunxi/board.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index f4dbb2a740..f5da50b43a 100644

[PATCH 0/2] sunxi: Support UART1 and UART2 on the T113

2024-04-10 Thread John Watts
The T113 supports UART1 and UART2 on PG and PD pins respectively. Add support for these in U-Boot so we can use them. Note: I'm not entirely sure if the PD pins should be default, they overlap with the LCD pins. I am however using this on a real board. Signed-off-by: John Watts --- John Watts

[PATCH] ubi: Depend on MTD

2024-04-10 Thread John Watts
UBI required MTD to build correctly, add it as a Kconfig dependency. Signed-off-by: John Watts --- While working with UBI on my SPI NAND patch series I found it was possible to enable it without enabling the MTD subsystem. Add a Kconfig option to solve this. --- drivers/mtd/ubi/Kconfig | 1 + 1

[PATCH] boot: Pass baud rate to stdout-path

2024-04-10 Thread John Watts
Linux might use the wrong baud rate such as 9600 by default, make sure to specify it when passing the serial port over. Signed-off-by: John Watts --- On my board at least (a sunxi T113) the serial console will initialize as 9600 baud instead of the set baud. Pass the baud with the serial device

Re: [PATCH 0/8] SUNIV SPI NAND support in SPL

2024-04-10 Thread John Watts
Hello, I've used this code extensively, incorporated it in to an RFC branch of mine during development and reviewed it in the process. John. Reviewed-by: John Watts Tested-by: John Watts On Fri, Oct 14, 2022 at 11:05:12AM +0800, Icenowy Zheng wrote: > This patchset tries to extend SPI-ba

Re: [PATCH v1 1/2] sunxi: SPL SPI: Add SPI boot support for the Allwinner R528/T113 SoCs

2024-04-10 Thread John Watts
Hi there, I've been using my own independent implementation of this patch but today I gave this one a test in my tree and found out it works. The code looks fine in comparison, so here's a Tested-by and a Reviewed-by. John. Tested-by: John Watts Reviewed-by: John Watts On Sat, Nov 11, 2023

[PATCH RFC 15/15] spl: Support loading FIT images in UBI

2024-04-10 Thread John Watts
The FIT loader doesn't support access through UBI, so load the FIT image ourself in to memory then boot it normally. Signed-off-by: John Watts --- common/spl/spl_ubi.c | 34 ++ 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/common/spl/spl_ubi.c b

[PATCH RFC 14/15] spl: Support SPI NAND boot in UBI

2024-04-10 Thread John Watts
UBI supports traditional NAND and oneNAND devices already, so add support for booting from SPI NAND devices. Signed-off-by: John Watts --- common/spl/spl_ubi.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c index

[PATCH RFC 13/15] sunxi: Implement spinand_ helpers

2024-04-10 Thread John Watts
These are used by NAND-aware loaders such as UBI. Signed-off-by: John Watts --- arch/arm/mach-sunxi/spl_spi_sunxi.c | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c index 602ebfe8c5..d6b03678d0

[PATCH RFC 12/15] nand: Add spinand_ helper functions

2024-04-10 Thread John Watts
These are implemented by the board-specific SPL code for use with NAND-aware loaders like UBI. Signed-off-by: John Watts --- include/nand.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/nand.h b/include/nand.h index 220ffa202e..9fb8941dce 100644 --- a/include/nand.h +++ b

[PATCH RFC 11/15] sunxi: Use SPL_SPINAND for configuration

2024-04-10 Thread John Watts
Use the newly created SPL_SPINAND configuration options instead of sunxi-only options. No backwards compatibility is needed as the SPI NAND patches are not mainline yet. Signed-off-by: John Watts --- arch/arm/mach-sunxi/Kconfig | 16 arch/arm/mach-sunxi/spl_spi_sunxi.c

[PATCH RFC 10/15] spl: Add SPL_SPINAND configuration options

2024-04-10 Thread John Watts
Boards that support SPI NAND need to specify the page and eraseblock size. Add those as Kconfig options. Signed-off-by: John Watts --- common/spl/Kconfig | 21 + 1 file changed, 21 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 6405374bcc

[PATCH RFC 08/15] spl: Add BOOT_DEVICE_SPINAND option

2024-04-10 Thread John Watts
Currently there are two different boot device options: SPI and NAND. One is intended for SPI NOR operation, the other is intended for dedicated NAND operation. Add a new option for SPI NAND operation. Signed-off-by: John Watts --- arch/arm/include/asm/spl.h | 1 + arch/mips/include/asm

[PATCH RFC 09/15] sunxi: Implement BOOT_DEVICE_SPINAND in SPL

2024-04-10 Thread John Watts
Instead of trying to boot from SPI NAND then SPI NOR in series, select one based on the current boot device. Signed-off-by: John Watts --- arch/arm/include/asm/arch-sunxi/spl.h | 1 + arch/arm/mach-sunxi/board.c | 5 - arch/arm/mach-sunxi/spl_spi_sunxi.c | 28

[PATCH RFC 07/15] sunxi: Separate boot device and boot position

2024-04-10 Thread John Watts
work though. Signed-off-by: John Watts --- arch/arm/include/asm/arch-sunxi/spl.h | 2 -- arch/arm/mach-sunxi/board.c | 22 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/arch/arm/include/asm/arch-sunxi/spl.h b/arch/arm/include/asm/arch-sunxi

[PATCH RFC 06/15] sunxi: enable support for SPI NAND booting on SUNIV

2024-04-10 Thread John Watts
From: Icenowy Zheng As we added support for SPI NAND to the existing SPL SPI codepath, route the boot code to it when it detects the BROM loads SPL from SPI NAND, as for SoCs with both SPI NAND and boot media indicator support, the boot media indicator is the same for SPI NOR and NAND.

[PATCH RFC 05/15] sunxi: SPL SPI: add initial support for booting from SPI NAND

2024-04-10 Thread John Watts
From: Icenowy Zheng This commit adds support for booting from SPI NAND to SPL SPI code by mimicing the behavior of boot ROM (use fixed page size and sequentially try SPI NOR and NAND). Signed-off-by: Icenowy Zheng Tested-by: Samuel Holland # Orange Pi Zero Plus ---

[PATCH RFC 04/15] sunxi: SPL SPI: allow multiple boot attempt

2024-04-10 Thread John Watts
From: Icenowy Zheng As we're going to add support for SPI NAND to this code, add code that allows multiple boot attempts with different load offsets and functions. To keep compatibility with loading raw binary on SPI NOR, a bool parameter is used to allow booting without valid magic number when

[PATCH RFC 03/15] sunxi: SPL SPI: add support for read command with 2 byte address

2024-04-10 Thread John Watts
From: Icenowy Zheng This kind of read command is utilized in SPI NANDs for reading data inside a selected page, which is obviously smaller than how much 2 byte address can address. So 2 bytes are used for the address and one dummy byte is needed after the real address. As the address is sent out

[PATCH RFC 02/15] sunxi: SPL SPI: extract code for doing SPI transfer

2024-04-10 Thread John Watts
From: Icenowy Zheng To support SPI NAND flashes, more commands than Read (03h) are needed. Extract the code for doing SPI transfer from the reading code for code reuse. Signed-off-by: Icenowy Zheng Reviewed-by: Samuel Holland Tested-by: Samuel Holland # Orange Pi Zero Plus ---

[PATCH RFC 01/15] sunxi: SPL SPI: Add SPI boot support for the Allwinner R528/T113 SoCs

2024-04-10 Thread John Watts
From: Maksim Kiselev R528/T113 SoCs uses the same SPI IP as the H6, also have the same clocks and reset bits layout, but the CCU base is different. Another difference is that the new SoCs do not have a clock divider inside. Instead of this we should configure sample mode depending on input clock

[PATCH RFC 00/15] Support SPI NAND booting on the T113

2024-04-10 Thread John Watts
://lore.kernel.org/all/2023133432.755363-2-biguncle...@gmail.com/ Hopefully this can get the ball rolling on how to properly implement SPI NAND support in mainline U-Boot. Signed-off-by: John Watts --- Icenowy Zheng (5): sunxi: SPL SPI: extract code for doing SPI transfer sunxi: SPL SPI

T113 sunxi SPI NAND thoughts, feedback wanted

2023-12-11 Thread John Watts
Greetings sunxi and U-Boot friends! Over the past five months I've managed to slog through getting a complete SPI NAND U-Boot and Linux setup running on my Mango Pi MQ. My tree is here, but I will be slowly trying to upstream my work over the next few months: