From patchwork Tue Apr 15 09:41:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 881634 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65AC628F525 for ; Tue, 15 Apr 2025 09:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744710161; cv=none; b=XOd0Qd9ELfnfublIp2w3uuznaBp9W4drBV27w6qwVdwGsm/3afdsQ7HnVy2v64vcsDrFpFRi7SmH9SEhXUUIPXQ3Fa5hlcj2RIdaqSHowtMQRq4cKNGHIgewqxqzax3Aoyjar9ZUmwAe9z5ZNEdneFaZfUOSNGpQaDV8AEMjJwQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744710161; c=relaxed/simple; bh=u/xh1SzwJolarxDS+l2/MHtZxOawnZxq4T8iPrK6eHE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Coa4MivPunLBAuQnWXDP0Aw6M2+IMxqf85uUYSQeJs7IB4MrPd4Ydfdn8dgp3HMlKTZNaxQ5NKBGGp3uzIyt9Z2pfcFtXYW5QlZzEOXJ1ono1jLKxrWoHmnalSeLGiJ4CpIy9jbmpF00map4mBOlg0uDXXjsETlyi6KAazj1iBA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=N3aFnQd7; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="N3aFnQd7" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-af55b7d56a1so4016634a12.2 for ; Tue, 15 Apr 2025 02:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1744710159; x=1745314959; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WqjBaj3EhtrpvOSdInIc8UJK8DAPvGXIW4PIR9rJ1xU=; b=N3aFnQd7apItLEn/o5GVf0a0Dki9x0VLj/8ukbraPcyNNp6c08gDCZ2cFscSP+oLMC ztKl/Tq3mZUAfcNKyKYsVW6YD3blqimcOgFdtmbOHVQ1nRQbwUE/6ycKOot1PHj+OUB5 l4s7f7p+Z6hFrxLH/RxV9H75k2uwSBc9RRCy8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744710159; x=1745314959; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WqjBaj3EhtrpvOSdInIc8UJK8DAPvGXIW4PIR9rJ1xU=; b=P24QlK+LfRRItDR82TizOCZ86IASd6ci/OjoLi2XVVfy1NqH3B6KDHFgfxTUF+D57K HBhaRDWVySkRo5nYJbbvIWPnY1HDm/ohgRSAiksh2InYcVpCi9H9khIb4b+SqrIKPTmX URVgQi1YYl/DbS3KSlq0P+VJBtYtlhY2YJfNsojRse7IFs4GdWrDjrllOtskJ+impldr WylWyfjZVaj5RwljgXRgDNOWtUdkwzohQiNbO0rKhsxEJcVJV8IQE8rleJ4wJMfCLlmb LntXjYtoZVx68Uf3Kt0OvxSOfhKygIXJvZBm5elB08A1mr5UbPQoykOlJ85vP8WE8H4i yGJQ== X-Forwarded-Encrypted: i=1; AJvYcCWscVKfnKph8JTTu5DaQiwZaQKMtqVNhjBYsVnvdLJtin+zAGjDOwDpJ5xJ1iFRJvXjukx6kNYeNQs=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3OZEF4Jjv3WLtByN2a+Lfl3g8IM1GLASGdzptyeTcY0ZMNVq3 Kw0S9Ul64a91FIZHKsZwgvvYAdgWrLQISEW67gjL9CANFUSmtMgjqDB+zN+NYQ== X-Gm-Gg: ASbGncsLsBUdfFI4FS83FiCnw/Q1ueHINKlpK9hf45h7sskBdBYOwHM/TxBz6jAR6j7 TJvZlyA6+Fa0OOHw74RldHBit+W4qqBTCWefAUpNKRgi9BSrZr7F92huwF1gunSeddrN4g81tWo iXN/UXezCnkspeZpt4cqZ1mwglSt/DOmXDaDAJaqOdRBMwhxbLgEKW4ukBbVqi3+tN4w52y/3Ch 84XuCqAz8qo5jhtvbJ21YvJmxAMQKoUG9xQt+GW0lXOtZz3Wb7ISzlLykoTMsnXw9duXiLd4ad6 TiopRW5EH5q5gGdiSrUeGeUF1bILcnO1YAoHLYpooi5kIPxhhDH6ywolI6IHVuxi X-Google-Smtp-Source: AGHT+IHTPefmEfMnTS/yOpKZkHtZEcW7+f3HO/Nzl4fBj1qjIetkYxcjVASlATaL9A0c6R8fuH9P0w== X-Received: by 2002:a17:90b:274e:b0:2f9:c139:b61f with SMTP id 98e67ed59e1d1-30823670d71mr26179495a91.14.1744710158710; Tue, 15 Apr 2025 02:42:38 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:7d0d:86ea:ee84:cd08]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22ac7ccca5asm113135215ad.254.2025.04.15.02.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Apr 2025 02:42:38 -0700 (PDT) From: Pin-yen Lin To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke Cc: Stephen Boyd , linux-kernel@vger.kernel.org, Pin-yen Lin , devicetree@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH v2 1/4] dt-bindings: usb: Introduce usb-hub.yaml Date: Tue, 15 Apr 2025 17:41:58 +0800 Message-ID: <20250415094227.3629916-2-treapking@chromium.org> X-Mailer: git-send-email 2.49.0.777.g153de2bbd5-goog In-Reply-To: <20250415094227.3629916-1-treapking@chromium.org> References: <20250415094227.3629916-1-treapking@chromium.org> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Introduce a general USB hub binding that describes downstream ports and hard wired USB devices for on-board USB hubs. Signed-off-by: Pin-yen Lin --- Changes in v2: - New in v2 .../devicetree/bindings/usb/usb-hub.yaml | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/usb-hub.yaml diff --git a/Documentation/devicetree/bindings/usb/usb-hub.yaml b/Documentation/devicetree/bindings/usb/usb-hub.yaml new file mode 100644 index 00000000000000..34cd248fa43c2d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/usb-hub.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/usb-hub.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic USB Hub + +maintainers: + - Pin-yen Lin + +allOf: + - $ref: usb-device.yaml# + +properties: + compatible: true + + reg: true + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + peer-hub: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle to the peer hub on the controller. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + description: + The downstream facing USB ports + + patternProperties: + "^port@[1-9]$": + $ref: /schemas/graph.yaml#/properties/port + +patternProperties: + '^.*@[1-9]$': + description: The hard wired USB devices + type: object + $ref: /schemas/usb/usb-device.yaml + additionalProperties: true + +required: + - compatible + - reg + +additionalProperties: true + +examples: + - | + usb { + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub_2_0: hub@1 { + compatible = "usb123,4567"; + reg = <1>; + peer-hub = <&hub_3_0>; + #address-cells = <1>; + #size-cells = <0>; + /* USB 2.0 device on port 5 */ + device@5 { + reg = <5>; + compatible = "usb765,4321"; + }; + }; + + /* 3.0 hub on port 2 */ + hub_3_0: hub@2 { + compatible = "usb123,abcd"; + reg = <2>; + peer-hub = <&hub_2_0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + /* Type-A connector on port 3 */ + port@3 { + reg = <3>; + endpoint { + remote-endpoint = <&usb_a0_ss>; + }; + }; + }; + }; + }; From patchwork Tue Apr 15 09:42:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 881633 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B43B29116F for ; Tue, 15 Apr 2025 09:42:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744710166; cv=none; b=cX6rjRUPAjsuZdYNK/1H0576ZLGm08toGG+uvyy3wFLYmUiHUyEzp7KdkMVjOSrga91l5jJ2h9+qgE0Qe9amakht8kwEw01h3Agup5HB0UhwjwKrpbd3IWI61GRznGQYA4yEOtEF3PSA0pN8eHk0j4TRrJ1l6ORaGZArrr4vEwQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744710166; c=relaxed/simple; bh=ONXSgzh9c6IpKB4NMWKJprMd6baGNhHuNXrdpm2GO2Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LMHdJ/OLzNwtc9FPRMY7Iv4LuVxO0QqsruDWwE54/Un17VgspHevcKLXywiLlnNGZJY3EKwdgARemgKCAHvrg/mH95ZJ1haqCvu+hoVOg8APbaxjb3Rql1SIBLCUSXaVeJCipNAdIxEPGGZNEujonPPbmLbwZ+fkkmsrMeaLWGY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=lt5Y2zKE; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lt5Y2zKE" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-224191d92e4so50984825ad.3 for ; Tue, 15 Apr 2025 02:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1744710163; x=1745314963; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EnnKr2l4LbB38k4Mhz6nIOWpASIGRG3czOC4OX6mJP0=; b=lt5Y2zKE50YZBW4KMaeax2b7+VUtHIcyx8zTp4QsHIVNt9oJL0vKXREra0OD9rn3JR 1HDu4gqmzbj0OqPJBLo3aEN48GMxQLKMJCnkbd39Uwtvjlsa3g4+QA6BLDKxivGCTCqc CKAwp5p0sDS3Krj2dLp9gVF46+OH6gZ9k91Gs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744710163; x=1745314963; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EnnKr2l4LbB38k4Mhz6nIOWpASIGRG3czOC4OX6mJP0=; b=RTKlRB39NnphYzYbuhHKtcpgumMmGwCaQFk/SUtMatPD0ebSMsrv7+BzGXCvFJuOdY aJShN+bVqRGofUaF7CtQ6LGq7Bh31n6uFFoHqv5lMGydeOcrTvk2dkPNDnWCH/h5MTIZ uNzw/AN35c60K9zCzW0mSM84idfg7lUugWPZZcXG4KXOeMO7jLdNTlIKDPHOtSN9QV4r 5A1CrDC6NPN/k3H7PW8LWlOdTdwGIv+IzBUM9XvnBFYCq9zPc3RTi3eF/CKcu9J8DrRU Ppa1sKw3+flcKecFcdigC6G4i6ySX/BOv+gDGaas1IIB5+EL8q90AVKDGHAGJ4BMY9R2 K3yw== X-Forwarded-Encrypted: i=1; AJvYcCUb7kSlKEGvD0OPxOdljBMM17yTdByzqtBvbI4Wb+fuez+I/wmiqAzrUVrPvwMc2McGComKIZeTaJc=@vger.kernel.org X-Gm-Message-State: AOJu0YwwWZCqXn4NICmzgR3OtNlv3dehW+avQmQYe0j1jLuAvfl25uXB RLLbOEVFwZl1k2Wy+m0r63vQTyNewSEtAkWcmYr0LtaLfLy6luNXoEKe5SfJumFomUGCXM4o3yY = X-Gm-Gg: ASbGnctP3Q0OdzIriBAGIr19CUnawZv8rFX8ClG3iL92doDgLbBy62kwugOEW+QbaI0 VObh0snBuhdxJqSBWulvewv1uAziwv9gdSjTCCM17ZoyaUS25W1gS8VHKDdLipwjSIRhy7ihHBw jecgb8JYbcLT0oscfEXeacVWP18rx6Qnk3D+ijOb0DR8bwi8iXls8BQ9FMqtR8654DiCi+eE3FQ jYspuy4U8TryfD0kE/PPMm8ULDlW4mGB3eMfSYwfEhGuqKmTaRj2petGOKK0tvEpUarZuCQlnHF wPiQGx6q0e3flgC+vcH36mbhLmpw9jmPvrHGe6+qWgaYvB9SuiSLXrYUs2PJHt3V X-Google-Smtp-Source: AGHT+IE9w43CJv/UOue4t3Qpb3ePg00zQx/RfidlriRmSUsZqjwz6p1TKUXguwdh81XU2yIGyaoZRw== X-Received: by 2002:a17:902:ef0a:b0:21f:2a2:3c8b with SMTP id d9443c01a7336-22bea49d314mr228210365ad.11.1744710163568; Tue, 15 Apr 2025 02:42:43 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:7d0d:86ea:ee84:cd08]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22ac7ccca5asm113135215ad.254.2025.04.15.02.42.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Apr 2025 02:42:43 -0700 (PDT) From: Pin-yen Lin To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke Cc: Stephen Boyd , linux-kernel@vger.kernel.org, Pin-yen Lin , devicetree@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH v2 3/4] dt-bindings: usb: realtek,rts5411: Adapt usb-hub.yaml Date: Tue, 15 Apr 2025 17:42:00 +0800 Message-ID: <20250415094227.3629916-4-treapking@chromium.org> X-Mailer: git-send-email 2.49.0.777.g153de2bbd5-goog In-Reply-To: <20250415094227.3629916-1-treapking@chromium.org> References: <20250415094227.3629916-1-treapking@chromium.org> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Inherit usb-hub.yaml and remove duplicated schemas. Signed-off-by: Pin-yen Lin --- Changes in v2: - New in v2 .../bindings/usb/realtek,rts5411.yaml | 47 +++++-------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml index 6577a61cc07531..52fad201a56c82 100644 --- a/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml +++ b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml @@ -10,7 +10,7 @@ maintainers: - Matthias Kaehlcke allOf: - - $ref: usb-device.yaml# + - $ref: usb-hub.yaml# properties: compatible: @@ -21,51 +21,30 @@ properties: reg: true - '#address-cells': - const: 1 + '#address-cells': true - '#size-cells': - const: 0 + '#size-cells': true vdd-supply: description: phandle to the regulator that provides power to the hub. - peer-hub: - $ref: /schemas/types.yaml#/definitions/phandle - description: - phandle to the peer hub on the controller. + peer-hub: true ports: $ref: /schemas/graph.yaml#/properties/ports - properties: - port@1: - $ref: /schemas/graph.yaml#/properties/port - description: - 1st downstream facing USB port - - port@2: - $ref: /schemas/graph.yaml#/properties/port - description: - 2nd downstream facing USB port - - port@3: - $ref: /schemas/graph.yaml#/properties/port - description: - 3rd downstream facing USB port - - port@4: - $ref: /schemas/graph.yaml#/properties/port - description: - 4th downstream facing USB port + '#address-cells': true + + '#size-cells': true + + patternProperties: + '^port@[1-4]$': true + + additionalProperties: false patternProperties: - '^.*@[1-4]$': - description: The hard wired USB devices - type: object - $ref: /schemas/usb/usb-device.yaml - additionalProperties: true + '^.*@[1-4]$': true required: - peer-hub