From patchwork Wed May 1 09:19:37 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: 13650378 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 CA5DDC10F1A for ; Wed, 1 May 2024 09:20:18 +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=SbnL5rK0eNjoRVIxS28bsgGiVxZiY81mz+Z4PRUJ4i0=; b=U1US8iyl0Our6L vaVhI7vQtjSlN9htEDYN0MDilMr9eJF1wVzFf7lUah5lEuuvfvxa72VUNOihKu83CzrQZdRQrhplQ OlZtOQR7iTtUhcG2O4Ce2mMIoIWxmuVrMMPy6jg+gfCw8EmWLUr7XqGOQz2O+zNnvodypb1fmSOQ3 1yaDjVdlA7/Cxd7Snf1S5SjeDVY1DST16kHH1SYYrbed7RcKxnB1LqmwUG6KumtXUcdsfKMuj5tEH tdkVTQ07Qd94rdME/e7XNGTR9W8kMx/f2hGHxObNVz24ylO1N4pBPk8XgJEqfrWPQH9tyzQcB0joq 9zbygfOcyFHXyd61ppxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s268D-00000008wuy-2Bkl; Wed, 01 May 2024 09:20:05 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s267s-00000008wiZ-2vOZ for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 09:19:50 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5196fe87775so7348745e87.3 for ; Wed, 01 May 2024 02:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714555178; x=1715159978; 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=gDKjYuMOOvQueQlZtzxRYnLgIlA8f7Ari39jSEC+hu0=; b=FzFikRXaSvi791ug9FlmkKWBLvt78j/QIrWFW6hWEbbIooMXNfy4sUnNGebBRLD2SS 861IWCcx0POFRBtEEvIsLpopYYUGMSfD0zLRKD7RLEQOkEBzWM+fxb17VWQHpfy0Gd12 PZpigKI8p6Pmi7i+XIL/E0h7gX4phMK/pDXh5alesq78pH0yA4zvlTDSnNW+GEUeCYU6 vS31P05DbT6FDCmlQYQtAOHjLUQ2lagtCZOpQ9U2e9Eo0SQEztibfaiBA9E+9frMsOWv QqBDNU7v2Bzor7Q+Kf1Khby0mIDAwNXXUwcaj8QA5XShH3i9YPV/ehE6eW0fkpaxRjpJ 2mzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714555178; x=1715159978; 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=gDKjYuMOOvQueQlZtzxRYnLgIlA8f7Ari39jSEC+hu0=; b=hls55l7WVG6jgZmVCFB7rOo+w1efZAjIF0jydqCq+oVsmeaylcGVZg2hou/om4/bJJ ej8gBRftXzpPeTnXdpQC0rEA6SxOaR4ThgRMVAd0A5wXxA2oTuK9lCQJqeiPrcYOyGq7 8oYHBFMb2y71hoUgL6YkwAxWSVGMaj/rJ0FI2EUscR367OiHsJs17WQ14VVii1+ypxvM CvrY1UVI/dX9/GbFGVQkF0Q+QzdiZ2nBIHqvlntJSDO72Wwfo9LNanJTxj/apxEMoWt9 W32t0IV0nRHzCFmAbmtsJT0bMrt4MXuFWfTfzDVbhAh6syPFWdnzd3P6xBf4q//hZZnk +Txg== X-Forwarded-Encrypted: i=1; AJvYcCWcsqLKfMZWLGb72EGQO8udRUsj/CDWx2YF4cZvYneWDEbsqwT9J3J6wEFJX6vdLTckHTtSu5QTlSlb3UhXpK7lecuFC14dfsSGbPqpAiO63q1u0kI= X-Gm-Message-State: AOJu0Yx6LJ+0ox2Epm+6SkrAy1jQEoaZjDheTAk36HJY0vpmF+GGzi/E 9KRnewyBIYKPLsrK/uJxMmA3b/QCDeOCLYMzymdCw0yzP0FWptf392TpjxFAVfY= X-Google-Smtp-Source: AGHT+IG35wPVpTgwkzCXgj+m93i9OP3q32II4vi8eJQ5xijSDEEE5d2Q9QmPaTZNA6Hi++3pKyY3vg== X-Received: by 2002:a19:ca53:0:b0:51b:396e:2880 with SMTP id h19-20020a19ca53000000b0051b396e2880mr1133041lfj.63.1714555178313; Wed, 01 May 2024 02:19:38 -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 bw13-20020a170906c1cd00b00a58de09fd92sm5425674ejb.27.2024.05.01.02.19.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 02:19:37 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Wed, 01 May 2024 10:19:37 +0100 Subject: [PATCH v2 2/7] phy: exynos5-usbdrd: use exynos_get_pmu_regmap_by_phandle() for PMU regs MIME-Version: 1.0 Message-Id: <20240501-usb-phy-gs101-v2-2-ed9f14a1bd6d@linaro.org> References: <20240501-usb-phy-gs101-v2-0-ed9f14a1bd6d@linaro.org> In-Reply-To: <20240501-usb-phy-gs101-v2-0-ed9f14a1bd6d@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 , Arnd Bergmann , lee@kernel.org, =?utf-8?q?Andr=C3=A9_Draszi?= =?utf-8?q?k?= X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_021944_897201_94A16D39 X-CRM114-Status: GOOD ( 15.82 ) 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");