From patchwork Mon Jan 22 22:57:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 764744 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B68072208D for ; Mon, 22 Jan 2024 22:57:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705964252; cv=none; b=rlsQ+t8oBFo8FB+J9sIydph4peOaW3cesgbX91m1YN7aP4wbyAXuC+rG7pqcmHgDmQKnnp0xeQGVbXIjqibVxZqKfzaErY2kl0H0R0aaKL1f4fBmv9rZuyvZFjEu9Tb90rNR98bPR2zqL58OGyRcUlWKyQXcsM9hbOagPjA4XmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705964252; c=relaxed/simple; bh=U1+KXcli4NL1ac1CPhNG+FdVI8hN+zTTVbZpOOz+6tY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cJo4W5/A/wtAdPTbQu/UEDfD8mDxjzFgtcetuYT7CVSWkpgjiOxAh52NJ3M3GS1tjWnJAiePpp3V46I63AblQvrprxkgyRMvPWWdH84Z4sSphcH08OYlA5grSNLPIfSD8xKo+GFDGR6ue7DP3jTDnfPV9rT98cTvaDkfXJQdfOM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=T05qkwEC; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="T05qkwEC" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40eb28271f8so7282425e9.2 for ; Mon, 22 Jan 2024 14:57:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705964249; x=1706569049; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EkT1f8/auJS4w5tPSadT4tBL2vbp3PChzChd9rePwv0=; b=T05qkwECDeJbqNuo9xfac+xmo7BjyxF2yPrguHGFXqLAxfUAANrQK1lGpbckCqodx4 GbhxMI0Nk6jy5ai/7nISDDMelTVmelWdfewxX4kOAgW7bYmIXMwRQ8zu8wJqjBzD6w91 LasK5jyxIzHyC+CkHQaiFUiBALPowBPNIdxx+AtrmUu/KWBiLiKgBiH2HljZ5TTVW6n4 3+mEpWpnxdBATX6+eEYS799+MwUVQIPxfbHDj5O5cRWvH2bfa4F0peLEDSpeheHBznYV xG5qJDWm3EOWX8aHjSZNBI2FQZTTDcWXMQY+5Xz/053cz2Id7Nm3nbLzOFw3nFLYnhQf 5MgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705964249; x=1706569049; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EkT1f8/auJS4w5tPSadT4tBL2vbp3PChzChd9rePwv0=; b=InBJkYss9dG/du76CyyxdXywC7vHCI7Q6oxdPyfY0MMKyHZbpHGLOHSyhUq9n15pjv klFvdDYxPQ73SL08SDA5SgHEFq82uH1wLRTtefo8fZQXf8mD2EGtnfzbknK7aMd/1KpE AowA43msp1I7RXLQ+OOehkog32oE/Is67ocTQpij+jHZ9zmPhXEIhW3zLRv26/O7rkD0 nL1AzkoUqNEi4pDpE7gt34EO0tAEUxDX4X64fKduckLMbJqbFMPv1THKap21BnC+effB Zh2XgngUFb1I5+usvjqpiibj2WYeXGXtajSqc+y9wwGYpf6yuuHXEWW+DU9IGWRPg1uJ pExw== X-Gm-Message-State: AOJu0YyWb6K00dLWKgXrweN2J2kOjBnaZQjzCE75M5/9rm4wS0u+va9R +fFeO7UbU+OseKYQmtdNi/O7BHu1zcw4mtbmqbWdKMn6MyRa9WqgjdW/9nNO8K0= X-Google-Smtp-Source: AGHT+IHkc9S01pb4+H9jQwA2GpQSFpzYPum9UGXBQkktPuNZUGJVOV7WCzXUX8o5u0vmioR+ISGUrw== X-Received: by 2002:a05:600c:5250:b0:40e:6930:4c99 with SMTP id fc16-20020a05600c525000b0040e69304c99mr1381965wmb.113.1705964248744; Mon, 22 Jan 2024 14:57:28 -0800 (PST) Received: from gpeter-l.lan (host-92-18-76-30.as13285.net. [92.18.76.30]) by smtp.gmail.com with ESMTPSA id fa26-20020a05600c519a00b0040e89ff10f5sm19776847wmb.1.2024.01.22.14.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 14:57:28 -0800 (PST) From: Peter Griffin To: arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux@roeck-us.net, wim@linux-watchdog.org, conor+dt@kernel.org, alim.akhtar@samsung.com, jaewon02.kim@samsung.com, chanho61.park@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 2/9] soc: samsung: exynos-pmu: Add exynos_pmu_update/read/write APIs and SoC quirks Date: Mon, 22 Jan 2024 22:57:03 +0000 Message-ID: <20240122225710.1952066-3-peter.griffin@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240122225710.1952066-1-peter.griffin@linaro.org> References: <20240122225710.1952066-1-peter.griffin@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Newer Exynos SoCs have atomic set/clear bit hardware for PMU registers as these registers can be accessed by multiple masters. Some platforms also protect the PMU registers for security hardening reasons so they can't be written by normal world and are only write acessible in el3 via a SMC call. Add support for both of these usecases using SoC specific quirks that are determined from the DT compatible string. Drivers which need to read and write PMU registers should now use these new exynos_pmu_*() APIs instead of obtaining a regmap using syscon_regmap_lookup_by_phandle() Depending on the SoC specific quirks, the exynos_pmu_*() APIs will access the PMU register in the appropriate way. Signed-off-by: Peter Griffin --- drivers/soc/samsung/exynos-pmu.c | 209 ++++++++++++++++++++++++- drivers/soc/samsung/exynos-pmu.h | 4 + include/linux/soc/samsung/exynos-pmu.h | 28 ++++ 3 files changed, 234 insertions(+), 7 deletions(-) diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 250537d7cfd6..e9e933ede568 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -5,6 +5,7 @@ // // Exynos - CPU PMU(Power Management Unit) support +#include #include #include #include @@ -12,29 +13,204 @@ #include #include #include +#include #include #include #include "exynos-pmu.h" +/** + * DOC: Quirk flags for different Exynos PMU IP-cores + * + * This driver supports multiple Exynos based SoCs, each of which might have a + * different set of registers and features supported. + * + * Quirk flags described below serve the purpose of telling the driver about + * mentioned SoC traits, and can be specified in driver data for each particular + * supported device. + * + * %QUIRK_HAS_ATOMIC_BITSETHW: PMU IP has special atomic bit set/clear HW + * to protect against PMU registers being accessed from multiple bus masters. + * + * %QUIRK_PMU_ALIVE_WRITE_SEC: PMU registers are *not* write accesible from + * normal world. This is found on some SoCs as a security hardening measure. PMU + * registers on these SoCs can only be written via a SMC call and registers are + * checked by EL3 firmware against an allowlist before the write can procede. + * Note: This quirk should only be set for platforms whose el3 firmware + * implements the TENSOR_SMC_PMU_SEC_REG interface below. + */ + +#define QUIRK_HAS_ATOMIC_BITSETHW BIT(0) +#define QUIRK_PMU_ALIVE_WRITE_SEC BIT(1) + +#define PMUALIVE_MASK GENMASK(14, 0) + struct exynos_pmu_context { struct device *dev; const struct exynos_pmu_data *pmu_data; + struct regmap *pmureg; + void __iomem *pmu_base_addr; + phys_addr_t pmu_base_pa; + /* protect PMU reg atomic update operations */ + spinlock_t update_lock; }; -void __iomem *pmu_base_addr; static struct exynos_pmu_context *pmu_context; +/* + * Some SoCs are configured so that PMU_ALIVE registers can only be written + * from el3. As Linux needs to write some of these registers, the following + * SMC register read/write/read,write,modify interface is used. + * + * Note: This SMC interface is known to be implemented on gs101 and derivative + * SoCs. + */ +#define TENSOR_SMC_PMU_SEC_REG (0x82000504) +#define TENSOR_PMUREG_READ 0 +#define TENSOR_PMUREG_WRITE 1 +#define TENSOR_PMUREG_RMW 2 + +int set_priv_reg(phys_addr_t reg, u32 val) +{ + struct arm_smccc_res res; + + arm_smccc_smc(TENSOR_SMC_PMU_SEC_REG, + reg, + TENSOR_PMUREG_WRITE, + val, 0, 0, 0, 0, &res); + + if (res.a0) + pr_warn("%s(): SMC failed: %lu\n", __func__, res.a0); + + return (int)res.a0; +} + +int rmw_priv_reg(phys_addr_t reg, u32 mask, u32 val) +{ + struct arm_smccc_res res; + + arm_smccc_smc(TENSOR_SMC_PMU_SEC_REG, + reg, + TENSOR_PMUREG_RMW, + mask, val, 0, 0, 0, &res); + + if (res.a0) + pr_warn("%s(): SMC failed: %lu\n", __func__, res.a0); + + return (int)res.a0; +} + +/* + * For SoCs that have set/clear bit hardware (as indicated by + * QUIRK_HAS_ATOMIC_BITSETHW) this function can be used when + * the PMU register will be accessed by multiple masters. + * + * For example, to set bits 13:8 in PMU reg offset 0x3e80 + * exynos_pmu_set_bit_atomic(0x3e80, 0x3f00, 0x3f00); + * + * To clear bits 13:8 in PMU offset 0x3e80 + * exynos_pmu_set_bit_atomic(0x3e80, 0x0, 0x3f00); + */ +static inline void exynos_pmu_set_bit_atomic(unsigned int offset, + u32 val, u32 mask) +{ + unsigned long flags; + unsigned int i; + + spin_lock_irqsave(&pmu_context->update_lock, flags); + for (i = 0; i < 32; i++) { + if (mask & BIT(i)) { + if (val & BIT(i)) { + offset |= 0xc000; + pmu_raw_writel(i, offset); + } else { + offset |= 0x8000; + pmu_raw_writel(i, offset); + } + } + } + spin_unlock_irqrestore(&pmu_context->update_lock, flags); +} + +int exynos_pmu_update_bits(unsigned int offset, unsigned int mask, + unsigned int val) +{ + if (pmu_context->pmu_data && + pmu_context->pmu_data->quirks & QUIRK_PMU_ALIVE_WRITE_SEC) + return rmw_priv_reg(pmu_context->pmu_base_pa + offset, + mask, val); + + return regmap_update_bits(pmu_context->pmureg, offset, mask, val); +} +EXPORT_SYMBOL(exynos_pmu_update_bits); + void pmu_raw_writel(u32 val, u32 offset) { - writel_relaxed(val, pmu_base_addr + offset); + if (pmu_context->pmu_data && + pmu_context->pmu_data->quirks & QUIRK_PMU_ALIVE_WRITE_SEC) + return (void)set_priv_reg(pmu_context->pmu_base_pa + offset, + val); + + return writel_relaxed(val, pmu_context->pmu_base_addr + offset); } u32 pmu_raw_readl(u32 offset) { - return readl_relaxed(pmu_base_addr + offset); + return readl_relaxed(pmu_context->pmu_base_addr + offset); +} + +int exynos_pmu_read(unsigned int offset, unsigned int *val) +{ + if (!pmu_context) + return -ENODEV; + + /* + * For platforms that protect PMU registers they + * are still accessible to read from normal world + */ + return regmap_read(pmu_context->pmureg, offset, val); +} +EXPORT_SYMBOL(exynos_pmu_read); + +int exynos_pmu_write(unsigned int offset, unsigned int val) +{ + if (!pmu_context) + return -ENODEV; + + if (pmu_context->pmu_data && + pmu_context->pmu_data->quirks & QUIRK_PMU_ALIVE_WRITE_SEC) + return set_priv_reg(pmu_context->pmu_base_pa + offset, val); + + return regmap_write(pmu_context->pmureg, offset, val); +} +EXPORT_SYMBOL(exynos_pmu_write); + +int exynos_pmu_update(unsigned int offset, unsigned int mask, unsigned int val) +{ + int ret = 0; + + if (!pmu_context) + return -ENODEV; + + if (pmu_context->pmu_data && + pmu_context->pmu_data->quirks & QUIRK_HAS_ATOMIC_BITSETHW) { + /* + * Use atomic operations for PMU_ALIVE registers (offset 0~0x3FFF) + * as the target registers can be accessed by multiple masters. + */ + if (offset > PMUALIVE_MASK) + return exynos_pmu_update_bits(offset, mask, val); + + exynos_pmu_set_bit_atomic(offset, val, mask); + + } else { + return exynos_pmu_update_bits(offset, mask, val); + } + + return ret; } +EXPORT_SYMBOL(exynos_pmu_update); void exynos_sys_powerdown_conf(enum sys_powerdown mode) { @@ -75,11 +251,18 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode) #define exynos_pmu_data_arm_ptr(data) NULL #endif +static const struct exynos_pmu_data gs101_pmu_data = { + .quirks = QUIRK_HAS_ATOMIC_BITSETHW | QUIRK_PMU_ALIVE_WRITE_SEC, +}; + /* * PMU platform driver and devicetree bindings. */ static const struct of_device_id exynos_pmu_of_device_ids[] = { { + .compatible = "google,gs101-pmu", + .data = &gs101_pmu_data, + }, { .compatible = "samsung,exynos3250-pmu", .data = exynos_pmu_data_arm_ptr(exynos3250_pmu_data), }, { @@ -125,18 +308,30 @@ EXPORT_SYMBOL_GPL(exynos_get_pmu_regmap); static int exynos_pmu_probe(struct platform_device *pdev) { + struct resource *res; struct device *dev = &pdev->dev; int ret; - pmu_base_addr = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(pmu_base_addr)) - return PTR_ERR(pmu_base_addr); - pmu_context = devm_kzalloc(&pdev->dev, sizeof(struct exynos_pmu_context), GFP_KERNEL); if (!pmu_context) return -ENOMEM; + + pmu_context->pmu_base_addr = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pmu_context->pmu_base_addr)) + return PTR_ERR(pmu_context->pmu_base_addr); + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -ENODEV; + + pmu_context->pmu_base_pa = res->start; + pmu_context->pmureg = exynos_get_pmu_regmap(); + if (IS_ERR(pmu_context->pmureg)) + return PTR_ERR(pmu_context->pmureg); + + spin_lock_init(&pmu_context->update_lock); pmu_context->dev = dev; pmu_context->pmu_data = of_device_get_match_data(dev); diff --git a/drivers/soc/samsung/exynos-pmu.h b/drivers/soc/samsung/exynos-pmu.h index 1c652ffd79b4..570c6e4dc8c3 100644 --- a/drivers/soc/samsung/exynos-pmu.h +++ b/drivers/soc/samsung/exynos-pmu.h @@ -25,8 +25,12 @@ struct exynos_pmu_data { void (*pmu_init)(void); void (*powerdown_conf)(enum sys_powerdown); void (*powerdown_conf_extra)(enum sys_powerdown); + u32 quirks; }; +int set_priv_reg(phys_addr_t reg, u32 val); +int rmw_priv_reg(phys_addr_t reg, u32 mask, u32 val); + extern void __iomem *pmu_base_addr; #ifdef CONFIG_EXYNOS_PMU_ARM_DRIVERS diff --git a/include/linux/soc/samsung/exynos-pmu.h b/include/linux/soc/samsung/exynos-pmu.h index a4f5516cc956..2c5ce21fb00b 100644 --- a/include/linux/soc/samsung/exynos-pmu.h +++ b/include/linux/soc/samsung/exynos-pmu.h @@ -21,11 +21,39 @@ enum sys_powerdown { extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); #ifdef CONFIG_EXYNOS_PMU extern struct regmap *exynos_get_pmu_regmap(void); +extern int exynos_pmu_update_bits(unsigned int offset, unsigned int mask, + unsigned int val); +extern int exynos_pmu_update(unsigned int offset, unsigned int mask, + unsigned int val); +extern int exynos_pmu_write(unsigned int offset, unsigned int val); +extern int exynos_pmu_read(unsigned int offset, unsigned int *val); #else static inline struct regmap *exynos_get_pmu_regmap(void) { return ERR_PTR(-ENODEV); } + +static inline int exynos_pmu_update_bits(unsigned int offset, unsigned int mask, + unsigned int val); +{ + return ERR_PTR(-ENODEV); +} + +static inline int exynos_pmu_update(unsigned int offset, unsigned int mask, + unsigned int val); +{ + return ERR_PTR(-ENODEV); +} + +static inline int exynos_pmu_write(unsigned int offset, unsigned int val) +{ + return ERR_PTR(-ENODEV); +} + +static inline int exynos_pmu_read(unsigned int offset, unsigned int *val) +{ + return ERR_PTR(-ENODEV); +} #endif #endif /* __LINUX_SOC_EXYNOS_PMU_H */ From patchwork Mon Jan 22 22:57:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 764743 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DA91381DC for ; Mon, 22 Jan 2024 22:57:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705964254; cv=none; b=Ed4zAZ23i0BJp79F+xwC2m9MM67c37Mwvrvj9usiNY8aZhXqhrMZrglU3x4g5lk38miP0lBK3zPzU4CJVdUTrv+VamsBTG5trL3cBWfzzMFe0ZMSvHL807u92fjRNgz4S5Sz9B6xm31tmCsx88SLe46jzSVt404rz46j9FPKdbg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705964254; c=relaxed/simple; bh=BoHzIuF9/gjqWNPMlzNp4FmNG1UNGUTagv+K3rRO0Hs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ycq87wvIKir4pJeQ3uEdayOqWj2QA/yu3xnZtU6XGID33nAicODHDUTvUjNaZ0TbmHlvRz05KiOjsaaW63aqkcT0xZv/MBfKYxjBZ/M/Nod7yo5HJ4SNtfIfvXjPsBbvmPlFeGxfsx1SpjoznNAGQda48KJui7F+NlJBjAIeBHg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mcmFjQTl; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mcmFjQTl" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-40eb0836f8dso10014865e9.2 for ; Mon, 22 Jan 2024 14:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705964251; x=1706569051; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y4bTzUw+MKMULDVrOGqPlspEn1WsvCRNgroEJ1fsBHQ=; b=mcmFjQTlw5O3sD4pXK8wVxzni0TDCUA8+MWev8ndkjg4jzx6W5Cptz/p2dQUnBvg3i q1tDBpRcYP7XeKkuR2itCEICt7WTXgJQSwgtgFLZs656hVK5GmA9IIp5aVj2F0Tah6uB Ou9efJEBz/GvO6t2nUnNX0BfPCjJUtbAId+6Wfw9/c9rqJ5KViEsAemrqDJetfLqs6v4 5Z1FLep+pbSo4wuFN0A6IIeNS/HVYCBAnPrvEmQ2Fe/fI0NMPt+fLC6Lf0I7qvM/ErF8 05VWBqdMYJ83d4NBmXeOBfgc2rhqas5rbCpB5EZH/zTGIjkvZj/7mTius1P6J/abPYGR 6tqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705964251; x=1706569051; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y4bTzUw+MKMULDVrOGqPlspEn1WsvCRNgroEJ1fsBHQ=; b=RTbZQXNNHHL7KrqjoX6/Xxsi/ZAOWEkYJ4QAOjdwryLH6a23P7vmEFJb8P9YwsEqVD dDaj62Zt0OKhSDT1D1/yW/ld039J7gi4ZEAXxSxSoVg6PkJ573vHFPEIMrzptycmNKCN 7nSOdhHxz/bUZDPMp+KBhb1JHmEiI33kTidZJOb2QqewfUQoHj5clIPD70vBRbhokITP mFEYOW7gS8O7mP1WrLKulDwyQHV4szsRapXtzSHaWpe4XY8SU0GougA+k4pObN00N/k2 4X8beV5fVOc2JAi7zWceI/+Caax7et3rhcfxettyN0ZS+Ge+Uhroqe8FjKbga9UW91AY 3NVQ== X-Gm-Message-State: AOJu0Yxe6vIs3+JUu0OWnZF2VfpKo6ciCyav3leBRth38hLBgPqwkXYU Mhrn6hoiVtnCkenGI6Q7eSWgyT89EG6Jd9BodeS4J/enXn9cKhnpx+eNisEqD2k= X-Google-Smtp-Source: AGHT+IETd2PX8JmJBxIqCh7S7rWJGs2+2BZQchWv4xtVboyS/6Q+VsUVSnmnkjvLrWfcHXbLQv6r8g== X-Received: by 2002:a7b:cd0e:0:b0:40d:3dd7:46f8 with SMTP id f14-20020a7bcd0e000000b0040d3dd746f8mr2773352wmj.127.1705964251630; Mon, 22 Jan 2024 14:57:31 -0800 (PST) Received: from gpeter-l.lan (host-92-18-76-30.as13285.net. [92.18.76.30]) by smtp.gmail.com with ESMTPSA id fa26-20020a05600c519a00b0040e89ff10f5sm19776847wmb.1.2024.01.22.14.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 14:57:30 -0800 (PST) From: Peter Griffin To: arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux@roeck-us.net, wim@linux-watchdog.org, conor+dt@kernel.org, alim.akhtar@samsung.com, jaewon02.kim@samsung.com, chanho61.park@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 4/9] arm64: dts: fsd: remove deprecated samsung, syscon-phandle Date: Mon, 22 Jan 2024 22:57:05 +0000 Message-ID: <20240122225710.1952066-5-peter.griffin@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240122225710.1952066-1-peter.griffin@linaro.org> References: <20240122225710.1952066-1-peter.griffin@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 samsung,syscon-phandle is no longer used by the Samsung watchdog driver to access PMU registers. Signed-off-by: Peter Griffin --- arch/arm64/boot/dts/tesla/fsd.dtsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi index aaffb50b8b60..9b55e44c1db0 100644 --- a/arch/arm64/boot/dts/tesla/fsd.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi @@ -625,7 +625,6 @@ watchdog_0: watchdog@100a0000 { compatible = "tesla,fsd-wdt", "samsung,exynos7-wdt"; reg = <0x0 0x100a0000 0x0 0x100>; interrupts = ; - samsung,syscon-phandle = <&pmu_system_controller>; clocks = <&fin_pll>; clock-names = "watchdog"; }; @@ -634,7 +633,6 @@ watchdog_1: watchdog@100b0000 { compatible = "tesla,fsd-wdt", "samsung,exynos7-wdt"; reg = <0x0 0x100b0000 0x0 0x100>; interrupts = ; - samsung,syscon-phandle = <&pmu_system_controller>; clocks = <&fin_pll>; clock-names = "watchdog"; }; @@ -643,7 +641,6 @@ watchdog_2: watchdog@100c0000 { compatible = "tesla,fsd-wdt", "samsung,exynos7-wdt"; reg = <0x0 0x100c0000 0x0 0x100>; interrupts = ; - samsung,syscon-phandle = <&pmu_system_controller>; clocks = <&fin_pll>; clock-names = "watchdog"; }; From patchwork Mon Jan 22 22:57:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 764742 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9DCA47A4B for ; Mon, 22 Jan 2024 22:57:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705964258; cv=none; b=D/OFY3IFqNJTyt/rk9sFiqDi43ghi2QionPJww6jZDv6zbCVA5IoRnL0LROcfoOO3rOVkiAi/DtYpm2HDjhGLpVQeNtDEJJi3RDDrXH/4ElGjwGGReeS2svv8rjwDYmp07hr+xLpFJroJhcRqg7szYkxfERW0uDuhD0Ck5iwZ3Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705964258; c=relaxed/simple; bh=ZgVtAIKrhtdCLGsKgWlIaERKd0KusdG4ZWad/DmmfvI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=diNgID8nVusf05LRkgXpVHXOI2mj+O8gUZzDGZnq1pQrmYJ2BtXkG1FY1+lfVQv3iexkSKdvKdCdCTX+/XoBBsKgxxGkzpjDOkQVSANg9hHCM+9/oth2vyd1MEHpAxt9E6F1QRXeHj5B/6mJCsuc5lmUCIVeRAg5/PxWcuJ5ppE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=WQhmuVoa; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WQhmuVoa" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-40e880121efso41001125e9.3 for ; Mon, 22 Jan 2024 14:57:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705964255; x=1706569055; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7y+1O2dDRcam6iTMZXdaVDgBYCAnl5nZ5iJ12xvO9iQ=; b=WQhmuVoarWFIGtqtGwscjgHLusKzOTmo7CZPnJ3x6zaPkP+FRhKGGgvnR5v6gc9crx ZlVGVQ1k72+2OqS5KNyXOS3mhKQdTeUGTWgeT1KEnGud12Gr9TE0kQhJ6Ou5h+VJRt84 odcjzIkD4qenZk+nNiVFtlXMaGDHdJgi0VWk7McGLgoTNtZPzjjjyvL6kD43rAjV54Ro KyYYk50UdefbRF856JC5c2qnLORX1hqHoDoMUlhZ9zykgCDS5u77P49k3xSX/k3diMq0 JO+gJzS3KOnSjf8rnFh5CEHiG1S8zbUp7TkPbg40x+PN0CPyNqW3ZD/moSmqddDoB/1H g1Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705964255; x=1706569055; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7y+1O2dDRcam6iTMZXdaVDgBYCAnl5nZ5iJ12xvO9iQ=; b=EcMABMw3ZJ0CGnAuRnm6e0KMzFlYE+qRYQo+bxW7VF0DQicEwrgYPxVkQsFJws8jZ5 En/n98bA8V5WPBkNGyNRZaeYOH7d/L9FoJ1g0EUAwQqBE3ZbyOUeA0KOD98j8iv6Hm1q 1b+F08/vACqqFOdXzeoe0NE3thp7tm/sxI1CBf7CW1aNtMkUFnCHj802ZIqqkIViCFmd Uqn5S6bJ575ZU93iNulI9bSZDF8754Cf19iQgH/ffi6gh4utFZSlk5ZgYNHCImIprPdk A1b/MS30YL7k3N2z1Y3o5v0vbcNxItHIlxl383zlQisyPPKpEUGDCd+bkjuom64qffRG rmOA== X-Gm-Message-State: AOJu0YwijyU3LsQ+J9/fB6AG43vENva/ss6bIQCChkVRiDKi6iQ8Jnah xkx9maMqpUq0C7FQSaoomyVSTRyEuf7q0a2TLlWDy9ON8jB90gGBciLAlQcpnQQ= X-Google-Smtp-Source: AGHT+IHqRrOEHIHhSifFZN302yhKTakQXstI0NxfnOUmXlruuoJ4Ui4e3EJWHkPdJKGLM3ndNTcg/w== X-Received: by 2002:a05:600c:5107:b0:40e:4782:fea7 with SMTP id o7-20020a05600c510700b0040e4782fea7mr2785067wms.180.1705964255173; Mon, 22 Jan 2024 14:57:35 -0800 (PST) Received: from gpeter-l.lan (host-92-18-76-30.as13285.net. [92.18.76.30]) by smtp.gmail.com with ESMTPSA id fa26-20020a05600c519a00b0040e89ff10f5sm19776847wmb.1.2024.01.22.14.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 14:57:34 -0800 (PST) From: Peter Griffin To: arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux@roeck-us.net, wim@linux-watchdog.org, conor+dt@kernel.org, alim.akhtar@samsung.com, jaewon02.kim@samsung.com, chanho61.park@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 6/9] arm64: dts: exynos850: remove deprecated samsung,syscon-phandle Date: Mon, 22 Jan 2024 22:57:07 +0000 Message-ID: <20240122225710.1952066-7-peter.griffin@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240122225710.1952066-1-peter.griffin@linaro.org> References: <20240122225710.1952066-1-peter.griffin@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 samsung,syscon-phandle is no longer used by the Samsung watchdog driver to access PMU registers and is deprecated. Signed-off-by: Peter Griffin --- arch/arm64/boot/dts/exynos/exynos850.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos850.dtsi b/arch/arm64/boot/dts/exynos/exynos850.dtsi index da3f4a791e68..6d4789c77a1c 100644 --- a/arch/arm64/boot/dts/exynos/exynos850.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos850.dtsi @@ -216,7 +216,6 @@ watchdog_cl0: watchdog@10050000 { interrupts = ; clocks = <&cmu_peri CLK_GOUT_WDT0_PCLK>, <&oscclk>; clock-names = "watchdog", "watchdog_src"; - samsung,syscon-phandle = <&pmu_system_controller>; samsung,cluster-index = <0>; status = "disabled"; }; @@ -227,7 +226,6 @@ watchdog_cl1: watchdog@10060000 { interrupts = ; clocks = <&cmu_peri CLK_GOUT_WDT1_PCLK>, <&oscclk>; clock-names = "watchdog", "watchdog_src"; - samsung,syscon-phandle = <&pmu_system_controller>; samsung,cluster-index = <1>; status = "disabled"; }; From patchwork Mon Jan 22 22:57:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 764741 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A910A4A9BA for ; Mon, 22 Jan 2024 22:57:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705964261; cv=none; b=N79OvGv+EJIWu+h+4BFvCD4ssocVnz7vjye7WZy9iI/z7R+riLwpBap96D1YUBYrDHBZ50Z7Cee3SnbLcpw9LdDR0AX9bFMbh2h3EOVUfxVmdu4FB7ko9Q2cHVkLKEllnh4xbfzt76hww9TbYLVpNeVfg1zup5v0uN/+tijhPNI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705964261; c=relaxed/simple; bh=t8ZhB9Hu7K4Ql69piBPtPrEhaMrRJa2GJ7YXvafwt4A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kUKfsSeUzCuZ93SWpNlVy8W7sX+EupVfGTjTiywDipwZnPjPFeN8Gns8E6kKgJ5/L9tDbDmRstYt5bsAeMNIMcTZ0D2JF3PxM7C0wSOjXy9bUSUrkUJkOTn/uXdo2SNC/2zqKWOELgrs10YqcYCOWSXF1Ja5hr/JsCFh97q1Ixo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PqEfn9aQ; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PqEfn9aQ" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40ea5654271so26721215e9.0 for ; Mon, 22 Jan 2024 14:57:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705964258; x=1706569058; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9+yXcHZUiMblwUqkt8towiLq/bcfaAns/f7tUicypCM=; b=PqEfn9aQMDjMpVjxcwU3m06SInZctx95KFmBTKBsntncoscyHDc2lliCVayNpxOYQQ SnUEnO6h/F9bl26o4vmJUAbbewhFPTnJ5YybFJYUC83L0RUIswVo3MBNhhYt/fWyPlL+ HcyAhfzlNdTng9JeUiraWKSWJ1tbi//VRhnXxGc773QVcIxczQKJuHQfD/BgjGgnKMcn uVAYpVymfpBIRn5Kj6bbwowYemvkNzgaiRuzl0X/iJGbjrBN3ls8xOXcmIk60hgX/Eyq vB1sp/akhwPkY5bKsuA8zxAyxlqgLRbRFPIpHA6duuUl1Yw0vr24hJA86lbWCcxX90Wo lrKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705964258; x=1706569058; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9+yXcHZUiMblwUqkt8towiLq/bcfaAns/f7tUicypCM=; b=vpsXlQi9Uq0Tfa5uQw5pL7Ubi/pFQr3aIxDov9f4XYaMIKlKVfjGD8GQRx5IFNdmd4 caDA85uwURGO9e9rmm5rwxMH2K59PY5TCpq+GzdWDeG2ijQ1PU23/1InPOXW/LCXzHsB AnhPsMuFxojB95B3G80cSh8kG61GZ08icAK4ykZqe8jVHw7pZbymtM4RTtypr7tsqIFk 4SHdN7REzLbiURD+IFSWNxeAJrcCAZMUN58s69kFDLW1pUONXeEyGorMm646crW8kJvj RmvzZd7leiAwrjW1Glqw6s4H2hoCovYE6GjwLY7WZMteCaw+EAtxQxFngm1uhRUCZf5c ywOw== X-Gm-Message-State: AOJu0YxnWBmiqcHJFEVIvlZ2JFNT8k/2NhtlTw5N/VCrz75Y22Eis3Im CN15zQ7GCH50Zyhgs49sxYrrRLOn/z8r6YUEhJj6G4vKOIZocSQu7aapcXRtl1Y= X-Google-Smtp-Source: AGHT+IGTxTra3oeT53FfIH97Y2Gx41002Oxx5G+brDmtK77zTRluoeyF5o89lKBl/s6gRCsv7yvONw== X-Received: by 2002:a05:600c:1ca6:b0:40e:b0a1:b96e with SMTP id k38-20020a05600c1ca600b0040eb0a1b96emr676113wms.69.1705964258092; Mon, 22 Jan 2024 14:57:38 -0800 (PST) Received: from gpeter-l.lan (host-92-18-76-30.as13285.net. [92.18.76.30]) by smtp.gmail.com with ESMTPSA id fa26-20020a05600c519a00b0040e89ff10f5sm19776847wmb.1.2024.01.22.14.57.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 14:57:37 -0800 (PST) From: Peter Griffin To: arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux@roeck-us.net, wim@linux-watchdog.org, conor+dt@kernel.org, alim.akhtar@samsung.com, jaewon02.kim@samsung.com, chanho61.park@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 8/9] ARM: dts: samsung: exynos4: remove deprecated samsung,syscon-phandle Date: Mon, 22 Jan 2024 22:57:09 +0000 Message-ID: <20240122225710.1952066-9-peter.griffin@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240122225710.1952066-1-peter.griffin@linaro.org> References: <20240122225710.1952066-1-peter.griffin@linaro.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 samsung,syscon-phandle is no longer used by the Samsung watchdog driver to access PMU registers. Signed-off-by: Peter Griffin --- arch/arm/boot/dts/samsung/exynos4x12.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/samsung/exynos4x12.dtsi b/arch/arm/boot/dts/samsung/exynos4x12.dtsi index b4b5e769145b..0fea32616c89 100644 --- a/arch/arm/boot/dts/samsung/exynos4x12.dtsi +++ b/arch/arm/boot/dts/samsung/exynos4x12.dtsi @@ -311,7 +311,6 @@ watchdog: watchdog@10060000 { interrupts = ; clocks = <&clock CLK_WDT>; clock-names = "watchdog"; - samsung,syscon-phandle = <&pmu_system_controller>; }; adc: adc@126c0000 {