Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4869489pjb; Mon, 27 Jul 2020 07:14:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU+YgpNgGvSYRq4yCKW8THM4PYpF6NNKNNUxUuol+/AFBGHz1xQTMqmolzuXh5drqDoXJX X-Received: by 2002:a17:906:36da:: with SMTP id b26mr12428486ejc.45.1595859278744; Mon, 27 Jul 2020 07:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859278; cv=none; d=google.com; s=arc-20160816; b=oDVYcYLk03oCBC2xCt1zve95G6BIIlkEl7zRH32lejbDEAqdeKSmx00bnxU8cvY81C etd1zf/WlFpeSlXXMMF6YoosN7nFxB1qaJqgVnhfp+Z4UInIqJD2lVXWJjozoM/C9GEp gE/QrCHSbtdAQHbU70c+jJbcl74tSbIrY4q6A1yazFYYQevnRFfenD1vPPHo+BE/yBQD t29uq6gA/fOEmmgzsfka94OSRqcGtaVdoglWXgjzPB6DQXgek8E8mmXKbrj4mLkxq7P+ 0BFSFSYkKPFzUcKUWWDLW7AvyBJdnKTaonmqFvssVYJbPjn5nO48u8qpUh1CzprK72gP QH+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bHapzJ0P6xUuZ32/Fm3FmLxN3+W0YiwvdWtul3bH0zc=; b=c7kuzzqxi+HR39SkkPzAYbmp+SLbThJvBtOb8qGoGGXJJHWpQ0g3ovAmngxGnzkjDp TSaZ9wjz107TDx7g/HXlZxTbKz1fsTJIHPb/+iitZCGCQyWlrWJvZNYXvxR2bKoNNQrr P0TdBf2yHa6cN+yABJfqaGmEbLZ56eoYRc5d2GRJYKEFDymIcp2+hAMlU7UvU1LYhzWt lU3IqftDUDJgBF3scC6w3PyOqVMj36TWtHFCXQH1n289Vcq0hGu7pQX3Ebx76enASSlh 3VNPLdYur67MI0vq1H5bT3EBVZ+GRRD6Q4mA89SRtVRAF6PwQPzWmLN3xXn4c+kpEyA0 7ZpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=B8ffA7US; 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 a20si4531446ejx.257.2020.07.27.07.14.15; Mon, 27 Jul 2020 07:14:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=B8ffA7US; 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 S1730259AbgG0OMr (ORCPT + 99 others); Mon, 27 Jul 2020 10:12:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730231AbgG0OMn (ORCPT ); Mon, 27 Jul 2020 10:12:43 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0481C0619D2 for ; Mon, 27 Jul 2020 07:12:42 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id o10so2573027edh.6 for ; Mon, 27 Jul 2020 07:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bHapzJ0P6xUuZ32/Fm3FmLxN3+W0YiwvdWtul3bH0zc=; b=B8ffA7US+1YKsKILPUPB+8nSLr6m3RTdAtBDehe3oxJyYQ7mRu0QiHt38w+fEdoQLG jdtbJLjSnRSRs/U27O/03LK5W+gje6bfwur455MeP9VxwLT2oacer2EFrUSWfGQTiLPB 4h1da6SxVTQRL/KFHQX9UU1+yoqZj9ixBqaNUTqHfI65CDLmTa5U4K/qYpJ+TliA0tp2 JVZQcMqIOpnHq74+mduHT8TTmn6SyfFisCcaQWuKE/+ebwlkl0D/ua+qRPGv0qGwiZcL 3yq6hBbdW9Ougv+EJhJsaYgbOO5xj0GXvY97kJG3ZLX1bVQmX4PiZjuEtSHUsYJRo6n/ vhgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bHapzJ0P6xUuZ32/Fm3FmLxN3+W0YiwvdWtul3bH0zc=; b=kRoRIf3Q62uoAWSRNMnDwiC2gwBezeQvd6FL2/fIEEYWawMAGLeJSGRR2Hdn2sZk+z OWWN6EdtAIXftJXUG1Dd4KY0x12sJONv+NjiYpjS8+uBQlB4h/uIuWhhistwl38oAhZc TdcG2hl/Dv/+tM5f1N+3ZwN4R4WaoZLWGHoTXPn2eqjOAOKF0Rwqd1qqGR079w8zRCeB jFmHm5BANcxaOjIuOBL/RJnsIBSzqQ+ijS11u86D7rhzEDRBx8sxsgSB7eSvMPHe6v2w E/rLWEML0J80PFlEFsgIWNzpUiBcILKpskdImu7Q4z2JZWsWoILfv8Ctyy/O8PXtYhJ1 1K/Q== X-Gm-Message-State: AOAM5320Dc9faMeTHppvev06dQXftOqK2jla+8Sq0BzmTJGU4Ymi3pwG U6YRM9uWTvo/b+2lwPGW5f6Fc+iAov1aux6SUeEyMQ== X-Received: by 2002:a05:6402:947:: with SMTP id h7mr21787651edz.213.1595859161489; Mon, 27 Jul 2020 07:12:41 -0700 (PDT) MIME-Version: 1.0 References: <20200713060842.471356-1-acourbot@chromium.org> <20200713060842.471356-3-acourbot@chromium.org> In-Reply-To: From: Ezequiel Garcia Date: Mon, 27 Jul 2020 11:12:30 -0300 Message-ID: Subject: Re: [PATCH v3 02/16] dt-bindings: media: mtk-vcodec: document SCP node To: Alexandre Courbot Cc: Tiffany Lin , Andrew-CT Chen , Hans Verkuil , Yunfei Dong , Maoguang Meng , linux-media , "moderated list:ARM/Mediatek SoC support" , devicetree , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Jul 2020 at 06:06, Alexandre Courbot wrote: > > On Thu, Jul 23, 2020 at 6:37 AM Ezequiel Garcia > wrote: > > > > On Mon, 13 Jul 2020 at 03:09, Alexandre Courbot wrote: > > > > > > The mediatek codecs can use either the VPU or the SCP as their interface > > > to firmware. Reflect this in the DT bindings. > > > > > > Signed-off-by: Alexandre Courbot > > > Acked-by: Tiffany Lin > > > --- > > > Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt > > > index b6b5dde6abd8..7aef0a4fe207 100644 > > > --- a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt > > > +++ b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt > > > @@ -19,7 +19,9 @@ Required properties: > > > - iommus : should point to the respective IOMMU block with master port as > > > argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt > > > for details. > > > -- mediatek,vpu : the node of video processor unit > > > +One of the two following nodes: > > > +- mediatek,vpu : the node of the video processor unit, if using VPU. > > > +- mediatek,scp : the noode of the SCP unit, if using SCP. > > > > > > > This interface doesn't enforce the fact only one of the two > > should be present, but not both (which is the case, right?). > > That's correct. > > > > > I hope I'm not bikeshedding here, but from an interface POV, > > would it be cleaner to just have a single mediatek,coprocessor > > property, and then use of_device_is_compatible > > to distinguish VPU from SCP type? > > From an interface point of view maybe, however doing so would > introduce a backward-incompatible change with the existing MT8173 > bindings. I also feel like it is less error-prone to have the property > explicitly state what it is expecting at the other end of the phandle > (vpu or scp) instead of the more generic "coprocessor". > > > > > Moreover, I'd argue you don't need a dt-binding change > > and should just keep the current mediatek-vpu property, > > and then rely on of_device_is_compatible. > > VPU and SCP are different kinds of processors, so I'm not sure whether > it is desirable to use VPU interchangeably like this. Note that I'm > not strongly against it either, but for things like bindings I tend to > prefer precise language to avoid confusions. Yeah, I guess that makes sense. Not only from a language precision point of view (after all DT are not designed to be human readable). But as you mention, given the processors will have different compatible strings it would make sense to not allow overloading the property. In any case, I don't have a strong opinion either. Thanks, Ezequiel