[Nexthop] Add more support for nexthopbmc#278
Open
nate-nexthop wants to merge 5 commits into
Open
Conversation
Implement the functions to get the MAC addresses from the IDPROM
fixup ethernet mac address service needs this to set the MAC address
when we boot into Linux.
Wrote the IDPROM on the nexthopbmc card, use weutil to read it:
```
root@bmc:~# weutil
Version: 6
Product Name: nexthopbmc
...
X86 CPU MAC Base: e8:e4:9d:00:c9:f8
X86 CPU MAC Address Size: 1
BMC MAC Base: e8:e4:9d:00:c9:f9
BMC MAC Address Size: 1
...
CRC16: 0x34bc (CRC Matched)
root@bmc:~#
```
Check eth0 mac address:
```
root@bmc:~# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether e8:e4:9d:00:c9:f9 brd ff:ff:ff:ff:ff:ff permaddr de:7c:e2:66:c3:99
```
Permaddr is wrong, but that's because on this boot the u-boot FW wasn't
yet written. It was written in the Fixup Eth0 MAC address service, so
upon the next boot, we get this:
```
root@bmc:~# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether e8:e4:9d:00:c9:f9 brd ff:ff:ff:ff:ff:ff
```
And it's now in u-boot env:
```
root@bmc:~# fw_printenv
...
ethaddr=e8:e4:9d:00:c9:f9
```
Took all our GPIOs and mapped them to their names/directions. Need to properly setup our GPIOs so we can do BMC functions. 1) Load build on device 2) check some IO lines: ``` root@bmc:~# . /usr/local/bin/openbmc-utils.sh root@bmc:~# gpio_get_value CPE_CTRL 1 root@bmc:~# gpio_get_value BOOT_OK 1 root@bmc:~# ``` Signed-off-by: Nate White <nate@nexthop.ai>
Add the APML package to the image, add kernel configuration, and configure the I2C devices at boot. To enable monitoring CPU temps and access RMI. 1) Load image on device 2) Observe interfaces being created: ``` [ 30.514831] i2c i2c-6: new_device: Instantiated device sbtsi at 0x4c [ 30.522857] i2c i2c-6: new_device: Instantiated device sbrmi at 0x3c [ 30.582652] I2C SBRMI_REV command returned value: 16 [ 30.657773] sbrmi 6-003c: register apml_rmi0 device [ 30.683458] sbtsi 6-004c: register apml_tsi0 device ``` 3) Check sensors: ``` root@bmc:~# sensors sbrmi-i2c-6-3c Adapter: 1e78a380.i2c ... power1: 23.991 W (cap = 75.000 W) ... sbtsi-i2c-6-4c Adapter: 1e78a380.i2c temp1: +44.1 C (low = +0.0 C, high = +70.0 C) ``` Signed-off-by: Nate White <nate@nexthop.ai>
The TPM SPI driver doesn't appear to do anything if you give it a reset-gpios device, it doesn't even seem to de-assert it. To work around this, we just define the GPIO to be set to high with a gpio "hog" in the device tree. Previously we were waiting until openbmc-utils.sh ran which was well after the TPM was probed by Linux. The TPM would work on subsequent reboots but not the first boot. Setting the GPIO hog makes the TPM work on the first boot. We need to set TPM_RST_L high (to take TPM out of reset) at some point after power up. First boot from power on sees this: ``` [ 10.449328] tpm_tis_spi spi2.0: 2.0 TPM (device-id 0x1D, rev-id 54) [ 10.459934] tpm tpm0: A TPM error (256) occurred attempting the self test [ 10.467618] tpm tpm0: starting up the TPM manually ``` Instead of this: ``` [ 10.467326] tpm_tis_spi spi2.0: probe with driver tpm_tis_spi failed with error -110 ``` Signed-off-by: Nate White <nate@nexthop.ai>
Add some basic functionality to control userver power userver should power on on bootup with the systemd service Booted the system and see that the systemd service enabled the CPU power automatically and it booted. Signed-off-by: Nate White <nate@nexthop.ai>
Contributor
Author
|
This pull request has been imported. If you are a Meta employee, you can view this in D109624539. (Because this pull request was imported automatically, there will not be any future comments.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add more support for nexthopbmc target to OpenBMC, fbllite.
Motivation
Need to have support for more functionality for nexthopbmc.
Test Plan
See individual commits, os-release: