[PATCH v1 4/8] aspeed/smc: Add AST2700 support

2024-02-28 Thread Jamin Lin via
AST2700 fmc/spi controller's address decoding unit is 64KB and only bits [31:16] are used for decoding. Introduce seg_to_reg and reg_to_seg handlers for ast2700 fmc/spi controller. In addition, adds ast2700 fmc, spi0, spi1, and spi2 class init handler. AST2700 support the maximum dram size is 8GiB

[PATCH v1 5/8] aspeed/scu: Add AST2700 support

2024-02-28 Thread Jamin Lin via
AST2700 have two SCU controllers which are SCU and SCUIO. Both SCU and SCUIO registers are not compatible previous SOCs , introduces new registers and adds ast2700 scu, sucio class init handler. The pclk divider selection of SCUIO is defined in SCUIO280[20:18] and the pclk divider selection of SCU

[PATCH v1 2/8] aspeed/sli: Add AST2700 support

2024-02-28 Thread Jamin Lin via
AST2700 SLI engine is designed to accelerate the throughput between cross-die connections. It have CPU_SLI at CPU die and IO_SLI at IO die. Introduce new ast2700_sli and ast2700_sliio class with instance_init and realize handlers. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/misc/as

[PATCH v1 6/8] aspeed/intc: Add AST2700 support

2024-02-28 Thread Jamin Lin via
AST2700 interrupt controller(INTC) provides hardware interrupt interfaces to interrupt of processors PSP, SSP and TSP. In INTC, each interrupt of INT 128 to INT136 combines 32 interrupts. Introduce a new aspeed_intc class with instance_init and realize handlers. QEMU supports ARM Generic Interrup

[PATCH v1 3/8] aspeed/sdmc: Add AST2700 support

2024-02-28 Thread Jamin Lin via
The SDRAM memory controller(DRAMC) controls the access to external DDR4 and DDR5 SDRAM and power up to DDR4 and DDR5 PHY. The DRAM memory controller of AST2700 is not backward compatible to previous chips such AST2600, AST2500 and AST2400. Max memory is now 8GiB on the AST2700. Introduce new aspe

[PATCH v1 0/8] Add AST2700 support

2024-02-28 Thread Jamin Lin via
Changes from v1: The patch series supports WDT, SDMC, SMC, SCU, SLI and INTC for AST2700 SoC. Test steps: 1. Download openbmc image for AST2700 from https://github.com/AspeedTech-BMC/openbmc/releases/tag/v09.00 https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.00/ ast2700-de

[PATCH v1 7/8] aspeed/soc: Add AST2700 support

2024-02-28 Thread Jamin Lin via
Initial definitions for a simple machine using an AST2700 SOC (Cortex-a35 CPU). AST2700 SOC and its interrupt controller are too complex to handle in the common Aspeed SoC framework. We introduce a new ast2700 class with instance_init and realize handlers. AST2700 is a 64 bits quad core cpus and

[PATCH v1 2/8] aspeed/sli: Add AST2700 support

2024-02-28 Thread Jamin Lin via
AST2700 SLI engine is designed to accelerate the throughput between cross-die connections. It have CPU_SLI at CPU die and IO_SLI at IO die. Introduce new ast2700_sli and ast2700_sliio class with instance_init and realize handlers. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/misc/as

[PATCH v1 6/8] aspeed/intc: Add AST2700 support

2024-02-28 Thread Jamin Lin via
AST2700 interrupt controller(INTC) provides hardware interrupt interfaces to interrupt of processors PSP, SSP and TSP. In INTC, each interrupt of INT 128 to INT136 combines 32 interrupts. Introduce a new aspeed_intc class with instance_init and realize handlers. QEMU supports ARM Generic Interrup

[PATCH v1 5/8] aspeed/scu: Add AST2700 support

2024-02-28 Thread Jamin Lin via
AST2700 have two SCU controllers which are SCU and SCUIO. Both SCU and SCUIO registers are not compatible previous SOCs , introduces new registers and adds ast2700 scu, sucio class init handler. The pclk divider selection of SCUIO is defined in SCUIO280[20:18] and the pclk divider selection of SCU

[PATCH v1 2/8] aspeed/sli: Add AST2700 support

2024-02-28 Thread Jamin Lin via
AST2700 SLI engine is designed to accelerate the throughput between cross-die connections. It have CPU_SLI at CPU die and IO_SLI at IO die. Introduce new ast2700_sli and ast2700_sliio class with instance_init and realize handlers. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/misc/as

[PATCH v1 1/8] aspeed/wdt: Add AST2700 support

2024-02-28 Thread Jamin Lin via
AST2700 wdt controller is similiar to AST2600's wdt, but the AST2700 has 8 watchdogs, and they each have a 0x80 of registers. Introduce ast2700 object class and increse the number of regs(offset) of ast2700 model. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/watchdog/wdt_aspeed.c

[PATCH v1 6/8] aspeed/intc: Add AST2700 support

2024-02-29 Thread Jamin Lin via
AST2700 interrupt controller(INTC) provides hardware interrupt interfaces to interrupt of processors PSP, SSP and TSP. In INTC, each interrupt of INT 128 to INT136 combines 32 interrupts. Introduce a new aspeed_intc class with instance_init and realize handlers. QEMU supports ARM Generic Interrup

