From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Inès Varhol" <ines.varhol@telecom-paris.fr>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-arm@nongnu.org, "Laurent Vivier" <lvivier@redhat.com>,
"Samuel Tardieu" <sam@rfc1149.net>,
"Arnaud Minier" <arnaud.minier@telecom-paris.fr>,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [PATCH v4 4/5] hw/arm : Connect DM163 to B-L475E-IOT01A
Date: Mon, 15 Apr 2024 11:41:12 +0200 [thread overview]
Message-ID: <beef0bc3-7964-4f41-af51-374b84ba20aa@linaro.org> (raw)
In-Reply-To: <20240414130604.182059-5-ines.varhol@telecom-paris.fr>
On 14/4/24 15:05, Inès Varhol wrote:
> Signed-off-by: Arnaud Minier <arnaud.minier@telecom-paris.fr>
> Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
> ---
> hw/arm/b-l475e-iot01a.c | 59 +++++++++++++++++++++++++++++++++++++++--
> hw/arm/Kconfig | 1 +
> 2 files changed, 58 insertions(+), 2 deletions(-)
> +/*
> + * There are actually 14 input pins in the DM163 device.
> + * Here the DM163 input pin EN isn't connected to the STM32L4x5
> + * GPIOs as the IM120417002 colors shield doesn't actually use
> + * this pin to drive the RGB matrix.
> + */
> +#define NUM_DM163_INPUTS 13
> +
> +static const int dm163_input[NUM_DM163_INPUTS] = {
s/int/unsigned/
> + 1 * GPIO_NUM_PINS + 2, /* ROW0 PB2 */
> + 0 * GPIO_NUM_PINS + 15, /* ROW1 PA15 */
> + 0 * GPIO_NUM_PINS + 2, /* ROW2 PA2 */
> + 0 * GPIO_NUM_PINS + 7, /* ROW3 PA7 */
> + 0 * GPIO_NUM_PINS + 6, /* ROW4 PA6 */
> + 0 * GPIO_NUM_PINS + 5, /* ROW5 PA5 */
> + 1 * GPIO_NUM_PINS + 0, /* ROW6 PB0 */
> + 0 * GPIO_NUM_PINS + 3, /* ROW7 PA3 */
> + 0 * GPIO_NUM_PINS + 4, /* SIN (SDA) PA4 */
> + 1 * GPIO_NUM_PINS + 1, /* DCK (SCK) PB1 */
> + 2 * GPIO_NUM_PINS + 3, /* RST_B (RST) PC3 */
> + 2 * GPIO_NUM_PINS + 4, /* LAT_B (LAT) PC4 */
> + 2 * GPIO_NUM_PINS + 5, /* SELBK (SB) PC5 */
> +};
>
> #define TYPE_B_L475E_IOT01A MACHINE_TYPE_NAME("b-l475e-iot01a")
> OBJECT_DECLARE_SIMPLE_TYPE(Bl475eMachineState, B_L475E_IOT01A)
> @@ -39,12 +66,16 @@ typedef struct Bl475eMachineState {
> MachineState parent_obj;
>
> Stm32l4x5SocState soc;
> + SplitIRQ gpio_splitters[NUM_DM163_INPUTS];
> + DM163State dm163;
> } Bl475eMachineState;
>
> static void bl475e_init(MachineState *machine)
> {
> Bl475eMachineState *s = B_L475E_IOT01A(machine);
> const Stm32l4x5SocClass *sc;
> + DeviceState *dev, *gpio_out_splitter;
> + int gpio, pin;
unsigned.
>
> object_initialize_child(OBJECT(machine), "soc", &s->soc,
> TYPE_STM32L4X5XG_SOC);
> @@ -53,6 +84,30 @@ static void bl475e_init(MachineState *machine)
> sc = STM32L4X5_SOC_GET_CLASS(&s->soc);
> armv7m_load_kernel(ARM_CPU(first_cpu),
> machine->kernel_filename, 0, sc->flash_size);
> +
> + if (object_class_by_name("dm163")) {
TYPE_DM163
> + object_initialize_child(OBJECT(machine), "dm163",
> + &s->dm163, TYPE_DM163);
> + dev = DEVICE(&s->dm163);
> + qdev_realize(dev, NULL, &error_abort);
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2024-04-15 9:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-14 13:05 [PATCH v4 0/5] Add device DM163 (led driver, matrix colors shield & display) Inès Varhol
2024-04-14 13:05 ` [PATCH v4 1/5] hw/display : Add device DM163 Inès Varhol
2024-04-15 10:00 ` Philippe Mathieu-Daudé
2024-04-14 13:05 ` [PATCH v4 2/5] hw/arm : Pass STM32L4x5 SYSCFG gpios to STM32L4x5 SoC Inès Varhol
2024-04-15 9:29 ` Philippe Mathieu-Daudé
2024-04-15 9:35 ` Philippe Mathieu-Daudé
2024-04-14 13:05 ` [PATCH v4 3/5] hw/arm : Create Bl475eMachineState Inès Varhol
2024-04-15 9:30 ` Philippe Mathieu-Daudé
2024-04-14 13:05 ` [PATCH v4 4/5] hw/arm : Connect DM163 to B-L475E-IOT01A Inès Varhol
2024-04-15 9:41 ` Philippe Mathieu-Daudé [this message]
2024-04-14 13:05 ` [PATCH v4 5/5] tests/qtest : Add testcase for DM163 Inès Varhol
2024-04-15 5:11 ` Thomas Huth
2024-04-15 9:37 ` Philippe Mathieu-Daudé
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=beef0bc3-7964-4f41-af51-374b84ba20aa@linaro.org \
--to=philmd@linaro.org \
--cc=arnaud.minier@telecom-paris.fr \
--cc=ines.varhol@telecom-paris.fr \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sam@rfc1149.net \
--cc=thuth@redhat.com \
/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).