[Qemu-devel] [Qemu-devel RFC v2 0/4] Add support for Smartfusion2 SoC

Subbaraya Sundeep posted 4 patches 7 years ago
Only 3 patches received!
There is a newer version of this series
default-configs/arm-softmmu.mak |   1 +
hw/arm/Makefile.objs            |   2 +-
hw/arm/msf2_soc.c               | 141 +++++++++++++
hw/misc/Makefile.objs           |   1 +
hw/misc/msf2_sysreg.c           | 168 +++++++++++++++
hw/ssi/Makefile.objs            |   1 +
hw/ssi/msf2_spi.c               | 449 ++++++++++++++++++++++++++++++++++++++++
hw/timer/Makefile.objs          |   1 +
hw/timer/msf2_timer.c           | 273 ++++++++++++++++++++++++
9 files changed, 1036 insertions(+), 1 deletion(-)
create mode 100644 hw/arm/msf2_soc.c
create mode 100644 hw/misc/msf2_sysreg.c
create mode 100644 hw/ssi/msf2_spi.c
create mode 100644 hw/timer/msf2_timer.c
[Qemu-devel] [Qemu-devel RFC v2 0/4] Add support for Smartfusion2 SoC
Posted by Subbaraya Sundeep 7 years ago
Hi Qemu-devel,

I am trying to add Smartfusion2 SoC.
SoC is from Microsemi and System on Module(SOM)
board is from Emcraft systems. Smartfusion2 has hardened
Microcontroller(Cortex-M3)based Sub System and FPGA fabric.
At the moment only system timer, sysreg and SPI
controller are modelled.

Testing:
./arm-softmmu/qemu-system-arm -M smartfusion2-som -serial mon:stdio \
-kernel u-boot.bin -display none -drive file=spi.bin,if=mtd,format=raw

U-boot is from Emcraft with modified SPI driver not to use PDMA.
Linux is 4.5 linux with Smartfusion2 SoC dts and clocksource 
driver added by myself @
https://github.com/Subbaraya-Sundeep/linux.git

Baremetal elfs from Microsemi Softconsole IDE are also working.

Changes from v1:
    Added SPI controller.

Thanks,
Sundeep

Subbaraya Sundeep (4):
  msf2: Add Smartfusion2 System timer
  msf2: Microsemi Smartfusion2 System Register block.
  msf2: Add Smartfusion2 SPI controller
  msf2: Add Emcraft's Smartfusion2 SOM kit.

 default-configs/arm-softmmu.mak |   1 +
 hw/arm/Makefile.objs            |   2 +-
 hw/arm/msf2_soc.c               | 141 +++++++++++++
 hw/misc/Makefile.objs           |   1 +
 hw/misc/msf2_sysreg.c           | 168 +++++++++++++++
 hw/ssi/Makefile.objs            |   1 +
 hw/ssi/msf2_spi.c               | 449 ++++++++++++++++++++++++++++++++++++++++
 hw/timer/Makefile.objs          |   1 +
 hw/timer/msf2_timer.c           | 273 ++++++++++++++++++++++++
 9 files changed, 1036 insertions(+), 1 deletion(-)
 create mode 100644 hw/arm/msf2_soc.c
 create mode 100644 hw/misc/msf2_sysreg.c
 create mode 100644 hw/ssi/msf2_spi.c
 create mode 100644 hw/timer/msf2_timer.c

-- 
2.5.0


Re: [Qemu-devel] [Qemu-devel RFC v2 0/4] Add support for Smartfusion2 SoC
Posted by sundeep subbaraya 7 years ago
Hi Qemu-devel,

This is my first attempt in Qemu.
Please let me know am doing correct or not.
SoC is cortex M3 based so no bootrom stuff and unlike other
SoCs Qemu need not load dtb and kernel in DDR. Hence am using
u-boot (supplied with -kernel) as bootloader in eNVM and it loads
kernel from SPI flash to DDR same like real hardware scenario.
Also let me know any other Maintainers need to be CCed.

Thank you,
Sundeep

