From nobody Tue Jun 16 09:00:07 2026 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (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 43BA6399344 for ; Fri, 17 Apr 2026 11:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776427113; cv=none; b=doOR+eK6QNusuxA7q15N62DoFjDS7nM5jfc5KSQDvnEWM+eh5g8MvcZVefe01Q5jD0DlwBjBV2fuFdXGrewf+k1BrPRBjD9cllpgtwF+4w47qjHHufjEor9MHB4/NTho/2K5TkUB6636tKg6oCgUkCUCtfggWhFZAzjNI3IvJY8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776427113; c=relaxed/simple; bh=9JIyl//kwjCYLNOV2103lot1jY0NX1t9FFIgbTT2W08=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=QZ0+VWUNXusqQH5edBuBwqCM8ofTYsn8p6ANnwr8sTx4PI3HbOs+QXWqJqItHR9Q6JqFjp4T+oAr/vz37UKG+qOCQgEfVlSuFv2kRQNs3otxVgzeNRy0lP26/+zCaGQOah2KG8rUUIIdBhgTTjcTiJMEdpuk7QX6QeYcyQAEMIU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=fdPaiD8Z; arc=none smtp.client-ip=203.254.224.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="fdPaiD8Z" Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20260417115828epoutp0373de2e3b93b5c5eae434c59cfa2749c2~nIwsJbEvG0632106321epoutp03W for ; Fri, 17 Apr 2026 11:58:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20260417115828epoutp0373de2e3b93b5c5eae434c59cfa2749c2~nIwsJbEvG0632106321epoutp03W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1776427108; bh=tAtME2oAeGw1VYgG3bdSyu5+5ymiofHX2zHNHbOWdQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fdPaiD8Zx/vk4Hv+SzdixP1t337+RoRvRzCGIB42UtelLLg7XWrrRAjO7wDGcW8uJ yPE4dcd725YVSCLRlgkDfHlrAPOenRNUplFz0OyeaNWNnlui4DHaSXYeySEAaaYC3W 5EbHIih47OJeWpCwCZOYJlTDoOLR8sswmYujvgKg= Received: from epsnrtp01.localdomain (unknown [182.195.42.153]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPS id 20260417115827epcas5p1678828b1a8e4c5476548edc8396421ad~nIwrOzL0R1376213762epcas5p1b; Fri, 17 Apr 2026 11:58:27 +0000 (GMT) Received: from epcas5p2.samsung.com (unknown [182.195.38.95]) by epsnrtp01.localdomain (Postfix) with ESMTP id 4fxtgk2M8Bz6B9m4; Fri, 17 Apr 2026 11:58:26 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20260417115825epcas5p15b81597e14c7ffcee59293e181f1ae1d~nIwpxwWSL0070100701epcas5p16; Fri, 17 Apr 2026 11:58:25 +0000 (GMT) Received: from bose.samsungds.net (unknown [107.108.83.9]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260417115819epsmtip2516c61249898d4b5efdf1361d9c0ede9~nIwj4foTf0979909799epsmtip2h; Fri, 17 Apr 2026 11:58:19 +0000 (GMT) From: Alim Akhtar To: avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, martin.petersen@oracle.com, krzk+dt@kernel.org Cc: sowon.na@samsung.com, peter.griffin@linaro.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Alim Akhtar Subject: [PATCH v2 1/4] arm64: dts: exynosautov920: Add syscon hsi2 node Date: Fri, 17 Apr 2026 17:44:49 +0530 Message-Id: <20260417121452.827054-2-alim.akhtar@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260417121452.827054-1-alim.akhtar@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260417115825epcas5p15b81597e14c7ffcee59293e181f1ae1d X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-543,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260417115825epcas5p15b81597e14c7ffcee59293e181f1ae1d References: <20260417121452.827054-1-alim.akhtar@samsung.com> Syscon HSI2 block has system configuration settings for HSI IPs, like ufs, usb etc. Add a syscon_hsi2 node entry so that related HSI controller can make use of the same. Signed-off-by: Sowon Na Signed-off-by: Alim Akhtar --- arch/arm64/boot/dts/exynos/exynosautov920.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi b/arch/arm64/bo= ot/dts/exynos/exynosautov920.dtsi index 0bf7c4cb9846..0eb853770732 100644 --- a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi +++ b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi @@ -1426,6 +1426,12 @@ cmu_hsi2: clock-controller@16b00000 { "ethernet"; }; =20 + syscon_hsi2: syscon@16c00000 { + compatible =3D "samsung,exynosautov920-hsi2-sysreg", + "syscon"; + reg =3D <0x16c00000 0x800>; + }; + pinctrl_hsi2: pinctrl@16c10000 { compatible =3D "samsung,exynosautov920-pinctrl"; reg =3D <0x16c10000 0x10000>; --=20 2.34.1 From nobody Tue Jun 16 09:00:07 2026 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (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 59A9D3793B0 for ; Fri, 17 Apr 2026 11:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776427128; cv=none; b=PUtfFoZSY2UXueevpQFlNKgDXPv3THicUNkZVCWsC4uY5JIgKOnSutWFiGEucuzUjBxv4lqEEW8SgcxpdF4UbMyEVlpd8hMsGmqmcYD0kJQhZezSWbXRT49VJ6ci0KvpOUfomXbIEGLfbnm4oA8ZXW2Tk811kr8k+YHskNqKx9I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776427128; c=relaxed/simple; bh=jVP74l+d42j9pCUDaqYNMTl1xTEGiV9aQbUauEXrTAw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=HFgykEPo5Y2ikGFRD6YuEEjCNTbnORemelXz9PznAbeh9idAbZYV/kQ6+kGNaibMJO/HSjzsAWPH6KZ7pRDcL80Rw3l+G5+6cnMtw8rkcQBSgKWTQc7GkJDebTYQrBeNQjLBzgfAlKGOYRnh+44hnMClGr8VJlK8fOIEQJDFjRQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=h61PXVi8; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="h61PXVi8" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20260417115844epoutp02b7615841ef9ce36169ae15be238c9d52~nIw7fbd9u1860918609epoutp02i for ; Fri, 17 Apr 2026 11:58:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20260417115844epoutp02b7615841ef9ce36169ae15be238c9d52~nIw7fbd9u1860918609epoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1776427124; bh=WkxI4lMMv9ujNsKgYtnd5P0MBRZIO8gABKqtfUpxztA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h61PXVi8G0+H2750ZHfGfrG2zYaKLBad6btBGrfYgqG5Ab6suGhWy0W9mBH1zUQmd PbIuK12V6deFuON+zh95+mW2ED+mNPv7GSJ+r9yX/ki9Z5FdSUR8WCeZIKfeS9aGhK n3C5+12A35e5Oyutfbh9JH2AqkTXwKm62Pb4xtgc= Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPS id 20260417115844epcas5p29a61996d89574b77c465771620720399~nIw6y05mB1627016270epcas5p2O; Fri, 17 Apr 2026 11:58:44 +0000 (GMT) Received: from epcas5p4.samsung.com (unknown [182.195.38.93]) by epsnrtp03.localdomain (Postfix) with ESMTP id 4fxth30btmz3hhT9; Fri, 17 Apr 2026 11:58:43 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20260417115842epcas5p1fb06d6f1663b97b1eae3aafaa6a3de0b~nIw5XBmH10152301523epcas5p1L; Fri, 17 Apr 2026 11:58:42 +0000 (GMT) Received: from bose.samsungds.net (unknown [107.108.83.9]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260417115836epsmtip25d8f2f024f7e0c2a04f1f016c96fbc41~nIw0LImmL1009810098epsmtip2D; Fri, 17 Apr 2026 11:58:36 +0000 (GMT) From: Alim Akhtar To: avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, martin.petersen@oracle.com, krzk+dt@kernel.org Cc: sowon.na@samsung.com, peter.griffin@linaro.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Alim Akhtar Subject: [PATCH v2 2/4] dt-bindings: ufs: exynos: add ExynosAutov920 compatible string Date: Fri, 17 Apr 2026 17:44:50 +0530 Message-Id: <20260417121452.827054-3-alim.akhtar@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260417121452.827054-1-alim.akhtar@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260417115842epcas5p1fb06d6f1663b97b1eae3aafaa6a3de0b X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-543,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260417115842epcas5p1fb06d6f1663b97b1eae3aafaa6a3de0b References: <20260417121452.827054-1-alim.akhtar@samsung.com> From: Sowon Na Add samsung,exynosautov920-ufs compatible for ExynosAutov920 SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Sowon Na Signed-off-by: Alim Akhtar Reviewed-by: Peter Griffin --- Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml = b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml index a7eb7ad85a94..710ce493f3b6 100644 --- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml @@ -19,6 +19,7 @@ properties: - samsung,exynos7-ufs - samsung,exynosautov9-ufs - samsung,exynosautov9-ufs-vh + - samsung,exynosautov920-ufs - tesla,fsd-ufs =20 reg: --=20 2.34.1 From nobody Tue Jun 16 09:00:07 2026 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (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 E04B23368B6 for ; Fri, 17 Apr 2026 11:58:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776427140; cv=none; b=VQHKC6drg79OQVFHinxYpN+Uu3L/IPluxMPC1vLtR3tb7jtoPTq1Tx6eIMvUoYPgY3L90RUv3dzGVQfWqHnMQcrVdoyZ2pmoGqONpWZnQ8ygJKNkD75+veLA4pbhXd3cztEir0y0r6uwImdJxgcp1tjBgshSgFykoRLX+vQQVXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776427140; c=relaxed/simple; bh=P4UERcC0BmDunlzQBPWNVv/Xldi6DJfCh7Cpgu6N/Ig=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=VdQ6l8nUVoZN8C6ztaQ+jOROJ34lmFwHsNo8eeNcFglD2De+djElC9LuW6pr0fPdttfVROjz7/1pE72/E9/oBWRU/m8JJTrnSQOrCpZmtefY18+zLV1GhC5FJBwRpv34QawiTCqiMY9R0Uofq59m2pAzR3pb1v5VswOItyn0mF0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=qz3kqZzr; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="qz3kqZzr" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20260417115856epoutp02f00278b739640e0e7b1303c849997ca4~nIxGxBwey2174221742epoutp02W for ; Fri, 17 Apr 2026 11:58:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20260417115856epoutp02f00278b739640e0e7b1303c849997ca4~nIxGxBwey2174221742epoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1776427136; bh=8EdPdiU4KsJ5gvlgsRREVXrpo7NEt6gYIdb33cKgTB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qz3kqZzrusED51nN8T5CobfpPI1RZDjJbxGiG+K5me/IG5wSV3ranbJ4HEhcBTods VjslQ0dmVNukKfvwi5/K7a2U1UVVuI25nhH9Tki4EA4XswdxfB21QWttiUx2dcsHP6 UMuD4Jq5zlQDb7Y9lXgXA2Cr+unZmI9gz7CgQ49g= Received: from epsnrtp04.localdomain (unknown [182.195.42.156]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPS id 20260417115856epcas5p36436a9aa58982f589e38cae1af21db53~nIxGRvcb-0411004110epcas5p3O; Fri, 17 Apr 2026 11:58:56 +0000 (GMT) Received: from epcas5p4.samsung.com (unknown [182.195.38.89]) by epsnrtp04.localdomain (Postfix) with ESMTP id 4fxthH3Bk1z6B9m6; Fri, 17 Apr 2026 11:58:55 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20260417115854epcas5p22e080e0804f24b76706350d08f13c158~nIxEvxdzr1381413814epcas5p21; Fri, 17 Apr 2026 11:58:54 +0000 (GMT) Received: from bose.samsungds.net (unknown [107.108.83.9]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260417115850epsmtip2214ba2275f669556dab19f6e6f10e313~nIxAxcfq00979809798epsmtip2L; Fri, 17 Apr 2026 11:58:49 +0000 (GMT) From: Alim Akhtar To: avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, martin.petersen@oracle.com, krzk+dt@kernel.org Cc: sowon.na@samsung.com, peter.griffin@linaro.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Alim Akhtar Subject: [PATCH v2 3/4] scsi: ufs: exynos: add support for ExynosAutov920 SoC Date: Fri, 17 Apr 2026 17:44:51 +0530 Message-Id: <20260417121452.827054-4-alim.akhtar@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260417121452.827054-1-alim.akhtar@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260417115854epcas5p22e080e0804f24b76706350d08f13c158 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-543,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260417115854epcas5p22e080e0804f24b76706350d08f13c158 References: <20260417121452.827054-1-alim.akhtar@samsung.com> From: Sowon Na Add a dedicated compatible and drv_data with associated hooks for ExynosAutov920 SoC. ExynosAutov920 has a different mask of UFS sharability from ExynosAutov9, so add related changes for the same. Signed-off-by: Sowon Na Signed-off-by: Alim Akhtar [Alim: fixed unintended changes, other fixes] --- drivers/ufs/host/ufs-exynos.c | 110 ++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 77a6c8e44485..b2f65c465525 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -97,6 +97,10 @@ #define UFS_EXYNOSAUTO_RD_SHARABLE BIT(1) #define UFS_EXYNOSAUTO_SHARABLE (UFS_EXYNOSAUTO_WR_SHARABLE | \ UFS_EXYNOSAUTO_RD_SHARABLE) +#define UFS_EXYNOSAUTOV920_WR_SHARABLE BIT(3) +#define UFS_EXYNOSAUTOV920_RD_SHARABLE BIT(2) +#define UFS_EXYNOSAUTOV920_SHARABLE (UFS_EXYNOSAUTOV920_WR_SHARABLE |\ + UFS_EXYNOSAUTOV920_RD_SHARABLE) #define UFS_GS101_WR_SHARABLE BIT(1) #define UFS_GS101_RD_SHARABLE BIT(0) #define UFS_GS101_SHARABLE (UFS_GS101_WR_SHARABLE | \ @@ -417,6 +421,95 @@ static int exynos7_ufs_post_pwr_change(struct exynos_u= fs *ufs, return 0; } =20 +static int exynosautov920_ufs_pre_link(struct exynos_ufs *ufs) +{ + struct ufs_hba *hba =3D ufs->hba; + int i; + u32 tx_line_reset_period, rx_line_reset_period; + + rx_line_reset_period =3D (RX_LINE_RESET_TIME * ufs->mclk_rate) + / NSEC_PER_MSEC; + tx_line_reset_period =3D (TX_LINE_RESET_TIME * ufs->mclk_rate) + / NSEC_PER_MSEC; + + unipro_writel(ufs, 0x5f, 0x44); + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x200), 0x40); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x202), 0x02); + + for_each_ufs_rx_lane(ufs, i) { + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_RX_CLK_PRD, i), + DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_RX_CLK_PRD_EN, i), 0x0); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_RX_LINERESET_VALUE2, i), + (rx_line_reset_period >> 16) & 0xFF); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_RX_LINERESET_VALUE1, i), + (rx_line_reset_period >> 8) & 0xFF); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_RX_LINERESET_VALUE0, i), + (rx_line_reset_period) & 0xFF); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x2f, i), 0x69); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x84, i), 0x1); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x25, i), 0xf6); + } + + for_each_ufs_tx_lane(ufs, i) { + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_TX_CLK_PRD, i), + DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_TX_CLK_PRD_EN, i), + 0x02); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_TX_LINERESET_PVALUE2, i), + (tx_line_reset_period >> 16) & 0xFF); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_TX_LINERESET_PVALUE1, i), + (tx_line_reset_period >> 8) & 0xFF); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(VND_TX_LINERESET_PVALUE0, i), + (tx_line_reset_period) & 0xFF); + + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x04, i), 0x1); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x7f, i), 0x0); + } + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x200), 0x0); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_LOCAL_TX_LCC_ENABLE), 0x0); + ufshcd_dme_set(hba, UIC_ARG_MIB(0xa011), 0x8000); + + return 0; +} + +static int exynosautov920_ufs_post_link(struct exynos_ufs *ufs) +{ + struct ufs_hba *hba =3D ufs->hba; + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x9529), 0x1); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x15a4), 0x3e8); + ufshcd_dme_set(hba, UIC_ARG_MIB(0x9529), 0x0); + + return 0; +} + +static int exynosautov920_ufs_pre_pwr_change(struct exynos_ufs *ufs, + struct ufs_pa_layer_attr *pwr) +{ + struct ufs_hba *hba =3D ufs->hba; + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x15d4), 0x1); + + ufshcd_dme_set(hba, UIC_ARG_MIB(DL_FC0PROTTIMEOUTVAL), 8064); + ufshcd_dme_set(hba, UIC_ARG_MIB(DL_TC0REPLAYTIMEOUTVAL), 28224); + ufshcd_dme_set(hba, UIC_ARG_MIB(DL_AFC0REQTIMEOUTVAL), 20160); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA0), 12000); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA1), 32000); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA2), 16000); + + unipro_writel(ufs, 8064, UNIPRO_DME_POWERMODE_REQ_LOCALL2TIMER0); + unipro_writel(ufs, 28224, UNIPRO_DME_POWERMODE_REQ_LOCALL2TIMER1); + unipro_writel(ufs, 20160, UNIPRO_DME_POWERMODE_REQ_LOCALL2TIMER2); + unipro_writel(ufs, 12000, UNIPRO_DME_POWERMODE_REQ_REMOTEL2TIMER0); + unipro_writel(ufs, 32000, UNIPRO_DME_POWERMODE_REQ_REMOTEL2TIMER1); + unipro_writel(ufs, 16000, UNIPRO_DME_POWERMODE_REQ_REMOTEL2TIMER2); + + return 0; +} + /* * exynos_ufs_auto_ctrl_hcc - HCI core clock control by h/w * Control should be disabled in the below cases @@ -2201,6 +2294,21 @@ static const struct exynos_ufs_drv_data gs101_ufs_dr= vs =3D { .suspend =3D gs101_ufs_suspend, }; =20 +static const struct exynos_ufs_drv_data exynosautov920_ufs_drvs =3D { + .uic_attr =3D &exynos7_uic_attr, + .quirks =3D UFSHCD_QUIRK_SKIP_DEF_UNIPRO_TIMEOUT_SETTING, + .opts =3D EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL | + EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR | + EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX | + EXYNOS_UFS_OPT_TIMER_TICK_SELECT, + .iocc_mask =3D UFS_EXYNOSAUTOV920_SHARABLE, + .drv_init =3D exynosauto_ufs_drv_init, + .post_hce_enable =3D exynosauto_ufs_post_hce_enable, + .pre_link =3D exynosautov920_ufs_pre_link, + .post_link =3D exynosautov920_ufs_post_link, + .pre_pwr_change =3D exynosautov920_ufs_pre_pwr_change, +}; + static const struct of_device_id exynos_ufs_of_match[] =3D { { .compatible =3D "google,gs101-ufs", .data =3D &gs101_ufs_drvs }, @@ -2210,6 +2318,8 @@ static const struct of_device_id exynos_ufs_of_match[= ] =3D { .data =3D &exynosauto_ufs_drvs }, { .compatible =3D "samsung,exynosautov9-ufs-vh", .data =3D &exynosauto_ufs_vh_drvs }, + { .compatible =3D "samsung,exynosautov920-ufs", + .data =3D &exynosautov920_ufs_drvs }, { .compatible =3D "tesla,fsd-ufs", .data =3D &fsd_ufs_drvs }, {}, --=20 2.34.1 From nobody Tue Jun 16 09:00:07 2026 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (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 3E8AA3921CA for ; Fri, 17 Apr 2026 11:59:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776427153; cv=none; b=CjZFaIPR7aUFwfrbDha3yvPGUm97iynib4VOcASN8dKuRZHK5CCllhmDdPl8r+fOoNIvFk94cb2Zs0rPmNxcdK8NZu7oHvf/i7p4w8z1Qy+omzNTTAECoZ+MFslkjD8AIjD5cPT0VO8kWrhfon2q5C6MuXZJ20q7o8yZOnq2NHk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776427153; c=relaxed/simple; bh=K02Snn3IVf1p6+hyNMpPD51fWmtuska6FUViGDQ8eiY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=sidm88iq63lwBhNp7Zsgokk4uo0B3CbPFO+KPkwSGmkmfkAB+ODc2g9atHShYyfz0zVGmpLOYcduWXmC7MQTt80oKoADAeJtm/NnO0oqK2uiWFl9GHixp9nRnIPM/kEHzp7QgFpWbss7umvc9rH/so+UyaepTrGpJjbJxqzCjHY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=pYNPcNvJ; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="pYNPcNvJ" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20260417115910epoutp0139f9b1d7b06c38f0d24d188921c29e6a~nIxTF5qp50060600606epoutp01L for ; Fri, 17 Apr 2026 11:59:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20260417115910epoutp0139f9b1d7b06c38f0d24d188921c29e6a~nIxTF5qp50060600606epoutp01L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1776427150; bh=ojLXeHbC5TlNvceo/oEDKPeYBz7Ith8Rtaarof/EAdA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pYNPcNvJLqlSsBte0b8lToSabkE7VGI1k5JSrnVkXcNWxg5Xa2XkfBlGRhdVZC4rQ 3hmfKy/6USLFarcGY0nPZfa4G+j0jNTJYUR50VGeeA50OyKUBOfXyP8A6DoPjTXC8H WtkUMbEvALt13VpFVrA2yVDuIOLLaNY77KRKjkLw= Received: from epsnrtp02.localdomain (unknown [182.195.42.154]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPS id 20260417115909epcas5p14de402e43845f76bdabf7f7cf66ca66f~nIxSpTAUE0070100701epcas5p1s; Fri, 17 Apr 2026 11:59:09 +0000 (GMT) Received: from epcas5p1.samsung.com (unknown [182.195.38.89]) by epsnrtp02.localdomain (Postfix) with ESMTP id 4fxthX4GWwz2SSKY; Fri, 17 Apr 2026 11:59:08 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20260417115908epcas5p1450496b1b2e333ec1d07c18afd32540c~nIxRMJUh82797527975epcas5p1S; Fri, 17 Apr 2026 11:59:08 +0000 (GMT) Received: from bose.samsungds.net (unknown [107.108.83.9]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260417115901epsmtip2622e58a34699ed1d26ffef78ef3abfe4~nIxLLmJkE0979809798epsmtip2Y; Fri, 17 Apr 2026 11:59:01 +0000 (GMT) From: Alim Akhtar To: avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, martin.petersen@oracle.com, krzk+dt@kernel.org Cc: sowon.na@samsung.com, peter.griffin@linaro.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Alim Akhtar Subject: [PATCH v2 4/4] arm64: dts: exynosautov920: enable support for ufs controller Date: Fri, 17 Apr 2026 17:44:52 +0530 Message-Id: <20260417121452.827054-5-alim.akhtar@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260417121452.827054-1-alim.akhtar@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260417115908epcas5p1450496b1b2e333ec1d07c18afd32540c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-543,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260417115908epcas5p1450496b1b2e333ec1d07c18afd32540c References: <20260417121452.827054-1-alim.akhtar@samsung.com> From: Sowon Na Add ufs node for ExynosAutov920 SoC. Also enable ufs_phy and ufs controller nodes. Signed-off-by: Sowon Na Signed-off-by: Alim Akhtar --- .../boot/dts/exynos/exynosautov920-sadk.dts | 8 +++++++ .../arm64/boot/dts/exynos/exynosautov920.dtsi | 21 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts b/arch/arm6= 4/boot/dts/exynos/exynosautov920-sadk.dts index a397f068ed53..5873720c213e 100644 --- a/arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts +++ b/arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts @@ -83,6 +83,14 @@ &usi_0 { status =3D "okay"; }; =20 +&ufs_0 { + status =3D "okay"; +}; + +&ufs_0_phy { + status =3D "okay"; +}; + &xtcxo { clock-frequency =3D <38400000>; }; diff --git a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi b/arch/arm64/bo= ot/dts/exynos/exynosautov920.dtsi index 0eb853770732..f1f5efcdb91e 100644 --- a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi +++ b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi @@ -1444,6 +1444,27 @@ pinctrl_hsi2ufs: pinctrl@16d20000 { interrupts =3D ; }; =20 + ufs_0: ufs@16e00000 { + compatible =3D "samsung,exynosautov920-ufs"; + reg =3D <0x16e00000 0x100>, + <0x16e01100 0x400>, + <0x16e80000 0x8000>, + <0x16d08000 0x800>; + reg-names =3D "hci", "vs_hci", "unipro", "ufsp"; + interrupts =3D ; + clocks =3D <&cmu_hsi2 CLK_MOUT_HSI2_UFS_EMBD_USER>, + <&cmu_hsi2 CLK_MOUT_HSI2_NOC_UFS_USER>; + clock-names =3D "core_clk", "sclk_unipro_main"; + freq-table-hz =3D <0 0>, <0 0>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&ufs_rst_n &ufs_refclk_out>; + phys =3D <&ufs_0_phy>; + phy-names =3D "ufs-phy"; + samsung,sysreg =3D <&syscon_hsi2 0x710>; + dma-coherent; + status =3D "disabled"; + }; + ufs_0_phy: phy@16e04000 { compatible =3D "samsung,exynosautov920-ufs-phy"; reg =3D <0x16e04000 0x4000>; --=20 2.34.1