OpenBIC
OpenSource Bridge-IC
plat_isr.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
17#include <kernel.h>
18#include "ioexp_tca9555.h"
19#include "plat_i2c.h"
20
21#ifndef PLAT_ISR_H
22#define PLAT_ISR_H
23
24#define ADDR_IOE1 (0x40 >> 1)
25#define ADDR_IOE2 (0x42 >> 1)
26#define ADDR_IOE3 (0x44 >> 1)
27#define ADDR_IOE4 (0x46 >> 1)
28
29#define CLK_BUFFER_ADDR 0x6B
30#define CLK_BUFFER_BUS I2C_BUS6
31#define PLL_OPERATING_OFFSET 0x00
32
33#define E1S_PRESENT_BIT BIT(2)
34#define ASIC_CLK_BIT BIT(4)
35#define E1S_CLK_BIT BIT(5)
36#define E1S_PE_RESET_BIT BIT(6)
37#define CXL_LED_BIT BIT(2)
38// Only switch VR MUX
39#define IOE_SWITCH_MUX_TO_BIC 0x05
40#define IOE_SWITCH_CXL1_VR_TO_BIC 0x01
41#define IOE_SWITCH_CXL2_VR_TO_BIC 0x04
42
43#define IOE_READY_MSEC 1000
44
45#define SET_CLK_BUF_DELAY_MS 100
46
50};
51
52typedef struct {
53 uint8_t addr;
54 uint8_t conf_reg;
55 uint8_t conf_dir;
56 uint8_t output_reg;
57 uint8_t output_val;
58} IOE_CFG;
59
61void ISR_MB_PCIE_RST();
65void ISR_SET_CXL_LED();
66
67#endif
Definition: plat_isr.h:52
uint8_t output_val
Definition: plat_isr.h:57
uint8_t output_reg
Definition: plat_isr.h:56
uint8_t conf_dir
Definition: plat_isr.h:55
uint8_t addr
Definition: plat_isr.h:53
uint8_t conf_reg
Definition: plat_isr.h:54
void ISR_MB_PCIE_RST()
Definition: plat_isr.c:28
void ISR_P3V3_E1S_PWR_CHANGE()
Definition: plat_isr.c:160
void ISR_P12V_E1S_PWR_CHANGE()
Definition: plat_isr.c:172
set_ioe4_cmd
Definition: plat_isr.h:47
@ SET_CLK
Definition: plat_isr.h:48
@ SET_PE_RST
Definition: plat_isr.h:49
void ISR_CXL_PG_ON()
void ISR_SET_CXL_LED()
Definition: plat_isr.c:179
void ISR_MB_DC_STAGUS_CHAGNE()
Definition: plat_isr.c:123