From patchwork Mon Nov 18 20:02:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251109 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AEA6F6C1 for ; Tue, 19 Nov 2019 08:07:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 96D80222C7 for ; Tue, 19 Nov 2019 08:07:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96D80222C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E6B76EC08; Tue, 19 Nov 2019 08:06:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 547006E81F for ; Mon, 18 Nov 2019 20:05:32 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id q28so953521lfp.2 for ; Mon, 18 Nov 2019 12:05:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z+LP/oqYLNI/WjFbU+/NZQj8FBgrncVTG91u48nmPhw=; b=fwHSxU7S0t/WcEuysias6zyzpxdYYD2AWpgsoNfIRQaSqcjxSdR4903ZamfsyDXdgf jrg/++PN+jN071P3UW9cllMABg5Tv/I/HB62N+23MHEO5rHl1VIGPFoLLPCO0sLEb9hv dkMXdj7WO1yUSueVncWeJ8IcGLrxFt/XIy3MIi842TDtbc7Cc2kV8CvvApSdiGERQ06v ZZd4RmYyVnWiL4MP6NWJX/NrN5ykQ+qu9PS/C7wACbGBI0JMWGst4ncgXv+wROo4TGHL ZBVj3ATmx7qM7YF5jJTLmDsgcGh8ThugpbMXIUL3WRa6PJP1VKeMMPOj1vrCGnF4Elky pbIw== X-Gm-Message-State: APjAAAVR4zhiW4lzpc2vVPfp/zuaraRy5zGFnmlAK3ELETqrLoQl7VtQ CJzDF8SrTpZXil4E9Nu+acw= X-Google-Smtp-Source: APXvYqxOWxh/C2yG+0v+6CTM3jtniOCxIbWzkA4MxVnyi7RbbNMgB8/QIqmT44xuJVCgU5F6/zJgQA== X-Received: by 2002:a19:7510:: with SMTP id y16mr885929lfe.24.1574107530519; Mon, 18 Nov 2019 12:05:30 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:29 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 01/29] dt-bindings: memory: tegra20: mc: Document new interconnect property Date: Mon, 18 Nov 2019 23:02:19 +0300 Message-Id: <20191118200247.3567-2-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z+LP/oqYLNI/WjFbU+/NZQj8FBgrncVTG91u48nmPhw=; b=J7gO1jvnzvd2hzgw2WlUrI12hvo+RAUFlxPNMOtMmAHWMN9YtS+lfkgjTAxy2CJ1xt aLyGBb3tprQmNFCMQzoS3nUUUx7d6bDsx9sm537i1ybwKHRTJS8JcL5qtJj/piMtzx9I gAci62RFvH76iewW0RPzUPL5OdJZqSlv9OSI6L1V5Yx28GNVRGGUGErxSYUXnKq3EJ9l AzreYAuwgSnlEg9sydIm0X2Av44DA0zz0SFUQ7mRAVWIbxqLUt4Fu+ubXm46An4w4t25 /lMVvKOrnEbiP21FKe0F3f9CVtP5ZNc9bSZg0mk9XW//f9tgMNV1gxGjLi4T7uJXiH35 nYxQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Memory controller is interconnected with memory clients and with the external memory controller. Document new interconnect property which designates memory controller as interconnect provider. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra20-mc.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20-mc.txt b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20-mc.txt index e55328237df4..b0765d5cb124 100644 --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20-mc.txt +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20-mc.txt @@ -16,6 +16,9 @@ Required properties: IOMMU specifier needed to encode an address. GART supports only a single address space that is shared by all devices, therefore no additional information needed for the address encoding. +- #interconnect-cells : Should be 1. This cell represents memory client + interconnect. The assignments may be found in header file + . Example: mc: memory-controller@7000f000 { @@ -27,6 +30,7 @@ Example: interrupts = ; #reset-cells = <1>; #iommu-cells = <0>; + #interconnect-cells = <1>; }; video-codec@6001a000 { From patchwork Mon Nov 18 20:02:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251015 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B83F26C1 for ; Tue, 19 Nov 2019 08:04:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0CDC2067D for ; Tue, 19 Nov 2019 08:04:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0CDC2067D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DEA9E6EB9B; Tue, 19 Nov 2019 08:04:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5F7186E81F for ; Mon, 18 Nov 2019 20:05:33 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id b20so14913270lfp.4 for ; Mon, 18 Nov 2019 12:05:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YfRQS8FRsreLwU82cR0lmVr72UzAKLB+Ti08zkiWA2g=; b=VZtQL6VJAWNSNpigny8k1cMDQfC452SZQbqCtiy2DkcGRrDvIbKmTU9SkaQHcaipMk wgaCd7GH0npkbb2cs1Xoy1d4q47sMdcBuo4Hj80zabmQX9U89UD7hGZhIDQor1v8Itr8 kBMpiox2w83TANIS1d979PPfpH7y3Q5vz9yVAxQb4IJPMb4uBuF7GP4nzDi7b0sSc0y7 akq/0ZVTrYc/BmZEWDKwQX34rBC5FdjmdJTGka/F3SiAzUVVhjsLWYlAfIYSZAXBlG1t bm3dMSTkemFQQWQMROV8sqd4EeGzT+DDeFBXCstKUOYD6lVbLZ3074ssVDmaoU227h+Y Pomg== X-Gm-Message-State: APjAAAWlp08X4I8uUJ+ZXFrN8YVD/eQHBxWuXttfO/GvobdJUq3xbJSQ ZZ9JNh/0wx/U+ifzNQH7YY8= X-Google-Smtp-Source: APXvYqw/CNkRKTWQcvTgT1y2MDU/N7d5RKCQec2znR/p7a4NaamXmNcG0FHRmTUehsLlMo7c8uJOvQ== X-Received: by 2002:ac2:5dc1:: with SMTP id x1mr802357lfq.177.1574107531785; Mon, 18 Nov 2019 12:05:31 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:31 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 02/29] dt-bindings: memory: tegra20: emc: Document new interconnect property Date: Mon, 18 Nov 2019 23:02:20 +0300 Message-Id: <20191118200247.3567-3-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YfRQS8FRsreLwU82cR0lmVr72UzAKLB+Ti08zkiWA2g=; b=gzNXLwLzE6umljasXje0Th90a21x+svtaa3a0cHtRBOrZwKf2Fh8ILCS2QMfM1A8je quppks4fV35q39gw/tZySz51c4s6ZKUJ4o6IAq9YO4ENOQwUrIdrEE7o2M/5WQDmJ+fa MARto3dREx4NeuJ1Cq2hnreh7ejZShlBtDAv+S/2aTjh3M8D8FcN+FRvaykTehq8K6I5 c11fAeSiRzbN1JKwfMUJIpk9PqispbeDAnbukjaKsjRIjNvAJZ/BLvF8ygm0cg0tUK+J +u/rNQC3ymN/s+Vt24rsGP2S12B7PUpj+kq5NrJj8nXm/RnNl7i+zV3+0zKHsJu9Cfqy jt3g== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" External memory controller is interconnected with memory controller and with external memory. Document new interconnect property which designates external memory controller as interconnect provider. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra20-emc.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20-emc.txt b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20-emc.txt index add95367640b..7566d883f921 100644 --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20-emc.txt +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20-emc.txt @@ -12,6 +12,9 @@ Properties: irrespective of ram-code configuration. - interrupts : Should contain EMC General interrupt. - clocks : Should contain EMC clock. +- #interconnect-cells : Should be 1. This cell represents external memory + interconnect. The assignments may be found in header file + . Child device nodes describe the memory settings for different configurations and clock rates. @@ -20,6 +23,7 @@ Example: memory-controller@7000f400 { #address-cells = < 1 >; #size-cells = < 0 >; + #interconnect-cells = < 1 >; compatible = "nvidia,tegra20-emc"; reg = <0x7000f4000 0x200>; interrupts = <0 78 0x04>; From patchwork Mon Nov 18 20:02:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251049 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 67EA66C1 for ; Tue, 19 Nov 2019 08:05:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 506FE222F2 for ; Tue, 19 Nov 2019 08:05:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 506FE222F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BF1C6EBCD; Tue, 19 Nov 2019 08:04:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 807BD6E822 for ; Mon, 18 Nov 2019 20:05:34 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id f18so2543067lfj.6 for ; Mon, 18 Nov 2019 12:05:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cN+cTWmw5IKMObEA3Y8HAg9N2AlhbhuoYmAREYZlw/4=; b=MkYLVfSm8rBIJXpLhnQtAbXYPaJ5tPJXUONxyGFdakIGIWfyjhfLtTRFMSEPeLsjm4 lob+hfPFJzM9+XiEgWFXPBjXBG55vJSRSiOGGUC7ER92gvIdkg3lTEqzlf6TnSv+W5j5 4xBLJ2yuZhukJfKFkhjdch+mNxF/Jjp4A7uQy4JzbdkBuSkv2zljjllYfW7EJRi7ku3v mrqODrjN1umSfXAi13/VS78F+XsPb1kxQOABTNAvD/gPS+Up1eFJcVILXGmgrS/djjla sb3MZ0dXwWhGPOpjXxn73In53T8PsAe77g7ktJ07px8ezDYdz67RKUWUmYR1PQoC/AjI 58rg== X-Gm-Message-State: APjAAAW2e+lb26PGH9Ebl45Bg9AQveKKURCiracot4YoTSybKDMa9hj3 PRUlhFzOLgYoz89+lIlmlEU= X-Google-Smtp-Source: APXvYqzB8U5iYQKp+sDOt/38fnNxpmw9MZAc1mV8GBofStkZ8gBPo5XdpUpQbn0VIyJos6GrWdV34A== X-Received: by 2002:a19:8c1c:: with SMTP id o28mr840663lfd.105.1574107533034; Mon, 18 Nov 2019 12:05:33 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:32 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 03/29] dt-bindings: memory: tegra30: mc: Document new interconnect property Date: Mon, 18 Nov 2019 23:02:21 +0300 Message-Id: <20191118200247.3567-4-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cN+cTWmw5IKMObEA3Y8HAg9N2AlhbhuoYmAREYZlw/4=; b=gKpR3deFRHA9H6ebC9kq34DBn0/xxJSWvPVo3+J7x4cjq8pqJK5o6LsjRx7NySw4FD BrOFnOqghNGiDsg2KrHCg+TI3DIIX6GiMeEIEQQ+snUi6B6O0ZOHhtNIrZPBskzLiDPu 7ZxX+VrcMINUEQ9jmxUPjJ/FZP2o3uEfcGIbJO+BqXZB2KsZwxKlXKtu5l7yvCksMCXR jo7P3bhnHMSqE5eVuYsTyBJAC9xDWicmBbnnA31isZWe5MfiLeSdugeXgEf0gE04p62Z au42a/HgriX8s4ini4zGtXm84ircbKlRZD13Ag12spQcku6Qqz5JZVqSWldGS8BuFdtp wTaw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Memory controller is interconnected with memory clients and with the external memory controller. Document new interconnect property which designates memory controller as interconnect provider. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra30-mc.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml index 84fd57bcf0dc..5436e6d420bc 100644 --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml @@ -57,6 +57,9 @@ properties: "#iommu-cells": const: 1 + "#interconnect-cells": + const: 1 + patternProperties: "^emc-timings-[0-9]+$": type: object @@ -120,6 +123,7 @@ required: - clock-names - "#reset-cells" - "#iommu-cells" + - "#interconnect-cells" additionalProperties: false @@ -135,6 +139,7 @@ examples: #iommu-cells = <1>; #reset-cells = <1>; + #interconnect-cells = <1>; emc-timings-1 { nvidia,ram-code = <1>; From patchwork Mon Nov 18 20:02:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251103 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BE176C1 for ; Tue, 19 Nov 2019 08:06:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 749D7222C7 for ; Tue, 19 Nov 2019 08:06:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 749D7222C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CF026EBE2; Tue, 19 Nov 2019 08:06:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C2FF6E822 for ; Mon, 18 Nov 2019 20:05:35 +0000 (UTC) Received: by mail-lf1-x12b.google.com with SMTP id q28so14894425lfa.5 for ; Mon, 18 Nov 2019 12:05:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q8P9xtI8xhHcaTs4uKBwzdrpTHySQaMQUQDsdsZDaTE=; b=FC1XlKrp8lyeJXZVbXK2/72hIfJvtKSOyFYxyyTDxwzD26FgtXH+WMMb4tlqz9cjWS ur78k/bCV17Du5PTGoAQrIXTwlbCBIbVbAtsSM4jpWDBPSdRsOQlDPcpwteK13fNF3QK AZWTWpLpFUDRMmurd2CeTwECcAr2hdrmWTNi8EIBr0ys9kFCRA4iKUSaPRZgp3wrkPmW 2MqThcCCccM2yQutf9z+U7adZXpQyAwSZUF1HbtmURAlW/FTmlcNeoocx7wOAI5AvQFL VjpVIVawhm1OQ/PsBhU31MCRtPeg3iBOFRQOAhue0T5Wbp7iee7wMTy3msyYG89GNJSG dScA== X-Gm-Message-State: APjAAAVWJq+BZ6YswWp6TO1VP97TsAvEJ6SI6K1Gx4FM7ry3pBsSR0OL 2oxU4yAX4nwEZYfhGCH4nQ8= X-Google-Smtp-Source: APXvYqxpciZO+2bTdRPuV7Eo6xCsKKBjE1Eln4PJ66P/qZe/XlNohG1C908ZR44WD7VDsuZFLUeTUg== X-Received: by 2002:a19:9116:: with SMTP id t22mr787720lfd.99.1574107534043; Mon, 18 Nov 2019 12:05:34 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:33 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 04/29] dt-bindings: memory: tegra30: emc: Document new interconnect property Date: Mon, 18 Nov 2019 23:02:22 +0300 Message-Id: <20191118200247.3567-5-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=q8P9xtI8xhHcaTs4uKBwzdrpTHySQaMQUQDsdsZDaTE=; b=iAnNWzo21tlp39Df83u3fzdnEEyFML+6bqMpCRK1IqX3vqUfNv5xFU2xniGb9oSimT 8hZMTFpyg6s68GjgBISjQV1xoj2zXq9TeUTE6py/zyjD4imI+BJCpdJ+yYU1138p/7v7 uXoc3GnMG4P7wh1N8prkjL5VrBo9WgFzQ2LqSvJEUYQSMYUowmeWmOmdZz6qQcxbBMi7 TH/+4p6PigtQjTKriPId/qQdYStB7y+CfWZsjJPgimjK4JsGr9ada9my9JR/c2UZC9U2 2ShHmUmEctqYMHDYGSOV0kP+cn36dj+ub+mEZTFf4wH+/aWJWMJfnEoLo1HBrh3cf/oo LeZg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" External memory controller is interconnected with memory controller and with external memory. Document new interconnect property which designates external memory controller as interconnect provider. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra30-emc.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml index 7fe0ca14e324..ecdffbe691ce 100644 --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml @@ -31,6 +31,9 @@ properties: interrupts: maxItems: 1 + "#interconnect-cells": + const: 1 + nvidia,memory-controller: $ref: /schemas/types.yaml#/definitions/phandle description: @@ -214,6 +217,7 @@ required: - interrupts - clocks - nvidia,memory-controller + - "#interconnect-cells" additionalProperties: false @@ -227,6 +231,8 @@ examples: nvidia,memory-controller = <&mc>; + #interconnect-cells = <1>; + emc-timings-1 { nvidia,ram-code = <1>; From patchwork Mon Nov 18 20:02:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251033 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D015138C for ; Tue, 19 Nov 2019 08:04:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55BD6222EF for ; Tue, 19 Nov 2019 08:04:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55BD6222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DD936EBCA; Tue, 19 Nov 2019 08:04:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 71FFB6E822 for ; Mon, 18 Nov 2019 20:05:36 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id r14so8264414lff.3 for ; Mon, 18 Nov 2019 12:05:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=micXsJQgXBCNNJcKoZJTQ5HIZ0M5FUK3UrWoG3KSyWo=; b=XmFn/L3HReMKFL8VaubsqRkeuSaWGZ/WK83JYmk/yDzJ0+NZsOU6ZiGhe8kkIj7QPs QNJPmBfhRymbIDa+Ti/swFae8bdLyCrnBY/WiFTdnEBeP36k9yNagALiJLd5TmwznJbB zSAiGrrhN2F2Fq4IiFEOuSKGpx3Va3dL+B9KZ09SJpfs5ir2tad0qSGFXytuKmfhuB4r nB7y8yK4EsQmObkp775OQz41fCKgFwOgtsNTSZwiohB2oDd1OawXz2BjeqkSDCKlZMmK QWmQxAKSFRag7Ydylcg2rXTxmm7W6Appilwv6rIjcaZQ2nI9PO/XalcN5yAj6XFEVWgI wREg== X-Gm-Message-State: APjAAAXM6da/4Etb1iSGy+Er+FIbAmRTYg+unHt4R8HYweigSoA2Qs74 6duiROjBSTK1PRnCj2abZ/M= X-Google-Smtp-Source: APXvYqwTb+6t99vmQH3iQttgGiopbKJ92e1WabIoG/JiwFJ61DaC2tawmiw81YDXtJmNSG9zjh6Nnw== X-Received: by 2002:a05:6512:4db:: with SMTP id w27mr895831lfq.4.1574107534975; Mon, 18 Nov 2019 12:05:34 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:34 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 05/29] dt-bindings: memory: tegra124: mc: Document new interconnect property Date: Mon, 18 Nov 2019 23:02:23 +0300 Message-Id: <20191118200247.3567-6-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=micXsJQgXBCNNJcKoZJTQ5HIZ0M5FUK3UrWoG3KSyWo=; b=rrVfi5v2JRE5SJXHPGiSfi6I6jin/l9B/rf4X0kWlViljiZGz+LWP/0ECjy2YGt2Ly H/qRg2521GJkwgtpvApOD5aA7+DBwPWsifAzGVha+jXC143rC5gQLR6jUJ54cWKsePel uv1TjMi/1ZiuGlvwBXSwxK89SV9WxRJoC2qLxlJpL1hpk3wd9mEQKoWOUsxGpeTF8y9p 9bSc8VsKBip5qLTPIkaLaW/w7hnUZEXyxCP+yfEc9oFSgqF1y8cbOxJENorysq10GLcz ck9Y8swJz86xZjgEW5OGTmiSuS4KYRXAYxWg5bcRHsIojz5ciUvmrY1ZlkrrAMMWG+Rz Yu0Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Memory controller is interconnected with memory clients and with the external memory controller. Document new interconnect property which designates memory controller as interconnect provider. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra124-mc.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml index 30d9fb193d7f..b3aa3e6b7006 100644 --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml @@ -40,6 +40,9 @@ properties: "#iommu-cells": const: 1 + "#interconnect-cells": + const: 1 + patternProperties: "^emc-timings-[0-9]+$": type: object @@ -104,6 +107,7 @@ required: - clock-names - "#reset-cells" - "#iommu-cells" + - "#interconnect-cells" additionalProperties: false @@ -119,6 +123,7 @@ examples: #iommu-cells = <1>; #reset-cells = <1>; + #interconnect-cells = <1>; emc-timings-3 { nvidia,ram-code = <3>; From patchwork Mon Nov 18 20:02:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251021 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C285138C for ; Tue, 19 Nov 2019 08:04:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64E542230E for ; Tue, 19 Nov 2019 08:04:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64E542230E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9111A6EBB3; Tue, 19 Nov 2019 08:04:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 86A856E822 for ; Mon, 18 Nov 2019 20:05:37 +0000 (UTC) Received: by mail-lf1-x142.google.com with SMTP id l14so8211658lfh.10 for ; Mon, 18 Nov 2019 12:05:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jCdUNbrdRJjqVla5VJjyVdTCmGe/PoyPIjNb52FlJnk=; b=R+HrQngayYQfiqM7EX6uWvGKXEnu7v1i7zqR1tbR45rzwCsOCTv9d6msi3Nxubw0gE nvQwAnoLIRAZvmkNbihpIHNwPh4fj78riDsGIMzqpLPZ+h7xv354XyuECNtvLx8PHvtC Lk8nE7G0MH+WUKzzYTnU8PLC6W1z55Zj+BRX5ucOLFVpjUp6+Wut2rH7ZgW2oWRgPKSL xzkHheQj8/Km74wt0+lp6cymN7ki3ZGNd9Kae7sqWWVE8MKI/pv7ad/WcFhJ1f2HB4/J Ij0HI+XdEZoutmPFOg09ONV9kCmu+n8J44RSOKVf6PXkkh44UEeCBXCP8ll3CED1jufH mqbg== X-Gm-Message-State: APjAAAVxS9CqFzJ9wwo3eGkUMBIbeKX8kjn56pZkYtnqErUNXFYaeLAy 0dQKZ05C1n2/BujODFu6dRXRtpxS X-Google-Smtp-Source: APXvYqzD+qc9/bHBgWnn6IDSjtu+yoi+QPOguZvwpPZLJh+aN5o5KBjsxeq8NRupazScBaAsGiI2VA== X-Received: by 2002:a19:ee17:: with SMTP id g23mr833981lfb.121.1574107535994; Mon, 18 Nov 2019 12:05:35 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:35 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 06/29] dt-bindings: memory: tegra124: emc: Document new interconnect property Date: Mon, 18 Nov 2019 23:02:24 +0300 Message-Id: <20191118200247.3567-7-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jCdUNbrdRJjqVla5VJjyVdTCmGe/PoyPIjNb52FlJnk=; b=VO9OtD2ST829EMBXrnBhCLymPMvO5eLmi1XuG9Kq0emJTuz3Pp5e0NvrJYc1SUPoka AF1PGZKQfjTbYAZhoFZ50zoB2xacpcdGFEGpgyFNdDphIvJGIK8J56WpsXeLS3CNwp8m IsVhTcLaQi+wgi111Ed/fVQ0xvvkWpqS9s+5RFXCd6UxW50mWzgDkMN7ZiOIxDZtFU3t +C2WWbFXX5BiZZC06BSR0j+xZvzb0oPnhZjHf4RVUdHwzpCQIcWwyti++QR53AW9vSeb GDm6ETNP3AEQjrYFVIAyg0DFnYQ1Ce3axJLg3miALUOElX0Pm08YDk4ZowZiYbXy/wi6 J9ng== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" External memory controller is interconnected with memory controller and with external memory. Document new interconnect property which designates external memory controller as interconnect provider. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra124-emc.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-emc.txt b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-emc.txt index ba0bc3f12419..ff48b46604e6 100644 --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-emc.txt +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-emc.txt @@ -5,6 +5,7 @@ Required properties : - compatible : Should be "nvidia,tegra124-emc". - reg : physical base address and length of the controller's registers. - nvidia,memory-controller : phandle of the MC driver. +- #interconnect-cells : Should be 1. The node should contain a "emc-timings" subnode for each supported RAM type (see field RAM_CODE in register PMC_STRAPPING_OPT_A), with its unit address @@ -195,6 +196,8 @@ Example SoC include file: reg = <0x0 0x7001b000 0x0 0x1000>; nvidia,memory-controller = <&mc>; + + #interconnect-cells = <1>; }; }; From patchwork Mon Nov 18 20:02:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251017 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25E31138C for ; Tue, 19 Nov 2019 08:04:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0EB6E222EF for ; Tue, 19 Nov 2019 08:04:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0EB6E222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 012E76EBB0; Tue, 19 Nov 2019 08:04:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94B466E822 for ; Mon, 18 Nov 2019 20:05:38 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id n21so20393012ljg.12 for ; Mon, 18 Nov 2019 12:05:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bqBrfnW6oyEXwKIsbHDBGjswWgQFyUFjpg74MBWJm98=; b=aQcnSicqEFaZiguDq/SYbAnG+UwU4GYh/j9yHgZGtSCUtk+usAv2TpJIp7o85YOdZK +cBO2k95nT4/fBfi2K6j+kusg20j81uICK3cp983X/0Lxy46GBEF7OQVI598Gve03dpQ +J9ljYApelbyBosJz1vLHD5kYyAFiB9lWZi56ei2av6nuHDrXZL6tYwgyxwUHVOvlMBG B5uNz4B5dOI91+zGZeiOaFSfzgNQccHlP2FqFeOjEFhbo4pscXT2qsTh6DotH4k2sWIn V+6gB3Y+sDHp67tWD5GJ8Q4L+GI4aNjI7HbEtIZalImcBqNRxM2FaGX9IBSK0c3XLZeh 67Sg== X-Gm-Message-State: APjAAAU6aFtIpSaAlQkWvAb5a72QJCQnCNUCbuvRGUwYRjjHKaBfMCuJ 0m1vZ/6Ueu/XkDDCpfLH9aE= X-Google-Smtp-Source: APXvYqzGjnmG736kFSi3pxotXWznYFJa6hehgaqv7npk23af++Lg1tmT5bTj457i7qTnfQhOMfeSlA== X-Received: by 2002:a2e:93d7:: with SMTP id p23mr939424ljh.102.1574107536965; Mon, 18 Nov 2019 12:05:36 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:36 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 07/29] dt-bindings: host1x: Document new interconnect properties Date: Mon, 18 Nov 2019 23:02:25 +0300 Message-Id: <20191118200247.3567-8-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bqBrfnW6oyEXwKIsbHDBGjswWgQFyUFjpg74MBWJm98=; b=Z6Kd/3tqBvD0M7O+PYu7Ii8RlXO0+YawGtX5h9TllVokV9Qzmc+mmaZJjKwaOqN20S vciRZM10CNRGSAjggOApBG/aktZ1egddBzZLK1Cw5zVSHj9sY6wnwyqW5LhTDMgVnPO0 kPyiJ1cDdIflcboywIBKSfX4ePvjrzwa7nG11rEtpQ5D6KgvVtOoEz6VJlcVfVKNeSlI BIb+CyR7SSmV/FgJEm+y6wDNdlASp9ZOb45u3YD6ox8labjdDyVAwSbgp/tDlgQqZbvC bdvpkMWX6vR8WxszZg37yPD/36pBzeVdUMd5TohZlebNd0V9EJJsTU0dYC/4aGI3RELa kAyQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Host1x clients are interconnected with memory controller through Graphics HOST bus, these clients will issue memory bandwidth requests to the memory controller that will adapt arbitration configuration in order to satisfy clients and then propagate the aggregated bandwidth request to external memory controller. The new interconnect properties are optional, thus backwards compatibility is preserved with older device-trees. Signed-off-by: Dmitry Osipenko --- .../display/tegra/nvidia,tegra20-host1x.txt | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt index 9999255ac5b6..2a1fc1a194d2 100644 --- a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt +++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt @@ -20,6 +20,11 @@ Required properties: - reset-names: Must include the following entries: - host1x +Each host1x client module having to perform DMA through the Memory Controller +should have the interconnect endpoints set to the Memory Client and External +Memory respectively, interconnect name must be set to "dma-mem". +The interconnect property is optional. + The host1x top-level node defines a number of children, each representing one of the following host1x client modules: @@ -36,6 +41,11 @@ of the following host1x client modules: - reset-names: Must include the following entries: - mpe + Optional properties: + - interconnects: Must contain entry for the memory interconnect. + - interconnect-names: Must include the following entries: + - dma-mem + - vi: video input Required properties: @@ -49,6 +59,11 @@ of the following host1x client modules: - reset-names: Must include the following entries: - vi + Optional properties: + - interconnects: Must contain entry for the memory interconnect. + - interconnect-names: Must include the following entries: + - dma-mem + - epp: encoder pre-processor Required properties: @@ -62,6 +77,11 @@ of the following host1x client modules: - reset-names: Must include the following entries: - epp + Optional properties: + - interconnects: Must contain entry for the memory interconnect. + - interconnect-names: Must include the following entries: + - dma-mem + - isp: image signal processor Required properties: @@ -75,6 +95,11 @@ of the following host1x client modules: - reset-names: Must include the following entries: - isp + Optional properties: + - interconnects: Must contain entry for the memory interconnect. + - interconnect-names: Must include the following entries: + - dma-mem + - gr2d: 2D graphics engine Required properties: @@ -88,6 +113,11 @@ of the following host1x client modules: - reset-names: Must include the following entries: - 2d + Optional properties: + - interconnects: Must contain entry for the memory interconnect. + - interconnect-names: Must include the following entries: + - dma-mem + - gr3d: 3D graphics engine Required properties: @@ -106,6 +136,11 @@ of the following host1x client modules: - 3d - 3d2 (Only required on SoCs with two 3D clocks) + Optional properties: + - interconnects: Must contain entry for the memory interconnect. + - interconnect-names: Must include the following entries: + - dma-mem + - dc: display controller Required properties: @@ -133,6 +168,9 @@ of the following host1x client modules: - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection - nvidia,edid: supplies a binary EDID blob - nvidia,panel: phandle of a display panel + - interconnects: Must contain entry for the memory interconnect. + - interconnect-names: Must include the following entries: + - dma-mem - hdmi: High Definition Multimedia Interface @@ -281,6 +319,11 @@ of the following host1x client modules: - reset-names: Must include the following entries: - vic + Optional properties: + - interconnects: Must contain entry for the memory interconnect. + - interconnect-names: Must include the following entries: + - dma-mem + Example: / { @@ -307,6 +350,9 @@ Example: clocks = <&tegra_car TEGRA20_CLK_MPE>; resets = <&tegra_car 60>; reset-names = "mpe"; + + interconnects = <&mc TEGRA_ICC_MC_MPE &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; }; vi { @@ -316,6 +362,9 @@ Example: clocks = <&tegra_car TEGRA20_CLK_VI>; resets = <&tegra_car 100>; reset-names = "vi"; + + interconnects = <&mc TEGRA_ICC_MC_VI &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; }; epp { @@ -325,6 +374,9 @@ Example: clocks = <&tegra_car TEGRA20_CLK_EPP>; resets = <&tegra_car 19>; reset-names = "epp"; + + interconnects = <&mc TEGRA_ICC_MC_EPP &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; }; isp { @@ -334,6 +386,9 @@ Example: clocks = <&tegra_car TEGRA20_CLK_ISP>; resets = <&tegra_car 23>; reset-names = "isp"; + + interconnects = <&mc TEGRA_ICC_MC_ISP &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; }; gr2d { @@ -343,6 +398,9 @@ Example: clocks = <&tegra_car TEGRA20_CLK_GR2D>; resets = <&tegra_car 21>; reset-names = "2d"; + + interconnects = <&mc TEGRA_ICC_MC_2D &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; }; gr3d { @@ -351,6 +409,9 @@ Example: clocks = <&tegra_car TEGRA20_CLK_GR3D>; resets = <&tegra_car 24>; reset-names = "3d"; + + interconnects = <&mc TEGRA_ICC_MC_3D &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; }; dc@54200000 { @@ -363,6 +424,9 @@ Example: resets = <&tegra_car 27>; reset-names = "dc"; + interconnects = <&mc TEGRA_ICC_MC_DC &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; + rgb { status = "disabled"; }; @@ -378,6 +442,9 @@ Example: resets = <&tegra_car 26>; reset-names = "dc"; + interconnects = <&mc TEGRA_ICC_MC_DCB &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; + rgb { status = "disabled"; }; From patchwork Mon Nov 18 20:02:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251027 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CBDCA138C for ; Tue, 19 Nov 2019 08:04:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4E1F222EF for ; Tue, 19 Nov 2019 08:04:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4E1F222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E51A16EBBB; Tue, 19 Nov 2019 08:04:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id B86086E822 for ; Mon, 18 Nov 2019 20:05:39 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id l28so5405524lfj.1 for ; Mon, 18 Nov 2019 12:05:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5bfGeYRpAIb7Vt687NPjP6ZPCPNVBieu/nr7ieOj26E=; b=rMckrUAGyJxvXlBKLc7eSmtnN2SGLGlHyqHjbcWx7+nW6cHI1l+iMHUS5iW3eUOxOU oLv1/6c3pKFSvFegJiYYwX13fYQD/+Cl5anXIghqYlvQZrRnUDUD20edlqygZKLTaKJ0 Pe2cTZW4CxvQqnQPY2BIGyIFvFvXCYJX8PZ4dLlgIguLAkcQlYOYYce/ZNZ3aR+XRz9S vr+BEHycdJWOQkN1A80QApVV01DNATYQVPAYsM3LlKH63eIuLPK0bIgEzorsLFMg3JI5 0RR1QDHvgn6TPiOe4GlxtwmgwzehR6jLQYCapiWQZnMs+/TiiSBjddMKpYUqg1U3pHaq Bdwg== X-Gm-Message-State: APjAAAXYO6Ovcm9RMO/LUHkaWh/zUfd+wxIUC1TY5M7P4qOv2G2KF2Lq 94CbXyuKwBO7cAByVDHRVTA= X-Google-Smtp-Source: APXvYqxjGaEE1J26V9CzM6qhm1dzop3yORXmRLeUpQt2ugEUp+YI3ahrkxWJNyTQEP+dhbY4FYaHzQ== X-Received: by 2002:a19:c606:: with SMTP id w6mr829239lff.71.1574107538243; Mon, 18 Nov 2019 12:05:38 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:37 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 08/29] dt-bindings: interconnect: tegra: Add initial IDs Date: Mon, 18 Nov 2019 23:02:26 +0300 Message-Id: <20191118200247.3567-9-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5bfGeYRpAIb7Vt687NPjP6ZPCPNVBieu/nr7ieOj26E=; b=uen7qFUTySXP1efIkJ1D1dayy9+YWpPkb6RejWcxCsVjJwfODMnFF3axpHp9uot8qO kWX/wEinZELq8SCJcMTgCqMtRtXigRVG+J/cDynQ+ErfPgeU5fuuNYrHkHWEhbrX77WQ ZGzCZIsIMaacx4h9WciGXJeoPVUWsFIMy2IO4fdpvTwvoOadwyfC/SMxbf5J7aJxlMN5 bi7RSFO3Uw+26DUb+3iP6JytiDkjquLOsssWxAFAh0ZafK1r/Ux/cxItKjTGFbZi+RI8 h1KUrGBCsWCI1s3KhBCaINQaq7kWBRiBim5QTgiS5dopMYBLadoZPnXtfzx95ycYcfM9 TEew== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Define interconnect IDs for memory controller (MC), external memory controller (EMC), external memory (EMEM) and memory clients of display controllers (DC). Signed-off-by: Dmitry Osipenko --- include/dt-bindings/interconnect/tegra-icc.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 include/dt-bindings/interconnect/tegra-icc.h diff --git a/include/dt-bindings/interconnect/tegra-icc.h b/include/dt-bindings/interconnect/tegra-icc.h new file mode 100644 index 000000000000..e6b6a819434a --- /dev/null +++ b/include/dt-bindings/interconnect/tegra-icc.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef DT_BINDINGS_ICC_TEGRA_H +#define DT_BINDINGS_ICC_TEGRA_H + +#define TEGRA_ICC_EMC 0 +#define TEGRA_ICC_EMEM 1 +#define TEGRA_ICC_MC 2 +#define TEGRA_ICC_MC_DC 3 +#define TEGRA_ICC_MC_DCB 4 + +#endif From patchwork Mon Nov 18 20:02:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251113 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7DFA7138C for ; Tue, 19 Nov 2019 08:07:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6663D222C7 for ; Tue, 19 Nov 2019 08:07:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6663D222C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BEA036EC24; Tue, 19 Nov 2019 08:06:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E7F46E822 for ; Mon, 18 Nov 2019 20:05:41 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id p18so20455549ljc.6 for ; Mon, 18 Nov 2019 12:05:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2iFp0McD4dqk5YgWCVTRp0Ssb3SKcWOgq/D9CcGeKIY=; b=NROXPvKyj1bm4WIrEtwRhg9/vwKFz2r3ITcQhV4+2FM62ztUXI1NYbA6XRDTwrNgL7 N/XG7H+RRysifRwfq9uwy6wv/h2+yIQUM0ru41Wads0aaWzUvfAS5K76jF5rjhf0CMAN wQofcKuHtoiWL58Eyi+kRDQZf1rmcXzRs8FlSSBueGfhMn3Jto9K5XN7sfWMwzVuT1lf OwcLCdjFs1zLETEVm2QrEMpbxe8NOIyoPUPUolZwWOhECjdJJf58Ku+c0zPBv87f/nmu ahXuZ9ukSEe9VOYMeP8mSdK/gkdP2T4y5Rw8q8vPWfCuReUhxItn60CI/WCP/tSbQRfL KTEw== X-Gm-Message-State: APjAAAVyzO3TOfTpl90FMmrC9b+Sfquisfga5lFumFRvVJm7Amjj3bNz lL8E9EM8Dl7zt0rMwmJ7LdQ= X-Google-Smtp-Source: APXvYqyhq0nkF8z5M/s9tUqCARtFUhFB8Jl3ISigj1qsNidZbs53NZUOJaj7p6egJlDCTN7SQFdzIg== X-Received: by 2002:a2e:898a:: with SMTP id c10mr871793lji.177.1574107539717; Mon, 18 Nov 2019 12:05:39 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:39 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 09/29] ARM: tegra: Add interconnect properties to Tegra20 device-tree Date: Mon, 18 Nov 2019 23:02:27 +0300 Message-Id: <20191118200247.3567-10-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2iFp0McD4dqk5YgWCVTRp0Ssb3SKcWOgq/D9CcGeKIY=; b=tL04NoA4xOq6oRXud1L8c1zw/ONwWYxS2KnE9NjB4O9oWkqqhu46L6KBAoQl4OrZq3 6AMZduD/v9J09W7TGRLhqhlOVPba5f7a8+KnPxC8dtEfDv2BIskgdiTm5BPpm0UAlW++ jbM8TgYS2IbvZxOOEGmAgnkodqL8CX4B/AuVKNoDS+ka+kgnWWs+L0FK7+VW9Ts+wx4+ T50tuH2lMPcupJm7qH87zRPw3QsFKNgKsE1vYQZtO9TJQu6nMXxo/A0Zep4V7ShQWsYP C0rNeMgsuDEQj4LHrt7T4c0k+wUYIsPoRXtKM+aAnkefU9tcyBfzSD75D6m5HDcByYe4 Gp/Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add interconnect properties to the memory controller, external memory controller and the display controller nodes to describe interconnection of these nodes. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra20.dtsi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 9c58e7fcf5c0..2aa10a34516b 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi @@ -3,6 +3,7 @@ #include #include #include +#include #include / { @@ -108,6 +109,9 @@ nvidia,head = <0>; + interconnects = <&mc TEGRA_ICC_MC_DC &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; + rgb { status = "disabled"; }; @@ -125,6 +129,9 @@ nvidia,head = <1>; + interconnects = <&mc TEGRA_ICC_MC_DCB &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; + rgb { status = "disabled"; }; @@ -624,15 +631,17 @@ interrupts = ; #reset-cells = <1>; #iommu-cells = <0>; + #interconnect-cells = <1>; }; - memory-controller@7000f400 { + emc: memory-controller@7000f400 { compatible = "nvidia,tegra20-emc"; reg = <0x7000f400 0x200>; interrupts = ; clocks = <&tegra_car TEGRA20_CLK_EMC>; #address-cells = <1>; #size-cells = <0>; + #interconnect-cells = <1>; }; fuse@7000f800 { From patchwork Mon Nov 18 20:02:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251031 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37EFB138C for ; Tue, 19 Nov 2019 08:04:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20760222EF for ; Tue, 19 Nov 2019 08:04:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20760222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D69A6EB8B; Tue, 19 Nov 2019 08:04:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 32A186E822 for ; Mon, 18 Nov 2019 20:05:42 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id m4so15494155ljj.8 for ; Mon, 18 Nov 2019 12:05:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3B7+0SNFIwKYfZnWg59M6CobeLtFL0LQksvAiCdlsLo=; b=i0eFnCI+ShVLa+AOn4rpufaids1QTnDSa+HY0cBRVenPkIaXTUVpF01s8+cuAWEoCQ qxBWtRAV6RopqxwOFgwj8dkoW9POIZo7fFGXWIvnqhO6GJquCP5E8BT9VgErEKD9WfDP qZU6IDc9UrwS4xuuPL9mK1msS2Wd5NGA9w1baMacJFhh7RKe+lxV3C9gqjGSxNjkDlSb NfCsrIrbVQ4+pVm4nMjoGQUoTZlfotY6onPWGiGYFx8Nc2UgQoVdjOhL5CCmAK4E0DJG q8adTVMA4+U/bxdwlcOafX9Ag/vUnGKcszu5W9/oPlNLaTmf05lfgLHBtf9lawM2zTer sUWw== X-Gm-Message-State: APjAAAWFFYZ65cts/2+/qyn3QCKnJBc2iTb747tz6glwyDa9IUI2Chzw JVWNdjP55sx2muLyrQe3vo4= X-Google-Smtp-Source: APXvYqw4Kk/DTPpOdb5NICSC77dWA+HpTh1Lw/70XFfbsOeRC7m2vVYJpp6tyFd+HjiY4uZyb2RFPQ== X-Received: by 2002:a2e:921a:: with SMTP id k26mr944738ljg.238.1574107540692; Mon, 18 Nov 2019 12:05:40 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:40 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 10/29] ARM: tegra: Add interconnect properties to Tegra30 device-tree Date: Mon, 18 Nov 2019 23:02:28 +0300 Message-Id: <20191118200247.3567-11-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3B7+0SNFIwKYfZnWg59M6CobeLtFL0LQksvAiCdlsLo=; b=GvfAMBwjwdcJwcfQkg3EYPixn7Fn9xRg5dcSxz41GPIA2pK3Lsv7ue0FOHHWASXzbR c8HdPA2WivTVy97ItI39CUEvrHkYTM2BFLLyihqmmzzYjmW7+8PNBFZpf8e5YJ33+QNj pg84s/xcDSukyKnuAui1kYlt6oAvk8L2dRImj4FI1leqMK91gJSnKs3urCrms5d6GrbD OnBPvMLZP8Hk5f50CVL3KPjPFnsEv+sL9Qc8Dr28XcoHvwEZFlclJr34gcg+fX2PoDCY /caJfWEf3TlFkSFovaSf7dqk9AZkEPVI4yVSiTdaCJxtGhJDZv2Fk6rWTCV8AAUkPLif a1ag== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add interconnect properties to the memory controller, external memory controller and the display controller nodes to describe interconnection of these nodes. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra30.dtsi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index 55ae050042ce..69a239f1a823 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi @@ -3,6 +3,7 @@ #include #include #include +#include #include / { @@ -207,6 +208,9 @@ nvidia,head = <0>; + interconnects = <&mc TEGRA_ICC_MC_DC &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; + rgb { status = "disabled"; }; @@ -226,6 +230,9 @@ nvidia,head = <1>; + interconnects = <&mc TEGRA_ICC_MC_DCB &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; + rgb { status = "disabled"; }; @@ -731,15 +738,18 @@ #iommu-cells = <1>; #reset-cells = <1>; + #interconnect-cells = <1>; }; - memory-controller@7000f400 { + emc: memory-controller@7000f400 { compatible = "nvidia,tegra30-emc"; reg = <0x7000f400 0x400>; interrupts = ; clocks = <&tegra_car TEGRA30_CLK_EMC>; nvidia,memory-controller = <&mc>; + + #interconnect-cells = <1>; }; fuse@7000f800 { From patchwork Mon Nov 18 20:02:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251107 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E229138C for ; Tue, 19 Nov 2019 08:07:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 66664222C7 for ; Tue, 19 Nov 2019 08:07:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66664222C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5F6F6EBFD; Tue, 19 Nov 2019 08:06:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 43B026E81F for ; Mon, 18 Nov 2019 20:05:43 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id q28so953978lfp.2 for ; Mon, 18 Nov 2019 12:05:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PMxRk5+wnUUg0iU/ONgQRtpatlCjk39x02NkmMcM4Ic=; b=aft+xKkgHHX+kQgvvCjsOYlVB4rnqnTL05jCKBd0uywfTwpzvVjCLtoQ1ZTLoKUYqD 3BrP7GFpdMSSYinJKNg9egSu1y0unYSmHORS9SJfjeWEqd0Y6AH0tVrA50aLmqY6Eb2f NQyEgEfnzIVqMTan3duO68dCNaYFVilo58hcZ2VuZbMFt4YUGRUuVtlyDV5dXlZ0KncE 90Jp3sikmeJ2D1VoRmYOIjB4vn6Dw4TiUaVzbryBwnKYyaKjI3dX/zOroG6AzaOYXg4F 4u7oHWi0G63QzU6Tkw76su10N6cmn6AUYWwZx9qyqTXDxpw1Gti1ThOb7D22kruHzpSA v4eQ== X-Gm-Message-State: APjAAAWWxIMkcXvJKHIjm6jcjrv+BkcmvpiH/9ufsjHftbAdBzFCqUNg OkCzlAraC7OmqWrDCuPA7As= X-Google-Smtp-Source: APXvYqxI6wtsMLrnPYDhgtHFQ96AQeDXAE5xVarMIEaB4V3z7umv4UaozwQFe4A1nX3jMF6rUUD+hg== X-Received: by 2002:ac2:5305:: with SMTP id c5mr836180lfh.55.1574107541746; Mon, 18 Nov 2019 12:05:41 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:41 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 11/29] ARM: tegra: Add interconnect properties to Tegra124 device-tree Date: Mon, 18 Nov 2019 23:02:29 +0300 Message-Id: <20191118200247.3567-12-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PMxRk5+wnUUg0iU/ONgQRtpatlCjk39x02NkmMcM4Ic=; b=nRsVcOLkGpoI+usSPfWzjgGrZRyGz9Uw6yP5tIZ3+LTQWwYscK1o8N0cIZ4QkjUxpe zXSliUsXnlexkVtiS8WWBVBtlsqa4Eo3q0CdEipr5fPHJnUx92Fms2aQ4yJboTCaU8NR g7nf3baq7mFKbPAx+g+zAYL4QaQizn02Fg/63P59KCM8+BhAW+WVI9HWUWKXk5qoJTPe cWn9XoH2aF3TFjzlWKpJT7ZDxG1Pyl+aR7z7KBHGvlgIiqMo1G1MKfdNtEpnU2A/XWPg /kp9ymh20a8EKwQtzJawJ7gSCRswOkBxRnwtS8N3K1LJctrePj4FHXv8V6rxPK84R4np /b1w== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add interconnect properties to the memory controller, external memory controller and the display controller nodes to describe interconnection of these nodes. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra124.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi index 413bfb981de8..5069af3011cc 100644 --- a/arch/arm/boot/dts/tegra124.dtsi +++ b/arch/arm/boot/dts/tegra124.dtsi @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -111,6 +112,9 @@ iommus = <&mc TEGRA_SWGROUP_DC>; nvidia,head = <0>; + + interconnects = <&mc TEGRA_ICC_MC_DC &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; }; dc@54240000 { @@ -126,6 +130,9 @@ iommus = <&mc TEGRA_SWGROUP_DCB>; nvidia,head = <1>; + + interconnects = <&mc TEGRA_ICC_MC_DCB &emc TEGRA_ICC_EMEM>; + interconnect-names = "dma-mem"; }; hdmi: hdmi@54280000 { @@ -620,6 +627,7 @@ interrupts = ; #iommu-cells = <1>; + #interconnect-cells = <1>; }; emc: emc@7001b000 { @@ -627,6 +635,8 @@ reg = <0x0 0x7001b000 0x0 0x1000>; nvidia,memory-controller = <&mc>; + + #interconnect-cells = <1>; }; sata@70020000 { From patchwork Mon Nov 18 20:02:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251051 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A09E4138C for ; Tue, 19 Nov 2019 08:05:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89239222EF for ; Tue, 19 Nov 2019 08:05:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89239222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A1306EBBA; Tue, 19 Nov 2019 08:04:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9220F6E82A for ; Mon, 18 Nov 2019 20:05:44 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id d5so20442935ljl.4 for ; Mon, 18 Nov 2019 12:05:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wKn468nr2i6h8sTr6Rg9z7srsP/1nTrJr4onSkFRhrM=; b=j99rQvUPTJHIyXBrM45xtzFQVnaoSsQuNXk5aB9sT/bgJhJ500l24FD4fgW6nHp19p jOQQuqptFy6wLcSkIYL0RLkeMn4A1muoxVfEBUkX8bDhm0yCFGfymr29Vzyl0PB45DcJ DkeemPvtVi00iF8js0I8tGFPr0DzevUFKy0tru/9kIWB+LktrFQcuZ/hOEyCw0j7+icE T+N2MxUqFcGLjjnuO4Lul22BieYkKM+kjKfyHEUhbHFcL9sCaYKMVzPN6Byls2MbQxdR BOMQz3H2dGmP3yIj5dZ5h4HV2RCpd7WdXz5YSipwdpU79c5+0uIoWs8DK0+74snoX8Do qJZw== X-Gm-Message-State: APjAAAXeu0LqGcnNxBAz5TqInSWn8cX3bAjq2gIuUpxfJQJ31lNZpLGu Co99rhvIzahCPsgMTEJ0DLk= X-Google-Smtp-Source: APXvYqx0QO3LCy1M9cMqDrlT+1ew03n5115y0K6a1DhFS61aLBr5yTQ3ed/bTYOiow3sG8icwiTP0g== X-Received: by 2002:a2e:5451:: with SMTP id y17mr915326ljd.98.1574107542862; Mon, 18 Nov 2019 12:05:42 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:42 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 12/29] interconnect: Add memory interconnection providers for NVIDIA Tegra SoCs Date: Mon, 18 Nov 2019 23:02:30 +0300 Message-Id: <20191118200247.3567-13-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wKn468nr2i6h8sTr6Rg9z7srsP/1nTrJr4onSkFRhrM=; b=kS9P13J1QW1JVGirOuxzkZSSrTkvRd5gz+pkBjDezAm+TFqLpj76qjEcs+6hWwQsIc C3d3bq88qiGwpN8gW+c86t9UQweQ8KDB1DI3rj624TGhs5pY11X8EdeqJYpTPplAEg4c g848E01m3vPV2dSRqN/GLIAUvjEKL3+nNCUjPTNhslpoRweJiCOXUgClzhb7oVtN6e2j 6m8ft1GrH8i60pJ0z4G5WlvRexuobXMHT+SZZCsHB8ow9gysf6iLORM094qTBqkBHfez zQ3XvoM1lEnVktiz+dv2ruNKF3Y22i1QeHlBf8nu0qVxoq0ztFASzDrTZ7KzGdKH2QYz +V1A== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" All NVIDIA Tegra SoCs have identical topology in regards to memory interconnection between memory clients and memory controllers. The memory controller (MC) and external memory controller (EMC) are providing memory clients with required memory bandwidth. The memory controller performs arbitration between memory clients, while the external memory controller transfers data from/to DRAM and pipes that data from/to memory controller. Memory controller interconnect provider aggregates bandwidth requests from memory clients and sends the aggregated request to EMC provider that scales DRAM frequency in order to satisfy the bandwidth requirement. Memory controller provider could adjust hardware configuration for a more optimal arbitration depending on bandwidth requirements from memory clients, but this is unimplemented for now. Signed-off-by: Dmitry Osipenko --- drivers/interconnect/Kconfig | 1 + drivers/interconnect/Makefile | 1 + drivers/interconnect/tegra/Kconfig | 6 + drivers/interconnect/tegra/Makefile | 4 + drivers/interconnect/tegra/tegra-icc-emc.c | 138 +++++++++++++++++++++ drivers/interconnect/tegra/tegra-icc-mc.c | 130 +++++++++++++++++++ include/soc/tegra/mc.h | 26 ++++ 7 files changed, 306 insertions(+) create mode 100644 drivers/interconnect/tegra/Kconfig create mode 100644 drivers/interconnect/tegra/Makefile create mode 100644 drivers/interconnect/tegra/tegra-icc-emc.c create mode 100644 drivers/interconnect/tegra/tegra-icc-mc.c diff --git a/drivers/interconnect/Kconfig b/drivers/interconnect/Kconfig index bfa4ca3ab7a9..b11ca09665bb 100644 --- a/drivers/interconnect/Kconfig +++ b/drivers/interconnect/Kconfig @@ -12,5 +12,6 @@ menuconfig INTERCONNECT if INTERCONNECT source "drivers/interconnect/qcom/Kconfig" +source "drivers/interconnect/tegra/Kconfig" endif diff --git a/drivers/interconnect/Makefile b/drivers/interconnect/Makefile index 28f2ab0824d5..a37d419e262c 100644 --- a/drivers/interconnect/Makefile +++ b/drivers/interconnect/Makefile @@ -4,3 +4,4 @@ icc-core-objs := core.o obj-$(CONFIG_INTERCONNECT) += icc-core.o obj-$(CONFIG_INTERCONNECT_QCOM) += qcom/ +obj-$(CONFIG_INTERCONNECT_TEGRA) += tegra/ diff --git a/drivers/interconnect/tegra/Kconfig b/drivers/interconnect/tegra/Kconfig new file mode 100644 index 000000000000..b724781da71e --- /dev/null +++ b/drivers/interconnect/tegra/Kconfig @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +config INTERCONNECT_TEGRA + bool "NVIDIA Tegra interconnect drivers" + depends on ARCH_TEGRA || COMPILE_TEST + help + Say Y here to enable support for NVIDIA Tegra interconnect drivers. diff --git a/drivers/interconnect/tegra/Makefile b/drivers/interconnect/tegra/Makefile new file mode 100644 index 000000000000..74ff2e53dbdc --- /dev/null +++ b/drivers/interconnect/tegra/Makefile @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_INTERCONNECT_TEGRA) += tegra-icc-mc.o +obj-$(CONFIG_INTERCONNECT_TEGRA) += tegra-icc-emc.o diff --git a/drivers/interconnect/tegra/tegra-icc-emc.c b/drivers/interconnect/tegra/tegra-icc-emc.c new file mode 100644 index 000000000000..b594ce811153 --- /dev/null +++ b/drivers/interconnect/tegra/tegra-icc-emc.c @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Author: Dmitry Osipenko + * Copyright (C) 2019 GRATE-DRIVER project + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include + +struct tegra_emc_provider { + struct icc_provider provider; + struct clk *clk; + unsigned int dram_data_bus_width_bytes; +}; + +static inline struct tegra_emc_provider * +to_tegra_emc_provider(struct icc_provider *provider) +{ + return container_of(provider, struct tegra_emc_provider, provider); +} + +static struct icc_node * +tegra_emc_of_icc_xlate_onecell(struct of_phandle_args *spec, void *data) +{ + struct icc_provider *provider = data; + struct icc_node *node; + + list_for_each_entry(node, &provider->nodes, node_list) { + if (node->id == spec->args[0]) + return node; + } + + return ERR_PTR(-EINVAL); +} + +static int tegra_emc_icc_set(struct icc_node *src, struct icc_node *dst) +{ + struct tegra_emc_provider *emc = to_tegra_emc_provider(dst->provider); + unsigned long long rate = icc_units_to_bps(dst->avg_bw); + unsigned int ddr = 2; + int err; + + do_div(rate, ddr * emc->dram_data_bus_width_bytes); + rate = min_t(u64, rate, U32_MAX); + + err = clk_set_min_rate(emc->clk, rate); + if (err) + return err; + + err = clk_set_rate(emc->clk, rate); + if (err) + return err; + + return 0; +} + +static int tegra_emc_icc_aggregate(struct icc_node *node, + u32 tag, u32 avg_bw, u32 peak_bw, + u32 *agg_avg, u32 *agg_peak) +{ + *agg_avg = min((u64)avg_bw + (*agg_avg), (u64)U32_MAX); + *agg_peak = max(*agg_peak, peak_bw); + + return 0; +} + +int tegra_icc_emc_setup_interconnect(struct device *emc_dev, + unsigned int dram_data_bus_width_bytes) +{ + struct tegra_emc_provider *emc; + struct icc_node *node, *tmp; + int err; + + emc = devm_kzalloc(emc_dev, sizeof(*emc), GFP_KERNEL); + if (!emc) + return -ENOMEM; + + emc->clk = devm_clk_get(emc_dev, "emc"); + err = PTR_ERR_OR_ZERO(emc->clk); + if (err) + return err; + + emc->dram_data_bus_width_bytes = dram_data_bus_width_bytes; + + emc->provider.dev = emc_dev; + emc->provider.set = tegra_emc_icc_set; + emc->provider.data = &emc->provider; + emc->provider.xlate = tegra_emc_of_icc_xlate_onecell; + emc->provider.aggregate = tegra_emc_icc_aggregate; + + err = icc_provider_add(&emc->provider); + if (err) + return err; + + /* create External Memory Controller node */ + node = icc_node_create(TEGRA_ICC_EMC); + err = PTR_ERR_OR_ZERO(node); + if (err) + goto del_provider; + + node->name = "EMC"; + icc_node_add(node, &emc->provider); + + /* link External Memory Controller with External Memory */ + err = icc_link_create(node, TEGRA_ICC_EMEM); + if (err) + goto destroy_nodes; + + /* create External Memory node */ + node = icc_node_create(TEGRA_ICC_EMEM); + err = PTR_ERR_OR_ZERO(node); + if (err) + goto destroy_nodes; + + node->name = "EMEM"; + icc_node_add(node, &emc->provider); + + return 0; + +destroy_nodes: + list_for_each_entry_safe(node, tmp, &emc->provider.nodes, node_list) { + icc_node_del(node); + icc_node_destroy(node->id); + } + +del_provider: + icc_provider_del(&emc->provider); + + return err; +} diff --git a/drivers/interconnect/tegra/tegra-icc-mc.c b/drivers/interconnect/tegra/tegra-icc-mc.c new file mode 100644 index 000000000000..f1ff8f98def3 --- /dev/null +++ b/drivers/interconnect/tegra/tegra-icc-mc.c @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Author: Dmitry Osipenko + * Copyright (C) 2019 GRATE-DRIVER project + */ + +#include + +#include +#include +#include +#include + +#include + +static struct icc_node * +tegra_mc_of_icc_xlate_onecell(struct of_phandle_args *spec, void *data) +{ + struct icc_provider *provider = data; + struct icc_node *node; + + list_for_each_entry(node, &provider->nodes, node_list) { + if (node->id == spec->args[0]) + return node; + } + + return ERR_PTR(-EINVAL); +} + +static int tegra_mc_icc_set(struct icc_node *src, struct icc_node *dst) +{ + return 0; +} + +static int tegra_mc_icc_aggregate(struct icc_node *node, + u32 tag, u32 avg_bw, u32 peak_bw, + u32 *agg_avg, u32 *agg_peak) +{ + *agg_avg = min((u64)avg_bw + (*agg_avg), (u64)U32_MAX); + *agg_peak = max(*agg_peak, peak_bw); + + return 0; +} + +/* + * Memory Controller (MC) has few Memory Clients that are issuing memory + * bandwidth allocation requests to the MC interconnect provider. The MC + * provider aggregates the requests and then sends the aggregated request + * up to the External Memory Controller (EMC) interconnect provider which + * re-configures hardware interface to External Memory (EMEM) in accordance + * to the required bandwidth. + * + * Memory interconnect topology: + * + * +----+ + * +-----+ | | + * | GPU +---->+ | + * +-----+ | | + * | | +-----+ +------+ + * ... | MC +---->+ EMC +---->+ EMEM | + * | | +-----+ +------+ + * +------+ | | + * | DISP +---->+ | + * +------+ | | + * +----+ + */ +int tegra_icc_mc_setup_interconnect(struct tegra_mc *mc) +{ + struct icc_provider *provider; + struct icc_node *node, *tmp; + unsigned int i; + int err; + + provider = devm_kzalloc(mc->dev, sizeof(*provider), GFP_KERNEL); + if (!provider) + return -ENOMEM; + + provider->dev = mc->dev; + provider->set = tegra_mc_icc_set; + provider->data = provider; + provider->xlate = tegra_mc_of_icc_xlate_onecell; + provider->aggregate = tegra_mc_icc_aggregate; + + err = icc_provider_add(provider); + if (err) + return err; + + /* create Memory Controller node */ + node = icc_node_create(TEGRA_ICC_MC); + err = PTR_ERR_OR_ZERO(node); + if (err) + goto del_provider; + + node->name = "MC"; + icc_node_add(node, provider); + + /* link Memory Controller with External Memory Controller */ + err = icc_link_create(node, TEGRA_ICC_EMC); + if (err) + goto destroy_nodes; + + for (i = 0; i < mc->soc->num_icc_nodes; i++) { + /* create MC client node */ + node = icc_node_create(mc->soc->icc_nodes[i].id); + err = PTR_ERR_OR_ZERO(node); + if (err) + goto destroy_nodes; + + node->name = mc->soc->icc_nodes[i].name; + icc_node_add(node, provider); + + /* link Memory Client with Memory Controller */ + err = icc_link_create(node, TEGRA_ICC_MC); + if (err) + goto destroy_nodes; + } + + return 0; + +destroy_nodes: + list_for_each_entry_safe(node, tmp, &provider->nodes, node_list) { + icc_node_del(node); + icc_node_destroy(node->id); + } + +del_provider: + icc_provider_del(provider); + + return err; +} diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h index 1238e35653d1..593954324259 100644 --- a/include/soc/tegra/mc.h +++ b/include/soc/tegra/mc.h @@ -141,6 +141,11 @@ struct tegra_mc_reset_ops { const struct tegra_mc_reset *rst); }; +struct tegra_mc_icc_node { + const char *name; + unsigned int id; +}; + struct tegra_mc_soc { const struct tegra_mc_client *clients; unsigned int num_clients; @@ -160,6 +165,9 @@ struct tegra_mc_soc { const struct tegra_mc_reset_ops *reset_ops; const struct tegra_mc_reset *resets; unsigned int num_resets; + + const struct tegra_mc_icc_node *icc_nodes; + unsigned int num_icc_nodes; }; struct tegra_mc { @@ -184,4 +192,22 @@ struct tegra_mc { int tegra_mc_write_emem_configuration(struct tegra_mc *mc, unsigned long rate); unsigned int tegra_mc_get_emem_device_count(struct tegra_mc *mc); +#ifdef CONFIG_INTERCONNECT_TEGRA +int tegra_icc_mc_setup_interconnect(struct tegra_mc *mc); +int tegra_icc_emc_setup_interconnect(struct device *emc_dev, + unsigned int dram_data_bus_width_bytes); +#else +static inline int tegra_icc_mc_setup_interconnect(struct tegra_mc *mc); +{ + return 0; +} + +static inline int +tegra_icc_emc_setup_interconnect(struct device *emc_dev, + unsigned int dram_data_bus_width_bytes) +{ + return 0; +} +#endif + #endif /* __SOC_TEGRA_MC_H__ */ From patchwork Mon Nov 18 20:02:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251019 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7CD86C1 for ; Tue, 19 Nov 2019 08:04:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BFED6222EF for ; Tue, 19 Nov 2019 08:04:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFED6222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82D136EBB2; Tue, 19 Nov 2019 08:04:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by gabe.freedesktop.org (Postfix) with ESMTPS id 475956E823 for ; Mon, 18 Nov 2019 20:05:45 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id b20so14913728lfp.4 for ; Mon, 18 Nov 2019 12:05:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3yPaD5FrLV5EmLP9sdmGqZ7smshiHa//p8CMzoKpvD8=; b=dRQyaLANxmkH3kZd0G8v0LoDriDj2It+yw/xbRphGXAKXCd/5Z+UAJTxBqrh/hrg7R 6nlDxYheS4PvLjhEmL5diHRtjVC58zVsJHJ6daDj3P0hO/vNQAtym6IXntPnk4AWG/Q2 C51RQitR28GNBhyiYN027s/uKwWwxsA6lkn8WcVtllHfPR0EC6sX47+7sGo+NEJkm5GK ZGQRAV9gw6JVTT0UBevogObVa5bS6mRpiyu4Yq8UXSFrPAsdgetFxYAuP3ZaElflBojr XzSuGXXqZmkgIjuwF9crFB7QZwaKxMaiqQcuoMpl3BHxvYVBqAP+k/4TaucO4vaUwfu0 w92w== X-Gm-Message-State: APjAAAXhhq1WGu4rdpy9DOJmRhZS+tqI2p0TFOIYsqpRM8iP0qOLoI7U IV+p4aeFOiecpl3YLUBgUMzwo7aU X-Google-Smtp-Source: APXvYqyJHnyefn982bnopGrrZVszV336/yTbjQZ+2kB1eK02Gt2XTvr7NFIpbz7D2KtutG9rOwddtw== X-Received: by 2002:a05:6512:1c3:: with SMTP id f3mr842838lfp.25.1574107543779; Mon, 18 Nov 2019 12:05:43 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:43 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 13/29] memory: tegra: Register as interconnect provider Date: Mon, 18 Nov 2019 23:02:31 +0300 Message-Id: <20191118200247.3567-14-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3yPaD5FrLV5EmLP9sdmGqZ7smshiHa//p8CMzoKpvD8=; b=H/3dl7go/Urixmr/tlsMWHcGE2OtjiTfeDb9AEUulMXvEtEjXHYhhi55bGclHkX+dV ITQcoKbcOVVsGYHNvhZ1i88/fcms9UKLFBp74Bc1IemELaCibP6KLJXKQm3cWt5539oL mgrSV2HQmNBlBItT0ydZrXwRvUbRSRv4E4scd9yKzkBOe2V49VY14gNNBzVztjrUu2iZ 1HzrTwLZ/SpYMb5DZn7WzvMvWX0vp+JOlN64EqvhdWvW0VqCGJ2w2itXuW1BN0xZZyBC aFLXPsK65v7DUY67XcAofoyoi8cF900wIbEPtEZfCUBDAAO7Thra4hrE9YFKSFilQ00l MkwA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Memory controller now provides memory clients with memory bandwidth using interconnect API. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/mc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index ec8403557ed4..a4f7cc0bf9e7 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -699,6 +699,10 @@ static int tegra_mc_probe(struct platform_device *pdev) } } + err = tegra_icc_mc_setup_interconnect(mc); + if (err) + dev_err(&pdev->dev, "failed to initialize ICC: %d\n", err); + return 0; } From patchwork Mon Nov 18 20:02:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251097 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B912138C for ; Tue, 19 Nov 2019 08:06:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3450F222C7 for ; Tue, 19 Nov 2019 08:06:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3450F222C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F5F36EC17; Tue, 19 Nov 2019 08:04:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4370B6E823 for ; Mon, 18 Nov 2019 20:05:46 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id y23so20415885ljh.10 for ; Mon, 18 Nov 2019 12:05:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AXPcCtWfFdM922/tpHZwDdON4BCmhCdgkfo59YRa3Do=; b=qpRjvVmrI9dxD2oHS8NoH1IhF1kpmbMUhvI0D2WMonPP7iV+3fDPVhdp20DnpDRIDr Mmj8o1W52NbiNpU+oXwHbaMzEwasNOVzub+Lrb8XN/0iczychsGgTVp+hfUhejcxvMzU mbIrGw2k38Yvj/D+NznP+edUdyEvoHDLUBgu+qBUlB+xoTdKyOtidw/AxjKEjlgi/JPh Xlot+vjJ5mDPfLORdUTDa+gJaRWs97U3hgZ2B3zAsiKgiOSCmA+EB7fW1VjLlpW8qd2A +APraVGXhKyW+MB/4PCCZuBOYRTB1PBczzSIlOrpH1UVGK3KmFjm1sYH3pDQB1U7fHLL vvsQ== X-Gm-Message-State: APjAAAXm+O5MqtJX5p3tJEljP7qNeNuMnlHMjRVcnvecHMZMYfEuoEsx 45RpoSH51q9KG9I8XgCuVEk= X-Google-Smtp-Source: APXvYqxFqKp1pbZFLyQGOIJfn/MUcaI3N4Nzzk27nuVm3omARADEcIhY54wVfdD0ARzQMyBu2EvDBw== X-Received: by 2002:a2e:90b:: with SMTP id 11mr856517ljj.233.1574107544702; Mon, 18 Nov 2019 12:05:44 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:44 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 14/29] memory: tegra: Add interconnect nodes for Terga20 display controllers Date: Mon, 18 Nov 2019 23:02:32 +0300 Message-Id: <20191118200247.3567-15-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AXPcCtWfFdM922/tpHZwDdON4BCmhCdgkfo59YRa3Do=; b=UDlBXSLm5h/lMmeVtYLejQYPHEsYXSZt3oTVz+XKp/fNbo2O4nKCfW2bZI+3IuE+Gc yxvWBMUJf7quIzxKH7PshGVB2yp/jpvVCAEo+oA5/fqQEGpMhGrdlilCm57lbhZ5PDlY rc4StURSae5b2aJ5GwKgb013v8JxYtmHfpPA/no7u7nAVOXjPy/5Xo+shDxKMqfACN7s lD73XIPwL9JmMQM4po8XQTZtfZjGZs6GZzctIJ6eh+F80BzBBXnNxG5VQxtf4BeUIsUi GeZbEtNxNayWO0hIs7l9uAdXC0IyNHLECm8ZtfjpUZpEf5ZGCk4btLlg2MlJed9wZYd0 rU5Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add initial interconnect nodes that allow display controller driver to perform memory bandwidth requests using interconnect API. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra20.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/memory/tegra/tegra20.c b/drivers/memory/tegra/tegra20.c index a8098bff91d9..dfcd9fdb7ce7 100644 --- a/drivers/memory/tegra/tegra20.c +++ b/drivers/memory/tegra/tegra20.c @@ -3,6 +3,7 @@ * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. */ +#include #include #include "mc.h" @@ -280,6 +281,17 @@ static const struct tegra_mc_reset_ops tegra20_mc_reset_ops = { .reset_status = tegra20_mc_reset_status, }; +#define TEGRA20_MC_ICC(_name) \ + { \ + .name = #_name, \ + .id = TEGRA_ICC_MC_##_name, \ + } + +static const struct tegra_mc_icc_node tegra20_mc_icc_nodes[] = { + TEGRA20_MC_ICC(DC), + TEGRA20_MC_ICC(DCB), +}; + const struct tegra_mc_soc tegra20_mc_soc = { .clients = tegra20_mc_clients, .num_clients = ARRAY_SIZE(tegra20_mc_clients), @@ -290,4 +302,6 @@ const struct tegra_mc_soc tegra20_mc_soc = { .reset_ops = &tegra20_mc_reset_ops, .resets = tegra20_mc_resets, .num_resets = ARRAY_SIZE(tegra20_mc_resets), + .icc_nodes = tegra20_mc_icc_nodes, + .num_icc_nodes = ARRAY_SIZE(tegra20_mc_icc_nodes), }; From patchwork Mon Nov 18 20:02:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251095 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4208E138C for ; Tue, 19 Nov 2019 08:06:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A74A222F2 for ; Tue, 19 Nov 2019 08:06:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A74A222F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F0FA6EC01; Tue, 19 Nov 2019 08:04:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 21A4C6E825 for ; Mon, 18 Nov 2019 20:05:47 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id n5so20430759ljc.9 for ; Mon, 18 Nov 2019 12:05:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jtQOw16WoMpEt4SoGX9byL7HDrHPGiMhOLF5kml9J0Q=; b=NLav6/XdYDULM3IeRO/xW3t8Sh/FUJvM/iSYtcoR1/4vugEKVwTJZzHSZpkCrG9btG aXP7wTBrEft1g+4IbhoAYUctCU5A3YbwtD36mgm1HLYnZ/GquAzKw1yNJKPi7JTNr1wk 7WM5cnuFlLM5UTXed5OAd/ZApLgXPAlWaAPQ8bgI9Ma7FvhFKB4lUpNmu675iqzAlbyJ E5j14APigIXOJhA1qIiKiOr4mkqSssvCsteKCIUNtCS3AG7YtdE7+9lidQ28nQSEPOP2 9u9paaPReSwMOPcqNuQQSt+PUTPXSXdFbZBwkvwO2vXX0WhjMVxMXzWtcfttgnuNG4Lj P+Lg== X-Gm-Message-State: APjAAAV+G0M6d2fxsOX3z7AmapiHJLN5kyQNEi6H1kCDKYjUSIqsP0I9 4Ks6wWS8tqa2A9XspkPmFTw= X-Google-Smtp-Source: APXvYqweojvqcO2WlzbF6KO7J6N1VMDj9n8MbXE7507vvPPlEveZyHQN3RCKshLkdt/YkoVS6tQINw== X-Received: by 2002:a2e:9097:: with SMTP id l23mr907248ljg.103.1574107545646; Mon, 18 Nov 2019 12:05:45 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:45 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 15/29] memory: tegra: Add interconnect nodes for Terga30 display controllers Date: Mon, 18 Nov 2019 23:02:33 +0300 Message-Id: <20191118200247.3567-16-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jtQOw16WoMpEt4SoGX9byL7HDrHPGiMhOLF5kml9J0Q=; b=paJSL49Qt1niUiCqYC8XIkUdjTCfgHWcXo+AnD1uIs7fbJ8VBSH+Ql6Xtj/7AMNqwz U+fhZqREpAXa4+rACo1ggFEW2p4jUj+vRjvY2ZWT3E0QEXgpHs1CZER1RJCcmtlFTrhi 72e2KK+ql3HNXSOh+UMnL4mz8MWfPBYqHTu/GwP1v5uzCsEFjtnr0ncITu9Ck6FRVcBC Me7r6NGJLmjZ2E93Cs2qlNYOOkv7krFqc7C1R818I+dDS5GSDOGUpQpzeH2OxipuvguH OD13OFKTZfSVaWQN72zkd4JpoWyO2NAitzlDTtP7qlcGI9qxa2eWyRIYBrNfapQwjvbX 0yCA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add initial interconnect nodes that allow display controller driver to perform memory bandwidth requests using interconnect API. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra30.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/memory/tegra/tegra30.c b/drivers/memory/tegra/tegra30.c index fcdd812eed80..df0d550b07f8 100644 --- a/drivers/memory/tegra/tegra30.c +++ b/drivers/memory/tegra/tegra30.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "mc.h" @@ -1011,6 +1012,17 @@ static const struct tegra_mc_reset tegra30_mc_resets[] = { TEGRA30_MC_RESET(VI, 0x200, 0x204, 17), }; +#define TEGRA30_MC_ICC(_name) \ + { \ + .name = #_name, \ + .id = TEGRA_ICC_MC_##_name, \ + } + +static const struct tegra_mc_icc_node tegra30_mc_icc_nodes[] = { + TEGRA30_MC_ICC(DC), + TEGRA30_MC_ICC(DCB), +}; + const struct tegra_mc_soc tegra30_mc_soc = { .clients = tegra30_mc_clients, .num_clients = ARRAY_SIZE(tegra30_mc_clients), @@ -1025,4 +1037,6 @@ const struct tegra_mc_soc tegra30_mc_soc = { .reset_ops = &tegra_mc_reset_ops_common, .resets = tegra30_mc_resets, .num_resets = ARRAY_SIZE(tegra30_mc_resets), + .icc_nodes = tegra30_mc_icc_nodes, + .num_icc_nodes = ARRAY_SIZE(tegra30_mc_icc_nodes), }; From patchwork Mon Nov 18 20:02:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251061 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 58F936C1 for ; Tue, 19 Nov 2019 08:05:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41894222F2 for ; Tue, 19 Nov 2019 08:05:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41894222F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 243C16EBAA; Tue, 19 Nov 2019 08:04:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 33C2A6E82A for ; Mon, 18 Nov 2019 20:05:48 +0000 (UTC) Received: by mail-lf1-x142.google.com with SMTP id o65so14866940lff.13 for ; Mon, 18 Nov 2019 12:05:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SERw9nCbud8tdFDukLLsJdUgk5juTTigzobfxKmrkf0=; b=oLXzYKhvKb0OAeUE074525Vj7Z7GoO2avGZzdIE5gX6cUZncSTW75BbPvaOKzXDUfG biScY+LAX4Onr7DDmVuyGKBHWOnDLkz+b9NmrRBRWeyWZ7WEpZ38jXjIBFulUEgq2HVf gcOCCdq8eSYsrj1s8nzn+nUmwHD0fsaHa2Uso2Aqb/Q1Zrha79ieRplHcEr4bgujZ1Ev qVCRp/MhteHtJBQkhX7dKRuQK6DMEcQ+yU3SYo90AmpXMPpOxl37qdkxR+Iy3WchMY/R PxznRw+9GpAbq+TpHep3fj8CnZKSPxkHUY4CpofzvrLSaaPqJFAns4ON9GacMVd4iy0n OoEQ== X-Gm-Message-State: APjAAAU9r16Rvmutd087I5u8xm7ASUuelhmJFIdsrdq+RgzapdSu1uCb ZWLLf687Dc486qfSLCSTy+I= X-Google-Smtp-Source: APXvYqy7JAAIPml6XBajTor+RlCN+vGhrDWqbF5FKIOEKhj66PqT47STzTZ7exq/OcNh2vypJEIeug== X-Received: by 2002:ac2:5594:: with SMTP id v20mr897373lfg.148.1574107546740; Mon, 18 Nov 2019 12:05:46 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:46 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 16/29] memory: tegra: Add interconnect nodes for Terga124 display controllers Date: Mon, 18 Nov 2019 23:02:34 +0300 Message-Id: <20191118200247.3567-17-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SERw9nCbud8tdFDukLLsJdUgk5juTTigzobfxKmrkf0=; b=da/vl09U+Ezy+opOo0SLb4ri11IQ/xqN6q8Gu1asTD6BPPWjY/HsIELwTwcrHyaGac sbTrkftbAT7GTyGGf25TzcVYb+1/lB+7PNsBXwkVW7t+vf/y3YEkd74ZkfFFwuJ0BPU7 96Fe6gDSHAh8LMfU4fNYdel+pBnzqi+noc78zT3MiiPFzflJdtZqUzX7islk6dA2RBy+ Qy2kKIhb2scv05kKVmCfKr11xEW1qI3OweaAbUY1wwBOSsuv2qRYWF/JrKM+GbHfhycl YNYpuaLgiFAYJSDluPjk5PJ2Z0y6a7wRM7UU8iO2t1svAtYxfa6qTq2+DPSRpjiqHmzY FbMA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add initial interconnect nodes that allow display controller driver to perform memory bandwidth requests using interconnect API. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra124.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/memory/tegra/tegra124.c b/drivers/memory/tegra/tegra124.c index 493b5dc3a4b3..dae6b366281f 100644 --- a/drivers/memory/tegra/tegra124.c +++ b/drivers/memory/tegra/tegra124.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "mc.h" @@ -1028,6 +1029,17 @@ static const unsigned long tegra124_mc_emem_regs[] = { MC_EMEM_ARB_RING1_THROTTLE }; +#define TEGRA124_MC_ICC(_name) \ + { \ + .name = #_name, \ + .id = TEGRA_ICC_MC_##_name, \ + } + +static const struct tegra_mc_icc_node tegra124_mc_icc_nodes[] = { + TEGRA124_MC_ICC(DC), + TEGRA124_MC_ICC(DCB), +}; + static const struct tegra_smmu_soc tegra124_smmu_soc = { .clients = tegra124_mc_clients, .num_clients = ARRAY_SIZE(tegra124_mc_clients), @@ -1056,6 +1068,8 @@ const struct tegra_mc_soc tegra124_mc_soc = { .reset_ops = &tegra_mc_reset_ops_common, .resets = tegra124_mc_resets, .num_resets = ARRAY_SIZE(tegra124_mc_resets), + .icc_nodes = tegra124_mc_icc_nodes, + .num_icc_nodes = ARRAY_SIZE(tegra124_mc_icc_nodes), }; #endif /* CONFIG_ARCH_TEGRA_124_SOC */ @@ -1086,5 +1100,7 @@ const struct tegra_mc_soc tegra132_mc_soc = { .reset_ops = &tegra_mc_reset_ops_common, .resets = tegra124_mc_resets, .num_resets = ARRAY_SIZE(tegra124_mc_resets), + .icc_nodes = tegra124_mc_icc_nodes, + .num_icc_nodes = ARRAY_SIZE(tegra124_mc_icc_nodes), }; #endif /* CONFIG_ARCH_TEGRA_132_SOC */ From patchwork Mon Nov 18 20:02:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251063 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A0CE138C for ; Tue, 19 Nov 2019 08:05:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7FF14222EF for ; Tue, 19 Nov 2019 08:05:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FF14222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F1446E071; Tue, 19 Nov 2019 08:04:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 696D26E82A for ; Mon, 18 Nov 2019 20:05:49 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id g3so20410198ljl.11 for ; Mon, 18 Nov 2019 12:05:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RivrnPfKPJ1QjkTxDFy4+4mnpF6bQPNEwpXOnU84LBo=; b=dhM7cIUuaCA2tyFYMOCU4/JKwHMrOtSC+lqu8zmQaPpKP8bR1jXu2CQhzzWCYRU874 5LnnfGrkStB71Xrzoi2IXiDqW8m6JOGddM8OVCAVN2X+K5KHo7k/zYYmGZfiRu1kgXSh 5NzqsyZNt453jO/lO6BcvZu0ywc9TbMWCpINV7luG781sIBqQfJO49zFiltzrGhgbQuu gqPGRcMG8wE6Yoqecc1022ZSVgW9zjKKrTkQDFqxk4g21EZr3cDVA9H0IJnASZoDeFwo xO7sczAwr6R0ahfOwQI9qAfX+QJwdBFcx0VYYx4UaES1HdoUOjBFCcCUgRI3JuNshojJ rbqQ== X-Gm-Message-State: APjAAAUbZOONNTjH+Y7dN7oO3SXAL3af/OFwtGvXK3XaqLzoUAehy3FM RdpdmX6XmuLiBV5NRx2HxaU= X-Google-Smtp-Source: APXvYqxN2fEW1G50B88GZs16ah4/AIE0PFaf5KjnCo7R/1WTHrNNfwDpOyxCG1M6gA57deEBF5n2yA== X-Received: by 2002:a2e:7016:: with SMTP id l22mr880467ljc.227.1574107547802; Mon, 18 Nov 2019 12:05:47 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:47 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 17/29] memory: tegra20-emc: Use devm_platform_ioremap_resource Date: Mon, 18 Nov 2019 23:02:35 +0300 Message-Id: <20191118200247.3567-18-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RivrnPfKPJ1QjkTxDFy4+4mnpF6bQPNEwpXOnU84LBo=; b=iMIcUz/V15iBFRh5EoTXSUl6GOXqIKU6gCU6NxvhnpUqkX19Nx5FkiBzUdGS71xdBt LsUvGX/njNSt534oUI9MeY+A7GffrnfaLhl3HfVfMXs0EN1YwRtdIv33aDA1rSK1JN5T AnlwF6UrRBQhG4RE0JW+5EH8HlzCdRJ34ZmCD3X0FSpOX5AvQeslSI7D+l6bRQH4/NBg 9+4n/efyUHWxpsu/EHDXckvxlNEdG4yMhGly4XlHL8ucp7JDedCzY2VzaUuneJHrFEce /WQ4C+p5ep2aimUwhH2owSGiO0y59fW/MbskFtGGlqLC0qrNKgTbrhrZJCfmPt47vQVh gpeQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Utilize that relatively new helper which makes code a bit cleaner. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra20-emc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c index 1b23b1c34476..d2efd0c658c0 100644 --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -482,7 +482,6 @@ static int tegra_emc_probe(struct platform_device *pdev) { struct device_node *np; struct tegra_emc *emc; - struct resource *res; int irq, err; /* driver has nothing to do in a case of memory timing absence */ @@ -518,8 +517,7 @@ static int tegra_emc_probe(struct platform_device *pdev) if (err) return err; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - emc->regs = devm_ioremap_resource(&pdev->dev, res); + emc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(emc->regs)) return PTR_ERR(emc->regs); From patchwork Mon Nov 18 20:02:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251099 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6C556C1 for ; Tue, 19 Nov 2019 08:06:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF1BC222C7 for ; Tue, 19 Nov 2019 08:06:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF1BC222C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 232496EBAC; Tue, 19 Nov 2019 08:04:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 48F3A6E827 for ; Mon, 18 Nov 2019 20:05:50 +0000 (UTC) Received: by mail-lf1-x142.google.com with SMTP id l28so5405946lfj.1 for ; Mon, 18 Nov 2019 12:05:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=elZWeE6UcuQp3DEzgdQgaL5jKLTt+cOSPUtF3y9TNa4=; b=AKlLZZn3kicedVYpCfOpaGS/CJlqWvvGoVsqDWqB5UikODrmCItd0X/8ypGw429t5X gUDsz+N879l5NJ/WyWNrgGoJsiWlsrEMMc0RtOiTPrbwfLiRAUhm9JtwfusfwflGbeY+ CvblDiY9/VGd62I2q6XJx/Us01iOa8MUCdtPOBF8XnY5lTRuLOMuTL9gJRvO9RV+O78e /v6wtWS8AgpHLxr2h86hmP4bBOG5vCC0r9BUc1qsW9++NgRZH5dK+SBzfg35Kn6DcnRz 9WRXF8Nigz+5HzKHbZhVFf0VUERKVPIgrQyYV0Lehbw/58sWIh0aAJ+tMuqQYdt/eNGr ccWA== X-Gm-Message-State: APjAAAWmsbHpzbr92KjRwJ/wjrwjRmVg9STZd9mm16xbxOmuCyoo9wiy IkozgkH5EsKthdT4ZJp3tVg= X-Google-Smtp-Source: APXvYqzeJRAE++Yzki9UJ98MMjtqUsLFff7ZYuUVv6qYq5NYvloMtXahcKAZxpKSThtQeJfpU/MEiQ== X-Received: by 2002:ac2:4a8a:: with SMTP id l10mr816734lfp.185.1574107548766; Mon, 18 Nov 2019 12:05:48 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:48 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 18/29] memory: tegra20-emc: Continue probing if timings/IRQ are missing in device-tree Date: Mon, 18 Nov 2019 23:02:36 +0300 Message-Id: <20191118200247.3567-19-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=elZWeE6UcuQp3DEzgdQgaL5jKLTt+cOSPUtF3y9TNa4=; b=bdAg91BC7ySUYH4sCX/GvLhlH61/SVZBlLXA+AgeAWMbPzQ0WUMiXN1C//dc774oBe 0RlnlfFVzOCWhVgpOc+W+vMK7nCmF2auinzsygXORlxIe+MuqtgczrPzZFcLBKF/jBhI HJbogqZbGxbFOyC7nh+PyQ7MVpKLwSyMMyPDEp70t8veTacmaBkmisXAxE8RoyxHGacD iaKBk8MiKcCilSx09+6ya9laXjQC/RTYtiBFth/R22JjINQzQ3y/DXv/5SpAfY1UH78o ROHWKltjPZ7/jkhz1vUYzS3LOyaBksnJ+EY9/lg5nuzvGw5QaWIoZRCwN9eTZ2ZSw5WU usfg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" EMC driver will become mandatory after making it interconnect provider because interconnect users like display controller driver will fail to probe using newer device-trees that have interconnect properties. Thus make driver to probe even if timings or IRQ are missing in device-tree, the frequency scaling won't be available in this case because there will be only one frequency available, the frequency that is left from bootloader. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra20-emc.c | 61 +++++++++++++++--------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c index d2efd0c658c0..28bd9fd4c3c9 100644 --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -381,6 +381,11 @@ tegra_emc_find_node_by_ram_code(struct device *dev) u32 value, ram_code; int err; + if (of_get_child_count(dev->of_node) == 0) { + dev_info(dev, "device-tree doesn't have memory timings\n"); + return NULL; + } + if (!of_property_read_bool(dev->of_node, "nvidia,use-ram-code")) return of_node_get(dev->of_node); @@ -449,6 +454,9 @@ static long emc_round_rate(unsigned long rate, struct tegra_emc *emc = arg; unsigned int i; + if (!emc->num_timings) + return clk_get_rate(emc->clk); + min_rate = min(min_rate, emc->timings[emc->num_timings - 1].rate); for (i = 0; i < emc->num_timings; i++) { @@ -484,38 +492,21 @@ static int tegra_emc_probe(struct platform_device *pdev) struct tegra_emc *emc; int irq, err; - /* driver has nothing to do in a case of memory timing absence */ - if (of_get_child_count(pdev->dev.of_node) == 0) { - dev_info(&pdev->dev, - "EMC device tree node doesn't have memory timings\n"); - return 0; - } - - irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "interrupt not specified\n"); - dev_err(&pdev->dev, "please update your device tree\n"); - return irq; - } - - np = tegra_emc_find_node_by_ram_code(&pdev->dev); - if (!np) - return -EINVAL; - emc = devm_kzalloc(&pdev->dev, sizeof(*emc), GFP_KERNEL); - if (!emc) { - of_node_put(np); + if (!emc) return -ENOMEM; - } init_completion(&emc->clk_handshake_complete); emc->clk_nb.notifier_call = tegra_emc_clk_change_notify; emc->dev = &pdev->dev; - err = tegra_emc_load_timings_from_dt(emc, np); - of_node_put(np); - if (err) - return err; + np = tegra_emc_find_node_by_ram_code(&pdev->dev); + if (np) { + err = tegra_emc_load_timings_from_dt(emc, np); + of_node_put(np); + if (err) + return err; + } emc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(emc->regs)) @@ -525,11 +516,21 @@ static int tegra_emc_probe(struct platform_device *pdev) if (err) return err; - err = devm_request_irq(&pdev->dev, irq, tegra_emc_isr, 0, - dev_name(&pdev->dev), emc); - if (err) { - dev_err(&pdev->dev, "failed to request IRQ#%u: %d\n", irq, err); - return err; + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + dev_err(&pdev->dev, "interrupt not specified\n"); + dev_err(&pdev->dev, "please update your device tree\n"); + dev_err(&pdev->dev, "frequency scaling disabled\n"); + + emc->num_timings = 0; + } else { + err = devm_request_irq(&pdev->dev, irq, tegra_emc_isr, 0, + dev_name(&pdev->dev), emc); + if (err) { + dev_err(&pdev->dev, "failed to request IRQ#%u: %d\n", + irq, err); + return err; + } } tegra20_clk_set_emc_round_callback(emc_round_rate, emc); From patchwork Mon Nov 18 20:02:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251115 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 06D67138C for ; Tue, 19 Nov 2019 08:07:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E347C222C7 for ; Tue, 19 Nov 2019 08:07:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E347C222C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DBDC6EC27; Tue, 19 Nov 2019 08:06:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DB076E827 for ; Mon, 18 Nov 2019 20:05:51 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id j14so14867571lfb.8 for ; Mon, 18 Nov 2019 12:05:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7i+JiP2AUVVtcNWDD/lNg9r2NMfGMrduOQTKI4kG/wc=; b=dMMyPqV9iVziHbjpH8zh27LWGBc9Ho1nCXG1W6n3hf0wGC1DUHWWgycXZcx2KnQXoT nyuBAN6UucDFHaX186VgxprkK1Sp6yuGlalbD6q/gBA4YezuftePWEeVI+xk79fAqfYE DZKbfVXY59cJxUVntlOAOYQtqw5F5ky4IumWEOW+QaUr42w7zNxaonjv3ksUf9KbrVU+ QJc9SZnZupLr9mHDVeu7CIxjQ94YkIF14GCX0MRPcqbhLifxLktozxyIbJx3Xv+eMKW1 ZwAwtxn6NGLDVr+37mUIBOI+6HpeckSjrBY+7R3sUhwJ0vVSgSltkufSDBgdNlQRXBrl 3bgg== X-Gm-Message-State: APjAAAWc+zrJ9PJAPeAdNqylM3/orzyJPhsGhhzBo9cxSZzY46d2hqq1 JNPWigEBLcvYiMc6sX6pYcY= X-Google-Smtp-Source: APXvYqwEEpqxrD0qEapvfQlnj+xT3sW4TKX4Zbgpx8nwOF8+kZOlCgDEWudmC8WcMQHM7usssGtgHA== X-Received: by 2002:ac2:46f3:: with SMTP id q19mr839198lfo.65.1574107549694; Mon, 18 Nov 2019 12:05:49 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:49 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 19/29] memory: tegra20-emc: Register as interconnect provider Date: Mon, 18 Nov 2019 23:02:37 +0300 Message-Id: <20191118200247.3567-20-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7i+JiP2AUVVtcNWDD/lNg9r2NMfGMrduOQTKI4kG/wc=; b=AEpTKk0TnoUtlKqnK4B7kw3Kf8aqVJy55OQFKG2GJBsMS7xkSTddyVnpI51QsC/5yv 69MBUaCMoErrhOmhXslNhIXSBtp9lOVptYygy8GMYp19Rw2YpL9jQoR3go6I07TKaql0 EvgRs5uG09afr9O/3t2L1U7/vDi40sq9kw/XT9xo12lzmgxedKI+fi82QlNVfjTwfSew SYfjIcGq8S8RGThHsEqXWaCPsMAKLnzKiFXqRrEnQXmGMHIhp/b0WA4mZGASKPwB9w2I fy1AvlTtvGlHZBERoeyGGf2sGvzAVmA1L5vbNzE/3CSVEpsC/qYdwD8p044jItzlFblE iYIQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" EMC now provides MC with memory bandwidth using interconnect API. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra20-emc.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c index 28bd9fd4c3c9..61ce422e102a 100644 --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -19,6 +19,7 @@ #include #include +#include #define EMC_INTSTATUS 0x000 #define EMC_INTMASK 0x004 @@ -87,6 +88,8 @@ #define EMC_DBG_READ_DQM_CTRL BIT(9) #define EMC_DBG_CFG_PRIORITY BIT(24) +#define EMC_FBIO_CFG5_DRAM_WIDTH_X16 BIT(4) + static const u16 emc_timing_registers[] = { EMC_RC, EMC_RFC, @@ -486,10 +489,27 @@ static long emc_round_rate(unsigned long rate, return timing->rate; } +static unsigned int emc_dram_data_bus_width_bytes(struct tegra_emc *emc) +{ + unsigned int bus_width; + u32 emc_cfg; + + emc_cfg = readl_relaxed(emc->regs + EMC_FBIO_CFG5); + if (emc_cfg & EMC_FBIO_CFG5_DRAM_WIDTH_X16) + bus_width = 16; + else + bus_width = 32; + + dev_info(emc->dev, "DRAM data-bus width: %ubit\n", bus_width); + + return bus_width / 8; +} + static int tegra_emc_probe(struct platform_device *pdev) { struct device_node *np; struct tegra_emc *emc; + unsigned int bus_width; int irq, err; emc = devm_kzalloc(&pdev->dev, sizeof(*emc), GFP_KERNEL); @@ -549,6 +569,12 @@ static int tegra_emc_probe(struct platform_device *pdev) goto unset_cb; } + bus_width = emc_dram_data_bus_width_bytes(emc); + + err = tegra_icc_emc_setup_interconnect(&pdev->dev, bus_width); + if (err) + dev_err(&pdev->dev, "failed to initialize ICC: %d\n", err); + return 0; unset_cb: From patchwork Mon Nov 18 20:02:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251025 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CB616C1 for ; Tue, 19 Nov 2019 08:04:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 856D3222EF for ; Tue, 19 Nov 2019 08:04:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 856D3222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9EBA26EBB6; Tue, 19 Nov 2019 08:04:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by gabe.freedesktop.org (Postfix) with ESMTPS id 376FC6E81F for ; Mon, 18 Nov 2019 20:05:52 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id q28so14895217lfa.5 for ; Mon, 18 Nov 2019 12:05:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pVZm4+AsGt54/AHvdx3eAP7bC+QNmdTq1ECOejtB9ug=; b=bMaVsIydwO7Zjt/LQT5TVNHaLOy3nACLMxBQ37CcOAENYJyKAPEeK1oRp1GbiZcEfb qqs5lLzBCo44Ebglfg0nLIy9tlVZDqBu9yreoun+ZvGLoZnMPn5DjUdzntw5BBhUYYgV L9gF21Z6//kfGIxzjqPfQgY90ujWmy/ea689cAzBn4e7KxEGOHGwRNir4+visc2+bj0H SvwcH/NLR232NK6gw8w12YkzkexP+saFUAl+q0erjssYZqw/KJGErj+0+0XhHrehWtDJ q9Oe/in08tBBekSoLndtPKWQW6w7uijb7vS5dAJCaig5sKUj4cmdln9Cn2XgvesX0dg/ 5GgQ== X-Gm-Message-State: APjAAAVwexguCny+VMbny8UgbcXJLstIovIUYZwqA9LgN1QaN+Cisu3t yDmotbejC/1CyOdvvgwx9ec= X-Google-Smtp-Source: APXvYqzk8qaHiHHwXkRhrrIE1sEeZDnQkjSy/cXco/zY2jqK1B4NhcEaAJRIhsbVtVbWItOdvoICRw== X-Received: by 2002:ac2:5685:: with SMTP id 5mr938614lfr.32.1574107550658; Mon, 18 Nov 2019 12:05:50 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:50 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 20/29] memory: tegra30-emc: Continue probing if timings are missing in device-tree Date: Mon, 18 Nov 2019 23:02:38 +0300 Message-Id: <20191118200247.3567-21-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pVZm4+AsGt54/AHvdx3eAP7bC+QNmdTq1ECOejtB9ug=; b=Hl4MRFvNVFbaRCKT3CL7dUguz78YD7SwWlyB85FyaU+RDhrmRuvO25hyr5/hQKRArl bUtGu9gLcx03HQI+jESFcZox8afMHtY4vJHEo3caH5Yzhf/JFVlDV6+taKaJWkTy6WKU EWf4fMlgrsY4OGqInmYbsl+bGcnSQu9ZD4rnfK4+NASsdTi0u8f3P2qCQAukgyAid0nO tGUy948DNz9O0fQLbuznx0NjIg7Nr9JV94oJ0Emrdb8tmL1M+tBKFtvwGfnTCRAa7+ja k4AlGAReHCuXrLvpqeoULiJSMIB6D/K4saUGtIY0TzeIUc+k+Gm36+aoFXi8RffNgkx7 zgng== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" EMC driver will become mandatory after making it interconnect provider because interconnect users like display controller driver will fail to probe using newer device-trees that have interconnect properties. Thus make driver to probe even if timings are missing in device-tree, the frequency scaling won't be available in this case because there will be only one frequency available, the frequency that is left from bootloader. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra30-emc.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c index 0b6a5e451ea3..ee194e8ed521 100644 --- a/drivers/memory/tegra/tegra30-emc.c +++ b/drivers/memory/tegra/tegra30-emc.c @@ -985,6 +985,11 @@ static struct device_node *emc_find_node_by_ram_code(struct device *dev) u32 value, ram_code; int err; + if (of_get_child_count(dev->of_node) == 0) { + dev_info(dev, "device-tree doesn't have memory timings\n"); + return NULL; + } + ram_code = tegra_read_ram_code(); for_each_child_of_node(dev->of_node, np) { @@ -1054,6 +1059,9 @@ static long emc_round_rate(unsigned long rate, struct tegra_emc *emc = arg; unsigned int i; + if (!emc->num_timings) + return clk_get_rate(emc->clk); + min_rate = min(min_rate, emc->timings[emc->num_timings - 1].rate); for (i = 0; i < emc->num_timings; i++) { @@ -1090,12 +1098,6 @@ static int tegra_emc_probe(struct platform_device *pdev) struct tegra_emc *emc; int err; - if (of_get_child_count(pdev->dev.of_node) == 0) { - dev_info(&pdev->dev, - "device-tree node doesn't have memory timings\n"); - return -ENODEV; - } - np = of_parse_phandle(pdev->dev.of_node, "nvidia,memory-controller", 0); if (!np) { dev_err(&pdev->dev, "could not get memory controller node\n"); @@ -1107,10 +1109,6 @@ static int tegra_emc_probe(struct platform_device *pdev) if (!mc) return -ENOENT; - np = emc_find_node_by_ram_code(&pdev->dev); - if (!np) - return -EINVAL; - emc = devm_kzalloc(&pdev->dev, sizeof(*emc), GFP_KERNEL); if (!emc) { of_node_put(np); @@ -1125,10 +1123,13 @@ static int tegra_emc_probe(struct platform_device *pdev) emc->clk_nb.notifier_call = emc_clk_change_notify; emc->dev = &pdev->dev; - err = emc_load_timings_from_dt(emc, np); - of_node_put(np); - if (err) - return err; + np = emc_find_node_by_ram_code(&pdev->dev); + if (np) { + err = emc_load_timings_from_dt(emc, np); + of_node_put(np); + if (err) + return err; + } emc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(emc->regs)) From patchwork Mon Nov 18 20:02:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251085 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECCF9138C for ; Tue, 19 Nov 2019 08:06:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D5A41222EF for ; Tue, 19 Nov 2019 08:06:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5A41222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E27426EBF8; Tue, 19 Nov 2019 08:04:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DB846E81F for ; Mon, 18 Nov 2019 20:05:53 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id r7so20455234ljg.2 for ; Mon, 18 Nov 2019 12:05:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P674bIxJrMaTZu7WyWHeQk7pl1v4jGgsVqyyVx6alBQ=; b=iB/0F8/Hz20/p/pI6YqCfi0DtVIBaf2ztsieTcvhKbqLb1coZ+4y9LQ927MXa0tZsF zeeDSmowvOjJI6cJvmsrSfDN0XjOhKTGcdGSQlwSkhHHdFot/JmB24mC5gXwUZiTRupj h6ymZPb3Y5zuAxCzLSe5xnUMhzSXG59BS/nbdUWo1ssrU51+4nzpBqJ1gbv7lzx9QrW/ p1dmRjL2B+sQbqMOeeRqUCmQ+lNRNYP5nAtX3zGQlZ7aHNWXiFDPUrVN36/sD3vPdDYo ksGkqDQnzuAxnVQX1ONQb5cIV/+tfIhPsyIUzrhS7M5rX3F6ptYie9pQl/TVE9ysFBZs OQww== X-Gm-Message-State: APjAAAX7Oz78IFiP6Pe2bX6bkAlzRlblecVa2z6zc0t0FsA4w1DXz0Pc PnxmVdAxU0XbptSduSNe1RE= X-Google-Smtp-Source: APXvYqyKNwb0ymffe6l7/ypszOjAW/NlNd5Bh84no3B7//dxfUL3Cs9VsuYJNsZUe/qA+1C2WhvqfQ== X-Received: by 2002:a2e:894b:: with SMTP id b11mr935708ljk.118.1574107551702; Mon, 18 Nov 2019 12:05:51 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:51 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 21/29] memory: tegra30-emc: Register as interconnect provider Date: Mon, 18 Nov 2019 23:02:39 +0300 Message-Id: <20191118200247.3567-22-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P674bIxJrMaTZu7WyWHeQk7pl1v4jGgsVqyyVx6alBQ=; b=spiEJtRIV5saMeUpajYCQ5oFHAjxhJPP+sC9mcTDqqMXdvDsRBxagGqA6yQnG618qQ XC4+PxPoTxlyPBp/5A+idjFiS0nrSgSWBoJhfDLc6Rm6YANYXFe3De9iuz/A7RLEJQRw WNY45/rfTpIWcYm6SyktkPyILs5/L6/31tZsNnKF5MvEq0eA/JBla9drANtkjwkO/Z5e w2g+bCWaog9t0AJ5fYkpre9fVpuQ3ht2zlDO/4L5waoBCl7WJqbkAcF0EISMMNvlnTAb 48Dp5EcEQiP2c0Nf+JUabeSlQznSSusiA3QfmJUcyT8XOf/muOwSb8hNEVIuIbRHnMle vzew== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" EMC now provides MC with memory bandwidth using interconnect API. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra30-emc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c index ee194e8ed521..7316ab50511b 100644 --- a/drivers/memory/tegra/tegra30-emc.c +++ b/drivers/memory/tegra/tegra30-emc.c @@ -1171,6 +1171,11 @@ static int tegra_emc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, emc); + /* Tegra30 has DRAM channel fixed at 32bit width */ + err = tegra_icc_emc_setup_interconnect(&pdev->dev, 32 / 8); + if (err) + dev_err(&pdev->dev, "failed to initialize ICC: %d\n", err); + return 0; unset_cb: From patchwork Mon Nov 18 20:02:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251023 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1C7F138C for ; Tue, 19 Nov 2019 08:04:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA8CE222EF for ; Tue, 19 Nov 2019 08:04:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA8CE222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6EF366EB98; Tue, 19 Nov 2019 08:04:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D8D86E823 for ; Mon, 18 Nov 2019 20:05:54 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id l14so8212368lfh.10 for ; Mon, 18 Nov 2019 12:05:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NO2qXzr2h8wC9JH342o1HHthsrMIk1iko3w9VcXdH5A=; b=kneDIoJAvwXjAeUfOf0TAb0gT2MCHXOsuB/KvD2J/nWOhpknnVYDXqgRbrh+1t5I2V FOZClnAba5kydiYlwOGde06yIc0fZsI/g1oSnJF3GO2uHc82YCwzIP6tjrUaXZgFukLT lRDPxHZl39JNWzKGj834lRC2TS1Ufkh1VZ771+1kcnhdAbZxIushQjTuzyXuSROxBehR eZS7y0369PK9yPWsnXMA5BzEuA2V5iCcUFIH9yKxiXymHWJpO3iUr1fbftf+WKGLPKNb VntIvpQGLilxaNCY2vQtHA1/+I9zW5m0pu1NHi/zCgBhW0aXH6K04r4O4VT4EVWE5jGI 9hGg== X-Gm-Message-State: APjAAAUgKT9wVQZfLEklP5y//XJF6/ixVs2NeMGrJ0EPtKeQj060ylZq zsHaQUrLOhIDwIJqNdfy4qE= X-Google-Smtp-Source: APXvYqyFdMdWU7w0LB1BfkSwWHQ03FHjU/9FzYlK7b99IzlqfyPICfS0Qp8R9GxcK14o2DQzVM7iLg== X-Received: by 2002:a19:6d12:: with SMTP id i18mr851484lfc.153.1574107552616; Mon, 18 Nov 2019 12:05:52 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:52 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 22/29] memory: tegra124-emc: Use devm_platform_ioremap_resource Date: Mon, 18 Nov 2019 23:02:40 +0300 Message-Id: <20191118200247.3567-23-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NO2qXzr2h8wC9JH342o1HHthsrMIk1iko3w9VcXdH5A=; b=mk2vCgHOubJT2C6+euhjGFu5E1FlvsunytIGSJqQKUfX7RWZhKV1M/PERUjpJAWtaM Sn1VIRt4W6UHZ1M8SmB0ucwEdYiKRYmgxpuokjYPMRElB4RMaYibtSdKhIDCDPO8XhVD Hi8CD53RhNJjDRD3ko0eQFHA2oj5S1Y9kPHAAnjGmuZ/JGZh8Klbwzg4VWoz4bJHYI87 5EkMCsJSl7nkcW31ph0zvafPN0GoZF1KQInaSJHyjm2NtJb08wKihW2lumhfhYjPi3TR GKifNd1Q9YDCpSyZ8fSrIbpOU3GgVHXnckXlinOeu6A1HnT7w+tmUzdy29FPlDt2MTI1 AyFQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Utilize that relatively new helper which makes code a bit cleaner. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra124-emc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c index 464f0ceaee63..2c73260654ba 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -1085,7 +1085,6 @@ static int tegra_emc_probe(struct platform_device *pdev) struct platform_device *mc; struct device_node *np; struct tegra_emc *emc; - struct resource *res; u32 ram_code; int err; @@ -1095,8 +1094,7 @@ static int tegra_emc_probe(struct platform_device *pdev) emc->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - emc->regs = devm_ioremap_resource(&pdev->dev, res); + emc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(emc->regs)) return PTR_ERR(emc->regs); From patchwork Mon Nov 18 20:02:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251089 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C39DF138C for ; Tue, 19 Nov 2019 08:06:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC3C1222EF for ; Tue, 19 Nov 2019 08:06:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC3C1222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 169F06EBEF; Tue, 19 Nov 2019 08:04:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C09F6E823 for ; Mon, 18 Nov 2019 20:05:55 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id m4so15494846ljj.8 for ; Mon, 18 Nov 2019 12:05:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J2fZoY0R7IbQjoE/jwqG69vNLdHsoiOa5JN/luWf3e0=; b=kt9B7srFauBtjfk2HLVuyiNGmC7l2UDbT5XhA+O8zPOF3ACCqtM5BHlDulHkq8FvVU W9ye9+9vcBJgl8JWd/r4mXiUI99zuXxxWzzBh9MjUrEQkO8kMJYkA1GTvwCsEUcqVy+Q kgnDou8ik7eHn3Fbg3P17RyIC6YIfYn4d3ujR7qqmbEjnAhqHmIXS9h5kQPEpNgI4RNy bigYBtFIBQdWw4K9TyCgdt/GDXxkKUFYAT9g1HSlree/ZGOO6KcPUyCB2MERytRD1wq2 5QcQrmJZwTEGhowLrFthPz9t2TXK7zjjz/4xVzOEN+ko1NQoL0NmV/ffFGm6XGAXOXxY kP7Q== X-Gm-Message-State: APjAAAWp6DzWTbP2tFzdLIf6eFigmKUcIJ09JnFDzadAmcRuI7JmspRL J/egZJpC/HKjj0z7H5QLxnc= X-Google-Smtp-Source: APXvYqz8ghWzEWo16209Cas+BFJnfWldFab38K4eefHAlKvmnAkeVTZ//bkXMQihDlZJIBr4ukwNjg== X-Received: by 2002:a2e:9b06:: with SMTP id u6mr963460lji.34.1574107553665; Mon, 18 Nov 2019 12:05:53 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:53 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 23/29] memory: tegra124-emc: Register as interconnect provider Date: Mon, 18 Nov 2019 23:02:41 +0300 Message-Id: <20191118200247.3567-24-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J2fZoY0R7IbQjoE/jwqG69vNLdHsoiOa5JN/luWf3e0=; b=TTGoXoCUGYgNLTlP5iXVrRXJPwkha1zSQ5AjyRhu1bMfayjzqzarGQeoe7vELP8Nxj 3vI5/0aOZXaZCRmJyKUU6mmLqM86R4X7aOL5sT1vVAbpgAfvV6uUS10yDdqq0+a0/RG2 qb5m+2UGJGO6yVqYwWnjw7ZY98IKLQe7jnYgq6XFnTo03LBK/xV1xxyzbh+Nz4Ph2Tcp tDe/CWeFPSp0CCAGOLrMX6EoX0VegVJzBS2ZaOWKq0Jhpbqv6NExUuLztuGgi8c/+YxI oq0GT1+fhZC5YJ1ky6L1cBdsQRMy7lu3KZh5OE44z8QokmQbIvRQOftu6NWOReH3/V7r YWnQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" EMC now provides MC with memory bandwidth using interconnect API. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra124-emc.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c index 2c73260654ba..c9478dcbeece 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -25,6 +25,7 @@ #define EMC_FBIO_CFG5 0x104 #define EMC_FBIO_CFG5_DRAM_TYPE_MASK 0x3 #define EMC_FBIO_CFG5_DRAM_TYPE_SHIFT 0 +#define EMC_FBIO_CFG5_DRAM_WIDTH_X64 BIT(4) #define EMC_INTSTATUS 0x0 #define EMC_INTSTATUS_CLKCHANGE_COMPLETE BIT(4) @@ -1080,11 +1081,28 @@ static void emc_debugfs_init(struct device *dev, struct tegra_emc *emc) dev_err(dev, "failed to create debugfs entry\n"); } +static unsigned int emc_dram_data_bus_width_bytes(struct tegra_emc *emc) +{ + unsigned int bus_width; + u32 emc_cfg; + + emc_cfg = readl_relaxed(emc->regs + EMC_FBIO_CFG5); + if (emc_cfg & EMC_FBIO_CFG5_DRAM_WIDTH_X64) + bus_width = 64; + else + bus_width = 32; + + dev_info(emc->dev, "DRAM data-bus width: %ubit\n", bus_width); + + return bus_width / 8; +} + static int tegra_emc_probe(struct platform_device *pdev) { struct platform_device *mc; struct device_node *np; struct tegra_emc *emc; + unsigned int bus_width; u32 ram_code; int err; @@ -1146,6 +1164,12 @@ static int tegra_emc_probe(struct platform_device *pdev) if (IS_ENABLED(CONFIG_DEBUG_FS)) emc_debugfs_init(&pdev->dev, emc); + bus_width = emc_dram_data_bus_width_bytes(emc); + + err = tegra_icc_emc_setup_interconnect(&pdev->dev, bus_width); + if (err) + dev_err(&pdev->dev, "failed to initialize ICC: %d\n", err); + return 0; }; From patchwork Mon Nov 18 20:02:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251045 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 332FC138C for ; Tue, 19 Nov 2019 08:05:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BF5A222EF for ; Tue, 19 Nov 2019 08:05:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BF5A222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BE0D6EBCC; Tue, 19 Nov 2019 08:04:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 325846E826 for ; Mon, 18 Nov 2019 20:05:56 +0000 (UTC) Received: by mail-lf1-x142.google.com with SMTP id f18so2544001lfj.6 for ; Mon, 18 Nov 2019 12:05:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rtrkjrjFdrCSY4w3UkoaopBMgCTAU9tc9NbxXmX2YTg=; b=renAoWL2S6m/bZ+fu14lcY17LR9+N/LimEYJyZ+9dIPzA/r63eUGwqjQSqQ/MDVrCz plnLyh4sDX9tMPkprYcj4pK5MkVGMgEIzF117PdKp0obh9VqOVQmOKPgIc0KxuFXlgZV PTJzy8AM78/RiHnYag7mswQYRvoKRp2MWY7vRpVsNPm91nCzbT7PVRdsXjOqWfSW9rJu LiNuSdMMarssgB7mM0pkCl/bz6QffRFxS6vim+qd2DS/PzY+1TkpZEHtIJwSEnZZfImP IxNd8rIJb2jTJGGTZ7onAGFVCSuXRB2/5bH8S7OhgGyfiIdZZKqx5ep2nWOYneeJk25w 6Qtg== X-Gm-Message-State: APjAAAW+vdL+qaIljiQtjpQGW4Mq/uxaIQZQEXOZMMd0nWs7rwtzVKrf /AYIiw2IuD+TwASp21yg8yo= X-Google-Smtp-Source: APXvYqwvDSE0CmdElgXhtuj+X3izqvNU9SOYdSyw5i/wFKniJwWhRhcNQLraK3ba4bGSLwu1vA1bjw== X-Received: by 2002:a19:ac08:: with SMTP id g8mr934655lfc.112.1574107554632; Mon, 18 Nov 2019 12:05:54 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:54 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 24/29] drm/tegra: dc: Use devm_platform_ioremap_resource Date: Mon, 18 Nov 2019 23:02:42 +0300 Message-Id: <20191118200247.3567-25-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rtrkjrjFdrCSY4w3UkoaopBMgCTAU9tc9NbxXmX2YTg=; b=bIVfal5TVp5xBuBX6ib+z1CzBJxpz6RaF2qAdEWAm9btjqcLZW4/Ah6i/EXi+X77vV PhqjrJDdznHgGQYBexXUTGuVqpa5110USfShOzHSTcvJDJH8dB/ZXVKtiL+yOUZ1fKzL cgL2KKrxnCNn7k6kCsm3t0aiOzj9nywSK2bmjLqTjRUSKMsGXXfU08ZW78R/DXS+gmPx DvmecJFJwWV+APIfPg+wsr+JjtYzcAw12XhS6aODRo9XLGDwpf6oVZhCCTNumEiByX+7 lhY03Hdk5q/mcJhFuZCuW95zlgzwzmyYfIybzyKQFm8TNVLzCOe69QultsXAnnzUIGFS qBcQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Utilize that relatively new helper which makes code a bit cleaner. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/dc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 5b1f9ff97576..14834cba5455 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -2421,7 +2421,6 @@ static int tegra_dc_couple(struct tegra_dc *dc) static int tegra_dc_probe(struct platform_device *pdev) { - struct resource *regs; struct tegra_dc *dc; int err; @@ -2478,8 +2477,7 @@ static int tegra_dc_probe(struct platform_device *pdev) tegra_powergate_power_off(dc->powergate); } - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dc->regs = devm_ioremap_resource(&pdev->dev, regs); + dc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dc->regs)) return PTR_ERR(dc->regs); From patchwork Mon Nov 18 20:02:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251071 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C595138C for ; Tue, 19 Nov 2019 08:05:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74E62222EF for ; Tue, 19 Nov 2019 08:05:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74E62222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 204FB6EB90; Tue, 19 Nov 2019 08:04:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 187136E826 for ; Mon, 18 Nov 2019 20:05:57 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id t5so20467159ljk.0 for ; Mon, 18 Nov 2019 12:05:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QyTaXEZ3tQr6gf1Qv+aBwt97ClEn/+4wm6FeUO95GEc=; b=pDUEqJJQag6+v08YN5Z4i4xNgqNQ+zPSnljdPqYSOTa+QPHJ8pX5aQNHjIS2OJnFkn 3bD3OyKsWgHGMh2dTLM6ys3yn4/tmuLMuG7kTh97SvOu88OMYiSCDg7KFydKhOq+7nHS WFy/72jdyTcB+Y9y/QORb1Ew47LBnHebVgSBcnhCqpwpcm9HU9kKSbvSpiCta7QPa7aA ZHAsXPAU6oiUdZUazQRpBMbQEg9BuWKfw6Oug8Er3hMIfKARw2SmhaXcA+1IiYJJ831r 99Jxv2yxdFsBOunuE3FcbgVE/ZCD++W6AWK9kw32xUSR82MYXo2EpJ15+cNbM4+RYbTk kWSA== X-Gm-Message-State: APjAAAUs1XW1lWbERZKTWlvxn5I9jgZ37KYVfuk699QlPQZp9yJvXy5M 4ra9190iIS+mk85Jezk1Lxk= X-Google-Smtp-Source: APXvYqxzajfDxRsiMW98EBWaSsQPOP+h84fAddaOImVLVQhLDtN+yixqM2y+1kQbQvnGBDX3bmAHIA== X-Received: by 2002:a05:651c:331:: with SMTP id b17mr890995ljp.133.1574107555600; Mon, 18 Nov 2019 12:05:55 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:55 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 25/29] drm/tegra: dc: Release PM and RGB output when client's registration fails Date: Mon, 18 Nov 2019 23:02:43 +0300 Message-Id: <20191118200247.3567-26-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QyTaXEZ3tQr6gf1Qv+aBwt97ClEn/+4wm6FeUO95GEc=; b=DwLNp0YwsQKuC9IcpcWDPUPMzmzkWJvboxFQdmvJYossT+E0yerpmntNXmzqiPEHlR URDoWmUIV9a6WWkmQKy0yjo777OC4xfq5TVk6hZfUo8II/1Ox20SO/ANeevsBFtTou7V zH4tV7JS7IkK/GpWnNdrOyslCZwwKtg75gW4MzkHhKyFoomAUu3Gt9CknsC4YuRAABSv 1UkrNU60BC+M23SBhiu1Hx5yQ5Pc9mKnZawkeRW+jBU4SEQEgwu2eDMC7TzDXgWdq4RW 7vrAF36bToZJin/g/l1lL/9OvnnrHePbJkT50OC53vk2HMvwY+B1JgTD18jAuIu2id/k WUVw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Runtime PM and RGB output need to be released when host1x client registration fails. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/dc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 14834cba5455..c2c61156cdcf 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -2504,10 +2504,16 @@ static int tegra_dc_probe(struct platform_device *pdev) if (err < 0) { dev_err(&pdev->dev, "failed to register host1x client: %d\n", err); - return err; + goto disable_pm; } return 0; + +disable_pm: + pm_runtime_disable(&pdev->dev); + tegra_dc_rgb_remove(dc); + + return err; } static int tegra_dc_remove(struct platform_device *pdev) From patchwork Mon Nov 18 20:02:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251087 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 374E9138C for ; Tue, 19 Nov 2019 08:06:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FD34222EF for ; Tue, 19 Nov 2019 08:06:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FD34222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 887916EBF2; Tue, 19 Nov 2019 08:04:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 68FB16E829 for ; Mon, 18 Nov 2019 20:05:58 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id m4so15495035ljj.8 for ; Mon, 18 Nov 2019 12:05:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nuz1BcEYsck8xXvuAx6no465QzG7OGwvJ3sC9jHo7/Y=; b=O9e2rfNZsM+EqrgXOkNnAmAaVRV+u9aQx31pqROK/VZXd60MDps/6fn8s7qYxeqQ3z 5pFFoMl1u6uZ/mNwJ+dgCzNINtTQNQZgC4z5WW49M9QiI9vugHiO2gJi32hyRMpNsvMZ 3sH7tBCB5CMS1c+prsyOdb3/X7hQ/VtjqYzoVBOU9+5UntbTD4oV9RAYmn8n0NpIV9Zp BHSqxNxS7nELcb83IeXBZckUZNQXFS7sHsKU8ACadf94B/ye1eJqVciHRxsABYvhKmmW leuBDQ16VPhS0qM5kVpXW1fGuU0QCA3Phc6u9XUp+eYmf7d1AmShmArHwFSMMSqPYtXw HOnw== X-Gm-Message-State: APjAAAUIhYjC8Ym4VYAWK2mLaQI9bHQZu420s8yhTB5hr9wYrwH2SQ12 g8z16TKuKMwGOv8gPuu+bow= X-Google-Smtp-Source: APXvYqyhYhJ7ztyMovZ1MiQtwkAscCbe0gkfGOrZ6XqzJMvebaMVZfQSkKVE5yVPpf0nfopJV71yWw== X-Received: by 2002:a2e:9256:: with SMTP id v22mr898223ljg.124.1574107556687; Mon, 18 Nov 2019 12:05:56 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:56 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 26/29] drm/tegra: dc: Support memory bandwidth management Date: Mon, 18 Nov 2019 23:02:44 +0300 Message-Id: <20191118200247.3567-27-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nuz1BcEYsck8xXvuAx6no465QzG7OGwvJ3sC9jHo7/Y=; b=uh1visuScvodNh0T8pHBqf2GB2+HNTFTQhIPhDeLDok+7qBEvrWAAtnI/A1CAaLpl9 5FFdbEfyBubZFVgpmhJmFAtN5ZLyl1/jLAplsfXd3TxVyvwtrkbZ7aOl5iOKk70S1qZH L6t8faaBy+8iBwgHyQ+JXhs0q5PH+1qU9sA3dk4IP1yhF2pPxv7UMkdqprSh2TH+eFED EAwMXoziIq6fPfpJfJBvoDA5Xa3JQFdS6/ZfBjYf3mAwz73qHRIs5DtxNfo1Ippb5ZEZ qKOD1urA2W0hEjrH6kgemlQLkm1z50WScTg4p49NVoNUfZ7Lx1UbdOLTCy1/N3lgzPvM 770A== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Display controller (DC) performs isochronous memory transfers and thus has a requirement for a minimum memory bandwidth that shall be fulfilled, otherwise framebuffer data can't be fetched fast enough and this results in a DC's data-FIFO underflow that follows by a visual corruption. The External Memory Controller drivers provide facility for memory bandwidth management via interconnect API. This patch wires up the interconnect API support to the DC driver. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/dc.c | 240 +++++++++++++++++++++++++++++++++- drivers/gpu/drm/tegra/dc.h | 8 ++ drivers/gpu/drm/tegra/drm.c | 18 +++ drivers/gpu/drm/tegra/plane.c | 1 + drivers/gpu/drm/tegra/plane.h | 4 +- 5 files changed, 269 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index c2c61156cdcf..c60a0c00d95f 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -519,6 +519,122 @@ static void tegra_dc_setup_window(struct tegra_plane *plane, tegra_plane_setup_blending(plane, window); } +static unsigned long +tegra_plane_memory_bandwidth(struct drm_plane_state *state, + struct tegra_dc_window *window) +{ + struct tegra_plane_state *tegra_state; + struct drm_crtc_state *crtc_state; + const struct drm_format_info *fmt; + struct tegra_dc_window win; + unsigned int bpp_plane; + unsigned int bpp; + unsigned int mul; + unsigned int i; + + if (!state->fb || !state->visible) + return 0; + + crtc_state = drm_atomic_get_new_crtc_state(state->state, state->crtc); + tegra_state = to_tegra_plane_state(state); + + if (!window) + window = &win; + + window->src.w = drm_rect_width(&state->src) >> 16; + window->src.h = drm_rect_height(&state->src) >> 16; + window->dst.w = drm_rect_width(&state->dst); + window->dst.h = drm_rect_height(&state->dst); + window->tiling = tegra_state->tiling; + + fmt = state->fb->format; + + /* + * Note that real memory bandwidth vary depending on format and + * memory layout, we are not taking that into account because small + * estimation error isn't important since bandwidth is rounded up + * anyway. + */ + for (i = 0, bpp = 0; i < fmt->num_planes; i++) { + bpp_plane = fmt->cpp[i] * 8; + + /* + * Sub-sampling is relevant for chroma planes only and vertical + * readouts are not cached, hence only horizontal sub-sampling + * matters. + */ + if (i > 0) + bpp_plane /= fmt->hsub; + + bpp += bpp_plane; + } + + /* + * Horizontal downscale takes extra bandwidth which roughly depends + * on the scaled width. + */ + if (window->src.w > window->dst.w) + mul = (window->src.w - window->dst.w) * bpp / 2048 + 1; + else + mul = 1; + + /* + * Ignore window if its width is small enough such that data-prefetch + * FIFO will easily help to overcome temporal memory pressure. This is + * a typical case for the cursor's plane. + */ + if (mul == 1 && window->src.w * bpp <= 2048) + return 0; + + /* mode.clock in kHz, bandwidth in kbit/s */ + return kbps_to_icc(crtc_state->mode.clock * bpp * mul); +} + +static unsigned long +tegra20_plane_memory_bandwidth(struct drm_plane_state *state) +{ + /* ~35% efficiency */ + return tegra_plane_memory_bandwidth(state, NULL) * 29 / 10; +} + +static unsigned long +tegra30_plane_memory_bandwidth(struct drm_plane_state *state) +{ + struct tegra_dc_window window; + unsigned long bandwidth; + + bandwidth = tegra_plane_memory_bandwidth(state, &window); + + /* x2: memory overfetch for tiled framebuffer and DDR3 */ + if (window.tiling.mode == TEGRA_BO_TILING_MODE_TILED) + bandwidth *= 2; + + /* ~35% efficiency */ + return bandwidth * 29 / 10; +} + +static unsigned long +tegra114_plane_memory_bandwidth(struct drm_plane_state *state) +{ + struct tegra_dc_window window; + unsigned long bandwidth; + + bandwidth = tegra_plane_memory_bandwidth(state, &window); + + /* x2: memory overfetch for tiled framebuffer and DDR3 */ + if (window.tiling.mode == TEGRA_BO_TILING_MODE_TILED) + bandwidth *= 2; + + return bandwidth; +} + +static unsigned long +tegra124_plane_memory_bandwidth(struct drm_plane_state *state) +{ + /* 64bit memory bus */ + return tegra_plane_memory_bandwidth(state, NULL); +} + static const u32 tegra20_primary_formats[] = { DRM_FORMAT_ARGB4444, DRM_FORMAT_ARGB1555, @@ -608,8 +724,10 @@ static int tegra_plane_atomic_check(struct drm_plane *plane, int err; /* no need for further checks if the plane is being disabled */ - if (!state->crtc) + if (!state->crtc) { + plane_state->memory_bandwidth = 0; return 0; + } err = tegra_plane_format(state->fb->format->format, &plane_state->format, @@ -662,6 +780,8 @@ static int tegra_plane_atomic_check(struct drm_plane *plane, if (err < 0) return err; + plane_state->memory_bandwidth = dc->soc->plane_memory_bandwidth(state); + return 0; } @@ -1186,6 +1306,7 @@ tegra_crtc_atomic_duplicate_state(struct drm_crtc *crtc) copy->pclk = state->pclk; copy->div = state->div; copy->planes = state->planes; + copy->memory_bandwidth = state->memory_bandwidth; return ©->base; } @@ -1774,6 +1895,8 @@ static void tegra_crtc_atomic_disable(struct drm_crtc *crtc, spin_unlock_irq(&crtc->dev->event_lock); pm_runtime_put_sync(dc->dev); + + icc_set_bw(dc->icc, 0, 0); } static void tegra_crtc_atomic_enable(struct drm_crtc *crtc, @@ -1784,6 +1907,8 @@ static void tegra_crtc_atomic_enable(struct drm_crtc *crtc, struct tegra_dc *dc = to_tegra_dc(crtc); u32 value; + icc_set_bw(dc->icc, state->memory_bandwidth, state->memory_bandwidth); + pm_runtime_get_sync(dc->dev); /* initialize display controller */ @@ -1893,6 +2018,9 @@ static void tegra_crtc_atomic_enable(struct drm_crtc *crtc, static void tegra_crtc_atomic_begin(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state) { + struct tegra_dc_state *dc_old_state = to_dc_state(old_crtc_state); + struct tegra_dc_state *dc_state = to_dc_state(crtc->state); + struct tegra_dc *dc = to_tegra_dc(crtc); unsigned long flags; if (crtc->state->event) { @@ -1907,6 +2035,25 @@ static void tegra_crtc_atomic_begin(struct drm_crtc *crtc, crtc->state->event = NULL; } + + if (old_crtc_state && old_crtc_state->active) { + /* + * Raise memory bandwidth before changes take effect if it + * goes from low to high. + */ + if (dc_old_state->memory_bandwidth < dc_state->memory_bandwidth) + icc_set_bw(dc->icc, + dc_state->memory_bandwidth, + dc_state->memory_bandwidth); + } else { + /* + * Raise memory bandwidth before changes take effect if + * CRTC is turning on. + */ + icc_set_bw(dc->icc, + dc_state->memory_bandwidth, + dc_state->memory_bandwidth); + } } static void tegra_crtc_atomic_flush(struct drm_crtc *crtc, @@ -1925,7 +2072,79 @@ static void tegra_crtc_atomic_flush(struct drm_crtc *crtc, value = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL); } +static bool +tegra_plane_intersects_with_other_plane(struct drm_crtc_state *state, + const struct drm_plane_state *plane_state) +{ + const struct drm_plane_state *other_state; + struct drm_plane *plane; + struct drm_rect rect; + + drm_atomic_crtc_state_for_each_plane_state(plane, other_state, state) { + rect = plane_state->dst; + + if (other_state == plane_state) + continue; + + if (!other_state->visible || !other_state->fb) + continue; + + if (drm_rect_intersect(&rect, &other_state->dst)) + return true; + } + + return false; +} + +static int tegra_crtc_atomic_check(struct drm_crtc *crtc, + struct drm_crtc_state *state) +{ + struct tegra_dc_state *dc_state = to_dc_state(state); + const struct drm_plane_state *plane_state; + const struct tegra_plane_state *tegra; + unsigned long long bandwidth = 0; + struct drm_plane *plane; + + /* + * For overlapping planes pixel's data is fetched for each plane at + * the same time, hence bandwidth is accumulated in this case. + */ + drm_atomic_crtc_state_for_each_plane_state(plane, plane_state, state) { + tegra = to_tegra_plane_state(plane_state); + + if (tegra_plane_intersects_with_other_plane(state, plane_state)) + bandwidth += tegra->memory_bandwidth; + else + bandwidth = max(bandwidth, (u64)tegra->memory_bandwidth); + } + + dc_state->memory_bandwidth = min(bandwidth, (u64)U32_MAX); + + return 0; +} + +void tegra_crtc_atomic_post_commit(struct drm_crtc *crtc, + struct drm_crtc_state *old_crtc_state) +{ + struct tegra_dc_state *dc_old_state = to_dc_state(old_crtc_state); + struct tegra_dc_state *dc_state = to_dc_state(crtc->state); + struct tegra_dc *dc = to_tegra_dc(crtc); + + if (!dc_old_state) + return; + + /* + * Drop memory bandwidth after changes take effect if it goes from + * high to low. + */ + if (dc_old_state->memory_bandwidth > dc_state->memory_bandwidth) + icc_set_bw(dc->icc, + dc_state->memory_bandwidth, + dc_state->memory_bandwidth); +} + static const struct drm_crtc_helper_funcs tegra_crtc_helper_funcs = { + .atomic_check = tegra_crtc_atomic_check, .atomic_begin = tegra_crtc_atomic_begin, .atomic_flush = tegra_crtc_atomic_flush, .atomic_enable = tegra_crtc_atomic_enable, @@ -2143,6 +2362,7 @@ static const struct tegra_dc_soc_info tegra20_dc_soc_info = { .modifiers = tegra20_modifiers, .has_win_a_without_filters = true, .has_win_c_without_vert_filter = true, + .plane_memory_bandwidth = tegra20_plane_memory_bandwidth, }; static const struct tegra_dc_soc_info tegra30_dc_soc_info = { @@ -2162,6 +2382,7 @@ static const struct tegra_dc_soc_info tegra30_dc_soc_info = { .modifiers = tegra20_modifiers, .has_win_a_without_filters = false, .has_win_c_without_vert_filter = false, + .plane_memory_bandwidth = tegra30_plane_memory_bandwidth, }; static const struct tegra_dc_soc_info tegra114_dc_soc_info = { @@ -2181,6 +2402,7 @@ static const struct tegra_dc_soc_info tegra114_dc_soc_info = { .modifiers = tegra20_modifiers, .has_win_a_without_filters = false, .has_win_c_without_vert_filter = false, + .plane_memory_bandwidth = tegra114_plane_memory_bandwidth, }; static const struct tegra_dc_soc_info tegra124_dc_soc_info = { @@ -2200,6 +2422,7 @@ static const struct tegra_dc_soc_info tegra124_dc_soc_info = { .modifiers = tegra124_modifiers, .has_win_a_without_filters = false, .has_win_c_without_vert_filter = false, + .plane_memory_bandwidth = tegra124_plane_memory_bandwidth, }; static const struct tegra_dc_soc_info tegra210_dc_soc_info = { @@ -2219,6 +2442,7 @@ static const struct tegra_dc_soc_info tegra210_dc_soc_info = { .modifiers = tegra124_modifiers, .has_win_a_without_filters = false, .has_win_c_without_vert_filter = false, + .plane_memory_bandwidth = tegra124_plane_memory_bandwidth, }; static const struct tegra_windowgroup_soc tegra186_dc_wgrps[] = { @@ -2267,6 +2491,7 @@ static const struct tegra_dc_soc_info tegra186_dc_soc_info = { .has_nvdisplay = true, .wgrps = tegra186_dc_wgrps, .num_wgrps = ARRAY_SIZE(tegra186_dc_wgrps), + .plane_memory_bandwidth = tegra124_plane_memory_bandwidth, }; static const struct tegra_windowgroup_soc tegra194_dc_wgrps[] = { @@ -2315,6 +2540,7 @@ static const struct tegra_dc_soc_info tegra194_dc_soc_info = { .has_nvdisplay = true, .wgrps = tegra194_dc_wgrps, .num_wgrps = ARRAY_SIZE(tegra194_dc_wgrps), + .plane_memory_bandwidth = tegra124_plane_memory_bandwidth, }; static const struct of_device_id tegra_dc_of_match[] = { @@ -2493,6 +2719,13 @@ static int tegra_dc_probe(struct platform_device *pdev) return err; } + dc->icc = of_icc_get(dc->dev, "dma-mem"); + err = PTR_ERR_OR_ZERO(dc->icc); + if (err) { + dev_err(dc->dev, "failed to get interconnect: %d\n", err); + goto remove_rgb; + } + platform_set_drvdata(pdev, dc); pm_runtime_enable(&pdev->dev); @@ -2511,6 +2744,9 @@ static int tegra_dc_probe(struct platform_device *pdev) disable_pm: pm_runtime_disable(&pdev->dev); + icc_put(dc->icc); + +remove_rgb: tegra_dc_rgb_remove(dc); return err; @@ -2528,6 +2764,8 @@ static int tegra_dc_remove(struct platform_device *pdev) return err; } + icc_put(dc->icc); + err = tegra_dc_rgb_remove(dc); if (err < 0) { dev_err(&pdev->dev, "failed to remove RGB output: %d\n", err); diff --git a/drivers/gpu/drm/tegra/dc.h b/drivers/gpu/drm/tegra/dc.h index 3d8ddccd758f..629b379a8207 100644 --- a/drivers/gpu/drm/tegra/dc.h +++ b/drivers/gpu/drm/tegra/dc.h @@ -8,6 +8,7 @@ #define TEGRA_DC_H 1 #include +#include #include @@ -23,6 +24,8 @@ struct tegra_dc_state { unsigned int div; u32 planes; + + unsigned long memory_bandwidth; }; static inline struct tegra_dc_state *to_dc_state(struct drm_crtc_state *state) @@ -66,6 +69,7 @@ struct tegra_dc_soc_info { const u64 *modifiers; bool has_win_a_without_filters; bool has_win_c_without_vert_filter; + unsigned long (*plane_memory_bandwidth)(struct drm_plane_state *state); }; struct tegra_dc { @@ -90,6 +94,8 @@ struct tegra_dc { struct drm_info_list *debugfs_files; const struct tegra_dc_soc_info *soc; + + struct icc_path *icc; }; static inline struct tegra_dc * @@ -150,6 +156,8 @@ int tegra_dc_state_setup_clock(struct tegra_dc *dc, struct drm_crtc_state *crtc_state, struct clk *clk, unsigned long pclk, unsigned int div); +void tegra_crtc_atomic_post_commit(struct drm_crtc *crtc, + struct drm_crtc_state *old_crtc_state); /* from rgb.c */ int tegra_dc_rgb_probe(struct tegra_dc *dc); diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 56e5e7a5c108..ccce91ea7180 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -20,6 +20,7 @@ #include #include +#include "dc.h" #include "drm.h" #include "gem.h" @@ -59,6 +60,21 @@ static const struct drm_mode_config_funcs tegra_drm_mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; +static void tegra_atomic_post_commit(struct drm_device *drm, + struct drm_atomic_state *old_state) +{ + struct drm_crtc_state *old_crtc_state, *new_crtc_state; + struct drm_crtc *crtc; + int i; + + for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { + if (!new_crtc_state->active) + continue; + + tegra_crtc_atomic_post_commit(crtc, old_crtc_state); + } +} + static void tegra_atomic_commit_tail(struct drm_atomic_state *old_state) { struct drm_device *drm = old_state->dev; @@ -75,6 +91,8 @@ static void tegra_atomic_commit_tail(struct drm_atomic_state *old_state) } else { drm_atomic_helper_commit_tail_rpm(old_state); } + + tegra_atomic_post_commit(drm, old_state); } static const struct drm_mode_config_helper_funcs diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c index 163b590be224..1f482e594dc9 100644 --- a/drivers/gpu/drm/tegra/plane.c +++ b/drivers/gpu/drm/tegra/plane.c @@ -61,6 +61,7 @@ tegra_plane_atomic_duplicate_state(struct drm_plane *plane) copy->swap = state->swap; copy->bottom_up = state->bottom_up; copy->opaque = state->opaque; + copy->memory_bandwidth = state->memory_bandwidth; for (i = 0; i < 2; i++) copy->blending[i] = state->blending[i]; diff --git a/drivers/gpu/drm/tegra/plane.h b/drivers/gpu/drm/tegra/plane.h index a158a915109a..5227c7a9ad8b 100644 --- a/drivers/gpu/drm/tegra/plane.h +++ b/drivers/gpu/drm/tegra/plane.h @@ -51,10 +51,12 @@ struct tegra_plane_state { /* used for legacy blending support only */ struct tegra_plane_legacy_blending_state blending[2]; bool opaque; + + unsigned long memory_bandwidth; }; static inline struct tegra_plane_state * -to_tegra_plane_state(struct drm_plane_state *state) +to_tegra_plane_state(const struct drm_plane_state *state) { if (state) return container_of(state, struct tegra_plane_state, base); From patchwork Mon Nov 18 20:02:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251079 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C84C138C for ; Tue, 19 Nov 2019 08:06:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E7C18222EF for ; Tue, 19 Nov 2019 08:06:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7C18222EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E66F36EBF9; Tue, 19 Nov 2019 08:04:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 188216E822 for ; Mon, 18 Nov 2019 20:05:59 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id k15so20442793lja.3 for ; Mon, 18 Nov 2019 12:05:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HgBM+uLJzoi65GUvGQFaYj+Mc0O6qp6cGsFHcfSLMpM=; b=FrQ82dPq446On0PbfFE8qsstij0ioPA/MGlWfpk5j30w0uXM5UybOzWd5H8ZxFBq7Z aRoH/CxihD9TW7QMLULKJ8d7L6+jpGgvoyWSkIiW/tFANqTHlR4tF4Vm9//xCB8oHeD9 9o/JxMaksNK59v8NXGb1SzCyrwz5g20U3ekEZZ4FQW96QaJT9JaVYXKOb5GdMGWBIMr4 6CRgD8Q8t1fCBUrXsoLsL4zwA5BjlSOW4bT09+p9MQHaPBbYgDxCdW5m+HgapF7OEOoX PDF+4ZXRGJT8JwsHo1t+XFX0/ExjY8iuWtISeGG46X+xFT4X9BN88F/a7/wefDyfE3T4 a3lg== X-Gm-Message-State: APjAAAVJjRNqDkM5yJ1XJN8NDAaihZCV7+25XU0nohNtYo0f0c+7rwSf CDwBOJ6P+uoZT74y7raiI8xmRcUb X-Google-Smtp-Source: APXvYqyfW0WKhD1uVA2rVUoy/KYxAGfvlAfMguWfPRJtCNfwA2lZLJ/fI3hIYDfY/IysuOAaUSc38g== X-Received: by 2002:a2e:3313:: with SMTP id d19mr931296ljc.240.1574107557638; Mon, 18 Nov 2019 12:05:57 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:57 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 27/29] ARM: tegra: Enable interconnect API in tegra_defconfig Date: Mon, 18 Nov 2019 23:02:45 +0300 Message-Id: <20191118200247.3567-28-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HgBM+uLJzoi65GUvGQFaYj+Mc0O6qp6cGsFHcfSLMpM=; b=BJ4fv0AwnApXCJ/jzU5KhwRXyOGjsTvs6Mjqo8PeutmkRPOV9rVFv8VtjRT1Ktniec Dt7kfpJNBeslPkg98uTYJA9Sw3O43bAD6SbTKcztfhjKY+F2/gko1DR3Ln2KCmQK911q WEKQlxYeeW1b+ZbBTGakvw5mOC4zr9RIAIJDhVFasyx/YTsmqSg4WO/Be2z9vOmEKZK6 Vj0LAPaIYyqehAMAPob+y6AMWPUZTLd6xE80C0rixvgo8Ameqz+NIU5Te3r1x8vF49A8 C5D7VRT6rUMiFuqceETgcghI2iejY4HASEus2rOUoe6anWfQkEWU2egEy5Eg7oiy6fAE CVqA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Tegra now has interconnect providers that are used for memory bandwidth allocation by display driver. Signed-off-by: Dmitry Osipenko --- arch/arm/configs/tegra_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index aa94369bdd0f..02e3a987f69f 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig @@ -268,6 +268,8 @@ CONFIG_AK8975=y CONFIG_PWM=y CONFIG_PWM_TEGRA=y CONFIG_PHY_TEGRA_XUSB=y +CONFIG_INTERCONNECT=y +CONFIG_INTERCONNECT_TEGRA=y CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y From patchwork Mon Nov 18 20:02:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251043 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 98F246C1 for ; Tue, 19 Nov 2019 08:05:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F669222F2 for ; Tue, 19 Nov 2019 08:05:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F669222F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06FBD6EBC0; Tue, 19 Nov 2019 08:04:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 10F456E827 for ; Mon, 18 Nov 2019 20:06:00 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id k15so20442857lja.3 for ; Mon, 18 Nov 2019 12:05:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b+FC1Ebz4V/tdD/aZtuLhFg4JYDJSNGd7mh8RgwKtsY=; b=UgwzvVz6I3HaukfopqWVFYPuQvvUDODWdO06OcYwe6Nq2ADSLPvsI6qBjTDREvsCVi /ECCEXtVc4PIb2ctXceL8r/82Y7mN5h0L9uxE541mHVmDuQMoefzwzdJg5+piXCcIVOV WHIPPIylqNF19CNAotNt1xzFZ1SPeX2e+4zN9HMJCfGCTdIIAvviS1bP5+j2MWCrEeOR 4V8z6k3n16oLTRawhwjtcb9ofUltrdzIt9HWnioUSZLTLZIXanUDom9e5QvVjJZIn23g pv0ot/EfQr9m0owXaPTTlntTHpaevPz6VvNZIRCbe+8V4EMArzViXkUztH/oZFj9Eett yb+Q== X-Gm-Message-State: APjAAAVJp6Kv+L7Eij/MllXwR/404cA97Lvm62gZYrHVvqBDwLQMO4Qv e8vKq4G+7Uk7KG5hZWNgUSU= X-Google-Smtp-Source: APXvYqxUTBrjlS5fpAxANC6wrqNZBFzKWst5uBs3YxOhqljqy1cqcRm52+irbhLhBkB22FMaIFMs2w== X-Received: by 2002:a05:651c:20f:: with SMTP id y15mr890330ljn.31.1574107558631; Mon, 18 Nov 2019 12:05:58 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:58 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 28/29] ARM: multi_v7_defconfig: Enable NVIDIA Tegra interconnect providers Date: Mon, 18 Nov 2019 23:02:46 +0300 Message-Id: <20191118200247.3567-29-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b+FC1Ebz4V/tdD/aZtuLhFg4JYDJSNGd7mh8RgwKtsY=; b=H8d5vixAZh3pIcUcjoKGYvCRv2xI8bcCjulrLFsiJ3Wnxxj3JVyE2TbRbpPt/X0fLf Gw2IRXMWWl5aYik28WIzedXrgIqCkfE+8/DOUXrp3RBO2bTvguPPX4iR/fgY+12bsk+d QCpu4/m6YyjR5NA/cQ87YB4L9Yabr23tItQ9tL4pe7VFD9jGp8+DRxfMgXQDJCfoZPjO TJiOsZZPxdbBT1dXFyMoS7zd1hWzY2lcQHDEj6xjK8nl0x2HnxFiGU3GgfToVo3bZ1+R EcAIbIC2bOQB005pnu7W8gtDxRa+btulmpGLbEdXSLPMJ0rwwYatXZ2nlS5ww5Wlhud2 MUvQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Tegra now has interconnect providers that are used for memory bandwidth allocation by display driver. Signed-off-by: Dmitry Osipenko --- arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 293f0cea076c..c131d7969aa3 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -1085,6 +1085,8 @@ CONFIG_FSI_MASTER_ASPEED=m CONFIG_FSI_SCOM=m CONFIG_FSI_SBEFIFO=m CONFIG_FSI_OCC=m +CONFIG_INTERCONNECT=y +CONFIG_INTERCONNECT_TEGRA=y CONFIG_EXT4_FS=y CONFIG_AUTOFS4_FS=y CONFIG_MSDOS_FS=y From patchwork Mon Nov 18 20:02:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11251101 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5671F138C for ; Tue, 19 Nov 2019 08:06:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3EE66222C7 for ; Tue, 19 Nov 2019 08:06:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3EE66222C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3BDD96EBD6; Tue, 19 Nov 2019 08:06:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 164276E81F for ; Mon, 18 Nov 2019 20:06:01 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id n21so20394314ljg.12 for ; Mon, 18 Nov 2019 12:06:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pTMYCgIgvCNm1q2JaoM7zr2eJ5iQIuvTMHSD1CcRgH4=; b=k79sqx4vDOIAAcNxrF4ww1uFyHN8mO5/euW5fw+OQEzujmjw80t4us1zZv5Gum0YXd tp2OsVIxRjPUV8vxZm2JH+Hplu5+RFBeMpljGJ+Y2oxQmz8PWkhwc6NvnIpQbo8WYw3a Vg/3M8tazvhe0IFO2U4OydpkiUPadkUt3pH5AJWt0KEVvD71R458OtTWhR2p4CLDWbxE SUUF21DYR9/9k/fxOFAOCVQr5Tih402BjcZ/F/WuiB6MrQxS9+XCd8FxY0dn5cWg8WJQ 5LR0TN7cfsJ12IciWiJ1OE4A9RxD4o+92ITwHrwOm+HwmAK8jUcBmhk2UynnKzIhYA46 Nk6Q== X-Gm-Message-State: APjAAAViXpyGYXxxosiziOJVkqK9buhinVej/reqQz3zknY3Nypg8wqQ 09xoXzDsx4gq/6CZs7C3WRc= X-Google-Smtp-Source: APXvYqyHgybcG5MMZcJRPRCQEbkIktBAw9M79vtA0GyQaow6feMEG7kPjNrNfppBRmcsYR1tJhTMlA== X-Received: by 2002:a2e:9841:: with SMTP id e1mr922343ljj.19.1574107559605; Mon, 18 Nov 2019 12:05:59 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id j23sm9166942lji.41.2019.11.18.12.05.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 12:05:59 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Mikko Perttunen , Georgi Djakov , Rob Herring Subject: [PATCH v1 29/29] MAINTAINERS: Add maintainers for NVIDIA Tegra interconnect drivers Date: Mon, 18 Nov 2019 23:02:47 +0300 Message-Id: <20191118200247.3567-30-digetx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118200247.3567-1-digetx@gmail.com> References: <20191118200247.3567-1-digetx@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 19 Nov 2019 08:04:07 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pTMYCgIgvCNm1q2JaoM7zr2eJ5iQIuvTMHSD1CcRgH4=; b=Pmcz5aQvG4kdoLoEesuweo15xnoulLsuqWT1ryquWf4xC5WKJlk7sQdtOvmwi/NpWC gTAyERPFtJNkUzqd4x4Y9rBPZWSbynQmALOKWutfXwNS4xK3fO7jjK2GDLacc/aQ4LcP +q4GSBo7nTObUfUYvEZA+5mjAci1NekYCRzqfnTxFjX2jCG1NoMyuG0ndkiuNDkNIZw6 YUmu0ciM2Q5HNUftUJWbOm6oRtbezUhpkApFq69Za9Q7EyPkCVilwY6lLCRBUpkcV6Ls ScgNRa7PKIQ7q4LUjwPPhiQtna7RDkugFnxfY8NTockXYQp6rNkhVgPmUdt6uv+EVWEa hi+Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Dmitry and Thierry will maintain NVIDIA Tegra interconnect drivers. Signed-off-by: Dmitry Osipenko --- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 51bf69f520e8..fd82089edad6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8614,6 +8614,15 @@ F: include/dt-bindings/interconnect/ F: include/linux/interconnect-provider.h F: include/linux/interconnect.h +INTERCONNECT DRIVERS FOR NVIDIA TEGRA +R: Dmitry Osipenko +S: Thierry Reding +L: linux-pm@vger.kernel.org +L: linux-tegra@vger.kernel.org +S: Supported +F: drivers/interconnect/tegra/ +F: include/dt-bindings/interconnect/tegra-icc.h + INVENSENSE MPU-3050 GYROSCOPE DRIVER M: Linus Walleij L: linux-iio@vger.kernel.org