From nobody Mon Mar 7 16:00:07 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D199E19F7683; Mon, 7 Mar 2022 16:00:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KC37r1yW5z4S4m; Mon, 7 Mar 2022 16:00:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646668808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bQz+FK1+LiVeGFrS51UvBVTincOJGq+8QQwmSGLRsfo=; b=lUpGrzSOR15pwCvVOv2Hhk3ztrO6unzwauB0o5AvhFQ+44kO/lXTFTMh2brHBpmIkviTx1 sNZ5XnPfo6NtxZx0gRkFzbblhenuWXHo7Sz03qmyA7L0rE5DPNEd5Ri7NXY7arCNFvbw+D QLptjCXaQ93XbK+vrYHkxSefvzUYzzjTFbVFFuZmOnmm/6Yhrx0ZREnm4F/o7oT8g1jHdB LzRkm2A/dMa3V2JTmRmEHfdV4wFKx6RSULcPGMmGIsQDKCrEtBH1U4vIe26I8WLWs/7B32 6BCODGMiCDdeTIXn4/9W8iuQ+z56OF87QkGlfr5Q/vvcw7fqG+cLbPLNOaNStQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBC813392; Mon, 7 Mar 2022 16:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 227G07Nm066596; Mon, 7 Mar 2022 16:00:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 227G07G3066594; Mon, 7 Mar 2022 16:00:07 GMT (envelope-from git) Date: Mon, 7 Mar 2022 16:00:07 GMT Message-Id: <202203071600.227G07G3066594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marcin Wojtas Subject: git: 68be9ab5bd53 - stable/13 - sdhci_xenon: allow to properly disable the UHS signaling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 68be9ab5bd532e8dbae5fff50c0bb836d2a21645 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646668808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bQz+FK1+LiVeGFrS51UvBVTincOJGq+8QQwmSGLRsfo=; b=X78TtLpbVjo5okDJ1bMatYcCcQ7LJcHt+Wl8uLP/5au/zrQasbIu3e+s/8BoHF2yE5YelL 4ygfIHrcrTOkLtBxKbCbkwSgjQ4gbztekFLgabm75FHZa9I8xUnwwHKicKtvz37q/2IWPg 2VqQQBvWgWJVdwQTnOyH88ODY017R1QXQOKvZfwSBXKWg1Jn8tENiX8GrAxxRc4jhf+iSk y2FUFHfZlQ6sRjYFHF/72Yl8JjwkhDmAoKdgAHtwG6+vqilqTwhcmccITwezpsUkO5prf6 wBbTVBxyLjIxbm4Za2XHFyvdtdNFYiLgEorPhrfCdNm+CCrwJIzl2JaKu46AUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646668808; a=rsa-sha256; cv=none; b=wtW5vDXrfF3IrrA9XYRX0LahXFaMqCzSWgQDKcTLkp2r0UJx1Vmw72QTg9VuBi3wsWkNSd jPyTN155Sp5MVEyDIpx3pXJpfR61FvFbjSrT1DBYPjv4Jy6QyuRcVaodq6FscJ7nUMSTg9 SNjjhbg0+EcVIEnFxF0c3vmrubBsr/F8CAv+teR8GJCkHM99+u8FETfUXL3By0iSjGJtfV SjzWgjZNlkNl0xNzSuxEDo5NeiSNYKpk77vaegbC4EYZwaRO6vKWOk7asjiydPhtkOumVM y06hj1b0afs0ozDtit5vOsJYEEA78bs+VteumyYh/ULTdvrtJSCBP31UMKummw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=68be9ab5bd532e8dbae5fff50c0bb836d2a21645 commit 68be9ab5bd532e8dbae5fff50c0bb836d2a21645 Author: Marcin Wojtas AuthorDate: 2021-05-27 17:48:17 +0000 Commit: Marcin Wojtas CommitDate: 2022-03-07 15:59:50 +0000 sdhci_xenon: allow to properly disable the UHS signaling Until now the "no-1-8-v" DT flag wrongly disabled the SDHCI_CAN_VDD_180 - slot 1.8V power supply capability, whereas it refers to the signaling voltage. Fix the sdhci_xenon_read_4 and allow to disable the UHS modes depending on the DT property or PHY slow mode. While at it - make sure the unsupported 1.2V signaling is always disabled and not reported in the bootverbose log. Reviewed by: manu Obtained from: Semihalf Sponsored by: Marvell Differential Revision: https://reviews.freebsd.org/D30563 MFC after: 2 weeks (cherry picked from commit df868762841b93d934413651818e510ea443def8) --- sys/dev/sdhci/sdhci_xenon.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/dev/sdhci/sdhci_xenon.c b/sys/dev/sdhci/sdhci_xenon.c index c230f0ef9752..f92d02608abb 100644 --- a/sys/dev/sdhci/sdhci_xenon.c +++ b/sys/dev/sdhci/sdhci_xenon.c @@ -141,13 +141,8 @@ sdhci_xenon_read_4(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off) { struct sdhci_xenon_softc *sc = device_get_softc(dev); - uint32_t val32; - val32 = bus_read_4(sc->mem_res, off); - if (off == SDHCI_CAPABILITIES && sc->no_18v) - val32 &= ~SDHCI_CAN_VDD_180; - - return (val32); + return bus_read_4(sc->mem_res, off); } static void @@ -519,6 +514,13 @@ sdhci_xenon_attach(device_t dev) if (sdhci_init_slot(dev, sc->slot, 0)) goto fail; + /* 1.2V signaling is not supported. */ + sc->slot->host.caps &= ~MMC_CAP_SIGNALING_120; + + /* Disable UHS in case of lack of 1.8V VCCQ or the PHY slow mode. */ + if (sc->no_18v || sc->slow_mode) + sc->slot->host.caps &= ~MMC_CAP_SIGNALING_180; + /* Activate the interrupt */ err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE, NULL, sdhci_xenon_intr, sc, &sc->intrhand);