Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2985567iog; Mon, 20 Jun 2022 08:48:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vCdhF9PikNiyr2ix+2DGLsuMgDUdyUuWa3+12hcILKHSErWRvNgZ9MN+YXIwMuY8b2DJYg X-Received: by 2002:a17:907:60d4:b0:708:850:bc91 with SMTP id hv20-20020a17090760d400b007080850bc91mr22229682ejc.102.1655740086239; Mon, 20 Jun 2022 08:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655740086; cv=none; d=google.com; s=arc-20160816; b=MnuS5BnURXonNp3ZdHA6FiUObNw0hb6qU3RpoO80eccZZ2i3fYrgg6K60uYkXd8w9J 6kS7CjfQbkf+6EvB3DyGMsvtdw/tz/UH1Z2YGXoPigx3CPTZWdQ3I60YRN1sn5VK3zHR 0+zkylMGmCfD1/1Zeeue1LXVQGvf7s+KyPqihW8RBsMDiWJD4n4GdQdWYutasHLon7el 70vkmEJXxBVUmh6g1QJFj4YEFmhhqtfl6W9hpda7W37QYJsJGKINoOD/on0hREtRKuTC 2tb2GgRDrD79nZ4AOOCNFnyalVEFUgqCig2L9cZXGpo9+f7ZAw+jrqQAc4MWkh55XVkO QCDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=XMNOu5JIlIAwQDE9SZW3Ia8brfOfty9Tv6v8CXEO2k0=; b=Tf+06ppHsuUQcNfFXCVfcX5s5ZVtkGWw/TMjnxb9c1H5OPeGpCHRyvl2HyW2ApPKdW ePC0E6gT7fblmKy2g2cead51lV7YdGu5dssuv+r+Q73O1MaXjCfrCGRDW3Hg2YyPhHff hEzjE7BGyFhM6pgMjp7Y45IpsuciPD02xS2lVu2O2L0mfhHufbZLx8bIPutFJQ3KGKQK 3q+q88LqpvjetskLNwIKX4Jspgx1lCVXaQ7G7F7yhCNZEcH5Jh057IPSQo8HiBakAbQe mPBXMOtSFHTA6uUBPiz++cIKqAIjLDmcSUqHdS8tmm6tlD1ks0rEBjVZZ86Nfpvrw/T3 tWiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=bVNEL1yV; 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 hq10-20020a1709073f0a00b006f39ef3b072si15786710ejc.658.2022.06.20.08.47.40; Mon, 20 Jun 2022 08:48:06 -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=bVNEL1yV; 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 S241509AbiFTPH6 (ORCPT + 99 others); Mon, 20 Jun 2022 11:07:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242843AbiFTPHb (ORCPT ); Mon, 20 Jun 2022 11:07:31 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB4E02CDF6; Mon, 20 Jun 2022 07:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1655736412; x=1687272412; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Ztl+/pAQ+ikjdJod2vaRhfIL+QLqoqn75Iz55UJscWY=; b=bVNEL1yVBSqqSvnYxfhGBzc+3t/xbF4i5r2kUqCQqgC8Hsudmm02Y8R7 zDWvqd2Y758VTE1WENouJ/paCRhLMYV4lZgbfaI61QdVclTVTuai3S76R LPkK6L68q8DSB1YFo7/nOkehqEnFsZixWxsQsATOyESnTkjW91RKcNRSu BB9sPCzIsCoMykOHmr6P0kznouMI/F7sJtcn3umoYRka+2vHiIk4mudPf As6acevgQ6FEjKA+JRFcp/CmV6RV1LImwPGWU5z1L4S5i2h+N5/+Y5mcb 5lDStx++CEEewmbD2PJltwSgUt5SQ8KKEN+U/vmJShXQ7/RJ7nBNMM7Zc A==; X-IronPort-AV: E=Sophos;i="5.92,207,1650956400"; d="scan'208";a="164185817" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Jun 2022 07:46:52 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 20 Jun 2022 07:46:51 -0700 Received: from kavya-HP-Compaq-6000-Pro-SFF-PC.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 20 Jun 2022 07:46:47 -0700 From: Kavyasree Kotagiri To: , , , , CC: , , , Subject: [PATCH v5 2/3] dt-bindings: mfd: atmel,flexcom: Add new compatible string for lan966x Date: Mon, 20 Jun 2022 20:16:33 +0530 Message-ID: <20220620144634.25464-3-kavyasree.kotagiri@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220620144634.25464-1-kavyasree.kotagiri@microchip.com> References: <20220620144634.25464-1-kavyasree.kotagiri@microchip.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.0 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 --- 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,flexcom.yaml | 78 ++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml b/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml index fc5af946b568..216d08b44bb3 100644 --- a/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml +++ b/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml @@ -18,9 +18,11 @@ properties: compatible: enum: - atmel,sama5d2-flexcom + - microchip,lan966x-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]+$": description: See atmel-usart.txt for details of USART bindings. @@ -73,6 +96,31 @@ required: - ranges - atmel,flexcom-mode +allOf: + - if: + properties: + compatible: + contains: + const: microchip,lan966x-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: @@ -101,4 +149,32 @@ examples: atmel,fifo-size = <32>; }; }; + - | + #include + + flx3: flexcom@e0064000 { + compatible = "microchip,lan966x-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>; + + spi3: spi@400 { + compatible = "atmel,at91rm9200-spi"; + reg = <0x400 0x200>; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flx3_default>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&nic_clk>; + clock-names = "spi_clk"; + atmel,fifo-size = <32>; + }; + }; ... -- 2.17.1