Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp935606imw; Tue, 5 Jul 2022 00:23:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tGczNniKnWIWI78+CpwK4vOA2/u8WzRY9ccrfCTq4kq1FMwPkB4Hta0OfbOVn+L1qPH+YD X-Received: by 2002:aa7:d9ce:0:b0:43a:6758:7652 with SMTP id v14-20020aa7d9ce000000b0043a67587652mr10324696eds.351.1657005820987; Tue, 05 Jul 2022 00:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657005820; cv=none; d=google.com; s=arc-20160816; b=GQbFGjDGRY/+HJsyWsx8o7wTScOBp9EYl3tMM10VWQ8Vj6qOH3alOwvQ/n+zYUZ8I8 fs99lPp64RFpURRD6UTiXM/4u0DhyFRS8T3o9XKEmzIlHDOv7x+yEHJZbm0f46PyN4xK GABNQIx29aFDxK/dq6WyujZPBGysi59YTKQ0yQxiK7/qPo9WJP/7/U8A/KOis5QE1DhJ mLqvBq4x2DgauuO0Nq2Qkez4AXLMYLJ1RTTiw2viNn9DgSFfeY2CJm5EayHKJMuctzmp jc4KIuufSUNlIrwQwjjD3T6BXmkyYGD7ZxFuZfMl8yhdRziAVi5WzECkJ09z4LPa5G1f eVMA== 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=th/LtwSbDHtpliaegNTIIpn8XEUqkK1zBP/yEw1p3ZI=; b=Id/7gLuyVyh0jfTdr4gbs+30H9pFUnvcQ9+qTxznDNUh/B6X9fpgee8mbB+fiUZFCw drwdjZkRrlfRAPrnjNrk7JpqRsqxI/lwvylEjBFOcFnkcKEMj0esPUN7mnCkiKuLJlEt j9c8MTOUcSV2JV4TgA7/mxtoPNhv7xOoTsc8XitHFO3zKYogviuDP4n/XXr1qdhJQpix kAiJJUW1082LAda/21zAici08TmxLtHNmRSqHdpwH4EsUkWFm7rIzShN3Np+AJqJtmJu IqZjnAQQO8sXIIxJyiO+5hiiprHHdWFYrvvq9l1RbqElbzF6WNkniXiPgUOhrZiSb2Kh n4yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=QIafgtOq; 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 fj4-20020a1709069c8400b0072aeaa5ee4esi474167ejc.19.2022.07.05.00.23.10; Tue, 05 Jul 2022 00:23:40 -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=QIafgtOq; 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 S230154AbiGEG6X (ORCPT + 99 others); Tue, 5 Jul 2022 02:58:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230129AbiGEG6U (ORCPT ); Tue, 5 Jul 2022 02:58:20 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D38C2308; Mon, 4 Jul 2022 23:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1657004299; x=1688540299; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VkEQlmvh2BIE78NCfcXTBmqm8BrRNRSbLJGqVTHxzwA=; b=QIafgtOquuOjG139FMhjBPlTzuJKSCiHpwIzjUBR7LnGytJiFKApwXcZ 3hbl6qnchwTFWClCuADFC6cre7eA87UDN2Ag/ALJdGHaIlKjGWVBjJzTp Eh4zOda9zfOJ34MEeNTEr/xK8knpCForbysPy40eN6KCIxPeDyzn9PTft ZLlA+iz2ShymXl8QDU9a53bdk+pMQ2QXwfuO0YxifxyVvkB+JtHQWcOrR 8aqJ5fd5e3rZb1i3hHXRrEqJE2ILSQKI7VP0REiRFhciFBKJjOIAuZ0YF B0xFH8z7VCSYUuQ37uu/G6w5BNszmU/rLnhZrPyEVo7lDEaf0O08CvBHT Q==; X-IronPort-AV: E=Sophos;i="5.92,245,1650956400"; d="scan'208";a="166371625" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Jul 2022 23:58:18 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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, 4 Jul 2022 23:58:18 -0700 Received: from kavya.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 4 Jul 2022 23:58:14 -0700 From: Kavyasree Kotagiri To: , , , , , CC: , , , , "Krzysztof Kozlowski" Subject: [PATCH v6 2/3] dt-bindings: mfd: atmel,flexcom: Add new compatible string for lan966x Date: Tue, 5 Jul 2022 04:57:57 -0200 Message-ID: <20220705065758.17051-3-kavyasree.kotagiri@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220705065758.17051-1-kavyasree.kotagiri@microchip.com> References: <20220705065758.17051-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 Reviewed-by: Krzysztof Kozlowski --- 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,flexcom.yaml | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml b/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml index f577b8d8e1ea..f90973ffa472 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 + required: - compatible - reg @@ -56,6 +79,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: @@ -69,4 +117,17 @@ examples: ranges = <0x0 0xf8034000 0x800>; atmel,flexcom-mode = <2>; }; + - | + #include + + flx3: flexcom@e0064000 { + compatible = "microchip,lan966x-flexcom"; + reg = <0xe0064000 0x100>, + <0xe2004180 0x8>; + clocks = <&flx0_clk>; + ranges = <0x0 0xe0040000 0x800>; + atmel,flexcom-mode = <2>; + microchip,flx-shrd-pins = <9>; + microchip,flx-cs = <0>; + }; ... -- 2.25.1