Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp431705ybt; Fri, 10 Jul 2020 03:42:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1mybSTwWnK/XKSModX5uABEG7dXfJM+lZOZ4/1oD7lDhszhfpbZz3Q2dHoZ15iEOxoAS7 X-Received: by 2002:aa7:d142:: with SMTP id r2mr68128727edo.211.1594377765196; Fri, 10 Jul 2020 03:42:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594377765; cv=none; d=google.com; s=arc-20160816; b=b2T+SPYlnIAXjZlYApw6U0XKfshebdkMUweY7KypcoEGsY+62/KWN7+4AWH+TJjdnD AWDvvZT/FXGUuFbLOGsNkeofgMQl86Fw8pI2QFDPoKRPpRrJmnbtKzZOoU45JN3rQVYs g5zrTw8QJMXTWefD0ZYWEXS5oZeVHDuafb5rGKfauzInxI2fn1HpYQElUSrQcqSncLTm AQrCTfZwj+aJrQhILPb41n7twrMf9NGhut/n9GbmtAC6UnDGctvFRBUV6K22WAwX8BPQ sd/ZCfPUA80HEraeDXFK0i4PwvRKq6ChvK3EW0FFtP41iuLBWsJrBt/BNEe/Fe7CwNE/ 5r/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=jJUd39bjlIspvI1o1u2naIJgRgatARb46UKsj3YoryU=; b=zEJkIh8Z10l3cDqPHN7FChW0BroOssLGafmZENFJQ9xH3OO3BcrHvATIjeFi1f3q1A ayCN2eXhCRMajRnaFcrJzlCRFNt35nKAEu2HkZxCvtcjxsKHJh5yGIPjdhDcHwWM2uFL EjiV+GMekxZ8iCHP7LLCjJ/V23Uzt45FF9kMmzkQ2nO1Aq8giniayWopb3LBXXaTFF0u swg21XYt2PWzfon8SezqTXmMKh2Z5KPkee/7RjAgjkiZr/8N/kdZteVbVHp/IELtXKP+ oq1aEI/lpy1+clq5TBsdp8D32fRqawOb5TUzWld7i48XUw49+n4jpbdyx+T6cW+BO4k4 0njg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DH56qud2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si4010098edv.535.2020.07.10.03.42.21; Fri, 10 Jul 2020 03:42:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DH56qud2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727086AbgGJKmI (ORCPT + 99 others); Fri, 10 Jul 2020 06:42:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbgGJKl7 (ORCPT ); Fri, 10 Jul 2020 06:41:59 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83002C08C5CE; Fri, 10 Jul 2020 03:41:59 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id w3so5420135wmi.4; Fri, 10 Jul 2020 03:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jJUd39bjlIspvI1o1u2naIJgRgatARb46UKsj3YoryU=; b=DH56qud2+QsVfrK8NLDzF6y3pDUvhI1TiiWC9GaXIDY+mjOyJsz5RrWGxvnr98N6em Nae2lMEO9/PQm+iyD0C4QFfenRe4mMqw0YWsEQ88YAy9XZZ2llLQnNiO9bwoXrHLj5hy f4IF0+t/glYSyA/C/vbq/600XYSZPlbprs8fEJruKudcF3XSp1LkDkVQFk6nCHj2JJSg pf+47vfnif9+zsGTdSNw7weQvui+2SSxAfu8u9NEaBEoM6Tzai0nnckyXWjqWLFT+dHh F/f3qhdwiK3je5hhCuS0bc8y1qDq5X5Pa86goGdiZCi42yRSpDohJRQNQEEHMcxBNYPk xfpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jJUd39bjlIspvI1o1u2naIJgRgatARb46UKsj3YoryU=; b=DmGSQHI9fQmcRThUa98FZ6evyBXGrad8Fap6zopsa67GsAPijM+tOLGPb9H4OuuwEx cvol3jCYOC6BmEBlIKNTnwIfc0r9Mv31bzvHpAn0/XmNoJbPuMdzKEHUy0d3AJYFw4LA wx+oLedYiYVbAN5yXDL/aOVs9MDTILsWuiBVbLq9kDFmjqIcb/VQIhlbsh9y1Ad/pjdQ DuSesWmkcLr5kSEJWMHivK/AsQgN2OI+GMA1SUV6X9IiEIIMKtZU6rnNrdyiSi+XnGLZ QBktaEtbl4p7FHYQxJ5R7oHtUrClYz6+EA7ec0YPDqUayUnNa3eXlkLhn0tml7H/KJCZ 5mFA== X-Gm-Message-State: AOAM5330AFyw6zsHE1xZEDPDIMS7DhoYYrHK/Daw5u7X1VqHnQED15dM l2GIP9xr64e60JQb1nBa6Y2EYqmmv+U= X-Received: by 2002:a1c:5459:: with SMTP id p25mr4429409wmi.148.1594377718256; Fri, 10 Jul 2020 03:41:58 -0700 (PDT) Received: from ziggy.stardust ([213.195.114.245]) by smtp.gmail.com with ESMTPSA id a4sm10470215wrg.80.2020.07.10.03.41.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jul 2020 03:41:57 -0700 (PDT) Subject: Re: [PATCH v2 1/2] dt-bindings: devapc: add bindings for mtk-devapc To: Neal Liu , Rob Herring Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, lkml , wsd_upstream@mediatek.com References: <1594285927-1840-1-git-send-email-neal.liu@mediatek.com> <1594285927-1840-2-git-send-email-neal.liu@mediatek.com> From: Matthias Brugger Message-ID: Date: Fri, 10 Jul 2020 12:41:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <1594285927-1840-2-git-send-email-neal.liu@mediatek.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/07/2020 11:12, Neal Liu wrote: > Add bindings for mtk-devapc. > > Signed-off-by: Neal Liu > --- > .../devicetree/bindings/soc/mediatek/devapc.yaml | 82 ++++++++++++++++++++ > 1 file changed, 82 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/mediatek/devapc.yaml > > diff --git a/Documentation/devicetree/bindings/soc/mediatek/devapc.yaml b/Documentation/devicetree/bindings/soc/mediatek/devapc.yaml > new file mode 100644 > index 0000000..f08243e > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/mediatek/devapc.yaml > @@ -0,0 +1,82 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# # Copyright 2020 MediaTek Inc. > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/soc/mediatek/devapc.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: MediaTek Device Access Permission Control driver > + > +description: | > + MediaTek bus fabric provides TrustZone security support and data > + protection to prevent slaves from being accessed by unexpected masters. > + The security violation is logged and sent to the processor for further > + analysis and countermeasures. > + > +maintainers: > + - Neal Liu > + > +properties: > + compatible: > + enum: > + - mediatek,mt6779-devapc > + > + reg: > + description: The base address of devapc register bank > + maxItems: 1 > + > + interrupts: > + description: A single interrupt specifier > + maxItems: 1 > + > + clocks: > + description: Contains module clock source and clock names > + maxItems: 1 > + > + clock-names: > + description: Names of the clocks list in clocks property > + maxItems: 1 > + > + mediatek-slv_type_num: > + description: Numbers of slave type in mediatek platform > + maxItems: 1 This should go in the DT data, have a look for example at: https://elixir.bootlin.com/linux/latest/source/drivers/soc/mediatek/mtk-pmic-wrap.c#L1842 and https://elixir.bootlin.com/linux/latest/source/drivers/soc/mediatek/mtk-pmic-wrap.c#L1777 > + > + mediatek-vio_dbgs: > + description: The mask bit and start bit of devapc violation debug registers > + maxItems: 5 > + same here > + mediatek-pds_offset: > + description: The offset of devapc pds registers > + maxItems: 1 same here > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + - mediatek-slv_type_num > + - mediatek-vio_dbgs > + - mediatek-pds_offset > + > +examples: > + - | > + #include > + #include > + > + devapc: devapc@10207000 { > + compatible = "mediatek,mt6779-devapc"; > + reg = <0x10207000 0x1000>; > + interrupts = ; > + clocks = <&infracfg_ao CLK_INFRA_DEVICE_APC>; > + clock-names = "devapc-infra-clock"; > + > + mediatek-slv_type_num = /bits/ 8 <1>; > + mediatek-vio_dbgs = <0x0000FFFF 0x0>, > + <0x003F0000 0x10>, > + <0x00400000 0x16>, > + <0x00800000 0x17>, > + <0x0F000000 0x18>; > + mediatek-pds_offset = <0x0 0x400 0x900 0x904 > + 0xF00 0xF10 0xF14 0xF20>; > + }; >