From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH edk2-platforms v3 1/6] Platform/96Boards: introduce package and mezzanine protocol
Date: Fri, 23 Feb 2018 15:40:47 +0000 [thread overview]
Message-ID: <20180223154052.9828-2-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20180223154052.9828-1-ard.biesheuvel@linaro.org>
Introduce the mezzanine protocol and the 96Boards package defining
the PCDs and GUIDs that may be used by implementations of the
protocol.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/96Boards/96Boards.dec | 67 ++++++++++++++++++
Platform/96Boards/Include/Protocol/Mezzanine.h | 71 ++++++++++++++++++++
2 files changed, 138 insertions(+)
diff --git a/Platform/96Boards/96Boards.dec b/Platform/96Boards/96Boards.dec
new file mode 100644
index 000000000000..2a063ced9e4a
--- /dev/null
+++ b/Platform/96Boards/96Boards.dec
@@ -0,0 +1,67 @@
+## @file
+#
+# Copyright (c) 2018, Linaro Ltd. All rights reserved.
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+[Defines]
+ DEC_SPECIFICATION = 0x0001001A
+ PACKAGE_NAME = 96Boards
+ PACKAGE_GUID = ce4a4683-6e2d-4ec3-bc11-974289a09ab0
+ PACKAGE_VERSION = 0.1
+
+[Includes]
+ Include
+
+[Protocols]
+ ## Include/Protocol/Mezzanine.h
+ g96BoardsMezzanineProtocolGuid = { 0xf0467a37, 0x3436, 0x40ef, { 0x94, 0x09, 0x4d, 0x1d, 0x7f, 0x51, 0x06, 0xd3 } }
+
+[Guids]
+ # PCD scope GUID
+ g96BoardsTokenSpaceGuid = { 0xe0d2f33a, 0xb7dd, 0x4a69, { 0xb6, 0x76, 0xda, 0xe8, 0xa4, 0x17, 0xa7, 0xb5 } }
+
+ # GUIDs to be installed as protocols to identify which controller connects to which bus
+ g96BoardsI2c0MasterGuid = { 0xba10e402, 0xcfdd, 0x4b87, { 0xbd, 0x02, 0x6e, 0x26, 0x9f, 0x01, 0x94, 0x11 } }
+ g96BoardsI2c1MasterGuid = { 0xcf64ac46, 0xd0be, 0x4a69, { 0x90, 0xa2, 0xf2, 0x82, 0x5b, 0x92, 0x25, 0x61 } }
+ g96BoardsSpiMasterGuid = { 0x9703fd99, 0xe638, 0x42b8, { 0xab, 0x81, 0x52, 0x61, 0x1b, 0xf7, 0xf7, 0x5d } }
+
+[PcdsFixedAtBuild]
+ # ASCII DT paths to the I2C parent nodes of the 96boards LS connector
+ g96BoardsTokenSpaceGuid.PcdI2c0Parent|""|VOID*|0x00000001
+ g96BoardsTokenSpaceGuid.PcdI2c1Parent|""|VOID*|0x00000002
+
+ # I2C bus frequency in Hertz
+ g96BoardsTokenSpaceGuid.PcdI2c0BusFrequencyHz|0|UINT32|0x00000003
+ g96BoardsTokenSpaceGuid.PcdI2c1BusFrequencyHz|0|UINT32|0x00000004
+
+ # ASCII DT path to the SPI parent node of the 96boards LS connector
+ g96BoardsTokenSpaceGuid.PcdSpiParent|""|VOID*|0x00000005
+
+ # ASCII DT path to the GPIO parent node of the 96boards LS connector
+ g96BoardsTokenSpaceGuid.PcdGpioParent|""|VOID*|0x00000006
+
+ # Polarity of the 96boards LS connector GPIOs (0 == GPIO_ACTIVE_HIGH, 1 == GPIO_ACTIVE_LOW)
+ g96BoardsTokenSpaceGuid.PcdGpioPolarity|0|UINT32|0x00000007
+
+ # Pin numbers of the 96boards LS connector GPIOs
+ g96BoardsTokenSpaceGuid.PcdGpioPinA|0|UINT32|0x00000010
+ g96BoardsTokenSpaceGuid.PcdGpioPinB|0|UINT32|0x00000011
+ g96BoardsTokenSpaceGuid.PcdGpioPinC|0|UINT32|0x00000012
+ g96BoardsTokenSpaceGuid.PcdGpioPinD|0|UINT32|0x00000013
+ g96BoardsTokenSpaceGuid.PcdGpioPinE|0|UINT32|0x00000014
+ g96BoardsTokenSpaceGuid.PcdGpioPinF|0|UINT32|0x00000015
+ g96BoardsTokenSpaceGuid.PcdGpioPinG|0|UINT32|0x00000016
+ g96BoardsTokenSpaceGuid.PcdGpioPinH|0|UINT32|0x00000017
+ g96BoardsTokenSpaceGuid.PcdGpioPinI|0|UINT32|0x00000018
+ g96BoardsTokenSpaceGuid.PcdGpioPinJ|0|UINT32|0x00000019
+ g96BoardsTokenSpaceGuid.PcdGpioPinK|0|UINT32|0x0000001A
+ g96BoardsTokenSpaceGuid.PcdGpioPinL|0|UINT32|0x0000001B
diff --git a/Platform/96Boards/Include/Protocol/Mezzanine.h b/Platform/96Boards/Include/Protocol/Mezzanine.h
new file mode 100644
index 000000000000..9847649d2ac3
--- /dev/null
+++ b/Platform/96Boards/Include/Protocol/Mezzanine.h
@@ -0,0 +1,71 @@
+/** @file
+
+ Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>
+
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License which accompanies this
+ distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _96BOARDS_MEZZANINE_H_
+#define _96BOARDS_MEZZANINE_H_
+
+#include <Pi/PiI2c.h>
+#include <Protocol/SpiConfiguration.h>
+
+#define MEZZANINE_PROTOCOL_GUID \
+ { 0xf0467a37, 0x3436, 0x40ef, { 0x94, 0x09, 0x4d, 0x1d, 0x7f, 0x51, 0x06, 0xd3 } }
+
+typedef struct _MEZZANINE_PROTOCOL MEZZANINE_PROTOCOL;
+
+/**
+ Apply the mezzanine's DT overlay
+
+ @param[in] This Pointer to the MEZZANINE_PROTOCOL instance.
+ @param[in,out] Dtb Pointer to the device tree blob
+
+ @return EFI_SUCCESS Operation succeeded.
+ @return other An error has occurred.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *APPLY_DEVICE_TREE_OVERLAY) (
+ IN MEZZANINE_PROTOCOL *This,
+ IN OUT VOID *Dtb
+ );
+
+struct _MEZZANINE_PROTOCOL {
+ //
+ // Get the device tree overlay for this mezzanine board
+ //
+ APPLY_DEVICE_TREE_OVERLAY ApplyDeviceTreeOverlay;
+ //
+ // The number of devices on LS connector I2C bus #0
+ //
+ UINT32 I2c0NumDevices;
+ //
+ // The number of devices on LS connector I2C bus #1
+ //
+ UINT32 I2c1NumDevices;
+ //
+ // Linear array of I2C devices on LS connector bus #0
+ //
+ CONST EFI_I2C_DEVICE *I2c0DeviceArray;
+ //
+ // Linear array of I2C devices on LS connector bus #0
+ //
+ CONST EFI_I2C_DEVICE *I2c1DeviceArray;
+ //
+ // NULL terminated linked list of SPI devices attached to the LS connector
+ //
+ CONST EFI_SPI_PERIPHERAL *SpiDeviceLinkedList;
+};
+
+extern EFI_GUID g96BoardsMezzanineProtocolGuid;
+
+#endif // _96BOARDS_MEZZANINE_H_
--
2.11.0
next prev parent reply other threads:[~2018-02-23 15:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 15:40 [PATCH edk2-platforms v3 0/6] Add Secure96 mezzanine support Ard Biesheuvel
2018-02-23 15:40 ` Ard Biesheuvel [this message]
2018-02-23 15:40 ` [PATCH edk2-platforms v3 2/6] Platform/96Boards: introduce I2C driver Ard Biesheuvel
2018-02-23 15:40 ` [PATCH edk2-platforms v3 3/6] Platform/96Boards: introduce LsConnector protocol Ard Biesheuvel
2018-02-23 15:40 ` [PATCH edk2-platforms v3 4/6] Platform/96Boards: add a driver for the Secure96 mezzanine board Ard Biesheuvel
2018-02-23 15:40 ` [PATCH edk2-platforms v3 5/6] Platform/96Boards: add driver for low speed (LS) connector Ard Biesheuvel
2018-02-23 15:40 ` [PATCH edk2-platforms v3 6/6] Platform/Socionext/DeveloperBox: add 96Boards mezzanine support Ard Biesheuvel
2018-02-23 15:56 ` [PATCH edk2-platforms v3 0/6] Add Secure96 " Leif Lindholm
2018-02-23 16:02 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180223154052.9828-2-ard.biesheuvel@linaro.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox