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: 13640411 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 0CDF5C4345F for ; Tue, 23 Apr 2024 17:07:00 +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=Q9bo2KpenFQltk7bwOncxkmOplIq8r9YvfeafafasGE=; b=uALtS6utWt9W25 qZwbgCoM9XW4lVF+pYhk9EEFxBgYw0g5xcNoBsDpadLHyVLNmfXbXRIbvSDM/cOyPEcYLFtlxxdCt TmRD2MTyW/AUQRltUlL12ofKoZ97k/JxTOOhBFYupNRVFcIAGY6D82d2HQwycMff2l4O4dkt4pv8r J1QRXYA1m434ynPW5yCJVG9GKp2EHrE0jZn8fV8xQZbkX40C1p08A7s8ZLKIJ857oj1ZR43w3hSuf zqTxOs0QmvsBpyCGFsATt10uhfjsSri99U/KqMKVSlztrjTBv1sdLj8u3a8Ru7cHlDpbrMIQ5S84S B+BM9vn8SrbqUzNAZFcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzJbR-00000000sKu-0e5E; Tue, 23 Apr 2024 17:06:45 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzJb9-00000000s9j-0uMd for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2024 17:06:30 +0000 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a52582ecde4so542534466b.0 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=kzMAF2dyvyNNhIH1MHWNNKIcEQcf4M5XeFQBnhXh2bWlP0eMlP3mVCbZmLqHQUguj6 kzBvCvrsrSryDV8kjHS8xy3nbQA6/XJJyGJwWDxwQmqxzuSh+aWr7gUGOAyQBqrfQ7iO Hv0J8kQbHUi9g6ikoWN0exj8LC/NUt5Ll8HsITJqHpnzmJLf467PEUaUmVMpYqWNcOhH 2R2gwhi27rBT5ZkuXj5RVVu7ZL6wyqkG77pCzFgFYApOq0e/bD/ZWvBSwc/PXufz5xnM Ef2eMdHbfoVSk58M8jC+2BQyPEUdRAOqBHM2D6GRTzWKCFmkL0yAIPv8hPw58+P3hPBJ Om2w== X-Forwarded-Encrypted: i=1; AJvYcCWJkhnKm4EvIoWg0XescmPw5aPNzMhIamTQWDDFJHCJJe6L2ATQ86H8nFp8kZD0KQ9r1KaT3jP4HHpOBR6Kfq9Xy3hJBPXH8uzINZ4i6nMMwzQx94w= X-Gm-Message-State: AOJu0Yycd+Yykt723xo6NYWGsZDL7rdBJJtJftELK6RIZG8NEJnvGZ4a G+ZsXtxpjMmFmPRJfH38Um240Dhr3senutYqhcDCgFfir6skxpL2IkkrZMXnurM= 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_410976_DF55E117 X-CRM114-Status: GOOD ( 14.60 ) 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 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");