@@ -80,6 +80,7 @@ struct sdhci_acpi_host {
80
80
enum {
81
81
DMI_QUIRK_RESET_SD_SIGNAL_VOLT_ON_SUSP = BIT (0 ),
82
82
DMI_QUIRK_SD_NO_WRITE_PROTECT = BIT (1 ),
83
+ DMI_QUIRK_SD_CD_ACTIVE_HIGH = BIT (2 ),
83
84
};
84
85
85
86
static inline void * sdhci_acpi_priv (struct sdhci_acpi_host * c )
@@ -747,6 +748,26 @@ static const struct dmi_system_id sdhci_acpi_quirks[] = {
747
748
},
748
749
.driver_data = (void * )DMI_QUIRK_RESET_SD_SIGNAL_VOLT_ON_SUSP ,
749
750
},
751
+ {
752
+ /*
753
+ * Lenovo Yoga Tablet 2 Pro 1380F/L (13" Android version) this
754
+ * has broken WP reporting and an inverted CD signal.
755
+ * Note this has more or less the same BIOS as the Lenovo Yoga
756
+ * Tablet 2 830F/L or 1050F/L (8" and 10" Android), but unlike
757
+ * the 830 / 1050 models which share the same mainboard this
758
+ * model has a different mainboard and the inverted CD and
759
+ * broken WP are unique to this board.
760
+ */
761
+ .matches = {
762
+ DMI_MATCH (DMI_SYS_VENDOR , "Intel Corp." ),
763
+ DMI_MATCH (DMI_PRODUCT_NAME , "VALLEYVIEW C0 PLATFORM" ),
764
+ DMI_MATCH (DMI_BOARD_NAME , "BYT-T FFD8" ),
765
+ /* Full match so as to NOT match the 830/1050 BIOS */
766
+ DMI_MATCH (DMI_BIOS_VERSION , "BLADE_21.X64.0005.R00.1504101516" ),
767
+ },
768
+ .driver_data = (void * )(DMI_QUIRK_SD_NO_WRITE_PROTECT |
769
+ DMI_QUIRK_SD_CD_ACTIVE_HIGH ),
770
+ },
750
771
{
751
772
/*
752
773
* The Toshiba WT8-B's microSD slot always reports the card being
@@ -867,6 +888,9 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
867
888
if (sdhci_acpi_flag (c , SDHCI_ACPI_SD_CD )) {
868
889
bool v = sdhci_acpi_flag (c , SDHCI_ACPI_SD_CD_OVERRIDE_LEVEL );
869
890
891
+ if (quirks & DMI_QUIRK_SD_CD_ACTIVE_HIGH )
892
+ host -> mmc -> caps2 |= MMC_CAP2_CD_ACTIVE_HIGH ;
893
+
870
894
err = mmc_gpiod_request_cd (host -> mmc , NULL , 0 , v , 0 );
871
895
if (err ) {
872
896
if (err == - EPROBE_DEFER )
0 commit comments