[PATCH v1 2/8] aspeed/sli: Add AST2700 support

2024-02-29 Thread Jamin Lin via
AST2700 SLI engine is designed to accelerate the throughput between cross-die connections. It have CPU_SLI at CPU die and IO_SLI at IO die. Introduce new ast2700_sli and ast2700_sliio class with instance_init and realize handlers. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/misc/as

[PATCH v1 0/8] Add AST2700 support

2024-02-29 Thread Jamin Lin via
Changes from v1: The patch series supports WDT, SDMC, SMC, SCU, SLI and INTC for AST2700 SoC. Test steps: 1. Download openbmc image for AST2700 from https://github.com/AspeedTech-BMC/openbmc/releases/tag/v09.00 https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.00/ ast2700-de

[PATCH v1 5/8] aspeed/scu: Add AST2700 support

2024-02-29 Thread Jamin Lin via
AST2700 have two SCU controllers which are SCU and SCUIO. Both SCU and SCUIO registers are not compatible previous SOCs , introduces new registers and adds ast2700 scu, sucio class init handler. The pclk divider selection of SCUIO is defined in SCUIO280[20:18] and the pclk divider selection of SCU

[PATCH v1 8/8] aspeed: Add an AST2700 eval board

2024-02-29 Thread Jamin Lin via
AST2700 CPU is ARM Cortex-A35 which is 64 bits. Add TARGET_AARCH64 to build this machine. According to the design of ast2700, it has a bootmcu(riscv-32) which is used for executing SPL. Then, CPUs(cortex-a35) execute u-boot, kernel and rofs. Currently, qemu not support emulate two CPU architectur

[PATCH v1 3/9] aspeed/sdmc: Add AST2700 support

2024-03-04 Thread Jamin Lin via
The SDRAM memory controller(DRAMC) controls the access to external DDR4 and DDR5 SDRAM and power up to DDR4 and DDR5 PHY. The DRAM memory controller of AST2700 is not backward compatible to previous chips such AST2600, AST2500 and AST2400. Max memory is now 8GiB on the AST2700. Introduce new aspe

[PATCH v1 1/9] aspeed/wdt: Add AST2700 support

2024-03-04 Thread Jamin Lin via
AST2700 wdt controller is similiar to AST2600's wdt, but the AST2700 has 8 watchdogs, and they each have a 0x80 of registers. Introduce ast2700 object class and increse the number of regs(offset) of ast2700 model. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/watchdog/wdt_aspeed.c

[PATCH v1 2/9] aspeed/sli: Add AST2700 support

2024-03-04 Thread Jamin Lin via
AST2700 SLI engine is designed to accelerate the throughput between cross-die connections. It have CPU_SLI at CPU die and IO_SLI at IO die. Introduce new ast2700_sli and ast2700_sliio class with instance_init and realize handlers. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/misc/as

[PATCH v1 0/9] Add AST2700 support

2024-03-04 Thread Jamin Lin via
Changes from v1: The patch series supports WDT, SDMC, SMC, SCU, SLI and INTC for AST2700 SoC. Test steps: 1. Download openbmc image for AST2700 from https://github.com/AspeedTech-BMC/openbmc/releases/tag/v09.00 https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.00/ ast2700-de

[PATCH v1 9/9] aspeed/soc: fix incorrect dram size for AST2700

2024-03-04 Thread Jamin Lin via
AST2700 dram size calculation is not back compatible AST2600. According to the DDR capacity hardware behavior, if users write the data to address which is beyond the ram size, it would write the data to address 0. For example: a. sdram base address "0x4 " b. sdram size is 1 GiB The availabl

[PATCH v1 6/9] aspeed/intc: Add AST2700 support

2024-03-04 Thread Jamin Lin via
AST2700 interrupt controller(INTC) provides hardware interrupt interfaces to interrupt of processors PSP, SSP and TSP. In INTC, each interrupt of INT 128 to INT136 combines 32 interrupts. Introduce a new aspeed_intc class with instance_init and realize handlers. QEMU supports ARM Generic Interrup

[PATCH v2 3/9] aspeed/sdmc: Add AST2700 support

2024-03-04 Thread Jamin Lin via
The SDRAM memory controller(DRAMC) controls the access to external DDR4 and DDR5 SDRAM and power up to DDR4 and DDR5 PHY. The DRAM memory controller of AST2700 is not backward compatible to previous chips such AST2600, AST2500 and AST2400. Max memory is now 8GiB on the AST2700. Introduce new aspe

[PATCH v2 5/9] aspeed/scu: Add AST2700 support

2024-03-04 Thread Jamin Lin via
AST2700 have two SCU controllers which are SCU and SCUIO. Both SCU and SCUIO registers are not compatible previous SOCs , introduces new registers and adds ast2700 scu, sucio class init handler. The pclk divider selection of SCUIO is defined in SCUIO280[20:18] and the pclk divider selection of SCU

[PATCH v2 0/9] Add AST2700 support

2024-03-04 Thread Jamin Lin via
Changes from v1: The patch series supports WDT, SDMC, SMC, SCU, SLI and INTC for AST2700 SoC. Changes from v2: - replace is_aarch64 with is_bus64bit for sdmc patch review. - fix incorrect dram size for AST2700 Test steps: 1. Download openbmc image for AST2700 from https://github.com/AspeedTech

