Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp416281imw; Fri, 8 Jul 2022 05:25:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tQBJkIipUG9kD/Fe9urPDECglq6FHcyV6gFG2HqB0Ur/h/WHAHugeLXKAJsBsE51TcpxKm X-Received: by 2002:a05:6a00:1901:b0:4fa:fa9e:42e6 with SMTP id y1-20020a056a00190100b004fafa9e42e6mr3826903pfi.1.1657283112081; Fri, 08 Jul 2022 05:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657283112; cv=none; d=google.com; s=arc-20160816; b=xBjTetw5HimibpnpwG6TKA3CvIsa5z9CojN59FBsLptFMxBlquyh52VoQJ+36Yv2ME kHWGOsj/mlxwBmdpaLJyF7+uqKwiWGJ7QMkzqWOPDed2JH36mTk2fdIQ+blzdWdr+LGK CxzkPxzqqBdJ2+lxDajbwOZdT7AemOv25jdcemFkgYjvSfJ+ro+ybvav2lT9ZjMykNKa y4v/FHteDPbCIScy1Xj5XqQIpRxv9sct+6RZoT1Bf8AEMAMCY/DFBSVuDBw09s/8udfD TJoXvPLRxOSUPt50fLD28SJO5fLDf9YhIw3GlFQcIcyFizlrVWzGgwjDWUnGgfXc4ACQ 3s4w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jpMN0Ny8ZTxdYWdsrOptjBjiuc2SumVnaqbd7wIdC8I=; b=Jkgb+LSGl3LGPneKr7qM3UeH2OOugrg/TT+hZax95CHOE1AyWbCw0sr4EOdyPTtcD2 HgQa1DSBdkrOxMzURYHScPdabYrHWOhUe8+kYzRBAbF60VE2S2kLjkY2Bjzs0/ndjIxg iRNVtN9AY4u5d9KDdK57423iWNly8uqnFZoj2+zBWcN4SagahKOu4XJR13KoKKqtltnu b/djgBZ5y9IEJ4tl4XpxwPtukg/1I8oLdq//JV29XD0PXLfOS0709D1F8KqsJpaLzYiY EnBM/2GAB5ZZv3KAQRldJmCE+dwVXcrn1fgF2agWfrycrBF5FfQMeduv7lsEqITGhzqF QFaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=V4pIK31P; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s32-20020a635260000000b00408c9608148si7032002pgl.488.2022.07.08.05.24.57; Fri, 08 Jul 2022 05:25:12 -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=fail header.i=@microchip.com header.s=mchp header.b=V4pIK31P; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238209AbiGHL5f (ORCPT + 99 others); Fri, 8 Jul 2022 07:57:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238124AbiGHL5R (ORCPT ); Fri, 8 Jul 2022 07:57:17 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 497D59A6B9; Fri, 8 Jul 2022 04:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1657281437; x=1688817437; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fyYMzbEVBdCrRqau7PZBrDmY2vLx5Tjgwub2EQAW23A=; b=V4pIK31P2GgSzPzQ2PQcx7emhRHp1fWIvUxN7alBeOf66xOfX5NmWjSZ sbyJkDQsU+oYhyCXcOlUhRN8IQHJA/nQUbNNX7FkHXQXaMkImNqbFlWIF lUoDXe5pYP1KinU7nZudIA7nypelM2ltO+nJM+MArvtTAbHsF6ysLjoA1 HH+VHBy0JVTskugCbL2sy13+MqJK+0+z8mQpkDruUjWYSPt1Gp/5wscRE 8RSBXuHHY2Zz0DdQpmUysSNebMEfeXlPZYQdPiC6MgaQKmPY0TaW33qmk 1EaT3G+21I4eTo8nec11nI3wRmp/WouT9FO2BMsMp+j0jGA9KdN8QLWjY A==; X-IronPort-AV: E=Sophos;i="5.92,255,1650956400"; d="scan'208";a="171312680" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Jul 2022 04:57:17 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Fri, 8 Jul 2022 04:57:16 -0700 Received: from kavya.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 8 Jul 2022 04:57:12 -0700 From: Kavyasree Kotagiri To: , , , , , CC: , , , Subject: [PATCH v8 2/3] dt-bindings: mfd: atmel,sama5d2-flexcom: Add new compatible string for lan966x Date: Fri, 8 Jul 2022 09:56:18 -0200 Message-ID: <20220708115619.254073-3-kavyasree.kotagiri@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220708115619.254073-1-kavyasree.kotagiri@microchip.com> References: <20220708115619.254073-1-kavyasree.kotagiri@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,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 LAN966x SoC flexcoms has two optional I/O lines. Namely, CS0 and CS1 in flexcom SPI mode. CTS and RTS in flexcom USART mode. These pins can be mapped to lan966x FLEXCOM_SHARED[0-20] pins and usage depends on functions being configured. Signed-off-by: Kavyasree Kotagiri --- v7 -> v8: - Changed compatible string to microchip,lan9668-flexcom. v6 -> v7: - Add #address-cells, #size-cells to flx3 example. v5 -> v6: - Removed spi node from flx3 example. v4 -> v5: - Fixed indentations and dt-schema errors. - No errors seen with 'make dt_binding_check'. v3 -> v4: - Added else condition to allOf:if:then. v2 -> v3: - Add reg property of lan966x missed in v2. v1 -> v2: - Use allOf:if:then for lan966x dt properties .../bindings/mfd/atmel,sama5d2-flexcom.yaml | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/atmel,sama5d2-flexcom.yaml b/Documentation/devicetree/bindings/mfd/atmel,sama5d2-flexcom.yaml index bfa7d340a198..568da7cb630c 100644 --- a/Documentation/devicetree/bindings/mfd/atmel,sama5d2-flexcom.yaml +++ b/Documentation/devicetree/bindings/mfd/atmel,sama5d2-flexcom.yaml @@ -18,9 +18,11 @@ properties: compatible: enum: - atmel,sama5d2-flexcom + - microchip,lan9668-flexcom reg: - maxItems: 1 + minItems: 1 + maxItems: 2 clocks: maxItems: 1 @@ -47,6 +49,27 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 enum: [1, 2, 3] + microchip,flx-shrd-pins: + description: Specify the Flexcom shared pins to be used for flexcom + chip-selects. + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 2 + items: + minimum: 0 + maximum: 20 + + microchip,flx-cs: + description: Flexcom chip selects. Here, value of '0' represents "cts" line + of flexcom USART or "cs0" line of flexcom SPI and value of '1' represents + "rts" line of flexcom USART or "cs1" line of flexcom SPI. + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 2 + items: + minimum: 0 + maximum: 1 + patternProperties: "^serial@[0-9a-f]+$": type: object @@ -74,6 +97,31 @@ required: - ranges - atmel,flexcom-mode +allOf: + - if: + properties: + compatible: + contains: + const: microchip,lan9668-flexcom + + then: + properties: + reg: + items: + - description: Flexcom base registers map + - description: Flexcom shared registers map + required: + - microchip,flx-shrd-pins + - microchip,flx-cs + + else: + properties: + reg: + items: + - description: Flexcom base registers map + microchip,flx-shrd-pins: false + microchip,flx-cs: false + additionalProperties: false examples: @@ -89,4 +137,19 @@ examples: ranges = <0x0 0xf8034000 0x800>; atmel,flexcom-mode = <2>; }; + - | + #include + + flx3: flexcom@e0064000 { + compatible = "microchip,lan9668-flexcom"; + reg = <0xe0064000 0x100>, + <0xe2004180 0x8>; + clocks = <&flx0_clk>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0xe0040000 0x800>; + atmel,flexcom-mode = <2>; + microchip,flx-shrd-pins = <9>; + microchip,flx-cs = <0>; + }; ... -- 2.25.1