Message ID | 20241127-gs101-phy-lanes-orientation-phy-v1-0-1b7fce24960b@linaro.org |
---|---|
Headers | show
Return-Path: <linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D700AD609D1 for <linux-phy@archiver.kernel.org>; Wed, 27 Nov 2024 10:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZbiESOsgrnwhYwNfSVJF6OIzXvEJ0twzSfmdpmnTuXM=; b=yjnU+wpXDLBNc6 eqrxy/jfsaXc2KWKuNcTlGh3DCE263ikeffuJnJ4a/aaUM/oxK2+trUOHcxMHj6afCX+pg/I2pw5i +mw1hGsIkvFuEYk9tCqLzbZIIpOsAK9021L04K2aAYatY/wWEZLsGY6TqBCcCJZpsbYfHNXY9Rdke MPlFAeS40K+XIF7rAr1MziAJAHwnOPUePizUGhOnsUklx8Mchd5jHNJKwe69XdxHm4WXvcKljjKMK 1WLEaBdk30wJlbfb8e9pqIE1jqwUMdR6RKEDTx0TX74R2MrzGKK5ycfzlCLpUVRGNve5H9WkXNfdk 3OWRzGTYX/u0lHbnsSQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tGFkO-0000000CvEe-2fu6; Wed, 27 Nov 2024 10:58:16 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tGFkM-0000000CvBV-1xOv for linux-phy@lists.infradead.org; Wed, 27 Nov 2024 10:58:15 +0000 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5cfadf851e2so8763296a12.2 for <linux-phy@lists.infradead.org>; Wed, 27 Nov 2024 02:58:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732705092; x=1733309892; darn=lists.infradead.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=FnSBghT1PQvjEoqKzE6lYaSFxfTQgIMEYx5M8qLoZaE=; b=bqEHQRIdOeBN8aMZQ8+uU9psoh946dD6ssfoXFMWN6t5WWedmwgi/4q7jgfRlLELlV Y2LpOxAe0QPmOdUbIsi/ZXi1a8gRwsOpYYOkH8lhPSz6iA4nO9PThgrU5oczZY7Tzerl +ukHf8aOzygWZIRZpojCsiEpuX6a5D4ffZju+0KQ7NYMhIBcl1W6Y0DfxKZyMJ2ggOPB eEIo4blO/7H2jKtnKVPyVuUhAFg61AaVpbC3+mvNWJo6Pj8v2BZIu7U9U2K6hO47tQlm Lw1dXEYjFrccKmUCBOsVAYHKK61fmC30W7KQztGdIGM30vgG8EFDjVCeJCbhObrCiw1h n0Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732705092; x=1733309892; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FnSBghT1PQvjEoqKzE6lYaSFxfTQgIMEYx5M8qLoZaE=; b=UhncERqj04BnmzzqEwEMfQ0EMyWDezineXKu6wRlBammGyRhsrP1ImqurK3Xdn+LMt 1ooI4rDGMXTnAOxsWIzESrVaUD2YVKsBgwRHS/h93rKVm4DgMioVQ+PKDtakgJkBQBzE Q/vZ6kQvwKrzdJzOZQPgTF0tVNM+ocpw2ifZ3OC2rNSY2hVCW1tHe7ngeRCMVTzllPb1 lk2D6/tJeS9e4mBilbH+4WOKbu3YBU3eMCGVfeXmzY7I0vQ9Eoym7BQ3I1hfC9zxUNQJ ETSy8tG0gVXTXmhC2wPXGgq2eoPA+ir3FRJTBlQ6US/556DKBrgDS68lAuWkQoFjfa9W wRzg== X-Forwarded-Encrypted: i=1; AJvYcCXoTeWNAqpdAAYsb+YhD4AeRQnSvVLWigvLPbokUEjvUHqlCB+pW5DUfKL97nvn45yu2xRvyjkj2Dc=@lists.infradead.org X-Gm-Message-State: AOJu0YyhrS3UG+XSPzQDo1UxfWgtY5MJXvB2GW5UUyBbyuxuYCNrXrZz Ye2zekA072C8SS+6EKLRejXOflbWiJJJvsn9ppek6bmfj0PHmuKQJfxzezn45lI= X-Gm-Gg: ASbGnct1ds9PpujuxSZHCSi5MlmeiX5IQjoqh0++CpDWlM77YIz0xAZOQ8kckKCrkZM dcyHKiv1CdnZJeyi+EMisqIl/cczjBhah7mTnd8Le/s1TuuQHoo4jxDfRx/+KU0W93Z29nY07HQ df3Y6eu4FxpcN7t9Pp+aHTY+r/YdnPWNYvb9LMy1CPEMhbTPwf3hiuSVRRWd6Cz7CKOzAQDGlMY 8R3lcML8g7T4zEIrtLVk+3sSBI2BSGymRB5zmzZuD16DY0ol77R6mOofVU12F8b9UOD2hFhEv+Z QrHvpt62tAp/vJZh4iXvYa5g+bcKCsgbcQ== X-Google-Smtp-Source: AGHT+IHtqYL91H6SMMvksK3ZTB/2Fzc9xaGKysfgcuXFtHMmqYC6TditIFw1AYITQuYQn85K2iSkAQ== X-Received: by 2002:a17:906:1bb2:b0:aa2:c73:3720 with SMTP id a640c23a62f3a-aa58107846bmr200250766b.58.1732705092241; Wed, 27 Nov 2024 02:58:12 -0800 (PST) Received: from puffmais.c.googlers.com (64.227.90.34.bc.googleusercontent.com. [34.90.227.64]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa54a6db906sm412183566b.41.2024.11.27.02.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2024 02:58:11 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@linaro.org> Subject: [PATCH 0/9] USB31DRD phy updates for Google Tensor gs101 (orientation & DWC3 rpm) Date: Wed, 27 Nov 2024 10:58:10 +0000 Message-Id: <20241127-gs101-phy-lanes-orientation-phy-v1-0-1b7fce24960b@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAEL7RmcC/x2NQQqDQAxFryJZG5iEoa1epbgYnFQDZZSJFEW8e 4PL9+G9f4JJVTHomxOq/NR0KQ7UNjDOqUyCmp2BA0cifuJkFAjX+cBvKmK4uF62tLl3r9xlDuM jv2Jm8Mpa5aP7/fAerusPwzyMdXEAAAA= To: Vinod Koul <vkoul@kernel.org>, Kishon Vijay Abraham I <kishon@kernel.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Marek Szyprowski <m.szyprowski@samsung.com>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Alim Akhtar <alim.akhtar@samsung.com> Cc: Peter Griffin <peter.griffin@linaro.org>, Tudor Ambarus <tudor.ambarus@linaro.org>, Sam Protsenko <semen.protsenko@linaro.org>, Will McVicker <willmcvicker@google.com>, Roy Luo <royluo@google.com>, kernel-team@android.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@linaro.org> X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241127_025814_495434_22A44933 X-CRM114-Status: UNSURE ( 8.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list <linux-phy.lists.infradead.org> List-Unsubscribe: <https://lists.infradead.org/mailman/options/linux-phy>, <mailto:linux-phy-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-phy/> List-Post: <mailto:linux-phy@lists.infradead.org> List-Help: <mailto:linux-phy-request@lists.infradead.org?subject=help> List-Subscribe: <https://lists.infradead.org/mailman/listinfo/linux-phy>, <mailto:linux-phy-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-phy" <linux-phy-bounces@lists.infradead.org> Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org |
Series |
USB31DRD phy updates for Google Tensor gs101 (orientation & DWC3 rpm)
|
expand
|
Hi, This series enables USB3 Type-C lane orientation detection and configuration on platforms that support this (Google gs101), and it also allows the DWC3 core to enter runtime suspend even when UDC is active. For lane orientation, this driver now optionally (based on DT) subscribes to the TCPC's lane orientation notifier and remembers the orientation to later be used during phy_init(). To enable DWC3 runtime suspend, the gadget needs to inform the core via dwc3_gadget_interrupt() with event type == DWC3_DEVICE_EVENT_DISCONNECT of a cable disconnect. For that to allow to happen, this driver therefore needs to stop forcing the Vbus and bvalid signals to active and instead change their state based on actual conditions. The same TCPC notifier is used to detect this, and program the hardware accordingly. That signal state is based on advice given by Thinh in https://lore.kernel.org/all/20240813230625.jgkatqstyhcmpezv@synopsys.com/ Both changes together now allow cable orientation detection to work, as the DWC3 will now call phy_exit() on cable disconnect, and we can reprogram the lane mux in phy_init(). On top of that, there are some small related cleanup patches. Signed-off-by: André Draszik <andre.draszik@linaro.org> --- André Draszik (9): dt-bindings: phy: samsung,usb3-drd-phy: align to universal style dt-bindings: phy: samsung,usb3-drd-phy: add optional orientation-switch dt-bindings: phy: samsung,usb3-drd-phy: gs101: require Type-C properties phy: exynos5-usbdrd: convert to dev_err_probe phy: exynos5-usbdrd: fix EDS distribution tuning (gs101) phy: exynos5-usbdrd: gs101: ensure power is gated to SS phy in phy_exit() phy: exynos5-usbdrd: gs101: configure SS lanes based on orientation phy: exynos5-usbdrd: subscribe to orientation notifier if required phy: exynos5-usbdrd: allow DWC3 runtime suspend with UDC bound (E850+) .../bindings/phy/samsung,usb3-drd-phy.yaml | 20 ++ drivers/phy/samsung/Kconfig | 1 + drivers/phy/samsung/phy-exynos5-usbdrd.c | 222 ++++++++++++++++----- 3 files changed, 197 insertions(+), 46 deletions(-) --- base-commit: ed9a4ad6e5bd3a443e81446476718abebee47e82 change-id: 20241127-gs101-phy-lanes-orientation-phy-29d20c6d84d2 Best regards,