qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Delevoryas <peter@pjd.dev>
Cc: peter@pjd.dev, clg@kaod.org, peter.maydell@linaro.org,
	andrew@aj.id.au, joel@jms.id.au, thuth@redhat.com,
	lvivier@redhat.com, pbonzini@redhat.com, qemu-arm@nongnu.org,
	qemu-devel@nongnu.org
Subject: [PATCH v3 3/3] aspeed: Add fby35-bmc slot GPIO's
Date: Mon, 11 Jul 2022 19:32:19 -0700	[thread overview]
Message-ID: <20220712023219.41065-4-peter@pjd.dev> (raw)
In-Reply-To: <20220712023219.41065-1-peter@pjd.dev>

Signed-off-by: Peter Delevoryas <peter@pjd.dev>
---
 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, &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)
-- 
2.37.0



  parent reply	other threads:[~2022-07-12  2:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12  2:32 [PATCH v3 0/3] hw/gpio/aspeed: Don't let guests modify input pins Peter Delevoryas
2022-07-12  2:32 ` [PATCH v3 1/3] qtest/aspeed_gpio: Add input pin modification test Peter Delevoryas
2022-07-12 10:15   ` Cédric Le Goater
2022-07-12  2:32 ` [PATCH v3 2/3] hw/gpio/aspeed: Don't let guests modify input pins Peter Delevoryas
2022-07-13  6:15   ` Cédric Le Goater
2022-07-12  2:32 ` Peter Delevoryas [this message]
2022-07-12 10:10   ` [PATCH v3 3/3] aspeed: Add fby35-bmc slot GPIO's Cédric Le Goater

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=20220712023219.41065-4-peter@pjd.dev \
    --to=peter@pjd.dev \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --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).