Date
1 - 1 of 1
How to Enable I2c configuration in edk2
gordontcp@...
Hi all,
I use the \MdeModulePkg\Bus\I2c\I2cDxe driver and load the driver with the following command:
load I2cDxe.efi
As a result, both I2cHostDriverSupported and I2cBusDriverSupported get the returned value Unsupported. The code is as follows:
I2cHostDriverSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
...
Status = gBS->OpenProtocol (
Controller,
&gEfiI2cBusConfigurationManagementProtocolGuid,
(VOID **)&I2cBusConfigurationManagement,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
...
I2cBusDriverSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
..
Status = gBS->OpenProtocol (
Controller,
&gEfiI2cEnumerateProtocolGuid,
(VOID**)&I2cEnumerate,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
My system is as follows:
Platform: Minnowboard Max
pkg : edk2-platform\ Vlv2TbltDevicePkgX64
My questions are as follows:
1.Before I2cHostDriverSupported, should I need to enable the host configuratoin, such as setting slave address or frequency? Is there a more complete example?
2.For the Minnowboard platform, how to set I2cHostDriverSupported and I2cBusDriverSupported to get the return value of EFI_SUCCESS?
Any suggestion is highly appreciated!
I use the \MdeModulePkg\Bus\I2c\I2cDxe driver and load the driver with the following command:
load I2cDxe.efi
As a result, both I2cHostDriverSupported and I2cBusDriverSupported get the returned value Unsupported. The code is as follows:
I2cHostDriverSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
...
Status = gBS->OpenProtocol (
Controller,
&gEfiI2cBusConfigurationManagementProtocolGuid,
(VOID **)&I2cBusConfigurationManagement,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
...
I2cBusDriverSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
..
Status = gBS->OpenProtocol (
Controller,
&gEfiI2cEnumerateProtocolGuid,
(VOID**)&I2cEnumerate,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
My system is as follows:
Platform: Minnowboard Max
pkg : edk2-platform\ Vlv2TbltDevicePkgX64
My questions are as follows:
1.Before I2cHostDriverSupported, should I need to enable the host configuratoin, such as setting slave address or frequency? Is there a more complete example?
2.For the Minnowboard platform, how to set I2cHostDriverSupported and I2cBusDriverSupported to get the return value of EFI_SUCCESS?
Any suggestion is highly appreciated!