Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp578665pxb; Tue, 5 Apr 2022 14:44:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNtQb4sSBBJJeyAkrdwy8husCojoTUl9oElzl2tjcgnH8gNjhjdVz+8VNXo1RS+wKy6cO7 X-Received: by 2002:a17:902:f78d:b0:14f:ce61:eaf2 with SMTP id q13-20020a170902f78d00b0014fce61eaf2mr5430025pln.124.1649195053291; Tue, 05 Apr 2022 14:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649195053; cv=none; d=google.com; s=arc-20160816; b=Mj0EGdbL90S4rs622H8gfgUv3DtPExsm2zMbLAj+5hqL/m0IFhIsdWyW3MOa8HQ2kX wFnbw0/O4T2V7pyR/CPJ+BVScKaimgHi/BG44HIU1Satd/Omgz4eVWv2g8Jig4cDKSIw yyHhpoMJHetpgfB3mSkgYsewwyircNLM5shIS6T00KhjriGiYlJyG28dWMHiRvS45XC/ XyBaEq9F/j+yK74cgT+7nV/O4xFylyWprGa/XmJi8il7gh0Mwc7ziT9O/a7y6zrUkkSw KtR2wbR2od36+v1g2gLSHeILhAbzAnbuwxF3RIQdDJAxcuBueJjFI4pC33smHU7eRhYN 0Z0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=55otsngJMkE2kUEKGJZiQAcIS29Dk9hKckXC7iXgvqY=; b=Gh0dZ6nctBH4okleBn0fKF6ypVLU+ShXMzY5aXLu7qfpCgNMLh0ink4QmaVJysP+ce ehc9r/E1qXRi8MOfVob3x/EAjkRGOZrDT0KHGjxEE9hc7aJY/uJGF74VQ6kSCWkzeoVl 3ZLpL2pUKNudyQ4YOercH9IoBAHo6iwOu7TO3m3YLCAOCpAyUNy1QOhmk2c/UZo7Nxtr THeNvQrvnSYwgRWddyQkOI1Dcvx1Xh8Z2PVjDSnZnPzLGYuOYj4fMIFueCpAvIcUAiMm uCNkGq1CgbeY/TLcGcT0pT/F717SVN1vTyJ1DQknmOeMsmZwK5rRSJ3pd0Cz51YvUZcN rNyA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v23-20020a63d557000000b003816043f04bsi14071312pgi.576.2022.04.05.14.44.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 14:44:13 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC7EA18B274; Tue, 5 Apr 2022 14:32:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242195AbiDEIhO (ORCPT + 99 others); Tue, 5 Apr 2022 04:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235621AbiDEH7x (ORCPT ); Tue, 5 Apr 2022 03:59:53 -0400 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 315BC65A4; Tue, 5 Apr 2022 00:56:25 -0700 (PDT) Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 05 Apr 2022 16:56:24 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id A27D22058443; Tue, 5 Apr 2022 16:56:24 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Tue, 5 Apr 2022 16:56:24 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 13550B6389; Tue, 5 Apr 2022 16:56:24 +0900 (JST) From: Kunihiko Hayashi To: Philipp Zabel , Rob Herring , Krzysztof Kozlowski Cc: Masami Hiramatsu , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH] dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string Date: Tue, 5 Apr 2022 16:56:18 +0900 Message-Id: <1649145378-30358-1-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Instead of "oneOf:" choices, use "allOf:" and "if:" to define clocks, resets, and their names that can be taken by the compatible string. The order of clock-names and reset-names doesn't change here. Signed-off-by: Kunihiko Hayashi --- .../reset/socionext,uniphier-glue-reset.yaml | 52 ++++++++++++++----- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/bindings/reset/socionext,uniphier-glue-reset.yaml b/Documentation/devicetree/bindings/reset/socionext,uniphier-glue-reset.yaml index bfbd3e9b4186..0a2c13e1e230 100644 --- a/Documentation/devicetree/bindings/reset/socionext,uniphier-glue-reset.yaml +++ b/Documentation/devicetree/bindings/reset/socionext,uniphier-glue-reset.yaml @@ -38,25 +38,49 @@ properties: minItems: 1 maxItems: 2 - clock-names: - oneOf: - - items: # for Pro4, Pro5 - - const: gio - - const: link - - items: # for others - - const: link + clock-names: true resets: minItems: 1 maxItems: 2 - reset-names: - oneOf: - - items: # for Pro4, Pro5 - - const: gio - - const: link - - items: # for others - - const: link + reset-names: true + +allOf: + - if: + properties: + compatible: + contains: + enum: + - socionext,uniphier-pro4-usb3-reset + - socionext,uniphier-pro5-usb3-reset + - socionext,uniphier-pro4-ahci-reset + then: + properties: + clocks: + minItems: 2 + maxItems: 2 + clock-names: + items: + - const: gio + - const: link + resets: + minItems: 2 + maxItems: 2 + reset-names: + items: + - const: gio + - const: link + else: + properties: + clocks: + maxItems: 1 + clock-names: + const: link + resets: + maxItems: 1 + reset-names: + const: link additionalProperties: false -- 2.25.1