From patchwork Mon May 15 07:45:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 682159 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 D4DC0C77B75 for ; Mon, 15 May 2023 07:45:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239215AbjEOHpe (ORCPT ); Mon, 15 May 2023 03:45:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238998AbjEOHpb (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 6B9BD1A5 for ; Mon, 15 May 2023 00:45:29 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-96598a7c5e0so1998840866b.3 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=ctXGxVw8Fxdp9lyvzWHk7tQ2Uwd7KkooX9tW9sL34vFmDL/jLEgfT/tqUxMxLmwpZG 773msqeaG8cDC7vjBfKivl4dW3WtAsS4syahw7f8ej1pFqC8ypys09Evs96bK2dD+HiO BVZkxj36bJpwCP0U+ng96OzkpOdM1uq5wYFwQL9ybyD73fpo9ao+5qIN+cbR+CAewaQe 8z0/33W0gLmddHxzg7dJf2cbZHQ/SQ5w9IGtmM0V2PMsLm46oFji/F9qLnRjnxov7xdR pcQPqxUtNaf51tpYbwYDjWnY10NAxzGMpQFb1ha9diW6T626Ba6jQydcCSjddqZ3QWaL i6ow== X-Gm-Message-State: AC+VfDyHPpYNYLt1UdT/MspZSfW9zcUCs1pnVYLzRKjQP5nVlck7YKfp NF0LqFB570AnQkmU8+OwAZVXzQ== X-Google-Smtp-Source: ACHHUZ4YIDCunPW0x2OethflXGWsooFhVmk1Dpl8XCOnCvTtegAd8A3kDg9WRT19l8ogMoVhx4oqCg== 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 Reviewed-by: Vladimir Oltean --- 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>;