From patchwork Fri Jan 19 13:25:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 189555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1003862dyb; Fri, 19 Jan 2024 05:26:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9hMJaz4q1uw7sKNAFfgDV9714JHaFFViapek0s0i5J5kTj/3hiXAzFx9Rjr0roDQ1sOiQ X-Received: by 2002:aa7:c60e:0:b0:559:f6dd:e8fb with SMTP id h14-20020aa7c60e000000b00559f6dde8fbmr1632252edq.55.1705670779818; Fri, 19 Jan 2024 05:26:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705670779; cv=pass; d=google.com; s=arc-20160816; b=gia4gnb5iAZJ2mN+uzgABelNO/vp15J9D1foigU3jvTk/rBwXmxxA4+cJyoh3R3qtF F73gwRmT0eLT1HA3hW3Jkbok+xmAuIKJXvXZGB6ELAAKQvvjPPkdws6CwRCqi9Oiqtw6 bFAAUU8aWZvawlJeZR7VEVVrwQUwg9p2xPq6r54qaevTnIchYYuPGZdDa+OVlN8G4G0w irHmplUCCk2h+FpvLuh5PcLqhOJVr39YjL7lU4BFlBtpnICoBt5pRjNYkqx7a4pJp/NX CsNfdSneIDw7AU73WMDZDfFr3bDuWtP4jdpBkWWPnPGEayKAhh4QtortxdyVB22l1psE mBpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=fa8Ju0cruJtuCRFPpgMudoZS3lHBZqx75cTGVYEJ/hs=; fh=cTOyeHIiotxFveWD397Up69SLR8Dqpy9YboYIfW0A00=; b=sEXFrHDVZza3CErTL7XbGXoxESY7T9UcgxprUlPhWJAFzcmTjKxHBsxbueF4pJbpRS 4KiOCGEQp3XqOgXOYILeRpbeJqMraVGqKdlKt/oNQMDl3s7m+cejnhLiDBkqIltQCfBX +eFKKgvksILx3FTdv9T66DcfkaqoQJd4luthHvloEMNiwLjZ5MHEtCDrieGVztduqXpN 417GxHb7f+abcqxxC0HIHSsASjGBPIogw7hA0uLkUnsQmTpQ+AtklH21TL2tVM27t6tP LqSC75/PlcEegh+Mv5Sc768swiu2TKNAgETy5JIvlEwsyC0Hhy7wrU0YairiOHNRXsw3 yzkw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-31191-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31191-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c33-20020a509fa4000000b0055a6bd4b97fsi359030edf.418.2024.01.19.05.26.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 05:26:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31191-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-31191-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31191-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1843F1F23F13 for ; Fri, 19 Jan 2024 13:26:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E01B5381A; Fri, 19 Jan 2024 13:25:41 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90760524A8 for ; Fri, 19 Jan 2024 13:25:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705670739; cv=none; b=DThGHMWFi9SWB59cdbaVgrjGtgHC9cLm5lAjgz1mttTa22kSpI5JsES/UHj27qMpKsUFK3gp5NTC5E2OAFtEZMKDUTD1eZFvAn3H9gzACHo7co7TAyunnggKMgm8gjKsL4pK24hNG1SJSWizqxa0QqcfrXnxXFIrw+h5hhCdoDU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705670739; c=relaxed/simple; bh=y/hGCVajOvX8o6Efi9UdqxsGrdX7qFeQ/WFMS56UPW4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aKSlxai51oZojz9oewuurJd4iMd1NXMdS5lAwpfzEc82LHoFKI06L1UfYztl0MrLONluEicQruiUcxZDKWV446L1fHEdjMhMDKK/GJfvHNt2Y6/dFgq3h1/BTfzl+etSDT7bROTbtvBN3QDIpEnG8PLlkRuF1BfHHfPh62596Mk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rQos7-00074H-C1; Fri, 19 Jan 2024 14:25:23 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rQos6-000viI-6t; Fri, 19 Jan 2024 14:25:22 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rQos6-00F981-0Q; Fri, 19 Jan 2024 14:25:22 +0100 From: Oleksij Rempel To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Srinivas Kandagatla Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, Liam Girdwood , Mark Brown , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?S=C3=B8ren_Andersen?= Subject: [RFC PATCH v1 3/7] dt-bindings: power: reset: add bindings for NVMEM hardware storing PSCR Data Date: Fri, 19 Jan 2024 14:25:17 +0100 Message-Id: <20240119132521.3609945-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240119132521.3609945-1-o.rempel@pengutronix.de> References: <20240119132521.3609945-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788525443421774265 X-GMAIL-MSGID: 1788525443421774265 Add device tree bindings that describe hardware implementations of Non-Volatile Memory (NVMEM) used for storing Power State Change Reasons (PSCR). Signed-off-by: Oleksij Rempel --- .../bindings/power/reset/pscr-nvmem.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/pscr-nvmem.yaml diff --git a/Documentation/devicetree/bindings/power/reset/pscr-nvmem.yaml b/Documentation/devicetree/bindings/power/reset/pscr-nvmem.yaml new file mode 100644 index 000000000000..0642b470af41 --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/pscr-nvmem.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/state-change/pscr-nvmem.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic NVMEM Power State Change Reason storage + +maintainers: + - Oleksij Rempel + +description: This binding describes the Non-Volatile Memory (NVMEM) hardware + that stores Power State Change Reasons (PSCR). + +allOf: + - $ref: pse-controller.yaml# + +properties: + compatible: + const: pscr-nvmem + + nvmem-cells: + description: | + A phandle pointing to the nvmem-cells node where the power state change + reasons are stored. + maxItems: 1 + + nvmem-cell-names: + items: + - const: pscr + + pscr-unknown: + pscr-under-voltage: + pscr-over-current: + pscr-over-temperature: + +required: + - compatible + - nvmem-cells + - nvmem-cell-names + +additionalProperties: false + +examples: + - | + power-state-change-reason { + compatible = "pscr-nvmem"; + nvmem-cells = <&pscr_cell>; + nvmem-cell-names = "pscr"; + pscr-unknown = <1>; + pscr-under-voltage = <2>; + pscr-over-temperature = <3>; + }; +...