From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B8FDDC43334 for ; Thu, 16 Jun 2022 22:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c9Km5fl/AMyHr2t1e9eME4tOR0NpogM1R3BIe8/E+oU=; b=BDWsI4btQM65rR AmCR5L8qxa3Xes1CyqqpjNag2FnJj10wI17+3hN3eZesbMjDGm6hhqRQYt+O9sAgKiVbjOSTFNaQx GuOu3Amek6Ko1vjVMCc+QjerLVKmZXwR9aEpRRyvy5+Gpi+dBnckJiIEVoVF5z5z9A7uTHJHRYVuo 5UksoXMUeL+M33uQMVyJXLmblhzXBpF0fth39cZDHRNdv229JtyJcAw5qrDjDhxCcg+kqIqfnOYeE h9e890VQdj7LN10qTLD6zfRgPdJGkIwbzfrkyfl75D2v+gEV6KzUX7/adnq62s9E0roB+1hp9YOaQ wtZk6sAydw1Quel43YjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1yHa-004fpI-TW; Thu, 16 Jun 2022 22:48:11 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1yHX-004fmt-T9 for linux-arm-kernel@lists.infradead.org; Thu, 16 Jun 2022 22:48:09 +0000 Received: by mail-pj1-x102a.google.com with SMTP id cv13so243441pjb.4 for ; Thu, 16 Jun 2022 15:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=D4wYNhCrugPOLx6NQzh5DQYpCR2JYLvdgRSxgN/KnFY=; b=NAJ2unUhWosiXfMkbjIrpO0dDiluf91z8///fATeLpwgILwfiE+kM5YBdFpaUIGq17 5Um6HU+xdw4baxlCIWd0jms6yo85llzLBx9PA94P4f+5xbogFjqL+R9fGYtsmx9TavHG 4U6P+fkeo1BWzuHlFczZV7V9vLQXom6j4Dgm+ZcAssevg5Lvhzh1Jq3LzX84t3yl6lTX fhSPUkSh9H+GQ3sCWePzR9BGpoUAiFh3rDz9jUbV49abC41Pf0U9T9eCCaS3QXXs+/iM uRcaJnnBxkLPV6yOfXH1DDlEvA2wCJe5KDfvvp4hgl8Lumv5/dZCJKD28YBg1Ad9RtBr sPpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=D4wYNhCrugPOLx6NQzh5DQYpCR2JYLvdgRSxgN/KnFY=; b=UJOYwQFHoJUt/nXjFL5iXYkFE/uNqKF7sd5qkM6A2ChsCAk0OVWsMnzg8zVlOv71Pl haMwNSRumAfxThbI2kKZAvYYFUoZwNmlrGRYsLPj4A1pb9SVCSNfgbTDOYNSZHfWW/3E gmkVfHpR0tXnGz3Qw/wMCBg4aLJAwEFRayONkCTzqMz1pVWjn0GIcjZa9Q6yJDA1x8nY lcxWKb76hHvh+ZRDTdN+DcdxMQJU+BMrsPGlOh0fQzgAxUNk5iL4JTxekMD872pkRw4t t47pZBo82SHxHyJa9H16ZfS0xDOqLhbVDvOlJ1qVuEToVt0mlcDyDhrfjim0mbBG+Kcb f2Eg== X-Gm-Message-State: AJIora8Xq4nxRnPBhUi/U83APfyVP+lxNWBReRi+o2VuHs+SL70nUnc5 neMDdXytZY3ezjdfMN1TABeNRg== X-Google-Smtp-Source: AGRyM1vc+vcRuQ2TZeqUJaBdLXB66+ueezXpaJBqAh1uNNDMle811gM+06V92iS2MmAk6l2OcEBXJQ== X-Received: by 2002:a17:902:8e86:b0:168:d6d6:660f with SMTP id bg6-20020a1709028e8600b00168d6d6660fmr6404813plb.35.1655419683436; Thu, 16 Jun 2022 15:48:03 -0700 (PDT) Received: from [172.22.33.138] ([192.77.111.2]) by smtp.gmail.com with ESMTPSA id c18-20020a170902b69200b0015ee24acf38sm2096401pls.212.2022.06.16.15.48.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Jun 2022 15:48:03 -0700 (PDT) Message-ID: Date: Thu, 16 Jun 2022 15:48:02 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v3 2/3] dt-bindings: mfd: atmel,flexcom: Add new compatible string for lan966x Content-Language: en-US To: Kavyasree Kotagiri , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@microchip.com, UNGLinuxDriver@microchip.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220612152604.24280-1-kavyasree.kotagiri@microchip.com> <20220612152604.24280-3-kavyasree.kotagiri@microchip.com> From: Krzysztof Kozlowski In-Reply-To: <20220612152604.24280-3-kavyasree.kotagiri@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220616_154807_993863_54F67B9C X-CRM114-Status: GOOD ( 18.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/06/2022 08:26, Kavyasree Kotagiri wrote: > 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 > --- > 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 | 75 ++++++++++++++++++- > 1 file changed, 73 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml b/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml > index cee9c93ce4b9..d9b0fe2b0211 100644 > --- a/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml > +++ b/Documentation/devicetree/bindings/mfd/atmel,flexcom.yaml > @@ -16,10 +16,13 @@ description: > > properties: > compatible: > - enum: atmel,sama5d2-flexcom > + enum: > + - atmel,sama5d2-flexcom > + - microchip,lan966x-flexcom And here you have correct syntax... > > reg: > - maxItems: 1 > + minItems: 1 > + maxItems: 2 > > clocks: > maxItems: 1 > @@ -46,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. > @@ -72,6 +96,25 @@ required: > - ranges > - atmel,flexcom-mode > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: microchip,lan966x-flexcom > + > + then: > + properties: > + reg: > + minItems: 2 > + maxItems: 2 maxItems are not needed here. > + items: > + - description: Flexcom base regsiters map > + - description: Flexcom shared registers map > + required: > + - microchip,flx-shrd-pins > + - microchip,flx-cs You need "else:" setting reg to maxItems:1 and disallowing the properties (microchip,flx-cs:false). See for example: https://elixir.bootlin.com/linux/v5.17-rc2/source/Documentation/devicetree/bindings/media/renesas,vsp1.yaml#L53 Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel