[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 5/7] hw/arm: Add AXP-209 to Cubieboard
From: |
Strahinja Jankovic |
Subject: |
[PATCH v2 5/7] hw/arm: Add AXP-209 to Cubieboard |
Date: |
Sun, 18 Dec 2022 22:19:16 +0100 |
SPL Boot for Cubieboard expects AXP-209 connected to I2C0 bus.
Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
---
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/cubieboard.c
@@ -20,6 +20,7 @@
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "hw/arm/allwinner-a10.h"
+#include "hw/i2c/i2c.h"
static struct arm_boot_info cubieboard_binfo = {
.loader_start = AW_A10_SDRAM_BASE,
@@ -34,6 +35,7 @@ static void cubieboard_init(MachineState *machine)
BlockBackend *blk;
BusState *bus;
DeviceState *carddev;
+ I2CBus *i2c;
/* BIOS is not supported by this board */
if (machine->firmware) {
@@ -80,6 +82,10 @@ static void cubieboard_init(MachineState *machine)
exit(1);
}
+ /* Connect AXP 209 */
+ i2c = (I2CBus *)qdev_get_child_bus(DEVICE(&a10->i2c0), "i2c");
+ i2c_slave_create_simple(i2c, "allwinner.axp209", 0x34);
+
/* Retrieve SD bus */
di = drive_get(IF_SD, 0, 0);
blk = di ? blk_by_legacy_dinfo(di) : NULL;
--
2.30.2
- Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation, (continued)
- Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation, Strahinja Jankovic, 2022/12/18
- Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation, Philippe Mathieu-Daudé, 2022/12/18
- Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation, Strahinja Jankovic, 2022/12/18
- Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation, Philippe Mathieu-Daudé, 2022/12/18
- Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation, Strahinja Jankovic, 2022/12/18
- Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation, Philippe Mathieu-Daudé, 2022/12/19
- Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation, Strahinja Jankovic, 2022/12/19
- [PATCH v2 7/7] docs/system/arm: Update Allwinner with TWI (I2C), Strahinja Jankovic, 2022/12/18
- [PATCH v2 5/7] hw/arm: Add AXP-209 to Cubieboard,
Strahinja Jankovic <=
- [PATCH v2 6/7] hw/arm: Allwinner A10 enable SPL load from MMC, Strahinja Jankovic, 2022/12/18
- Re: [PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card, Philippe Mathieu-Daudé, 2022/12/18