Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp257208lqr; Wed, 5 Jun 2024 05:25:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUgLFWk+tfGf2QpNImTp3YtZT/REth5TDs6U1evV1iyfz1jV4lrs4vZqf9QS1NogegGdyOhquyEfs/JEkdQIpbSS6c2XtYIyXsLsWmU5A== X-Google-Smtp-Source: AGHT+IGfDwCVsfHKk+m9+3uJcW/u/pbeSooby+rE+RHIckG4Y9NHoVB0tpn8IpNJlEcEujDn5f3/ X-Received: by 2002:a05:6a20:8422:b0:1b2:b220:2db9 with SMTP id adf61e73a8af0-1b2b6e2d3a3mr3223639637.9.1717590318941; Wed, 05 Jun 2024 05:25:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717590318; cv=pass; d=google.com; s=arc-20160816; b=DD31uVIP0qNg7TT4su6I+xKYhFxQMJyC+Y+6kwv+0+ySBOwcZTW3wdZA5i5Tp0Df08 dQMZ3iq8d3Z2PaCQeMxgyTX33I2o/ZNunwOR2KN7+3v2D0/5bLUkRj8HeYtLzAEuS9br YI/Io9Hcv+bABsH8IwjLAsDWFA+/ahlc2MozAi9O/RiONUEW/FsoQK9XYQVk0bWCcsgX G7qQk+GlFDpu5rfMnZesN4ObiFGwE/3RTst9W1fGtts8saRjRJWucoDxjOvdSeclQlIB x/OhrktPj5r0qd3siIcrFoR4jBzqOUfk/iSrHBorfCu/UOa3qNgnqLRM7acKFiALA2Ty icSg== 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=GahpV/5e/O9n4QLPu3vJy1+kaVU4J5DHQ54ijXG8x+c=; fh=QQMoJ7L/zOZ3klhhGGMQ+4QAFOXqt95CWQ26cLt+Xic=; b=TBMVB+7pXalJqbv1dj6Na0J/zeqUMkHGsBg0cVOtCu15dEnsznpDMkrsaJLv55OUIU 9AQr4iZf5psXFvCpQVVEav8URU6i2bBA6RH9Q2ADyvKfkQlx1AQlL6ARbo5XLLe+eRVo rDlZ6afb02lsRYGT/lhRbqDHaiAgxGHZQGTTPgl2A75HC2WNNVvJHdr1yCISIPb3cTGX 1gJ7JPtUtpR7E/DH1KUlmtoXHH+COeLUiCfshC0ABt3UO57SHfg8k4/gRkYbsbawH+Or SF3oV1q88cQOEq7wQykTWZJg9y/pQE6OBfTs8oti5JWRBd8BGttUuvrDrTl6joGVIJvv 9XAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c0iMoWk1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-70276531d94si4742459b3a.10.2024.06.05.05.25.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 05:25:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c0iMoWk1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202382-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E03AE28C93C for ; Wed, 5 Jun 2024 12:11:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A56D5196DB7; Wed, 5 Jun 2024 11:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c0iMoWk1" 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 C09B2196D95; Wed, 5 Jun 2024 11:53:41 +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=1717588421; cv=none; b=mUYH6z5ku4AS2uvLlWGx8R7VtC/su2MciY4Cx0G4fQLz2THLz51AMq9FXiXfaW+xmpwLIEl4cp3ehIu0CPZp0/A8Fm01fSYQpwTUlKinEVVGZrP2STkTTha0RwX1G9t+mV8FibxRG3trpl/6U5lrDwj4q3m5PH8BTQnuHxjCFa4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717588421; c=relaxed/simple; bh=QpQAPRQYmwJRJjhbalApNjUg1YtzVBQoY0SC40djM98=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jv/6+9wEdDdsw/WExidEmpfsZOwPPcd9r7tMXvDTu1vPDEDiZeunOJoDcqN6orHq2SyzuSm9l14nRZLqv9hGx+0n3IlmUrVtlsuINxHrTg/DPha3C/l2PPgwGCtMiRZjsQvZME850Q2/AGrI1xuSfZaxHJxYDUyNRhH32ZYMQv0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c0iMoWk1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2F5FC4AF08; Wed, 5 Jun 2024 11:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717588421; bh=QpQAPRQYmwJRJjhbalApNjUg1YtzVBQoY0SC40djM98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c0iMoWk16KKAxl8PSCNOxmI1euGJvaH26JcOROzqRTPIcYXwn/3N7XufPnRNgyHnP p0TxY+BE0Fcs2vdjjL8dXDL9QXQ0JTImAO+kcaWTpA1yuTAMfL4RJ7thzpOsdhlrBa fPHzM7GeFI3/scvxLOGqcARx2HBmQAq4kVbqsV5U8woY6HOjHz9gebx+BTRy6fFWsD QVPJRfLyI/E+NPl/Z7rfCY2qSOI/8kVLY7gmg4IdK4GSuP6CiwfVEh7O8cH/IC1XVW rs4DCjtW8KcZwLYRw4x7rcgpDy7BVVFFYhhluEr5bWJI0KdoVqdnGjmPi8aYeII5UO 2IpLET0/dzAag== 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.1 04/12] usb: dwc3: pci: Don't set "linux,phy_charger_detect" property on Lenovo Yoga Tab2 1380 Date: Wed, 5 Jun 2024 07:53:09 -0400 Message-ID: <20240605115334.2963803-4-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240605115334.2963803-1-sashal@kernel.org> References: <20240605115334.2963803-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.1.92 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 ae25ee832ec03..6110ab1f91318 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 @@ -219,6 +220,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 */ @@ -276,8 +278,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