From patchwork Mon Jan 29 21:19:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13536432 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 ECC06C47DA9 for ; Mon, 29 Jan 2024 21:19: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: 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=t7Yyxi0U0ZrpNK6+He1YYIGO6kK2tYLro6YGUHnOTxE=; b=y/chhnQWSW93el zvr4sDXXFFIZlIrmHWv4bVAPmYelBsfVC4xjzfxytrfkBDuiBStWq8CE60oXiWUC/RY2AdMcKBmFN R/2S7vC07daoZTBwBcU2DTyUMqZYctjkt4RxfzQbaADaZKM92xFg7mR7g0budHsaC2uy/JyBz+Bmo 9WdKcaR0NoXEUaBAL8sIGX/efL6J7Egq9pzDYJlrVqBNW2A7esyhWMWoR86XsMasyZEImyMOYoaom sxUuu/2YEQKjK7lkYq303wDMMj3wT2X70DM/V/cuIQCrRqkwz+sLtEVhqXQZmf6gyO4AXKvnmjJIp CJO211k37Pnbg5XE+4xQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUZ2H-0000000ELzy-3Clo; Mon, 29 Jan 2024 21:19:21 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUZ2E-0000000ELzT-3Tnj for linux-arm-kernel@lists.infradead.org; Mon, 29 Jan 2024 21:19:20 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40ef6da20feso8266285e9.0 for ; Mon, 29 Jan 2024 13:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706563157; x=1707167957; 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=SEnDTJQ10cHWohI79qASBVq5CKad4CLufOCIUd//vZk=; b=eRY0Tl5yF4FjusqZwdimvjVzpozT93Yj1OauSwA2lAMFhiTm66gzSknyyWZT4YBWwB Hmdn1VIzjR2DNpw7U+KB1IU8wXkStFw98DHjTzNWPjw3FRnxrluo8mlFyv+dfwIJl+vi bO9Egnze1GBbk3wxWyYFGyiFHe5MuYh4sjCPSFkSn8pQbtT2kTSYXUTG1pMNxlcJWQV8 nDyi3XRQGUHcBQNH4OHn/09MELngz6Vr9ofZVbSUYMvmWDw+u5p4PhsJuvYBnqBqramC kTd+O1HWfOucd0zFI9r7HUuw++ywY1aGT90zlRUXHBvzFOSTCx1jHZ/6A+s1t7T3LVRY aQqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706563157; x=1707167957; 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=SEnDTJQ10cHWohI79qASBVq5CKad4CLufOCIUd//vZk=; b=loI6QTZWP8F1jILCd0BrvsLsyBXEKQ6rPT+oRNaezey41WO/mq+1v//t5O3Wv46fxo SpwcyLuwuLOyqBXcvBrZUkdmwHPaEMY9abcz3fV1CHFCe1REkfTW4o4KDnQeDZENSVKs VZFWtoYGjVKTDi6944yUUYZBuYjMEpPhehiakeU+6JkPlvM6blicvYv7lNsNJhxaI5aS ilOH1pv87iVgN/cw0zm1dwQ7y8SXaXStEGgvZ5l6axhCgRutc06tG6wFbdGrF1FdOBlt B+OzFj/FVqrGNejEcsS7XmAOGsEagmbwmK6pOjB3w5FfGgFZ3wFi5uhUHwNH8RDwDu4o PKbg== X-Gm-Message-State: AOJu0YyZHAQ3R7ootThm9/jspOZtIXSf8hQLd+opGvcqr6d8eIvD3r0H VwtVYwDEOXf+z9yHBITyEKVb35kTnl+efLPuLv6UsTJnkotkwYhNRbdaZt365i0= X-Google-Smtp-Source: AGHT+IFkNq23SO1IhrxL7eJ5irIk6JFTG3LogE5X13QXrJom8xVeozvbWG3Hn206Elm5gVcBpdd6lQ== X-Received: by 2002:a05:600c:5186:b0:40e:e516:3b5b with SMTP id fa6-20020a05600c518600b0040ee5163b5bmr6033244wmb.4.1706563157207; Mon, 29 Jan 2024 13:19:17 -0800 (PST) Received: from gpeter-l.lan (host-92-21-139-67.as13285.net. [92.21.139.67]) by smtp.gmail.com with ESMTPSA id iv16-20020a05600c549000b0040e3635ca65sm15126928wmb.2.2024.01.29.13.19.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 13:19:16 -0800 (PST) From: Peter Griffin To: arnd@arndb.de, krzysztof.kozlowski@linaro.org, linux@roeck-us.net, wim@linux-watchdog.org, alim.akhtar@samsung.com, jaewon02.kim@samsung.com, semen.protsenko@linaro.org Cc: kernel-team@android.com, peter.griffin@linaro.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, linux-fsd@tesla.com, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 0/2] Add regmap support to exynos-pmu for protected PMU regs Date: Mon, 29 Jan 2024 21:19:10 +0000 Message-ID: <20240129211912.3068411-1-peter.griffin@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240129_131918_910757_FB834D68 X-CRM114-Status: GOOD ( 12.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 folks, This is a v2 of the series to add support for protected PMU registers found on gs101 and derivative SoCs. In v2 it has been re-worked to be based on a regmap abstraction that I think leads to a much neater overall solution. The advantage of the regmap abstraction is that most leaf drivers that read/write PMU registers need minimal changes. Example of Exynos drivers that require PMU register access are: * watchdog * usb phy * mipi phy * ufs phy This series has been tested on Pixel 6 / gs101. If the various maintainers/ contributors of other Exynos SoCs like exynos850, exynosautov9 etc can test these patches on your respective systems that would be most appreciated! The expectation is this series would be merged via Krzysztofs Samsung Exynos tree. regards, Peter Changes since v1: - Refactor to use custom regmap to abstract SMC register access (Sam / Guenter) - Add deferred probing support (Saravana / Krzysztof) v1 lore: https://lore.kernel.org/all/20240122225710.1952066-1-peter.griffin@linaro.org/ Peter Griffin (2): soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs watchdog: s3c2410_wdt: use exynos_get_pmu_regmap_by_phandle() for PMU regs drivers/soc/samsung/exynos-pmu.c | 227 ++++++++++++++++++++++++- drivers/watchdog/Kconfig | 1 - drivers/watchdog/s3c2410_wdt.c | 9 +- include/linux/soc/samsung/exynos-pmu.h | 10 ++ 4 files changed, 241 insertions(+), 6 deletions(-)