[PATCH v2 4/9] aspeed/smc: Add AST2700 support

2024-03-04 Thread Jamin Lin via
AST2700 fmc/spi controller's address decoding unit is 64KB and only bits [31:16] are used for decoding. Introduce seg_to_reg and reg_to_seg handlers for ast2700 fmc/spi controller. In addition, adds ast2700 fmc, spi0, spi1, and spi2 class init handler. AST2700 support the maximum dram size is 8GiB

[PATCH v2 6/9] aspeed/intc: Add AST2700 support

2024-03-04 Thread Jamin Lin via
AST2700 interrupt controller(INTC) provides hardware interrupt interfaces to interrupt of processors PSP, SSP and TSP. In INTC, each interrupt of INT 128 to INT136 combines 32 interrupts. Introduce a new aspeed_intc class with instance_init and realize handlers. QEMU supports ARM Generic Interrup

[PATCH v3 1/2] aspeed: introduce a new UART0 device name

2024-02-14 Thread Jamin Lin via
The Aspeed datasheet refers to the UART controllers as UART1 - UART13 for the ast10x0, ast2600, ast2500 and ast2400 SoCs and the Aspeed ast2700 introduces an UART0 and the UART controllers as UART0 - UART12. To keep the naming in the QEMU models in sync with the datasheet, let's introduce a new U

[PATCH v3 0/2] UART0 device name and fix hardcode boot address 0

2024-02-14 Thread Jamin Lin via
v1: 1. support uart controller both 0 and 1 base 2. fix hardcode boot address 0 v2: 1. introduce a new UART0 device name 2. remove ASPEED_SOC_SPI_BOOT_ADDR marco v3: 1. add uart helper functions to get the index, start and last. 2. add more description in commit log Jamin Lin (2): aspeed: intr

[PATCH v3 0/2] UART0 device name and fix hardcode boot address 0

2024-02-14 Thread Jamin Lin via
v1: 1. support uart controller both 0 and 1 base 2. fix hardcode boot address 0 v2: 1. introduce a new UART0 device name 2. remove ASPEED_SOC_SPI_BOOT_ADDR marco v3: 1. add uart helper functions to get the index, start and last. 2. add more description in commit log Jamin Lin (2): aspeed: intr

[PATCH v3 2/2] aspeed: fix hardcode boot address 0

2024-02-14 Thread Jamin Lin via
In the previous design of ASPEED SOCs QEMU model, it set the boot address at "0" which was the hardcode setting for ast10x0, ast2600, ast2500 and ast2400. According to the design of ast2700, it has a bootmcu(riscv-32) which is used for executing SPL and initialize DRAM and copy u-boot image from S

[PATCH v3 2/2] aspeed: fix hardcode boot address 0

2024-02-14 Thread Jamin Lin via
In the previous design of ASPEED SOCs QEMU model, it set the boot address at "0" which was the hardcode setting for ast10x0, ast2600, ast2500 and ast2400. According to the design of ast2700, it has a bootmcu(riscv-32) which is used for executing SPL and initialize DRAM and copy u-boot image from S

[PATCH v3 1/2] aspeed: introduce a new UART0 device name

2024-02-14 Thread Jamin Lin via
The Aspeed datasheet refers to the UART controllers as UART1 - UART13 for the ast10x0, ast2600, ast2500 and ast2400 SoCs and the Aspeed ast2700 introduces an UART0 and the UART controllers as UART0 - UART12. To keep the naming in the QEMU models in sync with the datasheet, let's introduce a new U

[PATCH v3 2/2] aspeed: fix hardcode boot address 0

2024-02-14 Thread Jamin Lin via
In the previous design of ASPEED SOCs QEMU model, it set the boot address at "0" which was the hardcode setting for ast10x0, ast2600, ast2500 and ast2400. According to the design of ast2700, it has a bootmcu(riscv-32) which is used for executing SPL and initialize DRAM and copy u-boot image from S

[PATCH v3 0/2] UART0 device name and fix hardcode boot address 0

2024-02-14 Thread Jamin Lin via
v1: 1. support uart controller both 0 and 1 base 2. fix hardcode boot address 0 v2: 1. introduce a new UART0 device name 2. remove ASPEED_SOC_SPI_BOOT_ADDR marco v3: 1. add uart helper functions to get the index, start and last. 2. add more description in commit log Jamin Lin (2): aspeed: intr

[PATCH v3 0/2] UART0 device name and fix hardcode boot address 0

2024-02-15 Thread Jamin Lin via
v1: 1. support uart controller both 0 and 1 base 2. fix hardcode boot address 0 v2: 1. introduce a new UART0 device name 2. remove ASPEED_SOC_SPI_BOOT_ADDR marco v3: 1. add uart helper functions to get the index, start and last. 2. add more description in commit log Jamin Lin (2): aspeed: intr

[PATCH v3 2/2] aspeed: fix hardcode boot address 0

2024-02-15 Thread Jamin Lin via
In the previous design of ASPEED SOCs QEMU model, it set the boot address at "0" which was the hardcode setting for ast10x0, ast2600, ast2500 and ast2400. According to the design of ast2700, it has a bootmcu(riscv-32) which is used for executing SPL and initialize DRAM and copy u-boot image from S

