From patchwork Fri Oct 15 09:27:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 12560913 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46F32C433EF for ; Fri, 15 Oct 2021 09:33:49 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0FA6E610D2 for ; Fri, 15 Oct 2021 09:33:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0FA6E610D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LPXwet562o3yHaghj19+kkgMWDfWd8SYI6wHYzU8wpM=; b=JgAziJ2NnmGgT8 ulGEYOAqhbWKygF80outUAf8s8iBFM+FVcdQVM9Od0ywapS9URtsWfTRwazU501NMup0NaEeBGJHJ hkbB0VQ4uCipz0xPxjmppJHlRKnaGrAlLjoJySdD876i22TuX/EFTqWBcjvQRMw53Yf+zBZZLnYeE pDSX5vA0eMvDKNbt5+DhojRqMEC+6HRpgKgf5Lc57USJIqYYNzCdbnVGNRLMwB+DqsDCfRDCUYUcY 1/SGWkKsTfyTEi02sylMpO3gDO9NUgbYRuIa7CI3i4X9U0Hd9E9YzsTQSvhfvm+MkuolWQPNVlOC4 v9aDfr89EiX7fhDXO3hA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbJZ4-006Ios-0b; Fri, 15 Oct 2021 09:31:47 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbJUs-006H2J-Gu for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 09:27:27 +0000 Received: by mail-ed1-x52c.google.com with SMTP id y30so18487814edi.0 for ; Fri, 15 Oct 2021 02:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jqcUpdGkPlLCSTn8tOP34V+Kz/Zhk4bMhTOT82uEivE=; b=godJCkEv5ZKTN1Jch1qRe/oy1BiwOSYOzQHeO11hViPuOEngpPKz1doHT3Y04ZB5HL su0SiD83VAUMOpPDr77PzRMYXGMiybbUPkKtKIFTAM00PjKXkJ7Ch16xLqO6XOqO57BN d8N1Ys7uBHVwu5LEOLM4jh8BPCxmf0vKGK/CaDjNUiGO2XsOil4AVBjWjuy070SVfKkC +c2wK7TkwUEAQNAlIodpU+sKtXT0i84L4u80gxN75JPRbWYArVIGY2DL5/M2iO4ukqhs Z0G63GMMYebE+ALYDapILXxXZ5tWDgc+QIQZDc2nbBaPZ/4eonoIJyVzWsgnyQgr4RZT mIwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=jqcUpdGkPlLCSTn8tOP34V+Kz/Zhk4bMhTOT82uEivE=; b=rV+qkxqPLsWwpRZ3+FEor5laC0HDKJyKTKfeZhkcVOKY1FnjmwFhzqu2tvf9gpdYOo 3D+Eng9Hzp1DstRCt1VuVsJxPJVFovwn8TtwogNPQKFy2a+hCfZZKKHOL00FvkaKP6jJ TodYq2JWBBDMK2cz7DnHgkXSO2GMgpxfJyl19cLcBsY/A3SurkDw//Q6FLmN7LN4u8ht sYpjAqkwjMfTZVs1JR1rIougVZ6+DfoOz9xnYgvTqfxETh3P8GXI0d5UhYBeB/UOLBFL gCydQ/LU+FE4qNjOICmPddQ7KdXuEB5rG1EkN9YmyzwX4i/Hv6R7Dptx8TIFZs1jldu/ Z5mQ== X-Gm-Message-State: AOAM533YHK7pisPcYB99/iqF0OsRmxXNqk6/TVmZcyFfgyJPRi2zNcdS B8K23J6kxyIMtjuuNeulC/4Zsw== X-Google-Smtp-Source: ABdhPJwdmDklhD3pxxbqu9f2G/CNKriBF1c71usHNKjHgYAwNh5+pG2jeLZotWlI7WoAnEtp8a6PCg== X-Received: by 2002:a05:6402:268f:: with SMTP id w15mr16920947edd.13.1634290044445; Fri, 15 Oct 2021 02:27:24 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6:f666:9af6:3fed:e53b]) by smtp.gmail.com with ESMTPSA id a1sm4195840edu.43.2021.10.15.02.27.24 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Oct 2021 02:27:24 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Cc: Bartosz Golaszewski , Linus Walleij , Rob Herring , Shubhrajyoti Datta , Srinivas Neeli , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Subject: [PATCH] dt-bindings: gpio: zynq: Describe gpio-line-names Date: Fri, 15 Oct 2021 11:27:23 +0200 Message-Id: <4b9db94cdd8ca106feee53f76fab2a23721f7d2a.1634290039.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_022726_616145_F030DADD X-CRM114-Status: GOOD ( 10.27 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Number of lines depends on compatible string from 58 to 174. That's why it is checked based on it. Signed-off-by: Michal Simek Reviewed-by: Rob Herring --- .../devicetree/bindings/gpio/gpio-zynq.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml b/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml index da95b951c23e..29c27eadbac8 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml +++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml @@ -28,6 +28,11 @@ properties: gpio-controller: true + gpio-line-names: + description: strings describing the names of each gpio line + minItems: 58 + maxItems: 174 + interrupt-controller: true "#interrupt-cells": @@ -39,6 +44,51 @@ properties: power-domains: maxItems: 1 +allOf: + - if: + properties: + compatible: + enum: + - xlnx,zynqmp-gpio-1.0 + then: + properties: + gpio-line-names: + minItems: 174 + maxItems: 174 + + - if: + properties: + compatible: + enum: + - xlnx,zynq-gpio-1.0 + then: + properties: + gpio-line-names: + minItems: 118 + maxItems: 118 + + - if: + properties: + compatible: + enum: + - xlnx,versal-gpio-1.0 + then: + properties: + gpio-line-names: + minItems: 58 + maxItems: 58 + + - if: + properties: + compatible: + enum: + - xlnx,pmc-gpio-1.0 + then: + properties: + gpio-line-names: + minItems: 116 + maxItems: 116 + required: - compatible - reg