From patchwork Wed Dec 14 09:30:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lux Aliaga X-Patchwork-Id: 13072910 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 5FC0CC001B2 for ; Wed, 14 Dec 2022 09:37:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237778AbiLNJhw (ORCPT ); Wed, 14 Dec 2022 04:37:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbiLNJhv (ORCPT ); Wed, 14 Dec 2022 04:37:51 -0500 Received: from amity.mint.lgbt (vmi888983.contaboserver.net [149.102.157.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54AC2631F for ; Wed, 14 Dec 2022 01:37:50 -0800 (PST) Received: from amity.mint.lgbt (mx.mint.lgbt [127.0.0.1]) by amity.mint.lgbt (Postfix) with ESMTP id 4NX98w6MDhz1S5Cq for ; Wed, 14 Dec 2022 04:31:12 -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=1671010272; x=1671874273; bh=Te4FoBB 7d0qQIWej9mZZ8GF8WNlyMDQYAP3Nesnb9Uw=; b=rkbsc0vbIW2js+GmOt5opLa kt49RXAY3ZaJ1s15rhvzUCkPy+W83lUgTC9M65qjBdbs2CZe7b/TA43boF3/80lp F+1NOJtu8UN4evsn8SEQOSNFcKP+6LgrzHRBgfyOYFJ1BhnitCNHxvX30M2nRfWm 0qLicSgQSWiGYJkpTO6pY5sqlQcYMTHJaKtA4FjRH+Wgxou7PfpDx6lii/DfrGv0 4Qj8GORAu+lBoGlYajqTbQZ8fHu5is0RaHlpezW2klIW0ZGOkQ3flx1ozVwfdPHc vkNwvCez7W4v+kdDM4/qV90zK9kbpr50qA8LLDnMDoGMqHKZKWA6COrZnLd3A/w= = 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 rIzXQIMjT3BN for ; Wed, 14 Dec 2022 04:31:12 -0500 (EST) Received: from dorothy.. (unknown [190.196.92.66]) by amity.mint.lgbt (Postfix) with ESMTPSA id 4NX98n3vJCz1S52g; Wed, 14 Dec 2022 04:31:04 -0500 (EST) From: Lux Aliaga Cc: Lux Aliaga , Andy Gross , Bjorn Andersson , Konrad Dybcio , Alim Akhtar , Avri Altman , Bart Van Assche , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] dt-bindings: ufs: qcom: Add SM6125 compatible string Date: Wed, 14 Dec 2022 06:30:52 -0300 Message-Id: <20221214093053.152713-1-they@mint.lgbt> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) 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 --- .../devicetree/bindings/ufs/qcom,ufs.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml index f2d6298d926c..4d3cb12e4882 100644 --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml @@ -33,6 +33,7 @@ properties: - qcom,sm8250-ufshc - qcom,sm8350-ufshc - qcom,sm8450-ufshc + - qcom,sm6125-ufshc - const: qcom,ufshc - const: jedec,ufs-2.0 @@ -178,6 +179,31 @@ allOf: minItems: 1 maxItems: 1 + - if: + properties: + compatible: + contains: + enum: + - qcom,sm6125-ufshc + then: + properties: + clocks: + minItems: 8 + maxItems: 8 + clock-names: + items: + - const: core_clk + - const: bus_aggr_clk + - const: iface_clk + - const: core_clk_unipro + - const: core_clk_ice + - const: ref_clk + - const: tx_lane0_sync_clk + - const: rx_lane0_sync_clk + reg: + minItems: 2 + maxItems: 2 + # TODO: define clock bindings for qcom,msm8994-ufshc unevaluatedProperties: false From patchwork Wed Dec 14 09:32:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lux Aliaga X-Patchwork-Id: 13072907 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 EB2EAC4332F for ; Wed, 14 Dec 2022 09:32:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229662AbiLNJc1 (ORCPT ); Wed, 14 Dec 2022 04:32:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237356AbiLNJcY (ORCPT ); Wed, 14 Dec 2022 04:32:24 -0500 X-Greylist: delayed 66 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 14 Dec 2022 01:32:21 PST Received: from amity.mint.lgbt (vmi888983.contaboserver.net [149.102.157.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A37164DE for ; Wed, 14 Dec 2022 01:32:20 -0800 (PST) Received: from amity.mint.lgbt (mx.mint.lgbt [127.0.0.1]) by amity.mint.lgbt (Postfix) with ESMTP id 4NX9BC2MJZz1S5Cw for ; Wed, 14 Dec 2022 04:32:19 -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=1671010338; x=1671874339; bh=ExGToJ7 5nnlb4ThQE07j68EgUs+RvHQuBzqSRQC+m2k=; b=PcNvze/w387CEfQnLff5lRf 4JXsDRpnST4Vf+U9v8EPfDTEr1iugxcXpHECYaWoLAJCjxKrqVB4dijZzSYCkzWA IdlfmwSWo6YIoJ/8f1N1OZQMxRXFZHfXCE7Z/mqbYPCBEMTzRLo2X5kcj1IxQQOI x30TtvX/J1kiK2tEYMyxtUOEp/uGf8CqBWWuCzxpZepWBh8wKfDb8RBoUiRLvGi1 5oLSoHjZ2G+L+GXUPDKBRg1Sztg/2II8HuKvSsJyqeEXd7wrQKrzYkpOh2QdJ7iQ RW10PlINh3005X5lyys7FDT2vq5YvQZ/GJNzz07sSLuHJKmZjCalOXwZijOklFw= = 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 wg8cne15LpF9 for ; Wed, 14 Dec 2022 04:32:18 -0500 (EST) Received: from dorothy.. (unknown [190.196.92.66]) by amity.mint.lgbt (Postfix) with ESMTPSA id 4NX9B73Qqxz1S4yf; Wed, 14 Dec 2022 04:32:15 -0500 (EST) From: Lux Aliaga Cc: Lux Aliaga , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] arm64: dts: qcom: sm6125: Add UFS nodes Date: Wed, 14 Dec 2022 06:32:09 -0300 Message-Id: <20221214093209.152991-1-they@mint.lgbt> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This commit 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 | 70 ++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi index 1fe3fa3ad877..f43b005b9454 100644 --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi @@ -506,6 +506,76 @@ sdhc_2: mmc@4784000 { status = "disabled"; }; + ufs_mem_hc: ufshc@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", + "core_clk_ice", + "ref_clk", + "tx_lane0_sync_clk", + "rx_lane0_sync_clk"; + clocks = + <&gcc GCC_UFS_PHY_AXI_CLK>, // 200m + <&gcc GCC_SYS_NOC_UFS_PHY_AXI_CLK>, // 200m + <&gcc GCC_UFS_PHY_AHB_CLK>, // 0 + <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>, // 150m + <&gcc GCC_UFS_PHY_ICE_CORE_CLK>, // 300m + <&rpmcc RPM_SMD_XO_CLK_SRC>, // 19.2m + <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>, // 0 + <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>; // 0 + + freq-table-hz = + <50000000 240000000>, + <0 0>, + <0 0>, + <37500000 150000000>, + <75000000 300000000>, + <0 0>, + <0 0>, + <0 0>; + + 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 Wed Dec 14 09:32:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lux Aliaga X-Patchwork-Id: 13072908 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 C32CEC4332F for ; Wed, 14 Dec 2022 09:33:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237752AbiLNJdM (ORCPT ); Wed, 14 Dec 2022 04:33:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237789AbiLNJdE (ORCPT ); Wed, 14 Dec 2022 04:33:04 -0500 Received: from amity.mint.lgbt (vmi888983.contaboserver.net [149.102.157.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72E87631F for ; Wed, 14 Dec 2022 01:33:01 -0800 (PST) Received: from amity.mint.lgbt (mx.mint.lgbt [127.0.0.1]) by amity.mint.lgbt (Postfix) with ESMTP id 4NX9C00mnLz1S5Cw for ; Wed, 14 Dec 2022 04:32:59 -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=1671010379; x=1671874380; bh=gKWL8aO LSs/dj4UkVPePb06jnEQR7vS1rnbVl04CgWg=; b=cQF82uuXyz0tXuqcpNBxjL1 td+BjFfb/6ZdFmIMFuj2pzioXwDtBwmvOcKv+tuLGIwnHfcquIorcNyOLj7cqwGn OvUg+YUzFZMyqYC5bQPJFdsmQbVNjEFwEck1eM8GBDjE+fCpbn664jwMpxT3dkiH ZTD28QhaP+OvcdUGUdXIixDvOAVApCfh4xHdSfT2kbX32UN5/V+gVnkwZJLOxheV Z2U3jkFG13lIs1Ob/t0gY36TU96mE2tE912fJZn9VljdHzfqdum59kpQrLFB/EWI +f5I9PQ/VsIMJ58PpMd1bmZgv+7S+s09X6ylbLZedG24RFIp+G56yN6gbdbhQTg= = 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 wVYAIwf4MZro for ; Wed, 14 Dec 2022 04:32:59 -0500 (EST) Received: from dorothy.. (unknown [190.196.92.66]) by amity.mint.lgbt (Postfix) with ESMTPSA id 4NX9Bw1VwPz1S52g; Wed, 14 Dec 2022 04:32:55 -0500 (EST) From: Lux Aliaga Cc: Lux Aliaga , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] dt-bindings: arm: qcom: Document xiaomi,laurel_sprout board Date: Wed, 14 Dec 2022 06:32:48 -0300 Message-Id: <20221214093248.153245-1-they@mint.lgbt> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) 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 1b5ac6b02bc5..a72fbb6b4b2c 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -693,6 +693,7 @@ properties: - items: - enum: - sony,pdx201 + - xiaomi,laurel_sprout - const: qcom,sm6125 - items: From patchwork Wed Dec 14 09:33:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lux Aliaga X-Patchwork-Id: 13072909 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 C3CB4C001B2 for ; Wed, 14 Dec 2022 09:34:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237841AbiLNJeD (ORCPT ); Wed, 14 Dec 2022 04:34:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237856AbiLNJeC (ORCPT ); Wed, 14 Dec 2022 04:34:02 -0500 Received: from amity.mint.lgbt (vmi888983.contaboserver.net [149.102.157.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93FE7BF53 for ; Wed, 14 Dec 2022 01:34:00 -0800 (PST) Received: from amity.mint.lgbt (mx.mint.lgbt [127.0.0.1]) by amity.mint.lgbt (Postfix) with ESMTP id 4NX9D71G6cz1S5Cx for ; Wed, 14 Dec 2022 04:33:59 -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=1671010438; x=1671874439; bh=+4eI0BR yErHUQAcVy7S9osoMtm4H8W2qLOP03Y0Xnss=; b=NJGUE+Ua9zbQR6hPluyKHpd r95fOcgWsaG6tDFR6pkJpQy0W2aUz0Hahha/73Wm0JMKI9jAl6pMB/cwGCSW5oSr yveU223alxRHIwn/3KA79zmbFhETb4/gmVew1o6efM53gzVeNbtRGcGCeXq9Mnsz UqIKCQQxUn2wptJcdv6+e/H9Uuriq9diU8zec2pfA8J8gmcylDWc4P7++/3nBXZr g7VvnqqT6FNDxbnqE9vtS+B+ZNT+TCFsdBkO4FyehSvyW+I+UqzdnwLnb/ZOeriP w/sMvbEGTfGDSYanh8G9qKryc5avM1B57Rv0kQHMW0obcLkkSmXAsw8MdfIPOEA= = 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 vrgPQSIg9_OE for ; Wed, 14 Dec 2022 04:33:58 -0500 (EST) Received: from dorothy.. (unknown [190.196.92.66]) by amity.mint.lgbt (Postfix) with ESMTPSA id 4NX9D01JJ5z1S52g; Wed, 14 Dec 2022 04:33:51 -0500 (EST) From: Lux Aliaga Cc: Lux Aliaga , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Kees Cook , Anton Vorontsov , Colin Cross , Tony Luck , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] arm64: dts: qcom: sm6125: Initial support for xiaomi-laurel_sprout Date: Wed, 14 Dec 2022 06:33:41 -0300 Message-Id: <20221214093342.153479-1-they@mint.lgbt> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) 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 | 251 ++++++++++++++++++ 2 files changed, 252 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 d7669a7cee9f..7b4fbb4cbb84 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -140,6 +140,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-samsung-w737.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) += sm7225-fairphone-fp4.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-hdk.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..edc5f13bae28 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel_sprout.dts @@ -0,0 +1,251 @@ +// 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: extcon-usb { + 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 = "gpio98"; + bias-disable; + drive-strength = <2>; + }; +}; + +&sdc2_on_state { + sd-cd { + pins = "gpio98"; + bias-pull-up; + drive-strength = <2>; + }; +}; + +&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>; +};