Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1364626pxb; Tue, 17 Aug 2021 09:56:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/g2j1/i7e926RrGfPRK2JmQLMC0B1EgKCSBirBkiNvlfwB/mg2Nk5YmuIODihPIGx17U8 X-Received: by 2002:a05:6402:1850:: with SMTP id v16mr5321063edy.308.1629219411209; Tue, 17 Aug 2021 09:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629219411; cv=none; d=google.com; s=arc-20160816; b=SdjRz2qUXmieW6u03pJU1xu48xClmsfQt1I3H2Hw0hdSqH/hH4H//b0k+DeWOQWl3k N+5k4SJSdYa9HUH+FSeCWGO6hGEUzlEFvChPYI324RdgAgvQklf4SZYsJq5V4drln8Ca P4Dt3uYsf0mX+9NznhfbrxsiwYVs9PrXWH6AcxwOg2ZvHcNVsYp9pWpdT3HlX/WuHftU LwdrK2WpO0JFBJufDrFLoqFyMmyX09jCYAk7We4xSzVwdhIiR6kaUScy4788kHzfqwKO w7r3VVOB0CLQ9FcRQ4tVHAG7vXQ8ccXcGMXYb3MO+1+tdl588s0eqGg6alTHiCbWxLfh xmZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=TRXsHZES2DVeAZffLo0g6CHeWjHSwwEsvSttTLF0opY=; b=u1otdwfmbHIGrfmzr7lG0Osw3pZOm3WPmRWGqWqoW809eJIoNIdQ4qNkeOy3bou55k iDLdQryl94QakS/BGTkeBso2FH0vMO/ymOvJqWZNqKUtzKuRdjAJyv2W/DKbCU6lwzMw /y8OoTRueWbrIligIit0I47saHiek0A/Tns9lq/UHQI86iLvnIsV38BR/s1bJuBOhkrt gsVlXdIvWjYoQoxj1GIsjuXLo12pW63LLQfW+eRf5D40IHNzUAUN12EOxfxgjhwpJT2X 05XxN/XJrOkATG6+Wz8QHU9MgQI9ZFQejSAqzFkLbpBBNmp16bu7cdUSuMyOkFF+3Y3l WMSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Oj8TfBSw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lu2si2944791ejb.166.2021.08.17.09.56.23; Tue, 17 Aug 2021 09:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Oj8TfBSw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231301AbhHQQwy (ORCPT + 99 others); Tue, 17 Aug 2021 12:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230367AbhHQQww (ORCPT ); Tue, 17 Aug 2021 12:52:52 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3C39C061764; Tue, 17 Aug 2021 09:52:18 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id w5so39938931ejq.2; Tue, 17 Aug 2021 09:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TRXsHZES2DVeAZffLo0g6CHeWjHSwwEsvSttTLF0opY=; b=Oj8TfBSw0nR1udwocmRMy5LTA1CO/ql0IygaS0l38S5R8yh0DHR1jycGSypIMVoIeU tknFTc/Dc0f9aD2t0glUsZpH5L4qYRqpjp3auZoQJ4wifdBliFa2mvXUYnGmHkR8x5zE NStJFeeMYKUxwTB2F6hJtJLAgRbYKhZe+OfCYOYVZUdO2PGTX1krRQi2j4QHV5EiFC5o gKQreD/LkhF2TNW/m17OMAOfnWMDQcIlqcV20ASNjpGkYdcv0PTg98dAIfJ9Tu7I0WmM X6Lr6jocf9OJl06OHcSyD8L5SCd952cENZcRkURhFm7kX08gU1u8KlPIXDGhQRl6g9BE 9GKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TRXsHZES2DVeAZffLo0g6CHeWjHSwwEsvSttTLF0opY=; b=gWHeDPOntIFMmfhXaf8//EgBX56K69XqG551qOEyybhQBKTtzcVbfkiyUUaWymDHWn ORgoobK+0HtxFR6maMBqHYLD6AK3z2I189NRCXlbdUX5vSz3uAQIQNV879CidOps5V4R h1u94r9+vHU8KSOtm6djaZTgEjOmXe/s881q3s6X9CBek15Fb+vZz3bDEUen/ZH6xkJT 4vzvACqryf3E7HpImDYERdSZEBiqr9b7ivkElduzb85MnQEzRD9a8HX1j5yd11lFwtYB KMR8NYC/EwZLO14r3kFdfFLdirJiBmmRlv/AybEMGmCzTvNnezNpWw9yowPy1uNeCgzW nHKQ== X-Gm-Message-State: AOAM532ygRvdnZLNsSqmIcegVle2wGi79V3NCvfj1KNno9NPaipkIv3v ijuA+pmlHmgMxvJ2VYfbIOYGaLsbf+4= X-Received: by 2002:a17:907:20b6:: with SMTP id pw22mr5083209ejb.512.1629219137363; Tue, 17 Aug 2021 09:52:17 -0700 (PDT) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id r6sm1330826edq.20.2021.08.17.09.52.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Aug 2021 09:52:17 -0700 (PDT) Subject: Re: [PATCH v2 2/8] dt-bindings: phy: phy-rockchip-inno-usb2: add rk3568 documentation To: Peter Geis , Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Heiko Stuebner Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210812204116.2303617-1-pgwipeout@gmail.com> <20210812204116.2303617-3-pgwipeout@gmail.com> From: Johan Jonker Message-ID: Date: Tue, 17 Aug 2021 18:52:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210812204116.2303617-3-pgwipeout@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, Some comments. Have a look if it's useful. On 8/12/21 10:41 PM, Peter Geis wrote: > The rk3568 usb2phy node is a standalone node with a single muxed > interrupt. > Add documentation for it to phy-rockchip-inno-usb2. > > Signed-off-by: Peter Geis > --- > .../bindings/phy/phy-rockchip-inno-usb2.yaml | 31 ++++++++++++++++--- > 1 file changed, 27 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml > index 5bebd86bf8b6..d2a749c3f9a3 100644 > --- a/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml > +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml > @@ -18,6 +18,7 @@ properties: > - rockchip,rk3328-usb2phy > - rockchip,rk3366-usb2phy > - rockchip,rk3399-usb2phy > + - rockchip,rk3568-usb2phy > - rockchip,rv1108-usb2phy > > reg: > @@ -50,6 +51,9 @@ properties: > description: > Phandle to the extcon device providing the cable state for the otg phy. > > + interrupts: > + description: Muxed interrupt for both ports > + This allows every Rockchip SoC dtsi to add an interrupt here. You have only restricted the requirements. The goal is to restrict things and filter bogus properties. If it was done because it doesn't compile, maybe could you try/test/use something like the rockchip-io-domain.yaml $defs format. === unevaluatedProperties: false allOf: - $ref: "#/$defs/rk3568" $defs: rk3568: if: properties: compatible: contains: const: rockchip,rk3568-usb2phy then: properties: interrupts: maxItems: 1 required: - interrupts else: properties: host-port: properties: interrupts: description: host linestate interrupt interrupt-names: const: linestate required: - interrupts - interrupt-names otg-port: properties: interrupts: minItems: 1 maxItems: 3 interrupt-names: oneOf: - const: linestate - const: otg-mux - items: - const: otg-bvalid - const: otg-id - const: linestate required: - interrupts - interrupt-names > rockchip,usbgrf: > $ref: /schemas/types.yaml#/definitions/phandle > description: > @@ -78,8 +82,6 @@ properties: > > required: > - "#phy-cells" > - - interrupts > - - interrupt-names Also remove them as properties in this part when a separate $defs is used. > > otg-port: > type: object > @@ -109,8 +111,6 @@ properties: > > required: > - "#phy-cells" > - - interrupts > - - interrupt-names dito > > required: > - compatible > @@ -120,6 +120,29 @@ required: > - host-port > - otg-port > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: rockchip,rk3568-usb2phy > + then: Test "if then else" alignment with yamllint > + properties: > + interrupts: > + maxItems: 1 > + required: > + - interrupts > + else: alignment > + properties: > + host-port: > + required: > + - interrupts > + - interrupt-names > + otg-port: > + required: > + - interrupts > + - interrupt-names > + > additionalProperties: false additionalProperties does workn't with allOf: - $ref. Use unevaluatedProperties. > > examples: >