Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1313490ybh; Thu, 16 Jul 2020 08:46:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHSVTZztccc+VvT7eQsDntgMZTjtBWGs04HIPcfJm70uQrXhF7mtcSFQ/aNlFhepv9bcBp X-Received: by 2002:a17:906:6dd7:: with SMTP id j23mr4125952ejt.529.1594914419640; Thu, 16 Jul 2020 08:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594914419; cv=none; d=google.com; s=arc-20160816; b=m/NlplWF3LNz1a49jyjzKhSyfE6tJXI86CAkr1drKQ7HJmid41QSmnrkMvNdDPaffH VHRCwjgbzc0zNjdXEPUfx/kCZNgreHzcdtV01PX7zyEx4G84HbpoaLTtxmWw2NPzMU7R rQZxEzwfjMfS65ymhfWLRstzBfh0OvZ+QYyteLlvhTgi3Z+BR2OfVMwE/WdhkwuDdDM2 n3fXIT5cEh/pxL8IpdPDnhY+xzoRoAW2/5n8D+aE5yHmgCZ4e1iNLl8w1I7RNamNyJ8x 0q/maOuyUfRt1bhBgZxPjQ6hN7uCY0a0pCEpI/O60pahzqC0Fg1Q6Xz+48tBbhe2PuhB knuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=h94tFRUF4D5bdpqmTblQ19sOobDYu6cH5YoxhApuutc=; b=thxXAUtaqidPlw/27rY4muoY5GlZJG6gdsntWrYvNv+qxoa+MMWvHi6c/eIpW9m2jg iL9MU2e4N8Y/DjX78qMvVPKrRZtpZI5T2HjlVOs+UjWK4WYWqJFoQWRdSKAWc8pn79oN ePwJvwI3fMLQMOgLeZpdxB61iXKdu8F5tk2RSnHh3WHBSGNFfhfag1zEYLD4YIHMHPH+ WjkeKPIvyp84tZeQN69ywnrsANnLq1HRITVLJg0o6Ficf3kOgVa7kRwY7ff+A+uIT0eR VVcgRIQ4rPZu0FVGwXgee14xwJYlXLAt3VPTLR6qt+mAMp9IjzJJPCz8wCZSJI9CNnAr swyg== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si3509590ejp.201.2020.07.16.08.46.35; Thu, 16 Jul 2020 08:46:59 -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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729203AbgGPPqI (ORCPT + 99 others); Thu, 16 Jul 2020 11:46:08 -0400 Received: from mail-il1-f193.google.com ([209.85.166.193]:37593 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728669AbgGPPqI (ORCPT ); Thu, 16 Jul 2020 11:46:08 -0400 Received: by mail-il1-f193.google.com with SMTP id r12so5452263ilh.4; 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=U07qLmlR+6xzLYL8SV981Mlz/KBwh+dp7i0SBP+P+dVdCrG1udWAZCscGb6w+eUtCc dKW+x/1s+VWosdcsCyY8BemzqqX2W8rcWifZnEdO67kFAq1/xWehv4feejcc1behf5S7 u25jctGppCg0oZJuz71RwHX9ZFGcZV/JIn/uJ2eMOgIDXBz0L4Dbji+KojqqxQVSIf86 Gl4kj+glCh5QLrqHnilhf9ZrEihDON2qOgkZeCDlplC4wxBrEyWtuL4R74RVP81tU64j 98p+fE6iojbBHpl6eEbJ5RfIbP/ZWRWoYGDkux6Xp5vpqm9NQrygNPsTOtoc5nO0aNbd EgeA== X-Gm-Message-State: AOAM5337q9Aqhr+mUqh8HoIQYZqNNZ1l2uqhb7fPc4OYnemANe66Dhqz 2kunvrkG48k46H6s2RSJGw== 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 Cc: simon@arlott.org, jonas.gorski@gmail.com, kishon@ti.com, vkoul@kernel.org, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, p.zabel@pengutronix.de, krzk@kernel.org, gregkh@linuxfoundation.org, alcooperx@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200715131803.1762064-2-noltari@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 15, 2020 at 03:18:02PM +0200, ?lvaro Fern?ndez Rojas wrote: > Document BCM63xx USBH PHY bindings. > > Signed-off-by: ?lvaro Fern?ndez 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 yet. 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-usbh-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: > + - ?lvaro Fern?ndez 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 = "brcm,bcm6368-usbh-phy"; > + reg = <0x10001700 0x38>; > + clocks = <&periph_clk 15>; > + clock-names = "usbh"; > + resets = <&periph_rst 12>; > + #phy-cells = <1>; > + }; > -- > 2.27.0 >