[v0 0/2] uart base and hardcode boot address 0

2024-02-05 Thread Jamin Lin via
v0: 1. support uart controller both 0 and 1 base 2. fix hardcode boot address 0 Jamin Lin (2): aspeed: support uart controller both 0 and 1 base aspeed: fix hardcode boot address 0 hw/arm/aspeed.c | 12 hw/arm/aspeed_ast10x0.c | 1 + hw/arm/aspeed_ast2400.c

[PATCH v0 2/2] aspeed: fix hardcode boot address 0

2024-02-05 Thread Jamin Lin via
In the previous design of QEMU model for ASPEED SOCs, it set the boot address at 0 which was the hardcode setting for ast10x0, ast2600, ast2500 and ast2400. According to the design of ast2700, it has bootmcu which is used for executing SPL and initialize DRAM, then, CPUs(cortex-a35) execute u-boot

[PATCH v0 1/2] aspeed: support uart controller both 0 and 1 base

2024-02-05 Thread Jamin Lin via
According to the design of ASPEED SOCS, the uart controller is 1 base for ast10x0, ast2600, ast2500 and ast2400. However, the uart controller is 0 base for ast2700. To support uart controller both 0 and 1 base, adds uasrt_bases parameter in AspeedSoCClass and set the default uart controller 1 base

[PATCH v2 2/2] aspeed: fix hardcode boot address 0

2024-02-07 Thread Jamin Lin via
In the previous design of ASPEED SOCs QEMU model, it set the boot address at "0" which was the hardcode setting for ast10x0, ast2600, ast2500 and ast2400. According to the design of ast2700, it has bootmcu which is used for executing SPL and initialize DRAM, then, CPUs(cortex-a35) execute u-boot,

[PATCH v2 1/2] aspeed: introduce a new UART0 device name

2024-02-07 Thread Jamin Lin via
The Aspeed datasheet refers to the UART controllers as UART1 - UART13 for the ast10x0, ast2600, ast2500 and ast2400 SoCs and the Aspeed ast2700 introduces an UART0 and the UART controllers as UART0 - UART12. To keep the naming in the QEMU models in sync with the datasheet, let's introduce a new U

[PATCH v2 2/2] aspeed: fix hardcode boot address 0

2024-02-07 Thread Jamin Lin via
In the previous design of ASPEED SOCs QEMU model, it set the boot address at "0" which was the hardcode setting for ast10x0, ast2600, ast2500 and ast2400. According to the design of ast2700, it has bootmcu which is used for executing SPL and initialize DRAM, then, CPUs(cortex-a35) execute u-boot,

[PATCH v3 00/16] Add AST2700 support

2024-04-16 Thread Jamin Lin via
Changes from v1: The patch series supports WDT, SDMC, SMC, SCU, SLI and INTC for AST2700 SoC. Changes from v2: - replace is_aarch64 with is_bus64bit for sdmc patch review. - fix incorrect dram size for AST2700 Changes from v3: - Add AST2700 Evaluation board in ASPEED document - Add avocado test c

[PATCH v3 04/16] aspeed/sdmc: fix coding style

2024-04-16 Thread Jamin Lin via
Fix coding style issues from checkpatch.pl Test command: scripts/checkpatch.pl --no-tree -f hw/misc/aspeed_sdmc.c Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/misc/aspeed_sdmc.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/misc/aspeed_sdmc.c b/h

[PATCH v3 06/16] aspeed/smc: correct device description

2024-04-16 Thread Jamin Lin via
Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/ssi/aspeed_smc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 6e1a84c197..8a8d77b480 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -1448,7 +1448,7

[PATCH v3 08/16] aspeed/smc: support 64 bits dma dram address

2024-04-16 Thread Jamin Lin via
AST2700 support the maximum dram size is 8GiB and has a "DMA DRAM Side Address High Part(0x7C)" register to support 64 bits dma dram address. Add helper routines functions to compute the dma dram address, new features and update trace-event to support 64 bits dram address. Signed-off-by: Troy Lee

[PATCH v3 10/16] aspeed/scu: Add AST2700 support

2024-04-16 Thread Jamin Lin via
AST2700 have two SCU controllers which are SCU and SCUIO. Both SCU and SCUIO registers are not compatible previous SOCs , introduces new registers and adds ast2700 scu, sucio class init handler. The pclk divider selection of SCUIO is defined in SCUIO280[20:18] and the pclk divider selection of SCU

[PATCH v3 05/16] aspeed/sdmc: Add AST2700 support

2024-04-16 Thread Jamin Lin via
The SDRAM memory controller(DRAMC) controls the access to external DDR4 and DDR5 SDRAM and power up to DDR4 and DDR5 PHY. The DRAM memory controller of AST2700 is not backward compatible to previous chips such AST2600, AST2500 and AST2400. Max memory is now 8GiB on the AST2700. Introduce new aspe

[PATCH v3 12/16] aspeed/soc: Add AST2700 support

2024-04-16 Thread Jamin Lin via
Initial definitions for a simple machine using an AST2700 SOC (Cortex-a35 CPU). AST2700 SOC and its interrupt controller are too complex to handle in the common Aspeed SoC framework. We introduce a new ast2700 class with instance_init and realize handlers. AST2700 is a 64 bits quad core cpus and

