From patchwork Tue Apr 23 20:49:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13640648 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 D5CE5C4345F for ; Tue, 23 Apr 2024 20:50:34 +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:MIME-Version:Message-ID:Date:Subject:Cc :To: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=rqdG81z1V5yLYgbCCvfdqugDpJ1JetleU4JkozLjXf4=; b=Dkuy3DaWORlWeC wAamiIWQED4zQYtClhRAiQnwFzOC/maFqScns7T6tmy+CFVRtmIjHBhzGvfaJV1yfPMcQsx6W/9ME ox9spb64aZqvQm4spv49KswHVw6e+VjO2KMQGWQb+z8Ft8xJaCQCE2oERU1STmBK3e0Pimm5n1RRw YkL2lyYr8dRyc85Dpil2ATUGsX4ylequKqXcPj/v8Klbr2Yo1c8hTP6s5a5o3ruLlL+Y1VV3tl2vg b7BKWhUaZLMEzkU4OycfU9RHdPzkX/LEOZK9rd7igDXnf93GSS7SJiNxLAWX7qMJp58Xf6//b0LjI Nx0J9ycsibVfvOiYEGfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzN5l-00000001SeT-0ZHp; Tue, 23 Apr 2024 20:50:17 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzN5h-00000001Scl-1E5Y for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2024 20:50:15 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-41af670185fso918305e9.0 for ; Tue, 23 Apr 2024 13:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713905411; x=1714510211; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iDTk5oDvvrRdQcAB/F+kDJkRJSv6Emu0SrjcMhqOn4I=; b=Lg1aKxl0bNKhOTpM7fj9ndtYkvCP0vFSzkJAu+nlQmRB1rJfDap4i4x6VYvokdYNmq HVEQgGvc6bsfksiDoFCOaTliLECvd98aS+xxp9KnJJaFAlcLpQ9TmixxFbdAwxBF4fYb dnRZSmtrJGsTOc0bYeMzHfa+fKtQhQ8yTmPGbTh5D3OanNd7mezPgF/7TAfLxLjByG7+ fn4WZA8n+lvLGYuldVbTc+V6Olxuhu+Jo/MhL6hc7vZKyXD+sbhDKC4zcyT0j0cOI3In F2mCn8vmFECcHytd0b96d+FQXJ4CaHeq7h4fKV1nD/uVFTioFXwXdd4z/7kuIV/CmQ6O bfbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713905411; x=1714510211; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iDTk5oDvvrRdQcAB/F+kDJkRJSv6Emu0SrjcMhqOn4I=; b=tMGyqvxU6dRDDGhU55ted8/0CseuI8taCzaFgTB154bgJfz4DwPxV05TiIWWybNvY3 7J3KKdVg+yHjRtZ8DK8/etASMMgJs68rw+IP3w4NR8osmPOq0E66an2/GrbvX3Vb/sWe 0UNV2TBQNstkAe9nnvj2BsSppnpEEMkpwqfLn4TmWGhw+SPuJNlZbdsQUb1yz6Vl2zQA bgujgWmsqLLgkQfzEg4bUVvWBzJlP5jt474K/St4KtqVNxjDyhOviK/1m45h2JRhaEEd RtJZfgKB6KWhOLh+Vf+nI9K9/7rSZSXSDBjWKuL27e71fdUT8aOQPrVCxZd26XANR7L+ NhaQ== X-Forwarded-Encrypted: i=1; AJvYcCWyxwW5vAcmQhjhe/69ptHwnKnrfVMWtuawDwQlVgWOArFWp5yJMsbHfqwpXbeGwkJUfxPWj23SzuiXsvQ5LnF6EdAsy7QSt+dEjB8NbAfCefhRrXU= X-Gm-Message-State: AOJu0YwZvR2ELLh0PQLEVR9o/9cIe92Dbb5fEQ5EtKaUiF0NwP2tiwD5 0UvJEIAxzxEPAaTHN+iAxgh4qadCkuYjTbledVOpksO2T11embhpSmR51IGnZJc= X-Google-Smtp-Source: AGHT+IH9twwrV4GDTD98S7Dg0JzPI6O8DIUuVeYEzvAw6xtx7WWc6EfOFfwcn0BmyTCvX/h+qFPVTQ== X-Received: by 2002:a05:600c:4f89:b0:41a:408b:dbd4 with SMTP id n9-20020a05600c4f8900b0041a408bdbd4mr257314wmq.7.1713905411055; Tue, 23 Apr 2024 13:50:11 -0700 (PDT) Received: from gpeter-l.lan ([2a0d:3344:2e8:8510:4269:2542:5a09:9ca1]) by smtp.gmail.com with ESMTPSA id bg5-20020a05600c3c8500b00419f419236fsm13065443wmb.41.2024.04.23.13.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 13:50:10 -0700 (PDT) From: Peter Griffin To: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, vkoul@kernel.org, kishon@kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, s.nawrocki@samsung.com, cw00.choi@samsung.com, jejb@linux.ibm.com, martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, ebiggers@kernel.org Cc: linux-scsi@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, Peter Griffin Subject: [PATCH v2 00/14] HSI2, UFS & UFS phy support for Tensor GS101 Date: Tue, 23 Apr 2024 21:49:52 +0100 Message-ID: <20240423205006.1785138-1-peter.griffin@linaro.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_135013_386284_53BCD04D X-CRM114-Status: GOOD ( 15.48 ) 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 Hi James, Martin, Alim, Bart, Krzysztof, Vinod, all Firstly, many thanks to everyone who reviewed and tested v1. This series adds support for the High Speed Interface (HSI) 2 clock management unit, UFS controller and UFS phy calibration/tuning for GS101 found in Pixel 6. With this series applied, UFS is now functional on gs101. The SKhynix HN8T05BZGKX015 can be enumerated, partitions mounted etc. This allows us to move away from the initramfs rootfs we have been using for development so far. Merge Strategy 1) UFS driver/bindings via UFS/SCSI tree (James / Martin / Alim) 2) GS101 DTS/DTSI should go via Krzysztofs Exynos SoC tree 3) Clock driver/bindings via Clock tree (Krzysztof / Stephen) 4) PHY driver/bindings via PHY tree (Vinod) The v2 series has been rebased on next-20240422, as such all the phy parts which were already queued by Vinod have been dropped. Two new phy patches are added to address review feedback received after the patches were queued. The series is broadly split into the following parts: 1) dt-bindings documentation updates 2) gs101/oriole dts & dtsi updates 3) Prepatory patches for ufs-exynos driver 4) GS101 ufs-exynos support 5) gs101 phy fixes As well as the v1 review feedback some additional cmu_hsi2 clocks were marked as CLK_IGNORE_UNUSED in v2 so that all other remaining clocks in cmu_hsi2 can be disabled and UFS will still be functional. The sysreg clock was also moved from CLK_IS_CRITICAL in clk-gs101 to ufs node, as the system is still functional with that clock disabled, however fine grained clocking just around sysreg register accesses doesn't result in functional UFS. kind regards, Peter Changes since v1: - collect up tags - google,gs101-clock: alphabetical ordering (Andre) - re-order samsung,exynos-ufs.yaml as per Krzysztof review - Ensure google,gs101.h dt-bindings is contained with bindings patch (Andre / Krzysztof) - fix google,gs101-hsi2-sysreg size (0x10000 not 0x1000) (Andre) - drop blank lines in clk-gs101 (Andre) - cmu-hsi2 alphabetical ordering (Andre / Krzysztof) - use GPIO defines in DT and add TODO pmic comment (Krzysztof) - Add sysreg clock to ufs node (Andre) - Mark additional cmu_hsi2 clocks with CLK_IGNORE_UNUSED flag (Peter) lore v1: https://lore.kernel.org/linux-clk/20240404122559.898930-1-peter.griffin@linaro.org/ Peter Griffin (14): dt-bindings: clock: google,gs101-clock: add HSI2 clock management unit dt-bindings: soc: google: exynos-sysreg: add dedicated hsi2 sysreg compatible dt-bindings: ufs: exynos-ufs: Add gs101 compatible arm64: dts: exynos: gs101: enable cmu-hsi2 clock controller arm64: dts: exynos: gs101: Add the hsi2 sysreg node arm64: dts: exynos: gs101: Add ufs, ufs-phy and ufs regulator dt nodes clk: samsung: gs101: add support for cmu_hsi2 scsi: ufs: host: ufs-exynos: Add EXYNOS_UFS_OPT_UFSPR_SECURE option scsi: ufs: host: ufs-exynos: add EXYNOS_UFS_OPT_TIMER_TICK_SELECT option scsi: ufs: host: ufs-exynos: allow max frequencies up to 267Mhz scsi: ufs: host: ufs-exynos: add some pa_dbg_ register offsets into drvdata scsi: ufs: host: ufs-exynos: Add support for Tensor gs101 SoC phy: samsung-ufs: ufs: remove superfluous mfd/syscon.h header phy: samsung-ufs: ufs: exit on first reported error .../bindings/clock/google,gs101-clock.yaml | 30 +- .../soc/samsung/samsung,exynos-sysreg.yaml | 2 + .../bindings/ufs/samsung,exynos-ufs.yaml | 38 +- .../boot/dts/exynos/google/gs101-oriole.dts | 18 + arch/arm64/boot/dts/exynos/google/gs101.dtsi | 54 ++ drivers/clk/samsung/clk-gs101.c | 508 +++++++++++++++++- drivers/phy/samsung/phy-samsung-ufs.c | 11 +- drivers/ufs/host/ufs-exynos.c | 197 ++++++- drivers/ufs/host/ufs-exynos.h | 24 +- include/dt-bindings/clock/google,gs101.h | 63 +++ 10 files changed, 921 insertions(+), 24 deletions(-)