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: 12100579 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 359A1C433DB for ; Tue, 23 Feb 2021 16:18:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DEA53600CC for ; Tue, 23 Feb 2021 16:17:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEA53600CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=R7gXEKupMKhzcsJHF/T3RtGrZTs5iZOp8S5iNRG7jlo=; b=oDGjXZR4I6Tqf8GMABGGp5Yxq TT9iu8BsFn4JszQja7SCwkyqkMZRQhmlN4IbzbW2vzxHOL9PVjc0eHylEyHnw/ZHRenS47XbGuXMA PasIsYjMJGMAgTf5ipcFE2NzOaxD88DWO/PJyJ+8843sZq6WV+RWwWSGOV3Hpc11BVfxFAdcNQkwv LM1H+yC2K5DcmAbqsb4AIToYL/xPYJuASzAYMEFWjUQP8l2J2Y6WJ4NaaKx0vTSQIof5/WtxaWtb2 W2oDSS4ztLG2b+SlhB+Y9ie3ylzjJ92GwihYR28KSe1ao5AqAI3TOxykuWZBfi9NcGpbRgPR1o8vk C2z/AgSjA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEaMn-0008Rw-Ck; Tue, 23 Feb 2021 16:16:53 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEaMj-0008QX-0X for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2021 16:16:49 +0000 Received: by mail-wm1-x32c.google.com with SMTP id x16so2966066wmk.3 for ; 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=uiaSbDeUs24kOH8VJ+xbDGtvYfE9SUEJZXDkvSBKR3/RXZL+czqV9OeuAsTpQt801p 6ryMyJ2sPebD/u9aYnEwpK9Srd7892QwJWjNL/v7IhOzUVdjF4YMJDS/eCNdDJ1kit5x 4KEPOMaieLoenZcV5LSI7RmtaduW7OuT9ZnkJShw91FtqhVTL9SeC2oSM85dECm5SRKX afrR7H0YnuoKaYgwQhXXFooF6bqQj5iImiGSJdWvHhb7Qz4pLsbuaWalG60XivwfdvAY JY06DvlwVTYI+oXzpD++eGqwXIrW/cozoCcF/4Og7L1S+4YG951wfNgbAJCrUsYnsxh6 R3/w== X-Gm-Message-State: AOAM532ZR31RC5o7F89iym0hPEEIpRqVBlClkNRj46fmCdrw9byQS5in V0riMaSZlQKS3nl3WFbiwks= 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210223_111649_099864_48F73797 X-CRM114-Status: GOOD ( 12.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 16:16:44 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: 12100581 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 D63BDC433E0 for ; Tue, 23 Feb 2021 16:18:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E1A064E3F for ; Tue, 23 Feb 2021 16:18:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E1A064E3F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kvk1slyjt2YyMnEEQ/1NUn0OZzDtrWHM6//Uv6LvInc=; b=OrQATVKwSvA5NT6Bgf/RMdsOE nfgKrIJDkK16PG2AS51BWVarzXpHQvVRby2zVGmCslKQmpQWKbVSRhTdo6l95YOVtIz3squ4j+Rg+ BXM1f2P1gpmCgednVTnsYZYwc/kUX4aI6kDf7k6WacQHObAikWJ/ozXlgrCMRiqtf0Kuole7jnjN8 c88/y5KPAARHYP72f8A7yhvFP67TPLbYlintwSsLE/bka90xo81Oe6BMVoa9Ly0aZVr2JHnEkMbpw im2qcu6EmVGKSD2gInZNjpuogdJc74etIF0hA7miYMFZZj5K5H1JlMcyIwrIRaWRyPse+n3zukJfS 7eBaoL/4Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEaMs-0008SX-1i; Tue, 23 Feb 2021 16:16:58 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEaMk-0008R5-B7 for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2021 16:16:51 +0000 Received: by mail-wm1-x330.google.com with SMTP id f137so2992920wmf.3 for ; Tue, 23 Feb 2021 08:16:50 -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=62C/tDmk+MSjo8rXAJ962MGxlZhUv4yIxXR51bs0jJs=; b=RsZOaSv4al1Nyn95Atv8D97OyyLYxEy4QgIh8648RDP91GQ+bwMGDm/dlDNa6crppD ZY38PA12nx04la3S7YlSwKkL27y1GzdwoROt5LEShAS/chRKdfx/81CIDEE81+mMysnO UF9ilumUITPX0WpHWzlepdihd+UrrwxXBASi1M0zzcnOqwTjLqv3s4O2H1dR3KtJ6kAQ 2jE8LBK/eFFK3Vh9f5Mva6fbSkfhQwSAwVjoT6dId8/gKZ/25raaX5EsWr7VNFCZMvER iO4caOdUaxRdA7CuRq5Vex7icrCdjs7sIMKa3esjarN/Wzl50dMoy+khM4ADFp0ZTArs MpPg== 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=62C/tDmk+MSjo8rXAJ962MGxlZhUv4yIxXR51bs0jJs=; b=c6BDFLMdTAbR28HVNe/ZnElEfW6OL5G5Z7hF6+zvQ4v7MjCJanLuIrZ1SStT1OBEDD InfOEXamebH0asLEh36rFNz9KgPidTzbnw5E4hrfYUMke7lcJzI05s9ypM2kWPAEkrLx sPWwtCK5ckGt90R6XdpuKpBBcwMrWwIJMT4nExC8mPHSGDCgCVAQhbhNW8NNGI9/M47M dVa6+424ZJgqb1Y6pVv7DHtSW8F4DAVelxC2U3YgYyNCCagjtfDMk8oLujZTYs3Gl/+Y yJcMYmoiI0X3EvWeHa8SL9j2iSW1SLAUcN0D4WVkKGfNNqLVJWqdvCrjZp7Dv+1aEvFk mm2Q== X-Gm-Message-State: AOAM530IXfAUjZTwqQXiuMo/Y34UyLHHWhA4UR5/8llAK+MnNJM0aNJx 7UL/AoMjFM64rHI6IIdSS6oI1NJW1BotrznM X-Google-Smtp-Source: ABdhPJxgtfnhf8+Y4yT+VytFiVfZMB8uYBTy/eUGUpY5eiUchX0aEQdZpwfvrrnW/u8mmLzvHD12hg== X-Received: by 2002:a05:600c:35c2:: with SMTP id r2mr24209785wmq.54.1614097009231; Tue, 23 Feb 2021 08:16:49 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 08:16:48 -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 Subject: [PATCH v2 2/2] usb: host: ehci-platform: add ignore_oc DT support Date: Tue, 23 Feb 2021 17:16:44 +0100 Message-Id: <20210223161644.6095-3-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210223_111650_404995_0DE95D13 X-CRM114-Status: GOOD ( 13.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 --- v2: change flag name and improve documentation as suggested by Alan Stern. 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 a48dd3fac153..2c587e31d010 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->ignore_oc = 1; + if (of_property_read_bool(dev->dev.of_node, "needs-reset-on-resume")) priv->reset_on_resume = true;