Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp697644rwd; Sun, 14 May 2023 05:09:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7aG9JxVvpfXNOhTbSk2i/9TQB9I6OdARYWHKAoQUOnPbA+yD+olnm4EyaubNi19MqFlvxE X-Received: by 2002:a17:90a:ac0f:b0:246:75c8:f071 with SMTP id o15-20020a17090aac0f00b0024675c8f071mr30686180pjq.3.1684066199480; Sun, 14 May 2023 05:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684066199; cv=none; d=google.com; s=arc-20160816; b=yqNEJjb6B6HErVFyCXIRIlaqPJGcXlZGIoRC8S7KQAUji2XFcgQYRiHYhYN5R4AVrV 9M2KrnmvRN1Jqzn810KvlqxaDxu66KXE1PO2h89MBosfOH/i8t+CytkJObdeVg9DdS7i DdLEakFdSiLVNs90ahA9u3sMcDJ2uG4vuSOTic0n6S6A28BzOz6fw4jPsoEgM2b92sPr R4lBgKugGqtrddTtEbxfcm1QNb+N53YDb1IJF3F39EPjYcuHguV8gAwWd2vuS0yhYA85 TB74xLM5pcm60sMNv2sBhCd3llqNvqKbDAmmpVnaL/ohshbymxEeC0tL/wT/rLvqet2w PVDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ueNUY+61RC+vr33b4+u6+BrfZ3BJJhhclw2Re6JpY94=; b=AqP2V/BMCI9GjtqXqhiVNky1m2zb0HNJQXE9J0xPULuRTqnmJhPtAweGMgzRcy1toz gnQVKeyLnwNqJoZKPv6tsYPqexTAen5Z/JTon88XrKUmDFvgvLpKBVTkUzhrmIEE3W5z PHS5PI7blw1GjlCeU3ig4kqMHHz2Bo/mWmBTRiqbetu8+XKUdFIeBYwJFMwwuGQQjtb4 xocnv0BXfh7Fl8FD4OrnxBHDGj4uO1QnFr5neAsfPiMRhkui813Ab+IU39v4RUpDNK+z OOwv+EnAVzqrsmIlIs/PhlPPPYfEIFGoW5UkvsYmyUr+M9qFdoljwjQWO0Jpgmsu2PT5 uH2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HL2l6tFw; 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 k32-20020a17090a3ea300b0024dfbcae37dsi27944765pjc.94.2023.05.14.05.09.45; Sun, 14 May 2023 05:09:59 -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=HL2l6tFw; 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 S235208AbjENL6Y (ORCPT + 99 others); Sun, 14 May 2023 07:58:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233722AbjENL6X (ORCPT ); Sun, 14 May 2023 07:58:23 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8957210D for ; Sun, 14 May 2023 04:58:21 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-50bc2feb320so17835959a12.3 for ; Sun, 14 May 2023 04:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684065499; x=1686657499; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ueNUY+61RC+vr33b4+u6+BrfZ3BJJhhclw2Re6JpY94=; b=HL2l6tFwqcvaksx52yisq7RR0TRrXrwkOo8dOwyznXSYvgZPyuKE52NZ2FSkxurUoY H9hFJg0E1CxzU5GMJwPE8BJUge2Rf5sz5GK6VG+k9+cKf4Ool8T46BE6P3fq+TaJNakx WoyuSJNfRYecVKgg3LCS5/s32OI+xHx5rlbz9TFAhrW80O8mHPNcJsSMNpbnq/WDSHPo IAX5J1ZmsRFHQOEtp8kFZpMpnYuls63XJsesPTcv4zaH+byEB8O3qpiIqFyiyXsx+M5U W6Ph4TKH5qALtwZnjls6KlAQo+dOC/RoOr8NlN8IlZd3KL88uclJN709RtZMOZqxFf3r f3gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684065499; x=1686657499; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ueNUY+61RC+vr33b4+u6+BrfZ3BJJhhclw2Re6JpY94=; b=CxdiqAc4ZsXAIJnI8X71rbylckjCoIk46Tk+nbB7w+1W1SochMBS3GnmChyaaSE1VP kJ+SV0j0b4LbmlarB0GSM60LkrSkCq4HZ2OHL98F7E3oMcIciFNJv/0NSXHs1Z9krEra J5cH2WYrGSf+l6EgBqJcc99s7U2LhLiWbqv56S3NI5jnY7WWn6CT2ISIFtX0nOLAOjxI PRR27/Kv5LRW36RYmvh1taHf+8GJe/fIVM1rupTcQHNU98yum0HBhHzmFJDObZmyADRg S0NDVBORtLdnBKq/qtM4lpvDP/EkZcJ2QIw5be/8uj06i3s7lKyplmmxGY1BQQT9YY3X yEgg== X-Gm-Message-State: AC+VfDzfjV8reyJzT62anDC2LKOEYBN1uAJzB4BhWY9KvlfbBuYjnRUM OUy8ZlbQrAd7rVC52CnQhy/rAw== X-Received: by 2002:a17:907:928e:b0:96a:8412:a43d with SMTP id bw14-20020a170907928e00b0096a8412a43dmr8603542ejc.33.1684065498811; Sun, 14 May 2023 04:58:18 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:715f:ddce:f2ba:123b]) by smtp.gmail.com with ESMTPSA id i24-20020a1709067a5800b00965aee5be9asm8223005ejo.170.2023.05.14.04.58.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 May 2023 04:58:18 -0700 (PDT) From: Krzysztof Kozlowski To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v4] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha Date: Sun, 14 May 2023 13:57:41 +0200 Message-Id: <20230514115741.40423-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Some boards use SJA1105 Ethernet Switch with SPI CPHA, while ones with SJA1110 use SPI CPOL, so document this to fix dtbs_check warnings: arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb: ethernet-switch@0: Unevaluated properties are not allowed ('spi-cpol' was unexpected) Signed-off-by: Krzysztof Kozlowski --- Changes since v3: 1. Rebase. 2. Require cpha/cpol properties on respective variants (thus update example). Changes since v2: 1. Add allOf:if:then, based on feedback from Vladimir. Changes since v1: 1. Add also cpha. --- .../bindings/net/dsa/nxp,sja1105.yaml | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml index 9a64ed658745..991448962c93 100644 --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml @@ -12,10 +12,6 @@ description: cs_sck_delay of 500ns. Ensuring that this SPI timing requirement is observed depends on the SPI bus master driver. -allOf: - - $ref: dsa.yaml#/$defs/ethernet-ports - - $ref: /schemas/spi/spi-peripheral-props.yaml# - maintainers: - Vladimir Oltean @@ -36,6 +32,9 @@ properties: reg: maxItems: 1 + spi-cpha: true + spi-cpol: true + # Optional container node for the 2 internal MDIO buses of the SJA1110 # (one for the internal 100base-T1 PHYs and the other for the single # 100base-TX PHY). The "reg" property does not have physical significance. @@ -109,6 +108,30 @@ $defs: 1860, 1880, 1900, 1920, 1940, 1960, 1980, 2000, 2020, 2040, 2060, 2080, 2100, 2120, 2140, 2160, 2180, 2200, 2220, 2240, 2260] +allOf: + - $ref: dsa.yaml#/$defs/ethernet-ports + - $ref: /schemas/spi/spi-peripheral-props.yaml# + - if: + properties: + compatible: + enum: + - nxp,sja1105e + - nxp,sja1105t + - nxp,sja1105p + - nxp,sja1105q + - nxp,sja1105r + - nxp,sja1105s + then: + properties: + spi-cpol: false + required: + - spi-cpha + else: + properties: + spi-cpha: false + required: + - spi-cpol + unevaluatedProperties: false examples: @@ -120,6 +143,7 @@ examples: ethernet-switch@1 { reg = <0x1>; compatible = "nxp,sja1105t"; + spi-cpha; ethernet-ports { #address-cells = <1>; -- 2.34.1