Re: [PATCH v3 3/3] aspeed: Add fby35-bmc slot GPIO's
On 7/12/22 04:32, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas Reviewed-by: Cédric Le Goater Thanks, C. --- hw/arm/aspeed.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 6fe9b13548..0ce9a42c2b 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -1343,11 +1343,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, _fatal); object_property_set_bool(OBJECT(gpio), "gpioV5", true, _fatal); object_property_set_bool(OBJECT(gpio), "gpioV6", true, _fatal); object_property_set_bool(OBJECT(gpio), "gpioV7", false, _fatal); + +/* Slot presence pins, inverse polarity. (False means present) */ +object_property_set_bool(OBJECT(gpio), "gpioH4", false, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioH5", true, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioH6", true, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioH7", true, _fatal); + +/* Slot 12v power pins, normal polarity. (True means powered-on) */ +object_property_set_bool(OBJECT(gpio), "gpioB2", true, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioB3", false, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioB4", false, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioB5", false, _fatal); } static void aspeed_machine_fby35_class_init(ObjectClass *oc, void *data)
[PATCH v3 3/3] aspeed: Add fby35-bmc slot GPIO's
Signed-off-by: Peter Delevoryas --- hw/arm/aspeed.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 6fe9b13548..0ce9a42c2b 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -1343,11 +1343,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, _fatal); object_property_set_bool(OBJECT(gpio), "gpioV5", true, _fatal); object_property_set_bool(OBJECT(gpio), "gpioV6", true, _fatal); object_property_set_bool(OBJECT(gpio), "gpioV7", false, _fatal); + +/* Slot presence pins, inverse polarity. (False means present) */ +object_property_set_bool(OBJECT(gpio), "gpioH4", false, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioH5", true, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioH6", true, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioH7", true, _fatal); + +/* Slot 12v power pins, normal polarity. (True means powered-on) */ +object_property_set_bool(OBJECT(gpio), "gpioB2", true, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioB3", false, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioB4", false, _fatal); +object_property_set_bool(OBJECT(gpio), "gpioB5", false, _fatal); } static void aspeed_machine_fby35_class_init(ObjectClass *oc, void *data) -- 2.37.0