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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 51C58C433E0 for ; Thu, 16 Jul 2020 15:47:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 18529207BC for ; Thu, 16 Jul 2020 15:47:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SEgu4xLh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18529207BC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=WLAhtJRwXOYxf1C3QAW13/jqf/lbI1MkS6GdWi2UFJk=; b=SEgu4xLh7znv4xGVJUoo2hF6E zkgRZZ81JG/PreD38/SpP8sbnetbvt7NSsmTf/IGq2YqF/M9CkkMG5QLYUZha0hUaZc7GL1GJ/+HS ooX9lO5UgfxsNDgdDzcYiPRlMyUK2gS448BLXcjxjl3Q/p40g+UaTAXOcTDz0vsq8Syohk+QoBJr7 oeUSi7AywNeBAfleZek2y9q5jAxcz3PfhUHE9Vcx2MyEPoqdRnoFim4cqkJ00tQdslfPWrzC70TpD ZTTWDruVjQXwTZhed2mEIloZxLRUz0VX+8rIHCa263ox83KGeZruWWXTQ0iAyQdRZM+UMDkkXmluI Rnd9vp7DQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw65K-0003DR-Ji; Thu, 16 Jul 2020 15:46:10 +0000 Received: from mail-il1-f195.google.com ([209.85.166.195]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw65I-0003Cg-2f for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2020 15:46:09 +0000 Received: by mail-il1-f195.google.com with SMTP id t27so5431071ill.9 for ; Thu, 16 Jul 2020 08:46:07 -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:content-transfer-encoding :in-reply-to; bh=h94tFRUF4D5bdpqmTblQ19sOobDYu6cH5YoxhApuutc=; b=JsS4q/DA1LV5D5MNHLcwM0kveCQ6uWq+oSlOsUp9Gm+6zBHBdOpsU2L8fECePctPJQ 5a2fbyTJVIPlBFb1cgcPndbTPMZkZ+qt/ltyZOHDsypkaYUqa0FxRIf5ca0XU1SnS6U8 EbpK4A7hSUOsL1ptTJj74ZOf18wFV8LINNnU/uhWKPMckMWZhfttIuhIma9+6Iqit7ao 2a3VtEK/ouM4iOjsyPpBUeYgm+qN+HunWpMLjKX/sIjm3YCWElMbVYWPutrVF9yFTvwX QNiC1XAplR481q7pAdlnAlLnWVsEOmTovqPbAWgOtXboXTzvEY1lX5PsVZKL6SQKodDl NUCg== X-Gm-Message-State: AOAM530+LuCTkqga9f7DkZuxKha0TUTajIHpv8lEyw8ThQwOilKTAUza 6f4obwBZ9TFJcxb+tms/qQ== X-Google-Smtp-Source: ABdhPJx4fv59SMJ3mS2tApSIBDtdSxl4R1aVARuaCzbZSIcb/ZiZYaKPCzzHJT84CfHLcSwsclyD9Q== X-Received: by 2002:a92:a04e:: with SMTP id b14mr5301547ilm.261.1594914367140; Thu, 16 Jul 2020 08:46:07 -0700 (PDT) Received: from xps15 ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id w16sm3209593iom.27.2020.07.16.08.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 08:46:06 -0700 (PDT) Received: (nullmailer pid 2403961 invoked by uid 1000); Thu, 16 Jul 2020 15:46:04 -0000 Date: Thu, 16 Jul 2020 09:46:04 -0600 From: Rob Herring To: =?iso-8859-1?Q?=C1lvaro_Fern=E1ndez?= Rojas Subject: Re: [PATCH v6 1/2] dt-bindings: phy: add bcm63xx-usbh bindings Message-ID: <20200716154604.GA2370346@bogus> References: <20200715131803.1762064-1-noltari@gmail.com> <20200715131803.1762064-2-noltari@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200715131803.1762064-2-noltari@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200716_114608_155754_12EE226D X-CRM114-Status: GOOD ( 18.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, f.fainelli@gmail.com, gregkh@linuxfoundation.org, alcooperx@gmail.com, linux-kernel@vger.kernel.org, krzk@kernel.org, kishon@ti.com, vkoul@kernel.org, bcm-kernel-feedback-list@broadcom.com, p.zabel@pengutronix.de, jonas.gorski@gmail.com, simon@arlott.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jul 15, 2020 at 03:18:02PM +0200, =C1lvaro Fern=E1ndez Rojas wrote: > Document BCM63xx USBH PHY bindings. > = > Signed-off-by: =C1lvaro Fern=E1ndez Rojas > Reviewed-by: Florian Fainelli > --- > v6: introduce changes suggested by Rob: > - Add another if case to device tree binding for SoCs with just 1 clock. > - Ignored "additionalProperties: false" suggestion since it triggers a > warning. This has been reported, but I haven't received any answer ye= t. Ask your question here or I have to go look for it... Looks like it is for 'clocks' though. The main schema has to define all = the properties for 'additionalProperties: false'. More below... > v5: no changes. > v4: conditionally require 1/2 clocks and fix clock/reset values. > v3: no changes. > v2: phy-cells changed to 1. > = > .../bindings/phy/brcm,bcm63xx-usbh-phy.yaml | 97 +++++++++++++++++++ > 1 file changed, 97 insertions(+) > create mode 100644 Documentation/devicetree/bindings/phy/brcm,bcm63xx-us= bh-phy.yaml > = > diff --git a/Documentation/devicetree/bindings/phy/brcm,bcm63xx-usbh-phy.= yaml b/Documentation/devicetree/bindings/phy/brcm,bcm63xx-usbh-phy.yaml > new file mode 100644 > index 000000000000..8ab0ab3154ed > --- /dev/null > +++ b/Documentation/devicetree/bindings/phy/brcm,bcm63xx-usbh-phy.yaml > @@ -0,0 +1,97 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/phy/brcm,bcm63xx-usbh-phy.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: BCM63xx USBH PHY > + > +maintainers: > + - =C1lvaro Fern=E1ndez Rojas > + > +properties: > + compatible: > + enum: > + - brcm,bcm6318-usbh-phy > + - brcm,bcm6328-usbh-phy > + - brcm,bcm6358-usbh-phy > + - brcm,bcm6362-usbh-phy > + - brcm,bcm6368-usbh-phy > + - brcm,bcm63268-usbh-phy > + > + reg: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + "#phy-cells": > + const: 1 > + > +required: > + - compatible > + - reg > + - resets > + - "#phy-cells" > + > +allOf: > + - if: > + properties: > + compatible: > + enum: > + - brcm,bcm6328-usbh-phy > + - brcm,bcm6358-usbh-phy > + - brcm,bcm6362-usbh-phy > + - brcm,bcm6368-usbh-phy > + then: > + properties: > + clocks: > + maxItems: 1 > + clock-names: > + items: > + - const: usbh With the below changes, this can be: then: properties: clocks: maxItems: 1 clock-names: maxItems: 1 else: properties: clocks: minItems: 2 clock-names: minItems: 2 > + required: > + - clocks > + - clock-names Looks like these are always required and can be at the top level. > + - if: > + properties: > + compatible: > + enum: > + - brcm,bcm6318-usbh-phy > + - brcm,bcm63268-usbh-phy > + then: > + properties: > + clocks: > + maxItems: 2 > + clock-names: > + items: > + - const: usbh > + - const: usb_ref Move this to the main schema with {minItems: 1, maxItems: 2} for both. > + required: > + - clocks > + - clock-names > + - if: > + properties: > + compatible: > + enum: > + - brcm,bcm6318-usbh-phy > + - brcm,bcm6328-usbh-phy > + - brcm,bcm6362-usbh-phy > + - brcm,bcm63268-usbh-phy > + then: > + properties: > + power-domains: > + maxItems: 1 This can be in the main section. > + required: > + - power-domains And then add to disallow power-domains: else: properties: power-domains: false > + > +examples: > + - | > + usbh: usb-phy@10001700 { > + compatible =3D "brcm,bcm6368-usbh-phy"; > + reg =3D <0x10001700 0x38>; > + clocks =3D <&periph_clk 15>; > + clock-names =3D "usbh"; > + resets =3D <&periph_rst 12>; > + #phy-cells =3D <1>; > + }; > -- = > 2.27.0 > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel