diff options
author | Thang Q. Nguyen <thang@os.amperecomputing.com> | 2021-09-23 09:47:52 +0300 |
---|---|---|
committer | Thang Q. Nguyen <thang@os.amperecomputing.com> | 2021-09-23 10:25:43 +0300 |
commit | 7d0f84a633d674313354852ddbecf888c8e47226 (patch) | |
tree | 6e41391697002863073b49c7b984cbbd05048d71 /meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init.bb | |
parent | f68eae164d56f453c2ef767118f7cbed74a412b4 (diff) | |
download | openbmc-7d0f84a633d674313354852ddbecf888c8e47226.tar.xz |
meta-ampere: mtjade: initialize GPIOs
Several GPIOs should be configured properly when booting BMC. Currently,
these GPIOs are configured in u-boot. However, some must be configured
in Linux. For example, the BMC_READY GPIO should be set only after BMC
is ready to work.
This commit introduce platform-init service which starts after BMC boots
to configure GPIOs pins required by hardware design.
Tested:
1. Do A/C power, check GPIO227 is set to 0.
2. Reboot BMC, check GPIO227 is set to 0.
3. Run gpioinfo and check GPIO directions
Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Change-Id: Ie0cfe171659ad740c6a25297f2fcce259870d43d
Diffstat (limited to 'meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init.bb')
-rw-r--r-- | meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init.bb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init.bb b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init.bb new file mode 100644 index 000000000..aaeb33ffe --- /dev/null +++ b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init.bb @@ -0,0 +1,28 @@ +SUMMARY = "Phosphor OpenBMC Mt.Jade Platform Init Service" +DESCRIPTION = "Phosphor OpenBMC Mt.Jade Platform Init Daemon" + +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit systemd +inherit obmc-phosphor-systemd + +DEPENDS += "systemd" +RDEPENDS:${PN} += "libsystemd" +RDEPENDS:${PN} += "bash" + +SRC_URI = " \ + file://ampere_platform_init.sh \ + file://ampere-platform-init.service \ + " + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "ampere-platform-init.service" + +do_install () { + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/ampere_platform_init.sh ${D}${sbindir}/ + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/ampere-platform-init.service ${D}${systemd_unitdir}/system +} |