From patchwork Wed Feb 14 09:46:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 200883 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1099706dyb; Wed, 14 Feb 2024 01:49:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVsq/i2smdOzfev2XcybvMPqkyxmqw8Yhsrp3msG5KFu6QozVqZY8ZaEM73oxB0ZVTgm2041qHmEDRLKKjJILWv6KHsVQ== X-Google-Smtp-Source: AGHT+IEi2zldVMyA11Xx8e/kX+HPadgaS/N8BEDV7R5GyQerXXXYrNsjT6BK4PlmfRfXH5IhsizK X-Received: by 2002:a17:906:7117:b0:a3d:1799:8acb with SMTP id x23-20020a170906711700b00a3d17998acbmr1268824ejj.62.1707904148358; Wed, 14 Feb 2024 01:49:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707904148; cv=pass; d=google.com; s=arc-20160816; b=F0dxoLspbjlV8m9tBTJtVt58OFnRrz/pUQLiXB/RjRXmKfXo+CzmxZ5koXSA7miCSm 3YyvvgWg440pkTToE2AqJytPqpgkptLMtoj/aoICA9LDu15oqirx00jsqFrNncDJJoJ0 uobKiBNMfSioWTPz0Itlq3ZpUmieVSAZY6AUdZM4jdvAudH0UDLPdju2ySK8sJwIWpH7 2aXRBzDF+5ILUA8+6HI4LILOm5nnRWnBQfUJ0HUa5iCWivx0nybTx1/y5w9UlDfXy0Vx 7p4Hs0I9LorQREqPM+BzsYZuiW1XSFbM26/ls4z7DyrwzDtJNAvdBajfkceFWBmImkiJ 0JLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=ANGrH7BFDeGpiBawrK0MIha5MhPsO/ORjSXsyXHBys0=; fh=6Vu6ucl1oxrpgqvRWXrC14gZpJniR0QLgAyTQXn+qX0=; b=H3bFW47YhZjiZDsfT46TgUUaLDzTSnLTnf5JZMWp0naC/OJcz0QTZiIoQVWXZ2MzT1 S9jbvH9UEsGVRz3BtrS1Sd4tPUMczObtSzgKDhxo+/6al/0vdp6SF5/lnqDkpE1ndTou LbTevRXdQnie6FvjCgDI/am1qIA222Z7D1OYCdp3zCAkE8LUMpe0MPAU0t+xuNUw+mT5 YT3UdIT8UmPlamZZJT+gaKlDueasJ6DmuWfqr4NLr0LYLJSZzuz3s0s8eojW56K4RtbR dmPxtYPlmxu0I2Sir1jaAu8Tmk33khUOPbmN+gsPudY5fKNowNymu1ojislBps0cR7Qw hrLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bKjmJTUQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65000-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65000-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWXYa58S6oLYHDvHQy9EdeD3Q+8ElAUZMO7K1Zy4kj4uZ/prYd3l9+u9P+IB14S+qVzOhsjtmrURVQjuotS0O8EFu/Uew== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p17-20020a17090628d100b00a3c40c64899si2047186ejd.847.2024.02.14.01.49.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 01:49:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65000-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bKjmJTUQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65000-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65000-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F131B1F22F14 for ; Wed, 14 Feb 2024 09:49:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2E5E1759D; Wed, 14 Feb 2024 09:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bKjmJTUQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23150168D9; Wed, 14 Feb 2024 09:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904110; cv=none; b=SFBnDTIdH3pDuAAg65K3HrTfYqP+wm19uwc7+fSLpsKGLiuVhYpUywaFV/R6AlgcgJ3a6j49bcJopM/I8O6qKsk6B1FG8/s8A2/ySh6sHkrP4i/y7CeDjFXXPcQOeoCL+yViI8xdqZXSEvaHUm1LY7RZLRn+8biE1orscyRY4fw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904110; c=relaxed/simple; bh=+YQjj12fvrN7EjejQqd3eEjgJcWm5h707zbaTCa9ejU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ajPFk7snkWzm4NEUqh+2Arg8p+uqq7jwbnJ9LtDd/GDEoUO/S3xC1MqVCuIT0Q+/VJEn7zoNWMo1gv4IrRC6PChmBJ3NrG0WCqhiMMJBMzolZ6sz2E5G0FhH3TLchEarUdrVq2NmQy+l+mItzkNpWGS/5Ifdwqomsh/8nh1VrdQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bKjmJTUQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFFB8C43394; Wed, 14 Feb 2024 09:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707904110; bh=+YQjj12fvrN7EjejQqd3eEjgJcWm5h707zbaTCa9ejU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=bKjmJTUQj2yBIN2wpUGr14Yr6l0OUDmUSV8BPyGagMMqITK75ZRI/L4M0OWxneqe+ B1bjStVSwuHQKGyN6zj1JMlVsXPmcuk94z8Moli5VgK83vpms+JUt74IMJmbJCf5uo RBMDEv8o7I3h6Ot5OkNgLxVchHYguAjlxYl5v1mTW+R1bQs02jAPYlz4Q/8H4MM97n ijF/gOHMaGObKSnURWyf4vBjfV+7UnfRCGShM0EVIIfY1HKJnMXDB8TM8YMrRNw4/H q0eMuM3Hyt8S5uZ4Ra5Rs4cFIfwNaDtblleUvTMPshOng+4NDTxFpn1nHRgmTx5YAL 8+DIS37FicCfQ== From: Roger Quadros Date: Wed, 14 Feb 2024 11:46:45 +0200 Subject: [PATCH v3 1/5] usb: dwc3-am62: call of_platform_depopulate in .remove() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240214-for-v6-9-am62-usb-errata-3-0-v3-1-147ec5eae18c@kernel.org> References: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> In-Reply-To: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> To: Thinh Nguyen , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: nm@ti.com, r-gunasekaran@ti.com, afd@ti.com, b-liu@ti.com, srk@ti.com, francesco@dolcini.it, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1353; i=rogerq@kernel.org; h=from:subject:message-id; bh=+YQjj12fvrN7EjejQqd3eEjgJcWm5h707zbaTCa9ejU=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBlzIxm/mKZq8OtOjZItcAd8wThW9h0JFYQc7raM yf82a5YMiSJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZcyMZgAKCRDSWmvTvnYw k8SPEACEmoUKIWlvznsye4hkR7g9jVgwtch++eLoryntJwaU3XU6RhkzquPaZr/dKLparniV2ON 0tjnxNu/KtJXw+HbNbtYRskkO9FfXTHQK4n80LmicbxNM7c8BsYyUAHxuc5NdNuGUduQw6Py+jO iPGQGc0n7Id1qYQ12lT6WCDq8XV/eAldvo5ovEx1FLSW3Axilp2Z00nrviSIm2kh1T6Gm8bih98 Bsu8OFgzJTOkMmsXf2o1w/UcyVK+2GSJgW87ccabJSzlH/aAg4rENXhmyJuLDF2v0kOtiHTjF3+ UsYrcrdHQdD0UIif4BPlAHsXGYwu1ZbnqeUOeHm0WiEUHMNu19Mr4jngVQbVaijhGFFfWVMnGRN aZUQmPKtLHiq9lxIlETSmnNHXmx3e63X1nwQuv2wAz/9MoQuqiMYtk+9fKD1bmPK4vWw3FNi3IB BP7igbzLcGc7lfJuayfRC0itrRoJCfHY9ovPUtUeFNLgjllr86WB/CH+9jA10C3U4MArTZFkyg0 CsXBgsB40hAg7m/3iRIsmw/8PmyhcZHLa3HLEmz4uuODi4EJJTm5mbetHBJePv3weM7jLci1Fkv ADdu/aHUDcGiiUiXEL4ziWDA0/OrIh7OLfL2mmmIRHmnhuRxUYCpPZ1j0rabcGMq4ufNUKYSCAa k2VVCawk/gknC2Q== X-Developer-Key: i=rogerq@kernel.org; a=openpgp; fpr=412165D44C9F52780FAB1058D25A6BD3BE763093 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790867299936097484 X-GMAIL-MSGID: 1790867299936097484 We called of_platform_populate() in .probe() so call the cleanup function of_platform_depopulate() in .remove(). Get rid of the now unnnecessary dwc3_ti_remove_core(). Signed-off-by: Roger Quadros Acked-by: Thinh Nguyen --- Changelog: v3: no change v2: no change https://lore.kernel.org/all/20240205141221.56076-2-rogerq@kernel.org/ v1: https://lore.kernel.org/all/20240201121220.5523-2-rogerq@kernel.org/ --- drivers/usb/dwc3/dwc3-am62.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index 90a587bc29b7..1bfc9e67614f 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -267,21 +267,13 @@ static int dwc3_ti_probe(struct platform_device *pdev) return ret; } -static int dwc3_ti_remove_core(struct device *dev, void *c) -{ - struct platform_device *pdev = to_platform_device(dev); - - platform_device_unregister(pdev); - return 0; -} - static void dwc3_ti_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct dwc3_am62 *am62 = platform_get_drvdata(pdev); u32 reg; - device_for_each_child(dev, NULL, dwc3_ti_remove_core); + of_platform_depopulate(dev); /* Clear mode valid bit */ reg = dwc3_ti_readl(am62, USBSS_MODE_CONTROL); From patchwork Wed Feb 14 09:46:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 200886 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1108912dyb; Wed, 14 Feb 2024 02:10:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXxna0RjZOe9FwzMCVm+n6GpUaMLVk2YwQtSeMxcb/sJQIVtGCCWpWLWdnHJ++CO348+4747IbevnzQBAPh7rJAn9w9hg== X-Google-Smtp-Source: AGHT+IHoD+//++oAStiLqxRRAQvunfSoMcwSjyou6h83U0lbAAZhvOiyXrJF3PAW2v57+crfBqCh X-Received: by 2002:a05:6358:4196:b0:175:ed25:d44d with SMTP id w22-20020a056358419600b00175ed25d44dmr1345796rwc.9.1707905419676; Wed, 14 Feb 2024 02:10:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707905419; cv=pass; d=google.com; s=arc-20160816; b=oJvY7sVCulpDLHhsN0SR3Jzx66lanXj6vNAV0iRS2/fAH8tD/V51cPt3Kg6TkU3bqi abEeyhTXqp1HaiLwlQ5Pw8vzJzUkZ3MFZG7wc+cWSewPW/XgudKF0UrJA9soGF5Xlmp+ 3ZkXdGY0QqM6GTNYlmV3+pmDwp2NrtuUS1L1xn7HrmriaBpT+Pe9PXM2Ih/DPRpl8lqn XHtL29jlSImk9PrLXk1TRf+Y46LU9Vxhmoz98plMENkYWLzt+xhoYLua9oYRqbDWt+iJ aqOTENs0epwcQ7rCvDGXo+XwtakM1cfeqWmmG81Df+fVdR4ZTm2zdYADeLcP31xKkWYa HlHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=x3FM4+w6d8IdRcffFMvAhI9bbluIC+IS0oo+Jr2rDms=; fh=feOL6xNclXjBt756z5ZmEBFL4DuwpHfZ+9+CPnyYuio=; b=bjk3VpoX7zDrHGNLwNMUSWGgJD8zfhiLqTMXw14Z1njPQX3v3yywE5M2pcG/Gohwgw YJQFwHJM7rFJOrLYpZSfLruC/0QJRe0Qj8egVoFv/u1xE3muyrSRPI0CsUculQb7Pje3 YNTljhQuSU6pNZN0d9B93Y8QScIl0+w7tc3StOitfsKEto3TXV8kXg+Dzi+bcptzQQz3 InBD3RTYpklgwgUqOF9leNht2Q/mOq77dytGvTShMWixp8NYO311ZRJnnmd6td4W+LIq Zb9jQXT9dZWqCuH1rR2i+zycmHz3tMrw5dFaU9UxCGMhQyYW7sfZ0Iu99pVs/WbDCfwx ZAsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c8c+f7gA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65001-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65001-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUk5VWK2/lzZYwHucq7Twm8cV+qBPolZjyqE/yjEf8FyMPsNCVxZ9FZw6SKA2ONYAb7xcDkKFQjneY4z1XILAIhicDrNQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id hq20-20020a056a00681400b006e04e5cdc7csi8164452pfb.306.2024.02.14.02.10.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 02:10:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65001-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c8c+f7gA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65001-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65001-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 63615B239CC for ; Wed, 14 Feb 2024 09:49:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0073182A0; Wed, 14 Feb 2024 09:48:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c8c+f7gA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49FC7134B7; Wed, 14 Feb 2024 09:48:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904114; cv=none; b=Sr3NYNxq3w0poUbjr6FoJVEka2ZB9JlzWo+wR0+VO2a2nC6idHOf+KJlwkmqkxsFbmzAB2E2/1upWfSpWCRHGo+KeyMLySN1x5DC9Ey/hnJURWyPEyEF0ulQWIfFUjzQqhxnjf+2R6/33NCcFlsZy0Gd6IELgnffNqiG+Fd2UgQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904114; c=relaxed/simple; bh=X6q1RJmRQMsVDI4YiUe1YyTnSAgbGDQ417oRLZK4lXI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uWNsOqT3ii+ra9H2TymC8JpFjYGWcX39yDUc+o0CIv7sgbG7M6uC/2anaGgJgSUnGeT6XnQRMZnRgQvm0Us1mPEQfNnPY4yJZWtt6rVZ4i0l3nVkJQoYJATrnPSgIs2IRiwqE8TQTyk8c5hZviF0flWOLccL/F/KSLCdlmBSBS4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c8c+f7gA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73BBEC433C7; Wed, 14 Feb 2024 09:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707904113; bh=X6q1RJmRQMsVDI4YiUe1YyTnSAgbGDQ417oRLZK4lXI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=c8c+f7gAoInFPPuMVB4yAtDaQAsBeQMYAs1JZDObosYWgmk6ShzYpJeNLtasQJkPH 5GZqqFx0ZokEJUKJsNIon6mxzdy8buXVPDmy6gpzo53reFivF1XJMgn3nSYpgZj76L DkJ/DA3Y5g4Wg3ksoLXBz2f/SWar0SCM62zmJnvm9XBbWCrH1IAj300Gx8dh2qh/Ol iMLV3SLaZ5JcsaHjUpmOgOPyX+UkgbQSs3/4bjZZYLqSVtx/tjh99t8ZWIo30RgU6t TaowW00cSEOT9nTSNRjiXati2xRUenFmUqvsXiV0raQYHQjELbxshpOv1WGb/LNN6v XqS6wQxJMvq8A== From: Roger Quadros Date: Wed, 14 Feb 2024 11:46:46 +0200 Subject: [PATCH v3 2/5] usb: dwc3-am62: fix error on module removal Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240214-for-v6-9-am62-usb-errata-3-0-v3-2-147ec5eae18c@kernel.org> References: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> In-Reply-To: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> To: Thinh Nguyen , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: nm@ti.com, r-gunasekaran@ti.com, afd@ti.com, b-liu@ti.com, srk@ti.com, francesco@dolcini.it, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1664; i=rogerq@kernel.org; h=from:subject:message-id; bh=X6q1RJmRQMsVDI4YiUe1YyTnSAgbGDQ417oRLZK4lXI=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBlzIxm+plz9xtRjCi0mKOJqe+jko1TMnexVm8D4 lVjylqMW36JAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZcyMZgAKCRDSWmvTvnYw k7LDD/0aKob4z9hUZeVJF/q1v63kbVkPai6rpB8aVtdKAK7hM2JeVP57ozvkWCIryJJ4I13aV2d cQV/C+ivi4BluDvr+zPm9PtddmGfuF390+KyfwM6BRwwZBag3IKQtPRv14Q/HXTfp6iXgZQvAQI xYWuRBxojnoQDL4i7X5CzdF1XImo/4PymMnZS/BGaAk7aV6o+vL2lZqlYlqJFv6bMLB3AtCIL6x 56Yvxb8lfCrrBaZ455mKCO5kMS9WRw+MoNCJZ6RYGwe97L1rD4foauUK1QzIs9wB6+Tr9NyuHki 92quRgRF+axVYAmA6s0L1bj2nuvEnfCFOBbN0kGuxCM1dTTuyR1ZorR/vKxxQweIew0qWbeKwdE nOHs8UWZhoiVs9DdTsuBcGzdzTVcVPAPkgwxZ8nAmAATCe7+D4RFH2thsKqDVUgW/3EJzyfXlf7 2a6WtfIGgVA897S2A5mvPx0zErxkrYO+E5CEtbYSZe/yIfL626Ajy1ZruMwSJW61dxxHj0v9eD7 pE3Gee2tInjDs2Ag3HMnSPwFbven8qDKuvop0S0nCaDv138wt19ot7D9Z1O7ssSTwmkTtFEs5Lu 0s99/fqcz53OgrH4UOh3crXi9ezqypu3WIYZTAFcnwtzeY6Q/w+ZVQp+aCqdADij0M6VtcQOwRr QGrpEfxBdSIn+Cw== X-Developer-Key: i=rogerq@kernel.org; a=openpgp; fpr=412165D44C9F52780FAB1058D25A6BD3BE763093 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790868633081132929 X-GMAIL-MSGID: 1790868633081132929 As runtime PM is enabled, the module can be runtime suspended when .remove() is called. Do a pm_runtime_get_sync() to make sure module is active before doing any register operations. Doing a pm_runtime_put_sync() should disable the refclk so no need to disable it again. Fixes the below warning at module removel. [ 39.705310] ------------[ cut here ]------------ [ 39.710004] clk:162:3 already disabled [ 39.713941] WARNING: CPU: 0 PID: 921 at drivers/clk/clk.c:1090 clk_core_disable+0xb0/0xb8 Signed-off-by: Roger Quadros Acked-by: Thinh Nguyen --- Changelog: v3: no change v2: no change https://lore.kernel.org/all/20240205141221.56076-3-rogerq@kernel.org/ v1: https://lore.kernel.org/all/20240201121220.5523-3-rogerq@kernel.org/ --- drivers/usb/dwc3/dwc3-am62.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index 1bfc9e67614f..600ba9cfefea 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -273,6 +273,11 @@ static void dwc3_ti_remove(struct platform_device *pdev) struct dwc3_am62 *am62 = platform_get_drvdata(pdev); u32 reg; + pm_runtime_get_sync(dev); + + device_wakeup_disable(dev); + device_set_wakeup_capable(dev, false); + of_platform_depopulate(dev); /* Clear mode valid bit */ @@ -281,7 +286,6 @@ static void dwc3_ti_remove(struct platform_device *pdev) dwc3_ti_writel(am62, USBSS_MODE_CONTROL, reg); pm_runtime_put_sync(dev); - clk_disable_unprepare(am62->usb2_refclk); pm_runtime_disable(dev); pm_runtime_set_suspended(dev); } From patchwork Wed Feb 14 09:46:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 200887 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1109258dyb; Wed, 14 Feb 2024 02:11:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX8q4fXIj4QoU47V+iGvF793uNpvmI8cG5IaOutgP/hr1n3IfGZcLPSMGH2Cn37vp8WbMWN10oH0l7UPKkDDalS5y2p2w== X-Google-Smtp-Source: AGHT+IHt4cvJIpxS6pkz6Yu43trZLVFoRqSdPRVgFUWoMLBt6DCjKCKiDjSb6tdPEpxVzk2Jybia X-Received: by 2002:a05:6a21:3183:b0:19e:425e:ec56 with SMTP id za3-20020a056a21318300b0019e425eec56mr2693413pzb.24.1707905464357; Wed, 14 Feb 2024 02:11:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707905464; cv=pass; d=google.com; s=arc-20160816; b=BsaS7rkqSNvqCZ8reDo12jjhuEtggxZOfX1FaPT/msYuTynG9xKXmQwONT9i2OAG1p HKKXFa1fUqr28DVczsAW+HhOG8Mr+Jj7UyF2YqPwZAidZJBozCtmFTUeReH8iOLTysoY tczDU2bLtf+ThCBSKpiStiqOvKXJNaxInEu6rlq1mQT16D++6ROd6cbvXoRsCvmXoTO6 CAdHjkBa64MdkKg3g68RuEj9V7qr88yG4JQF6sKgK6DQRIMF6WmdCsqr5sDjPRuwskOc 7lCUNjQZh1/T/2gpLdHzJF5fM+tLbD4ss+HoNib3m+aYakMTXe/XKn73f6GDpjqnrHno qaWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=YPE65V8BIV9q92X49mhl8Qj2dvBvl0il542qomjMdF0=; fh=f3lVN78pTvqB5sh9Qi6Ga5Kvgtnz+SdmuYxaUwsWnoM=; b=GQmjH20GBOIAJqVRpS0hg4qbH2j4Wjm25wNHUEBFCmORxy9C7BlRu9eKOWz3fwJjYo cS+bGBSHu4f/vAbdi4hPUfB/tY8L+eIPdd4eCcbKPk+xO0uWvQorhmXcRGgGrjifLhC9 k5Y7wNoZKUqxuE30wYSY159nEoovLe1+ChIvbjCrk3mMEB2PYWSVLILuFT6oftWzlw7Y qBBeUrZ+yW0XflyAbvNOZFmF0avmRBnDNa1+ZR6ICy8W5qozYD1QPs9gUbiEQR9WdNjd B7q7NSn2mQzocXhoutfnmpXqzrPuZ9cDqvcbXyZOdPcxnXJa7fKKi8ghlahVGT/3FctJ 3BQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uDFZgPSb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65003-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65003-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUTXMWVUILY+g3A/JpDMzylMxoTMbRrgWHDZ9InxbKzOH2zFiaXi4y+/DP5m5DJCIjaBt7o9tIx7mxGoWDizaeilyFGDw== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s3-20020a170902ea0300b001d917fa8be8si3621097plg.257.2024.02.14.02.11.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 02:11:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65003-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uDFZgPSb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65003-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65003-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 47007B28708 for ; Wed, 14 Feb 2024 09:50:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0B0812E76; Wed, 14 Feb 2024 09:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uDFZgPSb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 109591863B; Wed, 14 Feb 2024 09:48:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904118; cv=none; b=CNUFq5sPrad3Y2PUNnSdJavFU1NF3q3KphYTMshw1cbhx5xosOLyXmWl7bAn8YraNwSmFXnkKkdmyppYGafMVyw0KHWXXy7vuImESB3Ci8krk7Ib2TzPm7wQu7xstoheWYdEZJUMLrl3KSzhu8shsliqKZiqECSdWJ9YVRYTQNs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904118; c=relaxed/simple; bh=jyYmSrgq2fdCLWgGVgy9+gpU9CJvUIBFv3KADPN8uts=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ql3r20ODy+CPmuHc8cAa1r9FWHk5rvPrYL6Lv2Iq1+9A7Hh02p4buZu0BJhRsTybnl59ZDHj3txgOvB+hQwf3mVCW+jQMu6hBcJaysfOIQNFW3x4c6dNzeyz8tlz0NIYdB+zl0LGAj1Rwz5SZ3L5zTXO2Rh+DKy5dP/gXzqfILA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uDFZgPSb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C2ADC433F1; Wed, 14 Feb 2024 09:48:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707904117; bh=jyYmSrgq2fdCLWgGVgy9+gpU9CJvUIBFv3KADPN8uts=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=uDFZgPSbEm5k3mx27ZY5ed1oi2eB20QMowucxsA2fuwmn1DJSksHdbFFuepBdXCsX 5PIHXC7XHU18sqPjWd18jEv4K5owHIXxdDfduOFEBEwPlM+II+50Svs+h6a9QjKsmS av51FuySmYlWBYAe3TuIui+8AhA/JqkzJ/2iXDDSd+cpkAuIM7A4BuToQTWL6DUTBF Rr/5yj9xk8BANbhc3pylIdEZpcB9c1H405DEcudmJ8UrYm1rhd+zSMHMvL/8prM5t8 RRBTctpLSKAbJGmG6WPHiua/mYL7ggV1yAcPCl3JvR7GVFsA3BCElu4+mkRMDzuMlx mCOIxMvVdRInQ== From: Roger Quadros Date: Wed, 14 Feb 2024 11:46:47 +0200 Subject: [PATCH v3 3/5] usb: dwc3-am62: Fix PHY core voltage selection Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240214-for-v6-9-am62-usb-errata-3-0-v3-3-147ec5eae18c@kernel.org> References: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> In-Reply-To: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> To: Thinh Nguyen , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: nm@ti.com, r-gunasekaran@ti.com, afd@ti.com, b-liu@ti.com, srk@ti.com, francesco@dolcini.it, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1539; i=rogerq@kernel.org; h=from:subject:message-id; bh=jyYmSrgq2fdCLWgGVgy9+gpU9CJvUIBFv3KADPN8uts=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBlzIxmwGvMIw/xVB+Dla8X7O0q+r5a7e6aLKOIM n7hUHxFuRaJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZcyMZgAKCRDSWmvTvnYw k6DKD/0XW5DQ0cDZdTSQd/96rgY16YDvYIGnuBMTDx9gaY0kQTfiZE2xYACRHd4qLW1YaDYFSQI m8g1BVIjKGVrYTS7T8d0cAaNPqw98p/zW+0yIWDdhOWPWtwwjVWcxU7bXdvF3mz6gCyb+xP4F5z OgjkVL5GpBigYsaOM3plHu4+NJbC90P4Kx3NW+G8V6d/6KhmsKVlYTzPh4nVpLKlnYrxBhvOeav eZhPj3E+23aR0aY7+LeWPNIcekDju3xk94f2G/1+NF7d/N18odQdseSGTacfSSKXjZZ+BOf1/Mr 3oV4qn3YVRx7cET9zcgOYC8gKhMTE/4FGkXvDjXjO5xOrzy1AsOtsMASkqtR0fvU00RGnpYGabc sDTJ7Y8f1CjzDtcRCRh4xTmDiCY+E9hxFOqSOQQUjOdzxk+rL8fHwkjC3hE2s2kM4N4wREAyODC XSrDINIu77a6AJ7ryfwN9ALeI64H0ctkoAcemtLB2LLMi1+6k2SpqPGI7T43ly5pES9+6YMIS5P X6ckD7IXnKli6WlxBY01RUfpM0BDOlupxCikMUUHtXQvW7S8slfym+vMJtTvT2BNpVtHV5HfpXi qTr9trE/WF16Ou1YiPsaldxwWDQJ8b24HADaSpTR1QQYQZJ52Id90HW68EFJcbktPH6ZL4JAhwa +KwEdNhrOR4GQ9g== X-Developer-Key: i=rogerq@kernel.org; a=openpgp; fpr=412165D44C9F52780FAB1058D25A6BD3BE763093 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790868680549388146 X-GMAIL-MSGID: 1790868680549388146 TRM information is outdated and design team has confirmed that PHY_CORE_VOLTAGE should be 0 irrespective of VDD_CORE voltage. Signed-off-by: Roger Quadros Acked-by: Thinh Nguyen --- Changelog: v3: no change v2: no change https://lore.kernel.org/all/20240205141221.56076-4-rogerq@kernel.org/ v1: https://lore.kernel.org/all/20240201121220.5523-4-rogerq@kernel.org/ --- drivers/usb/dwc3/dwc3-am62.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index 600ba9cfefea..af1ce934e7fb 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -97,7 +97,8 @@ #define USBSS_VBUS_STAT_SESSVALID BIT(2) #define USBSS_VBUS_STAT_VBUSVALID BIT(0) -/* Mask for PHY PLL REFCLK */ +/* USB_PHY_CTRL register bits in CTRL_MMR */ +#define PHY_CORE_VOLTAGE_MASK BIT(31) #define PHY_PLL_REFCLK_MASK GENMASK(3, 0) #define DWC3_AM62_AUTOSUSPEND_DELAY 100 @@ -162,6 +163,13 @@ static int phy_syscon_pll_refclk(struct dwc3_am62 *am62) am62->offset = args.args[0]; + /* Core voltage. PHY_CORE_VOLTAGE bit Recommended to be 0 always */ + ret = regmap_update_bits(am62->syscon, am62->offset, PHY_CORE_VOLTAGE_MASK, 0); + if (ret) { + dev_err(dev, "failed to set phy core voltage\n"); + return ret; + } + ret = regmap_update_bits(am62->syscon, am62->offset, PHY_PLL_REFCLK_MASK, am62->rate_code); if (ret) { dev_err(dev, "failed to set phy pll reference clock rate\n"); From patchwork Wed Feb 14 09:46:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 200885 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1100411dyb; Wed, 14 Feb 2024 01:51:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXQJikcNkC7COfwNje8pRKp0kIvPj0rijvVzywhZwN//JWssBDG21XYOY0/BGPo2+fTRH4n8YTrMc/1HvNjdcLq8i71UA== X-Google-Smtp-Source: AGHT+IHsXrRXS7TFsifpZtMv5XhFKp3Qc5g2/fj7sLOPJFux+7VzVpGV3Ms2zLkBUB0JAyT/DpqO X-Received: by 2002:a05:620a:1a0e:b0:785:a2ac:a50c with SMTP id bk14-20020a05620a1a0e00b00785a2aca50cmr2921124qkb.54.1707904273563; Wed, 14 Feb 2024 01:51:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707904273; cv=pass; d=google.com; s=arc-20160816; b=Aax/A3sxoTLhqeeBdPBNDXgMfDQZdCe4h8muvy3EkWRo9Msu957LMM4y4UOQ16VrFX 26+MGY1SSb/6JyO+ZH7fupzTY8S1Aef6RaDk0i/Rajbtff4RIQNXB5yJBcePUFA6g381 rPnUHjMqkL/l5O3C+fBCAFXOWXEledSseGm7DUf+/EItSWkkb4LCtG/iCWxoRnYZimz9 y2DYj7XAiMS0JLX/IsmIQ342ooIlF+7ThWi6mcjouwl6kiFWKEf21mKgOPkY1r/Tn8FP RwoVhzfW+4zI5eLZ8/qxH34gMaOh3jlKAb5jPjywH/jth55HC7ZW8Df9PdYcHMxlWmcA nBrw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=vbRW/oaMtNFIiL4/hAumcWAy6y3tu6PH0ET/iP9XJUU=; fh=KHVSOQsN/encoQUYL8zRXJH1nOkdNw+TlLqwkTMxPN0=; b=auQZpwlB5HBWIbTK0yeeQOa9iAVOkYXDwoJDfa0y2+hIDM+SOUuXFK1TziC28DAD7Z vZ609jtAVgB1cA3ZQKo1l/GS7INuw+WZYQYWGAVuc0bw/10Xi9a0V5GLrZ29cTAHzaqw mV7QqAjFTxg/z4SlsrNmGCk4UJ4Swq+KtLjx/+UZEnN7rszIN+WyaVjIRDRPuJmi1Iki dZxggYuAmm26+25B4UG4RGYKuryEwsA3HZLj1DuEZWWGIy7zHYaCStofU9D7lEQKrTxy qkSkNwuZc3aNL6HBVLNS7wb9TSen6e2pyzwRdKoqfFm74ckMYSjtEFxEoydufrNB+3TB iX4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XIsqQB8Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65004-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65004-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUTuiN0hZ0HavAASEVO+zfQN6rg1o5F+JgyDbZryh2U6gry2hO/CZdzeM9BQ9h2EwRG3SyLkFKLwGtT7YB0kLbL5qVDRg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z21-20020a05620a08d500b00785dad6dc54si5528010qkz.15.2024.02.14.01.51.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 01:51:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65004-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XIsqQB8Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65004-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65004-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CDC291C22E3A for ; Wed, 14 Feb 2024 09:50:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49CC01A58E; Wed, 14 Feb 2024 09:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XIsqQB8Z" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8E7015AE0; Wed, 14 Feb 2024 09:48:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904121; cv=none; b=hyl/PZrKuflTlWKd0CDyjf6Uy0L3JIYTFcLWlnX+LLoHtibvfJWVxtFxWBhgigbY6ljH5yOdSlyhcYDwCCh6FIm07neoLImKz0YkjqoS6/hArHjprf/fmUSCYwkWLb39FFM5WE7C7Z9btPFXwIBI3OqGjssBty9T1s9bXIQ63RQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904121; c=relaxed/simple; bh=8f43hjZKhQSxbAyrgwruozpP6DsOBuauW42V2nrYgss=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IZZHY9Ng2ickmci9Bl5EyncIVKyo8TkTH1qq+IKQf13vQXGEoMLADvAqvSAvH2V5LHgyGHIFJh0/oq8DpoY/RfJJJ7O72YDnbXfVDpjIgKnrVgWADev2JvBGCCUmIfUHFCmpe0uBNpBS425HY6VXY/SUCtOs8tW9x4thV3rjPZY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XIsqQB8Z; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8D31C4166A; Wed, 14 Feb 2024 09:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707904121; bh=8f43hjZKhQSxbAyrgwruozpP6DsOBuauW42V2nrYgss=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=XIsqQB8Zm0Jb+sl8MzSyxBPD8Eg8whH6wzIVgpkROiMsQBvbVmJwWfgPlRvK41Joh SiRCezS21e9wMZVW3URVVt6A544ktyR98mPm4rv5n7oK5+U1jEjSDy7UB5Nhme6nCI 7oCBzC1agE0twgq6euLcWY+4d2+WNaajfdscSwpxGWLvOna/CP86koKF0ux+3gtfik BHMQwZniBt8H/PVdeW8qD6l/lDxjJPbO3zf4XBnK5YzvY4R8v/OYd5Hf4pA1xSaqvu t5KUj/GgSTC0XufCT+thh+SOPc0kzeEsuGVUoasE8F+RLnIlOyS/zBeFJCyP77kErN FvXJ3VjY/L6AQ== From: Roger Quadros Date: Wed, 14 Feb 2024 11:46:48 +0200 Subject: [PATCH v3 4/5] dt-bindings: usb/ti,am62-usb.yaml: Add PHY2 register space Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240214-for-v6-9-am62-usb-errata-3-0-v3-4-147ec5eae18c@kernel.org> References: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> In-Reply-To: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> To: Thinh Nguyen , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: nm@ti.com, r-gunasekaran@ti.com, afd@ti.com, b-liu@ti.com, srk@ti.com, francesco@dolcini.it, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1686; i=rogerq@kernel.org; h=from:subject:message-id; bh=8f43hjZKhQSxbAyrgwruozpP6DsOBuauW42V2nrYgss=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBlzIxmYoXsUd1qhjCRsCV2AnVfR4rLh2DaufhUP 2AZVhhJvACJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZcyMZgAKCRDSWmvTvnYw k8A8D/4nqQkxv9A9tnIq1iw1o4H7cxqPMg1c8wIMKgVInqTDAvwobYv/InyRsHWX4ybjtDkRyV2 JIoR1MOnifXaXnsmfqINhVSH3SG3rCWlKmRETIoLcb2gbnJ1msMerYKknhuoo9P2W/d+QP1Vg27 p5hQ4HSWi+a4crUJzJRTj5n8jwlvG9OUxVC40sG3mrDVIYbDhrfCzh9YFu/JhSnCoCXCv1T3UHY f+WGLJHBlG+Ojt+qR+l4UEs8kU1lPsrNlP2r/8Auxf1qBtROPl9sbKmjUyaYwzLFRT3HzckNV+/ 2GOGMOa8ao8YVW5tsIz4xvPLFniHpVhULWLKL5+L4XMCvVq9NQfwtEKiqAWXVw9Lz4k5Af/hfAw 7YdxHe2qw6wlTUB+VnyYSa44hTXt4vbVUJ6eKkWT0KTZ4Qlio7/nimfXYI9yf4Ts32rtGSYWDde Ldgibseb5jZB556MG8MueOjliAo2sSfN0VmoxGNhOHIFQZjlNR/rdkExVrGMJLsX1kHDfdSTD+e NL2+lJX5tlrBiZefAmmTAhmNZjTFq9BLjYdQAZUF9U66GYr//8jq2xPrfKsX/u+2fWws4t7VbEn Doh5sSZ2eC1f+7rh/BZFpVRK3DxPMwzZnpHI96RSvoxByHeFRC7NOJgSJlZ6F016Ljxl/7Wxq8w 4B1Vs1h3y7t8Meg== X-Developer-Key: i=rogerq@kernel.org; a=openpgp; fpr=412165D44C9F52780FAB1058D25A6BD3BE763093 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790867431747998076 X-GMAIL-MSGID: 1790867431747998076 Add PHY2 register space to DT binding documentation. We use minItems: 1 as DT update will come later and we don't want warnings for existing DTs. So far this register space was not required but due to the newly identified Errata i2409 [1] we need to poke this register space. [1] https://www.ti.com/lit/er/sprz487d/sprz487d.pdf Signed-off-by: Roger Quadros Acked-by: Rob Herring --- Changelog: v3: no change v2: add minItems and update commit log https://lore.kernel.org/all/20240205141221.56076-5-rogerq@kernel.org/ v1: was sent as part of different series https://lore.kernel.org/all/20240201120332.4811-5-rogerq@kernel.org/ --- Documentation/devicetree/bindings/usb/ti,am62-usb.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/ti,am62-usb.yaml b/Documentation/devicetree/bindings/usb/ti,am62-usb.yaml index fec5651f5602..f6e6d084d1c5 100644 --- a/Documentation/devicetree/bindings/usb/ti,am62-usb.yaml +++ b/Documentation/devicetree/bindings/usb/ti,am62-usb.yaml @@ -14,7 +14,10 @@ properties: const: ti,am62-usb reg: - maxItems: 1 + minItems: 1 + items: + - description: USB CFG register space + - description: USB PHY2 register space ranges: true @@ -82,7 +85,8 @@ examples: usbss1: usb@f910000 { compatible = "ti,am62-usb"; - reg = <0x00 0x0f910000 0x00 0x800>; + reg = <0x00 0x0f910000 0x00 0x800>, + <0x00 0x0f918000 0x00 0x400>; clocks = <&k3_clks 162 3>; clock-names = "ref"; ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>; From patchwork Wed Feb 14 09:46:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 200884 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1100278dyb; Wed, 14 Feb 2024 01:50:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX6ME8zucNskRkueXz7G9Lq3GIqzyL6VnUR+MYgV9GU65rvwTIFHdQKJaVcvGHi6bgxUh8F0+zm8ZBZXM1Y1JD3tP5F2g== X-Google-Smtp-Source: AGHT+IGGjnBa5dFz+NOozRYsiVh4YIjUIU5uDDy6BvEfu6Z2BySnsrWPzX8go7XMJvjQ5wHVD2yc X-Received: by 2002:a17:906:4757:b0:a3d:280e:42f0 with SMTP id j23-20020a170906475700b00a3d280e42f0mr1550712ejs.5.1707904251131; Wed, 14 Feb 2024 01:50:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707904251; cv=pass; d=google.com; s=arc-20160816; b=LoYBHtT9vFUKPbEBFsd1MPYzPAIwAQJtl/TcGhIfsusiGkPxpwpN6GAzoGqDZuza6F QuJs7D8n+Cb3O4RPb5ElSRjb5M4L1vvazA3SqoiFbR2Atceyvij8bK39kQBQe6zCHd53 yxggiJLRG3G1NA4juNMZ3CN9IjNTo2YkLR3uhIfjg7oCIVI0OOOpa/xfw2E8Fazx+5YJ djgx9E2G/aR9KCaNM2ern6lwqlefxvFoC5wYCaOaqczErYgQNpsGf0+1/xKNtL85cJVg 2m8QhAvOqw3Qnyr938Q41Ru3EWplTNS2GlntaTmFPNUmS2f1ZO0rwFp98KIl/DROr4KB sImA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=2SCjvrBeVQ0wSOs3EcatVHN7CXmyOfTz7cxW56iGo7Y=; fh=ShNKCawSHbiEjXJJ8f+KpMtdqGq0b8g3iX3hgqqWEWg=; b=JmPz0y/jNiy6AON+EvgBAsKHGG40x6mLTVtlq5ABz4C25Aekq1H+FEpBCfvyJpJ187 vsVfN3ibXXpOgNfZXml8VWKvrlpAS3F/+LN2pEc8Tea3pqNeTuKn16hHTjjeSVKueZKq ukN/hPrOICKYy+Q3N4WB2RFXN4hlNl8dKHnQ2Vr+/CkGHzjGkbPGDg9bI6biU/gNdY8x 2LX7KR1QYmhcIa9V4jqsVV6EorSA/OlpKJQjCua1YeFzKFb+G2rLk0KG93OS3fxNQqQu IbsqoFuAJB71ZGxDg5dZRRiXeGoLSRm0pB9wLX19iXnNdwqX/vXsE8FXAm1PoKGw/g/Q Kxlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=chg1WU9g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65005-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65005-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWSrAA0lNhmHEdkGwuKppI/NpVLwzdJq9zmh8YEHgKA+aJb0LwfnA5DGZO0qHqye3i+nVDjkmNtJWfRDjOraihnp1j2/Q== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qb36-20020a1709077ea400b00a3cf6edc974si1792444ejc.964.2024.02.14.01.50.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 01:50:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65005-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=chg1WU9g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65005-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65005-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8F64F1F22E6E for ; Wed, 14 Feb 2024 09:50:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F8F91B802; Wed, 14 Feb 2024 09:48:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="chg1WU9g" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A9971AAC4; Wed, 14 Feb 2024 09:48:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904125; cv=none; b=ndifOT/96zfslGHPgJIL1G0YU5ceB3PDTISfmutopeF6FbHBKSqp8ts//Rd26TtT3A1Qx8Aq2z8CPs2ljH7iA3bt7TpcWUUYZ7EmWO1MWXqTzYRd8IO+rpyTnQzGLyurJX5pTcL71cfCGWkUNBMPoJbfq00DTUbIuSW+8ni3Gb4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904125; c=relaxed/simple; bh=6PUcC/csq5fQvr9+kVvXnCmkEzTXjd+DEMWwhUxgkws=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Q8sK55irtKrB4vPqelG5aPx8P+pg1o4vOyBI7iIActMiSqSrGZUT3PmUlM9dDzRlJebHSr0ODDeNgAX3WmUj1PvhtSEr0QF/t6vgsLeW5MIl2C26+TQv7jww5j1sF3mudQQDzMsg+g1OvEybwpIr2yLS0jIfWaBtZNAb5iicLJE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=chg1WU9g; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA6B2C433F1; Wed, 14 Feb 2024 09:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707904124; bh=6PUcC/csq5fQvr9+kVvXnCmkEzTXjd+DEMWwhUxgkws=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=chg1WU9g7reS7OYILqKi3gPx1pMQhgI3henHrdOcxfpTLGLTuTsojGDkIP86YnmEz ItVPNspOxNeUHlAgvM83atKQ2+dcNBUc+bj80YnuAkA5eGXaDo0TQvR8EtVLumGVwn LSO50gTuLiL4iKmixcS3ZlZ2hf6WwvD6IiZfhkSlUtM+VFEkm05x1wpZEQmy8FN57U QzbhNF7aXKI3LxQnu0T/M9gb/0dM0fEcBVzFkDB7KB4dl7+t2+Sk0JNo8N0BKHiEAT mH6qPWo7Ck3Uvddya/w9GXsNnamZIcklmzz6Sqsp1uY/YuH4DfK5g2Rxj666/aIJqB E+HVeu8QoaPQQ== From: Roger Quadros Date: Wed, 14 Feb 2024 11:46:49 +0200 Subject: [PATCH v3 5/5] usb: dwc3-am62: add workaround for Errata i2409 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240214-for-v6-9-am62-usb-errata-3-0-v3-5-147ec5eae18c@kernel.org> References: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> In-Reply-To: <20240214-for-v6-9-am62-usb-errata-3-0-v3-0-147ec5eae18c@kernel.org> To: Thinh Nguyen , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: nm@ti.com, r-gunasekaran@ti.com, afd@ti.com, b-liu@ti.com, srk@ti.com, francesco@dolcini.it, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2305; i=rogerq@kernel.org; h=from:subject:message-id; bh=6PUcC/csq5fQvr9+kVvXnCmkEzTXjd+DEMWwhUxgkws=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBlzIxm8KWDYg+HSQTW54dy3G5LJyxK8C/tbzPQW XFtI3WySAeJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZcyMZgAKCRDSWmvTvnYw k9VhD/9+X1MeZYthg4izWH39FxY2P5FuMoRsFtyXb5iKBMAxx8mq6JQia5O1+VCXIFvGbNWDMlc sB45Ek//gEFjOH2c+JAEpB4daqAIeTqDWRkXl2Jr0epeF+7/csac2EH41dVOSnCM6GVMizlIGxz /dCzqw/PWMriRQG/hLalRLKeWhHuM8aL+RqmFZWbCbK1eakgfSCWFa1LqlHzR36WBMvlIcbyjjZ I04Im8TjkiB885hYHJeBtpbqgKJfGiWr7xCFfKueWBCcHuA+2FrCz94XwxxqeTaED8xxHTUTO9W HXY+1hssg7Tq8ENXcK+kN7nSPsR1fDdXXFffNKaBvo3daN935jKx5b+WSkkbOsRXz4l4u9Yw8FA TIa1WaaNyEn7jw99VrKaLo4LqjT3lYPH6GKr2dOg0UEQl1eYTDMH/wOI4Y8cHXkvXoQOTjgW4Ge TsTBXe2GQQg0CpnfTT0q4rQDcj332wR4sdzJmMKO4U1uucowNcQ6BU1wiLEa7E9rAw+ZJ5TqB2x Guv4VXqqcll2FXglJQKo3gl2y4IVR29qHCqB/+OHNRfepx5ut75Dw/up5WHFe6sDUzTwvuClEQw x3i8qiA2kPBYSvTmc14Ng8/aUDYM0dhAQ3TOCsc1QE//I5+Uj1wYO0iNKlj7O8SkvMFe7bJfhxk zR/QQh1hRNvHDog== X-Developer-Key: i=rogerq@kernel.org; a=openpgp; fpr=412165D44C9F52780FAB1058D25A6BD3BE763093 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790867407861391799 X-GMAIL-MSGID: 1790867407861391799 All AM62 devices have Errata i2409 [1] due to which USB2 PHY may lock up due to short suspend. Workaround involves setting bit 5 and 4 PLL_REG12 in PHY2 register space after USB controller is brought out of LPSC reset but before controller initialization. Handle this workaround. [1] - https://www.ti.com/lit/er/sprz487d/sprz487d.pdf Signed-off-by: Roger Quadros Acked-by: Thinh Nguyen --- Changelog: v3: - move requesting of PHY2 region to right where we need it v2: - don't add phy read/write helpers or add phy to private data https://lore.kernel.org/all/20240205141221.56076-5-rogerq@kernel.org/ v1: https://lore.kernel.org/all/20240201121220.5523-5-rogerq@kernel.org/ --- drivers/usb/dwc3/dwc3-am62.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index af1ce934e7fb..163278050595 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -101,6 +101,11 @@ #define PHY_CORE_VOLTAGE_MASK BIT(31) #define PHY_PLL_REFCLK_MASK GENMASK(3, 0) +/* USB PHY2 register offsets */ +#define USB_PHY_PLL_REG12 0x130 +#define USB_PHY_PLL_LDO_REF_EN BIT(5) +#define USB_PHY_PLL_LDO_REF_EN_EN BIT(4) + #define DWC3_AM62_AUTOSUSPEND_DELAY 100 struct dwc3_am62 { @@ -184,8 +189,9 @@ static int dwc3_ti_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *node = pdev->dev.of_node; struct dwc3_am62 *am62; - int i, ret; unsigned long rate; + void __iomem *phy; + int i, ret; u32 reg; am62 = devm_kzalloc(dev, sizeof(*am62), GFP_KERNEL); @@ -227,6 +233,17 @@ static int dwc3_ti_probe(struct platform_device *pdev) if (ret) return ret; + /* Workaround Errata i2409 */ + phy = devm_platform_ioremap_resource(pdev, 1); + if (IS_ERR(phy)) { + dev_err(dev, "can't map PHY IOMEM resource. Won't apply i2409 fix.\n"); + phy = NULL; + } else { + reg = readl(phy + USB_PHY_PLL_REG12); + reg |= USB_PHY_PLL_LDO_REF_EN | USB_PHY_PLL_LDO_REF_EN_EN; + writel(reg, phy + USB_PHY_PLL_REG12); + } + /* VBUS divider select */ am62->vbus_divider = device_property_read_bool(dev, "ti,vbus-divider"); reg = dwc3_ti_readl(am62, USBSS_PHY_CONFIG);