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::133; helo=mail-lf1-x133.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 2E51F2194D3AE for ; Wed, 9 Jan 2019 17:45:03 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id y11so7135572lfj.4 for ; Wed, 09 Jan 2019 17:45:02 -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=/F0Uy7rwcyTVgDhROsWJNrG0IP5VsYcAxyp3q7apdGQ=; b=uON9xdlsr87+uZGoaj6n/g9+8q3yN2J+4T/VLWBBR3nS0DuHsbGPjL/ZVIMh0OzGZV ZcczBX6iRhJL/CbTkmjfAH6t+wUKlPSJPAphq1loBOFRdBzrrRKk3s6PBNqi4M1J+6jF v2Shn3IVph4l5ZXiPJEMM/WPu0pJKbbz5gK2klW2uA1aDpz8+Bjq9ZLf/zC3Sli+PzGk jQblnE97tuBtjavgLdMDjbFNUYsIPnDglLQ7gMKkLknSJ6ccFFzEzdxhGYtePiv2HwMT tiG0azJPMYmmCCTjfr7TEUzqRw/qxDW8J89JHaBT0Rxw7c3IACNVNmq11AmjYFqV+O24 c4+w== 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=/F0Uy7rwcyTVgDhROsWJNrG0IP5VsYcAxyp3q7apdGQ=; b=uJ5gg1bRQOjBFS8FeqDUrEv+yu7xxel8ow+TOIbXni/+2Twp3orx7RcOBNDaGTyHVM 5KCEO93ggv88UgJ7+UtzyuhF6icSSnqTvJ89Mb/TZPlh8kk5TmDXCPYv97XjpaZz/pBW cDQ3XcFTArjEnyAPCjr9wtW5M9a/DXiqrPmK28nk14fy2RCZ4B7Mcwdi/zcQfaZIjE26 jsoMJ8E79psc+LEXqlUfLiptX6oEw5pWIE5iTyk78dU/ffVnwzyUKZwH09rx5sLVGmO6 j9S5wYj1HAMbOhUwNLtodATO7yV1R5GyFvvFWeD2BrSGNbJxl+IuePwwW5w09jxbs6UL fiDg== X-Gm-Message-State: AJcUukenEq6V8qrExdZ/1ihxWY2uKrElVTDXrrQrW1BVTxv3PiDs6w0C fiv52ZfBUWzscLSzxr/rIhSiN9tZpxw= X-Google-Smtp-Source: ALg8bN4hWEUbiVZ49ph1sny82wQgaUa7tUk/79HLevjbvX2b1pMs6SxPxcIAGWxuZ7L7LEOr5c7I5g== X-Received: by 2002:a19:739d:: with SMTP id h29mr4981990lfk.85.1547084700378; Wed, 09 Jan 2019 17:45:00 -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.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Jan 2019 17:44:59 -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:31 +0100 Message-Id: <1547084679-29597-5-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 04/12] Marvell/Armada70x0Db: Extend board description library with GPIO 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:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 X-List-Received-Date: Thu, 10 Jan 2019 01:45:03 -0000 This patch implements ArmadaBoarDescLib library for Armada70x0Db comunity board and introduces ArmadaBoardGpioGet routine with per-board GPIO expander description. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf | 1 + Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c | 25 ++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf index b26f55b..c995515 100644 --- a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf +++ b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf @@ -25,6 +25,7 @@ Armada70x0DbBoardDescLib.c [Packages] + EmbeddedPkg/EmbeddedPkg.dec MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec Silicon/Marvell/Marvell.dec diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c index 48c68e4..f63d8fd 100644 --- a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c +++ b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c @@ -21,6 +21,31 @@ #include #include +#include + +// +// GPIO Expander +// +STATIC MV_GPIO_EXPANDER mGpioExpander = { + 8, /* PCA9555 */ + 0x21, + 0x0, +}; + + +EFI_STATUS +EFIAPI +ArmadaBoardGpioExpanderGet ( + IN OUT MV_GPIO_EXPANDER **GpioExpanders, + IN OUT UINTN *GpioExpanderCount + ) +{ + *GpioExpanderCount = 1; + *GpioExpanders = &mGpioExpander; + + return EFI_SUCCESS; +} + // // Order of devices in SdMmcDescTemplate has to be in par with ArmadaSoCDescLib // -- 2.7.4