From patchwork Tue Jun 18 07:55:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805199 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp80450wrx; Tue, 18 Jun 2024 00:56:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX11qU1RHD8dC2xZ+7YiEIuoP4qbxY4aBtAwNmYSxkxCEVnLrQUUXxhTtNLdulowBbBuFUtymWPtiGM6E2g6PrU X-Google-Smtp-Source: AGHT+IFKWWxWhuFeB69gR0McqksTUbyjcZG1g2+r9MEeKKVRHMyuW/7s1wapX5KdxvZ9ZJ8faFMQ X-Received: by 2002:a17:906:138c:b0:a6f:2e28:4008 with SMTP id a640c23a62f3a-a6f60dc572cmr752528066b.54.1718697366176; Tue, 18 Jun 2024 00:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718697366; cv=none; d=google.com; s=arc-20160816; b=qPRxSXNcvzMEVxdlJLliKFrZ1V/tGMDwwDLqF4l/aHLRG9+q4VDfVZSA8ewISXrhY4 DSw0lCy7K7+gslsz5ma9WaQ14e6cUw5m/LdQOm9uqiNX8BmLgcJqO7ccjlEJC+1o+zjY nxs8UokH93MaCndJBJUetC5ZvAtqBHotxMAyojoQCnJ/BlQtc7agEgzq01vNw0keRJ0v 7Isy1x4Ts8lD8WneB+DhDZi39yU1ze9B1DWTjbbXgY36IkBlqRt0kFbs4m3aAMVngU5n RZEYp/xfbLBXznIG049kqTtwyOjvGFpfSw/8KukeIdzuCEJp8Gq0H5Tbus77rc2hPSQP O5cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ng86sJ2ghzSyCipipXjg3ALFwIc9lDdOQozhclnwpHI=; fh=oS3CmJW9fP6YCapA6hn/QsNGTTZM0/txkGCG5GnWxek=; b=qjkhseC/6UHm+J93B807bZGDejNIML50/uxeOjHm4ZynuB2ENNAYEX2IAwWHxKZtJx buKct82KEPnzBQ1AU9Db+jUANb6vx22sGizBtGMg2L18e2aJuyXlpHOzZR4RP8qCuBdV d/YnzELbY5n+Fa6X2S2kt1wtoa6j3yX+G2bjKry1dyGyOgU815+AHIFXm2/IiXuEhYUO EoBimeMKc7YhJM341MGQ0qK4rGABiEXgLOCZqENj4EvACdTHO16FiLtuonlzzEEXzyXH LajqUv//M3jDJWI62cfwCwuR5dgXH3T6FvIWfUex+FHI4oO6vYksyKAw2zeSua7/kaUE kZ6Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="O1RqK/II"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56dfaf80si529887166b.694.2024.06.18.00.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:56:06 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="O1RqK/II"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2EF9D88506; Tue, 18 Jun 2024 09:55:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="O1RqK/II"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E43A5884DD; Tue, 18 Jun 2024 09:55:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 61062884FB for ; Tue, 18 Jun 2024 09:55:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-361b376236fso381743f8f.3 for ; Tue, 18 Jun 2024 00:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718697332; x=1719302132; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ng86sJ2ghzSyCipipXjg3ALFwIc9lDdOQozhclnwpHI=; b=O1RqK/IIkBZ1+bwOMmXsgfbmHmAom8aP4CrHRSqP261UJebhcXGKYpkXN8C38fZMhZ APyMoBs+xwbgIL4Xt9ZFIXkfhsYpWDKy2Ozv/yVgXNKAP8zoxzXaNI7swyoEq8ldo+AS w4eO5JkWoe/uGjpQaf41VhAg5RV0Dtv4ToRArM2CFrYdktFPQE9FeCSGnDIofbtnAWWT Xl70b2nxavYWSYIMgu11E+DjO05qvqE8FYI1wfdUu1EEalPs0kncSS3yG2CNKAqBfCoX 2a1DlHOWyerW02RLq4Pd1in/J2zR4H1nUuyfjHnIy0yU7gfgi/3N52ytNu0R7URTHU9L +lfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718697332; x=1719302132; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ng86sJ2ghzSyCipipXjg3ALFwIc9lDdOQozhclnwpHI=; b=ZDCYeBlMzS845BDaDxzoNB+o5vTMaMd2ywe7gYLLI62dazJYRoF2lHu2w0kELcHZQL 9EZtdsIMhNjaMGUy9kJmNopg8ZmuFOpfeuFAilGCwKJxnqvqSNghhEymSjKkc+wD9fFB BYPb7F04ZNJ0qK7bEkgPPVzNfebo1a4oGPuMr54UgA5w2fUYStOVICzLmsCvemqb5DLs pvjk4V+D8mJf4qxMekMFEv65GIuCAW83DNCHoTrFCjBcZvPExKhb09BuVRh+jeNGafBW aF5n3Pop9PHg7J6RcWUyuKG8++acB4CCwPW3FCuFu8/k8rl/wY/wqCSqCcZpAhyZztRX 5NSA== X-Forwarded-Encrypted: i=1; AJvYcCX3jcEr0pmv1iiZOyhCNNfNLakMNOyavgo4QfYtkmnEXTVsOZos7IG3yW0LDptpkjSraxtecEzNVyTYX7n6c16hpLzThw== X-Gm-Message-State: AOJu0YxVRwY+Ng8Vm3xn7pZoaU+zhXwAtBlHi5H5TsBsfXAnB2QG1aSt cCSpn9/tt+C/QBY1whewL3pU68ifZoueW0jji07z86jgcobJcHqoGvLHOTeFxv1sRNHEfcX/493 qujk= X-Received: by 2002:adf:ed4a:0:b0:360:8610:f65c with SMTP id ffacd0b85a97d-3608610f701mr7147414f8f.2.1718697331728; Tue, 18 Jun 2024 00:55:31 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750934a4sm13523173f8f.10.2024.06.18.00.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:55:31 -0700 (PDT) From: Neil Armstrong Date: Tue, 18 Jun 2024 09:55:25 +0200 Subject: [PATCH 1/5] phy: meson-gxl-usb2: add set_mode callback MIME-Version: 1.0 Message-Id: <20240618-u-boot-usb-gxl-phy-set-mode-v1-1-6b41efa46e35@linaro.org> References: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> In-Reply-To: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1738; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=QrdXQDAZOcLlaK5yVj7NQO4xP3YC9Lve3402Xe1o/Z0=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmcT1wahIGV93lln4pALoceMgxycK4q4efdD1Tb3Sf 2UH05sqJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnE9cAAKCRB33NvayMhJ0a7VD/ 93Bh9V2JqZnPEA+egLwNCqMtbUxPHoAXfB8lV1pjto5BDWPLz/rNzbmSgY+i6Mzkhazhol+5BXEy+p Md+oLtv1RjcsOj9X8JmB1S9cKU6h2T46uUGjQNZE0h3xcP1J9QsTFySmxbSPcaLthVPp0VKiPQTFb2 IYr1ZnXSgqW0OU0kkEU8KiK9P/sRe1EQ8uGyh/0pt1BRmhQsjRvc2nld2E8FwX/bnC1x1aSOCJuzzs NlkGNYNBawte5VsnxjD9eF39QNuXdEpvFkNR94mdOXYcTVLEsibWmkw7dk+ojxEB6vYa0kERSIj8mJ dL40+2Ll/vXDhQZCp930phfQQUFDxg0IEqFSqi2RK8MNJvIekCLKRk9+0RkawDH7ywiqLSoABrycLI 7ojrPv2SRFBWvFMnvl/g+u3sb43x2XJbKhr5FMHY3UgNTthVW1JZBglf7IMJh9oiVBYF7D1EOsv9Rx UApqWTToU+AF34hZCSokN2yYUiOd15nq7vjZFRrbP5bmGfrd9Hp9eFe0QtDLRwnSqxJyYRhusxyq0s hyJgRoWEVYHWo7+wrtVqlLb+1D45bVVl3GnNafY+y7bn9bn0H3pwq12I3RDQlLmYszdFHvdJzuJ7Vu yg5RYGv8AyPqkrDzLNr/JlSVxa88AXP5rpxV+rjvbiq8c+4vz8paGr+LMmnA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Implement set_mode callback by calling the current public function. Signed-off-by: Neil Armstrong --- drivers/phy/meson-gxl-usb2.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c index 92c285103c..e051e66224 100644 --- a/drivers/phy/meson-gxl-usb2.c +++ b/drivers/phy/meson-gxl-usb2.c @@ -150,6 +150,28 @@ void phy_meson_gxl_usb2_set_mode(struct phy *phy, enum usb_dr_mode mode) phy_meson_gxl_usb2_reset(priv); } +static int _phy_meson_gxl_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode) +{ + if (submode) + return -EOPNOTSUPP; + + switch (mode) { + case PHY_MODE_USB_DEVICE: + phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_PERIPHERAL); + break; + + case PHY_MODE_USB_HOST: + case PHY_MODE_USB_OTG: + phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST); + break; + + default: + return -EINVAL; + } + + return 0; +} + static int phy_meson_gxl_usb2_power_on(struct phy *phy) { struct udevice *dev = phy->dev; @@ -161,7 +183,7 @@ static int phy_meson_gxl_usb2_power_on(struct phy *phy) val &= ~U2P_R0_POWER_ON_RESET; regmap_write(priv->regmap, U2P_R0, val); - phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST); + _phy_meson_gxl_usb2_set_mode(phy, PHY_MODE_USB_HOST, 0); return 0; } @@ -183,6 +205,7 @@ static int phy_meson_gxl_usb2_power_off(struct phy *phy) struct phy_ops meson_gxl_usb2_phy_ops = { .power_on = phy_meson_gxl_usb2_power_on, .power_off = phy_meson_gxl_usb2_power_off, + .set_mode = _phy_meson_gxl_usb2_set_mode, }; int meson_gxl_usb2_phy_probe(struct udevice *dev) From patchwork Tue Jun 18 07:55:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805198 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp80377wrx; Tue, 18 Jun 2024 00:55:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUYwjY27e7DIQzhMaOEJbOhwTJrt9+s3ZPzPDZ5S8loEgN+gMwlC9f+XlX+A8qTajUDO3Yp2I8LGTomwFGD9Id2 X-Google-Smtp-Source: AGHT+IFIyHf7hcL7hyUtkbGzmXSbCyA4/lqZiycHe7Ghh5+IQkL6SsRZ6aYF3vN1Gk/JaNw7zogV X-Received: by 2002:a17:907:a092:b0:a6f:7591:9217 with SMTP id a640c23a62f3a-a6f7591974cmr623257466b.55.1718697349658; Tue, 18 Jun 2024 00:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718697349; cv=none; d=google.com; s=arc-20160816; b=rgoNsGO7zMQl7daCvjequVNoRMXsPsh8aXCBNdm3NLoV793uk0govYdwH2yt4vehX0 dE8aCoCKjqI2c1fzM6u9jDn3ifzhSUke3Vds9B+CUWroHhl6G+xdgsWUF67YL+gOIOBG qf/aQAAPdXngh6aBo+J7B7Hcy87VqHk86RbR8whO8KWkCaScsN+GiJXljCJMtyZXUQT1 lccGZH8BN53YYeIKoaVCmCGyzBRbVFY2gK4s3XPDGAf+cqdAbYUSU5pC/QojZWmYhuPi Iv2vtjm4RxbsrTBFXDlif0g1RKbF5IVy20KmWXanHWGQzGUt/QCfdlfuMyc6wcExde8M pWUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=3s6QvRaLgBM9BVS5oof8t32fnskrrrw/ilAd8VvZ3SI=; fh=UqUp3plCk4PG7C68Ap1Q+7y0GbtAZ+5RS4iFaDK+vdU=; b=P3527CvWWU7zqfuTW8MCrLf2B6B6t/zW/shDfWZOFt0JKoZgMsLFIvHQCFV0foIvvY KMM5suHSHDVTKoT16zRcixFT2+Xbb4ET7zOL1YtwVEra4GxchCsLPfYubJMIjrkEJpcz TxrOBde4RYWkBatiJcrizu/DRjVx2/AVI/DrrVDGHBZ6RFnx1pKWYscxNW943drfnHtE tawsuZa2qTGin4Kp3+l5KJQg2i2WcscMqlDL14upUuzuj0hGyBs7G1KLBKvxDwB/XJiK UKwUZgKAl/5BEEPaunWb1mt4GCxKG0hHUlpjtlAwPWX0mECBejfPIGlKSHhGMA5Ddoez 8UFg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZIazTc+m; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56df49f4si527143766b.596.2024.06.18.00.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:55:49 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZIazTc+m; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CB831884D0; Tue, 18 Jun 2024 09:55:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ZIazTc+m"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DD63E8852C; Tue, 18 Jun 2024 09:55:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 206218850A for ; Tue, 18 Jun 2024 09:55:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4217d808034so45835125e9.3 for ; Tue, 18 Jun 2024 00:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718697332; x=1719302132; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3s6QvRaLgBM9BVS5oof8t32fnskrrrw/ilAd8VvZ3SI=; b=ZIazTc+m1La1vTEEav22TxKcFIQNBi97P/lVDlfjqyqS78YrQjB2NiSE0T4jk1vTM8 FzF0fXrmWj81Bxowh2GCezNBLfABJn/5tkWS03XoHwLvbC6CWWOjKc/UJiyyFL2b/Mmn x7nCNdccNNPXNZogMTR5+7gOYhoHyINLtPiL+MHnA0GQOiPS7rFl2PDvTz7Zojh1ptp4 0O/aZoHjFlZfbolpLroWJnk1AyRKZ1OFr+QngUhsgaz1MWTQcQFOpk/pc26KrOlO3oBE e0TlS2QlUvBjOkbvXPcFb9ic65E4g/GvZVT5vb7RB/omMJAWdSHz6/fWKGfeMBh3vKC7 EGiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718697332; x=1719302132; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3s6QvRaLgBM9BVS5oof8t32fnskrrrw/ilAd8VvZ3SI=; b=MBr79o6oPtFcqE4t64rPr4fxB1vz2K3Kz2YmZnT0Z3+1Wk8Yb+DWapJ20faaczV2Qr CorpNClpuo/WMgSC4RziRWz71Bi98eHgw8ft1dSFxCKJzzUzwrHPVCAWE4iFK703YTDk 5wMptkhSz7yLuOdv7yrYjCF++cb7RI8Q6GjDicSQTT8V21raM+UNIKHa7e9KMXTQQjOu +uUMKZ13S/WTJvLBv3gstpteuvRX0HQ5lvS4pWCTajS5AVQvdLoirK814xylShUJnWp6 xcBB1CgwzeSmThCoVYReFbVKpGZofGYeuo6XxjWTGMpBrX3ckxScofleCSBvIdaz7CR6 qCpw== X-Forwarded-Encrypted: i=1; AJvYcCU6wRxpeck5usN3kz0iLdxrTs+PMyOM6xWc24bkMtvLTkMFwabpuPzqc6QRAzqTE0m6AStAc0wDT2ZQ0sKH2woh3zkNHQ== X-Gm-Message-State: AOJu0Yw3KSGMVoc6EA1znGme+JcWzqiQf/jpxJetrZmh5ebjYvYV+1M+ 3f6ZGr2MKt78y4zPTeeDQHubPrxBXOd8I5j/MGw1Yo4XJ9GlE1WEhvU+KzSo0eE= X-Received: by 2002:a5d:4c4f:0:b0:360:70c6:fe5b with SMTP id ffacd0b85a97d-3607a7e511amr8112704f8f.67.1718697332469; Tue, 18 Jun 2024 00:55:32 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750934a4sm13523173f8f.10.2024.06.18.00.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:55:32 -0700 (PDT) From: Neil Armstrong Date: Tue, 18 Jun 2024 09:55:26 +0200 Subject: [PATCH 2/5] usb: dwc3: meson-gxl: switch to generic_phy_set_mode MIME-Version: 1.0 Message-Id: <20240618-u-boot-usb-gxl-phy-set-mode-v1-2-6b41efa46e35@linaro.org> References: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> In-Reply-To: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1732; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=GTrmp7WLhG6oe7Z7C9Uhs4G6Xkk3KHyHVOiiQerYuI0=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmcT1wap7LKjJwO8nC/puvhnQVgeA++lPwp7d7lP30 sZ90iB+JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnE9cAAKCRB33NvayMhJ0az+EA CTCJHwU+nk9Qy1PElASIeUQmoQRXKQZIQjb6D6Lu19mFPdLRfe8GacxchRTQQRQagC9kQu8iBJp97M lxm3kS0LQh1bQA24iIZMh2yglve9SGmuJKSKtFVol3/cNAESEVuxhB4/CBtb+l+9vNBi4cvqG5Py/f 3vgO181AUxBG5pGr9QaYzTQmIyqWVbO1vRANH/iWt6aPRpSllrjO3xdlx6ZVOT84t+9e30CMGh1Pmn KF4vURjXs3ZjZE4WQF/pIVH7NrbLNwCsr13zz4vg1ijs2hDTNId1nzq6ZZ2udHHXYXxqUuTjtdnpHf /K5KxdiXEs5xrnBchL08hfIaKG4SVmSU0tZVV/nUTnQelSRz7GWJ4Hps66z8PnY4vzH9v+kUy/Ccxx anlyv1zbXHHlJJJxMhI8bNmhtUUTzVbEGKrSqw5RfywY2kaPr8dhES+FckzP8/YXS8pmW/hirzH945 LOmEAyxmQ9fWRxOyh06TL84fqDAtRh59s2kclaxkFv1MPm29EdQ6yOb4wY4Ym25fV5j3m6jNa5L9TC lkI7kmm/x3Dfqvf4KvvpO/mc5uraTpnCzJBOqZhQuGFynaa/4Hvjbt0M3ojBh74B3Pu+RYkRGy1IxM /rNhU1UV4z0G0QOBHmA9o406bR2KvzHnaFPvTpfL7VkEnYOFcqc7mI5EDETw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Use the PHY set_mode call instead of calling directly in the PHY shared function. Signed-off-by: Neil Armstrong --- drivers/usb/dwc3/dwc3-meson-gxl.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-meson-gxl.c b/drivers/usb/dwc3/dwc3-meson-gxl.c index 3e693c5ff3..290ac03a37 100644 --- a/drivers/usb/dwc3/dwc3-meson-gxl.c +++ b/drivers/usb/dwc3/dwc3-meson-gxl.c @@ -158,9 +158,9 @@ static int dwc3_meson_gxl_usb2_init(struct dwc3_meson_gxl *priv) if (!priv->phys[i].dev) continue; - phy_meson_gxl_usb2_set_mode(&priv->phys[i], - (i == USB2_OTG_PHY) ? USB_DR_MODE_PERIPHERAL - : USB_DR_MODE_HOST); + generic_phy_set_mode(&priv->phys[i], + (i == USB2_OTG_PHY) ? PHY_MODE_USB_DEVICE + : PHY_MODE_USB_HOST, 0); } return 0; @@ -224,7 +224,9 @@ int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode) #endif priv->otg_phy_mode = mode; - phy_meson_gxl_usb2_set_mode(&priv->phys[USB2_OTG_PHY], mode); + generic_phy_set_mode(&priv->phys[USB2_OTG_PHY], + mode == USB_DR_MODE_PERIPHERAL ? PHY_MODE_USB_DEVICE + : PHY_MODE_USB_HOST, 0); dwc3_meson_gxl_usb2_set_mode(priv, mode); @@ -361,8 +363,9 @@ static int dwc3_meson_gxl_probe(struct udevice *dev) } if (priv->phys[USB2_OTG_PHY].dev) - phy_meson_gxl_usb2_set_mode(&priv->phys[USB2_OTG_PHY], - priv->otg_phy_mode); + generic_phy_set_mode(&priv->phys[USB2_OTG_PHY], + priv->otg_phy_mode == USB_DR_MODE_PERIPHERAL ? PHY_MODE_USB_DEVICE + : PHY_MODE_USB_HOST, 0); dwc3_meson_gxl_usb2_set_mode(priv, priv->otg_phy_mode); From patchwork Tue Jun 18 07:55:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805201 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp80598wrx; Tue, 18 Jun 2024 00:56:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWOQyCjuQglPUoMTJhnOtXex7CbGq0yYSBKLujI+O44U/5/KFNAjYqY60rXGeE5FYDb0sp6+/kCOPOCwsFfWCII X-Google-Smtp-Source: AGHT+IG+i2h0Nft0nEHchaI7dq6lRueDSgjCpPnxGvZyLzFQM0f7Hspnr/ndtZ6Dl1HDP+lgiU1B X-Received: by 2002:a17:906:3890:b0:a6f:4fc8:265f with SMTP id a640c23a62f3a-a6f60d41459mr674520766b.42.1718697409401; Tue, 18 Jun 2024 00:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718697409; cv=none; d=google.com; s=arc-20160816; b=L7OwqoAelJYpVzxxUGfxVB47I7Ryuto2RhNSLRrHsDVe6r+f/PenZvLJr6VE+L+R5s AFf62JeutEi+KmIJfuB2l0EyZcu7BsrKI8vI3e/O7Or6z3VYaXL47OoWFA2aJeUm4nzy 7vjdoBfF4Nn5YkoNtRiQG3ZHRVooQpyBK2Jkfv2VwPtu6bGqa3210OewRxksXizjvEHB V6fV0uaE10yLgtNyO48oBbQ8ExKBxdIyuMZM3yhe+bpPVcwi0D7EEwjiTc4JiZ0NjtBp jDBMjA8S19k8lT8qigK++mt7tP3c7Gjjs7EjWnFCsa1tfz4sKwqVemRJMi3UudgF9Kqj 5dzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=X/iQ5rHKQ6Qq2bKKIszSJByGXybAQV0e6TYGSJ5WwuU=; fh=KLvAuUnuO9wFHyGudZ8kp0+8fvkE0qGZlgscD/vfTWI=; b=n41fSc04Je3cuUuNB1i8Cx/tsoZGvrbSl7FVGXA6NckLH3qQawOKcQi3Eo2UZbsbZL RI3yWnIhsKi9dOyw445+26oTwC+b5FcoFaM4Hf60xg45mT/OEy6bBKsxqInJShW70zQb Zld9NFptSwTtVbG4CroHZBZ5SYEkDJYS4rP89qrnOBYLqtEFK+5gCqfbm+QMvCb+v6qY IPMnY5HstyxqJQT4CSdE5TzU+p6eurLk6q5EvYxDoNhOA2Om8St3usGb1RyFqYQMXna+ YxLbR5xH8si9MRDwqTE1WtbxY5On87jW1Ix5GGNMGnqZmZLnvEC7DBHwn/lvlSUUzAmT ynUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kFP0019z; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56e2681bsi516141466b.712.2024.06.18.00.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kFP0019z; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D3FE188535; Tue, 18 Jun 2024 09:55:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kFP0019z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D960E88519; Tue, 18 Jun 2024 09:55:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 160C188431 for ; Tue, 18 Jun 2024 09:55:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-35f1c567ae4so4058109f8f.1 for ; Tue, 18 Jun 2024 00:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718697333; x=1719302133; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=X/iQ5rHKQ6Qq2bKKIszSJByGXybAQV0e6TYGSJ5WwuU=; b=kFP0019zOTf3hb4k4ApC11Ood5jicfdLZrWRt83VRT/fOkAsW92qbW74TQI+LFYs+0 TA3AwvqQb5W+JrowvZ6fySg8epz4NyqaehLB/d6IAuQ3AnWGEQHCDDPT2oVSlcBtvX+0 MFmnbIntZpnBXJdXeFtTIPZZAvrmVy8OLjNfsT2qrCwh9YjouI6LbtZ6WM4EF2PGBc8d ZchLXLT78F9+iRjgp+6GlSRd4RxJqE6Kj59YqXc8Ex9pT+OfZI3gm1z9q3CCc0+TTDC0 B6smDGYcSJOZ1WCrBnc6OmGivsRgYRpuymSiwmainQE7UU7M6KXE5Q83TJxoh3LUZszH RykA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718697333; x=1719302133; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X/iQ5rHKQ6Qq2bKKIszSJByGXybAQV0e6TYGSJ5WwuU=; b=tInCwwk3AwhlGk2myIKUUNhYplIUp4OQNsTcpmlTaghHUtUk7aWiIRRLjlmyvGLxRY vS8h0ioR35+SvKSWIrVjc0hRkmDC2uNTBGPrFl862ejjHuBV1ofMJjxg+B9JzOpWTC9z wqAmefzmEe1NE237ZKnQAixZ5LJ7Qw/+iFk2z5UXyDNLQqEVhS4+Q3PzpLhMaZqrJU0c GaBmpZawaBXbP0/S2cRzaHHg/nr/B8CQ+0Iy0HkGSb7jdMDpmgOC/ioir8BFGS2cANv9 R/s4df72O5QMWCwVoyJKzvf3Wa8BpBOZTeWyZO1WCOc+qWbHSe7536ArSccnuJebZwNO MSKg== X-Forwarded-Encrypted: i=1; AJvYcCWrrhTHBaOwhm8dkbipzIklNeSFF3FgNiiY5uwzsGVcC/43pBkxD2Q0nXRS3euhP4nruC0IhjqW1U4jsxHarqeLO3roSg== X-Gm-Message-State: AOJu0YwHmEBjiJVX4eV++Cyg0qCY0mvT/ngggZn5drZtzErbMuXHmPOo lX6ilOfHhZYHUCjOGs7nU8LN14DIKS3aG8hHMgLdhnyX6I1gAJ+LR4O2V04XpRQ= X-Received: by 2002:adf:f646:0:b0:35f:209e:21be with SMTP id ffacd0b85a97d-3607a747550mr7428576f8f.1.1718697333266; Tue, 18 Jun 2024 00:55:33 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750934a4sm13523173f8f.10.2024.06.18.00.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:55:32 -0700 (PDT) From: Neil Armstrong Date: Tue, 18 Jun 2024 09:55:27 +0200 Subject: [PATCH 3/5] phy: meson-gxl-usb2: remove phy_meson_gxl_usb2_set_mode MIME-Version: 1.0 Message-Id: <20240618-u-boot-usb-gxl-phy-set-mode-v1-3-6b41efa46e35@linaro.org> References: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> In-Reply-To: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3507; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=3hRKRk6rCcuBEMaskR4Fabd3ekP9rmERjxPgzCepr+I=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmcT1xv5HZWG6Uy+enJg8x+wOL8NpmfHTDt57dm+04 CUtvl/+JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnE9cQAKCRB33NvayMhJ0d/+D/ oCzgBETPsi7H7UNs7Sinscau3l3wA8BQSamxQluuUKfiqnkdulcIQgVZIGMGe3eWjwjxzKk+Sh4DoT V4luk4LGpZeU06342w6pssgExOfBHm6BZwo9F6+L6JYZWi4se7hUkXRou3AnDbhV8EOos4CnPn75L4 PZqYpGjZhILK8URoiWd8YsvwLAVYJfbMV7cGV3/qjg3a40XoxXxowwCs9HxdMKjq4CkAWqs65FGszN iPiHDmjIUsijBzGf+BxICg8iXutYcjOEef9BiGPJLfSnA5Wy/4+cpfiioFj3Ay65MzzUcM2wxeszxE GAAzlqiJLhRfHAtoZGWiEFYgVaRacMz/RJn8/f5/qKtnUuYhkuybJ0uVTH9dNvNvsyGYVZQI0cS937 bAk5Q0eY6ZfNxrSe/WH68tv31EHt4o1sb+ZK4ZFMRmp82buc3+UgTAxqpwJTO5mE2wK9s24ZnmpC1o Zis+ZfpjJY7ke40yvoMMpbRMdqb52m6gKHD+yY1ANIC91CzYdFTWDqonImZ6bu4j7QcbrP4qSdS9n0 cwj2GIObCARPkGxwHJbSKfZjDGx145nmuvryy/Jf56xcs0tU8gmASzisQ+5X3rSVZDpJk4mYJ33go1 65kR3lhxSavrhg3SHeu4tIooWH6gEsLNDi4xJIsXs97bNkmDH3RB+92JLxhg== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Remove the public phy_meson_gxl_usb2_set_mode and move the implementation in the the set_mode callback. Signed-off-by: Neil Armstrong --- arch/arm/include/asm/arch-meson/usb-gx.h | 3 --- drivers/phy/meson-gxl-usb2.c | 45 ++++++++++---------------------- 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/usb-gx.h b/arch/arm/include/asm/arch-meson/usb-gx.h index 61f1809df9..966d401730 100644 --- a/arch/arm/include/asm/arch-meson/usb-gx.h +++ b/arch/arm/include/asm/arch-meson/usb-gx.h @@ -9,9 +9,6 @@ #include #include -/* TOFIX add set_mode to struct phy_ops */ -void phy_meson_gxl_usb2_set_mode(struct phy *phy, enum usb_dr_mode mode); - int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode); #endif diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c index e051e66224..140e936b47 100644 --- a/drivers/phy/meson-gxl-usb2.c +++ b/drivers/phy/meson-gxl-usb2.c @@ -19,8 +19,6 @@ #include #include -#include - #include #include @@ -121,54 +119,39 @@ static void phy_meson_gxl_usb2_reset(struct phy_meson_gxl_usb2_priv *priv) udelay(RESET_COMPLETE_TIME); } -void phy_meson_gxl_usb2_set_mode(struct phy *phy, enum usb_dr_mode mode) +static int phy_meson_gxl_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode) { struct udevice *dev = phy->dev; struct phy_meson_gxl_usb2_priv *priv = dev_get_priv(dev); uint val; + if (submode) + return -EOPNOTSUPP; + regmap_read(priv->regmap, U2P_R0, &val); switch (mode) { - case USB_DR_MODE_UNKNOWN: - case USB_DR_MODE_HOST: - case USB_DR_MODE_OTG: - val |= U2P_R0_DM_PULLDOWN; - val |= U2P_R0_DP_PULLDOWN; - val &= ~U2P_R0_ID_PULLUP; - break; - - case USB_DR_MODE_PERIPHERAL: + case PHY_MODE_USB_DEVICE: val &= ~U2P_R0_DM_PULLDOWN; val &= ~U2P_R0_DP_PULLDOWN; val |= U2P_R0_ID_PULLUP; break; - } - - regmap_write(priv->regmap, U2P_R0, val); - - phy_meson_gxl_usb2_reset(priv); -} - -static int _phy_meson_gxl_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode) -{ - if (submode) - return -EOPNOTSUPP; - - switch (mode) { - case PHY_MODE_USB_DEVICE: - phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_PERIPHERAL); - break; case PHY_MODE_USB_HOST: case PHY_MODE_USB_OTG: - phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST); + val |= U2P_R0_DM_PULLDOWN; + val |= U2P_R0_DP_PULLDOWN; + val &= ~U2P_R0_ID_PULLUP; break; default: return -EINVAL; } + regmap_write(priv->regmap, U2P_R0, val); + + phy_meson_gxl_usb2_reset(priv); + return 0; } @@ -183,7 +166,7 @@ static int phy_meson_gxl_usb2_power_on(struct phy *phy) val &= ~U2P_R0_POWER_ON_RESET; regmap_write(priv->regmap, U2P_R0, val); - _phy_meson_gxl_usb2_set_mode(phy, PHY_MODE_USB_HOST, 0); + phy_meson_gxl_usb2_set_mode(phy, PHY_MODE_USB_HOST, 0); return 0; } @@ -205,7 +188,7 @@ static int phy_meson_gxl_usb2_power_off(struct phy *phy) struct phy_ops meson_gxl_usb2_phy_ops = { .power_on = phy_meson_gxl_usb2_power_on, .power_off = phy_meson_gxl_usb2_power_off, - .set_mode = _phy_meson_gxl_usb2_set_mode, + .set_mode = phy_meson_gxl_usb2_set_mode, }; int meson_gxl_usb2_phy_probe(struct udevice *dev) From patchwork Tue Jun 18 07:55:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805200 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp80522wrx; Tue, 18 Jun 2024 00:56:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXNee242XR01SLiJg/IYbR0O0atSR3l9GHuWxze/kd4Me4dJyT6yJEstq2S/XziMGtCt0pptIVsoCpQnDQ1mfwD X-Google-Smtp-Source: AGHT+IHdFSjBYpc+6gGKzaE2r9c0CB0YR182F235ZzdBlhm8zU54IoT/lsKTjHFr1gW5saOzBE/a X-Received: by 2002:a17:906:16ca:b0:a6f:1b5b:2acb with SMTP id a640c23a62f3a-a6f60dc1f3bmr647756166b.59.1718697386128; Tue, 18 Jun 2024 00:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718697386; cv=none; d=google.com; s=arc-20160816; b=rsxvJo9Lzr36pEqA/IkVQOHAJVNjVdxcigYm6yD+d2m1R39RV1/AxR5GCY/ZOU0tbY aJ6ETtX7v827Xvy1894eD4QYwoLy5oR9Xu4xcLAdGyPD6vjKh2gFne4aYrEBmFSGuw5A X8OG75ZdqxQjaKfK3RKhvI/fFSrOub1ATXGwDOSGuZ8XKQcHCJ+/eBmvMnWvvI0lO5lh o+1K6Lrc5DAYC6/gaO5qK17vFyGzcK+sKGYmG2yTWud7yjroarH2iGmEzsRMS4gm0GJp CY4wGAzn22XjUnodyYQ0vYGEeUAV6BbjkirJd/yuU4svoMeZVd4b2/RNAIGrhGd0JEcM VBnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=tQPN6Jt2rsPTvACxaljaQFZ6kE1AmkZWw/yLHFwcX74=; fh=8dn2Ja9ldl2T7j+iX8LffYmlurul8cR++7Xu9/k+KfI=; b=G/9KXqZFBGd3aABdupuIsuWqbHti4Yz0eR12czSvZr8I0BkM1eq8PCOHNqvPRx2dlG KkCeIJ/cz0guSWsxajN8ArjtY/lpJ3g2DwVcWIvys9adew1EVa6f04njaO7GQjgmMWl0 7KGGrwaATsuvUrW5Md3GT8xw2OkMb/AixI7zmksoBKZ2IigL4Ln5654D9dUVhg8ERETS 6FmquWxHjFgkEQlzJ+tdp48PhZwJbsHpULAFKGyzRcOod9EB7FH2u+TAKJdfYrXsd1BY 2ARPn4/ovqCC5EN29I74CE2t3gM08P1ANRt8lLpt1N2rTXCpBG0HORU6/UuAxqRZMxUn RhBw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PASuGFRk; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56df4ed5si500024766b.496.2024.06.18.00.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:56:26 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PASuGFRk; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8479B8851D; Tue, 18 Jun 2024 09:55:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="PASuGFRk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4DB48851D; Tue, 18 Jun 2024 09:55:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8129688519 for ; Tue, 18 Jun 2024 09:55:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-35f1bc2ab37so4606464f8f.1 for ; Tue, 18 Jun 2024 00:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718697334; x=1719302134; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=tQPN6Jt2rsPTvACxaljaQFZ6kE1AmkZWw/yLHFwcX74=; b=PASuGFRkclPjIhIZyb90vl3IJCNB+q+EpfYNWjCede8woDedCNJDfjYK8sHxkOcFgD B1X+nIWxJaAoy90BvRQwhd5/r1LNsuc0y5utWUVgOtrgbVh9A9THhJYDxSamOp7edAQE 4ATs36tPEdgUP5kdjUisI58ZIpoND1KtdhF0PAIZxpeUO9bTcdzCbayG4XuHfaoATrCw ofTOrG48DA8jo9D3WHTP1VK+dlAJ6wtRSz4TAQbQmgnEkNAsbzAWbql9NY+F9kk5fMTK wdQpWnslal5Y3/VAtDaoKGq8sDUXw+ws1m8sC4696SUx59YH77VXLFhAzKtwu8iKs3LR mnqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718697334; x=1719302134; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tQPN6Jt2rsPTvACxaljaQFZ6kE1AmkZWw/yLHFwcX74=; b=pMShqqR0IMu9PGTLPE8MTY41LmblQSrv+WuAgDdNWP9amGuuMw/s2YwnUXOIOayxL0 gfzymyu3A0LaY3XEXZwh3VTWUw1PjnDsBe4jXuglB+CG4QeuIpAK2xmQBPid3lGoJHXD iSEmUvy8EaxYxQh1PjGZwVmP87wqxCLn8Trbs7lBIXx9DzBMdh5txzujfxkruEIdVMTL afLJasR5lsIT7UB+s0iLOQ0llOGYs0tJ1i4b0VXMIWoMvqBKysYH+WQWG93NFFCO1soB RBTgFwsYqlG587QzdeAPqSHQ9AXbGDWljP8kqFEoAZgGmrP9NtPJtEHqqSP9iQ1rmLWU K5hw== X-Forwarded-Encrypted: i=1; AJvYcCW+eV0YhCjFIqdn2YXhJJp5xfC6DmODNBVhpL2Vu8aBtHsyFC50GhMg7/B7ty0SvWdg4MQmzYyz3j0gf1eBcOC7dH3tRw== X-Gm-Message-State: AOJu0YwfVsZpcZ/VA4HCPZW+3BgsrsKqRNsS5uFc47wql4wrU3kcGK3S HTtBp14SilGp6TY5FGctBE8eLn0hcVHpOO/2zZRBrTQ1cZB3sDN7G5V8ivAIM9E= X-Received: by 2002:a5d:58d3:0:b0:362:6cb3:c428 with SMTP id ffacd0b85a97d-3626cb3c4cdmr288295f8f.68.1718697334004; Tue, 18 Jun 2024 00:55:34 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750934a4sm13523173f8f.10.2024.06.18.00.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:55:33 -0700 (PDT) From: Neil Armstrong Date: Tue, 18 Jun 2024 09:55:28 +0200 Subject: [PATCH 4/5] usb: dwc3: meson-gxl: drop usb-gx.h and make dwc3_meson_gxl_force_mode static MIME-Version: 1.0 Message-Id: <20240618-u-boot-usb-gxl-phy-set-mode-v1-4-6b41efa46e35@linaro.org> References: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> In-Reply-To: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1663; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=DpgZRKTgku+ys6NjVBIfERJR/6XmLyfT3EDY9DcHj8U=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmcT1xoNuGVCdBygwOmAF3sQEiV3hiSjCtFJyNz7hp gQabkZqJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnE9cQAKCRB33NvayMhJ0SaHEA CnPOY27LW8x/hL8/uPEsdYxaLJB5WcD8JkrAVNWR6/RiI6djALcfx51kRwyHMlWFVPslA6Yl0M6WKY mZQuOUX84uBbV5kTw9qhXd/FxApnvblZTawlmwl1gEQslSRYF9gexakvFDEPzsFpEheL1fqJhzL7Lg q5euNrgfd96JTLoHX5TXR6vWnmIjIKSm7KvKfjD6TJMDdMb/aNs1lrAeasldhJtwahBU39atx6i2d4 7JU6Q+TpgTQDvhjhHh2wKsDG7HhKB3vbFmSJ/78h+HaQ3op6eC4RQTF1pyEgTDfhaGaxGcMN7JwzGh kzZS7M5i6WdikOe+PQ6Gq9/a0ze5a5DJrubNLtDId8uxWHv/NzWPnLQhxoRYHUjqO3ZV3FrA5ZOHdC 03PW1in3jXDksmuZvyeE5lFkXDwKusL8Hpky/cDTFaXdBy4Byt00VkLIi7Msun4SLBW/xNT1bN4moW x/PP9FQ4XR36t88ZLDSHQgISbLuZsw7vTfAV1Tfqey09m6WHWd08rnRVe5B3eIQcotQ9dDXsO+oNPS fHNCPMBHK3xwrqZ0fnPBpbbCS2lh0Q2RC40TLQ8LMM2gAM0wQbM1h6p884NZKdFuuNRJNxq1sa689B b6xTAqXKRk4ijoQYalNEH7uIzQQUXhm9qaocINWg6g1NCjIQXSB+BdxLbgkA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Drop this useless usb-gx.h and now make dwc3_meson_gxl_force_mode static since only used in the dwc3-meson-gxl.c file. Signed-off-by: Neil Armstrong --- arch/arm/include/asm/arch-meson/usb-gx.h | 14 -------------- drivers/usb/dwc3/dwc3-meson-gxl.c | 3 +-- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/usb-gx.h b/arch/arm/include/asm/arch-meson/usb-gx.h deleted file mode 100644 index 966d401730..0000000000 --- a/arch/arm/include/asm/arch-meson/usb-gx.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2019 BayLibre SAS - * Author: Neil Armstrong - */ -#ifndef _ARCH_MESON_USB_GX_H_ -#define _ARCH_MESON_USB_GX_H_ - -#include -#include - -int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode); - -#endif diff --git a/drivers/usb/dwc3/dwc3-meson-gxl.c b/drivers/usb/dwc3/dwc3-meson-gxl.c index 290ac03a37..5fb9b477ad 100644 --- a/drivers/usb/dwc3/dwc3-meson-gxl.c +++ b/drivers/usb/dwc3/dwc3-meson-gxl.c @@ -26,7 +26,6 @@ #include #include #include -#include /* USB Glue Control Registers */ @@ -193,7 +192,7 @@ static int dwc3_meson_gxl_usb_init(struct dwc3_meson_gxl *priv) return 0; } -int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode) +static int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode) { struct dwc3_meson_gxl *priv = dev_get_plat(dev); From patchwork Tue Jun 18 07:55:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805202 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp80693wrx; Tue, 18 Jun 2024 00:57:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUuksT3su8jcJOkOZnJMsEgOAce7m+PMzbGXWNVjQRxYeZVswhmM1XWEua16KPRio+FRoP3utqoP6u3mB3O4ynv X-Google-Smtp-Source: AGHT+IGpEvDmdFQy7izhREIaz3r4IRZGmRpPnxcFKPIhC42XLuK07kyayVXZkNbHKVc/VCFHG9vs X-Received: by 2002:a17:906:b890:b0:a6f:1166:1b86 with SMTP id a640c23a62f3a-a6f60dc7fccmr771073666b.53.1718697433623; Tue, 18 Jun 2024 00:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718697433; cv=none; d=google.com; s=arc-20160816; b=VynZsMZiZS6JCg/i2CpaGuvfUpj3yuKoarA38V5stK0DAtMJWOeubOA8n3fxre5/pw xdyMJvqMnuHUm8oi/VZlee+OCiX/N5L9+KCjZsp41NTn4vm5C72zwptMvy1cVUgIaG31 sWnofE41uFdLQUOlgvTNbjhI24Zu+OezwJ6gBi161b+IEPxZElzoFxV2I+4mEd6vOKIX rC8h7HAxELouwLa1pwXI4asstPxq1iMBYSbS4NtrNJtdumRpT/dzsXa/CFlw/aun4J6g +ANfMaa1lL24lyaQ0WjEoZtZlrZdRXZMU7BYomBgWTIOEzD5NJL3zUkAKm48uzeIIk2L dWhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=RTli4tgWHlPQpIu9XQZ3uNdUE/50JrdH1m+AlYJrngI=; fh=zvJoKID7+I9JTTaq6l9uN9N3QvlDMt0nxZ2059QwBn8=; b=TBhBmf8lKx2tzoRhIQ5RStBtFqaYCRzWghd3kep0RZMY+z3xq6Re+2vuaQZlx9WfZr UWrSrdEo0c88bZ9PudaE1+VoHN1uGknFnIZvfAa8Qm02TYB/6rjsPfn3siUJer/RI6bY Xjws3EDCwrmd8MjDB6ad8qTCzomMnEF/mfZh0NM7Qgj8RZY3aIZcJrKUcMhQhlR9bz5l 76IhGHpcotSb6JWClOPVJEnXV/bTa4UYOcK8OAYZsW5OuBFqpiYXwo6XYfQ2wx/2wTvM d1Y7R+ramG5pi+4WSnjv6kz3x97sThOIqZaPUNVi0s4XIuIULh7ByCnusCAPhCGJ/YEy uBMw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YGxDsr+h; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f88c53257si159808966b.151.2024.06.18.00.57.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:57:13 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YGxDsr+h; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3918B88538; Tue, 18 Jun 2024 09:55:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="YGxDsr+h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9F4A88431; Tue, 18 Jun 2024 09:55:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 500A38851E for ; Tue, 18 Jun 2024 09:55:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-421bb51d81aso39044015e9.3 for ; Tue, 18 Jun 2024 00:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718697335; x=1719302135; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RTli4tgWHlPQpIu9XQZ3uNdUE/50JrdH1m+AlYJrngI=; b=YGxDsr+h+Q6k65UFHST2RMp3Y5V2a1aI4vA1PabpfuaOgzMxpKIU6eWnMjZiJW2Kkf WUXN31kZFehVXwHm5V1DFG28PmrON+2ysODpnf9rJP4wHGIBPtZMkqcUCDbN4Xax4MQO LIYH8rejgfHuWpLaA1MQXPGtc74CrJUusNFv8mP/aebwE9EoJgqkfq0aQf3Vn6XyC4wp qZh8pBalEDzBf8Ru1cH7mqCnnImZRrecP0ayBruKkIA8x/xtULxVXlQft/ebTMBuA7Mb poI3CbGdqKYGR+IOL6eveGzyWo5TTYuCGaKrTEsvL1gQ7uxkxuAr5kV6xnM6zZG4A7Ez xnrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718697335; x=1719302135; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RTli4tgWHlPQpIu9XQZ3uNdUE/50JrdH1m+AlYJrngI=; b=DLFCy2P+zOgCA90VyhhFamCRcKfbobizqgYiotwQsj65hmYNUpXHFJAw5BCJ15dW7H 7WLFD5IFlDg/KMTQyiXett/F04c/6RxwlW2a7XHUpOkTk45MVrhXf63TFftPqOoNvN0t /YkuneDsJr+HJPBMkS2g3Yr6Q2WruTms/MQH2bLeb2tjBb7AHPjkxlppasuz0L+FSTHU aHMnxM55sQa2bIhVqVvZAWSLHpokdcuQj/vysHu9Ezt0nB9T52OaKkYD/8cY4/VPHiwD M3ZLGzGzcn/ciJN0BmydpnvmcCy8rVFqaSK0ptrawlrFuvqWVUG1+x86VIcvql+6rQTe igBQ== X-Forwarded-Encrypted: i=1; AJvYcCWUwU+y5f0P90pkF+AxGkImPLPavFNch2r+YTaDzoIMMPS4J3WkY0BXB7XwEfnBrM0859KWarJaXiQLcxZ3AAWEb/hP0Q== X-Gm-Message-State: AOJu0Yy8hzNK1J0KtxX8TVwBs0BZ3FnC2XhxNJ+s5Xt1V6rjv28mFseV Fo1RKhCvkTgsAfm1NyfHLfHtg8w1TIzGxTrtRJpMXndEkqhb8R01gU61fOEQq9UUNUYJOjvdgEL eEBw= X-Received: by 2002:a05:600c:4213:b0:421:8188:d394 with SMTP id 5b1f17b1804b1-42304827504mr96861035e9.12.1718697334722; Tue, 18 Jun 2024 00:55:34 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750934a4sm13523173f8f.10.2024.06.18.00.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 00:55:34 -0700 (PDT) From: Neil Armstrong Date: Tue, 18 Jun 2024 09:55:29 +0200 Subject: [PATCH 5/5] usb: dwc3: meson-g12a: drop usb.h and make dwc3_meson_g12a_force_mode static MIME-Version: 1.0 Message-Id: <20240618-u-boot-usb-gxl-phy-set-mode-v1-5-6b41efa46e35@linaro.org> References: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> In-Reply-To: <20240618-u-boot-usb-gxl-phy-set-mode-v1-0-6b41efa46e35@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1436; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=PPsS7D8TEBBrAwE0wIAH2nzaqsk2E8ByOhmeHE8CZe0=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmcT1xcC3qXrhLwUmGIga3U/hl9c9wRXnwaefc1Gv3 uhiBmLSJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnE9cQAKCRB33NvayMhJ0aLAD/ 9Fpl0hd9IOOyEtmNP8iTqTKddD3QniFiZsTNQt+83sj+OZgAZfb21yaiydD357FC5Dd+Sr7TrWyChC mG3bQG/Nn4quioVjmmAANjV6pTv4yRavTt8UhXxLCB8WsKFqIy2D+BR7+lT4amYOc/fiYsvppBcN/L pYQUk/roMFEEuHC5aEDuai9icGOPxXxEcfhRUcu0UpiLWlpLbaT2GcYGz/rPEV6dP6SYFZAZpcojTX QTUhaAC/Ew4L/ENGaqeVhK7W4JISrrd4rK07C5pJicfxYLGnhGRCsz4GzDh3DD6GApgghgGhDgWUxz 0/MIrtqqTXbyXQimKuLKIPiJn6frbNIYoTlCANJ9fvEi2tadBMQI4tTbH+X1sSgJQiLRYoJ1aXTN2q y1Pi4eps694P2DFWLNA/GwPaHJ57rldoj5s1vmT+53lamXXea9H3OR6ucXDnQjID8nNxylYeUbqaZt CtAAq1HDdF4+yMWpkUDL0YGBKEHAQlwZD9fouQiOmifEAm/B6w1AFMRWJZhRWd+rA4TQdMRNXEQpsv iRRq9Cugnnibtr22jNacJuOR/J4qqZyhrD+4zZErWgeCx5oHdsM8pd2cA7l6fJhFJAzES5NCfGxiuD Mg/w+rmSpTa2uJtooHjDs4axd/oKnFFpqmUFVkuh6yh3IZ7L6t/4dWF1PzVw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Drop this useless usb.h and now make dwc3_meson_g12a_force_mode static since only used in the dwc3-meson-g12a.c file. Signed-off-by: Neil Armstrong --- arch/arm/include/asm/arch-meson/usb.h | 12 ------------ drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/usb.h b/arch/arm/include/asm/arch-meson/usb.h deleted file mode 100644 index b794b5ce77..0000000000 --- a/arch/arm/include/asm/arch-meson/usb.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 BayLibre, SAS - * Author: Neil Armstrong - */ - -#ifndef __MESON_USB_H__ -#define __MESON_USB_H__ - -int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode); - -#endif /* __MESON_USB_H__ */ diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 21e4f637bb..41d15996e5 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -270,7 +270,7 @@ static int dwc3_meson_g12a_usb_init(struct dwc3_meson_g12a *priv) return 0; } -int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode) +static int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode) { struct dwc3_meson_g12a *priv = dev_get_plat(dev);