Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp68535ybc; Mon, 11 Nov 2019 20:30:19 -0800 (PST) X-Google-Smtp-Source: APXvYqy0hyxCpR6zYFkEmR8ZqgV3eQDcfxMeK+UtKi3cPnCVAWOAvGKbaQA3MkY8odLaOah0Nj9Q X-Received: by 2002:a17:906:494d:: with SMTP id f13mr26550418ejt.250.1573533019701; Mon, 11 Nov 2019 20:30:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573533019; cv=none; d=google.com; s=arc-20160816; b=xKR5QCWqmtOaKTh7345lFW7sxec3nBr/FTLTGgCz5JlZrRlByHxds3HP6cBzjcRzpp 5uUNBj+ESksOnR8cYGvGJLf7XrOA2VbRjqb9qv7URG7CHA7bo/LJp/+Y2BLJ2i5sk9Yk Qp9Id9775vzfoJOOhHAIn9wOu+kTQvyXOx/ZMerYV0MaHed2Ccsh4mjh9PDNLkNHGWfY g5MOx1bSWdXkVZGMIpAR+xKUFkf/jbcOZSykHeXokm/FIgLndpBgqKjdh6xeN91PL4gh 6a/inDZv4ifnK6SIMP3Pb9b8ukp2TM/nGBiZzIsdNtBiMZGQ1e1q65p2hLv5rjXEfACp Te5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=258CUD4l6K29PyIDoFQdXlUa2NIZAL1i/4nuFskQ7Zw=; b=LuTmZSx5JYSzzCQbsulK/eWGI0i1qCOv+JYfBMoaZi62xMArg6mnE2rYmL5W2lGfnQ ENBXRcIeN9bZeRH0D9ITyyPay8u5I8D4zqh1wlmMgp4HEXtlyFHm8rsO9WeNCiO4PX7h OpHc2Og3o+YEfV5s8P/1TF3Hrl4YHVZOZx6qooN5UkC//fHipreE2a2IGptkmSVbcaHs CmuwsLRV90MgkAwnL0VObV8o2+t0gNHW30OJxNSwYn7iub6YWXXPLX2xauqvi5qkVNER 6yBXjc+kYHot9mITCtfiJU/Sr1vRyZl4tJRXkDNP5DsX+rpXvajDPyAaJDMtg05RW0An wKXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e50si12857926ede.59.2019.11.11.20.29.53; Mon, 11 Nov 2019 20:30:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726954AbfKLE3T (ORCPT + 99 others); Mon, 11 Nov 2019 23:29:19 -0500 Received: from mail-sh.amlogic.com ([58.32.228.43]:12690 "EHLO mail-sh.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726910AbfKLE3T (ORCPT ); Mon, 11 Nov 2019 23:29:19 -0500 Received: from droid13.amlogic.com (116.236.93.172) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.1591.10; Tue, 12 Nov 2019 12:29:38 +0800 From: Jianxin Pan To: Kevin Hilman , CC: Jianxin Pan , Rob Herring , Neil Armstrong , Jerome Brunet , Martin Blumenstingl , , , , , Jian Hu , Hanjie Lin , Victor Wan , Xingyu Chen Subject: [PATCH v5 0/4] arm64: meson: add support for A1 Power Domains Date: Tue, 12 Nov 2019 12:28:46 +0800 Message-ID: <1573532930-39505-1-git-send-email-jianxin.pan@amlogic.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [116.236.93.172] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset introduces a "Secure Power Doamin Controller". In A1/C1, power controller registers such as PWRCTRL_FOCRSTN, PWRCTRL_PWR_OFF, PWRCTRL_MEM_PD and PWRCTRL_ISO_EN, are in the secure domain, and should be accessed from ATF by smc. Changes since v4 at [3]: - add SM_A1_ prefix for PWRC_SET/GET - rename variable and update comments Changes since v3 at [2]: - remove phandle to secure-monitor node Changes since v2 at [1]: - update domain id - include dt-bindings in dts Changes since v1 at [0]: - use APIs from sm driver - rename pwrc_secure_get_power as Kevin suggested - add comments for always on domains - replace arch_initcall_sync with builtin_platform_driver - fix coding style [0] https://lore.kernel.org/linux-amlogic/1568895064-4116-1-git-send-email-jianxin.pan@amlogic.com [1] https://lore.kernel.org/linux-amlogic/1570695678-42623-1-git-send-email-jianxin.pan@amlogic.com [2] https://lore.kernel.org/linux-amlogic/1571391167-79679-1-git-send-email-jianxin.pan@amlogic.com [3] https://lore.kernel.org/linux-amlogic/1572868028-73076-1-git-send-email-jianxin.pan@amlogic.com Jianxin Pan (4): dt-bindings: power: add Amlogic secure power domains bindings firmware: meson_sm: Add secure power domain support soc: amlogic: Add support for Secure power domains controller arm64: dts: meson: a1: add secure power domain controller .../bindings/power/amlogic,meson-sec-pwrc.yaml | 37 ++++ arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 7 + drivers/firmware/meson/meson_sm.c | 2 + drivers/soc/amlogic/Kconfig | 13 ++ drivers/soc/amlogic/Makefile | 1 + drivers/soc/amlogic/meson-secure-pwrc.c | 204 +++++++++++++++++++++ include/dt-bindings/power/meson-a1-power.h | 32 ++++ include/linux/firmware/meson/meson_sm.h | 2 + 8 files changed, 298 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml create mode 100644 drivers/soc/amlogic/meson-secure-pwrc.c create mode 100644 include/dt-bindings/power/meson-a1-power.h -- 2.7.4