* [PATCH edk2-platforms 0/6] I2C/DT fixes for SynQuacer
@ 2017-12-27 15:49 Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 1/6] Silicon: fix typo in gPcf8563RealTimeClockLibI2cMasterProtocolGuid Ard Biesheuvel
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2017-12-27 15:49 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Some stuff I have accumulated over the past couple of weeks, consisting
of
- Fixes for the I2C RTC handling; for some reason (probably due to having
added HII screens to PlatformDxe), the dispatch order had changed, and
the RTC no longer worked. (#1 - #4)
- The DT binding for NETSEC has changed, and so our device tree has to be
updated accordingly. While at it, perform some other cleanups as well.
Ard Biesheuvel (6):
Silicon: fix typo in gPcf8563RealTimeClockLibI2cMasterProtocolGuid
Silicon/NXP/Pcf8563RealTimeClockLib: avoid driver binding protocol
Silicon/SynQuacerI2cDxe: remove spurious format specifier
Silicon/SynQuacer: load I2C driver before platform DXE driver
Silicon/SynQuacer/DeviceTree: align uart DT nodes
Silicon/SynQuacer/DeviceTree: update NETSEC DT node to latest binding
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c | 33 ++++++++---------
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec | 2 +-
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf | 5 ++-
Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts | 7 ++++
Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 37 ++++++++++----------
Silicon/Socionext/SynQuacer/DeviceTree/SynQuacerEvalBoard.dts | 7 ++++
Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c | 2 +-
Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf | 4 +--
Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c | 2 +-
Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf | 2 +-
Silicon/Socionext/SynQuacer/SynQuacer.dec | 2 ++
11 files changed, 56 insertions(+), 47 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 1/6] Silicon: fix typo in gPcf8563RealTimeClockLibI2cMasterProtocolGuid
2017-12-27 15:49 [PATCH edk2-platforms 0/6] I2C/DT fixes for SynQuacer Ard Biesheuvel
@ 2017-12-27 15:49 ` Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 2/6] Silicon/NXP/Pcf8563RealTimeClockLib: avoid driver binding protocol Ard Biesheuvel
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2017-12-27 15:49 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Do a global replace of gPcf8563RealTimeClockLibI2cMasterProtolGuid with
gPcf8563RealTimeClockLibI2cMasterProtocolGuid.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c | 2 +-
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec | 2 +-
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf | 4 ++--
Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c | 2 +-
Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
index 67f8e7de4025..6bc4aef28849 100644
--- a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
+++ b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
@@ -373,7 +373,7 @@ LibRtcInitialize (
//
BufferSize = sizeof (EFI_HANDLE);
Status = gBS->LocateHandle (ByProtocol,
- &gPcf8563RealTimeClockLibI2cMasterProtolGuid, NULL,
+ &gPcf8563RealTimeClockLibI2cMasterProtocolGuid, NULL,
&BufferSize, &mI2cMasterHandle);
ASSERT_EFI_ERROR (Status);
diff --git a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec
index 3849056f164a..94c4a3f1ef4c 100644
--- a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec
+++ b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec
@@ -22,7 +22,7 @@ [Guids]
gPcf8563RealTimeClockLibTokenSpaceGuid = { 0xaaf5b169, 0x93a0, 0x4d60, { 0xba, 0xe4, 0x06, 0x07, 0x92, 0x8e, 0x63, 0xdd }}
[Protocols]
- gPcf8563RealTimeClockLibI2cMasterProtolGuid = { 0xa6af18ae, 0x3bd5, 0x4af9, { 0xbb, 0x6a, 0xdb, 0x85, 0x07, 0x62, 0x81, 0x38 }}
+ gPcf8563RealTimeClockLibI2cMasterProtocolGuid = { 0xa6af18ae, 0x3bd5, 0x4af9, { 0xbb, 0x6a, 0xdb, 0x85, 0x07, 0x62, 0x81, 0x38 }}
[PcdsFixedAtBuild]
gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51|UINT8|0x00000001
diff --git a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf
index 9907e343ba78..1a9a6f6c9cf3 100644
--- a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf
+++ b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf
@@ -42,11 +42,11 @@ [Guids]
[Protocols]
gEfiDriverBindingProtocolGuid ## CONSUMES
gEfiI2cMasterProtocolGuid ## CONSUMES
- gPcf8563RealTimeClockLibI2cMasterProtolGuid ## CONSUMES
+ gPcf8563RealTimeClockLibI2cMasterProtocolGuid ## CONSUMES
[FixedPcd]
gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress
gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cBusFrequency
[Depex]
- gPcf8563RealTimeClockLibI2cMasterProtolGuid
+ gPcf8563RealTimeClockLibI2cMasterProtocolGuid
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
index 098a4dbd324e..91c1b66ea1f8 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
@@ -183,7 +183,7 @@ PlatformDxeEntryPoint (
// through the I2C driver stack (which cannot be used at runtime)
//
Status = gBS->InstallProtocolInterface (&Handle,
- &gPcf8563RealTimeClockLibI2cMasterProtolGuid,
+ &gPcf8563RealTimeClockLibI2cMasterProtocolGuid,
EFI_NATIVE_INTERFACE, NULL);
ASSERT_EFI_ERROR (Status);
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
index 7d3b88a5b52e..9778574be1bf 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
@@ -53,7 +53,7 @@ [Guids]
[Protocols]
gEdkiiNonDiscoverableDeviceProtocolGuid ## PRODUCES
gEfiPciIoProtocolGuid ## CONSUMES
- gPcf8563RealTimeClockLibI2cMasterProtolGuid ## PRODUCES
+ gPcf8563RealTimeClockLibI2cMasterProtocolGuid ## PRODUCES
[FixedPcd]
gSynQuacerTokenSpaceGuid.PcdNetsecEepromBase
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 2/6] Silicon/NXP/Pcf8563RealTimeClockLib: avoid driver binding protocol
2017-12-27 15:49 [PATCH edk2-platforms 0/6] I2C/DT fixes for SynQuacer Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 1/6] Silicon: fix typo in gPcf8563RealTimeClockLibI2cMasterProtocolGuid Ard Biesheuvel
@ 2017-12-27 15:49 ` Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 3/6] Silicon/SynQuacerI2cDxe: remove spurious format specifier Ard Biesheuvel
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2017-12-27 15:49 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Instead of registering a notification callback on the driver binding
protocol, and attempting to connect our I2C master handle each time
a new driver is registered, switch to the more obvious approach of
registering a notification callback on the I2C master protocol directly.
The original code was written under the assumption that it would make
the RTC available at an earlier time, but given that all handles that
are created during the execution of a driver entry point are connected
by DXE core right away (i.e., before StartImage() returns), this is not
really necessary, and in fact, may result in the driver already having
been connected by the time we attempt to connect it.
Note that it is now up to the platform to ensure that ConnectController()
is called for the handle if DXE core does not call it by itself, or does
call it but at a time when no I2C master protocol driver is available
yet.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c | 31 ++++++++------------
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf | 1 -
2 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
index 6bc4aef28849..fb58e1feb424 100644
--- a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
+++ b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
@@ -41,7 +41,7 @@
#define EPOCH_BASE 2000
STATIC EFI_HANDLE mI2cMasterHandle;
-STATIC VOID *mDriverEventRegistration;
+STATIC VOID *mI2cMasterEventRegistration;
STATIC EFI_I2C_MASTER_PROTOCOL *mI2cMaster;
STATIC EFI_EVENT mRtcVirtualAddrChangeEvent;
@@ -263,12 +263,12 @@ LibSetWakeupTime (
STATIC
VOID
-DriverRegistrationEvent (
+I2cMasterRegistrationEvent (
IN EFI_EVENT Event,
IN VOID *Context
)
{
- EFI_HANDLE Handle[2];
+ EFI_HANDLE Handle;
UINTN BufferSize;
EFI_STATUS Status;
EFI_I2C_MASTER_PROTOCOL *I2cMaster;
@@ -280,10 +280,10 @@ DriverRegistrationEvent (
do {
BufferSize = sizeof (EFI_HANDLE);
Status = gBS->LocateHandle (ByRegisterNotify,
- &gEfiDriverBindingProtocolGuid,
- mDriverEventRegistration,
+ &gEfiI2cMasterProtocolGuid,
+ mI2cMasterEventRegistration,
&BufferSize,
- Handle);
+ &Handle);
if (EFI_ERROR (Status)) {
if (Status != EFI_NOT_FOUND) {
DEBUG ((DEBUG_WARN, "%a: gBS->LocateHandle () returned %r\n",
@@ -292,12 +292,7 @@ DriverRegistrationEvent (
break;
}
- //
- // Check if we can connect our handle to this driver.
- //
- Handle[1] = NULL;
- Status = gBS->ConnectController (mI2cMasterHandle, Handle, NULL, FALSE);
- if (EFI_ERROR (Status)) {
+ if (Handle != mI2cMasterHandle) {
continue;
}
@@ -378,16 +373,16 @@ LibRtcInitialize (
ASSERT_EFI_ERROR (Status);
//
- // Register a protocol registration notification callback on the driver
- // binding protocol so we can attempt to connect our I2C master to it
- // as soon as it appears.
+ // Register a protocol registration notification callback on the I2C master
+ // protocol. This will notify us even if the protocol instance we are looking
+ // for has already been installed.
//
EfiCreateProtocolNotifyEvent (
- &gEfiDriverBindingProtocolGuid,
+ &gEfiI2cMasterProtocolGuid,
TPL_CALLBACK,
- DriverRegistrationEvent,
+ I2cMasterRegistrationEvent,
NULL,
- &mDriverEventRegistration);
+ &mI2cMasterEventRegistration);
//
// Register for the virtual address change event
diff --git a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf
index 1a9a6f6c9cf3..e232902c6b5d 100644
--- a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf
+++ b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.inf
@@ -40,7 +40,6 @@ [Guids]
gEfiEventVirtualAddressChangeGuid
[Protocols]
- gEfiDriverBindingProtocolGuid ## CONSUMES
gEfiI2cMasterProtocolGuid ## CONSUMES
gPcf8563RealTimeClockLibI2cMasterProtocolGuid ## CONSUMES
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 3/6] Silicon/SynQuacerI2cDxe: remove spurious format specifier
2017-12-27 15:49 [PATCH edk2-platforms 0/6] I2C/DT fixes for SynQuacer Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 1/6] Silicon: fix typo in gPcf8563RealTimeClockLibI2cMasterProtocolGuid Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 2/6] Silicon/NXP/Pcf8563RealTimeClockLib: avoid driver binding protocol Ard Biesheuvel
@ 2017-12-27 15:49 ` Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 4/6] Silicon/SynQuacer: load I2C driver before platform DXE driver Ard Biesheuvel
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2017-12-27 15:49 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Remove a %r without an associated parameter.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
index c3703dfb6c33..46c512a20151 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
@@ -335,7 +335,7 @@ SynQuacerI2cStartRequest (
}
if (MmioRead8 (I2c->MmioBase + F_I2C_REG_BSR) & F_I2C_BSR_LRB) {
- BOOTTIME_DEBUG ((DEBUG_WARN, "%a: No ack received - %r\n", __FUNCTION__));
+ BOOTTIME_DEBUG ((DEBUG_WARN, "%a: No ack received\n", __FUNCTION__));
Status = EFI_DEVICE_ERROR;
break;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 4/6] Silicon/SynQuacer: load I2C driver before platform DXE driver
2017-12-27 15:49 [PATCH edk2-platforms 0/6] I2C/DT fixes for SynQuacer Ard Biesheuvel
` (2 preceding siblings ...)
2017-12-27 15:49 ` [PATCH edk2-platforms 3/6] Silicon/SynQuacerI2cDxe: remove spurious format specifier Ard Biesheuvel
@ 2017-12-27 15:49 ` Ard Biesheuvel
2017-12-27 15:50 ` [PATCH edk2-platforms 5/6] Silicon/SynQuacer/DeviceTree: align uart DT nodes Ard Biesheuvel
2017-12-27 15:50 ` [PATCH edk2-platforms 6/6] Silicon/SynQuacer/DeviceTree: update NETSEC DT node to latest binding Ard Biesheuvel
5 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2017-12-27 15:49 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
To ensure that the I2C master protocol is installed immediately onto
the handles created by PlatformDxe in its entry point, force the
SynQuacerI2cDxe driver to be loaded before PlatformDxe. These handles
are recursively connected by the DXE core as soon as they appear, and
so ensuring that the I2C master protocol driver is available at this
time will ensure that these handles will be connected to it right away.
This is useful when implementations of architectural protocols such as
RTC or the EFI variable store, which should become available long before
the ordinary dispatch of UEFI driver model drivers is started at the end
of DXE, are based on I2C.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf | 2 +-
Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf | 2 +-
Silicon/Socionext/SynQuacer/SynQuacer.dec | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
index 9778574be1bf..587dc111e75b 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
@@ -17,7 +17,7 @@
[Defines]
INF_VERSION = 0x0001001A
BASE_NAME = PlatformDxe
- FILE_GUID = ac422cc1-d916-489a-b165-536fdfc633c2
+ FILE_GUID = ac422cc1-d916-489a-b165-536fdfc633c2 # gSynQuacerPlatformDxeFileGuid
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = PlatformDxeEntryPoint
diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf
index fa715366878c..325816ba0b88 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf
+++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf
@@ -56,4 +56,4 @@ [FixedPcd]
gSynQuacerTokenSpaceGuid.PcdI2cReferenceClock
[Depex]
- TRUE
+ BEFORE gSynQuacerPlatformDxeFileGuid
diff --git a/Silicon/Socionext/SynQuacer/SynQuacer.dec b/Silicon/Socionext/SynQuacer/SynQuacer.dec
index a21f12b5bc32..76529e3c2164 100644
--- a/Silicon/Socionext/SynQuacer/SynQuacer.dec
+++ b/Silicon/Socionext/SynQuacer/SynQuacer.dec
@@ -25,6 +25,8 @@ [Guids]
gSynQuacerNonDiscoverableI2cMasterGuid = { 0x364ee675, 0x9e44, 0x42b7, { 0xa5, 0xe4, 0x92, 0x84, 0xdb, 0x85, 0xda, 0x09 } }
gSynQuacerNonDiscoverableRuntimeI2cMasterGuid = { 0x5f35aa9b, 0x8c6f, 0x4828, { 0xbd, 0x44, 0x7c, 0xc0, 0xeb, 0x2d, 0xfe, 0xb9 } }
+ gSynQuacerPlatformDxeFileGuid = { 0xac422cc1, 0xd916, 0x489a, { 0xb1, 0x65, 0x53, 0x6f, 0xdf, 0xc6, 0x33, 0xc2 } }
+
[Ppis]
gSynQuacerDramInfoPpiGuid = { 0x3e1d7356, 0xdda4, 0x4b1a, { 0x93, 0x46, 0xbf, 0x89, 0x1c, 0x86, 0x46, 0xcc } }
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 5/6] Silicon/SynQuacer/DeviceTree: align uart DT nodes
2017-12-27 15:49 [PATCH edk2-platforms 0/6] I2C/DT fixes for SynQuacer Ard Biesheuvel
` (3 preceding siblings ...)
2017-12-27 15:49 ` [PATCH edk2-platforms 4/6] Silicon/SynQuacer: load I2C driver before platform DXE driver Ard Biesheuvel
@ 2017-12-27 15:50 ` Ard Biesheuvel
2017-12-27 15:50 ` [PATCH edk2-platforms 6/6] Silicon/SynQuacer/DeviceTree: update NETSEC DT node to latest binding Ard Biesheuvel
5 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2017-12-27 15:50 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Align the UART DT nodes:
- use 'uart' not 'fuart' as node name for the second serial port
- create an alias 'serial1' for the second serial port
- use UART clock reference instead of hardcoded frequency
- split 'clocks' property into 1 cell per phandle
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
index 37a3981f0360..7c3518facb98 100644
--- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
+++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
@@ -32,6 +32,7 @@
aliases {
serial0 = &soc_uart0;
+ serial1 = &fuart;
};
chosen {
@@ -436,15 +437,16 @@
compatible = "arm,pl011", "arm,primecell";
reg = <0x0 0x2a400000 0x0 0x1000>;
interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk_uart &clk_apb>;
+ clocks = <&clk_uart>, <&clk_apb>;
clock-names = "uartclk", "apb_pclk";
};
- fuart: fuart@51040000 {
+ fuart: uart@51040000 {
compatible = "snps,dw-apb-uart";
reg = <0x0 0x51040000 0x0 0x1000>;
interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
- clock-frequency = <62500000>;
+ clocks = <&clk_uart>, <&clk_apb>;
+ clock-names = "baudclk", "apb_pclk";
reg-io-width = <4>;
reg-shift = <2>;
};
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 6/6] Silicon/SynQuacer/DeviceTree: update NETSEC DT node to latest binding
2017-12-27 15:49 [PATCH edk2-platforms 0/6] I2C/DT fixes for SynQuacer Ard Biesheuvel
` (4 preceding siblings ...)
2017-12-27 15:50 ` [PATCH edk2-platforms 5/6] Silicon/SynQuacer/DeviceTree: align uart DT nodes Ard Biesheuvel
@ 2017-12-27 15:50 ` Ard Biesheuvel
5 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2017-12-27 15:50 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
The upstream version of the Linux NETSEC driver expects the PHY DT
node to appear under a MDIO subnode, so fix this in the device tree.
Fix the node name as well, this should be 'ethernet' not 'netsec'
Also, move the PHY subnode into the per-platform .dts file so we can
set the unit address in the node name. This is necessary because recent
versions of the DT compiler are more finicky about this.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts | 7 +++++
Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 29 +++++++++-----------
Silicon/Socionext/SynQuacer/DeviceTree/SynQuacerEvalBoard.dts | 7 +++++
3 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts b/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts
index d2cd7ef90e6f..77b7b1b118a6 100644
--- a/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts
+++ b/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts
@@ -44,3 +44,10 @@
"GPIO-K", "GPIO-L", "PEC-PD26", "PEC-PD27",
"PEC-PD28", "PEC-PD29", "PEC-PD30", "PEC-PD31";
};
+
+&mdio_netsec {
+ phy_netsec: ethernet-phy@7 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <7>;
+ };
+};
diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
index 7c3518facb98..8817ec0f150e 100644
--- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
+++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
@@ -457,25 +457,22 @@
#clock-cells = <0>;
};
- eth0: netsec@522D0000 {
- compatible = "socionext,synquacer-netsec";
- reg = <0 0x522d0000 0x0 0x10000>,
- <0 FixedPcdGet32 (PcdNetsecEepromBase) 0x0 0x10000>;
- interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk_netsec>;
- phy-mode = "rgmii";
- max-speed = <1000>;
- max-frame-size = <9000>;
- phy-handle = <ðphy0>;
- dma-coherent;
+ ethernet@522D0000 {
+ compatible = "socionext,synquacer-netsec";
+ reg = <0 0x522d0000 0x0 0x10000>,
+ <0 FixedPcdGet32 (PcdNetsecEepromBase) 0x0 0x10000>;
+ interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk_netsec>;
+ phy-mode = "rgmii";
+ max-speed = <1000>;
+ max-frame-size = <9000>;
+ phy-handle = <&phy_netsec>;
+ dma-coherent;
+ mdio_netsec: mdio {
#address-cells = <1>;
#size-cells = <0>;
-
- ethphy0: ethernet-phy {
- compatible = "ethernet-phy-ieee802.3-c22";
- reg = <FixedPcdGet32 (PcdNetsecPhyAddress)>;
- };
+ };
};
smmu: iommu@582c0000 {
diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacerEvalBoard.dts b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacerEvalBoard.dts
index 132fd370a71b..5873e415c246 100644
--- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacerEvalBoard.dts
+++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacerEvalBoard.dts
@@ -34,3 +34,10 @@
&sdhci {
status = "okay";
};
+
+&mdio_netsec {
+ phy_netsec: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ };
+};
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-12-27 15:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-27 15:49 [PATCH edk2-platforms 0/6] I2C/DT fixes for SynQuacer Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 1/6] Silicon: fix typo in gPcf8563RealTimeClockLibI2cMasterProtocolGuid Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 2/6] Silicon/NXP/Pcf8563RealTimeClockLib: avoid driver binding protocol Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 3/6] Silicon/SynQuacerI2cDxe: remove spurious format specifier Ard Biesheuvel
2017-12-27 15:49 ` [PATCH edk2-platforms 4/6] Silicon/SynQuacer: load I2C driver before platform DXE driver Ard Biesheuvel
2017-12-27 15:50 ` [PATCH edk2-platforms 5/6] Silicon/SynQuacer/DeviceTree: align uart DT nodes Ard Biesheuvel
2017-12-27 15:50 ` [PATCH edk2-platforms 6/6] Silicon/SynQuacer/DeviceTree: update NETSEC DT node to latest binding Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox