From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36D09C43457 for ; Mon, 12 Oct 2020 07:18:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB4B420790 for ; Mon, 12 Oct 2020 07:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602487130; bh=ZEAG2lX5OPlpev1un14cD5YhZr4Ze2sU+TWsMBDZIA4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=VTF7In3IA++HB5HDQdFG9Dtt7+kvBB8xrcPQNKOfoF0qh8JpoGRMdatYt3W8n+eQj C75Tj5jG4iU7F3VdP41JVHx3Ym/RAxvAFZOrEhZd4hUwKCKLEpjorgz0xLnPq9sKe5 eheiF9VJjP/CJuSivUL6/p7dYS4GgFaA0K6+GHzo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727089AbgJLHSt (ORCPT ); Mon, 12 Oct 2020 03:18:49 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:36483 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726413AbgJLHSt (ORCPT ); Mon, 12 Oct 2020 03:18:49 -0400 Received: by mail-ed1-f66.google.com with SMTP id l16so15822433eds.3; Mon, 12 Oct 2020 00:18:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OCtzqcTvgm/lHz6dwVOWYKE+wIp/najcKC43qSAnkQQ=; b=bTKBII3Bb5p4w7f27vx1Up3BTiYpxA02icl+ajWUPMdhYUf5kWAQnlZC8VNtPgyf2/ sYp52TKXRRd15fdtFrJQ0dGWqrnjExLsSxAdsG1hnJiwTCvlpDFeuzEz+L9kn7n6s3qL s2PmaDtsRCj0IqtU76BzlRyzMYpXbbPKz1q0Z1hxjIsam/z3IhKHCtJ2S2ODgkd3shGJ 9u4CwqV4teWsdZmVBvyMYTGsB7PR2VqSfX7E0TzUeP07UmR3wWwCZxWNvqXPWlf0ItwU NSGZcnAfrwpxgj0s65yXdiyrX9LJLL6YNXFT83lD2aSBrOaVhJWnYwsXWY6j9AbjqsAB kAiQ== X-Gm-Message-State: AOAM533hMFHq+3l90iFY1ct1VslqUOgK6X1dw276BK7KlR1gpEjWsVBU RyeySN4C7asOocmZQf/0IHE= X-Google-Smtp-Source: ABdhPJzH66RE1w9X2obXO5dNA8hKqBI0KiAd4eRYjVVAQ32i5EUIaFFJfhg/d3NrvvfQG9iIyYP+oQ== X-Received: by 2002:aa7:c2c4:: with SMTP id m4mr13091357edp.172.1602487127112; Mon, 12 Oct 2020 00:18:47 -0700 (PDT) Received: from pi3 ([194.230.155.215]) by smtp.googlemail.com with ESMTPSA id a10sm9995107edu.78.2020.10.12.00.18.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 00:18:45 -0700 (PDT) Date: Mon, 12 Oct 2020 09:18:43 +0200 From: Krzysztof Kozlowski To: Yong Wu Cc: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy , Will Deacon , Evan Green , Tomasz Figa , linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, Nicolas Boichat , anan.sun@mediatek.com, chao.hao@mediatek.com, ming-fan.chen@mediatek.com, Greg Kroah-Hartman , kernel-team@android.com Subject: Re: [PATCH v3 02/24] dt-bindings: memory: mediatek: Convert SMI to DT schema Message-ID: <20201012071843.GA1889@pi3> References: <20200930070647.10188-1-yong.wu@mediatek.com> <20200930070647.10188-3-yong.wu@mediatek.com> <20201002110831.GD6888@pi3> <1601958428.26323.26.camel@mhfsdcap03> <1602310691.26323.39.camel@mhfsdcap03> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1602310691.26323.39.camel@mhfsdcap03> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 10, 2020 at 02:18:11PM +0800, Yong Wu wrote: > On Tue, 2020-10-06 at 09:15 +0200, Krzysztof Kozlowski wrote: > > On Tue, 6 Oct 2020 at 06:27, Yong Wu wrote: > > > > > > On Fri, 2020-10-02 at 13:08 +0200, Krzysztof Kozlowski wrote: > > > > On Wed, Sep 30, 2020 at 03:06:25PM +0800, Yong Wu wrote: > > > > > Convert MediaTek SMI to DT schema. > > > > > > > > > > Signed-off-by: Yong Wu > > > > > --- > > > > > .../mediatek,smi-common.txt | 49 --------- > > > > > .../mediatek,smi-common.yaml | 100 ++++++++++++++++++ > > > > > .../memory-controllers/mediatek,smi-larb.txt | 49 --------- > > > > > .../memory-controllers/mediatek,smi-larb.yaml | 91 ++++++++++++++++ > > > > > 4 files changed, 191 insertions(+), 98 deletions(-) > > > > > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.txt > > > > > create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml > > > > > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt > > > > > create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml > > > ... > > > > > +properties: > > > > > + compatible: > > > > > + oneOf: > > > > > + - enum: > > > > > + - mediatek,mt2701-smi-common > > > > > + - mediatek,mt2712-smi-common > > > > > + - mediatek,mt6779-smi-common > > > > > + - mediatek,mt8173-smi-common > > > > > + - mediatek,mt8183-smi-common > > > > > + > > > > > + - description: for mt7623 > > > > > + items: > > > > > + - const: mediatek,mt7623-smi-common > > > > > + - const: mediatek,mt2701-smi-common > > > > > + > > > > > + reg: > > > > > + maxItems: 1 > > > > > + > > > > > + clocks: > > > > > + description: | > > > > > + apb and smi are mandatory. the async is only for generation 1 smi HW. > > > > > + gals(global async local sync) also is optional, here is the list which > > > > > + require gals: mt6779 and mt8183. > > > > > + minItems: 2 > > > > > + maxItems: 4 > > > > > + items: > > > > > + - description: apb is Advanced Peripheral Bus clock, It's the clock for > > > > > + setting the register. > > > > > + - description: smi is the clock for transfer data and command. > > > > > + - description: async is asynchronous clock, it help transform the smi clock > > > > > + into the emi clock domain. > > > > > + - description: gals0 is the path0 clock of gals. > > > > > + - description: gals1 is the path1 clock of gals. > > > > > + > > > > > + clock-names: > > > > > + oneOf: > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - const: async > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - const: gals0 > > > > > + - const: gals1 > > > > > > > > Similarly to my comment to other properties, this requirement per > > > > compatible should be part of the schema within 'if-then'. > > > > > > I'm not so familiar with this format. Do this has "if-then-'else > > > if'-then-else"? > > > > These are mutually exclusive conditions, so you can skip else: > > - if-then > > - if-then > > - if-then > > It will be more readable then stacking 'if' under 'else' > > Thanks. I will use something like this: > > anyOf: Then it should be oneOf as only one condition can be valid. Best regards, Krzysztof > - if: #gen1 hw > then: > use apb/smi/async clocks > > - if: #gen2 hw that has gals. > then: > use apb/smi/gals0/gals1 clocks > else: # gen2 hw that doesn't have gals. > use apb/smi clocks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6491BC433E7 for ; Mon, 12 Oct 2020 07:18:56 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 E52042080D for ; Mon, 12 Oct 2020 07:18:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E52042080D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 543FC20555; Mon, 12 Oct 2020 07:18:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BzSDOizYI3Re; Mon, 12 Oct 2020 07:18:52 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 07A0B1FEAE; Mon, 12 Oct 2020 07:18:52 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D0607C07FF; Mon, 12 Oct 2020 07:18:51 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 50D66C0051 for ; Mon, 12 Oct 2020 07:18:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 370CD85521 for ; Mon, 12 Oct 2020 07:18:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZC4neId13a1x for ; Mon, 12 Oct 2020 07:18:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A835385513 for ; Mon, 12 Oct 2020 07:18:48 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id t20so9506769edr.11 for ; Mon, 12 Oct 2020 00:18:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OCtzqcTvgm/lHz6dwVOWYKE+wIp/najcKC43qSAnkQQ=; b=Ep0Kwy6eJG9Rlqsd1XWo4FkcTd16JPDC/zj18npFeJYdRgu9rGbX4QOxKya0vTxsNI wBCUIRYuzq+ju5OectNkmrJscvgkVWWRj1xgP+zkJZ1As1B+NmKzkoIAwyVjqc0p9icb kuR06EPRF5cbsi3kPYPYhef6RVFyynqtfAGYpA+BAc98vNLaQUhWvjdONKtqYahOsDxM rKX6HdKyCZf3ZklVfMxKUnykVJQkhbUb4sCn9svXLej3VHd6w9OgQBsTHqVbHXujVMzo CrpF8xvYq7ySvibskND38TaarZXkZMORTPRldM/M/iEjqnuCR7heQVilk+dQCuCbqjwB jNNw== X-Gm-Message-State: AOAM533Y2IWRMVmZ8J3CuTf5QaoKI+HeB8GaCT+NW81a3/yynszhQI7o tD8rxDqi9ti+Tin7E4DR0PY= X-Google-Smtp-Source: ABdhPJzH66RE1w9X2obXO5dNA8hKqBI0KiAd4eRYjVVAQ32i5EUIaFFJfhg/d3NrvvfQG9iIyYP+oQ== X-Received: by 2002:aa7:c2c4:: with SMTP id m4mr13091357edp.172.1602487127112; Mon, 12 Oct 2020 00:18:47 -0700 (PDT) Received: from pi3 ([194.230.155.215]) by smtp.googlemail.com with ESMTPSA id a10sm9995107edu.78.2020.10.12.00.18.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 00:18:45 -0700 (PDT) Date: Mon, 12 Oct 2020 09:18:43 +0200 From: Krzysztof Kozlowski To: Yong Wu Subject: Re: [PATCH v3 02/24] dt-bindings: memory: mediatek: Convert SMI to DT schema Message-ID: <20201012071843.GA1889@pi3> References: <20200930070647.10188-1-yong.wu@mediatek.com> <20200930070647.10188-3-yong.wu@mediatek.com> <20201002110831.GD6888@pi3> <1601958428.26323.26.camel@mhfsdcap03> <1602310691.26323.39.camel@mhfsdcap03> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1602310691.26323.39.camel@mhfsdcap03> Cc: youlin.pei@mediatek.com, devicetree@vger.kernel.org, kernel-team@android.com, Nicolas Boichat , srv_heupstream@mediatek.com, chao.hao@mediatek.com, Robin Murphy , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , Evan Green , Tomasz Figa , iommu@lists.linux-foundation.org, Rob Herring , linux-mediatek@lists.infradead.org, Matthias Brugger , ming-fan.chen@mediatek.com, anan.sun@mediatek.com, Will Deacon , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Sat, Oct 10, 2020 at 02:18:11PM +0800, Yong Wu wrote: > On Tue, 2020-10-06 at 09:15 +0200, Krzysztof Kozlowski wrote: > > On Tue, 6 Oct 2020 at 06:27, Yong Wu wrote: > > > > > > On Fri, 2020-10-02 at 13:08 +0200, Krzysztof Kozlowski wrote: > > > > On Wed, Sep 30, 2020 at 03:06:25PM +0800, Yong Wu wrote: > > > > > Convert MediaTek SMI to DT schema. > > > > > > > > > > Signed-off-by: Yong Wu > > > > > --- > > > > > .../mediatek,smi-common.txt | 49 --------- > > > > > .../mediatek,smi-common.yaml | 100 ++++++++++++++++++ > > > > > .../memory-controllers/mediatek,smi-larb.txt | 49 --------- > > > > > .../memory-controllers/mediatek,smi-larb.yaml | 91 ++++++++++++++++ > > > > > 4 files changed, 191 insertions(+), 98 deletions(-) > > > > > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.txt > > > > > create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml > > > > > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt > > > > > create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml > > > ... > > > > > +properties: > > > > > + compatible: > > > > > + oneOf: > > > > > + - enum: > > > > > + - mediatek,mt2701-smi-common > > > > > + - mediatek,mt2712-smi-common > > > > > + - mediatek,mt6779-smi-common > > > > > + - mediatek,mt8173-smi-common > > > > > + - mediatek,mt8183-smi-common > > > > > + > > > > > + - description: for mt7623 > > > > > + items: > > > > > + - const: mediatek,mt7623-smi-common > > > > > + - const: mediatek,mt2701-smi-common > > > > > + > > > > > + reg: > > > > > + maxItems: 1 > > > > > + > > > > > + clocks: > > > > > + description: | > > > > > + apb and smi are mandatory. the async is only for generation 1 smi HW. > > > > > + gals(global async local sync) also is optional, here is the list which > > > > > + require gals: mt6779 and mt8183. > > > > > + minItems: 2 > > > > > + maxItems: 4 > > > > > + items: > > > > > + - description: apb is Advanced Peripheral Bus clock, It's the clock for > > > > > + setting the register. > > > > > + - description: smi is the clock for transfer data and command. > > > > > + - description: async is asynchronous clock, it help transform the smi clock > > > > > + into the emi clock domain. > > > > > + - description: gals0 is the path0 clock of gals. > > > > > + - description: gals1 is the path1 clock of gals. > > > > > + > > > > > + clock-names: > > > > > + oneOf: > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - const: async > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - const: gals0 > > > > > + - const: gals1 > > > > > > > > Similarly to my comment to other properties, this requirement per > > > > compatible should be part of the schema within 'if-then'. > > > > > > I'm not so familiar with this format. Do this has "if-then-'else > > > if'-then-else"? > > > > These are mutually exclusive conditions, so you can skip else: > > - if-then > > - if-then > > - if-then > > It will be more readable then stacking 'if' under 'else' > > Thanks. I will use something like this: > > anyOf: Then it should be oneOf as only one condition can be valid. Best regards, Krzysztof > - if: #gen1 hw > then: > use apb/smi/async clocks > > - if: #gen2 hw that has gals. > then: > use apb/smi/gals0/gals1 clocks > else: # gen2 hw that doesn't have gals. > use apb/smi clocks. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 174C9C433DF for ; Mon, 12 Oct 2020 07:19:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 A4C3E20790 for ; Mon, 12 Oct 2020 07:19:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="2mFWfgEl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4C3E20790 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8Ors41XSWNLRxmS22E2B5wSseyzOQtn+uceJEERTU88=; b=2mFWfgElTWpNFD4z9otXU21n3 SXvBqvIX5bpaDCPVBK7BeFi9EhJE2Cy/XkscShwjP23Jv41NOl1iGrcOjT1MnvAXcP4ux5eaZwexa vmL9yTnkeWkYyFQIFhF7TUEed1znbFZRat1vnSxY+EbSNMY3Msmq3QZjqgcyBRQCI1yNJtN8dkLHh xfEI4YzeeIn97WQ5nFtwazN1/WvImge+fdmf8lYiqGh3m5o+o7UjFl6tQIEknPSvZ3MSPLcZM+Yec aKeM/HvvcSXd1o2eKTDqADdOU/jpiZa4JnxKlVHEx1pDBN0caTV1kt4q5u28zlDTRQsQjCk8ZZK7D 4cHmaM+bw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRs6e-0003Y0-SR; Mon, 12 Oct 2020 07:18:52 +0000 Received: from mail-ed1-f66.google.com ([209.85.208.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRs6b-0003X8-W7; Mon, 12 Oct 2020 07:18:50 +0000 Received: by mail-ed1-f66.google.com with SMTP id l24so15825750edj.8; Mon, 12 Oct 2020 00:18:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OCtzqcTvgm/lHz6dwVOWYKE+wIp/najcKC43qSAnkQQ=; b=qnM+C/IYYpi3rvltl1nf/Oyx8V/gLYj0NNJDqPR4Zl8ersuV0k3OE/rbbhvWyLWXko lxFUtzco//em1vXIqSVOY8vvye5nard+cnIunW1bltfmoR7UgC6Umfl4pf3p4cM8fcfE 6O7eeRXqCVR2hRDWCEMkmCdncG+vvQ4M9BgVx9/oM9ckxE4jJs71YxLtpB6FMfPdXq+D NGU7crsJ2lUFchi4RQrWfy7d2KnLUn5zX3HMyTCP0NVnfMXl997Pp8voAcmD3TrBC+Wc upWlSbuqVMcO0s5R2Lhus87mn86+d5NhKxYd7ADls7wH7OAJeJRLwWaSlq1AHsIScWi7 kIYg== X-Gm-Message-State: AOAM5304/FcchRwQrBxTDcxZhZgf3Ch075ZjJkZ1FlB/5VeL/1hrMqVO +lrg3Oj2gQ7OAFPhjmKsY4g= X-Google-Smtp-Source: ABdhPJzH66RE1w9X2obXO5dNA8hKqBI0KiAd4eRYjVVAQ32i5EUIaFFJfhg/d3NrvvfQG9iIyYP+oQ== X-Received: by 2002:aa7:c2c4:: with SMTP id m4mr13091357edp.172.1602487127112; Mon, 12 Oct 2020 00:18:47 -0700 (PDT) Received: from pi3 ([194.230.155.215]) by smtp.googlemail.com with ESMTPSA id a10sm9995107edu.78.2020.10.12.00.18.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 00:18:45 -0700 (PDT) Date: Mon, 12 Oct 2020 09:18:43 +0200 From: Krzysztof Kozlowski To: Yong Wu Subject: Re: [PATCH v3 02/24] dt-bindings: memory: mediatek: Convert SMI to DT schema Message-ID: <20201012071843.GA1889@pi3> References: <20200930070647.10188-1-yong.wu@mediatek.com> <20200930070647.10188-3-yong.wu@mediatek.com> <20201002110831.GD6888@pi3> <1601958428.26323.26.camel@mhfsdcap03> <1602310691.26323.39.camel@mhfsdcap03> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1602310691.26323.39.camel@mhfsdcap03> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201012_031850_043427_73F2AB48 X-CRM114-Status: GOOD ( 25.59 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, devicetree@vger.kernel.org, kernel-team@android.com, Nicolas Boichat , srv_heupstream@mediatek.com, chao.hao@mediatek.com, Robin Murphy , Joerg Roedel , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , Evan Green , Tomasz Figa , iommu@lists.linux-foundation.org, Rob Herring , linux-mediatek@lists.infradead.org, Matthias Brugger , ming-fan.chen@mediatek.com, anan.sun@mediatek.com, Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Sat, Oct 10, 2020 at 02:18:11PM +0800, Yong Wu wrote: > On Tue, 2020-10-06 at 09:15 +0200, Krzysztof Kozlowski wrote: > > On Tue, 6 Oct 2020 at 06:27, Yong Wu wrote: > > > > > > On Fri, 2020-10-02 at 13:08 +0200, Krzysztof Kozlowski wrote: > > > > On Wed, Sep 30, 2020 at 03:06:25PM +0800, Yong Wu wrote: > > > > > Convert MediaTek SMI to DT schema. > > > > > > > > > > Signed-off-by: Yong Wu > > > > > --- > > > > > .../mediatek,smi-common.txt | 49 --------- > > > > > .../mediatek,smi-common.yaml | 100 ++++++++++++++++++ > > > > > .../memory-controllers/mediatek,smi-larb.txt | 49 --------- > > > > > .../memory-controllers/mediatek,smi-larb.yaml | 91 ++++++++++++++++ > > > > > 4 files changed, 191 insertions(+), 98 deletions(-) > > > > > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.txt > > > > > create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml > > > > > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt > > > > > create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml > > > ... > > > > > +properties: > > > > > + compatible: > > > > > + oneOf: > > > > > + - enum: > > > > > + - mediatek,mt2701-smi-common > > > > > + - mediatek,mt2712-smi-common > > > > > + - mediatek,mt6779-smi-common > > > > > + - mediatek,mt8173-smi-common > > > > > + - mediatek,mt8183-smi-common > > > > > + > > > > > + - description: for mt7623 > > > > > + items: > > > > > + - const: mediatek,mt7623-smi-common > > > > > + - const: mediatek,mt2701-smi-common > > > > > + > > > > > + reg: > > > > > + maxItems: 1 > > > > > + > > > > > + clocks: > > > > > + description: | > > > > > + apb and smi are mandatory. the async is only for generation 1 smi HW. > > > > > + gals(global async local sync) also is optional, here is the list which > > > > > + require gals: mt6779 and mt8183. > > > > > + minItems: 2 > > > > > + maxItems: 4 > > > > > + items: > > > > > + - description: apb is Advanced Peripheral Bus clock, It's the clock for > > > > > + setting the register. > > > > > + - description: smi is the clock for transfer data and command. > > > > > + - description: async is asynchronous clock, it help transform the smi clock > > > > > + into the emi clock domain. > > > > > + - description: gals0 is the path0 clock of gals. > > > > > + - description: gals1 is the path1 clock of gals. > > > > > + > > > > > + clock-names: > > > > > + oneOf: > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - const: async > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - const: gals0 > > > > > + - const: gals1 > > > > > > > > Similarly to my comment to other properties, this requirement per > > > > compatible should be part of the schema within 'if-then'. > > > > > > I'm not so familiar with this format. Do this has "if-then-'else > > > if'-then-else"? > > > > These are mutually exclusive conditions, so you can skip else: > > - if-then > > - if-then > > - if-then > > It will be more readable then stacking 'if' under 'else' > > Thanks. I will use something like this: > > anyOf: Then it should be oneOf as only one condition can be valid. Best regards, Krzysztof > - if: #gen1 hw > then: > use apb/smi/async clocks > > - if: #gen2 hw that has gals. > then: > use apb/smi/gals0/gals1 clocks > else: # gen2 hw that doesn't have gals. > use apb/smi clocks. _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C4B3C433E7 for ; Mon, 12 Oct 2020 07:20:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2B3FF20790 for ; Mon, 12 Oct 2020 07:20:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NxFD2hle" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B3FF20790 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Lu5wbSrX3u8fh9daW82tcRr2SG2N+tJyFUGkwHVFlGU=; b=NxFD2hlehT1T91dUJ4knQXUT+ Rkb1zKjMZ41WtDW8yNKjJeA2DZpamozp0WTUwaoNoD5VRdRI9IQ5z+fw65s/TV91lHjLSI0AEDE0t 8q8ah2mZgHQxzbhssAgkx1EoYClyPNKDfxaGkvPsmo7I/FjyWSQXpzM8Mt6PRDXNU8KTY7lSx86Fh myMGxJ0Vejn/arJdoGk/ig8cwJuRuWe/nNACLZ4kHYfyI5fQt09kKD+5ds4bykNTUU6d3WhU1YfaN xp2lnx/asgFrXIHistXSBTxDWzrVy/uToZg3HjlLjlH8/jlN9XlOjYhE08JQX+4Xqez35GEGnXI75 xTtMROY4Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRs6f-0003YA-Pv; Mon, 12 Oct 2020 07:18:53 +0000 Received: from mail-ed1-f66.google.com ([209.85.208.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRs6b-0003X8-W7; Mon, 12 Oct 2020 07:18:50 +0000 Received: by mail-ed1-f66.google.com with SMTP id l24so15825750edj.8; Mon, 12 Oct 2020 00:18:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OCtzqcTvgm/lHz6dwVOWYKE+wIp/najcKC43qSAnkQQ=; b=qnM+C/IYYpi3rvltl1nf/Oyx8V/gLYj0NNJDqPR4Zl8ersuV0k3OE/rbbhvWyLWXko lxFUtzco//em1vXIqSVOY8vvye5nard+cnIunW1bltfmoR7UgC6Umfl4pf3p4cM8fcfE 6O7eeRXqCVR2hRDWCEMkmCdncG+vvQ4M9BgVx9/oM9ckxE4jJs71YxLtpB6FMfPdXq+D NGU7crsJ2lUFchi4RQrWfy7d2KnLUn5zX3HMyTCP0NVnfMXl997Pp8voAcmD3TrBC+Wc upWlSbuqVMcO0s5R2Lhus87mn86+d5NhKxYd7ADls7wH7OAJeJRLwWaSlq1AHsIScWi7 kIYg== X-Gm-Message-State: AOAM5304/FcchRwQrBxTDcxZhZgf3Ch075ZjJkZ1FlB/5VeL/1hrMqVO +lrg3Oj2gQ7OAFPhjmKsY4g= X-Google-Smtp-Source: ABdhPJzH66RE1w9X2obXO5dNA8hKqBI0KiAd4eRYjVVAQ32i5EUIaFFJfhg/d3NrvvfQG9iIyYP+oQ== X-Received: by 2002:aa7:c2c4:: with SMTP id m4mr13091357edp.172.1602487127112; Mon, 12 Oct 2020 00:18:47 -0700 (PDT) Received: from pi3 ([194.230.155.215]) by smtp.googlemail.com with ESMTPSA id a10sm9995107edu.78.2020.10.12.00.18.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 00:18:45 -0700 (PDT) Date: Mon, 12 Oct 2020 09:18:43 +0200 From: Krzysztof Kozlowski To: Yong Wu Subject: Re: [PATCH v3 02/24] dt-bindings: memory: mediatek: Convert SMI to DT schema Message-ID: <20201012071843.GA1889@pi3> References: <20200930070647.10188-1-yong.wu@mediatek.com> <20200930070647.10188-3-yong.wu@mediatek.com> <20201002110831.GD6888@pi3> <1601958428.26323.26.camel@mhfsdcap03> <1602310691.26323.39.camel@mhfsdcap03> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1602310691.26323.39.camel@mhfsdcap03> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201012_031850_043427_73F2AB48 X-CRM114-Status: GOOD ( 25.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, devicetree@vger.kernel.org, kernel-team@android.com, Nicolas Boichat , srv_heupstream@mediatek.com, chao.hao@mediatek.com, Robin Murphy , Joerg Roedel , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , Evan Green , Tomasz Figa , iommu@lists.linux-foundation.org, Rob Herring , linux-mediatek@lists.infradead.org, Matthias Brugger , ming-fan.chen@mediatek.com, anan.sun@mediatek.com, Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Oct 10, 2020 at 02:18:11PM +0800, Yong Wu wrote: > On Tue, 2020-10-06 at 09:15 +0200, Krzysztof Kozlowski wrote: > > On Tue, 6 Oct 2020 at 06:27, Yong Wu wrote: > > > > > > On Fri, 2020-10-02 at 13:08 +0200, Krzysztof Kozlowski wrote: > > > > On Wed, Sep 30, 2020 at 03:06:25PM +0800, Yong Wu wrote: > > > > > Convert MediaTek SMI to DT schema. > > > > > > > > > > Signed-off-by: Yong Wu > > > > > --- > > > > > .../mediatek,smi-common.txt | 49 --------- > > > > > .../mediatek,smi-common.yaml | 100 ++++++++++++++++++ > > > > > .../memory-controllers/mediatek,smi-larb.txt | 49 --------- > > > > > .../memory-controllers/mediatek,smi-larb.yaml | 91 ++++++++++++++++ > > > > > 4 files changed, 191 insertions(+), 98 deletions(-) > > > > > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.txt > > > > > create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml > > > > > delete mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt > > > > > create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml > > > ... > > > > > +properties: > > > > > + compatible: > > > > > + oneOf: > > > > > + - enum: > > > > > + - mediatek,mt2701-smi-common > > > > > + - mediatek,mt2712-smi-common > > > > > + - mediatek,mt6779-smi-common > > > > > + - mediatek,mt8173-smi-common > > > > > + - mediatek,mt8183-smi-common > > > > > + > > > > > + - description: for mt7623 > > > > > + items: > > > > > + - const: mediatek,mt7623-smi-common > > > > > + - const: mediatek,mt2701-smi-common > > > > > + > > > > > + reg: > > > > > + maxItems: 1 > > > > > + > > > > > + clocks: > > > > > + description: | > > > > > + apb and smi are mandatory. the async is only for generation 1 smi HW. > > > > > + gals(global async local sync) also is optional, here is the list which > > > > > + require gals: mt6779 and mt8183. > > > > > + minItems: 2 > > > > > + maxItems: 4 > > > > > + items: > > > > > + - description: apb is Advanced Peripheral Bus clock, It's the clock for > > > > > + setting the register. > > > > > + - description: smi is the clock for transfer data and command. > > > > > + - description: async is asynchronous clock, it help transform the smi clock > > > > > + into the emi clock domain. > > > > > + - description: gals0 is the path0 clock of gals. > > > > > + - description: gals1 is the path1 clock of gals. > > > > > + > > > > > + clock-names: > > > > > + oneOf: > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - const: async > > > > > + - items: > > > > > + - const: apb > > > > > + - const: smi > > > > > + - const: gals0 > > > > > + - const: gals1 > > > > > > > > Similarly to my comment to other properties, this requirement per > > > > compatible should be part of the schema within 'if-then'. > > > > > > I'm not so familiar with this format. Do this has "if-then-'else > > > if'-then-else"? > > > > These are mutually exclusive conditions, so you can skip else: > > - if-then > > - if-then > > - if-then > > It will be more readable then stacking 'if' under 'else' > > Thanks. I will use something like this: > > anyOf: Then it should be oneOf as only one condition can be valid. Best regards, Krzysztof > - if: #gen1 hw > then: > use apb/smi/async clocks > > - if: #gen2 hw that has gals. > then: > use apb/smi/gals0/gals1 clocks > else: # gen2 hw that doesn't have gals. > use apb/smi clocks. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel