| // This is a experimental proto for BMC deterministic BMC code development |
| // Original proto is located at |
| // google3/experimental/users/anuraagb/i2c_experiment/i2c_bus.proto |
| edition = "2023"; |
| |
| package fru_i2c; |
| |
| option java_multiple_files = true; |
| option java_outer_classname = "FruI2C"; |
| |
| // An I2C address is a combination of an address and an address length. |
| message I2CAddress { |
| uint32 address = 1; |
| enum AddressLength { |
| ADDRESS_LENGTH_UNSPECIFIED = 0; |
| // 7 bit addressing. |
| ADDRESS_LENGTH_BIT7 = 1; |
| // 10 bit addressing. |
| ADDRESS_LENGTH_BIT10 = 2; |
| } |
| AddressLength address_length = 2; |
| } |
| |
| message Bus { |
| // The bus ID represents the bus number. For root buses, this is the kernel |
| // bus number. For downstream buses, this is the bus number relative to the |
| // mux. |
| uint32 bus_id = 1; |
| repeated Mux muxes = 2; |
| repeated Eeprom eeproms = 3; |
| repeated GpioController gpio_controllers = 4; |
| repeated SensorComponent sensor_components = 5; |
| } |
| |
| message Eeprom { |
| // The model of the eeprom from |
| string model = 1; |
| // The node-local barepath of the eeprom resides on in alignment with |
| // go/ecclesia-devpath. |
| string barepath = 2; |
| // The fixed address of the eeprom relative to the bus. |
| I2CAddress address_identifier = 3; |
| // Addressing mode of the eeprom. |
| enum AddressingMode { |
| ADDRESSING_MODE_UNSPECIFIED = 0; |
| // 8-bit addressing mode. (Reversed to be compliant with enum naming) |
| ADDRESSING_MODE_BIT8 = 1; |
| // 16-bit addressing mode. (Reversed to be compliant with enum naming) |
| ADDRESSING_MODE_BIT16 = 2; |
| } |
| AddressingMode addressing_mode = 4; |
| |
| // Size of the eeprom in bytes. |
| uint32 size_bytes = 5; |
| |
| message PartInformation { |
| string manufacturer = 1; |
| string part_number = 2; |
| string serial_number = 3; |
| } |
| PartInformation part_information = 6; |
| // (tentative workaround for chassis rendering)This is introduced to support |
| // the Probe:"FOUND('$some_board')" case in current EM probing logic only: |
| // when the upstream board present, the downstream board has to be present |
| // too. |
| // The value will be the barepath.. |
| repeated string sub_boards = 7; |
| } |
| |
| // A GPIO controller is a physical device that controls GPIOs. This is a |
| // controller that is connected to an I2C port. |
| message GpioController { |
| // Unique identifier for the gpio within the bus topology. |
| string name = 1; |
| // The node-local barepath of the gpio resides on in alignment with |
| // go/ecclesia-devpath. |
| string barepath = 2; |
| // The fixed address of the gpio relative to the bus. |
| I2CAddress address_identifier = 3; |
| } |
| |
| // A mux is a physical device that multiplexes multiple I2C buses from a single |
| // I2C bus. |
| message Mux { |
| // Unique identifier for the mux within the bus topology. |
| string switch_id = 1; |
| // The model of the mux. |
| string model = 2; |
| // The node-local barepath of the mux resides on in alignment with |
| // go/ecclesia-devpath. |
| string barepath = 3; |
| // The fixed address of the mux relative to the bus. |
| I2CAddress address_identifier = 4; |
| // The downstream buses that are connected to the mux. |
| repeated Bus downstream_buses = 5; |
| } |
| |
| // A sensor component is the physical device that is connected to an I2C port. |
| message SensorComponent { |
| // Unique identifier for the sensor within the bus topology. |
| string model = 1; |
| // The node-local barepath of the sensor resides on in alignment with |
| // go/ecclesia-devpath. |
| string barepath = 2; |
| // The fixed address of the sensor relative to the bus. |
| I2CAddress address_identifier = 3; |
| } |
| |
| message I2cRoot { |
| string name = 1; |
| repeated Bus buses = 2; |
| // Chip SoC Model |
| string chip_model = 3; |
| } |