Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp245320lqr; Wed, 5 Jun 2024 05:05:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXNQ0NVs6Q3CC+Y54XQP2X5p91Vi2f6JoMSGdYkhSDNFg/T7Qm2H4C6DFh2/jKu8Sf2OKAIrFH98BTgkfrKZ4s71QKV0Ja2bIbPmCh5Eg== X-Google-Smtp-Source: AGHT+IGUBFwjk+/YDKBWZvc/FqtgBxjo4mlFtsgb4bfSetgzbCQRa4pWg09p0/ut02kz3mjvgtdP X-Received: by 2002:a05:622a:1a15:b0:43a:d39a:45bc with SMTP id d75a77b69052e-4402b6df99amr19688211cf.49.1717589135763; Wed, 05 Jun 2024 05:05:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717589135; cv=pass; d=google.com; s=arc-20160816; b=raW5/1t4SWrwrn5qV6Oe9/d2N42iXDcjv0wOv38Gzi5AkztlSmuE39Iia+qkV2Lm0M KIuDNKlCBWgoNXdLbF5cJ/mamd+d2+Nxr9iouXRXZN4/npvXuceYWEeArb7u0+EfbJ6P WAZGqPf3nUhwOMSBD2Qy3oqjy2z0GWBq4dB9HX7PM1M9cpa0SI8cziIBQt+iMRnYtmdf VkPVXY0WLOqURRzGGwvmIrVMhsE+YO8dpdOGYdqtwubFZUmP0poJG7lkT+qj6HZylLbL dZjRSSLhwYFhzKd6u9cxldy2b595Frz4DDnwgj9sWuU/eM+f74sr4RMuZRrQe5AB8sng YCtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=81gftR0ktACrkrzFN3/FrmJW9LLOHO5lhN9OEEV4YNs=; fh=QQMoJ7L/zOZ3klhhGGMQ+4QAFOXqt95CWQ26cLt+Xic=; b=NYhtNHZUop7gdRIYoWJCzrxRQfivyYsI4meOsHMKugAevzVVLta69jSHK5pwPVrSIq 1qEyvYwSFtnXnqxPVAeknul3iJHlMXrU0mEh/Rsb5T/6k1H3Q8iGLXoX+aS1xjRAqRx9 CSlWlfvCCKYEo+v2wixulvJ3vbXuc+Neas+l2mewHD44opf1sY1WBUzpe2Gsa7C7J2b9 MQk7i/4wMG9Gk9vSoxXU0T6+vL7peEwNaqCNOlq++8rgYbHNAi7oyT7Er0ClcMnJkF8N xH7PGGowesc/XpM2daAZkOT04fek4/5YpvjgvndqzH1foja+iW5oK91kfoWhlEE2r5Pp ApaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="L/EnJ5dr"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202360-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202360-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff23ae294si134472151cf.95.2024.06.05.05.05.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 05:05:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202360-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="L/EnJ5dr"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202360-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202360-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 679F61C236A1 for ; Wed, 5 Jun 2024 12:05:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C13D51ABCB3; Wed, 5 Jun 2024 11:52:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L/EnJ5dr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D78DB19599F; Wed, 5 Jun 2024 11:52:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717588354; cv=none; b=K6MiXGNTSM8WFWTGPxwMJU1S+YcHMJwlSozyfpS6kZdgIdmzCuK2RwKYuHRCD2LBGXAGD2nUYx0IADo7UQHrpcRB9G1KV87UYgeH6XSD2MkZAWuP7prxCdAEFXJXevUahtr0mhinky+/hc/6yC1s9w1KkXGtRv9+jdSuS1yjKBM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717588354; c=relaxed/simple; bh=6KgIFqyKayKEXnNF/obBfmrkXcZtNXQT4U+oTZVIPK0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nKQZD2kHmj5D81q6HkqV/egZeNrmTSTsCQZA4AloBh9znbUZjZqnhZhJfWgirTbO+S8XjZN22ERUD76eqXhnE0Zk76VCOqJOhAOgchTZDlxjuIx7KwS+mgDeqjzyujG4WrlCBoBTCPn3bcBEACR38iwsZw5+gbP0Et4+ORROEc8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L/EnJ5dr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAEBDC4AF08; Wed, 5 Jun 2024 11:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717588354; bh=6KgIFqyKayKEXnNF/obBfmrkXcZtNXQT4U+oTZVIPK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L/EnJ5dr+STw5LAb2poqDDbdA+XOQjo2HhjXZAVdci25e5eAoPvRQq7lY5RyHNEdF aa87fy2paBMAISDxF635v+kEhxiTY2kPQg0h72HIeublAIBQAdS2dy4TA+GTBlIuOP aNXvXjYHJ43YyUsDyJkZpf9Yj/kHObobtyYIAgWA7nk97yumDn3FCWveDcdgeuDGIv qbzblzSCnX5cQppFVnHyQlwTQw6Pv88tPQOWNt6+3V7pTiFoRffAQQ3YUJqXypXdZ/ GPMjf3Dw7SZrUln/YYheMXtmhNOkjCpJPANwgmMD4Za9JbmrVjvWIDY0nOUzYVsafz 9MPCx3GCO6JFQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , Thinh Nguyen , Greg Kroah-Hartman , Sasha Levin , linux-usb@vger.kernel.org Subject: [PATCH AUTOSEL 6.6 05/20] usb: dwc3: pci: Don't set "linux,phy_charger_detect" property on Lenovo Yoga Tab2 1380 Date: Wed, 5 Jun 2024 07:51:48 -0400 Message-ID: <20240605115225.2963242-5-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240605115225.2963242-1-sashal@kernel.org> References: <20240605115225.2963242-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.32 Content-Transfer-Encoding: 8bit From: Hans de Goede [ Upstream commit 0fb782b5d5c462b2518b3b4fe7d652114c28d613 ] The Lenovo Yoga Tablet 2 Pro 1380 model is the exception to the rule that devices which use the Crystal Cove PMIC without using ACPI for battery and AC power_supply class support use the USB-phy for charger detection. Unlike the Lenovo Yoga Tablet 2 830 / 1050 models this model has an extra LC824206XA Micro USB switch which does the charger detection. Add a DMI quirk to not set the "linux,phy_charger_detect" property on the 1380 model. This quirk matches on the BIOS version to differentiate the 1380 model from the 830 and 1050 models which otherwise have the same DMI strings. Signed-off-by: Hans de Goede Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20240406140127.17885-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/dwc3/dwc3-pci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 497deed38c0c1..9ef821ca2fc71 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -8,6 +8,7 @@ * Sebastian Andrzej Siewior */ +#include #include #include #include @@ -220,6 +221,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc, if (pdev->device == PCI_DEVICE_ID_INTEL_BYT) { struct gpio_desc *gpio; + const char *bios_ver; int ret; /* On BYT the FW does not always enable the refclock */ @@ -277,8 +279,12 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc, * detection. These can be identified by them _not_ * using the standard ACPI battery and ac drivers. */ + bios_ver = dmi_get_system_info(DMI_BIOS_VERSION); if (acpi_dev_present("INT33FD", "1", 2) && - acpi_quirk_skip_acpi_ac_and_battery()) { + acpi_quirk_skip_acpi_ac_and_battery() && + /* Lenovo Yoga Tablet 2 Pro 1380 uses LC824206XA instead */ + !(bios_ver && + strstarts(bios_ver, "BLADE_21.X64.0005.R00.1504101516"))) { dev_info(&pdev->dev, "Using TUSB1211 phy for charger detection\n"); swnode = &dwc3_pci_intel_phy_charger_detect_swnode; } -- 2.43.0