From patchwork Tue Apr 23 17:06:04 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: 13640403 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 BC74EC04FFE for ; Tue, 23 Apr 2024 17:06:49 +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:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yjYv5yXd8TNeQleWIiI2GJEkSqHAXQvTrqr8JHHnMss=; b=EUCGTawcOdWQfQ wqeEM0j3XDAlK0xQ1isrJLg7QUflVPCUM/sAwwvmUGgNO/M1Ckg8g1fxGHOIwz2aAltBdVvzCvpwc t0xuHbMSYH3yVXuHyJ4cEa49vfujAhIKVHnZ+0Nj8lHy/ZqL/n+dfB9SdfKcRteylPlRI+cJimkuL nv8I2bv6aewtGb775GhSw4HJoKT+IeO6bkCAXhLwniPFXlg96XBuc1JsAQBg0aOz+UBl8g6lQ8/SY JT8q+8iXMkW5pjdf0vPmWZRZf20R7ymVhywGbApk88tSlinzQf4kb5K4ewJ6sZT/GZsBK6Ve3+ObL C+tRcjiIOiVo6AnlMmTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzJbV-00000000sNQ-0lQG; Tue, 23 Apr 2024 17:06:49 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzJb9-00000000s9h-2b7x for linux-phy@lists.infradead.org; Tue, 23 Apr 2024 17:06:30 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a559b919303so395141766b.1 for ; Tue, 23 Apr 2024 10:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713891986; x=1714496786; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9GFmm1lXG8IRDZ7oQOROxJWRILdkR+JVdhVLDYhofYU=; b=EAnP759JVPiV3bYM6/FcuhEMIeRhKdtlfoEeEyHAgBylTak7g8aho/NT5U/FAx1hPR EDrrnCpbQvzQi/gvBeFvRTgLRkaLdPrXhquQBWZijX/mTk+6OHym8rI4FaUl3J0kJ4sY 7EODRFJXbZl5AD0KZZC3zfTtE58P5yEVhX0eT53Y5Trp/PLUQk0Wbta1vAfwd4gYpik+ SrukBQR0N8c3+WvKu00Odt7lHLOxBBxH5myOwC3IIgbVDr0fRjzZZLZqpCuFxLn3ssxk DCmb4HiVpc2Eg2IYuM0LkfAl5lZtGSVjTuc2KfgYTBgN3HsLwT0wuV/xjJw3RIMDn2Pb kneg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713891986; x=1714496786; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9GFmm1lXG8IRDZ7oQOROxJWRILdkR+JVdhVLDYhofYU=; b=sf5S3ztTxRY6YoD88vLcv0Q1LttJDj1BGkC5xt60jb5ra4spnBkMYzL7gvn8dK4Ycm MYX8UGG/QFDXxtOo/tlZElTEhFZipKaoQAdpKFtDbbD8i+wDCr8rI2ZMlJU5y5AFcw2x AfQLJFslanIEc9+0/KxUByiV8q1JVRoBLJ0Is4/31g3MbKH3mRHc+wbJ/w28F0d+fM6x 5GUuydFDP3EeKJoRbjEcZnJRsuu0/3VFcvpn9DliHfq+x4KBwz+RRWGNfzx5caw6Ew98 pqIjLyTGmSy70vcZpz/cNTTtFIANRZ3YkYl7ZbDeI77mzDcrSdYkiPqm1vnw8yhUZ+l2 lTbg== X-Forwarded-Encrypted: i=1; AJvYcCVNnUxjbPFkrzc64jE/gSbKZQtA/jgHyT0PezPBTUce38A0TQO4RkA7U/TQ+CNttwvTupsdeBYjVvOnI3lu1Q0RosbFeV4LhkIL01XXGA== X-Gm-Message-State: AOJu0YyhPiqt1IWp1GquMznbASmjt0kUuqMw/puY7tPWwVaKyWfriAgs /ZhKX8LhlP8eCcfrHD7tjhZuC78UztlcjIKSW3NevEuEvnhBDDIVPedQr7gPHX4= X-Google-Smtp-Source: AGHT+IELSQMCCaxbBsIXMUuZUEHUL5pQZw+OSlDBpsZVCdsybeaLKXQSWkyki7sDtsHzyRdBoDfqTA== X-Received: by 2002:a17:906:4fcc:b0:a55:6f2e:b87f with SMTP id i12-20020a1709064fcc00b00a556f2eb87fmr12163408ejw.8.1713891985752; Tue, 23 Apr 2024 10:06:25 -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 t22-20020a1709063e5600b00a5209dc79c1sm7351624eji.146.2024.04.23.10.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 10:06:25 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Tue, 23 Apr 2024 18:06:04 +0100 Subject: [PATCH 2/7] phy: exynos5-usbdrd: use exynos_get_pmu_regmap_by_phandle() for PMU regs MIME-Version: 1.0 Message-Id: <20240423-usb-phy-gs101-v1-2-ebdcb3ac174d@linaro.org> References: <20240423-usb-phy-gs101-v1-0-ebdcb3ac174d@linaro.org> In-Reply-To: <20240423-usb-phy-gs101-v1-0-ebdcb3ac174d@linaro.org> 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, Krzysztof Kozlowski , =?utf-8?q?Andr=C3=A9?= =?utf-8?q?_Draszik?= X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_100627_727902_C6D67F77 X-CRM114-Status: GOOD ( 13.15 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Some Exynos based SoCs like Tensor gs101 protect the PMU registers for security hardening reasons so that they are only write accessible in EL3 via an SMC call. The Exynos PMU driver handles this transparently when using exynos_get_pmu_regmap_by_phandle(). Switch to using that API to support such SoCs. As this driver now no longer depends on mfd syscon remove that header and Kconfig dependency. Signed-off-by: André Draszik --- drivers/phy/samsung/Kconfig | 1 - drivers/phy/samsung/phy-exynos5-usbdrd.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/phy/samsung/Kconfig b/drivers/phy/samsung/Kconfig index f10afa3d7ff5..bb63fa710803 100644 --- a/drivers/phy/samsung/Kconfig +++ b/drivers/phy/samsung/Kconfig @@ -82,7 +82,6 @@ config PHY_EXYNOS5_USBDRD depends on HAS_IOMEM depends on USB_DWC3_EXYNOS select GENERIC_PHY - select MFD_SYSCON default y help Enable USB DRD PHY support for Exynos 5 SoC series. diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c index 04171eed5b16..ac208b89f5a6 100644 --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c @@ -18,9 +18,9 @@ #include #include #include -#include #include #include +#include #include /* Exynos USB PHY registers */ @@ -1034,7 +1034,7 @@ static int exynos5_usbdrd_phy_probe(struct platform_device *pdev) return ret; } - reg_pmu = syscon_regmap_lookup_by_phandle(dev->of_node, + reg_pmu = exynos_get_pmu_regmap_by_phandle(dev->of_node, "samsung,pmu-syscon"); if (IS_ERR(reg_pmu)) { dev_err(dev, "Failed to lookup PMU regmap\n");