From patchwork Mon Mar 4 10:38:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10837627 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 147571515 for ; Mon, 4 Mar 2019 10:40:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EECBB29C79 for ; Mon, 4 Mar 2019 10:40:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2E5F29CB7; Mon, 4 Mar 2019 10:40:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 874CF29C79 for ; Mon, 4 Mar 2019 10:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=85wnM0BLPv/DtS4+F4gId97T+Hxa6ozrxajKwatVo80=; b=JpTrot1IHCIQXk Z/EuVtHVuQXzHpfKnXdcNJ/9/yiL9ehodQnFeiStlquQ4ijCa+vyUhJzeTtlg/U+zOrPMn3Nf7q1t jKYvAOXQkCG+yn3KYnHQYOEqc3NfTkCf/7PF48Qa2EijsZtFXJdhzSljdGQj9O/dU8w/qFQ+CvLH+ T7ngojCnHNJmT37xqjDiAUD+1ozPvNilX/EaGuWoQrOY6Q7CfugNwWVbxSvkBAkyx0Aej7F3lxE8J zBb77+1aeKu9wItv42jBTnHS95O/AbX+PkXIuJT+NhfMXXUTgIEbzdY8hgD4EPZ/XFtd9XWsqy0Sv B7KMElKIAICDropUDHag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0l1D-0004uQ-Ac; Mon, 04 Mar 2019 10:40:23 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0kzr-00020t-Au for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2019 10:39:06 +0000 Received: by mail-wm1-x341.google.com with SMTP id x7so4078086wmj.0 for ; Mon, 04 Mar 2019 02:38:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MVuAZg4+nnaFhkjixBpLWEg1hgwoQXD2AQa4Piwf/Kk=; b=kiJMJGxn+O1rgglhFjxDpHzLiD6t0lxdtM+QbSFWRXex6U6ZCjDiJuixhpi8cqacdj yy5reYe9GyHYRM3tt2vjZMYWNsGeHlKeP3f/3CG4/jWLbBNgTQAgW8uwVSslfncuxkFq wX+3kuXvIvN5fFBFyOF+0s67RXuyh8UWHNuc1xK2WxNRJtDSHIv1M8qMWfRaMNL9IwWB f1pfZJZnazBIFnneJC2BRwofD1JRBCjzyNWjwGDoTQpVI5v1JNnocKeLFi3LAra4GDC6 6PTsgspe9O67F3BjEvJv1U6i4mtU7nj/by59KqHwBCz+ojy5zSFlPHuRt90wexPPXho2 FXmA== 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=MVuAZg4+nnaFhkjixBpLWEg1hgwoQXD2AQa4Piwf/Kk=; b=dcqn5sc4X/W/h+N4WVEKW+S9j9xOQnYffbk+jvFMDhyzmIitKZ8j6Z7B+nwTMBdyXN CIyLV97nqCrnuqiz9KejBo7tSNfYFTGRaPYiJSWHc3m8qO5S8ibWIPwHVjyhnLaKk7Y3 oglyfLDHljEtswJAiDyg1XGwMHVbvZR5bF2p4uSQBb8kLT15EgJK7uDBPKfKC6gF0t3H HXuRGpH87iEtANLJWPTcL5CGDozOMWW2mk91sWkCWm2+qW92Enl/hb5P/eHtWUwlApqi 7VqR7g9xN2oAuixt/154aOQlvGw40e0mo/c+f+FKO/NdDKxUVrpfLaevuum2fqLTogbW cLMA== X-Gm-Message-State: APjAAAUhtM/iRB7f0Ec4VOLWSIa9paBH1ZiTUd1BDLgqUjU4e35QMshN TT7CFkFUzOFGGu/VxL5NwEMhRQ== X-Google-Smtp-Source: APXvYqwCUU1Jrg5AzhTra9qP0/c+iULEuHGaC/nSSlbzT84OBH/i/BFlPTH8M4TvVZV/a5VVbYTM2A== X-Received: by 2002:a1c:9ed5:: with SMTP id h204mr10124385wme.140.1551695937814; Mon, 04 Mar 2019 02:38:57 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id g24sm5505676wmh.45.2019.03.04.02.38.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Mar 2019 02:38:56 -0800 (PST) From: Neil Armstrong To: gregkh@linuxfoundation.org, hminas@synopsys.com, balbi@kernel.org, kishon@ti.com Subject: [PATCH v2 7/8] usb: dwc2: Add Amlogic G12A DWC2 Params Date: Mon, 4 Mar 2019 11:38:45 +0100 Message-Id: <20190304103846.2060-8-narmstrong@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190304103846.2060-1-narmstrong@baylibre.com> References: <20190304103846.2060-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190304_023859_947728_BC0B23F9 X-CRM114-Status: GOOD ( 12.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patchs sets the params for the DWC2 Controller found in the Amlogic G12A SoC family. It mainly sets the settings reported incorrect by the driver, leaving the remaining detected automatically by the driver and provided by the DT node. Signed-off-by: Neil Armstrong --- drivers/usb/dwc2/params.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 24ff5f21cb25..442113246cba 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -121,6 +121,16 @@ static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg) p->power_down = DWC2_POWER_DOWN_PARAM_NONE; } +static void dwc2_set_amlogic_g12a_params(struct dwc2_hsotg *hsotg) +{ + struct dwc2_core_params *p = &hsotg->params; + + p->lpm = false; + p->lpm_clock_gating = false; + p->besl = false; + p->hird_threshold_en = false; +} + static void dwc2_set_amcc_params(struct dwc2_hsotg *hsotg) { struct dwc2_core_params *p = &hsotg->params; @@ -167,6 +177,8 @@ const struct of_device_id dwc2_of_match_table[] = { .data = dwc2_set_amlogic_params }, { .compatible = "amlogic,meson-gxbb-usb", .data = dwc2_set_amlogic_params }, + { .compatible = "amlogic,meson-g12a-usb", + .data = dwc2_set_amlogic_g12a_params }, { .compatible = "amcc,dwc-otg", .data = dwc2_set_amcc_params }, { .compatible = "st,stm32f4x9-fsotg", .data = dwc2_set_stm32f4x9_fsotg_params },