* [edk2-platforms PATCH 1/6] Marvell/Armada80x0Db: Update CP0 MMC settings
2021-04-19 8:48 [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
@ 2021-04-19 8:48 ` Marcin Wojtas
2021-04-19 8:48 ` [edk2-platforms PATCH 2/6] Marvell/Armada80x0Db: Introduce SD/MMC ACPI description Marcin Wojtas
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Marcin Wojtas @ 2021-04-19 8:48 UTC (permalink / raw)
To: devel; +Cc: leif, ardb+tianocore, mw, jaz, kostap, upstream
This patch enables switching to 1.8V power supply
on the VCCQ rail of the CP0 MMC interface,
which allows to operate at HS200 in EDK2 and when
booting with ACPI.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c
index 144009cae8..2b119fa2a7 100644
--- a/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c
+++ b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c
@@ -110,7 +110,7 @@ MV_BOARD_SDMMC_DESC mSdMmcDescTemplate[] = {
{ /* SD/MMC 0xF2780000 */
0, /* SOC will be filled by MvBoardDescDxe */
0, /* SdMmcDevCount will be filled by MvBoardDescDxe */
- FALSE, /* Xenon1v8Enabled */
+ TRUE, /* Xenon1v8Enabled */
FALSE, /* Xenon8BitBusEnabled */
FALSE, /* XenonSlowModeEnabled */
0x19, /* XenonTuningStepDivisor */
--
2.29.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [edk2-platforms PATCH 2/6] Marvell/Armada80x0Db: Introduce SD/MMC ACPI description
2021-04-19 8:48 [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
2021-04-19 8:48 ` [edk2-platforms PATCH 1/6] Marvell/Armada80x0Db: Update CP0 MMC settings Marcin Wojtas
@ 2021-04-19 8:48 ` Marcin Wojtas
2021-04-19 8:48 ` [edk2-platforms PATCH 3/6] Marvell/Armada70x0Db: Update CP0 MMC settings Marcin Wojtas
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Marcin Wojtas @ 2021-04-19 8:48 UTC (permalink / raw)
To: devel; +Cc: leif, ardb+tianocore, mw, jaz, kostap, upstream
This patch adds a new description of the board's SD/MMC
interfaces in DSDT table that can work with the newly
introduced support in Linux.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Dsdt.asl | 59 ++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Dsdt.asl b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Dsdt.asl
index faf1846c22..62ba62c7d2 100644
--- a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Dsdt.asl
+++ b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Dsdt.asl
@@ -87,6 +87,65 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "MVEBU ", "ARMADA8K", 3)
})
}
+ Device (MMC0)
+ {
+ Name (_HID, "MRVL0002") // _HID: Hardware ID
+ Name (_UID, 0x00) // _UID: Unique ID
+ Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
+
+ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
+ {
+ Memory32Fixed (ReadWrite,
+ 0xF06E0000, // Address Base (MMIO)
+ 0x00000300, // Address Length
+ )
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
+ {
+ 48
+ }
+ })
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "clock-frequency", 400000000 },
+ Package () { "bus-width", 8 },
+ Package () { "marvell,xenon-phy-slow-mode", 0x1 },
+ Package () { "no-sd", 0x1 },
+ Package () { "no-sdio", 0x1 },
+ Package () { "non-removable", 0x1 },
+ }
+ })
+ }
+
+ Device (MMC1)
+ {
+ Name (_HID, "MRVL0004") // _HID: Hardware ID
+ Name (_UID, 0x01) // _UID: Unique ID
+ Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
+
+ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
+ {
+ Memory32Fixed (ReadWrite,
+ 0xF2780000, // Address Base (MMIO)
+ 0x00000300, // Address Length
+ )
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
+ {
+ CP_GIC_SPI_CP0_SDMMC
+ }
+ })
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "clock-frequency", 400000000 },
+ Package () { "bus-width", 4 },
+ Package () { "no-sd", 0x1 },
+ Package () { "no-sdio", 0x1 },
+ Package () { "non-removable", 0x1 },
+ }
+ })
+ }
+
Device (XHC0)
{
Name (_HID, "PNP0D10") // _HID: Hardware ID
--
2.29.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [edk2-platforms PATCH 3/6] Marvell/Armada70x0Db: Update CP0 MMC settings
2021-04-19 8:48 [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
2021-04-19 8:48 ` [edk2-platforms PATCH 1/6] Marvell/Armada80x0Db: Update CP0 MMC settings Marcin Wojtas
2021-04-19 8:48 ` [edk2-platforms PATCH 2/6] Marvell/Armada80x0Db: Introduce SD/MMC ACPI description Marcin Wojtas
@ 2021-04-19 8:48 ` Marcin Wojtas
2021-04-19 8:48 ` [edk2-platforms PATCH 4/6] Marvell/Armada70x0Db: Introduce SD/MMC ACPI description Marcin Wojtas
` (3 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Marcin Wojtas @ 2021-04-19 8:48 UTC (permalink / raw)
To: devel; +Cc: leif, ardb+tianocore, mw, jaz, kostap, upstream
This patch enables switching to 1.8V power supply
on the VCCQ rail of the CP0 MMC interface,
which allows to operate at HS200 in EDK2 and when
booting with ACPI.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c | 2 +-
Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 79 +++++++++++++++-----
3 files changed, 61 insertions(+), 21 deletions(-)
diff --git a/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h b/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h
index 73a71ad3c4..85af61ec3f 100644
--- a/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h
+++ b/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h
@@ -13,5 +13,6 @@
#define ARMADA_70x0_DB_VBUS0_LIMIT_PIN 4
#define ARMADA_70x0_DB_VBUS1_PIN 1
#define ARMADA_70x0_DB_VBUS1_LIMIT_PIN 5
+#define ARMADA_70x0_DB_SDMMC_CP0_VCCQ_PIN 15
#endif
diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c
index ae13e0a845..b0b6855bbb 100644
--- a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c
+++ b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c
@@ -104,7 +104,7 @@ MV_BOARD_SDMMC_DESC mSdMmcDescTemplate[] = {
{ /* SD/MMC 0xF2780000 */
0, /* SOC will be filled by MvBoardDescDxe */
0, /* SdMmcDevCount will be filled by MvBoardDescDxe */
- FALSE, /* Xenon1v8Enabled */
+ TRUE, /* Xenon1v8Enabled */
FALSE, /* Xenon8BitBusEnabled */
FALSE, /* XenonSlowModeEnabled */
0x19, /* XenonTuningStepDivisor */
diff --git a/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index 92a14bb4f0..4d790103a4 100644
--- a/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -21,6 +21,37 @@
#include "NonDiscoverableInitLib.h"
+STATIC
+EFI_STATUS
+EFIAPI
+ConfigurePins (
+ IN CONST MV_GPIO_PIN *VbusPin,
+ IN UINTN PinCount,
+ IN MV_GPIO_DRIVER_TYPE DriverType
+ )
+{
+ EMBEDDED_GPIO_MODE Mode;
+ EMBEDDED_GPIO_PIN Gpio;
+ EMBEDDED_GPIO *GpioProtocol;
+ EFI_STATUS Status;
+ UINTN Index;
+
+ Status = MvGpioGetProtocol (DriverType, &GpioProtocol);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __FUNCTION__));
+ return Status;
+ }
+
+ for (Index = 0; Index < PinCount; Index++) {
+ Mode = VbusPin->ActiveHigh ? GPIO_MODE_OUTPUT_1 : GPIO_MODE_OUTPUT_0;
+ Gpio = GPIO (VbusPin->ControllerId, VbusPin->PinNumber);
+ GpioProtocol->Set (GpioProtocol, Gpio, Mode);
+ VbusPin++;
+ }
+
+ return EFI_SUCCESS;
+}
+
STATIC CONST MV_GPIO_PIN mXhciVbusPins[] = {
{
MV_GPIO_DRIVER_TYPE_PCA95XX,
@@ -55,28 +86,30 @@ XhciInit (
IN NON_DISCOVERABLE_DEVICE *This
)
{
- CONST MV_GPIO_PIN *VbusPin;
- EMBEDDED_GPIO_MODE Mode;
- EMBEDDED_GPIO_PIN Gpio;
- EMBEDDED_GPIO *GpioProtocol;
- EFI_STATUS Status;
- UINTN Index;
-
- Status = MvGpioGetProtocol (MV_GPIO_DRIVER_TYPE_PCA95XX, &GpioProtocol);
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __FUNCTION__));
- return Status;
- }
+ return ConfigurePins (mXhciVbusPins,
+ ARRAY_SIZE (mXhciVbusPins),
+ MV_GPIO_DRIVER_TYPE_PCA95XX);
+}
- VbusPin = mXhciVbusPins;
- for (Index = 0; Index < ARRAY_SIZE (mXhciVbusPins); Index++) {
- Mode = VbusPin->ActiveHigh ? GPIO_MODE_OUTPUT_1 : GPIO_MODE_OUTPUT_0;
- Gpio = GPIO (VbusPin->ControllerId, VbusPin->PinNumber);
- GpioProtocol->Set (GpioProtocol, Gpio, Mode);
- VbusPin++;
- }
+STATIC CONST MV_GPIO_PIN mCp0SdMmcPins[] = {
+ {
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
+ ARMADA_70x0_DB_IO_EXPANDER0,
+ ARMADA_70x0_DB_SDMMC_CP0_VCCQ_PIN,
+ TRUE,
+ },
+};
- return EFI_SUCCESS;
+STATIC
+EFI_STATUS
+EFIAPI
+Cp0SdMmcInit (
+ IN NON_DISCOVERABLE_DEVICE *This
+ )
+{
+ return ConfigurePins (mCp0SdMmcPins,
+ ARRAY_SIZE (mCp0SdMmcPins),
+ MV_GPIO_DRIVER_TYPE_PCA95XX);
}
NON_DISCOVERABLE_DEVICE_INIT
@@ -90,5 +123,11 @@ NonDiscoverableDeviceInitializerGet (
return XhciInit;
}
+ if (Type == NonDiscoverableDeviceTypeSdhci) {
+ switch (Index) {
+ case 1:
+ return Cp0SdMmcInit;
+ }
+ }
return NULL;
}
--
2.29.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [edk2-platforms PATCH 4/6] Marvell/Armada70x0Db: Introduce SD/MMC ACPI description
2021-04-19 8:48 [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
` (2 preceding siblings ...)
2021-04-19 8:48 ` [edk2-platforms PATCH 3/6] Marvell/Armada70x0Db: Update CP0 MMC settings Marcin Wojtas
@ 2021-04-19 8:48 ` Marcin Wojtas
2021-04-19 8:49 ` [edk2-platforms PATCH 5/6] Marvell/Cn913xDb: Update AP807 MMC settings Marcin Wojtas
` (2 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Marcin Wojtas @ 2021-04-19 8:48 UTC (permalink / raw)
To: devel; +Cc: leif, ardb+tianocore, mw, jaz, kostap, upstream
This patch adds a new description of the board's SD/MMC
interfaces in DSDT table that can work with the newly
introduced support in Linux.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Dsdt.asl | 56 ++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Dsdt.asl b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Dsdt.asl
index af6dbdaef0..d4902652ec 100644
--- a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Dsdt.asl
+++ b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Dsdt.asl
@@ -62,6 +62,62 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "MVEBU ", "ARMADA7K", 3)
})
}
+ Device (MMC0)
+ {
+ Name (_HID, "MRVL0002") // _HID: Hardware ID
+ Name (_UID, 0x00) // _UID: Unique ID
+ Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
+
+ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
+ {
+ Memory32Fixed (ReadWrite,
+ 0xF06E0000, // Address Base (MMIO)
+ 0x00000300, // Address Length
+ )
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
+ {
+ 48
+ }
+ })
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "clock-frequency", 400000000 },
+ Package () { "bus-width", 4 },
+ Package () { "marvell,xenon-phy-slow-mode", 0x1 },
+ Package () { "no-1-8-v", 0x1 },
+ Package () { "non-removable", 0x1 },
+ }
+ })
+ }
+
+ Device (MMC1)
+ {
+ Name (_HID, "MRVL0004") // _HID: Hardware ID
+ Name (_UID, 0x01) // _UID: Unique ID
+ Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
+
+ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
+ {
+ Memory32Fixed (ReadWrite,
+ 0xF2780000, // Address Base (MMIO)
+ 0x00000300, // Address Length
+ )
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
+ {
+ CP_GIC_SPI_CP0_SDMMC
+ }
+ })
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "clock-frequency", 400000000 },
+ Package () { "bus-width", 4 },
+ Package () { "non-removable", 0x1 },
+ }
+ })
+ }
+
Device (XHC0)
{
Name (_HID, "PNP0D10") // _HID: Hardware ID
--
2.29.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [edk2-platforms PATCH 5/6] Marvell/Cn913xDb: Update AP807 MMC settings
2021-04-19 8:48 [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
` (3 preceding siblings ...)
2021-04-19 8:48 ` [edk2-platforms PATCH 4/6] Marvell/Armada70x0Db: Introduce SD/MMC ACPI description Marcin Wojtas
@ 2021-04-19 8:49 ` Marcin Wojtas
2021-04-19 8:49 ` [edk2-platforms PATCH 6/6] Marvell/Cn913xDb: Introduce SD/MMC ACPI description Marcin Wojtas
2021-04-19 8:52 ` [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
6 siblings, 0 replies; 11+ messages in thread
From: Marcin Wojtas @ 2021-04-19 8:49 UTC (permalink / raw)
To: devel; +Cc: leif, ardb+tianocore, mw, jaz, kostap, upstream
This patch enables switching to 1.8V power supply
on the VCCQ rail of the AP807 MMC interface,
which allows to operate at HS400 when booting with
ACPI. Since there are issues with this mode in
EDK2 Xenon SD/MMC driver apply a workaround, that
limits the mode to HS200 by forcing bus width to 4.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c | 8 +++++--
Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 23 ++++++++++++++++++++
3 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.h b/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.h
index a641420ef7..00449d4390 100644
--- a/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.h
+++ b/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.h
@@ -13,6 +13,7 @@
#define CN9130_DB_VBUS0_LIMIT_PIN 4
#define CN9130_DB_VBUS1_PIN 1
#define CN9130_DB_VBUS1_LIMIT_PIN 5
+#define CN9130_DB_AP_MMC_VCCQ_PIN 8
#define CN9130_DB_SDMMC_VCC_PIN 14
#define CN9130_DB_SDMMC_VCCQ_PIN 15
#define CN9131_DB_VBUS0_PIN 3
diff --git a/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c b/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c
index 2b46d141cd..2755600f53 100644
--- a/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c
+++ b/Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c
@@ -95,8 +95,12 @@ MV_BOARD_SDMMC_DESC mSdMmcDescTemplate[] = {
{ /* eMMC 0xF06E0000 */
0, /* SOC will be filled by MvBoardDescDxe */
0, /* SdMmcDevCount will be filled by MvBoardDescDxe */
- FALSE, /* Xenon1v8Enabled */
- TRUE, /* Xenon8BitBusEnabled */
+ TRUE, /* Xenon1v8Enabled */
+ /*
+ * Force 4-bit bus width - work-around for non
+ * functional HS400 mode.
+ */
+ FALSE, /* Xenon8BitBusEnabled */
FALSE, /* XenonSlowModeEnabled */
0x40, /* XenonTuningStepDivisor */
EmbeddedSlot /* SlotType */
diff --git a/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index 42dc54a892..965d8efe57 100644
--- a/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -157,6 +157,27 @@ Cp2XhciInit (
MV_GPIO_DRIVER_TYPE_SOC_CONTROLLER);
}
+STATIC CONST MV_GPIO_PIN mApSdMmcPins[] = {
+ {
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
+ CN9130_DB_IO_EXPANDER0,
+ CN9130_DB_AP_MMC_VCCQ_PIN,
+ TRUE,
+ },
+};
+
+STATIC
+EFI_STATUS
+EFIAPI
+ApSdMmcInit (
+ IN NON_DISCOVERABLE_DEVICE *This
+ )
+{
+ return ConfigurePins (mApSdMmcPins,
+ ARRAY_SIZE (mApSdMmcPins),
+ MV_GPIO_DRIVER_TYPE_PCA95XX);
+}
+
STATIC CONST MV_GPIO_PIN mCp0SdMmcPins[] = {
{
MV_GPIO_DRIVER_TYPE_PCA95XX,
@@ -206,6 +227,8 @@ NonDiscoverableDeviceInitializerGet (
if (Type == NonDiscoverableDeviceTypeSdhci) {
switch (Index) {
+ case 0:
+ return ApSdMmcInit;
case 1:
return Cp0SdMmcInit;
}
--
2.29.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [edk2-platforms PATCH 6/6] Marvell/Cn913xDb: Introduce SD/MMC ACPI description
2021-04-19 8:48 [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
` (4 preceding siblings ...)
2021-04-19 8:49 ` [edk2-platforms PATCH 5/6] Marvell/Cn913xDb: Update AP807 MMC settings Marcin Wojtas
@ 2021-04-19 8:49 ` Marcin Wojtas
2021-04-19 8:52 ` [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
6 siblings, 0 replies; 11+ messages in thread
From: Marcin Wojtas @ 2021-04-19 8:49 UTC (permalink / raw)
To: devel; +Cc: leif, ardb+tianocore, mw, jaz, kostap, upstream
This patch adds a new description of the board's SD/MMC
interfaces in DSDT table that can work with the newly
introduced support in Linux.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn913xDbA/Dsdt.asl | 59 ++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn913xDbA/Dsdt.asl b/Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn913xDbA/Dsdt.asl
index 470ae047f9..30de868907 100644
--- a/Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn913xDbA/Dsdt.asl
+++ b/Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn913xDbA/Dsdt.asl
@@ -62,6 +62,65 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "MVEBU ", "CN9130", 3)
})
}
+ Device (MMC0)
+ {
+ Name (_HID, "MRVL0003") // _HID: Hardware ID
+ Name (_UID, 0x00) // _UID: Unique ID
+ Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
+
+ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
+ {
+ Memory32Fixed (ReadWrite,
+ 0xF06E0000, // Address Base (MMIO)
+ 0x00000300, // Address Length
+ )
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
+ {
+ 48
+ }
+ })
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "clock-frequency", 400000000 },
+ Package () { "bus-width", 8 },
+ Package () { "no-sd", 0x1 },
+ Package () { "no-sdio", 0x1 },
+ Package () { "mmc-ddr-1_8v", 0x1 },
+ Package () { "mmc-hs400-1_8v", 0x1 },
+ Package () { "non-removable", 0x1 },
+ }
+ })
+ }
+
+ Device (MMC1)
+ {
+ Name (_HID, "MRVL0004") // _HID: Hardware ID
+ Name (_UID, 0x01) // _UID: Unique ID
+ Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
+
+ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
+ {
+ Memory32Fixed (ReadWrite,
+ 0xF2780000, // Address Base (MMIO)
+ 0x00000300, // Address Length
+ )
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
+ {
+ CP_GIC_SPI_CP0_SDMMC
+ }
+ })
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "clock-frequency", 400000000 },
+ Package () { "bus-width", 4 },
+ Package () { "broken-cd", 0x1 },
+ Package () { "no-1-8-v", 0x1 },
+ }
+ })
+ }
+
Device (XHC0)
{
Name (_HID, "PNP0D10") // _HID: Hardware ID
--
2.29.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [edk2-platforms PATCH 0/6] Marvell SD/MMC updates
2021-04-19 8:48 [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
` (5 preceding siblings ...)
2021-04-19 8:49 ` [edk2-platforms PATCH 6/6] Marvell/Cn913xDb: Introduce SD/MMC ACPI description Marcin Wojtas
@ 2021-04-19 8:52 ` Marcin Wojtas
2021-04-30 18:04 ` Marcin Wojtas
6 siblings, 1 reply; 11+ messages in thread
From: Marcin Wojtas @ 2021-04-19 8:52 UTC (permalink / raw)
To: edk2-devel-groups-io
Cc: Leif Lindholm, Ard Biesheuvel, Grzegorz Jaszczyk,
Kostya Porotchkin, upstream
pon., 19 kwi 2021 o 10:49 Marcin Wojtas <mw@semihalf.com> napisał(a):
>
> Hi,
>
> This series applies modifications to the MMC settings
> on the platforms based on the Marvell SoCs.
> Where possible, higher speeds are enabled.
> Moreover a DSDT description is added, which allows
> to make use of the SD/MMC in the OS booted with ACPI.
>
> More details can be found in the commit logs.
> The patchest is publicly available in the github:
> https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/misc-uspstream-r20210416
Correct link:
https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/mmc-upstream-r20210419
I am looking forward to your review.
Best regards,
Marcin
>
> Best regards,
> Marcin
>
> Marcin Wojtas (6):
> Marvell/Armada80x0Db: Update CP0 MMC settings
> Marvell/Armada80x0Db: Introduce SD/MMC ACPI description
> Marvell/Armada70x0Db: Update CP0 MMC settings
> Marvell/Armada70x0Db: Introduce SD/MMC ACPI description
> Marvell/Cn913xDb: Update AP807 MMC settings
> Marvell/Cn913xDb: Introduce SD/MMC ACPI description
>
> Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
> Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
> Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c | 2 +-
> Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 79 +++++++++++++++-----
> Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c | 2 +-
> Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c | 8 +-
> Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 23 ++++++
> Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Dsdt.asl | 56 ++++++++++++++
> Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Dsdt.asl | 59 +++++++++++++++
> Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn913xDbA/Dsdt.asl | 59 +++++++++++++++
> 10 files changed, 266 insertions(+), 24 deletions(-)
>
> --
> 2.29.0
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-platforms PATCH 0/6] Marvell SD/MMC updates
2021-04-19 8:52 ` [edk2-platforms PATCH 0/6] Marvell SD/MMC updates Marcin Wojtas
@ 2021-04-30 18:04 ` Marcin Wojtas
2021-05-10 16:07 ` Ard Biesheuvel
0 siblings, 1 reply; 11+ messages in thread
From: Marcin Wojtas @ 2021-04-30 18:04 UTC (permalink / raw)
To: Leif Lindholm, Ard Biesheuvel
Cc: Grzegorz Jaszczyk, edk2-devel-groups-io, Kostya Porotchkin,
upstream
Hi,
pon., 19 kwi 2021 o 10:52 Marcin Wojtas <mw@semihalf.com> napisał(a):
>
> pon., 19 kwi 2021 o 10:49 Marcin Wojtas <mw@semihalf.com> napisał(a):
> >
> > Hi,
> >
> > This series applies modifications to the MMC settings
> > on the platforms based on the Marvell SoCs.
> > Where possible, higher speeds are enabled.
> > Moreover a DSDT description is added, which allows
> > to make use of the SD/MMC in the OS booted with ACPI.
> >
> > More details can be found in the commit logs.
> > The patchest is publicly available in the github:
> > https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/misc-uspstream-r20210416
>
> Correct link:
> https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/mmc-upstream-r20210419
>
> I am looking forward to your review.
>
Do you have any comments/remarks to the patchset?
Best regards,
Marcin
> >
> > Best regards,
> > Marcin
> >
> > Marcin Wojtas (6):
> > Marvell/Armada80x0Db: Update CP0 MMC settings
> > Marvell/Armada80x0Db: Introduce SD/MMC ACPI description
> > Marvell/Armada70x0Db: Update CP0 MMC settings
> > Marvell/Armada70x0Db: Introduce SD/MMC ACPI description
> > Marvell/Cn913xDb: Update AP807 MMC settings
> > Marvell/Cn913xDb: Introduce SD/MMC ACPI description
> >
> > Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
> > Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
> > Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c | 2 +-
> > Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 79 +++++++++++++++-----
> > Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c | 2 +-
> > Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c | 8 +-
> > Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 23 ++++++
> > Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Dsdt.asl | 56 ++++++++++++++
> > Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Dsdt.asl | 59 +++++++++++++++
> > Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn913xDbA/Dsdt.asl | 59 +++++++++++++++
> > 10 files changed, 266 insertions(+), 24 deletions(-)
> >
> > --
> > 2.29.0
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-platforms PATCH 0/6] Marvell SD/MMC updates
2021-04-30 18:04 ` Marcin Wojtas
@ 2021-05-10 16:07 ` Ard Biesheuvel
2021-05-10 16:08 ` Marcin Wojtas
0 siblings, 1 reply; 11+ messages in thread
From: Ard Biesheuvel @ 2021-05-10 16:07 UTC (permalink / raw)
To: Marcin Wojtas
Cc: Leif Lindholm, Ard Biesheuvel, Grzegorz Jaszczyk,
edk2-devel-groups-io, Kostya Porotchkin, upstream
On Fri, 30 Apr 2021 at 20:04, Marcin Wojtas <mw@semihalf.com> wrote:
>
> Hi,
>
>
> pon., 19 kwi 2021 o 10:52 Marcin Wojtas <mw@semihalf.com> napisał(a):
> >
> > pon., 19 kwi 2021 o 10:49 Marcin Wojtas <mw@semihalf.com> napisał(a):
> > >
> > > Hi,
> > >
> > > This series applies modifications to the MMC settings
> > > on the platforms based on the Marvell SoCs.
> > > Where possible, higher speeds are enabled.
> > > Moreover a DSDT description is added, which allows
> > > to make use of the SD/MMC in the OS booted with ACPI.
> > >
> > > More details can be found in the commit logs.
> > > The patchest is publicly available in the github:
> > > https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/misc-uspstream-r20210416
> >
> > Correct link:
> > https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/mmc-upstream-r20210419
> >
> > I am looking forward to your review.
> >
>
> Do you have any comments/remarks to the patchset?
>
For the series,
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Pushed as 7661dfff1528..c7e1631a673f
thanks,
> > >
> > > Best regards,
> > > Marcin
> > >
> > > Marcin Wojtas (6):
> > > Marvell/Armada80x0Db: Update CP0 MMC settings
> > > Marvell/Armada80x0Db: Introduce SD/MMC ACPI description
> > > Marvell/Armada70x0Db: Update CP0 MMC settings
> > > Marvell/Armada70x0Db: Introduce SD/MMC ACPI description
> > > Marvell/Cn913xDb: Update AP807 MMC settings
> > > Marvell/Cn913xDb: Introduce SD/MMC ACPI description
> > >
> > > Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
> > > Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
> > > Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c | 2 +-
> > > Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 79 +++++++++++++++-----
> > > Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c | 2 +-
> > > Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c | 8 +-
> > > Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 23 ++++++
> > > Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Dsdt.asl | 56 ++++++++++++++
> > > Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Dsdt.asl | 59 +++++++++++++++
> > > Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn913xDbA/Dsdt.asl | 59 +++++++++++++++
> > > 10 files changed, 266 insertions(+), 24 deletions(-)
> > >
> > > --
> > > 2.29.0
> > >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-platforms PATCH 0/6] Marvell SD/MMC updates
2021-05-10 16:07 ` Ard Biesheuvel
@ 2021-05-10 16:08 ` Marcin Wojtas
0 siblings, 0 replies; 11+ messages in thread
From: Marcin Wojtas @ 2021-05-10 16:08 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Leif Lindholm, Ard Biesheuvel, Grzegorz Jaszczyk,
edk2-devel-groups-io, Kostya Porotchkin, upstream
pon., 10 maj 2021 o 18:07 Ard Biesheuvel <ardb@kernel.org> napisał(a):
>
> On Fri, 30 Apr 2021 at 20:04, Marcin Wojtas <mw@semihalf.com> wrote:
> >
> > Hi,
> >
> >
> > pon., 19 kwi 2021 o 10:52 Marcin Wojtas <mw@semihalf.com> napisał(a):
> > >
> > > pon., 19 kwi 2021 o 10:49 Marcin Wojtas <mw@semihalf.com> napisał(a):
> > > >
> > > > Hi,
> > > >
> > > > This series applies modifications to the MMC settings
> > > > on the platforms based on the Marvell SoCs.
> > > > Where possible, higher speeds are enabled.
> > > > Moreover a DSDT description is added, which allows
> > > > to make use of the SD/MMC in the OS booted with ACPI.
> > > >
> > > > More details can be found in the commit logs.
> > > > The patchest is publicly available in the github:
> > > > https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/misc-uspstream-r20210416
> > >
> > > Correct link:
> > > https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/mmc-upstream-r20210419
> > >
> > > I am looking forward to your review.
> > >
> >
> > Do you have any comments/remarks to the patchset?
> >
>
> For the series,
>
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
>
>
> Pushed as 7661dfff1528..c7e1631a673f
>
Thanks!
Marcin
> thanks,
>
> > > >
> > > > Best regards,
> > > > Marcin
> > > >
> > > > Marcin Wojtas (6):
> > > > Marvell/Armada80x0Db: Update CP0 MMC settings
> > > > Marvell/Armada80x0Db: Introduce SD/MMC ACPI description
> > > > Marvell/Armada70x0Db: Update CP0 MMC settings
> > > > Marvell/Armada70x0Db: Introduce SD/MMC ACPI description
> > > > Marvell/Cn913xDb: Update AP807 MMC settings
> > > > Marvell/Cn913xDb: Introduce SD/MMC ACPI description
> > > >
> > > > Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
> > > > Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.h | 1 +
> > > > Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c | 2 +-
> > > > Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 79 +++++++++++++++-----
> > > > Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c | 2 +-
> > > > Platform/Marvell/Cn913xDb/BoardDescriptionLib/Cn9130DbABoardDescLib.c | 8 +-
> > > > Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 23 ++++++
> > > > Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Dsdt.asl | 56 ++++++++++++++
> > > > Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Dsdt.asl | 59 +++++++++++++++
> > > > Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn913xDbA/Dsdt.asl | 59 +++++++++++++++
> > > > 10 files changed, 266 insertions(+), 24 deletions(-)
> > > >
> > > > --
> > > > 2.29.0
> > > >
^ permalink raw reply [flat|nested] 11+ messages in thread