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::243; helo=mail-lj1-x243.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (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 B982D2194D3AE for ; Wed, 9 Jan 2019 17:44:59 -0800 (PST) Received: by mail-lj1-x243.google.com with SMTP id s5-v6so8196859ljd.12 for ; Wed, 09 Jan 2019 17:44:59 -0800 (PST) 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=FR//6r7EkysaI916qMy2E0BlWpKOiy6IhbUbNSNGoCo=; b=I7L65NJrHRB6yzvN2vsZoshDOQCjHUidu/509G4AB7aVYvPa39q9gBQObSSdV9Y1mK rKebwZ57f8YA2A+0ugXdxrwBU45iaNhsGcbeZbzkzr1ivG4TKSiBMVLC3VbomTjOSATp rn3A3rK6xkaj9eD8af3upnWtran4NdKWHVBQVD12/uTvyJM/k8OKdjkEOpNujAN0bDLM 5c0XW2pEsZg1nk7o5JNw0UwrdKcCqueFgSHQH80dT1UTFGzNR6r7H0NN3KJMxBBwCtXs FnDtrncBUoX2Zy8WTzAwe6TruoGNLIOr4wzEu8BUK8D4/opNUhJmOzTsRsD87Zg8W6Bj cxgg== 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=FR//6r7EkysaI916qMy2E0BlWpKOiy6IhbUbNSNGoCo=; b=oqbSfw2jUHXrxhCB7EF/F/AKtbTOFNW7Ze+iRIlPjuu6ZYrvkyAkgTB+SmwQOXa798 hFJmvzvAa/qY1UoQ17a5CS/7Rr3DJgRkCF0qG/k13Z7Iaeq+MOjAFqPX4/NlAldvEAeh F56oyrOAGFelhpAsoEnVDO/TQGLi3bRKdY8cZ19gQczHuZHiia+PTlOQQFvGi8L+5GDV zOWrh2WQ/6JcasmYa8NyY4ovsv6RXNd3JczUqrt0wdakxEhd4fmu/fBY+Mawgj7JIfsY wwPEvDUmbo/D2NE/LEIvx7H7a7eHhJAWdjwq6hEPnOvjvwkphq1YmEEq2pk+l6wfkTde ZU4g== X-Gm-Message-State: AJcUukeemfbhpywtGc6rKnKEUT9MnXa6ueVp4W1hPuPPfSCHy3oXJ7cg l7D+OH8Iu4CYNmRK3wziAXkQnv9NXGg= X-Google-Smtp-Source: ALg8bN7t2X7bsnXqlgDNY4TqPBaS7+fSVRjM1KeoWnH7RsVrhoEUNfYsCbCIHLg3sm8svIACMdL7cA== X-Received: by 2002:a2e:145a:: with SMTP id 26-v6mr4625655lju.116.1547084697742; Wed, 09 Jan 2019 17:44:57 -0800 (PST) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id l21-v6sm15034142ljj.48.2019.01.09.17.44.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Jan 2019 17:44:56 -0800 (PST) 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: Thu, 10 Jan 2019 02:44:29 +0100 Message-Id: <1547084679-29597-3-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547084679-29597-1-git-send-email-mw@semihalf.com> References: <1547084679-29597-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH v2 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: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:00 -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 3fe2988..6ec5ace 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_GPIO_EXPANDER; + +typedef struct { + GPIO_CONTROLLER *SoCGpio; + UINTN GpioDeviceCount; + MV_GPIO_EXPANDER *GpioExpanders; + UINTN GpioExpanderCount; +} MV_BOARD_GPIO_DESCRIPTION; + +EFI_STATUS +EFIAPI +ArmadaBoardGpioExpanderGet ( + IN OUT MV_GPIO_EXPANDER **GpioExpanders, + IN OUT UINTN *GpioExpanderCount + ); + +// // I2C devices per-board description // typedef struct { -- 2.7.4