From patchwork Tue Feb 23 16:16:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 386520 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 02E87C433E0 for ; Tue, 23 Feb 2021 16:17:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CECB664E61 for ; Tue, 23 Feb 2021 16:17:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233578AbhBWQRg (ORCPT ); Tue, 23 Feb 2021 11:17:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233530AbhBWQRc (ORCPT ); Tue, 23 Feb 2021 11:17:32 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3B1BC06174A; Tue, 23 Feb 2021 08:16:48 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id a132so2980920wmc.0; Tue, 23 Feb 2021 08:16:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l17os7/7Cmdeypzws3CjPRBYiptpWoT6sGD6tB5zVB0=; b=Mk5JtHBPWldH1fduzHBFFZI7ligfBpyYzjL4Czj3XdNXBSf6bZEoPvO4Eyw68c+xpE wfchl0EmyqK2/qj8qoA/08YxC/jqw6q6sjRAjetXoH19Vlyr5/u7Glh0HZFWiTCZiUIM kRIF4U+PPgC69MysHck0XuJwir+dhfm0DPoqYydhITnwC9icBN6b9UjLNPSBBIHrcWSV Adx6E72akLgK/baeFgUDjfub5VtnwM9AX9SJGeS8nh0KacPx+Xvtzkw5wroLU7bLZwJq 5ikWOsrxQ1oR4PTJZWsNr2ChWatRJ6Cq80F6hS6a2F+ktAMxo7BFBhe2JGg/N7LOZ+Ce 32iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l17os7/7Cmdeypzws3CjPRBYiptpWoT6sGD6tB5zVB0=; b=ZMiDc0McqC6BknjDPwTRle3mlqgvsvwdE5L5hl3dOORNBvRy0L7Tb8hzwP8RrupnzT YO5CWP7ltMKX+BZpaHwd5M6kEcQTtLJpnm/1QuyI4lYmg4TCDX8qibiGmfSWN+FKBwld ufB4KZP9H2g1wU7Pis/0Sfh1oQqW7bb969Gi/If46ILR5CfTMiQf5Ev++QkykXJZu6HA Kc7SzcxFakFI1MUxuASE96fOlgSJXwljzW1XliQDUtW3h48J1xkke5GEPYJAgJPBpCgI uXfDIUrery4TPB0ELI3x2UdFozvbgEHtpzJUtGkjUY+X44s2sPT3yNteArJJxR+RnIzy XzYg== X-Gm-Message-State: AOAM531anZebnUhDUbD99SgZxJOvSIHT3Syyx39LIQSzL59/CdQkOeyx N22WhYVXQjB0EUTm6A6MFozKfLIu6N0oWr/2 X-Google-Smtp-Source: ABdhPJzuL42u9wmgMzblrX0mcR0ulC/G2seksOMYMA+Kqq4WWU3HFzWic2TkxRQH8Ur9O8HIMlP1wQ== X-Received: by 2002:a1c:c903:: with SMTP id f3mr25621536wmb.69.1614097007648; Tue, 23 Feb 2021 08:16:47 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id h13sm32699925wrv.20.2021.02.23.08.16.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 08:16:47 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: f.fainelli@gmail.com, jonas.gorski@gmail.com, Greg Kroah-Hartman , Rob Herring , Alan Stern , Tony Prisk , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v2 1/2] dt-bindings: usb: generic-ehci: document ignore-oc flag Date: Tue, 23 Feb 2021 17:16:43 +0100 Message-Id: <20210223161644.6095-2-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210223161644.6095-1-noltari@gmail.com> References: <20210223155005.21712-1-noltari@gmail.com> <20210223161644.6095-1-noltari@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Over-current reporting isn't supported on some platforms such as bcm63xx. These devices will incorrectly report over-current if this flag isn't properly activated. Signed-off-by: Álvaro Fernández Rojas --- v2: change flag name and improve documentation as suggested by Alan Stern. Documentation/devicetree/bindings/usb/generic-ehci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml index cf83f2d9afac..8089dc956ba3 100644 --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml @@ -122,6 +122,12 @@ properties: description: Set this flag to force EHCI reset after resume. + spurious-oc: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag to indicate that the hardware sometimes turns on + the OC bit when an over-current isn't actually present. + companion: $ref: /schemas/types.yaml#/definitions/phandle description: From patchwork Tue Feb 23 17:44:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 386518 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 E0136C4332D for ; Tue, 23 Feb 2021 17:46:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8B376146D for ; Tue, 23 Feb 2021 17:46:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233784AbhBWRpu (ORCPT ); Tue, 23 Feb 2021 12:45:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232920AbhBWRpm (ORCPT ); Tue, 23 Feb 2021 12:45:42 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0480C061786; Tue, 23 Feb 2021 09:45:01 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id v21so3237147wml.4; Tue, 23 Feb 2021 09:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IPaM4EX6V47/9lZ1DVmPyYKV5xLEHFqT5NGooxhgdBI=; b=Ck5uCe8ERGA3i2QCmNtEOJkOmUI4YtcOO1UjGTDk3XG4XYOB2scOlknlkx5m1S3pVI fxT/yEXoKO/MShBCl1bOw7LWXLxCZRr2QpwMg6ppsy74pOiWyFZDsscokCdQYM3aKjhQ bqE8gZ3aODPefOObLf02p+d2+FY2myDETHM3siEvlBP3ZU1kyaWCsjJWuizNHfdY0j71 k2GapB5rtkXrdv5OJkXNe7yjGgVQHrzu1TXGRqtc2kgmm/nNEE53s3xaEEraYNmW+Q/v c6AmGZyAqVkqTZHrpVXa43Z/gBzkfQLbobiLB6H/vkXY0Y6L2KZ9XaYaViAfS8xYTluV WWmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IPaM4EX6V47/9lZ1DVmPyYKV5xLEHFqT5NGooxhgdBI=; b=lS0tPsidSouuyGVJjv8SjOMlJNTcUaY2FLr94NyN+j/R7BA9SYKLnNdpb/lGAc+o2z ANo/wysG4CDKudhv5c6N9lm751dsltylm1nUnNcPz2RzsmF4SRIuDtSEDovfuL1m6nph 7+F3NQe/91BjvcTVHOCNFlCLUBi0OdAMRDOTVvaKLbZVsLvQcHSMii7t7HvYYn45yneO TyYW8fyMAhpDfLJD3z6S+nfGANF8YiSiBQQwYwttmnZ67O7cY0mURtECftkvW1u8bgqA oKffOSr2+fsZEn6A8Zb80uC7h+Ei9TpuMHe9SGxwRKCBqYjvGH4GKpqiSW2XlEkD2F1a P63A== X-Gm-Message-State: AOAM530uhmsgMg9IJlEg1x7kcRKlzl6vzmZVQrXIOEXJXVRNbah0bE8k 6hr/bd3O+/BfUym63F9mBOQ= X-Google-Smtp-Source: ABdhPJxQooaU+YomFGG2yb8vJWqmTMPGkVlCCIvt0VFUfBkO+2/hsbNm0MKWYrRs4EiUN/O7iEwToA== X-Received: by 2002:a05:600c:35c4:: with SMTP id r4mr25425356wmq.138.1614102300688; Tue, 23 Feb 2021 09:45:00 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id u7sm32408428wrt.67.2021.02.23.09.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 09:45:00 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: f.fainelli@gmail.com, jonas.gorski@gmail.com, Greg Kroah-Hartman , Rob Herring , Alan Stern , Tony Prisk , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v3 2/3] dt-bindings: usb: generic-ehci: document spurious-oc flag Date: Tue, 23 Feb 2021 18:44:54 +0100 Message-Id: <20210223174455.1378-3-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210223174455.1378-1-noltari@gmail.com> References: <20210223155005.21712-1-noltari@gmail.com> <20210223174455.1378-1-noltari@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Over-current reporting isn't supported on some platforms such as bcm63xx. These devices will incorrectly report over-current if this flag isn't properly activated. Signed-off-by: Álvaro Fernández Rojas Acked-by: Alan Stern Acked-by: Rob Herring --- v3: no changes. v2: change flag name and improve documentation as suggested by Alan Stern. Documentation/devicetree/bindings/usb/generic-ehci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml index cf83f2d9afac..8089dc956ba3 100644 --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml @@ -122,6 +122,12 @@ properties: description: Set this flag to force EHCI reset after resume. + spurious-oc: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag to indicate that the hardware sometimes turns on + the OC bit when an over-current isn't actually present. + companion: $ref: /schemas/types.yaml#/definitions/phandle description: From patchwork Tue Feb 23 17:44:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 387058 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 06425C433E9 for ; Tue, 23 Feb 2021 17:46:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9AB36146D for ; Tue, 23 Feb 2021 17:46:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233789AbhBWRpw (ORCPT ); Tue, 23 Feb 2021 12:45:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233765AbhBWRpn (ORCPT ); Tue, 23 Feb 2021 12:45:43 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7968DC06178A; Tue, 23 Feb 2021 09:45:03 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id v21so3237205wml.4; Tue, 23 Feb 2021 09:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YCOFQSDEe/3sfY1ZtH3CdhiCYHMFhIU+OK5qjpWOXbw=; b=Iay8qIdKim0AaBvFytQmd2LztS7tKQoPDdMD2n9uQvjsYM2Se/agQnN/BA9j+p39AM TeI4ZcoRBcRYQsMbXUiywTJwmPKB1jm8v6OktshpBpSHwlFOV+TRU6MekAH2puAHhV3/ MG8sET4lkGQFXC6O8V49XMgz0NXAkhLIFnHAzNdlp0KNAOEAlrUp+IoLXHQlVnSmK6cJ qCqm/7kaoIVVqxp6EzYXVlSN6FDz+4rCT30Q65yD8xhoh1eguIL4cA2UjHMDbtC6K8n/ K4rn3UL9h/aT6PXTEgjJu1nCGX6nyzl1mGMjxz8nfKjqS0F9NPx2xAKVFA/H/C2urt0a CpCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YCOFQSDEe/3sfY1ZtH3CdhiCYHMFhIU+OK5qjpWOXbw=; b=EyuvpksujLpIPz4a87U1j/z9SgRWW1sGAlN9VxR+YWqXSaiCgOvt7C/iuLtjokvAo2 +MbadLPaPNcqm/5HpPyWXPYylMVDtZ7bR/dwos2aaF2ShruCGxPy+psb3Hqwqy2AxLF2 P3ycagxSeJc9YXTn0FXmTp7KNY1QqDHhBJ3Hpn+6qCob0HtlpA0sosIG/bC5tW+GJWMj LLaVi+z5YpTpzeDtG0BQi6l1RpUSwVgNnkls2AhgGkseq0VHvij7PYUFwrkHmAOqz0dg fSCSOaU88bUaPYpDrn/wXHdYeJ+16DuV55a9J6YZLG/V6BuXX7KsapwkcM5rZTkcAB6G JkAg== X-Gm-Message-State: AOAM532/3IleEXOPIUEtrBuDSv8IbwpGBjSEZIY3nMn5dzcIllOdDhDl xggvBUOJ0IOJNPA29oRQrdM= X-Google-Smtp-Source: ABdhPJzwLEfBk1TtTHISe2r3iq6YoGW0Nct69tWU2II6kIvPJhlAmm8KgAmFL+Yt+cpws7PCCqYCDw== X-Received: by 2002:a1c:f312:: with SMTP id q18mr26018356wmq.79.1614102302274; Tue, 23 Feb 2021 09:45:02 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id u7sm32408428wrt.67.2021.02.23.09.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 09:45:01 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: f.fainelli@gmail.com, jonas.gorski@gmail.com, Greg Kroah-Hartman , Rob Herring , Alan Stern , Tony Prisk , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v3 3/3] usb: host: ehci-platform: add spurious_oc DT support Date: Tue, 23 Feb 2021 18:44:55 +0100 Message-Id: <20210223174455.1378-4-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210223174455.1378-1-noltari@gmail.com> References: <20210223155005.21712-1-noltari@gmail.com> <20210223174455.1378-1-noltari@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Over-current reporting isn't supported on some platforms such as bcm63xx. These devices will incorrectly report over-current if this flag isn't properly activated. Signed-off-by: Álvaro Fernández Rojas --- v3: no changes. drivers/usb/host/ehci-platform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index 4d7b17f4f82b..c70f2d0b4aaf 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -286,6 +286,9 @@ static int ehci_platform_probe(struct platform_device *dev) if (of_property_read_bool(dev->dev.of_node, "big-endian")) ehci->big_endian_mmio = ehci->big_endian_desc = 1; + if (of_property_read_bool(dev->dev.of_node, "spurious-oc")) + ehci->spurious_oc = 1; + if (of_property_read_bool(dev->dev.of_node, "needs-reset-on-resume")) priv->reset_on_resume = true;