Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp950327iob; Wed, 4 May 2022 11:19:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/h/H+4cl5G5HgTUEhB3PVc/uLCFuaGarxKc367Ao+92EG19b4zo3NhScDUS6gnZUphFwl X-Received: by 2002:a17:902:d415:b0:15c:ea4b:7b8e with SMTP id b21-20020a170902d41500b0015cea4b7b8emr23425156ple.86.1651688377387; Wed, 04 May 2022 11:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651688377; cv=none; d=google.com; s=arc-20160816; b=nmTw/u8C5ikFexhUk/gQV8+5DURaCy2IQBkxoa908rIpjIgonPTJgD31iK2U3DQ4AG YXnlKTTLihRLEOHsGEh7Mk0f5yAeKWidl9CwLhF+vKxB6Uv9k1bOoCuU0su0XfFqa9OG MfUvrPdMKYjCRrC5hirHq75FB33DJc8w0aKuyRY17mx0cWhWU34LiPxWBq9OTpqwLkAT O3ImxEJAl1kYZxuOKCW4e6kErqk4nyXKxjQhxkEt95uSMsPx5qQVEUyWiYOOfG+xXNHW fuzz+XhelvM+atDeD9f7Ls2hLkElp68vBEETocaWY6AUzywaKQCP0MnP6rwUCm0PrViN SwIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=dbzifzA6YWjAHWM9xC9m3ofdq7acNbmRxozpGYUPCtE=; b=ajksjfMymXC6GB68Pgs2Lf5B4YDQkogDAd8tsU9i1C4BnpnKw/L4yl1um6bhNohdDs vPxb9e24oQNKPzZflKBl71GiRl/md1BOCNO5GbyzEpAUUOPuDMcviZQDSq+X+/r6LnYA 9uBZGDccCxbtyRwZYog6XdyQmLKZOC6T4DuuezgyJdOqL6czHUlC86S+gPXIvCKfBMID tt2SUbrmQKuM44ZdizMSF8T29PiwSbsMzYFWCvEnPo6R+LYxIS+LfX8Pj+FSFD3c/wo3 ByD4l8z7PRYaJu360k/p527XpG7FWxEc3dqZG8GzY8ACqluRA6L9IZnR1UmSy2sYmkpa hsJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WtFgU7Ug; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y31-20020a056a00181f00b0050e0a5aa240si6085703pfa.6.2022.05.04.11.19.18; Wed, 04 May 2022 11:19:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WtFgU7Ug; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345717AbiEDHuf (ORCPT + 99 others); Wed, 4 May 2022 03:50:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345706AbiEDHud (ORCPT ); Wed, 4 May 2022 03:50:33 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F9F213F28 for ; Wed, 4 May 2022 00:46:57 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id y3so1247922ejo.12 for ; Wed, 04 May 2022 00:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=dbzifzA6YWjAHWM9xC9m3ofdq7acNbmRxozpGYUPCtE=; b=WtFgU7UglwUUumyb36pSqBc+1d5a/d2D8JfIWgvVj7vb1AzP1+o+nBh1742oBFe1yG A85bEMM1H33grTxN/5vEwJHRIJT5Wp9ZKuMI0K06oQNpRJdLBLKXKvAs0EFqMMqpipeO fIQ+e5iFKEUkbArJO6EAwAJmIr/SxDKjBpOWAxuX8o4J/5HI1i4KMUaFIz/QY72UDqAw frQZyzHKLsqzlcOj3cZBhgYk8H4Nf5y5mdDYWMXdZR9UArhe2KDqdHb01ecfJAyAk4/J Rth9rgKqLtPLs8dHdJNbpSKqueNFFuaNqDnTFmYHOiMqfTg32gcMgdd5V7TmTVAfsKyX Ouzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=dbzifzA6YWjAHWM9xC9m3ofdq7acNbmRxozpGYUPCtE=; b=Qs4CwdG5W/oLnS26DqASVvKfqgRH2q7hGUU/h/DP9kX2HRJpM10pT+0iNjVRZB/qyB TPsgz1Lpi44psen3JRtD+0MVjqFX+A81ld2vQ13aW9hGCL2CDvQ+A/m2L3NmGwQokru0 U9ZmuTCz3ODQlvBVfcAsYD3f2ospdTGnvuFqL8N1KgC9tKkI4909cY7Re233IRAh/62P TNN6wUcfTn44uPyqTP3eQ//tGRL43tKGBy7taTqoqjXAhQFkY8KWSZgyIouUNPI9b3ck p77qPAR8TVSdHykaj+4BYMzne5ZPybZ63GjbOaozOjo+fIuIF41W9wiTL5LNCclZdFdE CxBA== X-Gm-Message-State: AOAM531930qPBKq4zV2z6BNxan/Ffj5g1Va8UpudGsfnq487XDZvP81/ B5xy+xgBOd+RJcsZjdxzO/e43Q== X-Received: by 2002:a17:907:97d4:b0:6f4:c876:6f6b with SMTP id js20-20020a17090797d400b006f4c8766f6bmr861238ejc.627.1651650415791; Wed, 04 May 2022 00:46:55 -0700 (PDT) Received: from [192.168.0.209] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id x42-20020a50baad000000b00426cae11e63sm5570458ede.43.2022.05.04.00.46.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 May 2022 00:46:55 -0700 (PDT) Message-ID: <876cbf68-121a-2cae-e40b-67f4556fd2fd@linaro.org> Date: Wed, 4 May 2022 09:46:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: Aw: Re: Re: [RFC v1] dt-bindings: net: dsa: convert binding for mediatek switches Content-Language: en-US To: frank-w@public-files.de Cc: Greg Ungerer , =?UTF-8?Q?Ren=c3=a9_van_Dorst?= , Mauro Carvalho Chehab , Frank Wunderlich , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sean Wang , Landen Chao , DENG Qingfang , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20220502153238.85090-1-linux@fw-web.de> <10770ff5-c9b1-7364-4276-05fa0c393d3b@linaro.org> <95aea078-3e85-79c3-79c0-430bd7c0fbae@linaro.org> <69290DD3-0179-49C2-8E7D-9F8DBDEBC96F@public-files.de> From: Krzysztof Kozlowski In-Reply-To: <69290DD3-0179-49C2-8E7D-9F8DBDEBC96F@public-files.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/05/2022 09:44, Frank Wunderlich wrote: > m 4. Mai 2022 08:51:41 MESZ schrieb Krzysztof Kozlowski : >> On 03/05/2022 17:03, Frank Wunderlich wrote: >>> >>> have not posted this version as it was failing in dtbs_check, this >> was how i tried: >>> >>> >> https://github.com/frank-w/BPI-R2-4.14/blob/8f2033eb6fcae273580263c3f0b31f0d48821740/Documentation/devicetree/bindings/net/dsa/mediatek.yaml#L177 >> >> You have mixed up indentation of the second if (and missing -). > > The "compatible if" should be a child of the "if" above,because phy-mode property only exists for cpu-port. I can try with additional "-" (but i guess this is only needed for allOf) > > Rob told me that i cannot check compatible in subnode and this check will be always true...just like my experience. > I can only make the compatible check at top-level and then need to define substructure based on this (so define structure twice). He suggested me adding this to description for now. > > Imho this can be added later if really needed...did not found any example checking for compatible in a subnode. All were in top level. Afair these properties are handled by dsa-core/phylink and driver only compares constants set there. Sure. > >> But I think your check was not correct. I looked at bpi-r2 DTS >> (mt7623n) >> and pio controller uses GPIO flags. > > I see only same as in the example > > https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts#L196 I meant other consumers of pio GPIOs: https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts#L97 https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts#L320 Best regards, Krzysztof