From nobody Mon Feb 9 01:34:16 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 B9B7A1F03ED for ; Fri, 13 Dec 2024 16:45:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734108322; cv=none; b=evx4vGtTXDtbvH2pD+didjNf8GXcc2tIB87WUmFMgvoN9GRRoUHTG6i4J84+KF2TsTIGRDm+7dzBYd1MmInR32pRBxu4F9OkJOPsptCGDKg+AKnTmtgpPFBP+aaMEn/KpKji/6aTFxDAy3qIDMj1b31BCTFYOwVALy0gAMHMiM4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734108322; c=relaxed/simple; bh=o8gcbchdk+NEFXIHiXqU7JXHFaPHjD7Nwegm7SL02NE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oozsoyodrQnQR++6Fe5SKhJxGfNT8JosmAGMP+Ew4MKpUMTWh45cE5rzmwZdcj+cA9IpNJNTp2VBMonKR5DUHJTs3B4ydW58TiBBDwCb9dPFoV2dPSDA3OD01JN5JArYk4KBkdq0bHJhrjIge8PvmSsn8CLtptcA7iOP/iszzM0= 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=HDBkvfta; arc=none smtp.client-ip=209.85.128.43 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="HDBkvfta" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4361f65ca01so18787165e9.1 for ; Fri, 13 Dec 2024 08:45:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734108318; x=1734713118; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZiXtRse753j+DxWe1l5vCc1FuT3NFlbx5vgI3bsEGjg=; b=HDBkvftawV7r1++1inBkHQngNmw096FrIg/n6J8ozpriBmghxSFmUp0N0/ZmBh54R3 9A8eaBoi5NVZvlhN2patBM/+8+GLhVwrtJvED8FPbYSsNSNqlaW76JeHj+hkR8ejSwqQ w/NBRhzzA4GVhZxWaB72GtNsAsQyNeZLf+INpmiRLDNrdtDm5BbG7DODK2iSXcmySBDW yCnbiUmONTjSsymPz7pQCPXLtJXpy0ziCVVNe4tsyqragtKrTR2vlDZe1ADR82fgZenD p8UH9/9dg0F0Gs8OQ9EMMwcf75+KzfcTI1t7d/tRaFZmxPl3cWksc15hUPcVTtFitN+w eoIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734108318; x=1734713118; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZiXtRse753j+DxWe1l5vCc1FuT3NFlbx5vgI3bsEGjg=; b=q5jma9ztb7wi9caWS/HbPnJNAQgliWgUJHFKwuEbL9InMqtvJoiePEc3gx6QNX0hCM 0DhZbR83GCAJd26jpGHHxKaAzxWaymX7BjmN0iSxfl4k2uczhOONKCA+12/tDK9UOzbk w2cq2v3KQCEOh0CFqIXxabF/t0xRg+GiK4p6On82pBAOsTaLpXOB+tQ+cp6lueJKDmxy CpgT4HDQuHkkO44kcU/DxRpjC06CSL85BZDt3t55K80EwuL3zDMGcHJz3OwrVRUlrHfW iqZ/OBEcjqYelKk3gb4S7QWLMO21cjI06pptXzfrMKWSWV7/oOuoCsDxzwffg3DDHXet WBFw== X-Forwarded-Encrypted: i=1; AJvYcCX+B4gSjNVVv8JsexI+8YdToOBhBsioIUyCEH5jXjbLgeHEu7izGV7lRHZ4exnR+lAX4EJQ8YxFMHH0VyU=@vger.kernel.org X-Gm-Message-State: AOJu0YzHJP8KMI61prNApY2XEBKM7AHhfPfVahrd2AOEq3DD5AtQDmn+ xo9v3hpRBjFhWSNZCmQ8UWung/3e1K3ff69hHCRY/0nX4M71/zTS88EVUwYoIXY= X-Gm-Gg: ASbGncsRR31laSMdBpdtom5sPKawnNFznTh9hfkFzLin7t5FpfSvKnFFMugXf6ePy6M sfZYZz8aL8MXxnROJyF3u7sy1hoPE9BcO6fEYViJtlj/YZxw3fu0X1h1zMbvXpKohGGcDHHyhtZ FwTS1c3bgc4L8utKRtEbRHXmrtdkjaEbVybgwgPeABPw+P07QPf1TUyhO+HwDY0jWA1ucupjqc4 Z2DkzXOShKodS7JncNBjnu8eiLhHisYc72OTaUNkNyWCsFCPLPagb5zdDd27FiyrP8m7Et69pnQ tJHt8EwtVw== X-Google-Smtp-Source: AGHT+IETyJSvR8KA8pphR1pBfr5KTpzF4NmNkeh7zYSJzCimMSajiU46jqPt2jw1d/p/w6ZGTou/bw== X-Received: by 2002:a05:600c:1d86:b0:435:330d:de86 with SMTP id 5b1f17b1804b1-4362a98a563mr32579905e9.0.1734108317815; Fri, 13 Dec 2024 08:45:17 -0800 (PST) Received: from gpeter-l.roam.corp.google.com ([145.224.66.83]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43625550523sm53900665e9.7.2024.12.13.08.45.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 08:45:17 -0800 (PST) From: Peter Griffin Date: Fri, 13 Dec 2024 16:44:38 +0000 Subject: [PATCH 1/4] dt-bindings: soc: samsung: exynos-pmu: gs101: add pmu-intr-gen reg region Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-1-c72978f63713@linaro.org> References: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-0-c72978f63713@linaro.org> In-Reply-To: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-0-c72978f63713@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , Krzysztof Kozlowski , Lee Jones Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, willmcvicker@google.com, kernel-team@android.com, Peter Griffin X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1571; i=peter.griffin@linaro.org; h=from:subject:message-id; bh=o8gcbchdk+NEFXIHiXqU7JXHFaPHjD7Nwegm7SL02NE=; b=owEBbQKS/ZANAwAKAc7ouNYCNHK6AcsmYgBnXGSZluJfObTMSPxr05UelRIQWthOmoBtn2uyW PFgIFrAApqJAjMEAAEKAB0WIQQO/I5vVXh1DVa1SfzO6LjWAjRyugUCZ1xkmQAKCRDO6LjWAjRy una2D/9ZUhnENnkW7zC4mxp8Vfkdy2PN4PE1leFf6JLDKZSIi/C5o5bed2t5p3af9nupwWd2zbX peM58sEtA9ZUAqP/1YmiJadFo6sfuhtOypo2wYYzUjE8HGMfxKIuTg5nyd9D18H+K0e/NOmC7z3 4gXcz52PlvDSsyAzxNtNdLgWLxSYiRRz9bltIjIePks1DMvTs96xR90k60cSLQWMRZxWxiczhFz pau6fIRsTGS+6c7e96EyW5mzt3F9+HP0s5jGpGt8HvnfuAmVgNaWSS7sXM5pRGxl92yL4dJK3VN NFnDPSGlozXblKBJVE6TxYlVUFoZnuOvMSEmL+k8up/Q+cE6JFHEwGlYoWghHLT0FNNEgT0SQzo u7j2psGxS3tUrrReg16UlSZNmSwWUgeeGjjvEZetP1bYE4cAGyC9ahPfnDJy83i90fYQ4kpE0F5 g3xcS+JgbFWGZSKW7YfoTfztDRs4V43smbO+NsuqMX2p1JuENDC8J4vnZBuk2aKGcdLR66tjqJE vNrzh2qAynTwCuDTYpR0ilARhUboWOrzH/QFABBXe/EAsLHSWFEX04W9sj7OU9n1clJJhjo2AN0 R1m5zqd47YsjZziMZYDcdvozt7t0nEMDeuUTUuLU91/3XAaZzVXhx3yCv1JuWwfrH/jVy7D9zZk f8dW7IgVRHpeT4Q== X-Developer-Key: i=peter.griffin@linaro.org; a=openpgp; fpr=0EFC8E6F5578750D56B549FCCEE8B8D6023472BA gs101 also requires access to the pmu interrupt generation register region. Update the exynos-pmu bindings documentation to reflect this. Signed-off-by: Peter Griffin --- .../bindings/soc/samsung/exynos-pmu.yaml | 29 ++++++++++++++++++= +++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml = b/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml index 6cdfe7e059a3..5ac4864e4cde 100644 --- a/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml +++ b/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml @@ -73,7 +73,11 @@ properties: - const: syscon =20 reg: - maxItems: 1 + minItems: 1 + maxItems: 2 + + reg-names: + maxItems: 2 =20 '#clock-cells': const: 1 @@ -186,6 +190,29 @@ allOf: properties: dp-phy: false =20 + - if: + properties: + compatible: + contains: + enum: + - google,gs101-pmu + then: + properties: + reg: + items: + - description: PMU register region + - description: PMU Interrupt Generation register region + reg-names: + items: + - const: pmu + - const: pmu-intr-gen + else: + properties: + reg: + maxItems: 1 + reg-name: + maxItems: 1 + examples: - | #include --=20 2.47.1.613.gc27f4b7a9f-goog From nobody Mon Feb 9 01:34:16 2026 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 AC7191F12E6 for ; Fri, 13 Dec 2024 16:45:21 +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=1734108323; cv=none; b=EKgt2W+5o47v9lTAiovbjEm8kXxtKW3RjOf1OvrSmXLRgj7VPZL9ZlcyT72EZjima8ppZ5l3Qi2O6Os3Zkmw8ArFZfxzl4zgOZoRRA/hlWXjIY9HWgq/LSOjhhaMnZDO88FjNHNA7Ld3aN1KUyasvjcZEk7Ovc4GC+Ok6MbCoRo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734108323; c=relaxed/simple; bh=aKfOXqQGDukFzONr0CiKY/knEiGL73lWVm8HRLM5iLs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WC1mLSVj0nhaA+tOP2UvVedsck/dp+J2R3mGQYNHcNRL5W5Vv69WHgC0JF6hJ7+5vhWeg7lIpXm/wTw6Ym5QHlAyPdaM40SqyseTzkdCzQtpKD2+W1Cl1d630UpFwaZiWZH1lW2HdgTYGVjsGeHoeFEKL20QcY9Nn0d0Vs5CFEs= 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=dK/lmBeW; 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="dK/lmBeW" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4361815b96cso13411035e9.1 for ; Fri, 13 Dec 2024 08:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734108320; x=1734713120; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=rjlzbWl9chiW3b1bcyAnwj9F/eAWfXtVDjTLB3PlhTI=; b=dK/lmBeWYzVB96j68wSXz7NTHH8yN2Q3C8satwswpIYXVj24cbbebbdloRYaqdO4bI 5idimxWX0oksvOOZpV5fuq4H+KWvBlmFb7otXz7JgIhOozRN5vx2alaNjq0u7EDQ7ZAL brCKbRjHlMZElh6rqDqLK//2XE9aDRNW8CkANVLLzgg/DaHa4btvJyabTM8KsFvL+aGG SEhOToSWOjEXuxdgl7T+KOlDdnRtd5PyqbtRnjbS5T3Y4ZqYbuFl/N/Id6ElZNjPtJR6 xqBpOzqudXK+HjMNlPmA1j9urZ4Pjxsy5pJA4Tw14/1LtcE9eU00litMdacrc720WQCn sHew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734108320; x=1734713120; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rjlzbWl9chiW3b1bcyAnwj9F/eAWfXtVDjTLB3PlhTI=; b=bE9glmhp1mjbzr/LFFRYWQy/AZtrlUApIGShpe/SqIRVO00/K8A6+xVjQVX4g0cqdW hU70nBKxb6TicER9opW0BiFVX1QOkhdUDPpbC1XoqUsO528oM/IQTQiSecrzqR6iR0hr gkqjwmf5kjxQcDarBzGzxVl6km2n8XlvUgOD5M2juH4H+kKp17/Nwc6SDgX9CheaT66W ytRjlyummMea6ODa13ywCNrLwbeB3UCExkkZdJx1mEZlBrinPZyUctZMxR23FGpns9B1 GdNuA1fbhW1RkYeQ6gC4DbfGse6P2arB9OH1IWGS0whDWwYDBcxHl9vT0PFYVGP7F01n zt+g== X-Forwarded-Encrypted: i=1; AJvYcCWbYt7+vSgatmSrf8fnARacI+sHWw83TnvzxZmleUVOxmTqev00afNJ4KRiQHYUNYLnX6W4plYZsxWResk=@vger.kernel.org X-Gm-Message-State: AOJu0YxnQm10CUBXXnZr2wf7ZRdBdwWV3ZIFIGdMczfs9EF1sdOG42ll r0Onb4fbYqevSmSyWLHolvi7DKK42qIzSJTobmp18npfu6/icKPvA9YftYCyoQE= X-Gm-Gg: ASbGncs7qeyvD4aKZV37Hs4UcxChEipyMPqkja2CqnsegAHE3lkojvxHH1QFoaO1yjs nN/Hir7qhuq75u7wH0oyW1MRCK++P7db7YdWm8QtodKilORc396s/pu6mONGpoerC+rx/eLVd2Q UyrJUhEb0Dny7jaVLfV5Vp1PJ0ILvDqyOgbbzfsxYtQcbpNCxZydqzgF4z2dypXIzeCSokgUFBp R0jknQfTT4GfW/7kpmvnjjsPtW5uU+PjA5ExlcuOK4+3o/wBbrF4zWWWy0HDrHKp2plNqikPH9I r+BxyTAqIg== X-Google-Smtp-Source: AGHT+IGEMv1e/DIXO21O5MsRQ5xu7AvkX9VSUgw7Z5GjjX9HSgSRS8PPK1Q/zoWIWgCKahnDrQunCQ== X-Received: by 2002:a05:600c:510c:b0:436:1c04:aa8e with SMTP id 5b1f17b1804b1-4362aa3e398mr33232645e9.16.1734108319836; Fri, 13 Dec 2024 08:45:19 -0800 (PST) Received: from gpeter-l.roam.corp.google.com ([145.224.66.83]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43625550523sm53900665e9.7.2024.12.13.08.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 08:45:18 -0800 (PST) From: Peter Griffin Date: Fri, 13 Dec 2024 16:44:39 +0000 Subject: [PATCH 2/4] dt-bindings: mfd: syscon: allow two reg regions for gs101-pmu Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-2-c72978f63713@linaro.org> References: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-0-c72978f63713@linaro.org> In-Reply-To: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-0-c72978f63713@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , Krzysztof Kozlowski , Lee Jones Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, willmcvicker@google.com, kernel-team@android.com, Peter Griffin X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1498; i=peter.griffin@linaro.org; h=from:subject:message-id; bh=aKfOXqQGDukFzONr0CiKY/knEiGL73lWVm8HRLM5iLs=; b=owEBbQKS/ZANAwAKAc7ouNYCNHK6AcsmYgBnXGSa4bgZiEwGnt8X8V7Vmo0R6b2jQKykl5ebV 3aqYK3KqAyJAjMEAAEKAB0WIQQO/I5vVXh1DVa1SfzO6LjWAjRyugUCZ1xkmgAKCRDO6LjWAjRy utM+D/9Lk7ruFKfWr5gVg4qeHtniwokKKn/WAgFmW2kqL04Q3frRnu3hIB8xkoQ7CTPjR7CizPf 6UPCsN88uZ1a7nBp93Gs1M3goA2x963JhBm+AEQs+zh1Y16BBMWQIwdfExz6Nc7o5fe+igiYYu1 LtrTWgFHIlOPvlCEN0MtjZn6RWT7aMfU88pln7puSgEe+CrY+eIiL/tCKRmsee5oLjFM5tvNWoE 5a+tCA7o4zU3t93z95vwF/DJOucolzwDyeabj/6uMXvakh/umqYYsCIHgkHCStcPGXiW02IwmSn v8y5eLd099K8jyA2GQzmXNQQPNFXtXz4oVmo5bWAsWTh9qSeO0qbwPEeUJ+D0X1kzXx4c2OiF+v irhcrq+TtLF67/20GIpZlhrZKv0vs02CqH1VjdspQtJFKApzxMzs3x8kcoSAZFgtvp6bTCFNywk a+fyOEzNidOvBSAc3IGCLlJWD2pkD7XUc9i6Fy9K1wFpuGwIBsweqrejFIf/arD6z/sGKleAxfx laB+rnMD391eqZJGamVXGNA485w01JVITKcfxQMYWN/sABgS4bCxw8CUvSJtD+8mrjnuJKXfYHC oDxsOUbrO7nM3BCrS0ao6/NjDiB4yMcAjY4Kt+iB4vcJsP+IDzJh82FOP3GwxBaj8nhM4//Q2+9 BjKjkQz0D3wdIvg== X-Developer-Key: i=peter.griffin@linaro.org; a=openpgp; fpr=0EFC8E6F5578750D56B549FCCEE8B8D6023472BA To avoid dtschema warnings allow google,gs101-pmu to have two reg regions. Signed-off-by: Peter Griffin --- I don't really like this patch, but also didn't want to submit the series with a dtschema warning ;-) Possibly a better solution is when Robs patch `mfd: syscon: Allow syscon nodes without a "syscon" compatible` [1] gets updated with a v2, we could remove syscon compatible from gs101.dtsi (an ABI issue). If I understood his patch correctly, it would mean this yaml update would then no longer be required. Let me know your thoughts [1] https://lore.kernel.org/lkml/20241211-syscon-fixes-v1-0-b5ac8c219e96@ke= rnel.org/T/#m5ad1ed5c69f693d2a5cc54342a87fbdf3df756d2 --- Documentation/devicetree/bindings/mfd/syscon-common.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/syscon-common.yaml b/Doc= umentation/devicetree/bindings/mfd/syscon-common.yaml index 451cbad467a3..9cd9739d5e97 100644 --- a/Documentation/devicetree/bindings/mfd/syscon-common.yaml +++ b/Documentation/devicetree/bindings/mfd/syscon-common.yaml @@ -59,6 +59,16 @@ allOf: compatible: minItems: 3 maxItems: 5 + - if: + properties: + compatible: + contains: + const: + - google,gs101-pmu + then: + properties: + reg: + maxItems: 2 =20 additionalProperties: true =20 --=20 2.47.1.613.gc27f4b7a9f-goog From nobody Mon Feb 9 01:34:16 2026 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 C61F41F12F7 for ; Fri, 13 Dec 2024 16:45:22 +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=1734108324; cv=none; b=ipzTrM4ptbKQVGe00Zjm9+6Dfj+I+KgslWLo56gajUPdB9+PL+Sgx3QSAPBBpDPZp8Juu5p+ZnLkp7GcZyzM5kTuhvnbUaq9RYwTl9ElfumGmpomAYPZSmhJ9wjYchESzyqiMYR3lNvRXJY3sHYq+AuFGl3B4ntTrBNUL2i2COs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734108324; c=relaxed/simple; bh=uO4wHh5R6umt3vpek5lvClXZRvrRF8v6hmmxWJa+U7s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DkZRdwDXyqiq9xitoTgg1HA3u/MxZGnI3QhSuqk1edTBZRRB7i9hPvGiaNevF+7iwnV/SCHRfNFPt6hhnF6Ky7yhHJG4qw9ST3AxIzDqfhf/x4tZQ6R2Xb1I216xmuzqtw6wVGUv7mFupMw9jzssdCrNOQtgfacbPl8p7v4eAzw= 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=tvgAJ8+M; arc=none smtp.client-ip=209.85.128.49 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="tvgAJ8+M" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-436326dcb1cso4455625e9.0 for ; Fri, 13 Dec 2024 08:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734108321; x=1734713121; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=97bdRnaBdJfe74YUb9Rv1xkiswutq43yZJvms06fez0=; b=tvgAJ8+MrXmsreVMUcHKrmwkCbdR8JqEiRz7BpX7+7qv4jMBUzdAnORlPcw1aD0+5C qNHPMsxwUTXe4dThBsjIK2gMhADrlDpBr9V1Y1m30vMdfcuobeDtPMpz65tLTYEIDzC4 Ftiazg4m3ASXTdOlni6B0sp7bGi5dvMinzp4dF8094BK2A/mJpgxxnCV+86xoypWTMos Zoyx+3Q32excqjiSrog1twxgQzh6Z8BWcDw0TDxKKxr52IK9e8F8glwxKIDk0yjhDnIK ZhvdwqSnuSchl0sIVzK6xZRYOC2XXUyqjxArndwRLcTzkHx/RtHeOk6Z8SKtELJD6tEq mXrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734108321; x=1734713121; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=97bdRnaBdJfe74YUb9Rv1xkiswutq43yZJvms06fez0=; b=pDazH4wxM3wx3+y90TBZlWLOa9Y3MV+xxNk65HDNQsuQUMGcWfUoBXU/2+HKaGLBRn bHLRP7F3QP/o2ZzpQHBJQ8jSIVGe1KbzTP2Bi524hs5eFvNevN6B23v6/Kyz0e4mBtCP k6JyQDALmd7YOlWRNNQw7QfEAEVMwyhTo4hinGIDZ6WYWSC157aflZ/Y8gsITBv+PA8K 88/H/eRAfkfxJDSAuYaBIPr2IBXq30GtVq//bMVsWzyVA54JnsTyd8ERKIeZsGxaUzTC k+EvUpTKhKZ+JJ9XdrnvgyDiuJCDk+bs0zFExyeU92aSEsIONdMau0Uqt8/p3T4H+MXT 670w== X-Forwarded-Encrypted: i=1; AJvYcCVLKJMsLcGdFoIGNRnaemeQUQQdiAyQqDsN1/cW0qiVl9I2LVF8V09BKjkhWmJcYIIWSpnAGj6f5mKaJik=@vger.kernel.org X-Gm-Message-State: AOJu0YxHGhykyHmKWhuYxX6wcyyWi+uSxmhCUgqhoRzurXbttjiLoktB uQhtq4Gmr2U80zOE70XEI7nYtwffv/Zhm3JEecaqnOOP0En3oTnISKEEbyQ8R3By5e8Tono0jno p X-Gm-Gg: ASbGncs7W1vML1s2Uca3dfVZjn5serK2P7KocuXC3QOYk962mAoZFnrDI0e24c99U4C xbRF6CvZAkE1UzytL1gUR+3cqkBQk2pKARuU9N1oej8p5mdtFBqfVl7Sl/ziJpRmXpDiz9XSjo1 yxqD2fPcb6HnZsLHURBRcny4Xl+KH266pQIcYp5HrnWysEjxesOqqtljakjV+77qUhqq3O1+Bcc kXkSBu87CjvSMhnmuDl7C50iC0a+kyhFMwGg+CIzTVt3bxDl1ayELEHU+OLNIwnTFGkG78Q2TBf 3Jx7GcR1vg== X-Google-Smtp-Source: AGHT+IGZWqjtdOdT/tpdS6VIYY/OsEpMo2zR5ORrDSrlvnH3vBH19ZJ4OkOJsfs9LUuPR/6YXntcCA== X-Received: by 2002:a05:6000:4024:b0:385:e38f:8cc with SMTP id ffacd0b85a97d-3888e0b8718mr2672697f8f.38.1734108321100; Fri, 13 Dec 2024 08:45:21 -0800 (PST) Received: from gpeter-l.roam.corp.google.com ([145.224.66.83]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43625550523sm53900665e9.7.2024.12.13.08.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 08:45:20 -0800 (PST) From: Peter Griffin Date: Fri, 13 Dec 2024 16:44:40 +0000 Subject: [PATCH 3/4] arm64: dts: exynos: gs101: add pmu-intr-gen regs to the PMU node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-3-c72978f63713@linaro.org> References: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-0-c72978f63713@linaro.org> In-Reply-To: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-0-c72978f63713@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , Krzysztof Kozlowski , Lee Jones Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, willmcvicker@google.com, kernel-team@android.com, Peter Griffin X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=878; i=peter.griffin@linaro.org; h=from:subject:message-id; bh=uO4wHh5R6umt3vpek5lvClXZRvrRF8v6hmmxWJa+U7s=; b=owEBbQKS/ZANAwAKAc7ouNYCNHK6AcsmYgBnXGSaf/9i9t3N75PN25j2i/ydlMAkKuaeaexK7 X0Egk2OrE6JAjMEAAEKAB0WIQQO/I5vVXh1DVa1SfzO6LjWAjRyugUCZ1xkmgAKCRDO6LjWAjRy ukK5D/9ome5x888y6BKVVMDwfE02V/42kZwdnreejxJI4o2iiOpAA5D3FCwK+Q/V/Y3V/91Nf9c OiOdQUPD4v9K6WOZrdBDhW64QCkwKTegdIqhstPvsfyZw9XfYKVOEd0Y4aA3BONUbmU1dUeP04p 52RV1al+IlZmf3YiQSLLo/2HalaZWvRDCuaVlVCTmW15BktT2ufzOlUZzJPpNZgVdv/l0c+0j+n WlBYj5camPsEuEwsP9XPIUz1/UMvBiabRwioX0tGYCJQOpQvPs+IKqb0XYmME9FTcHgelXLzhwv yzboFdNLxPpf42K/H+cENSmc14/DJt/sB0W2mfQJJHqOsgskZa0hg/v/locl6Mgns/96CIkRB6y MrgbqRf0KZgnZQSKCt/cAIHiZX2IHzAb8sCVR85UGVyL1Bx/SrxhqoAO6GGgKt3qeWTbu2T1IUX CLhnVBdSJQo8TUcuHouJ0/lA/sfEuSQjSpbNwEThH+CJtDj6Ag9hY5SAomTR9I8qXZfEM75rtrq VCas+ueobtMbBPtmzoer1GLD3rM2VaJV44aICHQ01Nq/go3UVF9iSF1JBxoGN6sAXPaaXIrIUdd vzLYYzTBbpT1ngkisIkNwYApUPQeqlGndS6669BwRZtorUIloclr5HNJkow01vRLi44BnyezzVW 0v3RehT7gH+35Pw== X-Developer-Key: i=peter.griffin@linaro.org; a=openpgp; fpr=0EFC8E6F5578750D56B549FCCEE8B8D6023472BA These registers are required for cpu hotplug. Signed-off-by: Peter Griffin --- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot= /dts/exynos/google/gs101.dtsi index 302c5beb224a..93db14e16246 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi @@ -1393,7 +1393,9 @@ sysreg_apm: syscon@174204e0 { =20 pmu_system_controller: system-controller@17460000 { compatible =3D "google,gs101-pmu", "syscon"; - reg =3D <0x17460000 0x10000>; + reg =3D <0x17460000 0x10000>, + <0x17470000 0x10000>; + reg-names =3D "pmu", "pmu-intr-gen"; =20 poweroff: syscon-poweroff { compatible =3D "syscon-poweroff"; --=20 2.47.1.613.gc27f4b7a9f-goog From nobody Mon Feb 9 01:34:16 2026 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 275491F130B for ; Fri, 13 Dec 2024 16:45:23 +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=1734108326; cv=none; b=lO4l89bTM7YvFspyi6Vx5D/Xe7jObLv2K31jdYWFNU9kA8V5sJXPqoF0TTbQzewfRuyUvm9HB7y5hT/OlTYwqyhvYGBT32tUzfDcWritCGgbp4xqh0NVb4kydjgqjWAwzDJGnNqNp6cHlTP2/Se5fYVmxtfuWBlIYSGqvMslXiI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734108326; c=relaxed/simple; bh=Qzt6V7MPTnrrL8I4lVzjSwBYmRktc+/YgSPk/GCVFoM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=icjYSJMmoNe+2vAOsmXI54iftoRpJFlBl3l6w/3VrlSQG3qrXEIHK8AidlpR+vEQgn/dJRwjJd/j1DcfuPbot0jYyYb+j5nPgVT7t3jmO52HZr2NkRamsSCGOHM92Wvy5DimuRtsKQNAE/sWEIybzaj0SpLyG8Ct0MeT80RL9bU= 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=Q9YgFjg3; 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="Q9YgFjg3" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4361fe642ddso20017875e9.2 for ; Fri, 13 Dec 2024 08:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734108322; x=1734713122; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=sM+OHiF90yvvBmEBEkw7PlxOYbfepKOCjoVyVikB5ho=; b=Q9YgFjg3iQTshsdTV8yEArHm8lQ6dCnY5W/XslWSWy03jSmZomL6Wl7rM1drnBUqon 1OFvW+jkgdqJz+MmbQsg9cAnkUsQ1UwUL7aeHKoqfoN6rdZ4DsQa1dZq3XsMA75tCXOi bXnUey0+MJPpKAghnzJnREc2hy4UPE8SQqYMlCAtWl/ApPluER8oiUnwzJbxelWHw/PK H+DHfyc+PumDvCDIDoSZ2QFwjOUKJ6GHAJ/W8qVTwPpQiipNxOw3HGb2J7+X954QMQrk jpjzeIBCIamwdMkCVV3E54MEhSBMhCBGBUjHtcYX6k5P3EO5pqHGpPlkpLHPHtwpAzWo 9Qvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734108322; x=1734713122; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sM+OHiF90yvvBmEBEkw7PlxOYbfepKOCjoVyVikB5ho=; b=QNde6p9BBqdC/NEmsCiKWsyp+ct639BYyCDvFjK83caZ4juo+FoZtZDkou54fDwMoz +mv/xaq4XQTEgP17SS55qR9Gu0+D6iYI29+1mEIQZKrKrPZlq+V+TvUTc1zbtUavtscj weoU+EPJ9v3YHHoXVCq3AWJPzbrCFIQQPVc7w6NGO2vXZaeab7YciqgVRyp+6yWc7Fcp W1iiJcVmCAGiBqF0/enZwC3/NPPIKDu7foQf0agRiGmDeFVU9qEAmXNPGphJUkKxwtfK Gofi+WKIkDI2A5ZZPUYU+9uD7YQReSysH0umWzMrY1YjKoHmSHfdPlccImWOeHbD0KNp JmCw== X-Forwarded-Encrypted: i=1; AJvYcCWPKdjYaMbVFjnugsN0GxTi16FYMS4bBf0/9jkj4egxbi6XFSOGVE3T4j9hBlOkBgsE7cEXS3B35aiD/Rs=@vger.kernel.org X-Gm-Message-State: AOJu0YwJaOAkl7idnjjYoRSwYGgTUVP65j37j0cutB0PkvkXtm3P+TsH m9D4JutQmrGtAvj+1E87GHbF/VnKc4TE2tgFHNTP6wt00RLFCMe/5k8xSwGr8AM= X-Gm-Gg: ASbGncsUiDdE/KH4LSk/tZbml1SvMoVc9c/kQ/PwmXf4Q4qV9mfDNkTplzUVc7LaG+7 h0w+SogX717jUWIi+trUE8ucjIhx76rcwMnaNh53Ed3G14M6mSQGxrIfe8cmjzIUGJaO62bXHGR FuEZ7riVH2Jnj7z34kFHv0SEmACKx8joOCudCZ+ZQ3ci0GLGu33vlbK3FwXxpHSBY/K6FSYfOGP eqIn091rvTHIYm57QqrSk4AqCP5/hFd5eljIKQd8TBJUkLwQB4MKKzl15iGrWyE6PtBYpqqQ5tO CAsxUb5jJA== X-Google-Smtp-Source: AGHT+IEwmLAcTh89DX5T/LSijU8z8bvHD+aN33QJxTOiFr0brRxcpM8yH/x7cknLvAOziYYAxWsdSg== X-Received: by 2002:a05:600c:b95:b0:434:a0bf:98ea with SMTP id 5b1f17b1804b1-4362aa2e5ffmr33344465e9.9.1734108322380; Fri, 13 Dec 2024 08:45:22 -0800 (PST) Received: from gpeter-l.roam.corp.google.com ([145.224.66.83]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43625550523sm53900665e9.7.2024.12.13.08.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 08:45:22 -0800 (PST) From: Peter Griffin Date: Fri, 13 Dec 2024 16:44:41 +0000 Subject: [PATCH 4/4] soc: samsung: exynos-pmu: enable CPU hotplug support for gs101 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-4-c72978f63713@linaro.org> References: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-0-c72978f63713@linaro.org> In-Reply-To: <20241213-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v1-0-c72978f63713@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , Krzysztof Kozlowski , Lee Jones Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, willmcvicker@google.com, kernel-team@android.com, Peter Griffin X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5667; i=peter.griffin@linaro.org; h=from:subject:message-id; bh=Qzt6V7MPTnrrL8I4lVzjSwBYmRktc+/YgSPk/GCVFoM=; b=owEBbQKS/ZANAwAKAc7ouNYCNHK6AcsmYgBnXGSarmzwM1kbdivF8IkWxg2Uc0310r8V7M0Y7 F9SFeH1J0SJAjMEAAEKAB0WIQQO/I5vVXh1DVa1SfzO6LjWAjRyugUCZ1xkmgAKCRDO6LjWAjRy uoG8D/9bBAX5wVe3H5FgKq4xkyJL342x5fcHH0eUNITx4oEvi85oYZbJcJWP3iB46a3KONBjUj7 dCXDBmtd9AetZ0yLookvweoWbgIqfI/+KUHhDlkA1vSeFJ4ejXs4RvL7t/idl8y++7RMTxh+vhZ jbGfrge5R7JfmXvtBUv+lktbLMPes7SOiWJup6x8yCtJq8LyasCPXiUboWeL6NXkMNnGQqGLvi0 MDWdaa3dP56lRP6fXUNnQ4Tc/8Tm/YkNcHZ3GlHT5b7qpIcEPOx7M/+d0Yt/1+uKqYc4MIMXCIT 2ALjVMttEirUpAoYMHcY8WkmxYUSTLMm2scK5q8TPAEJO/JmX5AAk543cQASubnBzqWh/xLClcF iQ6QH9wyJk28grdgFIy0oLMWSWz0FiwD5vjwlYpedOskNG/KZw8jxTm2RFmVp43ynUreKmdE7RJ S/S79VW/C7gTDViP9gFXJM2+initDuXXUXk3Aacq5fMA27jJUX8DeC95Aaaz1hC/bkk3J92uv8+ Xw4gxJU9Fum16kGj535EayF1lxdF36fxxfL6hb+fMhUXcUXi93MiXmzvFAEEbmFBoXwwnMBTeHm gJ8x/iIlzeFU0LxlKXNbOp77LHxhzoQ13+goTOzYoqS8/s2677uc4Xlh8AZuogv0bmqQ0Ydaewl zqg+w0ooJRexZ4g== X-Developer-Key: i=peter.griffin@linaro.org; a=openpgp; fpr=0EFC8E6F5578750D56B549FCCEE8B8D6023472BA Some additional register writes are required when hotplugging CPUs on gs101, without these the system hangs when hotplugging. Specifically a CPU_INFORM register needs to be programmed with a hint value which is used by the EL3 firmware (el3mon) and the pmu-intr-gen registers need to be programmed. With this patch applied, and corresponding DT update CPU hotplug now works as expected. e.g. echo 0 > /sys/devices/system/cpu/cpu6/online echo 1 > /sys/devices/system/cpu/cpu6/online Note: to maintain compatibility with older DTs that didn't specify pmu-intr-gen register region only a warning is issued if the registers can't be mapped, and the old behaviour is maintained. Signed-off-by: Peter Griffin --- drivers/soc/samsung/exynos-pmu.c | 73 +++++++++++++++++++++++++= +++- drivers/soc/samsung/exynos-pmu.h | 1 + include/linux/soc/samsung/exynos-regs-pmu.h | 11 +++++ 3 files changed, 84 insertions(+), 1 deletion(-) diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-= pmu.c index d8c53cec7f37..68eb4eb3813b 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -6,6 +6,7 @@ // Exynos - CPU PMU(Power Management Unit) support =20 #include +#include #include #include #include @@ -32,6 +33,7 @@ struct exynos_pmu_context { struct device *dev; const struct exynos_pmu_data *pmu_data; struct regmap *pmureg; + void __iomem *pmuintrgen_base; }; =20 void __iomem *pmu_base_addr; @@ -221,7 +223,8 @@ static const struct regmap_config regmap_smccfg =3D { }; =20 static const struct exynos_pmu_data gs101_pmu_data =3D { - .pmu_secure =3D true + .pmu_secure =3D true, + .pmu_cpuhp =3D true, }; =20 /* @@ -325,6 +328,52 @@ struct regmap *exynos_get_pmu_regmap_by_phandle(struct= device_node *np, } EXPORT_SYMBOL_GPL(exynos_get_pmu_regmap_by_phandle); =20 +/* + * CPU_INFORM register hint values which are used by + * EL3 firmware (el3mon). + */ +#define CPU_INFORM_CLEAR 0 +#define CPU_INFORM_C2 1 + +static int cpuhp_pmu_online(unsigned int cpu) +{ + void __iomem *base =3D pmu_context->pmuintrgen_base; + u32 reg; + u32 mask; + + /* clear cpu inform hint */ + regmap_write(pmu_context->pmureg, GS101_CPU_INFORM(cpu), + CPU_INFORM_CLEAR); + + mask =3D (1 << cpu); + + writel(((0 << cpu) & mask), base + GS101_GRP2_INTR_BID_ENABLE); + + reg =3D readl(base + GS101_GRP2_INTR_BID_UPEND) & mask; + writel(reg & mask, base + GS101_GRP2_INTR_BID_CLEAR); + + return 0; +} + +static int cpuhp_pmu_offline(unsigned int cpu) +{ + void __iomem *base =3D pmu_context->pmuintrgen_base; + u32 reg, mask; + + /* set cpu inform hint */ + regmap_write(pmu_context->pmureg, GS101_CPU_INFORM(cpu), + CPU_INFORM_C2); + + writel((1 << cpu), base + GS101_GRP2_INTR_BID_ENABLE); + + mask =3D ((1 << cpu) | (1 << (cpu+8))); + + reg =3D readl(base + GS101_GRP1_INTR_BID_UPEND) & mask; + writel(reg & mask, base + GS101_GRP1_INTR_BID_CLEAR); + + return 0; +} + static int exynos_pmu_probe(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; @@ -377,6 +426,28 @@ static int exynos_pmu_probe(struct platform_device *pd= ev) pmu_context->pmureg =3D regmap; pmu_context->dev =3D dev; =20 + if (pmu_context->pmu_data && pmu_context->pmu_data->pmu_cpuhp) { + + pmu_context->pmuintrgen_base =3D + devm_platform_ioremap_resource_byname(pdev, "pmu-intr-gen"); + /* + * To maintain support for older DTs that didn't specify pmu-intr-gen + * register region, just issue a warning rather than fail to probe. + */ + if (IS_ERR(pmu_context->pmuintrgen_base)) { + dev_warn(&pdev->dev, + "failed to map pmu-intr-gen registers\n"); + } else { + cpuhp_setup_state(CPUHP_BP_PREPARE_DYN, + "soc/exynos-pmu:prepare", + cpuhp_pmu_online, NULL); + + cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, + "soc/exynos-pmu:online", + NULL, cpuhp_pmu_offline); + } + } + if (pmu_context->pmu_data && pmu_context->pmu_data->pmu_init) pmu_context->pmu_data->pmu_init(); =20 diff --git a/drivers/soc/samsung/exynos-pmu.h b/drivers/soc/samsung/exynos-= pmu.h index 0a49a2c9a08e..0938bb4fe15f 100644 --- a/drivers/soc/samsung/exynos-pmu.h +++ b/drivers/soc/samsung/exynos-pmu.h @@ -22,6 +22,7 @@ struct exynos_pmu_data { const struct exynos_pmu_conf *pmu_config; const struct exynos_pmu_conf *pmu_config_extra; bool pmu_secure; + bool pmu_cpuhp; =20 void (*pmu_init)(void); void (*powerdown_conf)(enum sys_powerdown); diff --git a/include/linux/soc/samsung/exynos-regs-pmu.h b/include/linux/so= c/samsung/exynos-regs-pmu.h index ce1a3790d6fb..0d5a17ea8fb8 100644 --- a/include/linux/soc/samsung/exynos-regs-pmu.h +++ b/include/linux/soc/samsung/exynos-regs-pmu.h @@ -658,9 +658,20 @@ #define EXYNOS5433_PAD_RETENTION_FSYSGENIO_OPTION (0x32A8) =20 /* For Tensor GS101 */ +/* PMU ALIVE */ #define GS101_SYSIP_DAT0 (0x810) +#define GS101_CPU0_INFORM (0x860) +#define GS101_CPU_INFORM(cpu) \ + (GS101_CPU0_INFORM + (cpu*4)) #define GS101_SYSTEM_CONFIGURATION (0x3A00) #define GS101_PHY_CTRL_USB20 (0x3EB0) #define GS101_PHY_CTRL_USBDP (0x3EB4) =20 +/* PMU INTR GEN */ +#define GS101_GRP1_INTR_BID_UPEND (0x0108) +#define GS101_GRP1_INTR_BID_CLEAR (0x010c) +#define GS101_GRP2_INTR_BID_ENABLE (0x0200) +#define GS101_GRP2_INTR_BID_UPEND (0x0208) +#define GS101_GRP2_INTR_BID_CLEAR (0x020c) + #endif /* __LINUX_SOC_EXYNOS_REGS_PMU_H */ --=20 2.47.1.613.gc27f4b7a9f-goog