From patchwork Thu Dec 15 16:12:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lux Aliaga X-Patchwork-Id: 13074317 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56585C4332F for ; Thu, 15 Dec 2022 16:13:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229852AbiLOQNW (ORCPT ); Thu, 15 Dec 2022 11:13:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbiLOQNU (ORCPT ); Thu, 15 Dec 2022 11:13:20 -0500 Received: from amity.mint.lgbt (vmi888983.contaboserver.net [149.102.157.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E10D31ED8 for ; Thu, 15 Dec 2022 08:13:19 -0800 (PST) Received: from amity.mint.lgbt (mx.mint.lgbt [127.0.0.1]) by amity.mint.lgbt (Postfix) with ESMTP id 4NXy2P4pQCz1S5Cx for ; Thu, 15 Dec 2022 11:13:17 -0500 (EST) Authentication-Results: amity.mint.lgbt (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=mint.lgbt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mint.lgbt; h= content-transfer-encoding:mime-version:x-mailer:message-id:date :subject:to:from; s=dkim; t=1671120797; x=1671984798; bh=We5xjhG qrFdJQxR93Npt09VH/7a6fXPhQTRN9HYr93I=; b=MRpzEE+Z7zP8IwDwvLo5Gf0 O0JrPZxOnieXnJjS2Ntj/BMqdVROkik02wrU7SLH83iBh6fC0KBB2y5PRdgGwzdq QqLsJSk2IWWDxJ0ev2kZxO/xzCu+E75dp8m/ZGo4MhOPPdtrtuawGdoK8YjeG9UU nYY+uW/NH9AhuOyBEbaK9R1Y7MFvut1mEmHb+veTNyLU1/5tgn5vFe5jUqlK/tlN w6GOFqVo5lhC4ulaIWbkWoP77PUNMIU+5jizpcUKr7t67YE9THqBVV0u0ESqyjsi LxvFmPJR1q4gWfCOlRYOC0UapZwqv9fQCmBRe9acQ07NVX89ERy4vLyrI+ymQoQ= = X-Virus-Scanned: amavisd-new at amity.mint.lgbt Received: from amity.mint.lgbt ([127.0.0.1]) by amity.mint.lgbt (amity.mint.lgbt [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0AHQjgW4Tqin for ; Thu, 15 Dec 2022 11:13:17 -0500 (EST) Received: from dorothy.. (unknown [190.196.92.66]) by amity.mint.lgbt (Postfix) with ESMTPSA id 4NXy2H493zz1S4t9; Thu, 15 Dec 2022 11:13:11 -0500 (EST) From: Lux Aliaga To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Alim Akhtar , Avri Altman , Bart Van Assche , Rob Herring , Krzysztof Kozlowski Cc: Lux Aliaga , linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] dt-bindings: ufs: qcom: Add SM6125 compatible string Date: Thu, 15 Dec 2022 13:12:54 -0300 Message-Id: <20221215161258.355962-1-they@mint.lgbt> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the compatible for UFS found on the SM6125. Signed-off-by: Lux Aliaga --- Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml index b517d76215e3..42422f3471b3 100644 --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml @@ -29,6 +29,7 @@ properties: - qcom,sc8280xp-ufshc - qcom,sdm845-ufshc - qcom,sm6115-ufshc + - qcom,sm6125-ufshc - qcom,sm6350-ufshc - qcom,sm8150-ufshc - qcom,sm8250-ufshc @@ -185,6 +186,7 @@ allOf: contains: enum: - qcom,sm6115-ufshc + - qcom,sm6125-ufshc then: properties: clocks: From patchwork Thu Dec 15 16:12:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lux Aliaga X-Patchwork-Id: 13074318 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73AFCC4708D for ; Thu, 15 Dec 2022 16:13:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230004AbiLOQN0 (ORCPT ); Thu, 15 Dec 2022 11:13:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbiLOQNX (ORCPT ); Thu, 15 Dec 2022 11:13:23 -0500 Received: from amity.mint.lgbt (vmi888983.contaboserver.net [149.102.157.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 436A931EDE for ; Thu, 15 Dec 2022 08:13:22 -0800 (PST) Received: from amity.mint.lgbt (mx.mint.lgbt [127.0.0.1]) by amity.mint.lgbt (Postfix) with ESMTP id 4NXy2T1JVkz1S5Cv for ; Thu, 15 Dec 2022 11:13:21 -0500 (EST) Authentication-Results: amity.mint.lgbt (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=mint.lgbt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mint.lgbt; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:subject:to:from; s=dkim; t=1671120800; x=1671984801; bh=Irou/jzd1lgXgUmRB7RpTJY6l28jd5AcbgvMowyLhKM=; b= ccbWoBG0dqLWb/jNFg9ZZiNOZdz1PP4ZRbK8PwjAwaqX7/nQW6WarL+pU2uB1Vs0 q8bD1DasixmsojhZBG7jo+6wtsR3Y+roQRqSmCRHKJDRDd1y21saWjVIIZwl8M3q QvzssGsgPWLpjbRloyMYWdu2q/lNvbkDhRqGswObdbfDP9x7SLqnKqfCXEuPShXW kb2ql0h8yDyjzMeETqHcE8EL0owQJr0q0nZzAfYqTbY0dN8c5XldUvnAWNnLQClb mQdjHKEtPh29/A9NJFzoIhpA2DfX8Vx40NRptbhdu8fm3Q/5HvsO9eFj7sORKksa fgsaVDARb8oir5wjHy6ATg== X-Virus-Scanned: amavisd-new at amity.mint.lgbt Received: from amity.mint.lgbt ([127.0.0.1]) by amity.mint.lgbt (amity.mint.lgbt [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FU76AAQzM0A7 for ; Thu, 15 Dec 2022 11:13:20 -0500 (EST) Received: from dorothy.. (unknown [190.196.92.66]) by amity.mint.lgbt (Postfix) with ESMTPSA id 4NXy2N4sxXz1S52g; Thu, 15 Dec 2022 11:13:16 -0500 (EST) From: Lux Aliaga To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: Lux Aliaga , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] arm64: dts: qcom: sm6125: Add UFS nodes Date: Thu, 15 Dec 2022 13:12:55 -0300 Message-Id: <20221215161258.355962-2-they@mint.lgbt> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221215161258.355962-1-they@mint.lgbt> References: <20221215161258.355962-1-they@mint.lgbt> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Adds a UFS host controller node and its corresponding PHY to the sm6125 platform. Signed-off-by: Lux Aliaga --- arch/arm64/boot/dts/qcom/sm6125.dtsi | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi index 7e25a4f85594..6d4534c7a2fe 100644 --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi @@ -508,6 +508,72 @@ sdhc_2: mmc@4784000 { status = "disabled"; }; + ufs_mem_hc: ufs@4804000 { + compatible = "qcom,sm6125-ufshc", "qcom,ufshc", "jedec,ufs-2.0"; + reg = <0x04804000 0x3000>, <0x04810000 0x8000>; + reg-names = "std", "ice"; + interrupts = ; + phys = <&ufs_mem_phy_lanes>; + phy-names = "ufsphy"; + lanes-per-direction = <1>; + #reset-cells = <1>; + resets = <&gcc GCC_UFS_PHY_BCR>; + reset-names = "rst"; + + clock-names = "core_clk", + "bus_aggr_clk", + "iface_clk", + "core_clk_unipro", + "ref_clk", + "tx_lane0_sync_clk", + "rx_lane0_sync_clk", + "ice_core_clk"; + clocks = <&gcc GCC_UFS_PHY_AXI_CLK>, + <&gcc GCC_SYS_NOC_UFS_PHY_AXI_CLK>, + <&gcc GCC_UFS_PHY_AHB_CLK>, + <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>, + <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>, + <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>, + <&gcc GCC_UFS_PHY_ICE_CORE_CLK>; + freq-table-hz = <50000000 240000000>, + <0 0>, + <0 0>, + <37500000 150000000>, + <0 0>, + <0 0>, + <0 0>, + <75000000 300000000>; + + non-removable; + status = "disabled"; + }; + + ufs_mem_phy: phy@4807000 { + compatible = "qcom,sm6115-qmp-ufs-phy"; + reg = <0x04807000 0x1c4>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + power-domains = <&gcc UFS_PHY_GDSC>; + + clock-names = "ref", "ref_aux"; + clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>, + <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; + + resets = <&ufs_mem_hc 0>; + reset-names = "ufsphy"; + status = "disabled"; + + ufs_mem_phy_lanes: lanes@4807400 { + reg = <0x4807400 0x098>, + <0x4807600 0x130>, + <0x4807c00 0x16c>; + #phy-cells = <0>; + }; + }; + usb3: usb@4ef8800 { compatible = "qcom,sm6125-dwc3", "qcom,dwc3"; reg = <0x04ef8800 0x400>; From patchwork Thu Dec 15 16:12:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lux Aliaga X-Patchwork-Id: 13074319 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35560C4332F for ; Thu, 15 Dec 2022 16:13:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbiLOQNk (ORCPT ); Thu, 15 Dec 2022 11:13:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230020AbiLOQN1 (ORCPT ); Thu, 15 Dec 2022 11:13:27 -0500 Received: from amity.mint.lgbt (vmi888983.contaboserver.net [149.102.157.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8381632B82 for ; Thu, 15 Dec 2022 08:13:26 -0800 (PST) Received: from amity.mint.lgbt (mx.mint.lgbt [127.0.0.1]) by amity.mint.lgbt (Postfix) with ESMTP id 4NXy2X6nc6z1S5Cv for ; Thu, 15 Dec 2022 11:13:24 -0500 (EST) Authentication-Results: amity.mint.lgbt (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=mint.lgbt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mint.lgbt; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:subject:to:from; s=dkim; t=1671120804; x=1671984805; bh=BwIstb6Vcy6GBr5AVEBX3Pw+BjQB82y3dXmIkGVFlBQ=; b= XM1Ac4MXHpRcYEnqddQAp2OqLCc5nPQQcBveHYsJBFUzihrX1PEGQJnAttjH5L0i NGVjG8+1qo509I45Uhot7cTPadJMQzyIXZG1Qo3gJ8FphOt+PvCIn5FvwcYsMx2h 8PTBPvS5PTT11b3KijqBe3EKvrYlrSmy7q0Z55LM5QpgXq2X5ngJ+SGTxsthhmVD SM5DWTNUoOMIhYrju3ylXb2NYWGn6d54dzV8NhPNii8V3FqxE6e2H67h6HSj+eIG aO4xbKAz26DSbp2ysdUG2aYj8rr+Qbz4K2PO6cLqIhSOTM3jD61FgWb37RAvvogx 2sA739iNu2RGnQG/p/f0sA== X-Virus-Scanned: amavisd-new at amity.mint.lgbt Received: from amity.mint.lgbt ([127.0.0.1]) by amity.mint.lgbt (amity.mint.lgbt [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aP8SZDYwkPHe for ; Thu, 15 Dec 2022 11:13:24 -0500 (EST) Received: from dorothy.. (unknown [190.196.92.66]) by amity.mint.lgbt (Postfix) with ESMTPSA id 4NXy2T01NYz1S4tN; Thu, 15 Dec 2022 11:13:20 -0500 (EST) From: Lux Aliaga To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: Lux Aliaga , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] dt-bindings: arm: qcom: Document xiaomi,laurel-sprout board Date: Thu, 15 Dec 2022 13:12:56 -0300 Message-Id: <20221215161258.355962-3-they@mint.lgbt> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221215161258.355962-1-they@mint.lgbt> References: <20221215161258.355962-1-they@mint.lgbt> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the Xiaomi Mi A3 (xiaomi-laurel-sprout) smartphone which is based on the Snapdragon 665 SoC. Signed-off-by: Lux Aliaga --- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index 27063a045bd0..4923dafb5d7a 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -793,6 +793,7 @@ properties: - items: - enum: - sony,pdx201 + - xiaomi,laurel-sprout - const: qcom,sm6125 - items: From patchwork Thu Dec 15 16:12:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lux Aliaga X-Patchwork-Id: 13074321 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A3E5C4332F for ; Thu, 15 Dec 2022 16:14:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230160AbiLOQOK (ORCPT ); Thu, 15 Dec 2022 11:14:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230162AbiLOQNi (ORCPT ); Thu, 15 Dec 2022 11:13:38 -0500 Received: from amity.mint.lgbt (vmi888983.contaboserver.net [149.102.157.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D41236D43 for ; Thu, 15 Dec 2022 08:13:32 -0800 (PST) Received: from amity.mint.lgbt (mx.mint.lgbt [127.0.0.1]) by amity.mint.lgbt (Postfix) with ESMTP id 4NXy2g0lHJz1S5C8 for ; Thu, 15 Dec 2022 11:13:31 -0500 (EST) Authentication-Results: amity.mint.lgbt (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=mint.lgbt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mint.lgbt; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:subject:to:from; s=dkim; t=1671120809; x=1671984810; bh=Wvkp7XqnYI/KAj+VguaGEn8xLi6HtdKgx0xwpSAWqY8=; b= DXYLwiMF6N0xgdZWHrJ/gUoeOvtw6+2HQz+Yxrn/H/9mqRcWAz84ekwQKtMcfE6P UNLIaPTvsSFusqurCFfy8m4lpvihNNjkRezd5dUPC3Btc2mK6oS7l3v4wj7zRR4C 236ZxYjEkajP6nhcIye3m3kv61Kxwebz0M6HBEIsAzAUqNgtko430JdSYjA0GAVA mvaHweqcee1irKXw8v8qcKikSIiNfx2lOw7+TYFKS01LxNqCpADrwKIIc4hQWa+c O7HZU40uiPHT9PmmYzh4kj2JN3bz0C/51Ulfskk0F29e+bnY8/2E4/l9bUCqMfsf YBPDkVQf9upgssAYYvOSJA== X-Virus-Scanned: amavisd-new at amity.mint.lgbt Received: from amity.mint.lgbt ([127.0.0.1]) by amity.mint.lgbt (amity.mint.lgbt [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XM_2XkflM4Vk for ; Thu, 15 Dec 2022 11:13:29 -0500 (EST) Received: from dorothy.. (unknown [190.196.92.66]) by amity.mint.lgbt (Postfix) with ESMTPSA id 4NXy2Y235mz1S5D0; Thu, 15 Dec 2022 11:13:25 -0500 (EST) From: Lux Aliaga To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Kees Cook , Tony Luck , "Guilherme G. Piccoli" Cc: Lux Aliaga , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: [PATCH v2 4/4] arm64: dts: qcom: sm6125: Initial support for xiaomi-laurel-sprout Date: Thu, 15 Dec 2022 13:12:57 -0300 Message-Id: <20221215161258.355962-4-they@mint.lgbt> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221215161258.355962-1-they@mint.lgbt> References: <20221215161258.355962-1-they@mint.lgbt> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This commit implements support for the Xiaomi Mi A3 (xiaomi-laurel-sprout). Here's a summary on what's working. - dmesg output to bootloader preconfigured display - USB - UFS - SMD RPM regulators Signed-off-by: Lux Aliaga --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/sm6125-xiaomi-laurel-sprout.dts | 252 ++++++++++++++++++ 2 files changed, 253 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel-sprout.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 3e79496292e7..2b2a0170db14 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -157,6 +157,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-samsung-w737.dtb dtb-$(CONFIG_ARCH_QCOM) += sm4250-oneplus-billie2.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6125-sony-xperia-seine-pdx201.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm6125-xiaomi-laurel-sprout.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6350-sony-xperia-lena-pdx213.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6375-sony-xperia-murray-pdx225.dtb dtb-$(CONFIG_ARCH_QCOM) += sm7225-fairphone-fp4.dtb diff --git a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel-sprout.dts b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel-sprout.dts new file mode 100644 index 000000000000..5dc06209d9c0 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel-sprout.dts @@ -0,0 +1,252 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2022, Lux Aliaga + */ + +/dts-v1/; + +#include "sm6125.dtsi" +#include +#include +#include + +/ { + /* required for bootloader to select correct board */ + qcom,msm-id = <0x18a 0x00>; /* sm6125 v1 */ + qcom,board-id = <0x0b 0x00>; + + model = "Xiaomi Mi A3"; + compatible = "xiaomi,laurel-sprout", "qcom,sm6125"; + chassis-type = "handset"; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer0: framebuffer@5c000000 { + compatible = "simple-framebuffer"; + reg = <0 0x5c000000 0 (1560 * 720 * 4)>; + width = <720>; + height = <1560>; + stride = <(720 * 4)>; + format = "a8r8g8b8"; + }; + }; + + extcon_usb: usb-id { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&tlmm 102 GPIO_ACTIVE_HIGH>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + debug_mem: memory@ffb00000 { + reg = <0x0 0xffb00000 0x0 0xc0000>; + no-map; + }; + + last_log_mem: memory@ffbc0000 { + reg = <0x0 0xffbc0000 0x0 0x80000>; + no-map; + }; + + pstore_mem: ramoops@ffc00000 { + compatible = "ramoops"; + reg = <0x0 0xffc40000 0x0 0xc0000>; + record-size = <0x1000>; + console-size = <0x40000>; + msg-size = <0x20000 0x20000>; + }; + + cmdline_mem: memory@ffd00000 { + reg = <0x0 0xffd40000 0x0 0x1000>; + no-map; + }; + }; +}; + +&rpm_requests { + regulators-0 { + compatible = "qcom,rpm-pm6125-regulators"; + + vreg_s6a: s6 { + regulator-min-microvolt = <936000>; + regulator-max-microvolt = <1422000>; + }; + + vreg_l1a: l1 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1256000>; + }; + + vreg_l2a: l2 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1056000>; + }; + + vreg_l3a: l3 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1064000>; + }; + + vreg_l4a: l4 { + regulator-min-microvolt = <872000>; + regulator-max-microvolt = <976000>; + }; + + vreg_l5a: l5 { + regulator-min-microvolt = <1648000>; + regulator-max-microvolt = <3104000>; + }; + + vreg_l6a: l6 { + regulator-min-microvolt = <576000>; + regulator-max-microvolt = <656000>; + }; + + vreg_l7a: l7 { + regulator-min-microvolt = <872000>; + regulator-max-microvolt = <976000>; + }; + + vreg_l8a: l8 { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <728000>; + }; + + vreg_l9a: l9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1896000>; + }; + + vreg_l10a: l10 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1896000>; + }; + + vreg_l11a: l11 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1952000>; + }; + + vreg_l12a: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1996000>; + }; + + vreg_l13a: l13 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1832000>; + }; + + vreg_l14a: l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1904000>; + }; + + vreg_l15a: l15 { + regulator-min-microvolt = <3104000>; + regulator-max-microvolt = <3232000>; + }; + + vreg_l16a: l16 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1904000>; + }; + + vreg_l17a: l17 { + regulator-min-microvolt = <1248000>; + regulator-max-microvolt = <1304000>; + }; + + vreg_l18a: l18 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1264000>; + }; + + vreg_l19a: l19 { + regulator-min-microvolt = <1648000>; + regulator-max-microvolt = <2952000>; + }; + + vreg_l20a: l20 { + regulator-min-microvolt = <1648000>; + regulator-max-microvolt = <2952000>; + }; + + vreg_l21a: l21 { + regulator-min-microvolt = <2600000>; + regulator-max-microvolt = <2856000>; + }; + + vreg_l22a: l22 { + regulator-min-microvolt = <2944000>; + regulator-max-microvolt = <3304000>; + }; + + vreg_l23a: l23 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3400000>; + }; + + vreg_l24a: l24 { + regulator-min-microvolt = <2944000>; + regulator-max-microvolt = <3304000>; + }; + }; +}; + +&hsusb_phy1 { + status = "okay"; +}; + +&sdc2_off_state { + sd-cd-pins { + pins = "gpio98"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; +}; + +&sdc2_on_state { + sd-cd-pins { + pins = "gpio98"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; +}; + +&ufs_mem_hc { + vcc-supply = <&vreg_l24a>; + vccq2-supply = <&vreg_l11a>; + vcc-max-microamp = <600000>; + vccq2-max-microamp = <600000>; + + status = "okay"; +}; + +&ufs_mem_phy { + vdda-phy-supply = <&vreg_l4a>; + vdda-pll-supply = <&vreg_l10a>; + vdda-phy-max-microamp = <51400>; + vdda-pll-max-microamp = <14200>; + vddp-ref-clk-supply = <&vreg_l18a>; + + status = "okay"; +}; + +&tlmm { + gpio-reserved-ranges = <22 2>, <28 6>; +}; + +&usb3 { + status = "okay"; +}; + +&usb3_dwc3 { + extcon = <&extcon_usb>; +};