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::136; helo=mail-lf1-x136.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (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 98E752194D3AE for ; Thu, 17 Jan 2019 03:15:43 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id n18so7477735lfh.6 for ; Thu, 17 Jan 2019 03:15:43 -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=6HPe2G+zl08FPpRltpLnVLrgVzt/YXSqiDN1Mq15npQ=; b=opDOD46oWWbZ7G0IZ11OG/HjrLRc/kCH0JhLVKhh7z4KTiBWljiXpx6F0CEdyH+8Vy 1n6PjfYA5bncDgYQnKarmYm5xgidWG6ppRLECB75/ODhNomqBoKvq/ElYWMOQUalYVmC IvlB73FWwtSM9rbp2LIp3kFMXPo2tU/HY9Nil25nLCly1jdukAmr5+GNz0ESsEN97Hxd SIr/I4bpc84I5It1wyHZ8Jfb2khuNoq9/8Xejx+lqDWluR1/0RGowXf3SmmNWDK8/45E bkxyVxierOVwkJBEd+htCG7DcGcYPC3PZeHrr2e3vv5Qlzcoomt5hcXClqQq4cMQgtvo e1+g== 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=6HPe2G+zl08FPpRltpLnVLrgVzt/YXSqiDN1Mq15npQ=; b=CQ0QmrsMz3SxQF+XHsjCHyT6MbwnfzkC8otLsheiKylvpNVNLbMbdA7XFHWGMehGjb Me/6p2OLZsC+XhJtA2UtlZyH65HvHz84rTk0x8gaeDSGBGSfvP6y+2VfEv2ZkrjrXSgl jgsdmP56AQo4dg6vS3nJEjTWYfrE0yBRCoH5PjlbU3YFlDkoF3OFxfqy7x/zm+c8+EFh BW8yExHvrW9WJW4wXciAnHqm9nt0eVMG9cdTGwehS6G5OPwKFn86f8EpOfIvkCaBGtLH iY/csOEBUy1AzwmssW4WWkm8YlKKNBzxqKRiigzpAjL/CbjFSLNVXhXf74K3N1HoATpr 5S0Q== X-Gm-Message-State: AJcUukcCykyjtsx5BuULk4y3keUIahOyefNbpTQe/G3ouM/QmzhHNBFv wfI7vYde3pKyiykB0j3NDr8FNO8itHI= X-Google-Smtp-Source: ALg8bN622nSAVQWQySNekOeS6NcjzR8zPv/qnR7gBEZS/GdLorjhP3jmunoX0S4aSCjkN1HEaXN76A== X-Received: by 2002:ac2:50c4:: with SMTP id h4mr9790379lfm.81.1547723741570; Thu, 17 Jan 2019 03:15:41 -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 d23sm238003lfc.11.2019.01.17.03.15.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jan 2019 03:15:40 -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, 17 Jan 2019 12:15:09 +0100 Message-Id: <1547723715-4562-7-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547723715-4562-1-git-send-email-mw@semihalf.com> References: <1547723715-4562-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH v3 06/12] Marvell/Armada80x0Db: 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, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 This patch implements ArmadaBoarDescLib library for Armada80x0Db 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/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c index feb69ad..61b6202 100644 --- a/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c +++ b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c @@ -19,9 +19,39 @@ #include #include #include +#include #include // +// GPIO Expanders +// +STATIC MV_GPIO_EXPANDER mGpioExpanders[] = { + { + PCA9555_ID, + 0x21, + 0x0, + }, + { + PCA9555_ID, + 0x25, + 0x0, + }, +}; + +EFI_STATUS +EFIAPI +ArmadaBoardGpioExpanderGet ( + IN OUT MV_GPIO_EXPANDER **GpioExpanders, + IN OUT UINTN *GpioExpanderCount + ) +{ + *GpioExpanderCount = ARRAY_SIZE (mGpioExpanders); + *GpioExpanders = mGpioExpanders; + + return EFI_SUCCESS; +} + +// // Order of devices in SdMmcDescTemplate has to be in par with ArmadaSoCDescLib // STATIC -- 2.7.4