Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1668512rwd; Mon, 15 May 2023 01:00:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Kj70w5Mr/wnZAD5fGfUtPdXWT+xnewW6QAnNK5t+zW2T9JfguUK9nkh12HpksD5UgQoME X-Received: by 2002:a05:6a21:6d84:b0:103:fcd7:544d with SMTP id wl4-20020a056a216d8400b00103fcd7544dmr17865264pzb.47.1684137645646; Mon, 15 May 2023 01:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684137645; cv=none; d=google.com; s=arc-20160816; b=nKgJvQe8qQgrxmgGf8sKvKgFIEaIfkZvTHFzrmYRo1BE9Y7EnziUYVE+aBxBLqbTII EwpmlKPKxTSZ5KJGEvB49Wje55q55V1o3O1oyx2ATK5PjSP2JY71PCouB1PcPuZqo4ti b1zdgPJB/6xnsq8gpSJZuXix82seyj7iysc+H4XWg+p+z3BmcpR35TTZbzHMD27ksgbm wupkMbTSQNyTiE5QZ+D9WVBAzyROexwwQuhbYSoFf6ghce/2N4Jw9ouqSgFFKJvb9fX9 Anm+xRM/GZljN/DiqEixQbtqW4sjJCFWkrq9D8GbxgymALOhzBMfAaDWHEMS1XS3ADPy 7qtA== 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=UttESFrrEvMiKCOSwouud9SxE7+ngY8bUQ++ZBjcYWc=; b=nmzx5apOeuwWxYI3vuHwgatyRRjyCOT9lvw2YoRyFrHYN/0+9WhuXq5jcmywK8uLia +uw81dx5txh/JgGmgUeWyJ0pQ/w0chUJzBFhB6ssN4628Rteq75tGDKLtanXnvY1dr/r aabMZcVWwfOU1lBeCGZ+Ff/WKpasEOutbUNznmx4zifAJ0Mr6i/P3+zzjw0fSC5xv4Pt pKs0GFpWmPkYFTJ/+21CWyhjWnm+76DHCilPACDIDC2nSunncd41YUy/xnI6HRjjVxoQ nHjmAc6E/UXUIwqG0isH8ntSsrdAdprkE13W+WBljxUCenSiwhkRTJjZzs93CJRdoh0S h+nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yxob4yxI; 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 v22-20020a637a16000000b0052c44389455si16341047pgc.781.2023.05.15.01.00.33; Mon, 15 May 2023 01:00:45 -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=yxob4yxI; 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 S239320AbjEOHpn (ORCPT + 99 others); Mon, 15 May 2023 03:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239022AbjEOHpb (ORCPT ); Mon, 15 May 2023 03:45:31 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76F631B3 for ; Mon, 15 May 2023 00:45:29 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-96aa0cab88dso521101366b.1 for ; Mon, 15 May 2023 00:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684136728; x=1686728728; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UttESFrrEvMiKCOSwouud9SxE7+ngY8bUQ++ZBjcYWc=; b=yxob4yxIb4Bg201PdiV7Z3bXOEbeK3d0tu/MOIMdAWdEUFoasKRTU9/SOZajKCOYYX xYDF1Y2FwdYatQGEsYdo1y0oYKLEAGg3YFF5YjqYAdZSY42KhkOQAibJmOAbJH7Ix60H Qpzt4sAbZyJkWQONK7RkcZKcM3cFjAoBpGF+uIZTmnwWyfMLaBASahRtW4D+zb/dh+Yh qLZZJNttxlMs6VfjFD0ji6JjL9QpX98LaOO7SvC1toCU6l5W5j1rsfJ9Gh6iS1EaToWk s0oZ6I2/2Qob9ejoYzm0zqIPsdheXhIFIYAKHoWjXgUUZDnJpUuhDgXMZey8wWVLS31O +uGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684136728; x=1686728728; 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=UttESFrrEvMiKCOSwouud9SxE7+ngY8bUQ++ZBjcYWc=; b=ac+d+xJOc0ubX6z6pgmocluPCrnkBL2EzvIaiKUj2uanYQp2jtRCgO4BSV4r7PJfhd ypNH2Mk5TWrBYhehzBW67VY6BHfeeLRbTnDmQ1dRKd3Go3n2IUmq85Ktntg3M7E7dPi6 AYsJ0NNn0ge7EDmRz3KZRseqPjWg0KEn6WmZtXXR930+hWbAW6sihRmu9okrUBWtsRC9 rr2CKl22ivzG8ZWd1F5mOKCSbFq+5WChF8TUwmPWoumOIKozqsUHkPnimHrSuJ9HskNk MJh1/8Cvp+LaFOgqc5GfTYLb8FNjic9IrSr/1NULruz9eryStlwsHbwQ6oQhHB8HENo5 gxng== X-Gm-Message-State: AC+VfDwBHbClDK6gGZX5i2m4WSk+pIglhfjS2y2h4D+6ygA58pFqam+K VRCMqTnuVkFLifPSCoJ+2/lDwg== X-Received: by 2002:a17:907:74c:b0:966:265d:edc7 with SMTP id xc12-20020a170907074c00b00966265dedc7mr25335288ejb.69.1684136727800; Mon, 15 May 2023 00:45:27 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:6470:25b8:7c2d:1992]) by smtp.gmail.com with ESMTPSA id gv28-20020a1709072bdc00b00965cfc209d5sm9163515ejc.8.2023.05.15.00.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 00:45:27 -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 , Conor Dooley Subject: [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha Date: Mon, 15 May 2023 09:45:25 +0200 Message-Id: <20230515074525.53592-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=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 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 Reviewed-by: Conor Dooley --- Changes since v4: 1. Order compatibles. 2. Add tag. 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..4d5f5cc6d031 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,sja1105p + - nxp,sja1105q + - nxp,sja1105r + - nxp,sja1105s + - nxp,sja1105t + 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