fby3.5: common: Support INA and VR sensor#309
Closed
DelphineChiu wants to merge 1 commit into
Closed
Conversation
Summary:
- Support INA233 sensor.
- SUpport VR ISL69254IRAZ_T sensor.
Test plan:
- Build code: Pass
- Get sensor reading: Pass
Log:
1. Check code can build pass.
(1) Check CL BIC can build pass.
openbic$ west build -p auto -b ast1030_evb meta-facebook/yv35-cl
-- west build: generating a build system
...
[277/277] Linking C executable zephyr/Y35BCL.elf
Memory region Used Size Region Size %age Used
SRAM_NC: 152 KB 320 KB 47.50%
FLASH: 0 GB 0 GB
SRAM: 451784 B 448 KB 98.48%
IDT_LIST: 0 GB 2 KB 0.00%
302356+0 records in
302356+0 records out
302356 bytes (302 kB, 295 KiB) copied, 0.911821 s, 332 kB/s
0+0 records in
0+0 records out
0 bytes copied, 4.6057e-05 s, 0.0 kB/s
(2) Check BB BIC can build pass.
openbic$ west build -p auto -b ast1030_evb meta-facebook/yv35-bb
-- west build: generating a build system
...
[271/271] Linking C executable zephyr/Y35BBB.elf
Memory region Used Size Region Size %age Used
SRAM_NC: 12 KB 320 KB 3.75%
FLASH: 0 GB 0 GB
SRAM: 401312 B 448 KB 87.48%
IDT_LIST: 0 GB 2 KB 0.00%
277944+0 records in
277944+0 records out
277944 bytes (278 kB, 271 KiB) copied, 0.62199 s, 447 kB/s
0+0 records in
0+0 records out
0 bytes copied, 4.3264e-05 s, 0.0 kB/s
(3) Check RF BIC can build pass.
openbic$ west build -p auto -b ast1030_evb meta-facebook/yv35-rf
-- west build: generating a build syste
...
[247/247] Linking C executable zephyr/Y35BRF.elf
Memory region Used Size Region Size %age Used
SRAM_NC: 12 KB 320 KB 3.75%
FLASH: 0 GB 0 GB
SRAM: 344480 B 448 KB 75.09%
IDT_LIST: 0 GB 2 KB 0.00%
249012+0 records in
249012+0 records out
249012 bytes (249 kB, 243 KiB) copied, 0.763853 s, 326 kB/s
0+0 records in
0+0 records out
0 bytes copied, 4.4834e-05 s, 0.0 kB/s
2. Test with project code to get sensor reading.
(1) Read INA233 sensor
- VOL_STBY12V
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5d 0x00
9C 9C 00 05 39 23 00 9C 9C 00 0C 00 26 02 C0
value = 000Ch + 0226h / 1000 = 12.55
- VOL_STBY3V3
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5e 0x00
9C 9C 00 05 39 23 00 9C 9C 00 03 00 42 01 C0
value = 0003h + 0142h / 1000 = 3.322
- CUR_STBY12V
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x6c 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 F2 00 C0
value = 0000h + 00F2h / 1000 = 0.242
- CUR_STBY3V3
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x6d 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 A0 00 C0
value = 0000h + 00A0h / 1000 = 0.160
- PWR_STBY12V
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x73 0x00
9C 9C 00 05 39 23 00 9C 9C 00 03 00 7D 00 C0
value = 0003h + 0007Dh / 1000 = 3.125
- PWR_STBY3V3
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x74 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 0D 02 C0
value = 0000h + 020Dh / 1000 = 0.525
(2) Read VR temperature
- TEMP_VR0V9A
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x58 0x00
9C 9C 00 05 39 23 00 9C 9C 00 26 00 00 00 C0
value = 0026h + 0000h / 1000 = 38.0
- TEMP_VR0V8A
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x59 0x00
9C 9C 00 05 39 23 00 9C 9C 00 23 00 00 00 C0
value = 0023h + 0000h / 1000 = 35.0
- TEMP_VR0V8D
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5a 0x00
9C 9C 00 05 39 23 00 9C 9C 00 1E 00 00 00 C0
value = 001Eh + 0000h / 1000 = 30.0
- TEMP_VRVDDQAB
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5b 0x00
9C 9C 00 05 39 23 00 9C 9C 00 23 00 00 00 C0
value = 0023h + 0000h / 1000 = 35.0
- TEMP_VRVDDQCD
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5c 0x00
9C 9C 00 05 39 23 00 9C 9C 00 25 00 00 00 C0
value = 0025h + 0000h / 1000 = 37.0
(3) Read VR Voltage
- VOL_VR0V9A
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x62 0x00
9C 9C 00 05 39 23 00 9C 9C 00 01 00 45 00 C0
value = 0001h + 0045h / 1000 = 1.069
- VOL_VR0V8A
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x64 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 33 03 C0
value = 0000h + 0333h / 1000 = 0.819
- VOL_VR0V8D
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x65 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 32 03 C0
value = 0001h + 0332h/ 1000 = 0.818
- VOL_VRVDDQAB
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x66 0x00
9C 9C 00 05 39 23 00 9C 9C 00 01 00 C8 00 C0
value = 0001h + 00C8h / 1000 = 1.2
- VOL_VRVDDQCD
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x67 0x00
9C 9C 00 05 39 23 00 9C 9C 00 01 00 C7 00 C0
value = 0001h + 00C7h / 1000 = 1.199
(4) Read VR Current
- CUR_VR0V9A
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x6e 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 64 00 C0
value = 0001h + 0064h / 1000 = 0.1
- CUR_VR0V8A
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x6f 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 C8 00 C0
value = 0000h + 00C8h / 1000 = 0.2
- CUR_VR0V8D
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x70 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 2C 01 C0
value = 0000h + 012Ch / 1000 = 0.3
- CUR_VRVDDQAB
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x71 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 9C FF C0
value = 0000h + FF9Ch / 1000 = 0.2
- CUR_VRVDDQCD
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x72 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 0C FE C0
value = 0000h + F0CCh / 1000
(5) Read VR Power
- PWR_VR0V9A
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x75 0x00
9C 9C 00 05 39 23 00 9C 9C 00 FF FF 00 00 C0
value = FFFFh + 0000h / 1000
- PWR_VR0V8A
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x76 0x00
9C 9C 00 05 39 23 00 9C 9C 00 FF FF 00 00 C0
value = FFFFh + 0000h / 1000
- PWR_VR0V8D
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x77 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 00 00 C0
value = 0000h + 0000h / 1000 = 0
- PWR_VRVDDQAB
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x78 0x00
9C 9C 00 05 39 23 00 9C 9C 00 FF FF 00 00 C0
value = FFFFh + 0000h / 1000
- PWR_VRVDDQCD
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x79 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 00 00 C0
value = 0000h + 0000h / 1000 = 0
Contributor
|
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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:
Test plan:
Log:
(1) Check CL BIC can build pass.
openbic$ west build -p auto -b ast1030_evb meta-facebook/yv35-cl
-- west build: generating a build system
...
[277/277] Linking C executable zephyr/Y35BCL.elf
Memory region Used Size Region Size %age Used
SRAM_NC: 152 KB 320 KB 47.50%
FLASH: 0 GB 0 GB
SRAM: 451784 B 448 KB 98.48%
IDT_LIST: 0 GB 2 KB 0.00%
302356+0 records in
302356+0 records out
302356 bytes (302 kB, 295 KiB) copied, 0.911821 s, 332 kB/s
0+0 records in
0+0 records out
0 bytes copied, 4.6057e-05 s, 0.0 kB/s
(2) Check BB BIC can build pass.
openbic$ west build -p auto -b ast1030_evb meta-facebook/yv35-bb
-- west build: generating a build system
...
[271/271] Linking C executable zephyr/Y35BBB.elf
Memory region Used Size Region Size %age Used
SRAM_NC: 12 KB 320 KB 3.75%
FLASH: 0 GB 0 GB
SRAM: 401312 B 448 KB 87.48%
IDT_LIST: 0 GB 2 KB 0.00%
277944+0 records in
277944+0 records out
277944 bytes (278 kB, 271 KiB) copied, 0.62199 s, 447 kB/s
0+0 records in
0+0 records out
0 bytes copied, 4.3264e-05 s, 0.0 kB/s
(3) Check RF BIC can build pass.
openbic$ west build -p auto -b ast1030_evb meta-facebook/yv35-rf
-- west build: generating a build syste
...
[247/247] Linking C executable zephyr/Y35BRF.elf
Memory region Used Size Region Size %age Used
SRAM_NC: 12 KB 320 KB 3.75%
FLASH: 0 GB 0 GB
SRAM: 344480 B 448 KB 75.09%
IDT_LIST: 0 GB 2 KB 0.00%
249012+0 records in
249012+0 records out
249012 bytes (249 kB, 243 KiB) copied, 0.763853 s, 326 kB/s
0+0 records in
0+0 records out
0 bytes copied, 4.4834e-05 s, 0.0 kB/s
(1) Read INA233 sensor
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5d 0x00
9C 9C 00 05 39 23 00 9C 9C 00 0C 00 26 02 C0
value = 000Ch + 0226h / 1000 = 12.55
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5e 0x00
9C 9C 00 05 39 23 00 9C 9C 00 03 00 42 01 C0
value = 0003h + 0142h / 1000 = 3.322
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x6c 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 F2 00 C0
value = 0000h + 00F2h / 1000 = 0.242
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x6d 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 A0 00 C0
value = 0000h + 00A0h / 1000 = 0.160
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x73 0x00
9C 9C 00 05 39 23 00 9C 9C 00 03 00 7D 00 C0
value = 0003h + 0007Dh / 1000 = 3.125
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x74 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 0D 02 C0
value = 0000h + 020Dh / 1000 = 0.525
(2) Read VR temperature
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x58 0x00
9C 9C 00 05 39 23 00 9C 9C 00 26 00 00 00 C0
value = 0026h + 0000h / 1000 = 38.0
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x59 0x00
9C 9C 00 05 39 23 00 9C 9C 00 23 00 00 00 C0
value = 0023h + 0000h / 1000 = 35.0
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5a 0x00
9C 9C 00 05 39 23 00 9C 9C 00 1E 00 00 00 C0
value = 001Eh + 0000h / 1000 = 30.0
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5b 0x00
9C 9C 00 05 39 23 00 9C 9C 00 23 00 00 00 C0
value = 0023h + 0000h / 1000 = 35.0
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x5c 0x00
9C 9C 00 05 39 23 00 9C 9C 00 25 00 00 00 C0
value = 0025h + 0000h / 1000 = 37.0
(3) Read VR Voltage
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x62 0x00
9C 9C 00 05 39 23 00 9C 9C 00 01 00 45 00 C0
value = 0001h + 0045h / 1000 = 1.069
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x64 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 33 03 C0
value = 0000h + 0333h / 1000 = 0.819
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x65 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 32 03 C0
value = 0001h + 0332h/ 1000 = 0.818
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x66 0x00
9C 9C 00 05 39 23 00 9C 9C 00 01 00 C8 00 C0
value = 0001h + 00C8h / 1000 = 1.2
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x67 0x00
9C 9C 00 05 39 23 00 9C 9C 00 01 00 C7 00 C0
value = 0001h + 00C7h / 1000 = 1.199
(4) Read VR Current
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x6e 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 64 00 C0
value = 0001h + 0064h / 1000 = 0.1
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x6f 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 C8 00 C0
value = 0000h + 00C8h / 1000 = 0.2
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x70 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 2C 01 C0
value = 0000h + 012Ch / 1000 = 0.3
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x71 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 9C FF C0
value = 0000h + FF9Ch / 1000 = 0.2
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x72 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 0C FE C0
value = 0000h + F0CCh / 1000
(5) Read VR Power
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x75 0x00
9C 9C 00 05 39 23 00 9C 9C 00 FF FF 00 00 C0
value = FFFFh + 0000h / 1000
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x76 0x00
9C 9C 00 05 39 23 00 9C 9C 00 FF FF 00 00 C0
value = FFFFh + 0000h / 1000
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x77 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 00 00 C0
value = 0000h + 0000h / 1000 = 0
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x78 0x00
9C 9C 00 05 39 23 00 9C 9C 00 FF FF 00 00 C0
value = FFFFh + 0000h / 1000
root@bmc-oob:~# bic-util slot2 0xE0 0x02 0x9C 0x9C 0x00 0x05 0xE0 0x23 0x9C 0x9C 0x00 0x79 0x00
9C 9C 00 05 39 23 00 9C 9C 00 00 00 00 00 C0
value = 0000h + 0000h / 1000 = 0