From patchwork Mon Jun 17 16:44:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 13701054 Return-Path: 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 973DCC2BA18 for ; Mon, 17 Jun 2024 16:45:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type: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=n98Gf1QoxzfH++bimpxXb9L5Kij/wsP5fmjbedlrR8w=; b=1bjNW46dyrvjmd JjdfcokCjpcGf732tfNVBrQHrVDFnCJMQEjlqinNfO4psBvUMa65GjfQQVC53xuoxFRZ9uP1JddFQ qGZJ1Uo+PtvpLLMjPoICqzXXyjrtlpclNKZkJ80C7+KMYgttNPWqsfgHjN1oRTM69Bw74pxuaJSfd xX6lxdrLMCamn18TjRYJZ8NDGdtTmSLc+j5E1cDEpDAIBht9EaZxuhND5ZyKhBDTxqMGQsUiYavGA VIsvvOxUlvQPLsR1IjjyzjkdMHvi7mB2x660zCOrVqRG2axx+lftuv5PQLsH7hom+jusyUgs24X6R 9B3fWK/st0X5DdPeUwbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJFTr-0000000Bn6b-0EaC; Mon, 17 Jun 2024 16:45:19 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJFTl-0000000Bn0F-1Mr3 for linux-arm-kernel@lists.infradead.org; Mon, 17 Jun 2024 16:45:16 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a6f7720e6e8so182845966b.3 for ; Mon, 17 Jun 2024 09:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718642711; x=1719247511; 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=n98Gf1QoxzfH++bimpxXb9L5Kij/wsP5fmjbedlrR8w=; b=Sqvn8Uu6YQV37CtP43MKyvR6R0Aih18bf4wPyhVAAKlFZbG6iS1MSOE/x3rtnjwZMm v/9ehGDnTtvfOHS/EsrIA2HVHpvN94nFwf7kYVBdiYz/i6u/CN9TBGPAOH1AbX13jg1v c5Tnv5TwqnJvaC9XZJfvv5lBHvBsrd7R52zFkdIVHQVju16PZ3QcqilgzUZH6bnsL0If /DIrPAHhkkuewf7d9KYn1pPzb8sCupIDgmhPfnoSYcY2uImp7FWUS6FDroX0NCvAlbet N6/CG9ULcbcvpFLShAD13K2xNttK/AbNubw32OAVub2ILp9bJma2EN3Q0d+9V5jv5+ed EsIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718642711; x=1719247511; 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=n98Gf1QoxzfH++bimpxXb9L5Kij/wsP5fmjbedlrR8w=; b=S0m5cMZj5r6bH8uEx16VRsl51+4+ceNicsoYcXdJUj+2B5hev/U52gQcif4HBdBHrV SlxbzE3wJKAyyVsQiXfescnAIfeJwSzmClt1GlGxUMATKOGLcT3UzdxC0l7H3khJupGD d6cpS8aKiVnm8f6+/m2C70zrQGc5679gFFhK7wDiY8rSQGlu5XfzuIJtojpidBwzUIFm Oop2e6uO6KW3oWEPC005GwNAD0GBhsWrdVri2WCSb2+dXT9HIl1Hx6a2EIzedEkephc/ u1YoNq+CX5hDvHHle8ZeXrqr/0pXJjqCPmzxjd0WhJQkaNTEc6lBKknSDaZyHAyQyqnd hOvw== X-Forwarded-Encrypted: i=1; AJvYcCUyxr/MuEGyY6A35V6jadgs0XztRLfnCWqY8jVQVjm5MrBi7RoVZKY4IEXmkL9oDnFXyuZNYcrwlIFb1ip3iVy5C3EmMTlLi+Q30hpUBogtlxHcOlA= X-Gm-Message-State: AOJu0YyYJvGONinN3dM/zPfbhhjGzPhXt5Fl6Ye4RpDHwyAaxccU3kCg qC5SBx5BVktATIDDMJxA+x2MOpFIoYCcfo3uhW4yBU6YwP1h/+PCYUguxihBXBs= X-Google-Smtp-Source: AGHT+IFz9rgPfOCwN4argHOrGJaAixRDxqY1TJ1InY0YdhhmRezkVjZ5t/SkJJWmVGTuERMkcdfvLA== X-Received: by 2002:a17:906:7fc6:b0:a6e:fdc8:ae45 with SMTP id a640c23a62f3a-a6f60d170ccmr821932366b.1.1718642710471; Mon, 17 Jun 2024 09:45:10 -0700 (PDT) Received: from puffmais.c.googlers.com (8.239.204.35.bc.googleusercontent.com. [35.204.239.8]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f4170bsm527139966b.157.2024.06.17.09.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 09:45:10 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Subject: [PATCH v3 0/6] USB31DRD phy support for Google Tensor gs101 (HS & SS) Date: Mon, 17 Jun 2024 17:44:41 +0100 Message-Id: <20240617-usb-phy-gs101-v3-0-b66de9ae7424@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAPlncGYC/3XMSwrCMBSF4a2UjI3kJtGiI/chDvK4bS9IUxINl pK9m3YiCg7Pge9fWMJImNi5WVjETInCWIfaNcwNZuyRk6+bSSG10FLxZ7J8GmbeJxDAje0UQis 9OM2qmSJ29Np611vdA6VHiPOWz7C+/0oZuOBovbPKOGi1v9xpNDHsQ+zZmsryww8V/HC5cn/qQ Buw/vjNSylvKJ6wwuoAAAA= To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peter Griffin , Marek Szyprowski , Sylwester Nawrocki , Alim Akhtar , Sam Protsenko Cc: Krzysztof Kozlowski , Tudor Ambarus , Will McVicker , Roy Luo , 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?= X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240617_094513_983560_5DABBB8F X-CRM114-Status: GOOD ( 14.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series adds support for the Exynos USB 3.1 DRD combo phy, as found in Exynos 9 SoCs like Google GS101. It supports USB SS, HS and DisplayPort, but DisplayPort is out of scope for this series. In terms of UTMI+, this is very similar to the existing Exynos850 support in this driver. The difference is that it supports both UTMI+ (HS) and PIPE3 (SS). Firstly, there are some preparatory patches to convert this driver to using the clk_bulk and regulator_bulk APIs to simplify addition, while the bulk of the changes is around the SS part. Dependencies on other patches: While there is no compile or link time dependency, for USB to actually work this series also requires Peter's syscon changes from https://lore.kernel.org/all/20240614140421.3172674-1-peter.griffin@linaro.org/ To: Vinod Koul To: Kishon Vijay Abraham I To: Rob Herring To: Krzysztof Kozlowski To: Conor Dooley To: Peter Griffin To: Marek Szyprowski To: Sylwester Nawrocki To: Alim Akhtar To: Sam Protsenko Cc: Krzysztof Kozlowski Cc: Tudor Ambarus Cc: Will McVicker Cc: Roy Luo Cc: kernel-team@android.com Cc: linux-phy@lists.infradead.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: André Draszik Changes in v3: - drop patch 'phy: exynos5-usbdrd: use exynos_get_pmu_regmap_by_phandle() for PMU regs'. This is not needed anymore with Peter's syscon series mentioned above (Krzysztof). - drop those patches that have already been merged via https://lore.kernel.org/all/20240507-samsung-usb-phy-fixes-v1-0-4ccba5afa7cc@linaro.org/ - update device tree binding 'reg-names' (Krzysztof) - use clk_bulk and regulator_bulk APIs throughout to simplify addition of gs101 support as preparatory patches - patch 1: add required but missing regulators - patch 4: * make the register access clock name(s) platform specific and avoid use of devm_clk_bulk_get_optional() as we want to be sure to have retrieved all required clocks * fix a whitespace issue * slightly rephrase commit message - patch 6: * set unused callback pointers to NULL in gs101_tunes[] * implement missing regulator support and enable power to phy before any register access * add more phy tunes * move PTS_UTMI_POSTINIT utmi phy tuning to before completion of POR sequence, as per datasheet * group gs101 related symbols closer to each other - Link to v2: https://lore.kernel.org/r/20240501-usb-phy-gs101-v2-0-ed9f14a1bd6d@linaro.org Changes in v2: - avoid having nested else/if in the DT binding (Rob) - add missing bitfield.h include - Link to v1: https://lore.kernel.org/r/20240423-usb-phy-gs101-v1-0-ebdcb3ac174d@linaro.org --- André Draszik (6): dt-bindings: phy: samsung,usb3-drd-phy: add gs101 compatible phy: exynos5-usbdrd: support isolating HS and SS ports independently phy: exynos5-usbdrd: convert core clocks to clk_bulk phy: exynos5-usbdrd: convert (phy) register access clock to clk_bulk phy: exynos5-usbdrd: convert Vbus supplies to regulator_bulk phy: exynos5-usbdrd: support Exynos USBDRD 3.1 combo phy (HS & SS) .../bindings/phy/samsung,usb3-drd-phy.yaml | 77 +- drivers/phy/samsung/phy-exynos5-usbdrd.c | 958 +++++++++++++++++---- include/linux/soc/samsung/exynos-regs-pmu.h | 4 + 3 files changed, 893 insertions(+), 146 deletions(-) --- base-commit: 6906a84c482f098d31486df8dc98cead21cce2d0 change-id: 20240423-usb-phy-gs101-abf3e172d1c4 Best regards,