From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4864:20::143; helo=mail-lf1-x143.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 54C5F21164F17 for ; Fri, 19 Oct 2018 18:58:08 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id c24-v6so85087lfi.12 for ; Fri, 19 Oct 2018 18:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aJxlV1rhJZ7ffflnWyGT3v6r4RKIjAevI/cjQzam+Vk=; b=ezi2mzK60UQzVcVUjKblZnnCq/yqLyWmc7GwPEtpyicpsG0hvCGUH1hh7OLfIKCopi s1hS/Pmg5gutvltD0K1F8D0FOqKrkvq5KdouC3U002ATMX6EuE5Vh25b13cGwvGwD91h 3AKF0AjX0aMgffg7slvc3HxCN5ujDT0/kTWCfOYoTiJoC1ZrhGx9JMkbL6WC3yHOQFFu eA62bLJh5oZzAlMDLIQ0b14YvTVdvymyzhlF3bFdDXTyej5LF9Uodn4A122kMdUomi1P +QFp1y2mJoj7sgXW0ak26LgrRVTMT4qijLCMNnqdxmPvD+e+bfe5vTh/fJB3LYuPJNDr mDUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aJxlV1rhJZ7ffflnWyGT3v6r4RKIjAevI/cjQzam+Vk=; b=jcq6Qh2ZY3uqj0iKgVxJHAz7S/YaZu6rJZ07MpO73uhFc7L6jAnChCSi9M7JF++fRl AYlP1c5LW88D7+afQ4Z6PNvKjc/24x6nlpSjhDWa8cvL9uFFpCAiOq2L6v0T+fLcsUNG yVaLw2hzZlHfdRfSoeoWJvZ9gP+LWaRSLX1VTVDNDZMbnNWDNLCqvKJHVPX8YFggCfS7 ZPdE3+/fdggKNu5P7YxvZQCP/DM2sD5R21/LPpLcy8UaymmfeBtLjBKIEqnJMIJasdO4 zk/PQ9TCehqCR0OZ+RuXFwgZUPJn6rLPCezaJWd2wCuqw0XtxiDuCV4MbT+PhcVaJxHw wQ4w== X-Gm-Message-State: ABuFfoiZYRB/j5tempaPq+zzsvsaYTFuFO4J8L/UV3IHWu+/FPthYvzV G3yYfBsE/L/4qIXUB0uqMXVT+RWhm0U= X-Google-Smtp-Source: ACcGV60K66mbTeGSxmeD0mxeXv7nKCz52nmAxT4qlrv8dtpPAJS4AgzgiJS3GZY4fTu3YcULVSH05g== X-Received: by 2002:a19:53d9:: with SMTP id h86-v6mr4478242lfl.75.1540000686251; Fri, 19 Oct 2018 18:58:06 -0700 (PDT) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id p63-v6sm5562777lfg.46.2018.10.19.18.58.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Oct 2018 18:58:05 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com, kostap@marvell.com Date: Sat, 20 Oct 2018 03:57:31 +0200 Message-Id: <1540000661-1956-3-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540000661-1956-1-git-send-email-mw@semihalf.com> References: <1540000661-1956-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH 02/12] Marvell/Library: ArmadaBoardDescLib: Add GPIO information X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2018 01:58:08 -0000 This patch extends library with GPIO devices per-board description. Both embedded SoC controllers and I2C IO expanders are supported. Add a helper routine for obtaining information about the latter. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h index ee8e06e..109164c 100644 --- a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h +++ b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h @@ -25,6 +25,29 @@ typedef struct { } MV_BOARD_COMPHY_DESC; // +// GPIO devices per-board description +// +typedef struct { + UINTN ChipId; + UINTN I2cAddress; + UINTN I2cBus; +} MV_I2C_IO_EXPANDER_DESC; + +typedef struct { + MV_SOC_GPIO_DESC *SoC; + UINTN GpioDevCount; + MV_I2C_IO_EXPANDER_DESC *I2cIoExpanderDesc; + UINTN I2cIoExpanderCount; +} MV_BOARD_GPIO_DESC; + +EFI_STATUS +EFIAPI +ArmadaBoardDescGpioGet ( + IN OUT MV_I2C_IO_EXPANDER_DESC **I2cIoExpanderDesc, + IN OUT UINTN *I2cIoExpanderCount + ); + +// // I2C devices per-board description // typedef struct { -- 2.7.4