Skip to content

Commit

Permalink
feat(TegraGpio): Add GPIO AON for T194
Browse files Browse the repository at this point in the history
Internal note: Received via github:
#45

Change-Id: Ia2fc12f02e55c24cc80f134e9688b078a67d393f
Signed-off-by: Alexander Voronov <avv.0@ya.ru>
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/bootloader/uefi/edk2-nvidia/+/2896656
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
  • Loading branch information
crvux authored and mobile promotions committed May 3, 2023
1 parent 69daf82 commit b3d26f3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Silicon/NVIDIA/Drivers/TegraGpio/TegraGpioDxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ STATIC CONST GPIO_CONTROLLER Tegra194GpioControllers[] = {
TEGRA_GPIO_ENTRY (27, 0, 0, 2)
};

STATIC CONST GPIO_CONTROLLER Tegra194GpioAonControllers[] = {
TEGRA_GPIO_ENTRY (0, 0, 3, 8),
TEGRA_GPIO_ENTRY (1, 0, 4, 4),
TEGRA_GPIO_ENTRY (2, 0, 1, 8),
TEGRA_GPIO_ENTRY (3, 0, 2, 3),
TEGRA_GPIO_ENTRY (4, 0, 0, 7)
};

STATIC CONST GPIO_CONTROLLER Tegra234GpioControllers[] = {
TEGRA_GPIO_ENTRY (0, 0, 0, 8),
TEGRA_GPIO_ENTRY (1, 0, 3, 1),
Expand Down Expand Up @@ -137,6 +145,7 @@ STATIC CONST GPIO_CONTROLLER Th500GpioAonControllers[] = {

NVIDIA_COMPATIBILITY_MAPPING gDeviceCompatibilityMap[] = {
{ "nvidia,tegra194-gpio", &gNVIDIANonDiscoverableT194GpioDeviceGuid },
{ "nvidia,tegra194-gpio-aon", &gNVIDIANonDiscoverableT194GpioAonDeviceGuid },
{ "nvidia,tegra234-gpio", &gNVIDIANonDiscoverableT234GpioDeviceGuid },
{ "nvidia,tegra234-gpio-aon", &gNVIDIANonDiscoverableT234GpioAonDeviceGuid },
{ "nvidia,tegra23x-gpio", &gNVIDIANonDiscoverableT23xGpioDeviceGuid },
Expand Down Expand Up @@ -532,6 +541,9 @@ DeviceDiscoveryNotify (
if (CompareGuid (Device->Type, &gNVIDIANonDiscoverableT194GpioDeviceGuid)) {
mControllerArray[mControllerCount].ControllerCount = ARRAY_SIZE (Tegra194GpioControllers);
mControllerArray[mControllerCount].ControllerDefault = Tegra194GpioControllers;
} else if (CompareGuid (Device->Type, &gNVIDIANonDiscoverableT194GpioAonDeviceGuid)) {
mControllerArray[mControllerCount].ControllerCount = ARRAY_SIZE (Tegra194GpioAonControllers);
mControllerArray[mControllerCount].ControllerDefault = Tegra194GpioAonControllers;
} else if (CompareGuid (Device->Type, &gNVIDIANonDiscoverableT234GpioDeviceGuid)) {
mControllerArray[mControllerCount].ControllerCount = ARRAY_SIZE (Tegra234GpioControllers);
mControllerArray[mControllerCount].ControllerDefault = Tegra234GpioControllers;
Expand Down
1 change: 1 addition & 0 deletions Silicon/NVIDIA/Drivers/TegraGpio/TegraGpioDxe.inf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

[Guids]
gNVIDIANonDiscoverableT194GpioDeviceGuid
gNVIDIANonDiscoverableT194GpioAonDeviceGuid
gNVIDIANonDiscoverableT234GpioDeviceGuid
gNVIDIANonDiscoverableT234GpioAonDeviceGuid
gNVIDIANonDiscoverableT23xGpioDeviceGuid
Expand Down
1 change: 1 addition & 0 deletions Silicon/NVIDIA/NVIDIA.dec
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#GPIO devices
gNVIDIANonDiscoverableT194GpioDeviceGuid = { 0x294a3144, 0x5e39, 0x4088, { 0xbd, 0x40, 0x8e, 0x49, 0xe0, 0x9e, 0x9c, 0x3d } }
gNVIDIANonDiscoverableT194GpioAonDeviceGuid = { 0x05da980e, 0x7855, 0x4275, { 0xb5, 0x31, 0x27, 0xdd, 0x4f, 0x41, 0xe9, 0xc7 } }
gNVIDIANonDiscoverableT234GpioDeviceGuid = { 0x1d0e1fbb, 0x708b, 0x4539, { 0x89, 0xe5, 0xa3, 0x4a, 0xea, 0xe6, 0xed, 0xfd } }
gNVIDIANonDiscoverableT234GpioAonDeviceGuid = { 0x4a23a729, 0x3534, 0x45f6, { 0x91, 0xc5, 0x1a, 0xe2, 0xbd, 0x44, 0xeb, 0x44 } }
gNVIDIANonDiscoverableT23xGpioDeviceGuid = { 0xf0e65003, 0x57ad, 0x4610, { 0xae, 0xf7, 0x9f, 0x85, 0x52, 0x2a, 0xa2, 0xae } }
Expand Down

0 comments on commit b3d26f3

Please sign in to comment.