[PATCH v3 02/16] aspeed/sli: Add AST2700 support

2024-04-16 Thread Jamin Lin via
AST2700 SLI engine is designed to accelerate the throughput between cross-die connections. It have CPU_SLI at CPU die and IO_SLI at IO die. Introduce dummy AST2700 SLI and SLIIO models. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/misc/aspeed_sli.c | 178

[PATCH v3 09/16] aspeed/smc: Add AST2700 support

2024-04-16 Thread Jamin Lin via
AST2700 fmc/spi controller's address decoding unit is 64KB and only bits [31:16] are used for decoding. Introduce seg_to_reg and reg_to_seg handlers for ast2700 fmc/spi controller. In addition, adds ast2700 fmc, spi0, spi1, and spi2 class init handler. Signed-off-by: Troy Lee Signed-off-by: Jamin

[PATCH v3 07/16] aspeed/smc: fix dma moving incorrect data length issue

2024-04-16 Thread Jamin Lin via
DMA length is from 1 byte to 32MB for AST2600 and AST10x0 and DMA length is from 4 bytes to 32MB for AST2500. In other words, if "R_DMA_LEN" is 0, it should move at least 1 byte data for AST2600 and AST10x0 and 4 bytes data for AST2500. To support all ASPEED SOCs, adds dma_start_length parameter t

[PATCH v3 14/16] aspeed/soc: fix incorrect dram size for AST2700

2024-04-16 Thread Jamin Lin via
AST2700 dram size calculation is not back compatible AST2600. According to the DDR capacity hardware behavior, if users write the data to address which is beyond the ram size, it would write the data to address 0. For example: a. sdram base address "0x4 " b. sdram size is 1 GiB The availabl

[PATCH v3 01/16] aspeed/wdt: Add AST2700 support

2024-04-16 Thread Jamin Lin via
AST2700 wdt controller is similiar to AST2600's wdt, but the AST2700 has 8 watchdogs, and they each have 0x80 of registers. Introduce ast2700 object class and increase the number of regs(offset) of ast2700 model. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater ---

[PATCH v3 15/16] test/avocado/machine_aspeed.py: Add AST2700 test case

