From patchwork Wed Nov 27 10:58:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 13886853 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D19FD609D1 for ; Wed, 27 Nov 2024 11:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3C3sMPrYR6ZzHIEk+nVgeCHSf0Vye1hpO5m5cm4VmUY=; b=au/KAsS3wFgRD/ fbn6v/Y2m8hoIQxYmdkWDIzLT4wTrn0kGYuDrqYIwigmEuQxQeoNjALmk0MGQYWSGXM0BDwu157lv rHhvVK7paPYXTaCotJaT+qyZ0u/V1Ki7oSNK1ZxUHYlcOl+yhjOjHW78IZikAxKLYS6JHyRlrqe3J eJXaDkkSMYAP6+inqgXOjKUlpx9w7k/OGa0/F9F1XzTiq5pMVUwrxSg1oDSaNbUf9ReYE600ko2hz 9N3HnCVPdX3CEsGZ3Rn8Bv81kk6SfH2ZuaqYARrZ8fSS+ne2TJISHJ4j6Om3UEDSmuEO08PC3X4Q5 dVsVt1tPQ3tgnLSnI4xQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tGFp9-0000000CwLP-3w1D; Wed, 27 Nov 2024 11:03:11 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tGFkO-0000000CvDJ-0hBi for linux-phy@lists.infradead.org; Wed, 27 Nov 2024 10:58:18 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-aa5500f7a75so503734566b.0 for ; Wed, 27 Nov 2024 02:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732705095; x=1733309895; darn=lists.infradead.org; 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=/Ela2PSfA/tyEVDL+lOFVH15DKBPE6OrGnsuqeliWc0=; b=ujd81bL6JTdy5OWn1xpJ5FiLkKLhUOcz/rTp8ZzsGC3MRdqJMb2Q4VA6hX8+zG+aG7 p60zv7lfvtM6s2rvjyH8vsHMsJN73S2O0uijIvhGWx4W+G7JBu72u6XLoVS7oUzh+4It vvLuccdaMvEkgTcsDaQijEDyPv8ttDucnxOXbjtGvsDmhQDMAGCga2b2QveMgLp8M01k 98DjN//RheNolSYp8p4J5RhN1Ld12F4o921h1HBLUdwC9KWsa6GqigE5OIafbk0eclJc fDSmaHT0vqd8At+DONwgC2uuc6YxB732BMSdDwsGUiEUE6j0+g8p7C/LEqZhZ97eRSZJ VPlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732705095; x=1733309895; 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=/Ela2PSfA/tyEVDL+lOFVH15DKBPE6OrGnsuqeliWc0=; b=CCXjR2KuPh0F0QXcLOgZvCoVn/uD0YvsOBOWQP6kUeaxg1/N7nm/uJ6Qa/rJ82jzUU LrBC+Yn3WBGbpwy4UoIHCQEftJNK7InBuue0UqfNnQiHLO9M91Lere0kSlT9eRy5rovg xy8ElHje6XkR6S0S13aseEYNq/yOzVWA8M1leZhVERjZVfDPHEimPMeN7tUwOuTWsz42 V3aTo1in4w3A/Rki91nQ7o9H7JbICTr8FKRuPyZtg/XIZrQz++tre9Z2jWx6hkM2MGKa 1FSqRBzQlMkOfyOg3j6v7TZmQKm+91nWppD+fu4BKOGY12nOzdWTq3wPAdd/IRgOd2E0 clgg== X-Forwarded-Encrypted: i=1; AJvYcCXKo+f3oufFzQD9ILhw7OKcwbSshBzVADysGDZ3BpcfiVkeZX377XX3vJ5/ExSp3gHcgcNkgiFG0cw=@lists.infradead.org X-Gm-Message-State: AOJu0Ywbqf/JHEyQJ4QdflXtrqfCsUxlI/JOLWqIAxDOIxvuP+sQDTjC 6zhlS8SBQCjQWA5UYJL1GwPm9UNxTAuQ3fjTShwjHWvXXiCXpKuJVcVnE5EkutE= X-Gm-Gg: ASbGncv6+HnvS/Yi+v1EBbtuQpUeCs+6bvS1CIWUewrymvczlDu8BzCXVTyzUvMMelZ mQxORmneZar42v9/PUL/OV2kR1qihpmOir9UYMXatedVJcZyidcogUwHUIg56fEBM2CCvOs8gRj gEHmT5ABYn2L0XTTgsnAnfA7PPdjJJAMQnEZqeRb5owsTg/9NDgqezluzg1BbbiUlotaYBQWzKs Km+hdnYm2OiFMmviqDwivWJukdG2GN+bj6wRH4iBf8nX8vz8ZT1HaM1SX38HitM/OWRUwxaDRB7 KnwW5LEYbzPy5SyiZcDbT6WkPr2F5yeh/w== X-Google-Smtp-Source: AGHT+IGGy57a01XH3UbpX0NsvNr8Tj73NtCtISVWPxqvv7KY3oEK4Rqy5+2NoX4k6+nU1RKiz62pMw== X-Received: by 2002:a17:907:7da4:b0:aa5:43c4:da78 with SMTP id a640c23a62f3a-aa58108aaa2mr177836266b.51.1732705094719; Wed, 27 Nov 2024 02:58:14 -0800 (PST) Received: from puffmais.c.googlers.com (64.227.90.34.bc.googleusercontent.com. [34.90.227.64]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa54a6db906sm412183566b.41.2024.11.27.02.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2024 02:58:14 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Wed, 27 Nov 2024 10:58:15 +0000 Subject: [PATCH 5/9] phy: exynos5-usbdrd: fix EDS distribution tuning (gs101) MIME-Version: 1.0 Message-Id: <20241127-gs101-phy-lanes-orientation-phy-v1-5-1b7fce24960b@linaro.org> References: <20241127-gs101-phy-lanes-orientation-phy-v1-0-1b7fce24960b@linaro.org> In-Reply-To: <20241127-gs101-phy-lanes-orientation-phy-v1-0-1b7fce24960b@linaro.org> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marek Szyprowski , Sylwester Nawrocki , Alim Akhtar Cc: Peter Griffin , Tudor Ambarus , Sam Protsenko , Will McVicker , Roy Luo , kernel-team@android.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241127_025816_202338_26625363 X-CRM114-Status: GOOD ( 12.97 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org This code's intention is to configure lane0 and lane2 tunings, but for lane2 there is a typo and it ends up tuning something else. Fix the typo, as it doesn't appear to make sense to apply different tunings for lane0 vs lane2. The same typo appears to exist in the bootloader, hence we restore the original value in the typo'd registers as well. This can be removed once / if the bootloader is updated. Note that this is incorrect in the downstream driver as well - the values had been copied from there. Signed-off-by: André Draszik --- drivers/phy/samsung/phy-exynos5-usbdrd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c index ceae4b47cece..2a724d362c2d 100644 --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c @@ -1510,8 +1510,11 @@ static const struct exynos5_usbdrd_phy_tuning gs101_tunes_pipe3_preinit[] = { PHY_TUNING_ENTRY_PMA(0x09e0, -1, 0x00), PHY_TUNING_ENTRY_PMA(0x09e4, -1, 0x36), PHY_TUNING_ENTRY_PMA(0x1e7c, -1, 0x06), - PHY_TUNING_ENTRY_PMA(0x1e90, -1, 0x00), - PHY_TUNING_ENTRY_PMA(0x1e94, -1, 0x36), + PHY_TUNING_ENTRY_PMA(0x19e0, -1, 0x00), + PHY_TUNING_ENTRY_PMA(0x19e4, -1, 0x36), + /* fix bootloader bug */ + PHY_TUNING_ENTRY_PMA(0x1e90, -1, 0x02), + PHY_TUNING_ENTRY_PMA(0x1e94, -1, 0x0b), /* improve LVCC */ PHY_TUNING_ENTRY_PMA(0x08f0, -1, 0x30), PHY_TUNING_ENTRY_PMA(0x18f0, -1, 0x30),