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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 535C4C433EF for ; Wed, 4 May 2022 07:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345586AbiEDHui (ORCPT ); Wed, 4 May 2022 03:50:38 -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-Google-Smtp-Source: ABdhPJza/rONsXGNOhvKUQVjcTRriV992KVrug0N5dRQ5ZwwdofSpjQfWff2pSW3E7l9neelG9GSVQ== 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 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