aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Delevoryas <peter@pjd.dev>2022-07-14 16:24:38 +0200
committerCédric Le Goater <clg@kaod.org>2022-07-14 16:24:38 +0200
commitf0418558302ef9e140681e04250fc1ca265f3140 (patch)
tree4e6e33488602ebab2ff5837812aff65c81948a88
parent1f30db922c72ca8c9de31f58a996bc21ee668304 (diff)
downloadqemu-f0418558302ef9e140681e04250fc1ca265f3140.zip
qemu-f0418558302ef9e140681e04250fc1ca265f3140.tar.gz
qemu-f0418558302ef9e140681e04250fc1ca265f3140.tar.bz2
aspeed: Add fby35-bmc slot GPIO's
Signed-off-by: Peter Delevoryas <peter@pjd.dev> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20220712023219.41065-4-peter@pjd.dev> Signed-off-by: Cédric Le Goater <clg@kaod.org>
-rw-r--r--hw/arm/aspeed.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 60bc2e4..4193a3d 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -1358,11 +1358,23 @@ static void fby35_reset(MachineState *state)
qemu_devices_reset();
- /* Board ID */
+ /* Board ID: 7 (Class-1, 4 slots) */
object_property_set_bool(OBJECT(gpio), "gpioV4", true, &error_fatal);
object_property_set_bool(OBJECT(gpio), "gpioV5", true, &error_fatal);
object_property_set_bool(OBJECT(gpio), "gpioV6", true, &error_fatal);
object_property_set_bool(OBJECT(gpio), "gpioV7", false, &error_fatal);
+
+ /* Slot presence pins, inverse polarity. (False means present) */
+ object_property_set_bool(OBJECT(gpio), "gpioH4", false, &error_fatal);
+ object_property_set_bool(OBJECT(gpio), "gpioH5", true, &error_fatal);
+ object_property_set_bool(OBJECT(gpio), "gpioH6", true, &error_fatal);
+ object_property_set_bool(OBJECT(gpio), "gpioH7", true, &error_fatal);
+
+ /* Slot 12v power pins, normal polarity. (True means powered-on) */
+ object_property_set_bool(OBJECT(gpio), "gpioB2", true, &error_fatal);
+ object_property_set_bool(OBJECT(gpio), "gpioB3", false, &error_fatal);
+ object_property_set_bool(OBJECT(gpio), "gpioB4", false, &error_fatal);
+ object_property_set_bool(OBJECT(gpio), "gpioB5", false, &error_fatal);
}
static void aspeed_machine_fby35_class_init(ObjectClass *oc, void *data)