From patchwork Thu Dec 10 09:09:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1413899 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cs7V95WSTz9sWR for ; Thu, 10 Dec 2020 20:12:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baikalelectronics.ru Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4Cs7V82MbyzDqhN for ; Thu, 10 Dec 2020 20:12:32 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=baikalelectronics.ru (client-ip=87.245.175.226; helo=mail.baikalelectronics.ru; envelope-from=sergey.semin@baikalelectronics.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=baikalelectronics.ru Received: from mail.baikalelectronics.ru (mail.baikalelectronics.com [87.245.175.226]) by lists.ozlabs.org (Postfix) with ESMTP id 4Cs7Rx23CgzDqhN for ; Thu, 10 Dec 2020 20:10:37 +1100 (AEDT) From: Serge Semin To: Mathias Nyman , Felipe Balbi , Krzysztof Kozlowski , Greg Kroah-Hartman , Rob Herring , Chunfeng Yun Subject: [PATCH v6 01/19] dt-bindings: usb: usb-hcd: Detach generic USB controller properties Date: Thu, 10 Dec 2020 12:09:25 +0300 Message-ID: <20201210090944.16283-2-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20201210090944.16283-1-Sergey.Semin@baikalelectronics.ru> References: <20201210090944.16283-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , linux-kernel@vger.kernel.org, Pavel Parkhomenko , Rob Herring , Kevin Hilman , Ahmad Zainie , Andy Gross , linux-snps-arc@lists.infradead.org, devicetree@vger.kernel.org, Martin Blumenstingl , Lad Prabhakar , Alexey Malahov , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, Roger Quadros , Yoshihiro Shimoda , linux-usb@vger.kernel.org, linux-mips@vger.kernel.org, Serge Semin , Serge Semin , Manu Gautam , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" There can be three distinctive types of the USB controllers: USB hosts, USB peripherals/gadgets and USB OTG, which can switch from one role to another. In order to have that hierarchy handled in the DT binding files, we need to collect common properties in a common DT schema and specific properties in dedicated schemas. Seeing the usb-hcd.yaml DT schema is dedicated for the USB host controllers only, let's move some common properties from there into the usb.yaml schema. So the later would be available to evaluate all currently supported types of the USB controllers. While at it add an explicit "additionalProperties: true" into the usb-hcd.yaml as setting the additionalProperties/unevaluateProperties properties is going to be get mandatory soon. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v4: - This is a new patch created as a result of the comment left by Chunfeng Yun in v3 Changelog v5: - Discard duplicated additionalProperties property definition. --- .../devicetree/bindings/usb/usb-hcd.yaml | 14 ++------- .../devicetree/bindings/usb/usb.yaml | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/usb.yaml diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml b/Documentation/devicetree/bindings/usb/usb-hcd.yaml index b545b087b342..81f3ad1419d8 100644 --- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml +++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml @@ -9,18 +9,8 @@ title: Generic USB Host Controller Device Tree Bindings maintainers: - Greg Kroah-Hartman -properties: - $nodename: - pattern: "^usb(@.*)?" - - phys: - $ref: /schemas/types.yaml#/definitions/phandle-array - description: - List of all the USB PHYs on this HCD - - phy-names: - description: - Name specifier for the USB PHY +allOf: + - $ref: usb.yaml# additionalProperties: true diff --git a/Documentation/devicetree/bindings/usb/usb.yaml b/Documentation/devicetree/bindings/usb/usb.yaml new file mode 100644 index 000000000000..941ad59fbac5 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/usb.yaml @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/usb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic USB Controller Device Tree Bindings + +maintainers: + - Greg Kroah-Hartman + +select: false + +properties: + $nodename: + pattern: "^usb(@.*)?" + + phys: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + List of all the USB PHYs on this HCD + + phy-names: + description: + Name specifier for the USB PHY + +additionalProperties: true + +...