Re: [PATCH] hw/sd: Fix sun4i allwinner-sdhost for U-Boot

2022-11-14 Thread Strahinja Jankovic
Hi, Thank you for your reply. On Mon, Nov 14, 2022 at 4:42 PM Peter Maydell wrote: > > On Sat, 12 Nov 2022 at 21:49, Strahinja Jankovic > wrote: > > > > Trying to run U-Boot for Cubieboard (Allwinner A10) fails because it cannot > > access SD card. The problem is th

Re: [PATCH] hw/sd: Fix sun4i allwinner-sdhost for U-Boot

2022-11-14 Thread Strahinja Jankovic
On Mon, Nov 14, 2022 at 6:36 PM Peter Maydell wrote: > > On Mon, 14 Nov 2022 at 17:29, Strahinja Jankovic > wrote: > > > > Hi, > > > > Thank you for your reply. > > > > On Mon, Nov 14, 2022 at 4:42 PM Peter Maydell > > wrote: > >

Re: [PATCH] hw/sd: Fix sun4i allwinner-sdhost for U-Boot

2022-11-15 Thread Strahinja Jankovic
On Tue, Nov 15, 2022 at 5:02 PM Peter Maydell wrote: > > On Mon, 14 Nov 2022 at 19:22, Strahinja Jankovic > wrote: > > Ok, I will start preparing that separate patch for error logging for sun4i. > > > > Since this is my first time submitting a patch, is there anything

[PATCH 3/6] hw/i2c: Allwinner TWI/I2C Emulation

2022-12-03 Thread Strahinja Jankovic
added for both boards. Signed-off-by: Strahinja Jankovic --- hw/arm/Kconfig | 2 + hw/arm/allwinner-a10.c | 8 + hw/arm/allwinner-h3.c | 11 +- hw/i2c/Kconfig | 4 + hw/i2c/allwinner-i2c.c | 417 + hw/i2c

[PATCH 4/6] hw/misc: Allwinner AXP-209 Emulation

2022-12-03 Thread Strahinja Jankovic
This patch adds minimal support for AXP-209 PMU. Most important is chip ID since U-Boot SPL expects version 0x1. Besides the chip ID register, reset values for two more registers used by A10 U-Boot SPL are covered. Signed-off-by: Strahinja Jankovic --- hw/arm/Kconfig | 1 + hw

[PATCH 5/6] hw/arm: Add AXP-209 to Cubieboard

2022-12-03 Thread Strahinja Jankovic
SPL Boot for Cubieboard expects AXP-209 connected to I2C0 bus. Signed-off-by: Strahinja Jankovic --- hw/arm/cubieboard.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 5e3372a3c7..afc7980414 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm

[PATCH 0/6] Enable Cubieboard A10 boot SPL from SD card

2022-12-03 Thread Strahinja Jankovic
cubieboard -nographic -sd ~/Armbian_22.11.0-trunk_Cubieboard_kinetic_edge_6.0.7.img Strahinja Jankovic (6): hw/misc: Allwinner-A10 Clock Controller Module Emulation hw/misc: Allwinner A10 DRAM Controller Emulation hw/i2c: Allwinner TWI/I2C Emulation hw/misc: Allwinner AXP-209 Emulation hw/arm

[PATCH 2/6] hw/misc: Allwinner A10 DRAM Controller Emulation

2022-12-03 Thread Strahinja Jankovic
e and updates state of registers as SPL expects it. Signed-off-by: Strahinja Jankovic --- hw/arm/Kconfig| 1 + hw/arm/allwinner-a10.c| 7 + hw/misc/Kconfig | 3 + hw/misc/allwinner-a10-dramc.c | 179 +

[PATCH 1/6] hw/misc: Allwinner-A10 Clock Controller Module Emulation

2022-12-03 Thread Strahinja Jankovic
During SPL boot several Clock Controller Module (CCM) registers are read, most important are PLL and Tuning, as well as divisor registers. This patch adds these registers and initializes reset values from user's guide. Signed-off-by: Strahinja Jankovic --- hw/arm/Kc

[PATCH 6/6] hw/arm: Allwinner A10 enable SPL load from MMC

2022-12-03 Thread Strahinja Jankovic
This patch enables copying of SPL from MMC if `-kernel` parameter is not passed when starting QEMU. SPL is copied to SRAM_A. The approach is reused from Allwinner H3 implementation. Tested with Armbian and custom Yocto image. Signed-off-by: Strahinja Jankovic --- hw/arm/allwinner-a10.c

Re: [PATCH 4/6] hw/misc: Allwinner AXP-209 Emulation

2022-12-05 Thread Strahinja Jankovic
Hi Philippe, On Sun, Dec 4, 2022 at 10:39 PM Philippe Mathieu-Daudé wrote: > > Hi Strahinja, > > On 4/12/22 00:19, Strahinja Jankovic wrote: > > This patch adds minimal support for AXP-209 PMU. > > Most important is chip ID since U-Boot SPL expects version 0x1. Besides

Re: [PATCH] tests/avocado: update sunxi kernel from armbian to 6.6.16

