Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp884338ybg; Mon, 27 Jul 2020 02:07:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytMusAm1Eh06ha7wUrIn3kAamx6xzJeqyzSAoseqtCT6g9pnKTbyVPFUBhRdP3Nf0/OqPy X-Received: by 2002:aa7:db10:: with SMTP id t16mr6796758eds.196.1595840865163; Mon, 27 Jul 2020 02:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595840865; cv=none; d=google.com; s=arc-20160816; b=ABGF2017FkuK/szJWUXvRg3M3c5Kxi1YVMOEuXtKtywSUlQtDfPJJXpdWl3aKOvtvV JYrTaUS9V1iJBnksyEUs7Eh20SiQRQm/QVwnywPwK9paeCxTV9EBgUd9s7aeEJ8Otky8 uvchmvIemSySNrbOq3r4lU3AJ890hmAaKfjsj+hgYM41RuFONpP1BYPnD15ecRSB/bl3 EPlm6EQKOoWqEbuB7WCw4rdKCd/eGfAoA/0/6d5C4GDwW8MfTiVYs+Jb0yBK8tCD6yg2 8q0xyeCylYpXkeAc1viBt3VgaifFQN69Toce6oiuIVyuxZ/YV2PqcU1z9VWeeD8Xvf34 cCoQ== 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=9DYPZ/cg5bWE+8mLgqqq5d9bdeBFDbTl2cHuY4OPgV8=; b=YEWHarJx9ZO589KjZ/TSA6NbB75kpiYjrsTFWKk7nwp/CzbQn9i1mJ3h7cBOUtHphk OQoxaZqtzbyth3tgu5T3rPWL1We2bDLgYEiAxnis+L5zzhTslIM5+xcTgZSFSWx+CObR sFmsb1qQB7YB4Ndw3OqmVvxcYtrH3ZnM516gGqimZlZ7BXOVx7U5wyUj7kqjl/GaWF4/ HO4/W2AAYPWY9CX+MtQpgp1Ez0FFWL4OOXkRJIykbVZaZ7HMr4FiKaj63QIihy+x0gNP kwVhFKzZIsWIo/fc03osTeyq6oJoTiMC4/BNVFLZIjdPKvZD5JhtCv2kUfQ0U+NIbcPA sZpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mjEnxSSW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si5103809ejg.203.2020.07.27.02.07.23; Mon, 27 Jul 2020 02:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mjEnxSSW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727842AbgG0JGv (ORCPT + 99 others); Mon, 27 Jul 2020 05:06:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727937AbgG0JGt (ORCPT ); Mon, 27 Jul 2020 05:06:49 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89955C061794 for ; Mon, 27 Jul 2020 02:06:49 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id c25so11772940otf.7 for ; Mon, 27 Jul 2020 02:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9DYPZ/cg5bWE+8mLgqqq5d9bdeBFDbTl2cHuY4OPgV8=; b=mjEnxSSWFDn78QhEXgzlYfh83jJuISJo2pdRp1br6PNji3pirhIc1VAtH1Z/j4oyhV NFTROO0H/SWb6rGbVv/F4z46CtgbeyWbJ5aDTP/EKWrSYArqEHOJpi8ctMUkST74mOwx SKd2hFHI0GgPrHFFYZm/RBbnj7FnmTCCNNz9A= 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=9DYPZ/cg5bWE+8mLgqqq5d9bdeBFDbTl2cHuY4OPgV8=; b=gT1awFGbkIC9gKqd8PxZgASoCTgaM/9MeLuUmyso+F8LeCU9E8DZQXefQZbBiiVpLl 2gm/S53pdQNNLwAAFzskFy8gcm90Gq7pdTjB69wgq9b/OT8PxUQ4evY8qsalixfJE6Gy RhSvHzg6dEDkse9o1Y2lUEZGu8MmymhfbiHVna5FlUJXApqC1ePBJ8fEC+p07idOxJiJ RUAN61HiPjdCLJf5Wm30XAzg94uxhquwOrF+L/+TebHFJTLOZlFdZXnao8ksRhdFN2iC UFufT7sjzETyMK8ACejWwIOMoy6lYfpy6bpoyCpTPW7ZhrFdNhXr2HFPJYbxx5s1m1/B vcYw== X-Gm-Message-State: AOAM533+MvQb/yjDeSKgjFnj4SLinXytitJ+ePFxaqyn/tEpH/Mq9twR jknDVoDW9L8iR40fWJMii92D9HG4QaY= X-Received: by 2002:a9d:6d0c:: with SMTP id o12mr9982832otp.249.1595840807682; Mon, 27 Jul 2020 02:06:47 -0700 (PDT) Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com. [209.85.161.47]) by smtp.gmail.com with ESMTPSA id k16sm3399626otl.63.2020.07.27.02.06.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jul 2020 02:06:46 -0700 (PDT) Received: by mail-oo1-f47.google.com with SMTP id k63so167694oob.1 for ; Mon, 27 Jul 2020 02:06:45 -0700 (PDT) X-Received: by 2002:a05:6820:1015:: with SMTP id v21mr19420231oor.50.1595840804794; Mon, 27 Jul 2020 02:06:44 -0700 (PDT) MIME-Version: 1.0 References: <20200713060842.471356-1-acourbot@chromium.org> <20200713060842.471356-3-acourbot@chromium.org> In-Reply-To: From: Alexandre Courbot Date: Mon, 27 Jul 2020 18:06:31 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 02/16] dt-bindings: media: mtk-vcodec: document SCP node To: Ezequiel Garcia 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 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.