fby3.5: hd: Support sensor reading#382
Closed
Yi-Shum wants to merge 6 commits into
Closed
Conversation
Summary:
- Initialize HalfDome BIC.
- Create project config, dts files, file header, and CMake file.
- Add project code in meta-facebook/yv35-hd/.
Test plan:
- Build code: PASS
- Can access BIC console: PASS
LOG:
1. Build code pass.
```
$ west build -b ast1030_evb -p auto ./meta-facebook/yv35-hd/
...
[254/261] Linking C executable zephyr/zephyr_prebuilt.elf
[261/261] Linking C executable zephyr/Y35BHD.elf
Memory region Used Size Region Size %age Used
SRAM_NC: 152 KB 320 KB 47.50%
FLASH: 0 GB 0 GB
SRAM: 385440 B 448 KB 84.02%
IDT_LIST: 0 GB 2 KB 0.00%
```
2. BIC console:
```
[00:00:00.002,000] <wrn> usb_dc_aspe*** Booting Zephyr OS build v00.01.05-5-g6163ab05ded5 ***
Hello, welcome to yv35 halfdome ffff.ff.ff
```
23c131f to
0d67dbd
Compare
Contributor
|
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: - Support IPMB handler. Test plan: - Build code: Pass - Check IPMB is workable: Pass LOG: ``` root@bmc-oob:~# bic-util slot1 0x18 0x1 00 80 FF FF 02 BF 15 A0 00 00 00 00 00 00 00 ```
Summary: - Support GPIO. Test plan: - Build code: Pass - Get GPIO initial value: Pass LOG ``` uart:~$ platform gpio list_all [1 ] FM_BIOS_POST_CMPLT_BIC_N : OD | input (I) | 1(1) [2 ] FM_CPU_BIC_SLP_S3_N : PP | input (I) | 1(1) [3 ] APML_CPU_ALERT_BIC_N : OD | input (I) | 1(1) [4 ] IRQ_UV_DETECT_N : OD | input (I) | 1(1) [6 ] PVDDCR_CPU0_BIC_OCP_N : OD | input (I) | 1(1) [7 ] HSC_OCP_GPIO1_R : PP | output(O) | 0(0) [8 ] PVDDCR_CPU1_BIC_OCP_N : OD | input (I) | 1(1) [9 ] RST_USB_HUB_R_N : OD | output(I) | 1(1) [10 ] P3V_BAT_SCALED_EN_R : PP | output(O) | 0(0) [11 ] HDT_BIC_TRST_R_N : OD | output(I) | 1(1) [13 ] FM_CPU_BIC_SLP_S5_N : PP | input (I) | 1(1) [15 ] PVDD11_S3_BIC_OCP_N : OD | input (I) | 1(1) [16 ] FM_HSC_TIMER : OD | input (I) | 0(0) [17 ] IRQ_SMB_IO_LVC3_STBY_ALRT_N : OD | input (I) | 1(1) [18 ] PVDDCR_CPU1_PMALERT_N : OD | input (I) | 1(1) [20 ] FM_CPU_BIC_THERMTRIP_N : OD | input (I) | 1(1) [21 ] FM_PRSNT_CPU_BIC_N : OD | input (I) | 0(0) [22 ] AUTH_PRSNT_BIC_N : OD | input (I) | 1(1) [23 ] RST_CPU_RESET_BIC_N : OD | input (I) | 1(1) [24 ] PWRBTN_R1_N : OD | input (I) | 1(1) [25 ] RST_BMC_R_N : OD | output(I) | 1(1) [26 ] HDT_BIC_DBREQ_R_N : OD | output(I) | 1(1) [27 ] BMC_READY : PP | output(O) | 1(1) [28 ] BIC_READY : PP | output(O) | 1(1) [29 ] FM_SOL_UART_CH_SEL_R : PP | output(O) | 1(1) [32 ] PWRGD_CPU_LVC3 : PP | input (I) | 1(1) [33 ] CPU_ERROR_BIC_LVC3_R_N : PP | input (I) | 1(1) [34 ] PVDD11_S3_PMALERT_N : OD | input (I) | 1(1) [35 ] IRQ_HSC_ALERT1_N : OD | input (I) | 0(0) [36 ] SMB_SENSOR_LVC3_ALERT_N : OD | input (I) | 1(1) [38 ] SYS_PWRBTN_BIC_N : OD | input (I) | 1(1) [39 ] RST_PLTRST_BIC_N : PP | input (I) | 1(1) [40 ] CPU_SMERR_BIC_N : OD | input (I) | 1(1) [41 ] IRQ_HSC_ALERT2_N : OD | input (I) | 1(1) [43 ] FM_BMC_DEBUG_ENABLE_N : OD | output(I) | 1(1) [44 ] FM_DBP_PRESENT_N : OD | input (I) | 1(1) [45 ] FM_FAST_PROCHOT_EN_R_N : PP | output(O) | 0(0) [49 ] FM_BIOS_MRC_DEBUG_MSG_DIS : OD | output(I) | 1(1) [50 ] FAST_PROCHOT_N : OD | input (I) | 1(1) [52 ] BIC_JTAG_SEL_R : PP | output(O) | 0(0) [54 ] HSC_OCP_GPIO2_R : PP | output(O) | 0(0) [55 ] HSC_OCP_GPIO3_R : PP | output(O) | 0(0) [56 ] RST_RSMRST_BMC_N : PP | input (I) | 1(1) [59 ] FM_CPU_BIC_PROCHOT_LVT3_N : OD | input (I) | 1(1) [90 ] BIC_JTAG_MUX_SEL : PP | output(O) | 0(0) [91 ] BOARD_ID2 : PP | input (I) | 0(0) [92 ] PVDDCR_CPU0_PMALERT_N : OD | input (I) | 1(1) [94 ] BOARD_ID0 : PP | input (I) | 0(0) [95 ] BOARD_ID1 : PP | input (I) | 1(1) [97 ] BOARD_ID3 : PP | input (I) | 0(0) [100] BOARD_ID5 : PP | input (I) | 0(0) [101] BOARD_ID4 : PP | input (I) | 0(0) [159] HSC_TYPE_0 : PP | input (I) | 0(0) [167] HSC_TYPE_1 : PP | input (I) | 0(0) ```
Summary: - Support read and write FRU. Test plan: - Build code: Pass - Read FRU: Pass - Write FRU: Pass LOG: Use CraterLake FRU for test Write: ``` root@bmc-oob:~# fruid-util slot1 --write fru.bin ``` Read: ``` root@bmc-oob:~# fruid-util slot1 FRU Information : Server board 1 --------------- : ------------------ Chassis Type : Rack Mount Chassis Board Mfg Date : Tue Feb 8 04:12:00 2022 Board Mfg : Quanta Board Product : Crater Lake-Class1 Board Serial : TWG1820400141 Board Part Number : 33F0EMA02Y0 Board FRU ID : FRU Ver 0.03 Board Custom Data 1 : 02-000497 Board Custom Data 2 : BDT Product Manufacturer : Quanta Product Name : Crater Lake EVT2 Product Version : YoCL35 ```
Summary: - Support TMP75 sensor reading. - Support SSD temperature sensor reading. - Support ADC sensor reading. - Support VR(raa229621) sensor reading. - Support HSC sensor reading. - Support nct7718w sensor reading. Test plan: - Build code: Pass - Get sensor reading: Pass Log: ``` root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x01 0x00 15 A0 00 20 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x02 0x00 15 A0 00 30 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x03 0x00 15 A0 00 1B 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x0E 0x00 15 A0 00 7F 00 6B 03 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x0F 0x00 15 A0 00 37 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x10 0x00 15 A0 00 39 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x11 0x00 15 A0 00 29 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x12 0x00 15 A0 00 2A 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x13 0x00 15 A0 00 27 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x14 0x00 15 A0 00 0C 00 12 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x15 0x00 15 A0 00 01 00 2D 03 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x16 0x00 15 A0 00 03 00 3A 01 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x17 0x00 15 A0 00 01 00 69 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x18 0x00 15 A0 00 03 00 7E 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x19 0x00 15 A0 00 03 00 3A 01 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x1a 0x00 15 A0 00 05 00 28 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x1b 0x00 15 A0 00 0C 00 54 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x1c 0x00 15 A0 00 0C 00 54 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x1d 0x00 15 A0 00 01 00 CE 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x1e 0x00 15 A0 00 03 00 44 01 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x1f 0x00 15 A0 00 01 00 29 03 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x20 0x00 15 A0 00 0C 00 33 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x21 0x00 15 A0 00 00 00 9D 03 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x22 0x00 15 A0 00 01 00 BE 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x23 0x00 15 A0 00 00 00 9B 03 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x24 0x00 15 A0 00 01 00 63 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x25 0x00 15 A0 00 01 00 64 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x26 0x00 15 A0 00 0D 00 8B 01 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x27 0x00 15 A0 00 09 00 20 03 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x28 0x00 15 A0 00 34 00 64 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x29 0x00 15 A0 00 0A 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x2a 0x00 15 A0 00 1A 00 2C 01 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x2b 0x00 15 A0 00 01 00 C8 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x2c 0x00 15 A0 00 A1 00 F9 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x2d 0x00 15 A0 00 08 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x2e 0x00 15 A0 00 3D 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x2f 0x00 15 A0 00 09 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x30 0x00 15 A0 00 1D 00 00 00 C0 root@bmc-oob:~# bic-util slot1 0xe0 0x23 0x15 0xa0 0x00 0x31 0x00 15 A0 00 01 00 00 00 C0 ```
0d67dbd to
6292cf2
Compare
Contributor
|
@Yi-Shum has updated the pull request. You must reimport the pull request before landing. |
Contributor
|
Merged as seperate commits. |
facebook-github-bot
pushed a commit
that referenced
this pull request
Jul 8, 2022
Summary: - Support TMP75 sensor reading. - Support ADC sensor reading. - Support SSD temperature sensor reading. - Support HSC sensor reading. Dependency: #381 This commit was broken into several commits originating from the PR: #382 commit [1/3] Reviewed By: garnermic Differential Revision: D37722469 fbshipit-source-id: 2e84aed948daab5aaa705a0c90c79233da50b055
facebook-github-bot
pushed a commit
that referenced
this pull request
Jul 8, 2022
Summary: - Support monitor system DC state. - Support monitor post complete. Dependency: #382 Pull Request resolved: #383 Test Plan: - Build code: PASS - Check system DC flag will change: Pass Log: - power on ``` BMC: root@bmc-oob:~# power-util slot1 on Powering fru 1 to ON state... root@bmc-oob:~# power-util slot1 status Power status for fru 1 : ON BIC: uart:~$ [set_DC_status] gpio number(39) status(1) [set_post_status] gpio number(1) status(1) ``` - power off ``` BMC: root@bmc-oob:~# power-util slot1 off Powering fru 1 to OFF state... root@bmc-oob:~# power-util slot1 status Power status for fru 1 : OFF BIC: uart:~$ [set_post_status] gpio number(1) status(0) [set_DC_status] gpio number(39) status(0) ``` Reviewed By: garnermic Differential Revision: D37679172 Pulled By: GoldenBug fbshipit-source-id: bddd8d46701b8cfe0d3e2278a723749fc25e2976
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.
Summary:
Dependency: #381
Test plan:
Log: