Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp240828lqr; Wed, 5 Jun 2024 04:59:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWjFkE5Rw7iFuYtIqXBCv3vS+1bAXOnvurw8tXO/aYS7sH1clu3dx6Jf61Q5kejQ8f0ziAdiLfLIjlr9it/ei7K7/jjQSPzjhKd/4N3A== X-Google-Smtp-Source: AGHT+IH2DYobXYLG46pQisL6W38CVLc4XRYV6h0xqejNMj/HRPpgqhANkV/EX3IxJ2BmQNnFilGQ X-Received: by 2002:a50:8e02:0:b0:579:c08b:af9f with SMTP id 4fb4d7f45d1cf-57a8b676ff3mr1724910a12.1.1717588779777; Wed, 05 Jun 2024 04:59:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717588779; cv=pass; d=google.com; s=arc-20160816; b=z9BMx18JJgCpEdQ7Nj/lP+Z5swB+g1lnyTEG3NsAmCbgOKIbYsFJHJVyW/WPKtVbG8 TnJBbufOyD+6OpPf1VDsx8dPgEvMCvy5JCt9nCNy02DSkVRevKj7CCgd7VmPPPjxLK8b zAdLodhwJie2oB6DkdsltpZGHil46XOYzKTkdk6uQJs42nxKrDZ5sNvm7pQgbJ5uoRQB C7eSXxik38uVAMmmI+MMot6b1B8XPF9H9zyujUzSeO3/pcavnmLCMk54E0Cb5S2IIGkD tyf/PBa0v3dI+TFopHloMbcbeuvseFSvmYmF69OGP7sFXcd7Ko+EPqaioOro/UDHuywY kTNQ== 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=VR5hHBNzTSAf6y0xmLXlSL23aF6QDJ1pDN71STa/SPTIkL65XmbkaRr1UJBglS1JcN vCoQNxdQ8eJVwJh4eor7Dhjk9ryRm0UeohOEEpZ6k2yvzrV5Hn6d8dqsUc/cRfxC1lzO k7ElbkRB61TX4muP4OY5/E/4Hx5aBKe8m2Pi/M1P+327Wn8nBJEKX7rcpU+hq1ogqvee 1VTLa5eb3jouH3K0xoTOb7BGTsZDfvziPHugbmrE3XyubD+lXyTpJ+VahTXHxJsLYkq9 e+gu9GAj63Gfb12vWnkeaPlaAK78FSGTtYppFVN9LDDAdRzZjBwIuAamRIUJ5gyOkwzB 2Mlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bDzxf0yO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202337-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a86951c13si1399807a12.65.2024.06.05.04.59.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 04:59:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bDzxf0yO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202337-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 804B21F249B7 for ; Wed, 5 Jun 2024 11:59:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B75819EEBB; Wed, 5 Jun 2024 11:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bDzxf0yO" 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 3D65119E7EF; Wed, 5 Jun 2024 11:51:14 +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=1717588274; cv=none; b=W1QOxLl4v+y82yX130lPPEJ3M4bOW+OMGz4moHX8/B4tpPQkNTJjOeabdgnqVtIcNeBZhKL0iN0CIjC+WU6aO4sRY6E7wn9SY+m0sIlvq3xc4TcpMz0RlaBe8TfNaOHf1lr3e/DWte+E7p7ESSy/5y9dXLzkeCeYgi9LvfmzTl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717588274; c=relaxed/simple; bh=6KgIFqyKayKEXnNF/obBfmrkXcZtNXQT4U+oTZVIPK0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uXAWoJRIm/5dfhdBH2X7XLlqYyPP+kCRsLxy1mcpMdcqlNQl4ePjeEMR0IyN+q5ZKImM9CzMSR986ORTGWcoca9v6y/nZGc1GyZe/DmoOsE3uDpXnmaJfrbPCDmmN7egAWR41APH/q8PyVsRURxe/z1/yKlkIwXHg4lKJzfX4o4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bDzxf0yO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AED8C4AF0A; Wed, 5 Jun 2024 11:51:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717588274; bh=6KgIFqyKayKEXnNF/obBfmrkXcZtNXQT4U+oTZVIPK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bDzxf0yOsqw8QrUQBP+vytYg5uKFtKUAsqp2pd4lZJptG7hCNBFgBVehk5KFe0Zn1 nQ72IJDwDk+zWqRRZSjdn+MwoKyUF5cd0YfoKVQYLlsR7/N4wqKxuICNyENRKFNOsd WQK+dNJQuTHv97N1C/VMlZBiUXsbPYDp9+03jqLsgXL/fhaA6yhGPmynA8WW3S4Dhf GUK4ziP8ibIJPz22oVR0rZWuROqFJ62iKlNN5RAJwtuJa63z4jzFBErGsu4qejL7xT jummmhsPTqFRg+ILdfKgzilyLu76kPUjQJoY9EyeyH43xx9nDCMUWrIrEkYKhV1gcG jErZU328ysJgQ== 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.8 06/24] usb: dwc3: pci: Don't set "linux,phy_charger_detect" property on Lenovo Yoga Tab2 1380 Date: Wed, 5 Jun 2024 07:50:16 -0400 Message-ID: <20240605115101.2962372-6-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240605115101.2962372-1-sashal@kernel.org> References: <20240605115101.2962372-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.8.12 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