OpenBIC
OpenSource Bridge-IC
plat_led.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef _PLAT_LED_h
17#define _PLAT_LED_h
18
19#define LED_IO_EXPANDER_BUS I2C_BUS5
20#define LED_IO_EXPANDER_ADDR (0xEE >> 1)
21#define LED_IO_EXPANDER_OUTPUT_PORT0_REG 0x02
22#define LED_IO_EXPANDER_OUTPUT_PORT1_REG 0x03
23#define LED_IO_EXPANDER_CONFIG_PORT0_REG 0x06
24#define LED_IO_EXPANDER_CONFIG_PORT1_REG 0x07
25
26#define LED_IO_EXPANDER_FAULT_BIT 6
27#define LED_IO_EXPANDER_PWR_BIT 7
28
29#define E1S_LED_IO_EXPANDER_BUS I2C_BUS6
30#define E1S_LED_IO_EXPANDER_ADDR (0xEC >> 1)
31
37};
38
43};
44
49};
50
51bool pwr_led_control(uint8_t src, uint8_t status);
52bool fault_led_control(uint8_t src, uint8_t status);
54void pwr_led_check();
55uint8_t get_sys_led_status(uint8_t type);
56bool e1s_led_control(uint8_t effector_id, uint8_t status);
57uint8_t get_ssd_led_status(uint8_t effector_id);
59#endif /* _PLAT_LED_h */
bool fault_led_control(void)
Definition: plat_led.c:178
bool pwr_led_control(uint8_t src, uint8_t status)
Definition: plat_led.c:101
uint8_t get_sys_led_status(uint8_t type)
Definition: plat_led.c:150
bool e1s_led_control(uint8_t effector_id, uint8_t status)
Definition: plat_led.c:181
sys_led_ctrl_status
Definition: plat_led.h:32
@ LED_CTRL_MAX
Definition: plat_led.h:35
@ LED_CTRL_ON
Definition: plat_led.h:34
@ LED_STATUS_ERROR
Definition: plat_led.h:36
@ LED_CTRL_OFF
Definition: plat_led.h:33
sys_led_type
Definition: plat_led.h:45
@ SYS_FAULT_LED
Definition: plat_led.h:47
@ SYS_POWER_LED
Definition: plat_led.h:46
@ SYS_LED_TYPE_MAX
Definition: plat_led.h:48
void sys_led_init_and_check()
Definition: plat_led.c:252
sys_led_ctrl_source
Definition: plat_led.h:39
@ LED_CTRL_SRC_BMC
Definition: plat_led.h:41
@ LED_CTRL_SRC_MAX
Definition: plat_led.h:42
@ LED_CTRL_SRC_BIC
Definition: plat_led.h:40
uint8_t get_ssd_led_status(uint8_t effector_id)
Definition: plat_led.c:225
void light_fault_led_check()
Definition: plat_led.c:127
void pwr_led_check()
Definition: plat_led.c:144
uint8_t status
Definition: mctp_ctrl.h:1
uint8_t type
Definition: pldm_base.h:0