2024-04-25 Thread Strahinja Jankovic
_armhf__6.6.16-Seb3e-D6b4a-P2359-Ce96bHfe66-HK01ba-V014b-B067e-R448a.deb') > > +deb_hash = 'f7c3c8c5432f765445dc6e7eab02f3bbe668256b' > > deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) > > kernel_path = self.extract_from_deb(deb_path, > > - > '/boot/vmlinuz-5.10.16-sunxi') > > -dtb_path = > '/usr/lib/linux-image-current-sunxi/sun8i-h3-orangepi-pc.dtb' > > + > '/boot/vmlinuz-6.6.16-current-sunxi') > > +dtb_path = > '/usr/lib/linux-image-6.6.16-current-sunxi/sun8i-h3-orangepi-pc.dtb' > > dtb_path = self.extract_from_deb(deb_path, dtb_path) > > rootfs_url = (' > http://storage.kernelci.org/images/rootfs/buildroot/' > > > 'buildroot-baseline/20221116.0/armel/rootfs.ext2.xz') > > diff --git a/tests/avocado/replay_kernel.py > b/tests/avocado/replay_kernel.py > > index 10d99403a4c..0474f7b7c8e 100644 > > --- a/tests/avocado/replay_kernel.py > > +++ b/tests/avocado/replay_kernel.py > > @@ -203,12 +203,12 @@ def test_arm_cubieboard_initrd(self): > > :avocado: tags=machine:cubieboard > > """ > > deb_url = ('https://apt.armbian.com/pool/main/l/' > > - > 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb') > > -deb_hash = '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0' > > + > > 'linux-6.6.16/linux-image-current-sunxi_24.2.1_armhf__6.6.16-Seb3e-D6b4a-P2359-Ce96bHfe66-HK01ba-V014b-B067e-R448a.deb') > > +deb_hash = 'f7c3c8c5432f765445dc6e7eab02f3bbe668256b' > > deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) > > kernel_path = self.extract_from_deb(deb_path, > > - > '/boot/vmlinuz-5.10.16-sunxi') > > -dtb_path = > '/usr/lib/linux-image-current-sunxi/sun4i-a10-cubieboard.dtb' > > + > '/boot/vmlinuz-6.6.16-current-sunxi') > > +dtb_path = > '/usr/lib/linux-image-6.6.16-current-sunxi/sun4i-a10-cubieboard.dtb' > > dtb_path = self.extract_from_deb(deb_path, dtb_path) > > initrd_url = ('https://github.com/groeck/linux-build-test/raw/' > >'2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' > > -- > > 2.34.1 > > > Reviewed-by: Strahinja Jankovic Best regards, Strahinja

Re: [PATCH v1 00/11] *** add allwinner-r40 support ***

2023-03-25 Thread Strahinja Jankovic
sset from tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_uboot_netbsd9 Fetching asset from tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_uboot_netbsd9 JOB ID : 6655d0df3c2eecf2181d7fa2d7cd8aee9e4b504c JOB LOG: /home/strahinja/avocado/job-results/job-2023-03-25T15.31-6655d0d/job.log ... RESULTS: PASS 5

Re: [PATCH v1 01/11] hw: arm: Add bananapi M2-Ultra and allwinner-r40 support

2023-03-25 Thread Strahinja Jankovic
Hi, On Tue, Mar 21, 2023 at 11:25 AM wrote: > > From: qianfan Zhao > > Allwinner R40 (sun8i) SoC features a Quad-Core Cortex-A7 ARM CPU, > and a Mali400 MP2 GPU from ARM. It's also known as the Allwinner T3 > for In-Car Entertainment usage, A40i and A40pro are variants that > differ in applicabl

Re: [PATCH v1 02/11] hw/arm/allwinner-r40: add Clock Control Unit

2023-03-25 Thread Strahinja Jankovic
Hi, On Tue, Mar 21, 2023 at 11:25 AM wrote: > > From: qianfan Zhao > > The CCU provides the registers to program the PLLs and the controls > most of the clock generation, division, distribution, synchronization > and gating. > > This commit adds support for the Clock Control Unit which emulates

Re: [PATCH v1 03/11] hw: allwinner-r40: Complete uart devices

