Skip to content

fby35: cl: Fixed GPIO direction and status control#17

Closed
GoldenBug wants to merge 1 commit into
gh/goldenbug/7/basefrom
gh/goldenbug/7/head
Closed

fby35: cl: Fixed GPIO direction and status control#17
GoldenBug wants to merge 1 commit into
gh/goldenbug/7/basefrom
gh/goldenbug/7/head

Conversation

@GoldenBug

Copy link
Copy Markdown
Contributor

Stack from ghstack:

  • (to be filled)

Summary:

  • Checked all GPIO setting to input and not able to control output status
  • According to chip vendor suggestion, should set gpio direction to input instead of gpio direction output and status high.

Fix:

  • Fixed gpio config setting arvg, avoiding setting missing.
  • Modified open drain GPIO status controlling. Setting GPIO direction to input as GPIO setting status high. Setting GPIO direction to output and status high as GPIO setting status low.
  • Only set push pull GPIO direction during GPIO status initial. Open drain GPIO direction will be set during GPIO status initial.

Test plan:
-Build code: Pass
-GPIO control: Pass

Log:
Tested open drain and push pull GPIO control through IPMI command
root@bmc-oob:# bic-util slot2 --get_gpio | grep HSC_SET
7 HSC_SET_EN_R: 0
root@bmc-oob:
# bic-util slot2 --set_gpio 7 1
slot 2: setting [7]HSC_SET_EN_R to 1
root@bmc-oob:# bic-util slot2 --get_gpio | grep HSC_SET
7 HSC_SET_EN_R: 1
root@bmc-oob:
# bic-util slot2 --set_gpio 7 0
slot 2: setting [7]HSC_SET_EN_R to 0
root@bmc-oob:# bic-util slot2 --get_gpio | grep HSC_SET
7 HSC_SET_EN_R: 0
root@bmc-oob:
# bic-util slot2 --set_gpio 9 0
slot 2: setting [9]RST_USB_HUB_N_R to 0
root@bmc-oob:# bic-util slot2 --get_gpio | grep USB
9 RST_USB_HUB_N_R: 0
root@bmc-oob:
# bic-util slot2 --set_gpio 9 1
slot 2: setting [9]RST_USB_HUB_N_R to 1
root@bmc-oob:~# bic-util slot2 --get_gpio | grep USB
9 RST_USB_HUB_N_R: 1

Summary:
- Checked all GPIO setting to input and not able to control output status
- According to chip vendor suggestion, should set gpio direction to input instead of gpio direction output and status high.

Fix:
- Fixed gpio config setting arvg, avoiding setting missing.
- Modified open drain GPIO status controlling. Setting GPIO direction to input as GPIO setting status high. Setting GPIO direction to output and status high as GPIO setting status low.
- Only set push pull GPIO direction during GPIO status initial. Open drain GPIO direction will be set during GPIO status initial.

Test plan:
-Build code: Pass
-GPIO control: Pass

Log:
Tested open drain and push pull GPIO control through IPMI command
root@bmc-oob:~# bic-util slot2 --get_gpio | grep HSC_SET
7 HSC_SET_EN_R: 0
root@bmc-oob:~# bic-util slot2 --set_gpio 7 1
slot 2: setting [7]HSC_SET_EN_R to 1
root@bmc-oob:~# bic-util slot2 --get_gpio | grep HSC_SET
7 HSC_SET_EN_R: 1
root@bmc-oob:~# bic-util slot2 --set_gpio 7 0
slot 2: setting [7]HSC_SET_EN_R to 0
root@bmc-oob:~# bic-util slot2 --get_gpio | grep HSC_SET
7 HSC_SET_EN_R: 0
root@bmc-oob:~# bic-util slot2 --set_gpio 9 0
slot 2: setting [9]RST_USB_HUB_N_R to 0
root@bmc-oob:~# bic-util slot2 --get_gpio | grep USB
9 RST_USB_HUB_N_R: 0
root@bmc-oob:~# bic-util slot2 --set_gpio 9 1
slot 2: setting [9]RST_USB_HUB_N_R to 1
root@bmc-oob:~# bic-util slot2 --get_gpio | grep USB
9 RST_USB_HUB_N_R: 1

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 21, 2021
@GoldenBug GoldenBug closed this Oct 21, 2021
@GoldenBug GoldenBug deleted the gh/goldenbug/7/head branch October 21, 2021 09:26
Scron-Chang pushed a commit to Scron-Chang/OpenBIC that referenced this pull request Jun 14, 2022
…Sensor

modify the sensor name of SDR table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

2 participants