From patchwork Mon Mar 13 16:50:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 68938 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1296338wrd; Mon, 13 Mar 2023 09:58:24 -0700 (PDT) X-Google-Smtp-Source: AK7set8wTlvjS8iFq+AugNRT1THUj7i3dbxHtvw0PCJZ5w5VeVGl307F+6eZX3NDHizM/S2sBa6n X-Received: by 2002:a17:903:187:b0:19f:2328:beee with SMTP id z7-20020a170903018700b0019f2328beeemr10565178plg.11.1678726704177; Mon, 13 Mar 2023 09:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678726704; cv=none; d=google.com; s=arc-20160816; b=XyMQvxVGW0X417B26abpfzMQbWLRnFfjuC5qv3ng8vrSsMCncUqwltw1L+u3O67tMy 3tsEzABjcWFOfu0nJ61xiTUMtMb4eL1Pt/kSmzPJT5OlI3y6n/3fvYgMFbI2B9MsORuI elycliAorid/zKJh3FFTaPUrIvwUxPItYS2vL3V5ra5Ec6ag8hxlp9dMdjijwqcb+Q/R VXt8gK4Brzo1RNUldeZ6VCJEcCCz3D5O/aSkKuJXzWhyqLCnyy/pduusvtb79T0UhdaJ YptyQWWKq3acfbnkqKz2mX9WlxotY/rMfYC+RGDpMAi+M9fztZTZD1/YvRoKS6lGyiq5 mf0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=17GUsGKWfAL6uQKRoT6YmOYvpdLmhQ4pjDr84dQgdYI=; b=xPyhsKMu3Z3EXn2lcy0f7lpf8mr9+3gS9gtLFRdsfVQgO0woF2sGsiyNuaJkwQvjs3 5fFSdD/A0AYlaYG5T88rpFJhchX7f+1UBI1fOd4WSmJ0GFo7GXsycPaXEYFAZ74T4JFn IgHRQHH2W5hwKZdxCRY91oRJx8XKF7vDZBznGrG9PoVQyxMcW2EdQowgxNvGCWghEWz6 QdJmz28vNy/B8ge1IU6UZb3rALqCXnb+th6Q1uih4/siwxNpK0QzBSpoG7C6T0u/fWV2 lD67jLqbNZU6r0E/abQ8vkOMu1W5HwWwXFls25FlUHCMZYdN60Qr1pUvYqcwM2KQBNG2 4PSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a630b10000000b0050017d1b7c6si6785675pgl.767.2023.03.13.09.58.09; Mon, 13 Mar 2023 09:58:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231286AbjCMQ4x (ORCPT + 99 others); Mon, 13 Mar 2023 12:56:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbjCMQ4r (ORCPT ); Mon, 13 Mar 2023 12:56:47 -0400 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E60FD56159; Mon, 13 Mar 2023 09:56:28 -0700 (PDT) Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id B874921E29; Mon, 13 Mar 2023 17:50:44 +0100 (CET) From: Francesco Dolcini To: linux-usb@vger.kernel.org, devicetree@vger.kernel.org Cc: Emanuele Ghidoli , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Dongjin Kim , Francesco Dolcini Subject: [PATCH v1 1/3] dt-bindings: usb: smsc,usb3503: Add usb3803 Date: Mon, 13 Mar 2023 17:50:37 +0100 Message-Id: <20230313165039.255579-2-francesco@dolcini.it> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230313165039.255579-1-francesco@dolcini.it> References: <20230313165039.255579-1-francesco@dolcini.it> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, SPF_HELO_PASS,T_SPF_TEMPERROR autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760272532964065258?= X-GMAIL-MSGID: =?utf-8?q?1760272532964065258?= From: Emanuele Ghidoli Add support for usb3803, compared to usb3503 it uses a regular USB connection to upstream instead of HSIC, it has an additional low power mode (bypass) and an additional control signal (BYPASS_N). In bypass mode the downstream port 3 is connected to the upstream port with low switch resistance R_on. Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/usb/smsc,usb3503.yaml | 54 ++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/smsc,usb3503.yaml b/Documentation/devicetree/bindings/usb/smsc,usb3503.yaml index a09f4528aea3..6156dc26e65c 100644 --- a/Documentation/devicetree/bindings/usb/smsc,usb3503.yaml +++ b/Documentation/devicetree/bindings/usb/smsc,usb3503.yaml @@ -14,6 +14,7 @@ properties: enum: - smsc,usb3503 - smsc,usb3503a + - smsc,usb3803 reg: maxItems: 1 @@ -33,6 +34,12 @@ properties: description: > GPIO for reset + bypass-gpios: + maxItems: 1 + description: > + GPIO for bypass. + Control signal to select between HUB MODE and BYPASS MODE. + disabled-ports: $ref: /schemas/types.yaml#/definitions/uint32-array minItems: 1 @@ -46,9 +53,10 @@ properties: initial-mode: $ref: /schemas/types.yaml#/definitions/uint32 - enum: [1, 2] description: > - Specifies initial mode. 1 for Hub mode, 2 for standby mode. + Specifies initial mode. 1 for Hub mode, 2 for standby mode and 3 for bypass mode. + In bypass mode the downstream port 3 is connected to the upstream port with low + switch resistance R_on. clocks: maxItems: 1 @@ -71,6 +79,29 @@ properties: required: - compatible +allOf: + - if: + not: + properties: + compatible: + enum: + - smsc,usb3803 + then: + properties: + bypass-gpios: false + + - if: + required: + - bypass-gpios + then: + properties: + initial-mode: + enum: [1, 2, 3] + else: + properties: + initial-mode: + enum: [1, 2] + additionalProperties: false examples: @@ -92,6 +123,25 @@ examples: }; }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + usb-hub@8 { + compatible = "smsc,usb3803"; + reg = <0x08>; + connect-gpios = <&gpx3 0 1>; + disabled-ports = <2 3>; + intn-gpios = <&gpx3 4 1>; + reset-gpios = <&gpx3 5 1>; + bypass-gpios = <&gpx3 6 1>; + initial-mode = <3>; + clocks = <&clks 80>; + clock-names = "refclk"; + }; + }; + - | #include