2023-03-25 Thread Strahinja Jankovic
40.h > index b355af2c4f..dfb5eb609c 100644 > --- a/include/hw/arm/allwinner-r40.h > +++ b/include/hw/arm/allwinner-r40.h > @@ -41,6 +41,13 @@ enum { > AW_R40_DEV_CCU, > AW_R40_DEV_PIT, > AW_R40_DEV_UART0, > +AW_R40_DEV_UART1, > +AW_R40_DEV_UART2, > +AW_R40_DEV_UART3, > +AW_R40_DEV_UART4, > +AW_R40_DEV_UART5, > +AW_R40_DEV_UART6, > +AW_R40_DEV_UART7, > AW_R40_DEV_GIC_DIST, > AW_R40_DEV_GIC_CPU, > AW_R40_DEV_GIC_HYP, > -- > 2.25.1 > Reviewed-by: Strahinja Jankovic Best regards, Strahinja

Re: [PATCH v1 04/11] hw: arm: allwinner-r40: Add 5 TWI controllers

2023-03-25 Thread Strahinja Jankovic
Hi, On Tue, Mar 21, 2023 at 11:25 AM wrote: > > From: qianfan Zhao > > TWI(i2c) is designed to be used as an interface between CPU host and the > serial 2-Wire bus. It can support all standard 2-Wire transfer, can be > operated in standard mode(100kbit/s) or fast-mode, supporting data rate > up

Re: [PATCH v1 05/11] hw/misc: AXP221 PMU Emulation

2023-03-25 Thread Strahinja Jankovic
Hi, On Tue, Mar 21, 2023 at 11:25 AM wrote: > > From: qianfan Zhao > > This patch adds minimal support for AXP-221 PMU and connect it to > bananapi M2U board. > > Signed-off-by: qianfan Zhao As I wrote in the RFC patch, I would suggest renaming the axp209.c file to axp2xx_pmu.c and extending i

Re: [PATCH v2 1/4] hw/watchdog: Allwinner WDT emulation for system reset

2023-03-26 Thread Strahinja Jankovic
Hi Niek, On Sun, Mar 26, 2023 at 9:04 PM Niek Linnenbank wrote: > > Hi Strahinja, > > > > > On Fri, Mar 17, 2023 at 1:13 AM Strahinja Jankovic > wrote: >> >> This patch adds basic support for Allwinner WDT. >> Both sun4i and sun6i variants are supporte

[PATCH v3 2/4] hw/arm: Add WDT to Allwinner-A10 and Cubieboard

2023-03-26 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-A10 and Cubieboard. WDT is added as an overlay to the Timer module memory map. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- docs/system/arm/cubieboard.rst | 1 + hw/arm/Kconfig | 1 + hw/arm/allwinner-a10.c | 7

[PATCH v3 1/4] hw/watchdog: Allwinner WDT emulation for system reset

2023-03-26 Thread Strahinja Jankovic
This patch adds basic support for Allwinner WDT. Both sun4i and sun6i variants are supported. However, interrupt generation is not supported, so WDT can be used only to trigger system reset. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank Tested-by: Niek Linnenbank --- hw

[PATCH v3 4/4] tests/avocado: Add reboot tests to Cubieboard

2023-03-26 Thread Strahinja Jankovic
Cubieboard tests end with comment "reboot not functioning; omit test". Fix this so reboot is done at the end of each test. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank Tested-by: Niek Linnenbank --- tests/avocado/boot_linux_console.py | 15 --- 1 fi

[PATCH v3 0/4] Basic Allwinner WDT emulation

2023-03-26 Thread Strahinja Jankovic
implementation (changes only in patch 01/04) - Removed unnecessary checks - instead of changing enum to start from 1, removed if (!c->regmap[offset]) since it was conflicting enum values - Reorganized comments Strahinja Jankovic (4): hw/watchdog: Allwinner WDT emulation for system reset hw/

[PATCH v3 3/4] hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC

2023-03-26 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-H3 and Orangepi-PC. WDT is added as an overlay to the Timer module memory area. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- docs/system/arm/orangepi.rst | 1 + hw/arm/Kconfig| 1 + hw/arm/allwinner-h3.c | 8

Re: [PATCH v2 04/12] hw: arm: allwinner-r40: Add i2c0 device

2023-04-11 Thread Strahinja Jankovic
gt; > @@ -48,6 +49,7 @@ enum { > AW_R40_DEV_UART5, > AW_R40_DEV_UART6, > AW_R40_DEV_UART7, > +AW_R40_DEV_TWI0, > AW_R40_DEV_GIC_DIST, > AW_R40_DEV_GIC_CPU, > AW_R40_DEV_GIC_HYP, > @@ -89,6 +91,7 @@ struct AwR40State { > AwA10PITState timer; > AwSdHostState mmc[AW_R40_NUM_MMCS]; > AwR40ClockCtlState ccu; > +AWI2CState i2c0; > GICState gic; > MemoryRegion sram_a1; > MemoryRegion sram_a2; > -- > 2.25.1 > Reviewed-by: Strahinja Jankovic Best regards, Strahinja

Re: [PATCH v2 03/12] hw: allwinner-r40: Complete uart devices

2023-04-11 Thread Strahinja Jankovic
AW_R40_DEV_GIC_HYP, > @@ -70,6 +77,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(AwR40State, AW_R40) > * which are currently emulated by the R40 SoC code. > */ > #define AW_R40_NUM_MMCS 4 > +#define AW_R40_NUM_UARTS8 > > struct AwR40State { > /*< private >*/ > -- > 2.25.1 > Reviewed-by: Strahinja Jankovic Best regards, Strahinja

Re: [RFC PATCH v1 08/12] hw/misc: AXP221 PMU Emulation

2023-03-11 Thread Strahinja Jankovic
ter map and reset values, so the functions can be shared. Other than that, great work! I hope I will have more time when you submit the patches without the RFC tag, so I can help with the review. Best regards, Strahinja Jankovic > --- > hw/arm/Kconfig| 1 + > hw/arm/bananapi_

[PATCH 3/4] hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC

2023-03-11 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-H3 and Orangepi-PC. WDT is added as an overlay to the Timer module memory area. Signed-off-by: Strahinja Jankovic --- docs/system/arm/orangepi.rst | 1 + hw/arm/Kconfig| 1 + hw/arm/allwinner-h3.c | 8 include/hw/arm/allwinner

[PATCH 0/4] Basic Allwinner WDT emulation

2023-03-11 Thread Strahinja Jankovic
patches the `reboot` command can be used for both Cubieboard and Orangepi-PC in order to restart the system. Also, Cubieboard avocado tests have been improved to include reboot steps as well. Strahinja Jankovic (4): hw/watchdog: Allwinner WDT emulation for system reset hw/arm: Add WDT to

[PATCH 1/4] hw/watchdog: Allwinner WDT emulation for system reset

2023-03-11 Thread Strahinja Jankovic
This patch adds basic support for Allwinner WDT. Both sun4i and sun6i variants are supported. However, interrupt generation is not supported, so WDT can be used only to trigger system reset. Signed-off-by: Strahinja Jankovic --- hw/watchdog/Kconfig | 4 + hw/watchdog

[PATCH 2/4] hw/arm: Add WDT to Allwinner-A10 and Cubieboard

2023-03-11 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-A10 and Cubieboard. WDT is added as an overlay to the Timer module memory map. Signed-off-by: Strahinja Jankovic --- docs/system/arm/cubieboard.rst | 1 + hw/arm/Kconfig | 1 + hw/arm/allwinner-a10.c | 7 +++ include/hw/arm/allwinner

[PATCH 4/4] tests/avocado: Add reboot tests to Cubieboard

2023-03-11 Thread Strahinja Jankovic
Cubieboard tests end with comment "reboot not functioning; omit test". Fix this so reboot is done at the end of each test. Signed-off-by: Strahinja Jankovic --- tests/avocado/boot_linux_console.py | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tes

Re: [PATCH 3/4] hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC

2023-03-13 Thread Strahinja Jankovic
Hi, On Mon, Mar 13, 2023 at 8:53 AM Philippe Mathieu-Daudé wrote: > > Hi, > > On 11/3/23 15:41, Strahinja Jankovic wrote: > > This patch adds WDT to Allwinner-H3 and Orangepi-PC. > > WDT is added as an overlay to the Timer module memory area. > > > &g

Re: [PATCH 1/4] hw/watchdog: Allwinner WDT emulation for system reset

2023-03-15 Thread Strahinja Jankovic
)Hi Niek, On Tue, Mar 14, 2023 at 10:14 PM Niek Linnenbank wrote: > > Hi Strahinja, > > > On Sat, Mar 11, 2023 at 3:41 PM Strahinja Jankovic > wrote: >> >> This patch adds basic support for Allwinner WDT. >> Both sun4i and sun6i variants are supported. >

Re: [PATCH 2/4] hw/arm: Add WDT to Allwinner-A10 and Cubieboard

2023-03-15 Thread Strahinja Jankovic
Hi Niek, On Tue, Mar 14, 2023 at 10:21 PM Niek Linnenbank wrote: > > Hi Strahinja, > > > On Sat, Mar 11, 2023 at 3:42 PM Strahinja Jankovic > wrote: >> >> This patch adds WDT to Allwinner-A10 and Cubieboard. >> WDT is added as an overlay to the Timer mo

Re: [PATCH v2 09/10] contrib/gitdm: add more individual contributors

2023-03-15 Thread Strahinja Jankovic
gt; Cc: Jason A. Donenfeld > Cc: Strahinja Jankovic > --- > contrib/gitdm/group-map-individuals | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/contrib/gitdm/group-map-individuals > b/contrib/gitdm/group-map-individuals > index e2263a5ee3..0e4618f1ce 10

[PATCH v2 0/4] Basic Allwinner WDT emulation

2023-03-16 Thread Strahinja Jankovic
changing enum to start from 1, removed if (!c->regmap[offset]) since it was conflicting enum values - Reorganized comments Strahinja Jankovic (4): hw/watchdog: Allwinner WDT emulation for system reset hw/arm: Add WDT to Allwinner-A10 and Cubieboard hw/arm: Add WDT to Allwinner-H3

[PATCH v2 1/4] hw/watchdog: Allwinner WDT emulation for system reset

2023-03-16 Thread Strahinja Jankovic
This patch adds basic support for Allwinner WDT. Both sun4i and sun6i variants are supported. However, interrupt generation is not supported, so WDT can be used only to trigger system reset. Signed-off-by: Strahinja Jankovic --- hw/watchdog/Kconfig | 4 + hw/watchdog

[PATCH v2 2/4] hw/arm: Add WDT to Allwinner-A10 and Cubieboard

2023-03-16 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-A10 and Cubieboard. WDT is added as an overlay to the Timer module memory map. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- docs/system/arm/cubieboard.rst | 1 + hw/arm/Kconfig | 1 + hw/arm/allwinner-a10.c | 7

[PATCH v2 4/4] tests/avocado: Add reboot tests to Cubieboard

2023-03-16 Thread Strahinja Jankovic
Cubieboard tests end with comment "reboot not functioning; omit test". Fix this so reboot is done at the end of each test. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank Tested-by: Niek Linnenbank --- tests/avocado/boot_linux_console.py | 15 --- 1 fi

[PATCH v2 3/4] hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC

2023-03-16 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-H3 and Orangepi-PC. WDT is added as an overlay to the Timer module memory area. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- docs/system/arm/orangepi.rst | 1 + hw/arm/Kconfig| 1 + hw/arm/allwinner-h3.c | 8

Re: [RFC PATCH v1 00/12] *** Add allwinner R40 device support ***

2023-03-20 Thread Strahinja Jankovic
Hi, Could you try maybe running OpenWRT instead of Armbian? Link to the stable image for M2 Ultra is is https://downloads.openwrt.org/releases/22.03.3/targets/sunxi/cortexa7/openwrt-22.03.3-sunxi-cortexa7-sinovoip_bananapi-m2-ultra-ext4-sdcard.img.gz Best reregards , Strahinja On Mon, Mar 20,

Re: [PATCH v1 2/2] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG

2023-02-17 Thread Strahinja Jankovic
Hi, I tried running Avocado tests for cubieboard with following command: ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes avocado --show=app,console run-t machine:cubieboard tests/avocado/boot_linux_console.py Without this patch all tests pass: RESULTS: PASS 3 | ERROR 0 | FA

Re: [PATCH v1 2/2] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG

2023-02-18 Thread Strahinja Jankovic
Hi, Yes, that would explain why this happened. On Sat, Feb 18, 2023 at 3:13 AM qianfan wrote: > > > > 在 2023/2/18 0:54, Strahinja Jankovic 写道: > > Hi, > > > > I tried running Avocado tests for cubieboard with following command: > > > > ARMBIAN_ARTIFAC

Re: [PATCH v2 2/3] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs

2023-02-21 Thread Strahinja Jankovic
#define TYPE_AW_I2C "allwinner.i2c" > + > +/** Allwinner I2C sun6i family and newer (A31, H2+, H3, etc) */ > +#define TYPE_AW_I2C_SUN6ITYPE_AW_I2C "-sun6i" > + > OBJECT_DECLARE_SIMPLE_TYPE(AWI2CState, AW_I2C) > > #define AW_I2C_MEM_SIZE 0x24 > @@ -50,6 +54,8 @@ struct AWI2CState { > uint8_t srst; > uint8_t efr; > uint8_t lcr; > + > +bool irq_clear_inverted; > }; > > #endif /* ALLWINNER_I2C_H */ > -- > 2.25.1 > Tried this patch with avocado for cubieboard and orangepi-pc, all tests are passing. So for me: Reviewed-by: Strahinja Jankovic Tested-by: Strahinja Jankovic

Re: [PATCH v2 3/3] hw: arm: allwinner-h3: Fix and complete H3 i2c devices

2023-02-21 Thread Strahinja Jankovic
AW_H3_DEV_TWI0, > +AW_H3_DEV_TWI1, > + AW_H3_DEV_TWI2, > AW_H3_DEV_DRAMCOM, > AW_H3_DEV_DRAMCTL, > AW_H3_DEV_DRAMPHY, > @@ -93,6 +95,7 @@ enum { > AW_H3_DEV_GIC_VCPU, > AW_H3_DEV_RTC, > AW_H3_DEV_CPUCFG, > +AW_H3_DEV_R_TWI, > AW_H3_DEV_SDRAM > }; > > @@ -133,6 +136,9 @@ struct AwH3State { > AwSidState sid; > AwSdHostState mmc0; > AWI2CState i2c0; > +AWI2CState i2c1; > +AWI2CState i2c2; > +AWI2CState r_twi; > AwSun8iEmacState emac; > AwRtcState rtc; > GICState gic; > -- > 2.25.1 > As far as I can see, the TWI for H3 is indeed treated as "allwinner,sun6i-a31-i2c" in Linux, so it should have W1C functionality and use TYPE_AW_I2C_SUN6I. Reviewed-by: Strahinja Jankovic Best regards, Strahinja

[PATCH] hw/sd: Fix sun4i allwinner-sdhost for U-Boot

2022-11-12 Thread Strahinja Jankovic
and Linux kernel image built for Cubieboard and OrangePi PC. Signed-off-by: Strahinja Jankovic --- hw/sd/allwinner-sdhost.c | 67 ++-- include/hw/sd/allwinner-sdhost.h | 1 + 2 files changed, 47 insertions(+), 21 deletions(-) diff --git a/hw/sd/allwinner

Re: [PATCH 3/6] hw/i2c: Allwinner TWI/I2C Emulation

2022-12-08 Thread Strahinja Jankovic
Hi Niek, On Wed, Dec 7, 2022 at 11:06 PM Niek Linnenbank wrote: > > Hi Strahinja, > > On Sun, Dec 4, 2022 at 12:19 AM Strahinja Jankovic > wrote: >> >> This patch implements Allwinner TWI/I2C controller emulation. Only >> master-mode functionality is im

Re: [PATCH 6/6] hw/arm: Allwinner A10 enable SPL load from MMC

2022-12-08 Thread Strahinja Jankovic
On Wed, Dec 7, 2022 at 11:39 PM Niek Linnenbank wrote: > > Hi Strahinja, > > > On Sun, Dec 4, 2022 at 12:19 AM Strahinja Jankovic > wrote: >> >> This patch enables copying of SPL from MMC if `-kernel` parameter is not >> passed when starting QEMU. SPL is cop

Re: [PATCH 0/6] Enable Cubieboard A10 boot SPL from SD card

2022-12-08 Thread Strahinja Jankovic
error -110 > > The SY8106a appears to be an peripheral attached to the I2C bus on the > orangepi-pc, and we don't emulate the SY8106a yet, so that's an error to be > expected: > https://linux-sunxi.org/SY8106A > > So for the series: > Tested-by: Niek Linnenbank >

[PATCH v2 3/7] hw/i2c: Allwinner TWI/I2C Emulation

2022-12-18 Thread Strahinja Jankovic
added for both boards. Signed-off-by: Strahinja Jankovic --- hw/arm/Kconfig | 2 + hw/arm/allwinner-a10.c | 8 + hw/arm/allwinner-h3.c | 11 +- hw/i2c/Kconfig | 4 + hw/i2c/allwinner-i2c.c | 459 + hw/i2c

[PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-18 Thread Strahinja Jankovic
* minor code style fixes Strahinja Jankovic (7): hw/misc: Allwinner-A10 Clock Controller Module Emulation hw/misc: Allwinner A10 DRAM Controller Emulation hw/i2c: Allwinner TWI/I2C Emulation hw/misc: Allwinner AXP-209 Emulation hw/arm: Add AXP-209 to Cubieboard hw/arm: Allwinner A10 enable

[PATCH v2 2/7] hw/misc: Allwinner A10 DRAM Controller Emulation

2022-12-18 Thread Strahinja Jankovic
e and updates state of registers as SPL expects it. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- hw/arm/Kconfig| 1 + hw/arm/allwinner-a10.c| 7 + hw/misc/Kconfig | 3 + hw/misc/allwinner-a10-dramc.c

[PATCH v2 7/7] docs/system/arm: Update Allwinner with TWI (I2C)

2022-12-18 Thread Strahinja Jankovic
TWI (I2C) is supported so docs are updated for Cubieboard and Orangepi-PC board. Signed-off-by: Strahinja Jankovic --- docs/system/arm/cubieboard.rst | 1 + docs/system/arm/orangepi.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/system/arm/cubieboard.rst b/docs/system/arm

[PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Strahinja Jankovic
This patch adds minimal support for AXP-209 PMU. Most important is chip ID since U-Boot SPL expects version 0x1. Besides the chip ID register, reset values for two more registers used by A10 U-Boot SPL are covered. Signed-off-by: Strahinja Jankovic --- hw/arm/Kconfig | 1 + hw

[PATCH v2 1/7] hw/misc: Allwinner-A10 Clock Controller Module Emulation

2022-12-18 Thread Strahinja Jankovic
During SPL boot several Clock Controller Module (CCM) registers are read, most important are PLL and Tuning, as well as divisor registers. This patch adds these registers and initializes reset values from user's guide. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- h

[PATCH v2 5/7] hw/arm: Add AXP-209 to Cubieboard

2022-12-18 Thread Strahinja Jankovic
SPL Boot for Cubieboard expects AXP-209 connected to I2C0 bus. Signed-off-by: Strahinja Jankovic --- hw/arm/cubieboard.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 5e3372a3c7..afc7980414 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm

[PATCH v2 6/7] hw/arm: Allwinner A10 enable SPL load from MMC

2022-12-18 Thread Strahinja Jankovic
This patch enables copying of SPL from MMC if `-kernel` parameter is not passed when starting QEMU. SPL is copied to SRAM_A. The approach is reused from Allwinner H3 implementation. Tested with Armbian and custom Yocto image. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Strahinja Jankovic
I forgot to add Philippe Mathieu-Daudé in CC for this patch, so I'm fixing it now. Best regards, Strahinja Jankovic On Sun, Dec 18, 2022 at 10:19 PM Strahinja Jankovic wrote: > > This patch adds minimal support for AXP-209 PMU. > Most important is chip ID since U-Boot SPL expec

Re: [PATCH v2 7/7] docs/system/arm: Update Allwinner with TWI (I2C)

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 11:02 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 22:19, Strahinja Jankovic wrote: > > TWI (I2C) is supported so docs are updated for Cubieboard and > > Orangepi-PC board. > > > > Signed-off-by: Strahinja Jankovic > > --- >

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 11:07 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 22:19, Strahinja Jankovic wrote: > > This patch adds minimal support for AXP-209 PMU. > > Most important is chip ID since U-Boot SPL expects version 0x1. Besides > > the chip ID register, r

Re: [PATCH v2 6/7] hw/arm: Allwinner A10 enable SPL load from MMC

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 10:59 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 22:19, Strahinja Jankovic wrote: > > This patch enables copying of SPL from MMC if `-kernel` parameter is not > > passed when starting QEMU. SPL is copied to SRAM_A. > > > > The app

Re: [PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 11:17 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 22:19, Strahinja Jankovic wrote: > > This patch series adds missing Allwinner A10 modules needed for > > successful SPL boot: > > - Clock controller module > > - DRAM controller >

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 11:23 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 23:12, Strahinja Jankovic wrote: > > Hi, > > > > On Sun, Dec 18, 2022 at 11:07 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 18/12/22 22:19, Strahinja Jankovic

Re: [PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-18 Thread Strahinja Jankovic
PM Strahinja Jankovic wrote: > > Hi, > > > On Sun, Dec 18, 2022 at 11:17 PM Philippe Mathieu-Daudé > wrote: > > > > On 18/12/22 22:19, Strahinja Jankovic wrote: > > > This patch series adds missing Allwinner A10 modules needed for > > > succ

Re: [PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-19 Thread Strahinja Jankovic
Hi, On Mon, Dec 19, 2022 at 8:11 AM Philippe Mathieu-Daudé wrote: > > On 18/12/22 23:57, Strahinja Jankovic wrote: > > Hi, > > > > I just looked around a bit more. Would OpenWrt image be acceptable? > > Sure. > > > It looks like there are releases for cu

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-19 Thread Strahinja Jankovic
On Mon, Dec 19, 2022 at 8:15 AM Philippe Mathieu-Daudé wrote: > > On 18/12/22 23:39, Strahinja Jankovic wrote: > > Hi, > > > > On Sun, Dec 18, 2022 at 11:23 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 18/12/22 23:12, Strahinja Jankovic wrot

[PATCH v3 5/7] hw/arm: Add AXP209 to Cubieboard

2022-12-26 Thread Strahinja Jankovic
SPL Boot for Cubieboard expects AXP209 connected to I2C0 bus. Signed-off-by: Strahinja Jankovic Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/Kconfig | 1 + hw/arm/cubieboard.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index eefe1fd134

[PATCH v3 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-26 Thread Strahinja Jankovic
in AXP209 since .reset covers functionality * moved defines to allwinner_i2c.c from header file * updated docs with information about TWI * minor code style fixes Strahinja Jankovic (7): hw/misc: Allwinner-A10 Clock Controller Module Emulation hw/misc: Allwinner A10 DRAM Controller Emulation

[PATCH v3 6/7] hw/arm: Allwinner A10 enable SPL load from MMC

2022-12-26 Thread Strahinja Jankovic
This patch enables copying of SPL from MMC if `-kernel` parameter is not passed when starting QEMU. SPL is copied to SRAM_A. The approach is reused from Allwinner H3 implementation. Tested with Armbian and custom Yocto image. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank

[PATCH v3 7/7] tests/avocado: Add SD boot test to Cubieboard

2022-12-26 Thread Strahinja Jankovic
Cubieboard now can boot directly from SD card, without the need to pass `-kernel` parameter. Update Avocado tests to cover this functionality. Signed-off-by: Strahinja Jankovic --- tests/avocado/boot_linux_console.py | 47 + 1 file changed, 47 insertions(+) diff

[PATCH v3 4/7] hw/misc: AXP209 PMU Emulation

2022-12-26 Thread Strahinja Jankovic
This patch adds minimal support for AXP-209 PMU. Most important is chip ID since U-Boot SPL expects version 0x1. Besides the chip ID register, reset values for two more registers used by A10 U-Boot SPL are covered. Signed-off-by: Strahinja Jankovic --- MAINTAINERS | 2 + hw/misc

[PATCH v3 3/7] {hw/i2c,docs/system/arm}: Allwinner TWI/I2C Emulation

2022-12-26 Thread Strahinja Jankovic
added for both boards. Docs are also updated for Cubieboard and Orangepi-PC board to indicate I2C availability. Signed-off-by: Strahinja Jankovic --- docs/system/arm/cubieboard.rst | 1 + docs/system/arm/orangepi.rst | 1 + hw/arm/Kconfig | 2 + hw/arm/allwinner-a10.c

[PATCH v3 1/7] hw/misc: Allwinner-A10 Clock Controller Module Emulation

2022-12-26 Thread Strahinja Jankovic
During SPL boot several Clock Controller Module (CCM) registers are read, most important are PLL and Tuning, as well as divisor registers. This patch adds these registers and initializes reset values from user's guide. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- h

[PATCH v3 2/7] hw/misc: Allwinner A10 DRAM Controller Emulation

2022-12-26 Thread Strahinja Jankovic
e and updates state of registers as SPL expects it. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- hw/arm/Kconfig| 1 + hw/arm/allwinner-a10.c| 7 + hw/misc/Kconfig | 3 + hw/misc/allwinner-a10-dramc.c

Re: [PATCH v3 4/7] hw/misc: AXP209 PMU Emulation

2023-01-02 Thread Strahinja Jankovic
Ping This is the only remaining patch from the series waiting for review. Thanks! Best regards, Strahinja On Mon, Dec 26, 2022 at 11:03 PM Strahinja Jankovic wrote: > > This patch adds minimal support for AXP-209 PMU. > Most important is chip ID since U-Boot SPL expects version 0x1

Re: [PATCH v2 3/3] hw/arm: Add watchdog timer to Allwinner H40 and Bananapi board

2024-01-17 Thread Strahinja Jankovic
27;t know what that would look like and what benefits we would have from it. Can you point me to an example that already exists? > > Signed-off-by: Guenter Roeck > Guenter, thank you for submitting this change. The commit looks fine to me, so Reviewed-by: Strahinja Jankovic Best

Re: [RFC Patch 5/5] hw/input: Add Allwinner-A10 PS2 emulation

2023-09-16 Thread Strahinja Jankovic
:14, Strahinja Jankovic > wrote: > > > > Add emulation for PS2-0 and PS2-1 for keyboard/mouse. > > > > Signed-off-by: Strahinja Jankovic > > > > > +static int allwinner_a10_ps2_fctl_is_irq(AwA10PS2State *s) > > +{ > > +return (s->regs[REG_IND

[RFC Patch 3/5] hw/display: Allwinner A10 Display Engine Backend emulation

2023-09-05 Thread Strahinja Jankovic
This patch adds Display Engine Backend 0 (DEBE0) support. This peripheral will hold runtime configuration for the display size and framebuffer offset which will be used by other components. Signed-off-by: Strahinja Jankovic --- hw/arm/allwinner-a10.c | 9 + hw/display

[RFC Patch 1/5] hw/display: Allwinner A10 HDMI controller emulation

2023-09-05 Thread Strahinja Jankovic
This patch adds basic Allwinner A10 HDMI controller support. Emulated HDMI component will always show that a display is connected and provide default EDID info. Signed-off-by: Strahinja Jankovic --- hw/arm/allwinner-a10.c | 7 + hw/display/allwinner-a10-hdmi.c | 214

[RFC Patch 0/5] Allwinner A10 input/output peripherals

2023-09-05 Thread Strahinja Jankovic
contollers present in Allwinner A10. Functionality has been tested with custom Yocto image. This is sent as RFC for now, since there might be some use cases which have not been tested. Strahinja Jankovic (5): hw/display: Allwinner A10 HDMI controller emulation hw/display: Allwinner basic MALI

[RFC Patch 2/5] hw/display: Allwinner basic MALI GPU emulation

2023-09-05 Thread Strahinja Jankovic
This patch adds minimal MALI GPU emulation needed so emulated system thinks GPU is working. Signed-off-by: Strahinja Jankovic --- hw/arm/allwinner-a10.c | 7 + hw/display/allwinner-gpu.c | 212 + hw/display/meson.build | 3 +- hw

[RFC Patch 5/5] hw/input: Add Allwinner-A10 PS2 emulation

2023-09-05 Thread Strahinja Jankovic
Add emulation for PS2-0 and PS2-1 for keyboard/mouse. Signed-off-by: Strahinja Jankovic --- hw/arm/allwinner-a10.c | 18 ++ hw/input/allwinner-a10-ps2.c | 345 +++ hw/input/meson.build | 2 + include/hw/arm/allwinner-a10.h

[RFC Patch 4/5] hw/display: Allwinner A10 LCDC emulation

2023-09-05 Thread Strahinja Jankovic
This patch adds support for Allwinner A10 LCD controller. Current emulation supports only RGB32 colorspace and interacts with DEBE0 to obtain framebuffer address and screen size. Signed-off-by: Strahinja Jankovic --- hw/arm/allwinner-a10.c | 10 + hw/display/allwinner-a10

Re: [RFC Patch 4/5] hw/display: Allwinner A10 LCDC emulation

2023-09-08 Thread Strahinja Jankovic
Hi Philippe, Thank you for your comment. On Wed, Sep 6, 2023 at 7:03 AM Philippe Mathieu-Daudé wrote: > +Gerd & Marc-André for the ui/fb parts. > > On 5/9/23 22:14, Strahinja Jankovic wrote: > > This patch adds support for Allwinner A10 LCD controller. > > Curren

[PATCH v2 1/2] hw/ssi: Allwinner A10 SPI emulation

2024-10-01 Thread Strahinja Jankovic
implement DMA control, and supports only byte-wide access to transmit and receive registers (half-word and word accesses will be treated as byte accesses). Signed-off-by: Strahinja Jankovic --- hw/ssi/Kconfig | 4 + hw/ssi/allwinner-a10-spi.c | 561

[PATCH v2 2/2] {hw/arm,docs/system/arm}: Add SPI to Allwinner A10

2024-10-01 Thread Strahinja Jankovic
The Allwinner A10 SPI controller is added to the Allwinner A10 description, so it is available when Cubieboard is emulated. Update the documentation for Cubieboard to indicate SPI availability. Signed-off-by: Strahinja Jankovic --- docs/system/arm/cubieboard.rst | 1 + hw/arm/Kconfig

[PATCH v2 0/2] Allwinner A10 SPI controller emulation

2024-10-01 Thread Strahinja Jankovic
not aligned to 4-byte boundary is performed - updated SPDX license tags for both header and c files - various minor fixes suggested in review Strahinja Jankovic (2): hw/ssi: Allwinner A10 SPI emulation {hw/arm,docs/system/arm}: Add SPI to Allwinner A10 docs/system/arm/cubieboard.rst | 1

[PATCH] {hw/ssi,docs/system/arm}: Allwinner A10 SPI emulation

2024-09-19 Thread Strahinja Jankovic
byte-wide access. Docs are also updated for Cubieboard to indicate SPI availability. Signed-off-by: Strahinja Jankovic --- docs/system/arm/cubieboard.rst | 1 + hw/arm/Kconfig | 1 + hw/arm/allwinner-a10.c | 8 + hw/ssi/Kconfig | 4

Re: [PATCH] {hw/ssi,docs/system/arm}: Allwinner A10 SPI emulation

2024-09-30 Thread Strahinja Jankovic
Hi Peter, Thank you very much for the review and detailed comments. I will try to address all comments in the v2 of the patches, but I have some questions I added below. On Mon, Sep 30, 2024 at 4:45 PM Peter Maydell wrote: > On Thu, 19 Sept 2024 at 22:55, Strahinja Jankovic >

Re: [PATCH] {hw/ssi,docs/system/arm}: Allwinner A10 SPI emulation

2024-10-01 Thread Strahinja Jankovic
On Tue, Oct 1, 2024 at 11:24 AM Peter Maydell wrote: > On Mon, 30 Sept 2024 at 22:28, Strahinja Jankovic > wrote: > > > > Hi Peter, > > > > Thank you very much for the review and detailed comments. > > > > I will try to address all comments in the v2 o