From patchwork Mon Jul 16 18:06:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 142094 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2711361ljj; Mon, 16 Jul 2018 11:06:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfk5CA/ROjL2KCEb1lhjKLjAgXxJx8M8+A8H5k3onkMunQKTbmY8HJ+bYu3XcHPsGi5ilJ0 X-Received: by 2002:a17:902:6946:: with SMTP id k6-v6mr9659966plt.268.1531764413198; Mon, 16 Jul 2018 11:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531764413; cv=none; d=google.com; s=arc-20160816; b=NUSdCoG936iZXEhjSWKUolQ750lwMS9W/cGhEWk/9iFvPE1bvj5JXYzTDagP+M4w2u VkFARz6tNkzlGzKNqah1+avvGAymK4LYyYVfQJ5cIv9jguNgyhmlVWeADNczHRwr+Yc7 DjiwshiqCbY/b7G2Gq6F9vOTOccAzoxjwN/PowupDxm3KeNp+CouoHz5b10pvFPY8zzu pjmqpp9bRrIvLDPVAgYRhs5CmMzf8fK3Ne0Od9Efbhjid6xKut6bou747TebJLsqv2eW Nkj2bFvqGricLcjLT4cdKD8jRAX9xCGYJVTuFVKDqqzi0oE0lOge3IFYFYb8VdNdapEb Jlkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=fq2nVyugUZS+5AlqfD59wPONCe9vtQd7+oY7aOF1VaI=; b=j9Ys/CXuaJh3+kP5gBsxD4DXxPaKJVo63pLQ6/CiOrFQfs4W9wy1UgPXsc1SBRH2Rl mrWIULL5dpXOZycGiO6HwxI79ToBvfv9cMMjAqiwzF4Out/a43Lp1vi2wfRC7EzBDZ7d XhXrPgyxkJ9o1JSaBnncAsNLKK6mqxDUEJzdpPdyAzM62NMy/jMxOLVO2QiJGdL3gi33 wLSy6ghFPZF7MB+RhTvMGgSerSjsKs8sQI1IXG/PXTbB8c0BkYqxrxCqf4Zrjb4Dk9nP nAY9Mbf9hZh00CAYt5LGBTkwliBesbvTFZKGPWSP2Ywtg6vqLFrPo4SJvO47HVjhWJjF AVoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=QuGDZECm; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4-v6si30915758pfi.184.2018.07.16.11.06.53; Mon, 16 Jul 2018 11:06:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=QuGDZECm; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730667AbeGPSfY (ORCPT + 5 others); Mon, 16 Jul 2018 14:35:24 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:45750 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730180AbeGPSe7 (ORCPT ); Mon, 16 Jul 2018 14:34:59 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id w6GI69sv048192; Mon, 16 Jul 2018 13:06:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1531764369; bh=pjndw84cSeNk1ZBGfYgK+F7omBF/DgkhA23tQUo+wEc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=QuGDZECmFhLO8U8M6FtILnFMRjsO1/VhCk+7YIY1U+7R/w6HzNlr4VnLXCdRDxkgk FsUQf+vydwn9Xy5R5H9AsVdLwDbRjpkq+468HQnOAZf2dOI1GmSepwkw/lJjZaffOq qHytqq6j5ItWNcp1OSMHdqNNON3dLz7mwsoJ7K7g= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w6GI69dt018320; Mon, 16 Jul 2018 13:06:09 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 16 Jul 2018 13:06:08 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 16 Jul 2018 13:06:08 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w6GI681R019375; Mon, 16 Jul 2018 13:06:08 -0500 From: Nishanth Menon To: Jassi Brar , Mark Rutland , Rob Herring CC: Nishanth Menon , Suman Anna , Tero Kristo , , , Subject: [PATCH V2 4/6] mailbox: ti-msgmgr: Move the memory region name to descriptor Date: Mon, 16 Jul 2018 13:06:05 -0500 Message-ID: <20180716180607.16526-5-nm@ti.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180716180607.16526-1-nm@ti.com> References: <20180716180607.16526-1-nm@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org For newer generation of the hardware, the naming of the region is decided at integration level and there could be additional regions as well. Hence move the region naming to be described from compatible descriptor. Signed-off-by: Nishanth Menon --- Changes since V1: None V1: https://patchwork.kernel.org/patch/10475331/ RFC: https://patchwork.kernel.org/patch/10447653/ drivers/mailbox/ti-msgmgr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c index 7d2eb4b359ba..7167cc708f44 100644 --- a/drivers/mailbox/ti-msgmgr.c +++ b/drivers/mailbox/ti-msgmgr.c @@ -48,6 +48,8 @@ struct ti_msgmgr_valid_queue_desc { * @tx_polled: Do I need to use polled mechanism for tx * @tx_poll_timeout_ms: Timeout in ms if polled * @valid_queues: List of Valid queues that the processor can access + * @data_region_name: Name of the proxy data region + * @status_region_name: Name of the proxy status region * @num_valid_queues: Number of valid queues * * This structure is used in of match data to describe how integration @@ -63,6 +65,8 @@ struct ti_msgmgr_desc { bool tx_polled; int tx_poll_timeout_ms; const struct ti_msgmgr_valid_queue_desc *valid_queues; + const char *data_region_name; + const char *status_region_name; int num_valid_queues; }; @@ -531,6 +535,8 @@ static const struct ti_msgmgr_desc k2g_desc = { .queue_count = 64, .max_message_size = 64, .max_messages = 128, + .data_region_name = "queue_proxy_region", + .status_region_name = "queue_state_debug_region", .data_first_reg = 16, .data_last_reg = 31, .status_cnt_mask = Q_STATE_ENTRY_COUNT_MASK, @@ -582,13 +588,13 @@ static int ti_msgmgr_probe(struct platform_device *pdev) inst->desc = desc; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "queue_proxy_region"); + desc->data_region_name); inst->queue_proxy_region = devm_ioremap_resource(dev, res); if (IS_ERR(inst->queue_proxy_region)) return PTR_ERR(inst->queue_proxy_region); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "queue_state_debug_region"); + desc->status_region_name); inst->queue_state_debug_region = devm_ioremap_resource(dev, res); if (IS_ERR(inst->queue_state_debug_region)) return PTR_ERR(inst->queue_state_debug_region); From patchwork Mon Jul 16 18:06:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 142088 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2710904ljj; Mon, 16 Jul 2018 11:06:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeJiAr8SSENyMOnYEZWbBNZviE30on59x8VnxDG9xXK8iDW1fAmy/oXKtqPTNIlO5frUWAg X-Received: by 2002:a65:58c8:: with SMTP id e8-v6mr16170584pgu.96.1531764386716; Mon, 16 Jul 2018 11:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531764386; cv=none; d=google.com; s=arc-20160816; b=fCXjLuqYTsmeIRXN7ZNcNVvssl1+mNwaGkQjRx4xQECwzODvRVg3PT9hYGXDqCL72K TcYrMaaLotIpFGLXyrM894S+lXyy5RpZ954hFwRUqrW8F+1z28sz9QIeKue4zes0eIdS wqksORmuUhbuzh1cQmKJYJ6ihzkBy5vM5KjWAF1Y7O+oWV8hx/i++FFiEdP5CUhPRX4a qPnughPjIlGDlTeOIQ6gFk7LoAPRhN6hZsmCnArbhaW7rYBG8yc7gPiidOAzhcGOyrX/ +w5ybaZtQuv4832lJX60wlNFN34BPsOIbqQh88knRxwLYPMzn5xd3j5J2+w9Upp87OJd JVow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=x6sWHOwrDHYp/L0p3h5X5KLg1bFEbQS/6zAn6TOq1A0=; b=nAwHpXRLUkFldg1mu5NON2iO6IuwRXP+DvfZU/Umy1JMRQrXTy3xZlIXzTMWS2yLrN GbcoVPwSQ8dA+SKvImkVmtMA+J5ZKmScjrIOUZ7qQ/7lCDqNfbseiXJQCk+g/qXu7UYl lF+aYs/VREBkdC8v6iMfdSN/nWpbRD4vo16PYsgKuU5DU14uQHVZS7iSXnO0JSe/xc/f T3O3B3IJm1hGjn8v2ei4uKwj06YnII8LoqY/ivDnir/iZw3NVEj8n3aDhnpOb/vUKajh yXZJYJy+pPfEECVfbrh4G37A4yomk8Ju0EnHnZor5n50qK7J+5tbmyZ1czpyDRY3AoFx SnTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=l3HnpN0L; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1-v6si17931385pgf.146.2018.07.16.11.06.26; Mon, 16 Jul 2018 11:06:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=l3HnpN0L; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728413AbeGPSe6 (ORCPT + 5 others); Mon, 16 Jul 2018 14:34:58 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:53254 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727957AbeGPSe5 (ORCPT ); Mon, 16 Jul 2018 14:34:57 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id w6GI69oU103555; Mon, 16 Jul 2018 13:06:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1531764369; bh=30TxWy5iBqkRrz70IwkKzPn6dEy0ZoXQPoVdoeUKsoU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=l3HnpN0LvCEjgwjZjBriIK3c1i4y3dJaUo0s8CPZa7u7MuDLPvyF0ivrxWj3cctKt fm3JMq71vRRGlN5At+okcu+LhMgyYaGudqQ3shW8cgWwdDizoaqDP9Vd3Ov8nLvA6/ 4IBDaRcedysLqGyQyZ1MszBPsyMsWwhLjruj/GdY= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w6GI69mG018319; Mon, 16 Jul 2018 13:06:09 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 16 Jul 2018 13:06:08 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 16 Jul 2018 13:06:08 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w6GI68iS025965; Mon, 16 Jul 2018 13:06:08 -0500 From: Nishanth Menon To: Jassi Brar , Mark Rutland , Rob Herring CC: Nishanth Menon , Suman Anna , Tero Kristo , , , Subject: [PATCH V2 5/6] dt-bindings: mailbox: Add support for secure proxy threads Date: Mon, 16 Jul 2018 13:06:06 -0500 Message-ID: <20180716180607.16526-6-nm@ti.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180716180607.16526-1-nm@ti.com> References: <20180716180607.16526-1-nm@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Secure Proxy is another communication scheme in Texas Instrument's devices intended to provide an unique communication path from various processors in the System on Chip(SoC) to a central System Controller. Secure proxy is, in effect, an evolution of current generation Message Manager hardware block found in K2G devices. However the following changes have taken place: Secure Proxy instance exposes "threads" or "proxies" which is primary representation of "a" communication channel. Each thread is preconfigured by System controller configuration based on SoC usage requirements. Secure proxy by itself represents a single "queue" of communication but allows the proxies to be independently operated. Each Secure proxy thread can uniquely have their own error and threshold interrupts allowing for more fine control of IRQ handling. Provide an hardware description of the same for device tree representation. See AM65x Technical Reference Manual (SPRUID7, April 2018) for further details: http://www.ti.com/lit/pdf/spruid7 Reviewed-by: Rob Herring Signed-off-by: Nishanth Menon --- Changes since V1: * Example changed to indicate mailbox instead of secure_proxy * Picked up Rob's Reviewed-by V1: https://patchwork.kernel.org/patch/10475343/ RFC: https://patchwork.kernel.org/patch/10447695/ .../bindings/mailbox/ti,secure-proxy.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/ti,secure-proxy.txt -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/mailbox/ti,secure-proxy.txt b/Documentation/devicetree/bindings/mailbox/ti,secure-proxy.txt new file mode 100644 index 000000000000..6c9c7daf0f5c --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/ti,secure-proxy.txt @@ -0,0 +1,50 @@ +Texas Instruments' Secure Proxy +======================================== + +The Texas Instruments' secure proxy is a mailbox controller that has +configurable queues selectable at SoC(System on Chip) integration. The +Message manager is broken up into different address regions that are +called "threads" or "proxies" - each instance is unidirectional and is +instantiated at SoC integration level by system controller to indicate +receive or transmit path. + +Message Manager Device Node: +=========================== +Required properties: +-------------------- +- compatible: Shall be "ti,am654-secure-proxy" +- reg-names target_data - Map the proxy data region + rt - Map the realtime status region + scfg - Map the configuration region +- reg: Contains the register map per reg-names. +- #mbox-cells Shall be 1 and shall refer to the transfer path + called thread. +- interrupt-names: Contains interrupt names matching the rx transfer path + for a given SoC. Receive interrupts shall be of the + format: "rx_". +- interrupts: Contains the interrupt information corresponding to + interrupt-names property. + +Example(AM654): +------------ + + secure_proxy: mailbox@32c00000 { + compatible = "ti,am654-secure-proxy"; + #mbox-cells = <1>; + reg-names = "target_data", "rt", "scfg"; + reg = <0x0 0x32c00000 0x0 0x100000>, + <0x0 0x32400000 0x0 0x100000>, + <0x0 0x32800000 0x0 0x100000>; + interrupt-names = "rx_011"; + interrupts = ; + }; + + dmsc: dmsc { + [...] + mbox-names = "rx", "tx"; + # RX Thread ID is 11 + # TX Thread ID is 13 + mboxes= <&secure_proxy 11>, + <&secure_proxy 13>; + [...] + };