From patchwork Thu Feb 1 12:12:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 195268 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp104152dyb; Thu, 1 Feb 2024 04:13:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGV4X/MsF2I0C6Am3xwfWqbMFzK2AzK+5C7+wi2T73qJYZXwobg8oNJ6o8exkfy/GC4IW8h X-Received: by 2002:aa7:dac8:0:b0:55f:c110:a0f3 with SMTP id x8-20020aa7dac8000000b0055fc110a0f3mr804807eds.18.1706789620808; Thu, 01 Feb 2024 04:13:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706789620; cv=pass; d=google.com; s=arc-20160816; b=hS5r7UGzd6C4En6APFMLyGLjeF2ETjYRK2e2Wma7qijBKm9ilj2fFAqjxRCoSf0D7Q HxVRl+sPt/Fp8seJE43ZSN3DOMcRmiFQp6YIQiWnvVx2KR/l1NKRjZ5CEbT511vD40/8 VL9euB83Fq69ScYD3XQA5086uhkbkVelDGttupJYHPS5PeclKmZc7uA34lHNXhQq1xNW WHSFY0uq8dCHyVyW54IXw3I4A1+/2iMCmbfO3flkF07pICpS0KvQGI+hOu51fIRNRYwZ BUhstj/R8u0ZpNlSwdJLpFvYuGhejiMEa+COzqSGTxxCFeWTYkbvxGYIxGvYpFpk0vK5 Ouxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=zGNw4W0J3nvMa4U7rHciGdFn7chISnG9fvO5O/3wYnM=; fh=7teGS5s5b2mSPnK8ji1lHXHfjV5Rjvg3qoUeMb4IC4o=; b=NGSHOog9TzIsXJjQXuNZePQ3XLCUXZwzMb0xA1QdvLbZ5yGVC81qrNO9OTK9yfP00r NuUcQKd/2LtWquocKUJGuKEDEo4PnyYh8TV2DAfHm00XwTcOr/gZKyaGehvP0eMOosI1 Q5QdmdMpigezzSzbWBmAPcBiKdP8zJKkWVsO1tdlENgW0BeeDI7rUJxWJPxWu7vW1qjN eougCR+eGO3r22gF3Z2sYaLRLTv/uigb1U4JRUFq+FuQJIDOlGaxZicFFmuJVKOjs8n5 EY1tIxvnbDCalLd52WgG8CFZ/x/c8y6WQQ1D4LBbOF6lHAdvekHpZqRx0hDoK44idehm cQuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=do8gZS2U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48092-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48092-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWww4VSG0Orf/8OiyBaO+9S+P/i9v8F0jv0c9hlGsyRrbWnDqk9fUPviAN18onfiD4KVpuI+K3vsnSXnmNXeW56MY8XwQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r9-20020a056402234900b0055efa2b5557si4469228eda.378.2024.02.01.04.13.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 04:13:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48092-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=do8gZS2U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48092-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48092-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 69DA71F223A9 for ; Thu, 1 Feb 2024 12:13:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A3CF7160891; Thu, 1 Feb 2024 12:12:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="do8gZS2U" 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 0210A160866; Thu, 1 Feb 2024 12:12:29 +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=1706789550; cv=none; b=V9/tTwodrc50ES3QzRZenZPMTl0HKst3J1QVmpa/EuXrvk4/jK46Wytf+48fb9PMYhWPsVyW5wbmQj3YRHsezrPfZHg/2qnyBqpD3eldDCXmn7uWKS7O/Mecu9wq/LCdzx50E2R9Uw01xSCilOahUcOj2NxiqGDCdfA0dKdyTkU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789550; c=relaxed/simple; bh=1vbfNovCyxvWc1PBLYclGrDiXSIWmEZA5YvornwGSpI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=inP2K4ZeiDJjpbQwoPQo/Yd9AFe31snr25/c3r4aclVxufD2j1jt3Ew9gpJxQ8n0F7ljVfJPgKVMl/BmobU1KEhYySz+OGyU+HkN4QEzr/GZXzVNf3wfwC6Lz8ve7ImGnaWAL9MhijKjbRPIFEV79IYTPGxT2C8EYsGgyO9gXD8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=do8gZS2U; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86E5AC433C7; Thu, 1 Feb 2024 12:12:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706789549; bh=1vbfNovCyxvWc1PBLYclGrDiXSIWmEZA5YvornwGSpI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=do8gZS2U9kvnSFjL9B0q0/fwnJAocRkD4uK1LgS1keLJMDw9mm8X9zfEHzXqWgkZj NrenoEnFL1lKPRX7kHcX08wyiWcjZX0a4SGQZmrcYD4CkbHs64sHBCG4NZesHGAi3f gwrmsyVvRDriufzGHZ6RDpukpAcTmn5kWrV5DrY2WA7NNFYQhvfo/tcUTmsUZdeQcp Q77Z+lucpbAmGiwAVTNSl8bZ3G6l0ky6X8bISZw4MYsHum2eAwM/br6Ivccxp+6RJj 5Ndo3JCeni0wE4vZvPa3tYZ8Obl+hmBlrHetEkZ9IQYU305dWqQxo6UtDaqy3h7EV0 34I4wIbNxAqmQ== From: Roger Quadros To: Thinh.Nguyen@synopsys.com Cc: gregkh@linuxfoundation.org, r-gunasekaran@ti.com, b-liu@ti.com, srk@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH 1/4] usb: dwc3-am62: call of_platform_depopulate in .remove() Date: Thu, 1 Feb 2024 14:12:17 +0200 Message-Id: <20240201121220.5523-2-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240201121220.5523-1-rogerq@kernel.org> References: <20240201121220.5523-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789698633828515033 X-GMAIL-MSGID: 1789698633828515033 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 --- 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 Thu Feb 1 12:12:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 195269 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp104303dyb; Thu, 1 Feb 2024 04:13:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFXh5RrNDtHzm6hd6bVYF3u3BB73UiTIh9CiZgLjIuGC82MZrImYLxdQSwl3vaM0w9jZDU X-Received: by 2002:a05:620a:46a8:b0:783:b593:5194 with SMTP id bq40-20020a05620a46a800b00783b5935194mr3142560qkb.41.1706789638766; Thu, 01 Feb 2024 04:13:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706789638; cv=pass; d=google.com; s=arc-20160816; b=z+GDGsENh4BZHBbIrT8q9kUJi2HCulgo4QK7zuv/iOaEAoI8gHuX2f3I5f2+fR1vvf CpFImrwG4QCj+EMCBLl4ju9oDISWeM9XsOsaipsUeHuVK56M+NzQPlHsbn2qEPd2Be2V 1s2IX1dh66husSTSnk16XuGcUSVkddr9Fx42+kTKsGwcUhUw2PtXdQ//lvDyGMVJTU4d gH93D1ZyAsoozJEDDKiO3n3eZMs6q6XBDw+Y/b0ED1h4A6oKE0ooFHUn/gRBo7OpPZbP wQDoI4c8pJCtKZIHz2/1jLMspIx+Lplu8x5/Rwj08hDFhbuypzuGoww0m2P/Bls/DVG1 +kDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HxEJkFAd2u6PWo5ke0WcBLsLsSsYqOMSK6kiY4SIefI=; fh=INWqfnXmcGw4m3vdc6WcLkPoeEi1vPKC7zr1E5UF06M=; b=WRH+3btWajiKi3pgCds4PLVnUiGV/j1NoKD7waGY9ULsdKvJEfVh2xhKTgxEAu0TU7 To4hEM/dwXK7R59WT1yN2j/Qg97YHI+1oDlc9UR2K2T8SsJoJSE1hMm097JkRGXUIcdE DTzFE7tT2ZpsO53dwnCk62xYmMBiHVTLAGnpI32J5+8TxklXZrlkew+NYil1lezrNyxn DzTtdJCjeGeiUzAJczplfRkWiGoIKGHfVn9xGC1wYKtRsG1su13lIDfm3YZkrnPIJBae HuPLa6c07/iS+oqWM6ibA3WdPDbBccJuBMp671VsipSMKHCPS9z0+gBnK4rHcCy0hmaS Hdbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=urvYrxUW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48093-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48093-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVIzPuWsr6HOjgo5fVJgWyQMbdhIxn09KQNIgaDah4s3eQs42U3zHkPC0UND0SRPLtOWCXLmDyxBWO2bRtV4wOQ7Dfb5A== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c17-20020a05620a201100b00783e32c8f98si11650576qka.270.2024.02.01.04.13.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 04:13:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48093-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=urvYrxUW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48093-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48093-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 8E7F51C24B16 for ; Thu, 1 Feb 2024 12:13:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A5A3161B5A; Thu, 1 Feb 2024 12:12:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="urvYrxUW" 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 9C87A16088F; Thu, 1 Feb 2024 12:12:32 +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=1706789552; cv=none; b=H8Yhtzmtudn0sflidhGiJpYnn7kJKZBvRxLGLhrjZwqRMG+k2oxTODwJ+TfF1nwdarGbU+gXRpMZzqj+EhjbAjgEkVRmC4O2+kmMm58FNTIxcuZrNii9AusflXDx03ksosquDZZ5inE+FXrgZRvX10HdWdOVv42I0ajdFvju4k8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789552; c=relaxed/simple; bh=U0KOgz6nOgOjNNhuSJI9UM8ClADua2irwTRLMiXXge0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=g3SMPx8SCp6L68FwZj2HvF+PPubKmrtw4ABnixr0NL6fSHgFhpfsGk/nyP6/N9QXwvNcuIT2rexwvJlrKkvcnkSSXTqLQ+5vknLYfhKTvqbvCLYxxtmLIefi+tnWzEHZCvbHRM92Jn4Ldvvdy+DItZErbi45fZqoCMBTWJUoZQs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=urvYrxUW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 119FEC43399; Thu, 1 Feb 2024 12:12:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706789552; bh=U0KOgz6nOgOjNNhuSJI9UM8ClADua2irwTRLMiXXge0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=urvYrxUWsMAFZTUvGyLBQVD3pWRgURGRXvf8giZcgNy4TQ8rhNMfJPHktBC0RXDzH 288iRyPCfec97Ogu5T12whCkNPH9UtbHJpYYhZRjZnotrOZsoxHotS+5Iw1Hl5fun6 4Uhnbrb+U03wYPhQQH+CBcAoVFQIi6ezE1C3au44gThPiGc4jPe008PPoQhP76BQ2i Jn/acVTuhMClwChUy0zJEm5jPwQPcvj8e/pnXa+Ay6jIn04nAZWQslJLUpkBEVKWjn 0ZmiGwJxtYVs5Lor46tD7eMVzhJ9K1Dd0V7fSDoBAlfxM9F4PqPrWalc21jLUy8w4e o5tynXZTmYGJQ== From: Roger Quadros To: Thinh.Nguyen@synopsys.com Cc: gregkh@linuxfoundation.org, r-gunasekaran@ti.com, b-liu@ti.com, srk@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH 2/4] usb: dwc3-am62: fix error on module removal Date: Thu, 1 Feb 2024 14:12:18 +0200 Message-Id: <20240201121220.5523-3-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240201121220.5523-1-rogerq@kernel.org> References: <20240201121220.5523-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789698652257984439 X-GMAIL-MSGID: 1789698652257984439 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 --- 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 Thu Feb 1 12:12:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 195270 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp104410dyb; Thu, 1 Feb 2024 04:14:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJTTfTWBPcj+uoDhxU4Mr0iEAOgJhh0asqGv+iIm0cXTXgQqjfSpcS1Wo0nfeMDDZMES6G X-Received: by 2002:a05:6102:21a5:b0:46c:f172:c004 with SMTP id i5-20020a05610221a500b0046cf172c004mr1123855vsb.23.1706789650646; Thu, 01 Feb 2024 04:14:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706789650; cv=pass; d=google.com; s=arc-20160816; b=wWUzx18FIGUnarEJf4EYaDBWHXAqIw2jgYrLUtK+h2iT6pok3EdNHZfOw05Zu5u2u5 wiaECp9a5gEh1THIHyGNcZgCcTjhOC8IaOcCsZe4i9NGkH7muWJLHi9a81cL+lZwjxjR hgROzKTS4BGXk2ZrxK/SDuNbiAHrPLlrBvhaACJXV4yWGym1K2TESi7bqIxlMUT+tfvK +LRMEgYbLS9+r0k+ubpYNaRVZtVWQxstRulm6gNZuOO+EXt0VmCTt7ee9RWHmY5d7jzI J+U+ZHXYANMK8MjdlI9sigHfyPNxYvISKh5XR+zJWX0WD3Mn8gqEbZsDU3dgV+vJPif+ ttcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=yOixHx4GJFH9DHtuXP1abFp8ch8dtUBz2KDWoIetUuc=; fh=09UiI6O1l48qrzJQ1pn+oWaeym1mptFoEVg2X2TkH4M=; b=l7Dhpq5m9pzqGpiB0cnqKrykTasuIcRdlhwhVKEoZRBO5H9uTsmO8dvoU5W+IkEAw7 xVo7LMC+x5YZDAE5NLoGRj/aaYVonKT0IDhXTscOH5Jtw3T6QQojcXMzlnok1Od4Y+pd tECjsLjWst6lglYBphgYn5Sk52zewitGvqYByaduMR+TCbQENQmam5S8zvVnOp+QQjdK DmKt/S/H5oZW6yoWqzMFZgsytDFALGNG8kAdHfP4hfWkgg7jtLRGMqwjyTq9rhGWl/MN fndPoM7If3EavpBNlIwuzj9Tiss7YQtDNjmM18I88Gv5/vWK4TWEYzZVLJtJkQR115l+ 3BoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z476S7EF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48094-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48094-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWNJ+dRYbhSswkw1Vq6MA+W29Z26m7AvCRWMhoruADOThmsjpWH4l8c36jKCDFyL4PuKtACVUF8Df3K1jPtjZYOG++StA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iw1-20020a0562140f2100b0067f8c4235f0si14222623qvb.415.2024.02.01.04.14.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 04:14:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48094-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=Z476S7EF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48094-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48094-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 6EB231C2466D for ; Thu, 1 Feb 2024 12:14:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 801AE161B6C; Thu, 1 Feb 2024 12:12:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z476S7EF" 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 C5C44160899; Thu, 1 Feb 2024 12:12:34 +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=1706789554; cv=none; b=YD52ayZpGpU4uG5RQmtnujtYJCQPW7oQRLWMhA6p0/HYj1LcGCGFlRxfmzHf7HfVrIsW8cFnOKJT0UHuKL9blB7I0WTwDM5OMSrj5hvmJu1wVg/ceFA+Y8qsOhKEzyjGwrqIl4wZcUwrojN2YTbaHQAXiixTJYQQDwWFA3IEw50= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789554; c=relaxed/simple; bh=Qfbq+sSZxjAM/hD8kTbPYklUiveqLxLWC3K9/YiS0nA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WCSRILlNeAe+IzncV6r2a/9LSViEAlw6AVkmH3w7z6FT8NLTwIWZOkXXjmCWdRumhD2+0TwZTVJiXIn9DL2n4xpIWDe69jK/uwlME2VI2ljYRNqCXd6aKwqV38C43x1hWMYT5mc2Fd2q6CBthMbQ6WzS43Lab+KmFDT5uJbTdzU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z476S7EF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91FCAC433F1; Thu, 1 Feb 2024 12:12:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706789554; bh=Qfbq+sSZxjAM/hD8kTbPYklUiveqLxLWC3K9/YiS0nA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z476S7EFyvaNHyNGCa3WqeFNbLqRxCzcnu5y+ulWZ3GlLGBKVnFxa2yremgbIkQFt OpNscSzEANRIH3vI7cTo8XXbSZb5nMCgHsCreqla9060r5IlAVc3iL/SZ0frpc/LFa oFTRQs9m+RSz+TepjBeqUJioiO1StzsCmQzjOMGpViBgq+Zwf/lwv2fTqILUFwFBrm q+uWKkEhwewRrgWfLv53uLqzDuQ8wGEcldlNzwfBWcoru7LpUxp9vhbNf+R0qJQZzE afsK8CvHj20puC6AuQKKl1kD8HPYmA6M9HSa6GZh9pcXljFoqln5zpZKFx5TGfUjJv JANEIODaR8VMQ== From: Roger Quadros To: Thinh.Nguyen@synopsys.com Cc: gregkh@linuxfoundation.org, r-gunasekaran@ti.com, b-liu@ti.com, srk@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH 3/4] usb: dwc3-am62: Fix PHY core voltage selection Date: Thu, 1 Feb 2024 14:12:19 +0200 Message-Id: <20240201121220.5523-4-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240201121220.5523-1-rogerq@kernel.org> References: <20240201121220.5523-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789698664504840237 X-GMAIL-MSGID: 1789698664504840237 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 --- 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 Thu Feb 1 12:12:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 195272 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp105348dyb; Thu, 1 Feb 2024 04:15:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+BTVZcoCwtFfzRjTZB+cIcVSUZY7CZEh/gEO7f2z+SQY65rmJmRcOzfsWxXUDYV0BXFiW X-Received: by 2002:a17:903:280d:b0:1d8:e05d:7a16 with SMTP id kp13-20020a170903280d00b001d8e05d7a16mr1905577plb.56.1706789744520; Thu, 01 Feb 2024 04:15:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706789744; cv=pass; d=google.com; s=arc-20160816; b=wwOMXGodOqerv4UDzFJg/nPrJMeKQXnQFf9J7CBdDLGpCF52VrbOCsH19VjeKEBy4i 7a55ktXTORtaIBeYUJ/o4Ph/6Oxtpd9cOYbJHWO2GxUElHLPtUC80Ij131Fma/4Qg1Z0 W1Lo6BzzU0sDp1OVp0+uLC0KZnmBM8XtZ90+wTqCdkkumiTUeE1ebe3zOVv08UwBJUGX zxorRcYJVYcTyCy26BfWITBeEOcwk1uSyIfcFlXHZ4jxDgAhCJOfIln5Aren236oHlT1 jOR80Z8+xKWFHt5uFtXYr4KEDPcd3J/cpOs2U/KGP/KOqDAy8DQWBH+Uweu7ZVbXjIl3 B7ew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IAsYpujapfH/+CoAyKMLk6KZVFZ7ztr5lL8ONia7HbA=; fh=ZgekDMKK2VJIAlq6qM0ar4GV9aqL0bHphK91YNJ/AH8=; b=YZSx4SXlPQA/rCG/c7C2ie2VjvwUPl3tawSLKWhaplWaI6OmQWGQJqaVFbq6XLyUw7 RJJGZMXsdFbISAywmeGnBKBMqLnC+nROVYpGnkbTomySq76c86cdKRQuP7jg4P2TmQkp l1aMm95yNZw5LjCcjXjhMmOvI7j/fVibMFdEgVY66OpRTQ7ykZzzHX1qvvGaJJCwBauo td5UoO/g6P53/bM+91HNkbPEV5YewmjGdd+E2T2Ky+pOh2KIj7RmXiaG5LReM1j6vSZH sUjCi0ApjpystGHqgTM+9fA+rpzvZbmjzCTUiKJ2Rmol6cfb6/yD1c4HYDvkVsqFM53t Ac8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ts9C4TN7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48095-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48095-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCX1azBd+AQAV0vHXr65RyEfItXP5LEtm3XRfHt0XYiT2Dc2W0Ygpo3A2ARfYiUzsE5hwpOa3GGhaLZe+rYgcqE4G/3tGg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w12-20020a170902904c00b001d91df66e24si4339510plz.164.2024.02.01.04.15.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 04:15:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48095-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ts9C4TN7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48095-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48095-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8409C2862BF for ; Thu, 1 Feb 2024 12:14:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A363161B7E; Thu, 1 Feb 2024 12:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ts9C4TN7" 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 BDF1D161B6E; Thu, 1 Feb 2024 12:12: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=1706789557; cv=none; b=WCxQUxyw7p2t2bVJFRpBX/MZ8ChDK3qetbmfNIAjOYwBpm3Vyl/SxOahtQAck0O6li4Y3dIcEHTi3r57OkJ+Fi2Phjtyt9Ua2m/A8acMHsQApfEVX9NmY9CNCb5CVSbW2tyK2sUHELZjkzHzKyzNt0947gzu64PDShVOxr6Gk58= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789557; c=relaxed/simple; bh=ENALJ+0xsMIiiXqnLcbkuuaHj/9Uu77rAWI6PeJZuEc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qA51ydCoiBN12cLs7zu0+s5SgI1RaQHklyltMs92ywZjwkkcT4kdD7MWm984S9/2LXr/6Mktgn6KjDr4VbYF0EP7H773SrVY6rWc3Uop5O4BLPU/fCBSdVGQBCUDeCRTmUzvQuuDukMpjczpLHCbB6fVlof137Cyr4hv72s0CAg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ts9C4TN7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43B8EC43394; Thu, 1 Feb 2024 12:12:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706789557; bh=ENALJ+0xsMIiiXqnLcbkuuaHj/9Uu77rAWI6PeJZuEc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ts9C4TN78P1HEMN2kCav6hkD9vQFUJa0dzInFOV55bhGr5OVukk8Vtrs/Wfz0gFEl GaxVX60eDEIFMxxdUEY9d3fvdRdax5AmNQ5Rn7QKesF/GYVC7UDNrDVNtQyMPtRmVY ps8TG4Aiy9vRzwn7zfkqET4Bk0QIOft50VytiBEwSmPxwVakRA6ehy5R31nTBx9LBe /vcwmfZoZC9t/BwW1qPfodrgZDMCnz3K2a8EZrJKYwjpiOToS3XWX3de7A46aAxLQ2 cln5KPtVr3ZlQ7KvLuCDelxoi7EN9O0ebGcnCsrypfKqcTvMh5kLaB8ijEuCRUmfOz +iycFlHXnXG7Q== From: Roger Quadros To: Thinh.Nguyen@synopsys.com Cc: gregkh@linuxfoundation.org, r-gunasekaran@ti.com, b-liu@ti.com, srk@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH 4/4] usb: dwc3-am62: add workaround for Errata i2409 Date: Thu, 1 Feb 2024 14:12:20 +0200 Message-Id: <20240201121220.5523-5-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240201121220.5523-1-rogerq@kernel.org> References: <20240201121220.5523-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789698762947279966 X-GMAIL-MSGID: 1789698762947279966 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 --- drivers/usb/dwc3/dwc3-am62.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index af1ce934e7fb..35d7a2fb128e 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -101,11 +101,17 @@ #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 { struct device *dev; void __iomem *usbss; + void __iomem *phy; struct clk *usb2_refclk; int rate_code; struct regmap *syscon; @@ -140,6 +146,16 @@ static inline void dwc3_ti_writel(struct dwc3_am62 *am62, u32 offset, u32 value) writel(value, (am62->usbss) + offset); } +static inline u32 dwc3_ti_phy_readl(struct dwc3_am62 *am62, u32 offset) +{ + return readl((am62->phy) + offset); +} + +static inline void dwc3_ti_phy_writel(struct dwc3_am62 *am62, u32 offset, u32 value) +{ + writel(value, (am62->phy) + offset); +} + static int phy_syscon_pll_refclk(struct dwc3_am62 *am62) { struct device *dev = am62->dev; @@ -201,6 +217,12 @@ static int dwc3_ti_probe(struct platform_device *pdev) return PTR_ERR(am62->usbss); } + am62->phy = devm_platform_ioremap_resource(pdev, 1); + if (IS_ERR(am62->phy)) { + dev_err(dev, "can't map PHY IOMEM resource. Won't apply i2409 fix.\n"); + am62->phy = NULL; + } + am62->usb2_refclk = devm_clk_get(dev, "ref"); if (IS_ERR(am62->usb2_refclk)) { dev_err(dev, "can't get usb2_refclk\n"); @@ -227,6 +249,13 @@ static int dwc3_ti_probe(struct platform_device *pdev) if (ret) return ret; + /* Workaround Errata i2409 */ + if (am62->phy) { + reg = dwc3_ti_phy_readl(am62, USB_PHY_PLL_REG12); + reg |= USB_PHY_PLL_LDO_REF_EN | USB_PHY_PLL_LDO_REF_EN_EN; + dwc3_ti_phy_writel(am62, USB_PHY_PLL_REG12, reg); + } + /* VBUS divider select */ am62->vbus_divider = device_property_read_bool(dev, "ti,vbus-divider"); reg = dwc3_ti_readl(am62, USBSS_PHY_CONFIG);