From patchwork Wed Dec 18 00:34:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 13912774 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 321DB1DFF7; Wed, 18 Dec 2024 00:34:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482062; cv=none; b=DbiNIv9mXtCnaRZUeBLAzP0a2mYlDTM/gkKGfAHQvx9ZGbpiaQTxnyWZS/G8c6vJNCqcG0YvrbmWxJvacYpz8t/oSV6syImFEkbvHzp4IFKynbvlw3snrBNEne5o72swIDhnLBRLty61Kmh+YzKGeV+BJ/fJsYboor7ult31Bic= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482062; c=relaxed/simple; bh=aKdB7lLVAE2Q3dAy9et1QMr/50BnzZqoxEzPqUImsC0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gYKgRWrvh27vj1nY9POoSrKxun3HPcx3I5gAR18MzUkU5exkJ8Nl2IUytgEVGmeq2WhloVC4zqPD2znVYeOwQdE/Ha2SjoOtR+ETGR3ivO5QvcQuVgpIVt9z0393H4X2kGod06Q/F+I3tQckK+BQV61TX6sJQT5Fiku+k8lEeII= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SOehtCzf; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SOehtCzf" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-436345cc17bso31234175e9.0; Tue, 17 Dec 2024 16:34:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734482058; x=1735086858; 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=0SAvTI9Gsv8CWnyIAt9AdKtkDLtucHzA4DU7OmDHBv4=; b=SOehtCzfWwfzTaIhtoOseGgYZtSws+Alye/pX1BOow8VlnB0oJCW/kETC4zKLmEBvn NUnYMUXjhhSOkadTb2v7mrBH8WHTxNcAgOLqbZLVdtvP7IIC9RDSTHU5ykETAOalCLWn Srk/Oif8SI7Sfa6Ypu/D33I2cu1XJCZzbl7jtGmyp/eF6/Mli22Sku3SoDUNkw05SJEl 0FB8F9RW6/DxPPTMUdYd8YT/jIjtNaao2mRJ1E8KYmUBeNH2537QHpKePkZ3992ewWyt 4G+zJN2SRwd21huOKnkMlvImioveUCtrjkB16I7ZakveI9ZxMvIOf8QEEJG0E9qhS7OG W0JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734482058; x=1735086858; 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=0SAvTI9Gsv8CWnyIAt9AdKtkDLtucHzA4DU7OmDHBv4=; b=KG8MvPjnl10GXUkWo8DF6O9D0pCDzzghXR0rNVhb3roSAykYpHMHkC0gpWI9VlbVps Bt76z8/cyF+PyjZJ+T/JV7lHzppjo2FnV1EJ0VrDBp6kt6MKHkbB3jsUYERpolYRlqCU XCJccDQtilGFaxXIEMbOKM/NnYhci5TIltpDohPjg7S05J4A1skubR9ydt4V3M8tl0IN gMdqdPbLjH5PvSvmWW8KohaN8yMxMm5bD3fkyBkUbcp3+XnpSCBal879xmM/Qam/bxq3 39POwyTAie/j5Tz7KADLz2frDyohzuystYFiQ4ojoJQEWUNN6dPFFqc+F/fTjQLNDrlj E3fQ== X-Forwarded-Encrypted: i=1; AJvYcCUpk08icbsbLIVBrzxtVpsCWAxGupGRbpJYc+t5ndIQwg6vAPIIlJPk2exIs27k4nafH7QoUKuhcAyuMhIi@vger.kernel.org, AJvYcCUwO9GQyc1D7/2vwFkN0knaaREteiqhZRvw42OTEx6tc5v7i5J2rnx+uwmRED/GDdAbI8T/xuZmL2OFcNc+hmY=@vger.kernel.org, AJvYcCV+sy3iwCKdJ6hulIOvHa58AmljlLsnkkVuD44wPLUp7lJvFJ5GA6qKn/NiSA+W7fMa4nAa8R8fXV/X@vger.kernel.org, AJvYcCXqsFh8RBh/SOgTTwAelznd3gkoMDe+/Ry4tZomfkeSCGjhcsykdPxjgOPSHiMeGyHw3Z5UDnxdS4SX@vger.kernel.org X-Gm-Message-State: AOJu0YwRpLUACWRtSNzVwcjt5HzPdhLhMkIUdmRuhdh/Dzngmp0lrSRf LCwVF3hmcbm+fUPJfUkS9+QPMkp8DLxKnKRTH+KrlYmlSCP49Y7oBKpLKg== X-Gm-Gg: ASbGncuObe9HIYoQ4V6wNkUZ5HOO4bdt9WSPJjQS61tR+bUE4gQQBGcWHFG1u0UOM7z ySrbgY0LHSIkqzh4QJOLtPIvwPMNTrHayLEE6DmbjLUEOq42q9QHf+AqLxr7vWrdvE7VV9doqrz jkaZCAkQ9m9C7jbK1cp/Z0/GlJe4W8LzprKSsGDzFrhJMQvvhHLn+xOGD9b2whbrng4tniMgTe5 XrUvIQkgvU2denyK72W8d3wNYpOMkjzkyNLPEnIcdHt+g8nanG93CmOxNSbrS+6EIWhDZezx//p 5AmOfKSxjA== X-Google-Smtp-Source: AGHT+IGnh/5jNxS13zaDeyu0cOc8Xr9e2E36LjtKDBEf0LFah6JsJSz2YZ7eAcC0OrxZdBNeThLJGA== X-Received: by 2002:a05:600c:524b:b0:434:a350:207c with SMTP id 5b1f17b1804b1-436553ecb7cmr4091465e9.23.1734482058227; Tue, 17 Dec 2024 16:34:18 -0800 (PST) Received: from prasmi.Home ([2a06:5906:61b:2d00:ca61:1d3a:8af0:1c5a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b287sm2365625e9.29.2024.12.17.16.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 16:34:17 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wim Van Sebroeck , Guenter Roeck , Magnus Damm , Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH 1/6] dt-bindings: clock: rzv2h-cpg: Add syscon compatible for CPG block Date: Wed, 18 Dec 2024 00:34:09 +0000 Message-ID: <20241218003414.490498-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar The CPG block in the RZ/V2H(P) and RZ/G3E SoCs includes Error Reset Registers (CPG_ERROR_RSTm). A system reset is triggered in response to error interrupt factors, and the corresponding bit is set in the CPG_ERROR_RSTm register. These registers can be utilized by various IP blocks as needed. For example, specific bits in these registers indicate resets caused by events such as underflow or overflow of the watchdog timer. This functionality allows the watchdog driver to determine whether the current boot resulted from a `Power-on Reset` or a `Watchdog Reset`. Add the syscon-compatible property to the RZ/V2H(P) and RZ/G3E CPG block, allowing drivers to interact with the CPG_ERROR_RSTm registers as required. Signed-off-by: Lad Prabhakar --- .../devicetree/bindings/clock/renesas,rzv2h-cpg.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/renesas,rzv2h-cpg.yaml b/Documentation/devicetree/bindings/clock/renesas,rzv2h-cpg.yaml index c3fe76abd549..f42d79e73e70 100644 --- a/Documentation/devicetree/bindings/clock/renesas,rzv2h-cpg.yaml +++ b/Documentation/devicetree/bindings/clock/renesas,rzv2h-cpg.yaml @@ -17,9 +17,11 @@ description: properties: compatible: - enum: - - renesas,r9a09g047-cpg # RZ/G3E - - renesas,r9a09g057-cpg # RZ/V2H + items: + - enum: + - renesas,r9a09g047-cpg # RZ/G3E + - renesas,r9a09g057-cpg # RZ/V2H + - const: syscon reg: maxItems: 1 @@ -73,7 +75,7 @@ additionalProperties: false examples: - | clock-controller@10420000 { - compatible = "renesas,r9a09g057-cpg"; + compatible = "renesas,r9a09g057-cpg", "syscon"; reg = <0x10420000 0x10000>; clocks = <&audio_extal_clk>, <&rtxin_clk>, <&qextal_clk>; clock-names = "audio_extal", "rtxin", "qextal"; From patchwork Wed Dec 18 00:34:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 13912773 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 282901DFEF; Wed, 18 Dec 2024 00:34:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482062; cv=none; b=aQZ8hMTg+wxx6Ic0iScEVRuineJbUH2Q4fgS/02JyXQmiO8Wo5c9bKl7x4i4GmUHievJugoNKN+dOFZPoiQZIKKIjsCOVIYn1KxmsckPzTXkzMIu+zvR+AHsmby/TqRu6TrY6gNeT94OjaPFa1JDArcU7ghn1taRD1EsOdU9tH4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482062; c=relaxed/simple; bh=B3HCa7+jQiYyUi3o+aXQZwpW49Pk5OrZTW2OksbQznw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KNN4EfchkRrf54PsS/ky1ADpiBL41NyNqVHWRGPD3s7Whh9ZdiqY82ozD51XdIwk5OFrbHVB+GKQNl7KjzDuJSLLTw/0MkXtXzOK0Hde5WYeJ1QJS1SANm3D688poEJKtQX96rWGMKtYyuiAYUBtSSQnXcJD6j0njwcxJiAPhBg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=irNtXeyV; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="irNtXeyV" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-43622354a3eso41369325e9.1; Tue, 17 Dec 2024 16:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734482059; x=1735086859; 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=af2GxGoDsM+J8AI71Qt7E5QlnwpUB1Bcv/VScnNj+u0=; b=irNtXeyV0XoiHDaBWJxbr/UY7dwCIBVc1JaA/8xfyQeLjG+230IJlDKhlwTvBClI+X 3JdLGLXGKDnz3+4c8W2dJ1Ez0K4AKshek+rxigaMzra18ayOAq3yculrIyIFZr7Uxlmv DUhhl4KUVnrLvt0eeg/MJQ7PmuyPyqm7YdC4dzBwsF53qF3NKHSmC6W94R2LlPhxX437 LzHpWMjCr4B8eEwEZWmo/DqkpRjAfG9bBEpiwwL56MQd7psUs8S3uqgNXWPaqH8UD5RY OwTZiHGwj3y6JlXJIL/u1/XecUNVo3KBEMtXNVf7Zoy81FtHpHLS2kjdyf5Yqy6V5NvQ WdFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734482059; x=1735086859; 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=af2GxGoDsM+J8AI71Qt7E5QlnwpUB1Bcv/VScnNj+u0=; b=G4W0JTLODOPJA6bOxGg0Jv0jgFFmyl0m52rDQg7fPwXd5uf4nQ/xpYdjgbncL7ooq2 OIgJAok1cVASkgaXQFp3klJ+AgOoA0NM6TtdZN8EwoSbeSqSal2L3mF3kPAQwAykbYoq cj2H4p1dglHruRVchwHeKdxzSroPLbL0N+ZUDAhrH8pha3dd9SuSzFaKNMTful0knVsW UEjtYehzEjHBWTcQM/UWfI9OHuezPDHhZ6YWZnDYkdmc6JLe2RahI9C2yYZ4B8tSaY4B UQ7yf81RuwEDfnUwhZ5AxrUvpv5iblB/jwLHoDvvDidg6K0XKlb7OeXTKqd/lclFJwkr AxgA== X-Forwarded-Encrypted: i=1; AJvYcCUHn2UJGYIZSbVWSqc3B+Qoesr4txDrcAXh4TuiyDx7//IG6eo00mTPI063LrZQnrNZmLZan1AXYKwO@vger.kernel.org, AJvYcCWHw0jY9ax9MHzQ9DyFN9zkageoz/ajChiNPQXS8/+RZdD8EbMkzUID7BIDNgeZdFd/D4jaWevKjBi8@vger.kernel.org, AJvYcCWbL85Q9DlFd0KKQJiuBNQ8CrZITIasaiy3Caq/1w75EIqCCAJE/PLGClSYGdL6e9JMPasg6jldASw1jgTAh08=@vger.kernel.org, AJvYcCX/Cfzexwl3GMeQTEep5oYbwVhLlujlWfFs7vp4zJxMptump/wiZM56C5RHB1XUe9WUiHcTjR0uF/qoVURK@vger.kernel.org X-Gm-Message-State: AOJu0YwQ3rXF+o+zExjVJRs5aWQc24VjPEwFObv+0r9FJqoKLp2KoNL9 V9RAiogNF2uKz2Rg8cG3oiEO84O6GpvWlXl9d5aU3mZwHd9mUFH4 X-Gm-Gg: ASbGncvmybFQZsEdifdmG4NIUhihURzI65wdphkeiqXMvHG/Lggw+S4aNJtI6XJcrc1 fXKDKlING8QwAgNAIKUciItBG38ThvFVphdvBzvkPdf37hXd1rAkq+cWp0J0ZSyR4F475axQS1w A7Siixi8OvwG1ZH16IOZi2YNXwmne0+wR7WcHRmzPr3QCYC54EDFf3n5UhxHc/hRruuw7mFipR6 X20gVNVcLAzxdxXsa1kn7e486AigYhEp4TKdaBm3Mznycm953Ew2CBjw7mV08za550Nthuajekt lnkZU6OSAw== X-Google-Smtp-Source: AGHT+IG+B5p77EYK1LoBu5F1XIZnC8CrYLs0zIUmDQzFy2+K6N4Y//vNYkNUEqYoj6ToGxM8dMC4pQ== X-Received: by 2002:a5d:6d02:0:b0:385:f19f:5a8f with SMTP id ffacd0b85a97d-388e4d2debcmr548305f8f.4.1734482059454; Tue, 17 Dec 2024 16:34:19 -0800 (PST) Received: from prasmi.Home ([2a06:5906:61b:2d00:ca61:1d3a:8af0:1c5a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b287sm2365625e9.29.2024.12.17.16.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 16:34:18 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wim Van Sebroeck , Guenter Roeck , Magnus Damm , Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH 2/6] arm64: dts: renesas: r9a09g047: Add `syscon` compatible for CPG node Date: Wed, 18 Dec 2024 00:34:10 +0000 Message-ID: <20241218003414.490498-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar Add `syscon` compatible for CPG node to allow the IP blocks to interact with the CPG registers as needed. Signed-off-by: Lad Prabhakar --- arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r9a09g047.dtsi b/arch/arm64/boot/dts/renesas/r9a09g047.dtsi index 7a422e9ad29e..f4e865b534a3 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g047.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a09g047.dtsi @@ -132,7 +132,7 @@ soc: soc { ranges; cpg: clock-controller@10420000 { - compatible = "renesas,r9a09g047-cpg"; + compatible = "renesas,r9a09g047-cpg", "syscon"; reg = <0 0x10420000 0 0x10000>; clocks = <&audio_extal_clk>, <&rtxin_clk>, <&qextal_clk>; clock-names = "audio_extal", "rtxin", "qextal"; From patchwork Wed Dec 18 00:34:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 13912775 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 6F78C22F11; Wed, 18 Dec 2024 00:34:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482064; cv=none; b=SekH/vSBnlomQdcqZlc6/2mkzQIIZvnNesBq77W11CFBfLjHplVB2CljEMi6RwjWhQNSm1gkMfSbRwaiUpO4xuRt1mFsbAgO2gnL7RC7lVRefSjkW5f34fUnaqE8IRn0mQc9CKHtKApVawTC6e/GISfq+XNjbYi7sxJYMx9+lss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482064; c=relaxed/simple; bh=J0lN12o42Ts/XZ00sr2mUAvNLYFZDTiOMmSAXS4l/+U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EjuBPEKoReCNnF+HBz3Fwd7PTsQofvo5cNfgz7EJ+QpUgV7Vm5aDvpjy4NksxXpN2umYtGDfl8/Spz0dP7bLyhmq/uaf6vQRhwAKLWMujFMZILCwF5BwFutX5UpfWiZpijWCbHP/tsKNQkLoayJRlt9kozYMupFdqUd11QQgNWg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AglZ4gEV; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AglZ4gEV" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-385dece873cso2771351f8f.0; Tue, 17 Dec 2024 16:34:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734482061; x=1735086861; 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=SPsSY/vDTIBVJbWj/v2GMfspPaU8bYuXGnGAc+jp9Us=; b=AglZ4gEVnCQeHkGv6VLc2x76EnWxKUUxH5rgPvtGifUYgHjZnenioW9mBouXIzsIRS izpFPOM9sLHa7pwq/d6q/dlihwYCiO8uxvPecZr2JOt5Yst23I5T2VNcnKc0SbAKnM0B 2LwRYOHTe4gJZQX+jE9cYESQayDMnzVgdh7rq3/VhT02CB+aKnfpWH7tzu+iNUfbaQ35 5Z5lXDKJU+66sbeL7KhL3wXvlsPD5zFBhuNouBil2ODa1DImdR/qK/xKi/YvLUfUmqNo XtF+4ydgfzT2cp1zaptX5u52z2+tOSJUaLp/TXvtKowrZxptetzrezTIL2ZmlxfusihP oKqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734482061; x=1735086861; 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=SPsSY/vDTIBVJbWj/v2GMfspPaU8bYuXGnGAc+jp9Us=; b=NP9ZR/3NtbGvurgoK6/BsGtkPXI58hybSDUIlIrQF4rsMbbtqXhNybWjpYlWdn05Fg EGE34jt9sHkC0iOfp5kIP7k4DAHH5mr+hvjC5wBfKfvdS1w3LmlyObnQ6184XICTj2iz 66An4H91Z/eY2ZMJt5K7siImVuxIw+zhHAOKtFnvgLJ1/bcz47vsKxHQWsyWN2lF//Q2 fn8l4MyXsG+YMnkyWEHeAafMC5frj+AMQLLc6FXXCJ8loywWnvFWQQohdw/S8IDclQ0P 5m2QQAqB8ChJUi+7rd7Y7BK390y4kkorCGuXBJdum2OgxcugbP9Vs5UUUojkYIFUwKST 4sWA== X-Forwarded-Encrypted: i=1; AJvYcCU9P8xQDcBOBGQr0NmiAAT7h+fzbGg6+LLJW8fgBzL5QAwZAkELKbJ1JOrlUCLac9cVonpP0qktsCu/9za8Bqk=@vger.kernel.org, AJvYcCUFntdtw3gvVjUpm42LMPCk5OGXMTaMe8CfE+2YjdA+C1xKyb/AzIFfO9BlgM1l7yvf61dXgncFH9RZ@vger.kernel.org, AJvYcCWt9lHTp9KgRwanAFcx9FZbjy5x86WCEGqCTuEGx6BhhVQlcIoWkNfC9uDWA4cQKtey5ql4PZLaMe3L@vger.kernel.org, AJvYcCXlRKoZ8UQCAxqiwozVUGHpNsBuIpRVvB6nis1U/RKaybU/3ZcRboDNw9sn9DriG8CtSP9pNEUpYkbg3kNg@vger.kernel.org X-Gm-Message-State: AOJu0Yz1CoMdOV89rn+iDRTwc/eiGrWbzO3VYXVZh02cv1mMIsmKCpVk nIoRF/rz4ecxS947kwf6U5VkAy62WZh+xwkI4PXnoDEz8FSnLSGw X-Gm-Gg: ASbGnct6fE3VaZWhLBUjk3IIcQ7SKiOGXW7++DsghWiad/ghxesVkoJ4IhfwzScm698 mY5+FZGwyTEI9zkzDlTxjeFxLwVaJcHCnDhVuJcYqdCfn224MVLagAuhg2SrW9XLHxN7NdnFsQ1 fBAnREwG1gNv3bDXvelXlaUOCUSn62BjecRfXIAGBKtIXBNbsSMQssJEdVlx42XqQkojhaONdzQ 3UyYvTxESO2qaF7B8xVj10VinzO6ocMKZ2c24KK6eN1dKsPNJHp8JABopYjgGJZyDJ/j/vNl4Rh wPCldlSvuw== X-Google-Smtp-Source: AGHT+IEA0GZxPIv9R6wVCS/eOn0zksCUlvVblBDnJD1pkQ925GBD1cRznFzTY0qqMLlHeP3Vh7Qhyw== X-Received: by 2002:a5d:6c63:0:b0:385:d7f9:f166 with SMTP id ffacd0b85a97d-388e4d424a7mr711677f8f.17.1734482060633; Tue, 17 Dec 2024 16:34:20 -0800 (PST) Received: from prasmi.Home ([2a06:5906:61b:2d00:ca61:1d3a:8af0:1c5a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b287sm2365625e9.29.2024.12.17.16.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 16:34:20 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wim Van Sebroeck , Guenter Roeck , Magnus Damm , Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH 3/6] arm64: dts: renesas: r9a09g057: Add `syscon` compatible for CPG node Date: Wed, 18 Dec 2024 00:34:11 +0000 Message-ID: <20241218003414.490498-4-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar Add `syscon` compatible for CPG node to allow the IP blocks to interact with the CPG registers as needed. Signed-off-by: Lad Prabhakar --- arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r9a09g057.dtsi b/arch/arm64/boot/dts/renesas/r9a09g057.dtsi index e39da64a32e9..69de6c302b17 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g057.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a09g057.dtsi @@ -243,7 +243,7 @@ pinctrl: pinctrl@10410000 { }; cpg: clock-controller@10420000 { - compatible = "renesas,r9a09g057-cpg"; + compatible = "renesas,r9a09g057-cpg", "syscon"; reg = <0 0x10420000 0 0x10000>; clocks = <&audio_extal_clk>, <&rtxin_clk>, <&qextal_clk>; clock-names = "audio_extal", "rtxin", "qextal"; From patchwork Wed Dec 18 00:34:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 13912776 X-Patchwork-Delegate: geert@linux-m68k.org 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 890343B796; Wed, 18 Dec 2024 00:34:24 +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=1734482066; cv=none; b=ru+zrqdPgmLxVep3VXn1vDYUeyBMXCsuKIsSQLuQVbwNTosZigzkYk6uHx05n0vRmzm+x8VLVxAGsnSPovhvgx5ZTwkmdYgX6lCMtDueNvNkqYVcU/lpXQmVmjcV1imhkTwSGTVvMo4heHZghNBZqrAI36hc4idrsnhlBknZHcs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482066; c=relaxed/simple; bh=+TAsgaCXqhRTBRT+M9sAzsyFCkKyCTeDMysq63bAd8w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m95Qyhog6DJ0i4U4bzcpw7a8PADKwSNJFUD87vSnmV0El3GQdgyISx649YRBB/p5swvtyVLU99sNhl+I+c6usXgJ0jvlgtxo1IdD8gsjjq58xVf1CtCZI91abo5b3Gewv5jX4fyJSm4M4H4hvvg44EMQLk3SR8z3jRUWZvjZYC4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cr1WLu2q; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cr1WLu2q" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-436281c8a38so39586295e9.3; Tue, 17 Dec 2024 16:34:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734482063; x=1735086863; 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=CZdBY+5tEZHYvyrKeEY1U4t16Na927H2DWzxpoBLBE8=; b=cr1WLu2qsmpwZV9aWgNh8QkkN0ZHC6bK+KyuJJ0ooV1b8AmfAlB41bjxvwPJKfXi6E mr8ak3faHJfdMQEvq1Ox8Ud3aFsh7RS1Cc55c3veI9R1LWVnBkrZSBRYx9aKEvzpN3vQ QRDwFzzhqoUtPJK/t+703GWjQwH5MW2Gvohej3sICyeH/XSr4nUsv7528tzM7LvLEYK6 hfL8VfPoGPGIxbAtbDWaBOYa83c/DfVL8HHGGZRKp/UnG46KiOlv0XDfZqo4nicrJhPc ne3Cpy8Dvet6CvmrLt/bh3BupFo0Kn5iGMvAczEFX+Nt0LFvttC3wfUXPEdMGSqKNM94 mv0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734482063; x=1735086863; 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=CZdBY+5tEZHYvyrKeEY1U4t16Na927H2DWzxpoBLBE8=; b=lErO899ZNMVdQ/XW8aXbvc9qXR67O67nDLC6u1f1c+pL58e/us+iiDvwY+ReMSVS6d Z55vrHcqwT1I1oM5Cyk+EItWYPoflUnw5Q95FuyJBbbUuYJXE5kK9BctRWLphfPHCDM4 3db+QAeKFOicEdqLGswdzTo8VSgBSQ43s18F/bZst+240NU+UawZQA984pYbvsaO0wmm tvtdhEW19RY8TW+d9kRGrnSY9NhEctB8Ko2FBf3NspvB+N1Ac4Htb3FhH6Vl2HgXVP/d 4C+Kx0NsOiQ3Qm0VTDOGmWkk3YC9onMGk7qx5sOaOUmtKb4nXeHL9RAsEoOkHUWgxyTT fzSQ== X-Forwarded-Encrypted: i=1; AJvYcCU0nsS84wid6cl2iJXS5RQKEebKIkidRbSxBuAf8oN+XtFd8ZCPi4FWU1Oc/2MkjalFaTBkURviwrDq@vger.kernel.org, AJvYcCULin8V6SJ60DqB9zzDiotN3hV0rDqKp1smBMEOOe90gtrtpwYehVf4gHmqigMZshuZJa/Wm7lbXH2t@vger.kernel.org, AJvYcCUfhHjOlzLXNEbNSyXwjQgMEyx34jmsvJgB7HASLv/TXbc8+tWrwLLv2CEWrqtKanBnLGtGXCmtdpCrA1DS@vger.kernel.org, AJvYcCVu3/+0eMNTrZn29md62QQvFKE1V1RKH0PIqrUqE9u3fxUEzoDMVx+qAUhKZIpmTIYhfUfChugFrPG7+8vnz3s=@vger.kernel.org X-Gm-Message-State: AOJu0YwtltNUiG0qq0h/aWBT+FPsTLwKtBN8zIvCp1zcWasnUBp0Zibu P336aACeogeAxxKSeJF8SSZwYU2QuNmwRGQLrQPdnhOIanD8H28R X-Gm-Gg: ASbGncvpBxy3KjYu/UDpMr/Xk5vj+vSwCfM0U/03wEnHu8RIeA397k4WGUYglPLsImE suZZB+RqQ4xyS207AHEUPCwPGDOh08H0YeWhFxnvy4g0a7dM/SWKqhpsrhOOmOkPB135IGgRQA2 pUtqd5hHlsYazNJ/o68180O/mavU2fONgA78eRwZc2YKjWeWaeQSjRIUECnr6FZiCVvyucZnsAQ 7M22fQl12Q29382uNs62fdK3gy/bwPHNMOmhhfUlj42GYDmGWUWB6uBp4Od3dCrH3E9ASFsyofh wTcgcWe20Q== X-Google-Smtp-Source: AGHT+IH5hnUkLxv3MXBhU4b24Px4KyjQ6LcW15b7f/ZP3qkHz2abn98UwIIf8ihiSeht1mQRTKuh3Q== X-Received: by 2002:a05:600c:3b02:b0:436:aaf:7eb9 with SMTP id 5b1f17b1804b1-436553f4d1dmr4385295e9.20.1734482062512; Tue, 17 Dec 2024 16:34:22 -0800 (PST) Received: from prasmi.Home ([2a06:5906:61b:2d00:ca61:1d3a:8af0:1c5a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b287sm2365625e9.29.2024.12.17.16.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 16:34:21 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wim Van Sebroeck , Guenter Roeck , Magnus Damm , Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH 4/6] dt-bindings: watchdog: renesas: Document `renesas,r9a09g057-syscon-wdt-errorrst` property Date: Wed, 18 Dec 2024 00:34:12 +0000 Message-ID: <20241218003414.490498-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar The RZ/V2H(P) CPG block includes Error Reset Registers (CPG_ERROR_RSTm). A system reset is triggered in response to error interrupt factors, and the corresponding bit is set in the CPG_ERROR_RSTm register. These registers can be utilized by various IP blocks as needed. In the event of a watchdog overflow or underflow, a system reset is issued, and the CPG_ERROR_RST2[0/1/2/3] bits are set depending on the watchdog in use: CM33 = 0, CA55 = 1, CR8_0 = 2, CR8_1 = 3. For the watchdog driver to determine and report the current boot status, it needs to read the CPG_ERROR_RST2[0/1/2/3]bits and provide this information to the user upon request. To facilitate this operation, add `renesas,r9a09g057-syscon-wdt-errorrst` property to the WDT node, which maps to the `syscon` CPG node, enabling retrieval of the necessary information. For example: wdt1: watchdog@14400000 { compatible = "renesas,r9a09g057-wdt"; renesas,r9a09g057-syscon-wdt-errorrst = <&cpg 0xb40 1>; ... }; The `renesas,r9a09g057-syscon-wdt-errorrst` property consists of three cells: 1. The first cell is a phandle to the CPG node. 2. The second cell specifies the offset of the CPG_ERROR_RSTm register within the SYSCON. 3. The third cell indicates the specific bit within the CPG_ERROR_RSTm register. Signed-off-by: Lad Prabhakar --- .../bindings/watchdog/renesas,wdt.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml index 29ada89fdcdc..8d29f5f1be7e 100644 --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml @@ -112,6 +112,19 @@ properties: timeout-sec: true + renesas,r9a09g057-syscon-wdt-errorrst: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + The first cell is a phandle to the SYSCON entry required to obtain + the current boot status. The second cell specifies the CPG_ERROR_RSTm + register offset within the SYSCON, and the third cell indicates the + bit within the CPG_ERROR_RSTm register. + items: + - items: + - description: Phandle to the CPG node + - description: The CPG_ERROR_RSTm register offset + - description: The bit within CPG_ERROR_RSTm register of interest + required: - compatible - reg @@ -182,7 +195,11 @@ allOf: properties: interrupts: false interrupt-names: false + required: + - renesas,r9a09g057-syscon-wdt-errorrst else: + properties: + renesas,r9a09g057-syscon-wdt-errorrst: false required: - interrupts From patchwork Wed Dec 18 00:34:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 13912777 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 17DFC84D29; Wed, 18 Dec 2024 00:34:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482069; cv=none; b=eDNTIOJAoEKKYmauwOvk457oIZ2ssS9jb50SEn1QfHx3iPlFSHkyccmibIxNuFmA0BPtxqY1r4rBlQ+oe0BjnpGS4sHs81ebZD/S2NAoRelM32shQnqPoI6MLpKvH3Aj4HxkxIIXReA/GGUvbMysfVGmrksEqn278C/z1oEKONo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482069; c=relaxed/simple; bh=5VwEMJTph+GVwjmG6CJ2XFWhnE1JGhFEfKX6lMqy5Gw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CBEsPxEhS+cDxbhH+SupLmFe57ntIjNc8RgoR/aTbWYCgQ585TnoT18r0aGBEYJvRVuw1XeNaYyvujnHIG3nJHMDItW9H8SBdf2KW6iX1sHoH3jS8yWCUjYv8DEi65RO0/zRdSujHrgRQuXj5R9bG3/FD8ZB9matQRPNLMRIBbg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IbIRp/w5; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IbIRp/w5" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-43622267b2eso62074595e9.0; Tue, 17 Dec 2024 16:34:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734482064; x=1735086864; 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=97y/3kYKRHJbJ0DIVHg/JxdsBYdhheuIK0iylVg6CA4=; b=IbIRp/w5I50f2Yk0eQpk03LwNTVDJcEVDfIKFUwuRgIGjThXhwWaFZSI86ohfFVs+x GbmsoK8k4CZdzoY/Vs/WaTTrkiUuX+ZQse+EVpg++03xmHoEapJEBito6ySJ9sDt7uI6 YL5Ho/HWCXefnZ6WacuC9QN2evehPj6m2G3sN8SglgP2xchKNBMA71vgelZMlS///uKH 0pvwOo+oy1zMcpbNJXDF0oAeyR2KNq4YDy5sXIGwrG87F5P9kCbcUcHA/ANAECd18zuE p+1S8l4dN82soReOzVUO7Jr3gbxyhSA3DL6CtiInm1tyFRRXp9PAv5niZ5PGZZOpp+an kAYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734482064; x=1735086864; 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=97y/3kYKRHJbJ0DIVHg/JxdsBYdhheuIK0iylVg6CA4=; b=GUup8cTd6WHnZ+VIW3Tjn8SkECHLIQDFnmlc+WVXerBz8zC0GKZHfEmJIcDAQVpEtb Go8z+wcOvlz/01QIuh2ksW9t0gRYd2UEkyhqY6OQ0QlsYIaBq7K+1RWkOmRpCTfSdgWk GHE1P1LRSAnWutYHaru38B1gbEmPm5VUjojsiIgFBbu9Dux+vLkFeTIcGaqnflsHe55y hSjR5hBbiD6LlPq9ekJCp4Sq098KQeHRg8WUoys4u7hblM/zrRJ5h+u3q8LEH60Frjb2 O2XN1cUSvt+8f2HuD7pmLYyShecZJI3fl/Wj6F/kMCZ21vDAUT5OHjsyWW3kxTaNvSj4 1rjg== X-Forwarded-Encrypted: i=1; AJvYcCVIlf6+ByJZoRaw1GN0L0VwR9B0ohGORbx0su+6FuFo0+FRHJsDUW2tG0QNQK05dFp3sK0w+gECZrwNKyij@vger.kernel.org, AJvYcCXY8aFY/Y5ZTOWCjLI2WH165d3S/YzncuQUZw3m5Swpsz+F2rln6BzD/lE94XuUyLRTnNRuin8no/8n@vger.kernel.org, AJvYcCXcM6G2p8TQgEFFFvZCGwtj4055bq3L1rbdfDgToAMP1h5TnLVrUU5+XTxdwjF0AsdRpR/jw03SbpY/Uuyir04=@vger.kernel.org, AJvYcCXcfvoYciwbuzHs0iEjpP0SRLnDc17BFqE94K6tN1RDNJy8fs3/wmp9Oqwwk6p9BaefKLZQrJpdHqAZ@vger.kernel.org X-Gm-Message-State: AOJu0Yzt1fxjqDNED1XDFdnRyws9GAM/4sSGxmhSS0tjPw1fk2dDZzvP HzBaPv0l67ClnKWpq2YdPeF+JwUUCgGPoF1ZBEpoMY5+MRta2qn4 X-Gm-Gg: ASbGncsCGreml+fDw4zGpgR2UCFroDnTi+BGe9q4U44dU1baD4GEmCKWs4Wjb9vmhhr i3iAbl/9To6SstZZiD4nH8f9/3yyw6KYIPBR403tfUKRfwB+zR9qSk7iOKgFt8ig1mMkWXB4to8 2FG2EIsk0hXAv//dlkFSXl61v+VD2uBDs58la1iHFPDidApI9gC067sBbmF4kM9gA8Hfs8XazOV gUDYoYX7nEDdroTAPo6u0NGg+/+x4WhFBu43h8XixMnJXguBKQFzpgNVk1tupLnmCSYHDU53RbX olgKt+MfLA== X-Google-Smtp-Source: AGHT+IG/p+tvlmR5cXbuBHcC5EGtbbK+O2oiwoMoU+84PhuDVVzLOZJyBIL8AMNKJTaJVDz5Uae2kg== X-Received: by 2002:a05:6000:4021:b0:385:e1f5:476f with SMTP id ffacd0b85a97d-388e4d8ff3dmr603792f8f.39.1734482064257; Tue, 17 Dec 2024 16:34:24 -0800 (PST) Received: from prasmi.Home ([2a06:5906:61b:2d00:ca61:1d3a:8af0:1c5a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b287sm2365625e9.29.2024.12.17.16.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 16:34:23 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wim Van Sebroeck , Guenter Roeck , Magnus Damm , Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH 5/6] watchdog: rzv2h_wdt: Add support to retrieve the bootstatus information Date: Wed, 18 Dec 2024 00:34:13 +0000 Message-ID: <20241218003414.490498-6-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar On the RZ/V2H(P) SoC we can determine if the current boot is due to `Power-on-Reset` or due to the `Watchdog`. The information used to determine this is present on the CPG block. The CPG_ERROR_RSTm(m = 2 - 8) registers are set in response to an error interrupt causing an reset. CPG_ERROR_RST2[ERROR_RST0/1/2] is set if there was an underflow/overflow on WDT1 causing an error interrupt. To fetch this information from CPG block `syscon` is used and bootstatus field in the watchdog device is updated based on the CPG_ERROR_RST2[ERROR_RST0/1/2] bit. Upon consumig CPG_ERROR_RST2[ERROR_RST0/1/2] bit we clear it. Signed-off-by: Lad Prabhakar --- drivers/watchdog/rzv2h_wdt.c | 48 +++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/rzv2h_wdt.c b/drivers/watchdog/rzv2h_wdt.c index 8defd0241213..5ba5965ac170 100644 --- a/drivers/watchdog/rzv2h_wdt.c +++ b/drivers/watchdog/rzv2h_wdt.c @@ -4,14 +4,17 @@ * * Copyright (C) 2024 Renesas Electronics Corporation. */ +#include #include #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -40,6 +43,9 @@ #define WDT_DEFAULT_TIMEOUT 60U +#define CPG_ERROR_RST2(x) BIT(x) +#define CPG_ERROR_RST2_WEN(x) BIT((x) + 16) + static bool nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout, bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" @@ -139,6 +145,11 @@ static const struct watchdog_info rzv2h_wdt_ident = { .identity = "Renesas RZ/V2H WDT Watchdog", }; +static const struct watchdog_info rzv2h_wdt_ident_card_reset = { + .options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_CARDRESET, + .identity = "Renesas RZ/V2H WDT Watchdog", +}; + static int rzv2h_wdt_restart(struct watchdog_device *wdev, unsigned long action, void *data) { @@ -206,9 +217,40 @@ static const struct watchdog_ops rzv2h_wdt_ops = { static int rzv2h_wdt_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; struct rzv2h_wdt_priv *priv; + unsigned int bootstatus = 0; + bool cardreset = false; + struct regmap *syscon; int ret; + /* Do not error out to maintain old DT compatibility */ + syscon = syscon_regmap_lookup_by_phandle(np, "renesas,r9a09g057-syscon-wdt-errorrst"); + if (!IS_ERR(syscon)) { + struct of_phandle_args args; + u32 reg; + + ret = of_parse_phandle_with_fixed_args(np, "renesas,r9a09g057-syscon-wdt-errorrst", + 2, 0, &args); + if (ret) + return ret; + + ret = regmap_read(syscon, args.args[0], ®); + if (ret) + return -EINVAL; + + if (reg & CPG_ERROR_RST2(args.args[1])) { + ret = regmap_write(syscon, args.args[0], + CPG_ERROR_RST2(args.args[1]) | + CPG_ERROR_RST2_WEN(args.args[1])); + if (ret) + return -EINVAL; + } + cardreset = true; + bootstatus = reg & CPG_ERROR_RST2(args.args[1]) ? WDIOF_CARDRESET : 0; + regmap_read(syscon, args.args[0], ®); + } + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; @@ -240,9 +282,13 @@ static int rzv2h_wdt_probe(struct platform_device *pdev) priv->wdev.min_timeout = 1; priv->wdev.timeout = WDT_DEFAULT_TIMEOUT; - priv->wdev.info = &rzv2h_wdt_ident; + if (!cardreset) + priv->wdev.info = &rzv2h_wdt_ident; + else + priv->wdev.info = &rzv2h_wdt_ident_card_reset; priv->wdev.ops = &rzv2h_wdt_ops; priv->wdev.parent = dev; + priv->wdev.bootstatus = bootstatus; watchdog_set_drvdata(&priv->wdev, priv); watchdog_set_nowayout(&priv->wdev, nowayout); watchdog_stop_on_unregister(&priv->wdev); From patchwork Wed Dec 18 00:34:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 13912778 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 8A6951292CE; Wed, 18 Dec 2024 00:34:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482070; cv=none; b=pIi9iGx85Z5JbL/dRF7uyH9rhRnWbPhG5VdLjPBa6hyCu0fQ6HxiKFVG3fRKfdaauabPvhpLJMX2AwYPB/Kuw8go2YeN45tkJrbYhh8RtZe1+K6O7tgneo7nKHEDhaIMmDTdZ5PLUUXnUszNYaW8TF43LdxoCSqjH6ItSM6nxLs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734482070; c=relaxed/simple; bh=g7CBUVHObfczqvKej4PI7dHfDwEwYeD+gLMKxsADLeA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qxgRpxX5jXELrOalVCJ0OP+wW3WoCyD8qkXKqf9AHEl0fQA/FtWIxk2diXATH/p49hnMUvOPrJdnjSJv5BxkjQJbYjfvJ0LZHT9jqZK71ZvzPoW9bZO6vM9SPu9u6e+uwOxhXZkYfAklFZc726DTLY10t8ECauDAMLRnUQ6iMlI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=laqg6jCj; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="laqg6jCj" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-432d86a3085so39503475e9.2; Tue, 17 Dec 2024 16:34:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734482067; x=1735086867; 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=6iel7EZTyU471ieceLJn0FpRUk3Ypdff7DrLuP+ux0Y=; b=laqg6jCjsfBFahjn+jyK5JBtw2GMkF/nEXX3m/fdJZjlyYJoB9IQI3TWDR1G+fpJ1v 1MSEPVp8eAKHwf3GA+IvatXahO0fpnysLHt4KHvVoMandqjo6aNjIES4N7kztPzoaeW7 xDq9srM+0oTzKc2GULWdA6CxWWYw0vQ7D/PJE3lM5hDUFq5hsZ5mxlbOuyS1hpyiTpQz DRq4CzhJyUP48hlU55OI7cvmNG6QiXDoU9mWinCYdOf4+fauQdgs0VjE1RTLFf3DBqvI JjCGWg+52aaqScPCebOonMoRJrJQmVpEFK8I7IEkToGmWavy8bwzVh6VRcngvUxoHoAq tEwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734482067; x=1735086867; 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=6iel7EZTyU471ieceLJn0FpRUk3Ypdff7DrLuP+ux0Y=; b=W1psRU8HxVbapdI0AmMDwIG8cqEw1FRBhiYoJJjKoju+K7OsKybUR+TfztV83jRQtc XtN2NznV8OqvNDpLAfmeUAjMMlinlf1Nolp4GdlfB2WkhzWxoqCmx0cumEAWHoVX+0iS mynyV0AozT4x0N66EdlliWwvlqruRRFnR4vVHgretC19bnEgtNxO2WLySYV1S8lUV3cx l0Y9Njv6wcqBntRs0wWotupvvhS3twTHGIOrFYZI26/9QDN4BaNDgTKLNjiKbk9lQM6b FgPhek0r/F7rB3yReCRBric5N/GG9jUCbZFtbiFfJoPaVByfpF2zsF75y71WNpTxYim2 /bYA== X-Forwarded-Encrypted: i=1; AJvYcCW7AGGguGgT9oBRYOEe/zGP0XbR6O0AcDQFk9ytpMiAVd8GxBMn/Fx5PiXinyszq/1d66c0a3jmUUvDijh3Ifc=@vger.kernel.org, AJvYcCWYRw595xDuQOdfNiulhogdR8cg0hUEmH3vYyVmh4qOo5xId12Mml0jUirog9SQkbDw6EuS1wERLMvqz+T4@vger.kernel.org, AJvYcCXVWXJwCiyhLlPho86CIp+kRXJYAqxBbQLAnSAqldAIwJawd+s+OuvpkngEhSjHMdgYUXVeanEevjE3@vger.kernel.org, AJvYcCXx7OKOZmngjY6hsrtShgNmGSfKt1rEwJVE0VYqbw9l6P4vAMYsen7LlhK67+/ws3ChY24dpcSKTLVu@vger.kernel.org X-Gm-Message-State: AOJu0Yz0vfQw+akuiRkSZd+5jSvLaA3A3KRaSTiH336RQsXiixWPLxFI SmnnnK7X4G9AEJbBLK6qdLUN7Gsj8lHtUTi3AlcBJtrsA0xqlbhR X-Gm-Gg: ASbGncsPwn/9Gtdu01fzMBA5BvDkzmE+DPIIrd/8rGFQrByILayLJQ0No5E+rABQx11 JAdHQe16H3g5tG8ul+zA+ZneTqI0pR01pjcbtorG48HqTTN32/6igQFlVwccoTZXlQPz+jQSPUq a3ozJFRuTmE76ae1c+2nEdjvAZ32oJWtxv6RH+DCYq/EJSOCQ5tUb86i3MIV5mYwDEYvzgF1s0O Fib1VUsWxT2EwUbIa5Xq0G+PeQYJN4PTNeSyKtUmT1NQVoihb0f8USkjBp8AE+6YjVEz/u2lqIS f4dXjPG9CQ== X-Google-Smtp-Source: AGHT+IFFpsSC1T1fRG2/2x5iygn+Q/HqLAamb/rsk+LcO1z3tSDGdZKezgL8Id5Hf7+S4CalQZtyPA== X-Received: by 2002:a05:600c:4fd3:b0:434:fddf:5c13 with SMTP id 5b1f17b1804b1-4365536faa3mr5010715e9.14.1734482066694; Tue, 17 Dec 2024 16:34:26 -0800 (PST) Received: from prasmi.Home ([2a06:5906:61b:2d00:ca61:1d3a:8af0:1c5a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b287sm2365625e9.29.2024.12.17.16.34.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 16:34:25 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wim Van Sebroeck , Guenter Roeck , Magnus Damm , Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH 6/6] arm64: dts: renesas: r9a09g057: Add `renesas,r9a09g057-syscon-wdt-errorrst` property to WDT node Date: Wed, 18 Dec 2024 00:34:14 +0000 Message-ID: <20241218003414.490498-7-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20241218003414.490498-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar Add `renesas,r9a09g057-syscon-wdt-errorrst` property to WDT node, to determine whether the current boot resulted from a `Power-on Reset` or a `Watchdog Reset`. Signed-off-by: Lad Prabhakar --- arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a09g057.dtsi b/arch/arm64/boot/dts/renesas/r9a09g057.dtsi index 69de6c302b17..44ec54569ce1 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g057.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a09g057.dtsi @@ -445,6 +445,7 @@ wdt0: watchdog@11c00400 { clock-names = "pclk", "oscclk"; resets = <&cpg 0x75>; power-domains = <&cpg>; + renesas,r9a09g057-syscon-wdt-errorrst = <&cpg 0xb40 0>; status = "disabled"; }; @@ -455,6 +456,7 @@ wdt1: watchdog@14400000 { clock-names = "pclk", "oscclk"; resets = <&cpg 0x76>; power-domains = <&cpg>; + renesas,r9a09g057-syscon-wdt-errorrst = <&cpg 0xb40 1>; status = "disabled"; }; @@ -465,6 +467,7 @@ wdt2: watchdog@13000000 { clock-names = "pclk", "oscclk"; resets = <&cpg 0x77>; power-domains = <&cpg>; + renesas,r9a09g057-syscon-wdt-errorrst = <&cpg 0xb40 2>; status = "disabled"; }; @@ -475,6 +478,7 @@ wdt3: watchdog@13000400 { clock-names = "pclk", "oscclk"; resets = <&cpg 0x78>; power-domains = <&cpg>; + renesas,r9a09g057-syscon-wdt-errorrst = <&cpg 0xb40 3>; status = "disabled"; };