From nobody Thu Mar 19 05:42:59 2026 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) (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 040D92C17B3; Fri, 6 Mar 2026 13:25:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772803552; cv=pass; b=rPh1CM++y936w3nehIEKoWpOK2JX2sOXzuPLCNdcm8QZ7D16QiMU3yz4BW6/AI3WCKSpPnXsMJsRDgOSL8HYrZCtTcXDiGnjBtfkbetLctr+wE93Emj/hNXu46Z26s97kEd1uRl27oibpy5HmPZFG1BxojP57DVPSNo0WMudhw0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772803552; c=relaxed/simple; bh=PJ5yvU4W0/Vh1dh9lQZlr8y0s49rycOvcMwNqmR8+I4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WnC0A3loEf9ZSzmRWx/4pTJseJoc6pDXuj5Y20itSh0yW3KB2clKtEeqZ8oP1iV765V4D/ahd17d8g+LyXnC0QKbV3cg/zJMZn21GopPp7bAAIGrk0doTz3R/IU4q7AXUoCf40kWkS4eA8RwyjCa1IkrzzwJMRdjS//QOB8/k10= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b=MI2cKFq6; arc=pass smtp.client-ip=136.143.188.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b="MI2cKFq6" ARC-Seal: i=1; a=rsa-sha256; t=1772803521; cv=none; d=zohomail.com; s=zohoarc; b=mO9+6M42IgEaNHxKTlVAAi8Wsqc1K13ACsS1/L+MPDoLCYmome5LIX+QKPVlKuvETI4uFrvaHgasTF2q8bUseWhfFjkmAKjB68aHKLichyyZu27p98jyZboXpIWXrtpKN4x63F9fR7xnbH12lBZ7rPPw7oCU5e+I1Ri8VdgJSdo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772803521; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=boVWtyOAgFlCOZgXa/1igeIS/1/YVE4YvcdDUJwkhuU=; b=UD4zAvgePQC1l7euwhHmCTe/rmd/LEgYk6a5e9eip/1p7ve6i72czoNmbtE6sEztGJYRnpkjIbD3usvsIvveIrBFkaRCZQGIFrfbi8+7B29/q3eNcWb/H2A2JrpM7TuwMm+1jYZ3p7vZZsm5OCPe25b9Qm9y2OJYtCoFrqfXOSc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1772803521; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:Date:Date:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Message-Id:References:In-Reply-To:To:To:Cc:Cc:Reply-To; bh=boVWtyOAgFlCOZgXa/1igeIS/1/YVE4YvcdDUJwkhuU=; b=MI2cKFq6VCAMRguC6I2Rgy6I+xpJCJZ8nnrgC3Gg67TsVce3YCQYVgaZzXumtgiw BVWMAml8/X06kPfD3X74bKdrkXFEhOMm4SUICXYXFBeEO55uAmUeYDSGWHaL2UJJ0tP F5K22n8oAlOnuCYwBcfKtrdkRGJmhzs99AoT/P/k= Received: by mx.zohomail.com with SMTPS id 177280351997021.693424668743432; Fri, 6 Mar 2026 05:25:19 -0800 (PST) From: Nicolas Frattaroli Date: Fri, 06 Mar 2026 14:24:44 +0100 Subject: [PATCH v9 03/23] dt-bindings: ufs: mediatek,ufs: Add mt8196 variant Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260306-mt8196-ufs-v9-3-55b073f7a830@collabora.com> References: <20260306-mt8196-ufs-v9-0-55b073f7a830@collabora.com> In-Reply-To: <20260306-mt8196-ufs-v9-0-55b073f7a830@collabora.com> To: Alim Akhtar , Avri Altman , Bart Van Assche , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Peter Wang , Stanley Jhu , "James E.J. Bottomley" , "Martin K. Petersen" , Philipp Zabel , Liam Girdwood , Mark Brown , Chaotian Jing , Neil Armstrong Cc: Louis-Alexis Eyraud , kernel@collabora.com, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, Nicolas Frattaroli , Conor Dooley X-Mailer: b4 0.14.3 The MediaTek MT8196 SoC's UFS controller uses three additional clocks compared to the MT8195, and a different set of supplies. It is therefore not compatible with the MT8195. While it does have a AVDD09_UFS_1 pin in addition to the AVDD09_UFS pin, it appears that these two pins are commoned together, as the board schematic I have access to uses the same supply for both, and the downstream driver does not distinguish between the two supplies either. Add a compatible for it, and modify the binding correspondingly. Reviewed-by: Conor Dooley Acked-by: Vinod Koul Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nicolas Frattaroli --- .../devicetree/bindings/ufs/mediatek,ufs.yaml | 58 ++++++++++++++++++= +++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Docu= mentation/devicetree/bindings/ufs/mediatek,ufs.yaml index e0aef3e5f56b..a82119ecbfe8 100644 --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml @@ -16,10 +16,11 @@ properties: - mediatek,mt8183-ufshci - mediatek,mt8192-ufshci - mediatek,mt8195-ufshci + - mediatek,mt8196-ufshci =20 clocks: minItems: 1 - maxItems: 13 + maxItems: 16 =20 clock-names: minItems: 1 @@ -37,6 +38,9 @@ properties: - const: crypt_perf - const: ufs_rx_symbol0 - const: ufs_rx_symbol1 + - const: ufs_sel + - const: ufs_sel_min_src + - const: ufs_sel_max_src =20 operating-points-v2: true =20 @@ -131,9 +135,27 @@ allOf: properties: clocks: minItems: 13 + maxItems: 13 clock-names: minItems: 13 + maxItems: 13 avdd09-supply: false + - if: + properties: + compatible: + contains: + const: mediatek,mt8196-ufshci + then: + properties: + clocks: + minItems: 16 + maxItems: 16 + clock-names: + minItems: 16 + maxItems: 16 + avdd18-supply: false + required: + - operating-points-v2 =20 examples: - | @@ -183,3 +205,37 @@ examples: =20 mediatek,ufs-disable-mcq; }; + - | + #include + #include + + ufshci@16810000 { + compatible =3D "mediatek,mt8196-ufshci"; + reg =3D <0x16810000 0x2a00>; + interrupts =3D ; + + clocks =3D <&ufs_ao_clk 6>, <&ufs_ao_clk 7>, <&clk26m>, <&ufs_ao_c= lk 3>, + <&clk26m>, <&ufs_ao_clk 4>, <&ufs_ao_clk 0>, + <&topckgen 7>, <&topckgen 41>, <&topckgen 105>, <&topckge= n 83>, + <&ufs_ao_clk 1>, <&ufs_ao_clk 2>, <&topckgen 42>, + <&topckgen 84>, <&topckgen 102>; + clock-names =3D "ufs", "ufs_aes", "ufs_tick", "unipro_sysclk", + "unipro_tick", "unipro_mp_bclk", "ufs_tx_symbol", + "ufs_mem_sub", "crypt_mux", "crypt_lp", "crypt_perf", + "ufs_rx_symbol0", "ufs_rx_symbol1", "ufs_sel", + "ufs_sel_min_src", "ufs_sel_max_src"; + + operating-points-v2 =3D <&ufs_opp_table>; + + phys =3D <&ufsphy>; + + avdd09-supply =3D <&mt6363_vsram_modem>; + vcc-supply =3D <&mt6363_vemc>; + vccq-supply =3D <&mt6363_vufs12>; + + resets =3D <&ufs_ao_clk MT8196_UFSAO_RST1_UFS_UNIPRO>, + <&ufs_ao_clk MT8196_UFSAO_RST1_UFS_CRYPTO>, + <&ufs_ao_clk MT8196_UFSAO_RST1_UFSHCI>; + reset-names =3D "unipro", "crypto", "hci"; + mediatek,ufs-disable-mcq; + }; --=20 2.53.0