qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Esteban Bosse <estebanbosse@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Andrew Baumann" <Andrew.Baumann@microsoft.com>,
	qemu-devel@nongnu.org, "Pekka Enberg" <penberg@iki.fi>,
	"Zoltán Baldaszti" <bztemail@gmail.com>
Cc: qemu-arm@nongnu.org,
	"Clement Deschamps" <clement.deschamps@antfield.fr>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Luc Michel" <luc.michel@greensocs.com>
Subject: Re: [PATCH 11/14] hw/arm/bcm2835_peripherals: Map various BCM2838 blocks
Date: Sun, 29 Sep 2019 17:44:27 +0200	[thread overview]
Message-ID: <1a2fbee61f06d382adab396f6074ae66583a442f.camel@gmail.com> (raw)
In-Reply-To: <20190904171315.8354-12-f4bug@amsat.org>

El mié, 04-09-2019 a las 19:13 +0200, Philippe Mathieu-Daudé escribió:
> The BCM2838 provides more peripherals.
> Add them as 'unimplemented' so we can track when/how firmware
> and kernel access them.
> 
> Based on various sources:
> 
> * U-boot: https://github.com/raspberrypi/firmware/tree/next/boot
> 
>   - arch/arm/dts/bcm283x.dtsi
>   - arch/arm/dts/bcm2838.dtsi
>   - arch/arm/dts/bcm2838-rpi-4-b.dts
> 
> * Arnd Bergmann analysis: 
> https://www.cnx-software.com/2019/06/24/raspberry-pi-4-features-broadcom-bcm2711-processor-up-to-4gb-ram/#comment-563948
> 
> * Linux: https://patchwork.kernel.org/patch/11053097/
> 
>   - arch/arm/boot/dts/bcm283x.dtsi
>   - arch/arm/boot/dts/bcm283x-rpi-usb-peripheral.dtsi
>   - arch/arm/boot/dts/bcm2711.dtsi
>   - arch/arm/boot/dts/bcm2711-rpi-4-b.dts
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> TODO: At least use proper pl011[2] and pl011[3]
> ---
>  hw/arm/bcm2835_peripherals.c         | 23 +++++++++++++++++++----
>  include/hw/arm/bcm2835_peripherals.h |  8 ++++++--
>  include/hw/arm/raspi_platform.h      | 14 ++++++++++++++
>  3 files changed, 39 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/arm/bcm2835_peripherals.c
> b/hw/arm/bcm2835_peripherals.c
> index be6270b8ef..72287d5921 100644
> --- a/hw/arm/bcm2835_peripherals.c
> +++ b/hw/arm/bcm2835_peripherals.c
> @@ -342,15 +342,30 @@ static void
> bcm2835_peripherals_realize(DeviceState *dev, Error **errp)
>      create_unimp(s, &s->a2w, "bcm2835-a2w", 0x102000, 0x1000);
>      create_unimp(s, &s->i2s, "bcm2835-i2s", I2S_OFFSET, 0x100);
>      create_unimp(s, &s->smi, "bcm2835-smi", SMI_OFFSET, 0x100);
> -    create_unimp(s, &s->spi0, "bcm2835-spi0", SPI0_OFFSET, 0x20);
> +    create_unimp(s, &s->uartu[2], "!pl011[2]", UART2_OFFSET, 0x100);
> +    create_unimp(s, &s->uartu[3], "!pl011[3]", UART3_OFFSET, 0x100);
> +    create_unimp(s, &s->uartu[4], "!pl011[4]", UART4_OFFSET, 0x100);
> +    create_unimp(s, &s->uartu[5], "!pl011[5]", UART5_OFFSET, 0x100);
> +    create_unimp(s, &s->spi[0], "bcm2835-spi[0]", SPI0_OFFSET,
> 0x20);
> +    create_unimp(s, &s->spi[3], "bcm2835-spi[3]", SPI3_OFFSET,
> 0x20);
> +    create_unimp(s, &s->spi[4], "bcm2835-spi[4]", SPI4_OFFSET,
> 0x20);
> +    create_unimp(s, &s->spi[5], "bcm2835-spi[5]", SPI5_OFFSET,
> 0x20);
> +    create_unimp(s, &s->spi[6], "bcm2835-spi[6]", SPI6_OFFSET,
> 0x20);
>      create_unimp(s, &s->bscsl, "bcm2835-spis", BSC_SL_OFFSET,
> 0x100);
> -    create_unimp(s, &s->i2c[0], "bcm2835-i2c0", BSC0_OFFSET, 0x20);
> -    create_unimp(s, &s->i2c[1], "bcm2835-i2c1", BSC1_OFFSET, 0x20);
> -    create_unimp(s, &s->i2c[2], "bcm2835-i2c2", BSC2_OFFSET, 0x20);
> +    create_unimp(s, &s->i2c[0], "bcm2835-i2c[0]", BSC0_OFFSET,
> 0x20);
> +    create_unimp(s, &s->i2c[1], "bcm2835-i2c[1]", BSC1_OFFSET,
> 0x20);
> +    create_unimp(s, &s->i2c[2], "bcm2835-i2c[2]", BSC2_OFFSET,
> 0x20);
> +    create_unimp(s, &s->i2c[3], "bcm2835-i2c[3]", BSC3_OFFSET,
> 0x20);
> +    create_unimp(s, &s->i2c[4], "bcm2835-i2c[4]", BSC4_OFFSET,
> 0x20);
> +    create_unimp(s, &s->i2c[5], "bcm2835-i2c[5]", BSC5_OFFSET,
> 0x20);
> +    create_unimp(s, &s->i2c[6], "bcm2835-i2c[6]", BSC6_OFFSET,
> 0x20);
>      create_unimp(s, &s->otp, "bcm2835-otp", OTP_OFFSET, 0x80);
>      create_unimp(s, &s->dbus, "bcm2835-dbus", DBUS_OFFSET, 0x8000);
>      create_unimp(s, &s->ave0, "bcm2835-ave0", AVE0_OFFSET, 0x8000);
>      create_unimp(s, &s->dwc2, "dwc-usb2", USB_OTG_OFFSET, 0x100);
> +    create_unimp(s, &s->xhci, "bcm2838-xhci", USB_XHCI_OFFSET,
> 0x100000);
> +    create_unimp(s, &s->argon, "bcm2838-argon", ARGON_OFFSET, 4 *
> 0x10000);
> +    create_unimp(s, &s->v3d, "bcm2835-v3d", V3D_OFFSET, 0x10000);
>      create_unimp(s, &s->sdramc, "bcm2835-sdramc", SDRAMC_OFFSET,
> 0x100);
>  }
>  
> diff --git a/include/hw/arm/bcm2835_peripherals.h
> b/include/hw/arm/bcm2835_peripherals.h
> index 44a182b399..2e5f243b39 100644
> --- a/include/hw/arm/bcm2835_peripherals.h
> +++ b/include/hw/arm/bcm2835_peripherals.h
> @@ -42,6 +42,7 @@ typedef struct BCM2835PeripheralState {
>      UnimplementedDeviceState cprman;
>      UnimplementedDeviceState a2w;
>      PL011State uart0;
> +    UnimplementedDeviceState uartu[6];
>      BCM2835AuxState aux;
>      BCM2835FBState fb;
>      BCM2835DMAState dma;
> @@ -53,14 +54,17 @@ typedef struct BCM2835PeripheralState {
>      BCM2835SDHostState sdhost;
>      BCM2835GpioState gpio;
>      UnimplementedDeviceState i2s;
> -    UnimplementedDeviceState spi0;
> -    UnimplementedDeviceState i2c[3];
> +    UnimplementedDeviceState spi[7];
> +    UnimplementedDeviceState i2c[7];
>      UnimplementedDeviceState otp;
>      UnimplementedDeviceState dbus;
>      UnimplementedDeviceState ave0;
>      UnimplementedDeviceState bscsl;
>      UnimplementedDeviceState smi;
>      UnimplementedDeviceState dwc2;
> +    UnimplementedDeviceState xhci;
> +    UnimplementedDeviceState argon;
> +    UnimplementedDeviceState v3d;
>      UnimplementedDeviceState sdramc;
>  } BCM2835PeripheralState;
>  
> diff --git a/include/hw/arm/raspi_platform.h
> b/include/hw/arm/raspi_platform.h
> index c6f4985522..0ea547669f 100644
> --- a/include/hw/arm/raspi_platform.h
> +++ b/include/hw/arm/raspi_platform.h
> @@ -49,10 +49,22 @@
>  #define RNG_OFFSET              0x104000
>  #define GPIO_OFFSET             0x200000
>  #define UART0_OFFSET            0x201000 /* PL011 */
> +#define UART2_OFFSET            0x201400 /* PL011 */
> +#define UART3_OFFSET            0x201600 /* PL011 */
> +#define UART4_OFFSET            0x201800 /* PL011 */
> +#define UART5_OFFSET            0x201a00 /* PL011 */
>  #define MMCI0_OFFSET            0x202000 /* Legacy MMC */
>  #define I2S_OFFSET              0x203000 /* PCM */
>  #define SPI0_OFFSET             0x204000 /* SPI master */
> +#define SPI3_OFFSET             0x204600
> +#define SPI4_OFFSET             0x204800
> +#define SPI5_OFFSET             0x204a00
> +#define SPI6_OFFSET             0x204c00
>  #define BSC0_OFFSET             0x205000 /* BSC0 I2C/TWI */
> +#define BSC3_OFFSET             0x205600
> +#define BSC4_OFFSET             0x205800
> +#define BSC5_OFFSET             0x205a00
> +#define BSC6_OFFSET             0x205c00
>  #define PIXV0_OFFSET            0x206000
>  #define PIXV1_OFFSET            0x207000
>  #define DPI_OFFSET              0x208000
> @@ -84,6 +96,8 @@
>  #define DBUS_OFFSET             0x900000
>  #define AVE0_OFFSET             0x910000
>  #define USB_OTG_OFFSET          0x980000 /* DTC_OTG USB controller
> */
> +#define USB_XHCI_OFFSET         0x9c0000 /* generic-xhci controller
> */
> +#define ARGON_OFFSET            0xb00000
>  #define V3D_OFFSET              0xc00000
>  #define SDRAMC_OFFSET           0xe00000
>  #define L2CC_OFFSET             0xe01000 /* Level 2 Cache controller
> */
Reviewed-by: Esteban Bosse <estebanbosse@gmail.com>



  reply	other threads:[~2019-09-29 15:46 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 17:13 [Qemu-devel] [RFC PATCH 00/14] hw/arm: Add the Raspberry Pi 4B Philippe Mathieu-Daudé
2019-09-04 17:13 ` [Qemu-devel] [PATCH 01/14] hw/arm/raspi: Use the IEC binary prefix definitions Philippe Mathieu-Daudé
2019-09-27 19:46   ` Esteban Bosse
2019-09-29  6:57   ` Esteban Bosse
2019-09-04 17:13 ` [Qemu-devel] [PATCH 02/14] hw/misc/bcm2835_property: Add FIXME comment for uninitialized memory Philippe Mathieu-Daudé
2019-09-04 17:13 ` [Qemu-devel] [RFC PATCH 03/14] hw/misc/bcm2835_property: Handle the 'domain state' property Philippe Mathieu-Daudé
2019-09-27 20:51   ` Esteban Bosse
2019-09-29  7:01   ` Esteban Bosse
2019-10-08  9:32     ` Philippe Mathieu-Daudé
2019-10-24  9:15       ` Esteban Bosse
2019-09-04 17:13 ` [Qemu-devel] [PATCH 04/14] hw/arm/bcm2835_peripherals: Improve logging Philippe Mathieu-Daudé
2019-09-27 21:25   ` Esteban Bosse
2019-09-04 17:13 ` [Qemu-devel] [PATCH 05/14] hw/arm/bcm2835_peripherals: Name various address spaces Philippe Mathieu-Daudé
2019-09-29  7:08   ` Esteban Bosse
2019-09-04 17:13 ` [Qemu-devel] [PATCH 06/14] hw/arm/bcm2835: Rename some definitions Philippe Mathieu-Daudé
2019-09-29 14:27   ` Esteban Bosse
2019-09-04 17:13 ` [Qemu-devel] [PATCH 07/14] hw/arm/bcm2835: Add various unimplemented peripherals Philippe Mathieu-Daudé
2019-09-29 14:35   ` Esteban Bosse
2019-09-04 17:13 ` [Qemu-devel] [PATCH 08/14] hw/arm/bcm2836: Make the SoC code modular Philippe Mathieu-Daudé
2019-09-29 14:39   ` Esteban Bosse
2019-09-04 17:13 ` [Qemu-devel] [PATCH 09/14] hw/arm/raspi: Make the board " Philippe Mathieu-Daudé
2019-09-04 17:13 ` [Qemu-devel] [PATCH 10/14] hw/arm/raspi: Define various blocks base addresses Philippe Mathieu-Daudé
2019-09-06 10:07   ` Philippe Mathieu-Daudé
2019-09-29 15:27     ` Esteban Bosse
2019-10-08  9:16       ` Philippe Mathieu-Daudé
2019-09-04 17:13 ` [Qemu-devel] [PATCH 11/14] hw/arm/bcm2835_peripherals: Map various BCM2838 blocks Philippe Mathieu-Daudé
2019-09-29 15:44   ` Esteban Bosse [this message]
2019-09-04 17:13 ` [Qemu-devel] [RFC PATCH 12/14] hw/arm/bcm2836: Add the BCM2838 which uses a GICv2 Philippe Mathieu-Daudé
2019-09-05  8:41   ` Luc Michel
2019-09-09 17:10     ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2019-09-04 17:13 ` [Qemu-devel] [RFC PATCH 13/14] hw/arm/bcm2838: Map the PCIe memory space Philippe Mathieu-Daudé
2019-09-04 17:13 ` [Qemu-devel] [RFC PATCH 14/14] hw/arm/raspi: Add the Raspberry Pi 4B board Philippe Mathieu-Daudé
2019-09-29 15:53   ` Esteban Bosse
2019-10-08  9:04     ` Philippe Mathieu-Daudé
2019-10-24  9:07       ` Peter Maydell
2019-10-24 12:26         ` Esteban Bosse
2019-10-24  9:01   ` Esteban Bosse
2019-09-21 13:25 ` [Qemu-arm] [RFC PATCH 00/14] hw/arm: Add the Raspberry Pi 4B Stewart Hildebrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a2fbee61f06d382adab396f6074ae66583a442f.camel@gmail.com \
    --to=estebanbosse@gmail.com \
    --cc=Andrew.Baumann@microsoft.com \
    --cc=bztemail@gmail.com \
    --cc=clement.deschamps@antfield.fr \
    --cc=f4bug@amsat.org \
    --cc=luc.michel@greensocs.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=penberg@iki.fi \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).