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 X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB461C4338F for ; Tue, 17 Aug 2021 21:44:05 +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 5116A61053 for ; Tue, 17 Aug 2021 21:44:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5116A61053 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v9mZBgCWd5lSsQa4sMATnOSRFrHo3UsjVUiUm6DKMQc=; b=Q4gnGhpxe9l4Nh ZGIIBJB0wSwR3IW09ryFddhzhU3wDCuAEYKNumu3+4Y9qs1MOai3O+x38ynHuYn6VXB5PZJtTQ2Cl sn2xAcDq/2acheOuCViA8GdomA7YXsuHTOvKe9bNDeC4kqGCQEeceumx8le86f5QgrSUFwo7Dcv/u qB9wl8mepG5uydOH7opzTdCM0KFh9dxIY1jAX+0qQzqWOUOHHRJkaNDIi4GoqRxpzE5hWzuKk3viw c5OLV5WJAWcKFPQg6QChBhKo+JgSX+X9/glSHMRh4GZE4p9kPe4N3OYotQSj8Pc4zHxLdcCsbN0xT PKB0lRI2vZms9bKZGVrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG6sO-003ZjY-Rc; Tue, 17 Aug 2021 21:44:04 +0000 Received: from mail-oi1-f178.google.com ([209.85.167.178]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG6sM-003Zj7-Ea; Tue, 17 Aug 2021 21:44:03 +0000 Received: by mail-oi1-f178.google.com with SMTP id n27so1412653oij.0; Tue, 17 Aug 2021 14:44:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hZMyVTSz00omtED+yJU35WSO6/6GKOSZju3UYtA2Jto=; b=R1iTLMqngQP8f/b3bOXbQLVFQRN64PHNDDCXK2ILhBFfZN1yphebVoPZQXGs2tnp4q QcVE2bDhalJR9rEJQOEckoBDBJk8yPuENU3dHDo6cJrqfFLGFqFY7j8II5umHbEb4UX8 /jf5kqRBCUgFbrzMZv8ZUbE3SP+5l/3Ci7IWh7BqdqHnubbUbgpuCpRkZ2vvVSPCdv4S 00ZpiYytaNzISaYLwI3gAln6LBqySYE2Vkwf4xnZOLXPhrQ9Xd3ZfHaVOkQ4xQgUV4sN Lei/TIM0TK8rQWdlzHYbQoc/1/LeeW8RBUMw3oRL7HGwWqSKiQKH0d2ptGDyqBRumLk0 Lmhw== X-Gm-Message-State: AOAM532UwOgVKUZKZZrvf7nYPv+CFWeGRW+Tl1RfnG/6Sk9DwE7ykc4y MB0itVyCEkmLQ6NJ3tRyKA== X-Google-Smtp-Source: ABdhPJz4Jz497LdrZ1zW7H9CD5rs1AWEeBLYA9sSHle3vr/l2xc8jj1U1zg7qlDuXt5XaVqNe/gL6A== X-Received: by 2002:a05:6808:bd3:: with SMTP id o19mr4201525oik.10.1629236641847; Tue, 17 Aug 2021 14:44:01 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id y16sm612500otq.1.2021.08.17.14.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 14:44:00 -0700 (PDT) Received: (nullmailer pid 893186 invoked by uid 1000); Tue, 17 Aug 2021 21:43:59 -0000 Date: Tue, 17 Aug 2021 16:43:59 -0500 From: Rob Herring To: Johan Jonker Cc: Peter Geis , Kishon Vijay Abraham I , Vinod Koul , Heiko Stuebner , 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 Subject: Re: [PATCH v2 2/8] dt-bindings: phy: phy-rockchip-inno-usb2: add rk3568 documentation Message-ID: References: <20210812204116.2303617-1-pgwipeout@gmail.com> <20210812204116.2303617-3-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210817_144402_541609_CA3A2687 X-CRM114-Status: GOOD ( 25.85 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On Tue, Aug 17, 2021 at 06:52:15PM +0200, Johan Jonker wrote: > 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. Don't use $defs unless there's more than 1 copy needed of something. If it happens to bypass some checks, it's only a matter of time til I fix that. This may be better solved with another schema file rather than a long if/then schema. It's a judgement call. > > === > > 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 yamllint is not going to help there. What's needed is a meta-schema that adds the dependencies. > > > + 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: > > > -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy 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 X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88032C4338F for ; Tue, 17 Aug 2021 21:44:19 +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 478F16102A for ; Tue, 17 Aug 2021 21:44:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 478F16102A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KCvxmVTp9FEbCIKJdHDobJfSGCEbgTE+fhkNza4bQis=; b=CanIN8Dj28k8lp HgckLLHRSikM0rwve5PoAE8r/DcSCGmTXYBBNRfaE+lRJBQKkitBeAWyR5/HW9onqgiAgtS7QZcrb 0kuXX0hQX05mQ75bxQZ6zRHBjg3ZVZI/jilzu05D503kg/EBV4taeho7MMUWCuhooqnY5i2V1lVEU /QhBmnw2FXnMDF4gaeFc94c/qeDNti+E98vH96wr2REYYwQzsuPb3DpgCHAvEy8UoUkvO5iXP+7wD nbcWncNaNmGchkfa/i8mVxixlgtw6xzjC5lVXH7vAbe6XsRxJg9hpGC1O0d60Z1XHQd85afj9NbqY t6J4jqv+bHLoJnvznOrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG6sa-003ZkN-0U; Tue, 17 Aug 2021 21:44:16 +0000 Received: from mail-oi1-f178.google.com ([209.85.167.178]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG6sM-003Zj7-Ea; Tue, 17 Aug 2021 21:44:03 +0000 Received: by mail-oi1-f178.google.com with SMTP id n27so1412653oij.0; Tue, 17 Aug 2021 14:44:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hZMyVTSz00omtED+yJU35WSO6/6GKOSZju3UYtA2Jto=; b=R1iTLMqngQP8f/b3bOXbQLVFQRN64PHNDDCXK2ILhBFfZN1yphebVoPZQXGs2tnp4q QcVE2bDhalJR9rEJQOEckoBDBJk8yPuENU3dHDo6cJrqfFLGFqFY7j8II5umHbEb4UX8 /jf5kqRBCUgFbrzMZv8ZUbE3SP+5l/3Ci7IWh7BqdqHnubbUbgpuCpRkZ2vvVSPCdv4S 00ZpiYytaNzISaYLwI3gAln6LBqySYE2Vkwf4xnZOLXPhrQ9Xd3ZfHaVOkQ4xQgUV4sN Lei/TIM0TK8rQWdlzHYbQoc/1/LeeW8RBUMw3oRL7HGwWqSKiQKH0d2ptGDyqBRumLk0 Lmhw== X-Gm-Message-State: AOAM532UwOgVKUZKZZrvf7nYPv+CFWeGRW+Tl1RfnG/6Sk9DwE7ykc4y MB0itVyCEkmLQ6NJ3tRyKA== X-Google-Smtp-Source: ABdhPJz4Jz497LdrZ1zW7H9CD5rs1AWEeBLYA9sSHle3vr/l2xc8jj1U1zg7qlDuXt5XaVqNe/gL6A== X-Received: by 2002:a05:6808:bd3:: with SMTP id o19mr4201525oik.10.1629236641847; Tue, 17 Aug 2021 14:44:01 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id y16sm612500otq.1.2021.08.17.14.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 14:44:00 -0700 (PDT) Received: (nullmailer pid 893186 invoked by uid 1000); Tue, 17 Aug 2021 21:43:59 -0000 Date: Tue, 17 Aug 2021 16:43:59 -0500 From: Rob Herring To: Johan Jonker Cc: Peter Geis , Kishon Vijay Abraham I , Vinod Koul , Heiko Stuebner , 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 Subject: Re: [PATCH v2 2/8] dt-bindings: phy: phy-rockchip-inno-usb2: add rk3568 documentation Message-ID: References: <20210812204116.2303617-1-pgwipeout@gmail.com> <20210812204116.2303617-3-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210817_144402_541609_CA3A2687 X-CRM114-Status: GOOD ( 25.85 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Tue, Aug 17, 2021 at 06:52:15PM +0200, Johan Jonker wrote: > 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. Don't use $defs unless there's more than 1 copy needed of something. If it happens to bypass some checks, it's only a matter of time til I fix that. This may be better solved with another schema file rather than a long if/then schema. It's a judgement call. > > === > > 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 yamllint is not going to help there. What's needed is a meta-schema that adds the dependencies. > > > + 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: > > > _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip 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 X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42160C4338F for ; Tue, 17 Aug 2021 21:46:08 +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 0D45F60187 for ; Tue, 17 Aug 2021 21:46:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0D45F60187 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YQYfKjLeYJ4a/Qey4fEXB/2WAbyY3oJbyDIdPFwugUc=; b=OKB5InSkT0qxjy 73akWUL5np22rJyOKOcigg7flblR7b9apJk0aTIjw4njq7ou+ue9vbX/x47u/RfN87XZC4Ac8uLzW Cah3tt2eXA7nk2KV1BNnKcWlA6ndz3Gkxxi9MpIuI33mYsBR96NpK4YrNE1jrnJad5WA3kzTlVuIm zbAOmB/gSvQvBNbAprPxcIfSSCCdn5KQESm84WPJj3mE6rTvqBZ55aWb+SMPTB2RLOr/6utGJb8dY ZCB+k/UwIi/CT4RRNs2IuR9MCTo8qE9LwlrXpI2fW2GY8frbI4PQYR5cc/PiDy9bZ7o2psXJr/MXl lv0rZO3cAAv2dZ224yPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG6sQ-003Zjh-Um; Tue, 17 Aug 2021 21:44:07 +0000 Received: from mail-oi1-f178.google.com ([209.85.167.178]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG6sM-003Zj7-Ea; Tue, 17 Aug 2021 21:44:03 +0000 Received: by mail-oi1-f178.google.com with SMTP id n27so1412653oij.0; Tue, 17 Aug 2021 14:44:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hZMyVTSz00omtED+yJU35WSO6/6GKOSZju3UYtA2Jto=; b=R1iTLMqngQP8f/b3bOXbQLVFQRN64PHNDDCXK2ILhBFfZN1yphebVoPZQXGs2tnp4q QcVE2bDhalJR9rEJQOEckoBDBJk8yPuENU3dHDo6cJrqfFLGFqFY7j8II5umHbEb4UX8 /jf5kqRBCUgFbrzMZv8ZUbE3SP+5l/3Ci7IWh7BqdqHnubbUbgpuCpRkZ2vvVSPCdv4S 00ZpiYytaNzISaYLwI3gAln6LBqySYE2Vkwf4xnZOLXPhrQ9Xd3ZfHaVOkQ4xQgUV4sN Lei/TIM0TK8rQWdlzHYbQoc/1/LeeW8RBUMw3oRL7HGwWqSKiQKH0d2ptGDyqBRumLk0 Lmhw== X-Gm-Message-State: AOAM532UwOgVKUZKZZrvf7nYPv+CFWeGRW+Tl1RfnG/6Sk9DwE7ykc4y MB0itVyCEkmLQ6NJ3tRyKA== X-Google-Smtp-Source: ABdhPJz4Jz497LdrZ1zW7H9CD5rs1AWEeBLYA9sSHle3vr/l2xc8jj1U1zg7qlDuXt5XaVqNe/gL6A== X-Received: by 2002:a05:6808:bd3:: with SMTP id o19mr4201525oik.10.1629236641847; Tue, 17 Aug 2021 14:44:01 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id y16sm612500otq.1.2021.08.17.14.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 14:44:00 -0700 (PDT) Received: (nullmailer pid 893186 invoked by uid 1000); Tue, 17 Aug 2021 21:43:59 -0000 Date: Tue, 17 Aug 2021 16:43:59 -0500 From: Rob Herring To: Johan Jonker Cc: Peter Geis , Kishon Vijay Abraham I , Vinod Koul , Heiko Stuebner , 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 Subject: Re: [PATCH v2 2/8] dt-bindings: phy: phy-rockchip-inno-usb2: add rk3568 documentation Message-ID: References: <20210812204116.2303617-1-pgwipeout@gmail.com> <20210812204116.2303617-3-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210817_144402_541609_CA3A2687 X-CRM114-Status: GOOD ( 25.85 ) 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 Tue, Aug 17, 2021 at 06:52:15PM +0200, Johan Jonker wrote: > 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. Don't use $defs unless there's more than 1 copy needed of something. If it happens to bypass some checks, it's only a matter of time til I fix that. This may be better solved with another schema file rather than a long if/then schema. It's a judgement call. > > === > > 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 yamllint is not going to help there. What's needed is a meta-schema that adds the dependencies. > > > + 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: > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 943E4C4338F for ; Tue, 17 Aug 2021 21:44:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6999161038 for ; Tue, 17 Aug 2021 21:44:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233400AbhHQVog (ORCPT ); Tue, 17 Aug 2021 17:44:36 -0400 Received: from mail-oi1-f180.google.com ([209.85.167.180]:40772 "EHLO mail-oi1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229883AbhHQVof (ORCPT ); Tue, 17 Aug 2021 17:44:35 -0400 Received: by mail-oi1-f180.google.com with SMTP id r5so1308214oiw.7; Tue, 17 Aug 2021 14:44:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hZMyVTSz00omtED+yJU35WSO6/6GKOSZju3UYtA2Jto=; b=WbpElWXIBUWC7QluQNFxM5aFNs8YCSAqncutXU2vvg/p4FtXPU7qJJm+F2VC2CVI5i pxleoBl8eqnfkW3qdKV7qSC6TrdCqWz7Do7NT8RD8yQ9csVheQo9XdmjgP6L83+OIzoh jWudOcr0CkNLOksIZ/8PhyNBlThZjOCaY/5Cc5D0ykkEGE33+WiZrlh0hDEtUFJuFBXF ZB4YtC4zF0b0XJMbIUssBMdu4mg+GBttEDrGG5NDHyyGJRy/FvZuFjEad8T7f++rSaJO +vrlMpVsNx9o0CTbB1yYhHXCeYU2ULVq3gLkfiUTNlDhnQtf2D0HEMV6sOJ1q85vY4k8 1x+w== X-Gm-Message-State: AOAM533mVMQqoMgb1ACUGLQn8Nzn8J2b8mOqEysd+tY6oocdK7NWENOT 86n9ohF6wRgy7CsQ7DM37A== X-Google-Smtp-Source: ABdhPJz4Jz497LdrZ1zW7H9CD5rs1AWEeBLYA9sSHle3vr/l2xc8jj1U1zg7qlDuXt5XaVqNe/gL6A== X-Received: by 2002:a05:6808:bd3:: with SMTP id o19mr4201525oik.10.1629236641847; Tue, 17 Aug 2021 14:44:01 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id y16sm612500otq.1.2021.08.17.14.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 14:44:00 -0700 (PDT) Received: (nullmailer pid 893186 invoked by uid 1000); Tue, 17 Aug 2021 21:43:59 -0000 Date: Tue, 17 Aug 2021 16:43:59 -0500 From: Rob Herring To: Johan Jonker Cc: Peter Geis , Kishon Vijay Abraham I , Vinod Koul , Heiko Stuebner , 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 Subject: Re: [PATCH v2 2/8] dt-bindings: phy: phy-rockchip-inno-usb2: add rk3568 documentation Message-ID: References: <20210812204116.2303617-1-pgwipeout@gmail.com> <20210812204116.2303617-3-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Aug 17, 2021 at 06:52:15PM +0200, Johan Jonker wrote: > 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. Don't use $defs unless there's more than 1 copy needed of something. If it happens to bypass some checks, it's only a matter of time til I fix that. This may be better solved with another schema file rather than a long if/then schema. It's a judgement call. > > === > > 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 yamllint is not going to help there. What's needed is a meta-schema that adds the dependencies. > > > + 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: > > >