On Sun, Apr 9, 2017 at 4:49 PM, Subbaraya Sundeep
<sundeep.lkml@gmail.com> wrote:
> Hi Qemu-devel,
>
> I am trying to add Smartfusion2 SoC.
> SoC is from Microsemi and System on Module(SOM)
> board is from Emcraft systems. Smartfusion2 has hardened
> Microcontroller(Cortex-M3)based Sub System and FPGA fabric.
> At the moment only system timer, sysreg and SPI
> controller are modelled.
>
> Testing:
> ./arm-softmmu/qemu-system-arm -M smartfusion2-som -serial mon:stdio \
> -kernel u-boot.bin -display none -drive file=spi.bin,if=mtd,format=raw
>
> U-boot is from Emcraft with modified SPI driver not to use PDMA.
> Linux is 4.5 linux with Smartfusion2 SoC dts and clocksource
> driver added by myself @
> https://github.com/Subbaraya-Sundeep/linux.git
>
> Baremetal elfs from Microsemi Softconsole IDE are also working.
>
> Changes from v1:
>     Added SPI controller.
>
> Thanks,
> Sundeep
>
> Subbaraya Sundeep (4):
>   msf2: Add Smartfusion2 System timer
>   msf2: Microsemi Smartfusion2 System Register block.
>   msf2: Add Smartfusion2 SPI controller
>   msf2: Add Emcraft's Smartfusion2 SOM kit.
>
>  default-configs/arm-softmmu.mak |   1 +
>  hw/arm/Makefile.objs            |   2 +-
>  hw/arm/msf2_soc.c               | 141 +++++++++++++
>  hw/misc/Makefile.objs           |   1 +
>  hw/misc/msf2_sysreg.c           | 168 +++++++++++++++
>  hw/ssi/Makefile.objs            |   1 +
>  hw/ssi/msf2_spi.c               | 449 ++++++++++++++++++++++++++++++++++++++++
>  hw/timer/Makefile.objs          |   1 +
>  hw/timer/msf2_timer.c           | 273 ++++++++++++++++++++++++
>  9 files changed, 1036 insertions(+), 1 deletion(-)
>  create mode 100644 hw/arm/msf2_soc.c
>  create mode 100644 hw/misc/msf2_sysreg.c
>  create mode 100644 hw/ssi/msf2_spi.c
>  create mode 100644 hw/timer/msf2_timer.c
>
> --
> 2.5.0
>

Re: [Qemu-devel] [Qemu-devel RFC v2 0/4] Add support for Smartfusion2 SoC
Posted by Peter Maydell 7 years ago
On 13 April 2017 at 04:21, sundeep subbaraya <sundeep.lkml@gmail.com> wrote:
> Hi Qemu-devel,
>
> This is my first attempt in Qemu.
> Please let me know am doing correct or not.
> SoC is cortex M3 based so no bootrom stuff and unlike other
> SoCs Qemu need not load dtb and kernel in DDR. Hence am using
> u-boot (supplied with -kernel) as bootloader in eNVM and it loads
> kernel from SPI flash to DDR same like real hardware scenario.
> Also let me know any other Maintainers need to be CCed.

Hi -- thanks for the patchset. I've put it onto my queue of
patches to review, but it may be a little while until I
can get to it (especially since it's the Easter holiday
in the UK right now).

-- PMM

Re: [Qemu-devel] [Qemu-devel RFC v2 0/4] Add support for Smartfusion2 SoC
Posted by sundeep subbaraya 7 years ago
Hi,

On Thu, Apr 13, 2017 at 3:14 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 13 April 2017 at 04:21, sundeep subbaraya <sundeep.lkml@gmail.com> wrote:
>> Hi Qemu-devel,
>>
>> This is my first attempt in Qemu.
>> Please let me know am doing correct or not.
>> SoC is cortex M3 based so no bootrom stuff and unlike other
>> SoCs Qemu need not load dtb and kernel in DDR. Hence am using
>> u-boot (supplied with -kernel) as bootloader in eNVM and it loads
>> kernel from SPI flash to DDR same like real hardware scenario.
>> Also let me know any other Maintainers need to be CCed.
>
> Hi -- thanks for the patchset. I've put it onto my queue of
> patches to review, but it may be a little while until I
> can get to it (especially since it's the Easter holiday
> in the UK right now).

Thanks Peter. Happy holiday :)

Sundeep
>
> -- PMM