2024-04-16 Thread Jamin Lin via
Add a test case to test Aspeed OpenBMC SDK v09.01 on AST2700 board. It loads u-boot-nodtb.bin, u-boot.dtb, tfa and optee-os images to dram first which base address is 0x4. Then, boot and launch 4 cpu cores. ``` qemu-system-aarch64 -machine ast2700-evb -device loader,force-raw=on,addr=

[PATCH v3 03/16] aspeed/sdmc: remove redundant macros

2024-04-16 Thread Jamin Lin via
These macros are no longer used for ASPEED SOCs, so removes them. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- hw/misc/aspeed_sdmc.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c index 64cd1a81dc..74279bbe8e 100644 ---

[PATCH v3 13/16] aspeed: Add an AST2700 eval board

2024-04-16 Thread Jamin Lin via
AST2700 CPU is ARM Cortex-A35 which is 64 bits. Add TARGET_AARCH64 to build this machine. According to the design of ast2700, it has a bootmcu(riscv-32) which is used for executing SPL. Then, CPUs(cortex-a35) execute u-boot, kernel and rofs. Currently, qemu not support emulate two CPU architectur

[PATCH v3 11/16] aspeed/intc: Add AST2700 support

2024-04-16 Thread Jamin Lin via
AST2700 interrupt controller(INTC) provides hardware interrupt interfaces to interrupt of processors PSP, SSP and TSP. In INTC, each interrupt of INT 128 to INT136 combines 32 interrupts. Introduce a new aspeed_intc class with instance_init and realize handlers. So far, this model only supports G

[PATCH v3 16/16] docs:aspeed: Add AST2700 Evaluation board

2024-04-16 Thread Jamin Lin via
Add AST2700 Evaluation board and its boot command. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin --- docs/system/arm/aspeed.rst | 39 ++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst

[PATCH v2 1/2] aspeed/soc: Fix possible divide by zero

2024-06-24 Thread Jamin Lin via
Coverity reports a possible DIVIDE_BY_ZERO issue regarding the "ram_size" object property. This can not happen because RAM has predefined valid sizes per SoC. Nevertheless, add a test to close the issue. Fixes: Coverity CID 1547113 Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater [ clg: Re

[PATCH v2 0/2] Fix coverity issues for AST2700

2024-06-24 Thread Jamin Lin via
change from v1: aspeed/soc: coverity defect: DIVIDE_BY_ZERO aspeed/sdmc: coverity defect: Control flow issues (DEADCODE) change from v2: add more commit log from reviewer, Cédric. Jamin Lin (2): aspeed/soc: Fix possible divide by zero aspeed/sdmc: Remove extra R_MAIN_STATUS case hw/arm/aspe

[PATCH v2 2/2] aspeed/sdmc: Remove extra R_MAIN_STATUS case

2024-06-24 Thread Jamin Lin via
Coverity reports that the newly added 'case R_MAIN_STATUS' is DEADCODE because it can not be reached. This is because R_MAIN_STATUS is handled before in the "Unprotected registers" switch statement. Remove it. Fixes: Coverity CID 1547112 Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater [ c

[PATCH v3 0/2] Fix coverity issues for AST2700

2024-06-25 Thread Jamin Lin via
change from v1: aspeed/soc: coverity defect: DIVIDE_BY_ZERO aspeed/sdmc: coverity defect: Control flow issues (DEADCODE) change from v2: add more commit log from reviewer suggestion, Cédric. change from v3: replace qemu_log_mask with assert dram size 0. Jamin Lin (2): aspeed/soc: Fix possible

[PATCH v3 1/2] aspeed/soc: Fix possible divide by zero

2024-06-25 Thread Jamin Lin via
Coverity reports a possible DIVIDE_BY_ZERO issue regarding the "ram_size" object property. This can not happen because RAM has predefined valid sizes per SoC. Nevertheless, add a test to close the issue. Fixes: Coverity CID 1547113 Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater [ clg: Re

[PATCH v3 2/2] aspeed/sdmc: Remove extra R_MAIN_STATUS case

2024-06-25 Thread Jamin Lin via
Coverity reports that the newly added 'case R_MAIN_STATUS' is DEADCODE because it can not be reached. This is because R_MAIN_STATUS is handled before in the "Unprotected registers" switch statement. Remove it. Fixes: Coverity CID 1547112 Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater [ c

[PATCH v2 2/5] hw/net:ftgmac100: support 64 bits dma dram address for AST2700

2024-07-03 Thread Jamin Lin via
ASPEED AST2700 SOC is a 64 bits quad core CPUs (Cortex-a35) And the base address of dram is "0x4 " which is 64bits address. It have "Normal Priority Transmit Ring Base Address Register High(0x17C)", "High Priority Transmit Ring Base Address Register High(0x184)" and "Receive Ring Base Addr

[PATCH v2 3/5] aspeed/soc: update to ftgmac100_high model for AST2700

2024-07-03 Thread Jamin Lin via
ASPEED AST2700 SOC is a 64 bits quad core CPUs (Cortex-a35) And the base address of dram is "0x4 " which is 64bits address. Update its network model to ftgmac100_high to support 64bits dram address DMA. Signed-off-by: Jamin Lin --- hw/arm/aspeed_ast27x0.c | 3 ++- 1 file changed, 2 inse

[PATCH v2 0/5] support AST2700 network

2024-07-03 Thread Jamin Lin via
change from v1: - ftgmac100 - fix coding style - support 64 bits dma dram address for AST2700 change from v2: - ftgmac100: update memory region size to 0x200. - ftgmac100: introduce a new class(ftgmac100_high), class attribute and memop handlers, for FTGMAC100_*_HIGH regs read/write. - aspee

[PATCH v2 5/5] test/avocado/machine_aspeed.py: update to test network for AST2700

2024-07-03 Thread Jamin Lin via
Update a test case to test network connection via ssh and changes to test Aspeed OpenBMC SDK v09.02 for AST2700. ASPEED fixed TX mask issue from linux/drivers/ftgmac100.c. It is required to use ASPEED SDK image since v09.02 for AST2700 QEMU network testing. A test image is downloaded from the ASP

[PATCH v2 1/5] hw/net:ftgmac100: update memory region size to 0x200

2024-07-03 Thread Jamin Lin via
According to the datasheet of ASPEED SOCs, one MAC controller owns 128KB of register space for AST2500. However, one MAC controller only owns 64KB of register space for AST2600 and AST2700. It set the memory region size 128KB and it occupied another controllers Address Spaces. Currently, the ftg

[PATCH v2 4/5] hw/block: m25p80: support quad mode for w25q01jvq

2024-07-03 Thread Jamin Lin via
According to the w25q01jv datasheet at page 16, it is required to set QE bit in "Status Register 2". Besides, users are able to utilize "Write Status Register 1(0x01)" command to set QE bit in "Status Register 2" and utilize "Read Status Register 2(0x35)" command to get the QE bit status. To suppo

[PATCH v3 0/8] support AST2700 network

2024-07-04 Thread Jamin Lin via
change from v1: - ftgmac100 - fix coding style - support 64 bits dma dram address for AST2700 change from v2: - ftgmac100: update memory region size to 0x200. - ftgmac100: introduce a new class(ftgmac100_high), class attribute and memop handlers, for FTGMAC100_*_HIGH regs read/write. - aspee

[PATCH v3 6/8] hw/block: m25p80: support quad mode for w25q01jvq

2024-07-04 Thread Jamin Lin via
According to the w25q01jv datasheet at page 16, it is required to set QE bit in "Status Register 2". Besides, users are able to utilize "Write Status Register 1(0x01)" command to set QE bit in "Status Register 2" and utilize "Read Status Register 2(0x35)" command to get the QE bit status. To suppo

[PATCH v3 3/8] hw/net:ftgmac100: introduce TX and RX ring base address high registers to support 64 bits

2024-07-04 Thread Jamin Lin via
ASPEED AST2700 SOC is a 64 bits quad core CPUs (Cortex-a35) And the base address of dram is "0x4 " which is 64bits address. It have "Normal Priority Transmit Ring Base Address Register High(0x17C)", "High Priority Transmit Ring Base Address Register High(0x184)" and "Receive Ring Base Addr

[PATCH v3 1/8] hw/net:ftgmac100: update memory region size to 64KB

2024-07-04 Thread Jamin Lin via
According to the datasheet of ASPEED SOCs, one MAC controller owns 128KB of register space for AST2500. However, one MAC controller only owns 64KB of register space for AST2600 and AST2700. It set the memory region size 128KB and it occupied another controllers Address Spaces. Update one MAC contr

[PATCH v3 2/8] hw/net:ftgmac100: update ring base address to 64 bits

2024-07-04 Thread Jamin Lin via
Update TX and RX ring base address data type to uint64_t for 64 bits dram address DMA support. Both "Normal Priority Transmit Ring Base Address Register(0x20)" and "Receive Ring Base Address Register (0x24)" are used for saving the low part physical address of descriptor manager. Therefore, chang

[PATCH v3 7/8] machine_aspeed.py: update to test ASPEED OpenBMC SDK v09.02 for AST2700

2024-07-04 Thread Jamin Lin via
Update test case to test ASPEED OpenBMC SDK v09.02 for AST2700. ASPEED fixed TX mask issue from linux/drivers/ftgmac100.c. It is required to use ASPEED OpenBMC SDK since v09.02 for AST2700 QEMU network testing. A test image is downloaded from the ASPEED Forked OpenBMC GitHub release repository :

[PATCH v3 8/8] machine_aspeed.py: update to test network for AST2700

2024-07-04 Thread Jamin Lin via
Update test case to test network connection via SSH. Test command: ``` cd build pyvenv/bin/avocado run ../qemu/tests/avocado/machine_aspeed.py:AST2x00MachineSDK.test_aarch64_ast2700_evb_sdk_v09_02 ``` Signed-off-by: Jamin Lin --- tests/avocado/machine_aspeed.py | 6 -- 1 file changed, 4 in

[PATCH v3 4/8] hw/net:ftgmac100: update TX and RX packet buffers address to 64 bits

2024-07-04 Thread Jamin Lin via
ASPEED AST2700 SOC is a 64 bits quad core CPUs (Cortex-a35) And the base address of dram is "0x4 " which is 64bits address. It have "TXDES 2" and "RXDES 2" to save the high part physical address of packet buffer. Ex: TX packet buffer address [34:0] The "TXDES 2" bits [18:16] which correspo

[PATCH v3 5/8] aspeed/soc: set dma64 property for AST2700 ftgmac100

2024-07-04 Thread Jamin Lin via
ASPEED AST2700 SOC is a 64 bits quad core CPUs (Cortex-a35) And the base address of dram is "0x4 " which is 64bits address. Set dma64 property for ftgmac100 model to support 64bits dram address DMA. Signed-off-by: Jamin Lin --- hw/arm/aspeed_ast27x0.c | 3 +++ 1 file changed, 3 insertio

[PATCH v2 03/11] hw/i2c/aspeed: support discontinuous poll buffer memory region of I2C bus

2024-08-07 Thread Jamin Lin via
It only support continuous pool buffer memory region for all I2C bus. However, the pool buffer address of all I2c bus are discontinuous for AST2700. Ex: the pool buffer address of I2C bus for ast2700 as following. 0x1A0 - 0x1BF: Device 0 buffer 0x2A0 - 0x2BF: Device 1 buffer 0x3A0 - 0x3BF: Device

[PATCH v2 05/11] hw/i2c/aspeed: Add AST2700 support

2024-08-07 Thread Jamin Lin via
Introduce a new ast2700 class to support AST2700. The I2C bus register memory regions and I2C bus pool buffer memory regions are discontinuous and they do not back compatible AST2600. Add a new ast2700 i2c class init function to match the address of I2C bus register and pool buffer from the datash

[PATCH v2 02/11] hw/i2c/aspeed: introduce a new bus pool buffer attribute in AspeedI2Cbus

2024-08-07 Thread Jamin Lin via
According to the datasheet of ASPEED SOCs, each I2C bus has their own pool buffer since AST2500. Only AST2400 utilized a pool buffer share to all I2C bus. Besides, using a share pool buffer only support pool buffer memory regions are continuous for all I2C bus. To make this model more readable and

[PATCH v2 01/11] hw/i2c/aspeed: support discontinuous register memory region of I2C bus

2024-08-07 Thread Jamin Lin via
It only support continuous register memory region for all I2C bus. However, the register address of all I2c bus are discontinuous for AST2700. Ex: the register address of I2C bus for ast2700 as following. 0x100 - 0x17F: Device 0 0x200 - 0x27F: Device 1 0x300 - 0x37F: Device 2 0x400 - 0x47F: Device

[PATCH v2 07/11] hw/i2c/aspeed: support high part dram offset for DMA 64 bits

2024-08-07 Thread Jamin Lin via
ASPEED AST2700 SOC is a 64 bits quad core CPUs (Cortex-a35) And the base address of dram is "0x4 " which is 64bits address. The AST2700 support the maximum DRAM size is 8 GB. The DRAM physical address range is from "0x4__" to "0x5__". The DRAM offset range is from "0x0_000

[PATCH v2 06/11] hw/i2c/aspeed: support Tx/Rx buffer 64 bits address

2024-08-07 Thread Jamin Lin via
ASPEED AST2700 SOC is a 64 bits quad core CPUs (Cortex-a35) And the base address of dram is "0x4 " which is 64bits address. It have "Master DMA Mode Tx Buffer Base Address[39:32](0x60)" and "Master DMA Mode Rx Buffer Base Address[39:32](0x64)" to save the high part physical address of Tx/R

[PATCH v2 04/11] hw/i2c/aspeed: introduce a new dma_dram_offset attribute in AspeedI2Cbus

2024-08-07 Thread Jamin Lin via
The "Current DMA Operating Address Status(0x50)" register of I2C new mode has been removed in AST2700. This register is used for debugging and it is a read only register. To support AST2700 DMA mode, introduce a new dma_dram_offset class attribute in AspeedI2Cbus to save the current DMA operating

[PATCH v2 11/11] machine_aspeed.py: update to test I2C for AST2700

2024-08-07 Thread Jamin Lin via
Update test case to test lm75 temperature sensor. Signed-off-by: Jamin Lin --- tests/avocado/machine_aspeed.py | 16 1 file changed, 16 insertions(+) diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index f8e263d37e..6935f5f57c 100644 --- a/tests/a

[PATCH v2 08/11] aspeed/soc: introduce a new API to get the INTC orgate information

2024-08-07 Thread Jamin Lin via
Currently, users can set the intc mapping table with enumerated device id and device irq to get the INTC orgate input pins. However, some devices use the continuous bits number in the same orgate. To reduce the enumerated device id definition, create a new API to get the INTC orgate index and sourc

[PATCH v2 09/11] aspeed/soc: support I2C for AST2700

2024-08-07 Thread Jamin Lin via
Add I2C model for AST2700 I2C support. The I2C controller registers base address is start at 0x14C0_F000 and its address space is 0x2000. The AST2700 I2C controller has one source INTC per bus. I2C buses interrupt are connected to GICINT130_INTC from bit 0 to bit 15. I2C bus 0 is connected to GICI

[PATCH v2 10/11] aspeed: add tmp105 in i2c bus 0 for AST2700

2024-08-07 Thread Jamin Lin via
ASPEED SDK add lm75 in i2c bus 0 for AST2700. LM75 is compatible with TMP105 driver. Introduce a new i2c init function and add tmp105 device model in i2c bus 0. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- hw/arm/aspeed.c | 10 ++ 1 file changed, 10 insertions(+) diff --

[PATCH v2 00/11] support I2C for AST2700

2024-08-07 Thread Jamin Lin via
v1: - support I2C for AST2700 v2: - fix review issues and add reviewer suggestion - update avocado test case for AST2700 I2C - support i2c bus pool A. pool_gap_size and reg_gap_size need to be discussion. B. aspeed_soc_ast2700_get_irq, aspeed_soc_ast2700_get_intc_orgate and sc->get_irq function

[PATCH v4 02/16] aspeed/sli: Add AST2700 support

2024-05-27 Thread Jamin Lin via
AST2700 SLI engine is designed to accelerate the throughput between cross-die connections. It have CPU_SLI at CPU die and IO_SLI at IO die. Introduce dummy AST2700 SLI and SLIIO models. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- hw/misc/aspeed_sli.c

[PATCH v4 13/16] aspeed: Add an AST2700 eval board

2024-05-27 Thread Jamin Lin via
AST2700 CPU is ARM Cortex-A35 which is 64 bits. Add TARGET_AARCH64 to build this machine. According to the design of ast2700, it has a bootmcu(riscv-32) which is used for executing SPL. Then, CPUs(cortex-a35) execute u-boot, kernel and rofs. Currently, qemu not support emulate two CPU architectur

[PATCH v4 00/16] Add AST2700 support

2024-05-27 Thread Jamin Lin via
Changes from v1: The patch series supports WDT, SDMC, SMC, SCU, SLI and INTC for AST2700 SoC. Changes from v2: - replace is_aarch64 with is_bus64bit for sdmc patch review. - fix incorrect dram size for AST2700 Changes from v3: - Add AST2700 Evaluation board in ASPEED document - Add avocado test c

[PATCH v4 09/16] aspeed/smc: Add AST2700 support

2024-05-27 Thread Jamin Lin via
AST2700 fmc/spi controller's address decoding unit is 64KB and only bits [31:16] are used for decoding. Introduce seg_to_reg and reg_to_seg handlers for ast2700 fmc/spi controller. In addition, adds ast2700 fmc, spi0, spi1, and spi2 class init handler. Signed-off-by: Troy Lee Signed-off-by: Jamin

[PATCH v4 07/16] aspeed/smc: support dma start length and 1 byte length unit

2024-05-27 Thread Jamin Lin via
DMA length is from 1 byte to 32MB for AST2600 and AST10x0 and DMA length is from 4 bytes to 32MB for AST2500. In other words, if "R_DMA_LEN" is 0, it should move at least 1 byte data for AST2600 and AST10x0 and 4 bytes data for AST2500. To support all ASPEED SOCs, adds dma_start_length parameter t

[PATCH v4 12/16] aspeed/soc: Add AST2700 support

2024-05-27 Thread Jamin Lin via
Initial definitions for a simple machine using an AST2700 SOC (Cortex-a35 CPU). AST2700 SOC and its interrupt controller are too complex to handle in the common Aspeed SoC framework. We introduce a new ast2700 class with instance_init and realize handlers. AST2700 is a 64 bits quad core cpus and

  1   2   3   4   5   6   >