Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1596517ybt; Thu, 2 Jul 2020 09:07:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKzu497qPF1Hls3NISlJNTOnZ+UsVsPeFOTx8Bua1YnwOVQ1t7Ptu6g34x7IhCiFV5Eh9j X-Received: by 2002:a17:906:2318:: with SMTP id l24mr29963114eja.291.1593706024183; Thu, 02 Jul 2020 09:07:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593706024; cv=none; d=google.com; s=arc-20160816; b=FyRMc4KF36dqT8GR0m12Ik5OzZTJErcUIJ0KZYkSBfkoyuxnBOSRUrFnYkFVOJ5fgP TilAWWju52i0knyYsX2te8BkhUFMjdOYQWd1PtGQO8py0ANCYB6YgadflvMKH9jzux8D 1Logb+W7IF/J+NuR1fw8G0zQx2L0L7RWSf4UJfbr6WJO/1cGGUt7oRGD5YJg8iuvFuVh W64EEKUGA2OV4p1x3MhA38P/vQAuiUWFCp69dBj7b/ep49P7/S+nGcoJOBJ6KH6JB32l LNW1zDJ8L+vhNBRf5eUbd45hnDjteDEZpv9w66axH/MnsZD+tcgIOh/VR0fu826Y/2Jo GaAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=kRoPQ0+zzNrUaGPmzNLR8ZgxXIo0HZU6mF18WIxyKFw=; b=0ktZiTCkw1cV4Ch2/zdatdfKNgXXmlu2ZUl3+ol083w7qo+zcVRxXu/XswUm8m2cSB hLUZPgzO2b03CSwMYuYzAHRr2X1jypzqgAofbeFACvCE0OcuK8Znp8zJlUDwQ64qGCe+ vLurIqqIQEXoKVSlDppuJg7u91zNu2F01/OgDL5S0tylEjbL8+NelJo/Kkb5ewHgr/ss Jle3gWsDxDCriYiSlbbrGWm74dcnDf5ZRpxdHI9vSXdRal210kQMjJ3E2RKCT+9/c3Yf DKQDbZ71JkuJha47E9iY3wNGtdfa4YfyDACM9S7OgbQSrDznsJBVY1VHpmYJr4rOOKKK TeYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si6004252edy.370.2020.07.02.09.06.40; Thu, 02 Jul 2020 09:07:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726300AbgGBQFT (ORCPT + 99 others); Thu, 2 Jul 2020 12:05:19 -0400 Received: from foss.arm.com ([217.140.110.172]:38940 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725915AbgGBQFS (ORCPT ); Thu, 2 Jul 2020 12:05:18 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DD53C1FB; Thu, 2 Jul 2020 09:05:17 -0700 (PDT) Received: from [10.57.21.32] (unknown [10.57.21.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D70973F71E; Thu, 2 Jul 2020 09:05:14 -0700 (PDT) Subject: Re: [PATCH v8 2/3] dt-bindings: arm-smmu: Add binding for Tegra194 SMMU To: Krishna Reddy , Jonathan Hunter Cc: "joro@8bytes.org" , "will@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-tegra@vger.kernel.org" , Thierry Reding , Yu-Huan Hsu , Sachin Nikam , Pritesh Raithatha , Timo Alho , Bitan Biswas , Mikko Perttunen , Nicolin Chen , Bryan Huntsman , "nicoleotsuka@gmail.com" References: <20200630001051.12350-1-vdumpa@nvidia.com> <20200630001051.12350-3-vdumpa@nvidia.com> <3e655881-bac4-f083-44ed-cfa0a61298d0@arm.com> <0d4f46d6-6a4e-bca0-bcf3-0e22a950e57b@nvidia.com> From: Robin Murphy Message-ID: <04e35d51-5e65-047d-90ef-a2de901eb15d@arm.com> Date: Thu, 2 Jul 2020 17:05:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-07-01 20:39, Krishna Reddy wrote: > On 01/07/2020 20:00, Krishna Reddy wrote: >>>>>>> + items: >>>>>>> + - enum: >>>>>>> + - nvdia,tegra194-smmu >>>>>>> + - const: arm,mmu-500 >>>>> >>>>>> Is the fallback compatible appropriate here? If software treats this as a standard MMU-500 it will only program the first instance (because the second isn't presented as a separate MMU-500) - is there any way that isn't going to blow up? >>>>> >>>>> When compatible is set to both nvidia,tegra194-smmu and arm,mmu-500, implementation override ensure that both instances are programmed. Isn't it? I am not sure I follow your comment fully. >>> >>>> The problem is, if for some reason someone had a Tegra194, but only set the compatible string to 'arm,mmu-500' it would assume that it was a normal arm,mmu-500 and only one instance would be programmed. We always want at least 2 of the 3 instances >>programmed and so we should only match 'nvidia,tegra194-smmu'. In fact, I think that we also need to update the arm_smmu_of_match table to add 'nvidia,tegra194-smmu' with the data set to &arm_mmu500. >>> >>> In that case, new binding "nvidia,smmu-v2" can be added with data set to &arm_mmu500 and enumeration would have nvidia,tegra194-smmu and another variant for next generation SoC in future. > >> I think you would be better off with nvidia,smmu-500 as smmu-v2 appears to be something different. I see others have a smmu-v2 but I am not sure if that is legacy. We have an smmu-500 and so that would seem more appropriate. > > I tried to use the binding synonymous to other vendors. > V2 is the architecture version. MMU-500 is the actual implementation from ARM based on V2 arch. As we just use the MMU-500 IP as it is, It can be named as nvidia,smmu-500 or similar as well. Yup, that sounds OK to me if you want a broader compatible to potentially match other future SoCs as well. > Others probably having their own implementation based on V2 arch. Exactly - "cavium,smmu-v2" and "qcom,smmu-v2" are their own in-house microarchitectures, not one of Arm's designs, so they don't really have a suitable 'product name' we could have used for the bindings. Robin.