From patchwork Wed Mar 20 02:05:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 13597203 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 8EB6CCD11BF for ; Wed, 20 Mar 2024 02:06:15 +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=xV4zPb5WOi6/OGKPAAF3Q9/tx7XUV3/I9Lr7IgA0RbY=; b=yq1V/OPZwyF/H/ sc9o7FTPakHuobQigSUQTP4IMZz68zDLJ7VcKDzFGr4cAeHimWwKkaDfFSZjoOAwNOUleHi6sWvgf m0XgY+VRwpqk0XN+KfR6/jGH50rUQGDEH0hqHkIYQZOMGsXIwyPzwhN3CiHmZNXNJZp1xgDSLoai9 o7RvWPwxRnBrmK+HwM1perpK8gmqaXJX8Yqk8Ocfb8ZMUQ4+TVJT19Bn8JtsWMAYjgPX4Mbn2iehB P+gWbAScEfr1GowrDTcK+YYUo03NPrJDNEC4VlFhVLU7GJvPa/rLwXMRuC3zUlQuHRsu15Dv5KKO6 9HWoRsN7NuiXQ+tGWNKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmlL5-0000000EzsD-1HTx; Wed, 20 Mar 2024 02:05:59 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmlL1-0000000Ezq3-0lVN for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2024 02:05:57 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-33e162b1b71so5318342f8f.1 for ; Tue, 19 Mar 2024 19:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710900351; x=1711505151; 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=MJbSfYpc/jJCFvciL1kM3GDBs5qlmkaejLmxGj8x3co=; b=GEW7hFEht8+sQ62U1SgdfpyzfVZWf8y4klSqAnCAQL2OJSBMmVptA6TOCNToyY7uua /B8vtriIYrEOdknrs8OgoEC/+HLl5Z/DOiMpwaRZRwwPtpQpAEpGoaHm1ElUsPfWTxI4 7RK74Ofq5AxBmGrCFP7isWm2gj6RQvtOyHCPxGTZJ2ZRfv64vIbM99exdZhvoVMYUYZb 6bDbUx2lX83ZEaa0400qp7hEIAgQIKrrfZKABq4s9Wlvronh5Z3d2A3OwVgQAIwCK2Tn /o4dlpZxs3xKzVITKhQgsxiFAIMTzk5Fzm9AU47WE0v0jMKLnRw9uSLkbMBrTaNwqn5h a2/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710900351; x=1711505151; 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=MJbSfYpc/jJCFvciL1kM3GDBs5qlmkaejLmxGj8x3co=; b=oxuZfe+V0SQeMHPvE7KofmvVTSGVvpVz0Ev9kAovbmeVug7vO49AW/WgG8tFHCA+56 YOjw/7rpARKAdWNj61HAibyWmSTrO5xCHOkdfxC1q/k0D53XXyOp0ZQlODyiZ84ulaRK hXON4lKt1tU+oDgpMxugL3l7DFQ7JoOKUmL04NdM/+HRLSXbk5MlzTw/Nz3K9LVwpMPH 6KvSxWXRvzvzEFwvUj83LvlARDnqIKMpymCYG6gsQaW+y+4EzQyvAVBEy08xsDtmxEKR ZHAn67WVM2EXAVkXTuJTy07lGu9dDvx90gObYTTbkbOUdq8e3EPj6JVOi7YO2JC6bEAW iO/g== X-Forwarded-Encrypted: i=1; AJvYcCXjB5Yt4WApWa5zn0wAaY+HvqnEfNFuNak24LqMgLQdxc+PgovNSH1vfkzk/1atAyU5nmoM6Bs7awnKWT1kdPaHjpym9o9ryLagh4juyZdBAhnFMwg= X-Gm-Message-State: AOJu0YycowGsLtDXA8Aovo0XJ3yfH5Hvdwiu6eWS6CVi7/mjNmXeV2dv 4goNITxhvUAq05h4w9w0dE7bsUHDXjEcQg03kvz1vqCeKIlCEtHlkSxYUh1TJ50= X-Google-Smtp-Source: AGHT+IH/ytnOuoK/tbCb+jKMCYsJebzK8CKTqro9S3Oi5Rnu/OymshQKURc3tWsZeCaJ5TZYMJuCGQ== X-Received: by 2002:a5d:5102:0:b0:341:938a:cd95 with SMTP id s2-20020a5d5102000000b00341938acd95mr590725wrt.0.1710900351339; Tue, 19 Mar 2024 19:05:51 -0700 (PDT) Received: from localhost.localdomain ([2a02:c7c:7213:c700:e992:6869:474c:a63f]) by smtp.gmail.com with ESMTPSA id u14-20020a056000038e00b0033e34c53354sm9209295wrf.56.2024.03.19.19.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 19:05:50 -0700 (PDT) From: Alexey Klimov To: sre@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, peter.griffin@linaro.org, robh+dt@kernel.org Cc: conor+dt@kernel.org, linux-samsung-soc@vger.kernel.org, semen.protsenko@linaro.org, linux-kernel@vger.kernel.org, klimov.linux@gmail.com, kernel-team@android.com, tudor.ambarus@linaro.org, andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, alexey.klimov@linaro.org, alim.akhtar@samsung.com, linux-arm-kernel@lists.infradead.org, elder@linaro.org Subject: [PATCH 1/3] dt-bindings: power: reset: add gs101 poweroff bindings Date: Wed, 20 Mar 2024 02:05:47 +0000 Message-ID: <20240320020549.71810-1-alexey.klimov@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240319_190555_472854_088B570E X-CRM114-Status: GOOD ( 14.11 ) 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 Signed-off-by: Alexey Klimov --- .../power/reset/google,gs101-poweroff.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/google,gs101-poweroff.yaml diff --git a/Documentation/devicetree/bindings/power/reset/google,gs101-poweroff.yaml b/Documentation/devicetree/bindings/power/reset/google,gs101-poweroff.yaml new file mode 100644 index 000000000000..d704bf28294a --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/google,gs101-poweroff.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/google,gs101-poweroff.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Google GS101 poweroff driver + +maintainers: + - Alexey Klimov + +description: |+ + This is a Google Tensor gs101 poweroff driver using custom regmap + to map the poweroff register. The poweroff itself is performed with + a write to the poweroff register from a privileged mode. Since generic + syscon does not support this, the specific one is required. + The write to the poweroff register is defined by the register map pointed + by syscon reference plus the offset with the value and mask defined + in the poweroff node. + Default will be little endian mode, 32 bit access only. + +properties: + compatible: + const: google,gs101-poweroff + + mask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Update only the register bits defined by the mask (32 bit). + + offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Offset in the register map for the poweroff register (in bytes). + + samsung,syscon-phandle: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the PMU system controller node. + +required: + - compatible + - offset + - mask + - samsung,syscon-phandle + +additionalProperties: false + +examples: + - | + poweroff { + compatible = "google,gs101-poweroff"; + samsung,syscon-phandle = <&pmu_syscon>; + offset = <0x10>; + mask = <0x42>; + };