From patchwork Fri Dec 23 07:07:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 36147 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp185186wrn; Thu, 22 Dec 2022 23:25:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXu6FwQjWwIvXmep9CJi0jXXxygMHE5nJl+QJtgLKkMFh19BM9BNRF4Ztv+CVLLt+24rcd1S X-Received: by 2002:a17:907:d489:b0:7ae:e886:8ccb with SMTP id vj9-20020a170907d48900b007aee8868ccbmr9174598ejc.14.1671780356990; Thu, 22 Dec 2022 23:25:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671780356; cv=none; d=google.com; s=arc-20160816; b=bfK54/Nr9MmMLbqm9jo3Dfb7uBVuQc4Xu6zzhwkR1cLP59HQzQ+9pt7HiBKYBhc14E dNJRT4M+4C+yIsLBerImkcttaTrIiGpu34sD3ipLMxmNzTw4GHahXf4mXvKBDd5FXn3J 0vjjBg7HKE22GNEzc9z3MgD33s0xRPfUl4k4Q6Xl4DATE8dkT4LOC+ARuHYIhudTvotB MbsbAhdfh2j8FYcPJJr/abqE+ue6KWO/sII9p/oAnkFpuUhDJcHE314qGyc8F/LHFvwc mRBgRI73jBlsueU62ULFrRJZCSh4PiHP377adXJuXXgmHHtxRPH3+TGtI/MAHIuG7OSe 37Pg== 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; bh=ff0N+d47j3bqhBrdF3tsaqDuPFR5oe7P9YlkUtv8j8M=; b=UqDK0dTRL00P+7g7TAXqSk1Qyxqi72lWz4XSglLshlYyLYTkfbqSRrJ3/IK3DHR3M8 2q+hbTJjJy0R3ab7hfY9nN2zwviLHb/XHkG5fthz5vCNPGGwXdjTV8ch415mw3dc5t2M NpexZ+wmr9NEcgJX/1rMz5oKtdrdWeOkAxMcp6OG6yW4FSh+qbdrpGh/hwv2Vv1FpTUA Wxoq32beNgNX12qasvQCGCC0ZOTnfvoYGX+YBFO5nIvBd/3SCJ8anKpbHqmPFkjGuAfY qCqWWK8YEA1Llep3nOU2CQXVP6kmVDvv5BezXdzYalzGWIva662uT/TOJ8pbmRs4GVft MrHw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m20-20020aa7d354000000b0047866149cdasi1937365edr.388.2022.12.22.23.25.33; Thu, 22 Dec 2022 23:25:56 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235948AbiLWHH2 (ORCPT + 99 others); Fri, 23 Dec 2022 02:07:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235852AbiLWHHZ (ORCPT ); Fri, 23 Dec 2022 02:07:25 -0500 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AE4F719282; Thu, 22 Dec 2022 23:07:23 -0800 (PST) Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 23 Dec 2022 16:07:20 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id B40512059054; Fri, 23 Dec 2022 16:07:20 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Fri, 23 Dec 2022 16:07:20 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 7D8EA12A5; Fri, 23 Dec 2022 16:07:20 +0900 (JST) From: Kunihiko Hayashi To: Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , Krzysztof Kozlowski , Masami Hiramatsu Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH v4 1/1] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string Date: Fri, 23 Dec 2022 16:07:13 +0900 Message-Id: <20221223070713.20549-2-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221223070713.20549-1-hayashi.kunihiko@socionext.com> References: <20221223070713.20549-1-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752988759505901628?= X-GMAIL-MSGID: =?utf-8?q?1752988759505901628?= Instead of "oneOf:" choices, use "allOf:" and "if:" to define reg, clocks, resets, and their names that can be taken by the compatible string. The order of their names doesn't change here. Signed-off-by: Kunihiko Hayashi Reviewed-by: Rob Herring --- .../pci/socionext,uniphier-pcie-ep.yaml | 76 ++++++++++++------- 1 file changed, 49 insertions(+), 27 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml index 437e61618d06..f0d8e486a07d 100644 --- a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml @@ -15,9 +15,6 @@ description: | maintainers: - Kunihiko Hayashi -allOf: - - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# - properties: compatible: enum: @@ -29,40 +26,25 @@ properties: maxItems: 5 reg-names: - oneOf: - - items: - - const: dbi - - const: dbi2 - - const: link - - const: addr_space - - items: - - const: dbi - - const: dbi2 - - const: link - - const: addr_space - - const: atu + minItems: 4 + items: + - const: dbi + - const: dbi2 + - const: link + - const: addr_space + - const: atu clocks: minItems: 1 maxItems: 2 - clock-names: - oneOf: - - items: # for Pro5 - - const: gio - - const: link - - const: link # for NX1 + clock-names: true resets: minItems: 1 maxItems: 2 - reset-names: - oneOf: - - items: # for Pro5 - - const: gio - - const: link - - const: link # for NX1 + reset-names: true num-ib-windows: const: 16 @@ -78,6 +60,46 @@ properties: phy-names: const: pcie-phy +allOf: + - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# + - if: + properties: + compatible: + contains: + const: socionext,uniphier-pro5-pcie-ep + then: + properties: + reg: + maxItems: 4 + reg-names: + maxItems: 4 + clocks: + minItems: 2 + clock-names: + items: + - const: gio + - const: link + resets: + minItems: 2 + reset-names: + items: + - const: gio + - const: link + else: + properties: + reg: + minItems: 5 + reg-names: + minItems: 5 + clocks: + maxItems: 1 + clock-names: + const: link + resets: + maxItems: 1 + reset-names: + const: link + required: - compatible - reg