From bfb68c69fc5b35a6c5c6298ec8459f5d8561db06 Mon Sep 17 00:00:00 2001 From: Ram Prakash Gupta Date: Thu, 16 Jun 2022 23:10:37 +0530 Subject: [PATCH] ARM: dts: msm: Read ufs device identification SDAM data Add interface for UFS device identification of 2.x or 3.x from sdam register. Change-Id: I5c3140953b246a97dbfebb635619459cfb068b58 --- qcom/parrot-atp.dtsi | 20 ++++++++++++++++++++ qcom/parrot-idp.dtsi | 20 ++++++++++++++++++++ qcom/parrot-qrd.dtsi | 20 ++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/qcom/parrot-atp.dtsi b/qcom/parrot-atp.dtsi index 300ae793..1598a75c 100644 --- a/qcom/parrot-atp.dtsi +++ b/qcom/parrot-atp.dtsi @@ -51,6 +51,26 @@ qcom,vddp-ref-clk-supply = <&L13B>; qcom,vddp-ref-clk-max-microamp = <100>; + /* + * ufs-dev-types and nvmem entries are for ufs device + * identification using nvmem interface. Use number of + * ufs devices supported for ufs-dev-types, and nvmem handle + * added by pmic for sdam register. + * + * Default value taken by driver is bit[0] = 0 for 3.x and + * bit[0] = 1 for 2.x driver code takes this as default case. + * + * But Bit value to identify ufs device is not consistent + * across the targets it could be bit[0] = 0/1 for UFS2.x/3x + * and vice versa. If the bit[0] value is not same as default + * value used in driver and if its reverted then use flag + * qcom,ufs-dev-revert to identify ufs device. + */ + ufs-dev-types = <2>; + qcom,ufs-dev-revert; + nvmem-cells = <&ufs_dev>; + nvmem-cell-names = "ufs_dev"; + status = "ok"; }; diff --git a/qcom/parrot-idp.dtsi b/qcom/parrot-idp.dtsi index d07c3a56..650c8e17 100644 --- a/qcom/parrot-idp.dtsi +++ b/qcom/parrot-idp.dtsi @@ -146,5 +146,25 @@ qcom,vddp-ref-clk-supply = <&L13B>; qcom,vddp-ref-clk-max-microamp = <100>; + /* + * ufs-dev-types and nvmem entries are for ufs device + * identification using nvmem interface. Use number of + * ufs devices supported for ufs-dev-types, and nvmem handle + * added by pmic for sdam register. + * + * Default value taken by driver is bit[0] = 0 for 3.x and + * bit[0] = 1 for 2.x driver code takes this as default case. + * + * But Bit value to identify ufs device is not consistent + * across the targets it could be bit[0] = 0/1 for UFS2.x/3x + * and vice versa. If the bit[0] value is not same as default + * value used in driver and if its reverted then use flag + * qcom,ufs-dev-revert to identify ufs device. + */ + ufs-dev-types = <2>; + qcom,ufs-dev-revert; + nvmem-cells = <&ufs_dev>; + nvmem-cell-names = "ufs_dev"; + status = "ok"; }; diff --git a/qcom/parrot-qrd.dtsi b/qcom/parrot-qrd.dtsi index fa33fc21..9287ca66 100644 --- a/qcom/parrot-qrd.dtsi +++ b/qcom/parrot-qrd.dtsi @@ -84,6 +84,26 @@ qcom,vddp-ref-clk-supply = <&L13B>; qcom,vddp-ref-clk-max-microamp = <100>; + /* + * ufs-dev-types and nvmem entries are for ufs device + * identification using nvmem interface. Use number of + * ufs devices supported for ufs-dev-types, and nvmem handle + * added by pmic for sdam register. + * + * Default value taken by driver is bit[0] = 0 for 3.x and + * bit[0] = 1 for 2.x driver code takes this as default case. + * + * But Bit value to identify ufs device is not consistent + * across the targets it could be bit[0] = 0/1 for UFS2.x/3x + * and vice versa. If the bit[0] value is not same as default + * value used in driver and if its reverted then use flag + * qcom,ufs-dev-revert to identify ufs device. + */ + ufs-dev-types = <2>; + qcom,ufs-dev-revert; + nvmem-cells = <&ufs_dev>; + nvmem-cell-names = "ufs_dev"; + status = "ok"; };