From 122a6a86f794e3cd3fbe760446dba54abc12472a Mon Sep 17 00:00:00 2001 From: Ramya SR Date: Wed, 24 Nov 2021 18:49:01 +0530 Subject: [PATCH] ARM: dts: qcom: Add of version register to figure out ntn3 version This change is to add version register to get the ntn3 switch version. Added two separate reg update sequence , one is reg update this is needed to keep NTN3v1 in gen3, this sequence is not needed in NTN3v2 as it is already taken care in v2 and another one is switch reg update this will update the gen3 preset value to both NTN3v1 and NTN3v2. Also added a optional force i2c settings flag to update the demphasis setting prior pcie linkup in dtsi binding irrespective of ntn3 chip version. Change-Id: Ibb249af5455c76e789931962f2cb9449d8814a42 --- bindings/pci/pci-msm.txt | 13 +++++++++++++ qcom/sdxlemur-mtp-cpe.dtsi | 7 ++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/bindings/pci/pci-msm.txt b/bindings/pci/pci-msm.txt index e80245821de0..fce9facfeada 100644 --- a/bindings/pci/pci-msm.txt +++ b/bindings/pci/pci-msm.txt @@ -629,6 +629,17 @@ i2c child node Value Type: Array of Definition: List of slave registers to dump by i2c read +- version-reg: + Usage: optional + Value type: + Definition: Register to find ntn3 switch version + +- force-i2c-setting: + Usage: optional + Value type: + Definition: If force-i2c-setting flag is set + then de_emphasis settings are updated + irrespective of the chip version via i2c_writes ======= Example ======= @@ -641,5 +652,7 @@ Example ep-reset-reg = <0x801210>; ep-reset-gpio-mask = <0xf>; dump-regs = <0x801330 0x801350 0x801370>; + version-reg = <0x800000>; + force-i2c-setting; }; }; diff --git a/qcom/sdxlemur-mtp-cpe.dtsi b/qcom/sdxlemur-mtp-cpe.dtsi index dde1e97716da..065c77ad0a62 100644 --- a/qcom/sdxlemur-mtp-cpe.dtsi +++ b/qcom/sdxlemur-mtp-cpe.dtsi @@ -91,6 +91,7 @@ gpio-config-reg = <0x801208>; ep-reset-reg = <0x801210>; ep-reset-gpio-mask = <0xc>; + version-reg = <0x800000>; dump-regs = <0x801330 0x801350 0x801370>; reg_update = <0x82c030 0x1 0x828000 0x3 @@ -104,9 +105,9 @@ 0x82c01c 0x10 0x82c030 0xf 0x828000 0xf - 0x82b268 0x2 - 0x82C02C 0x4 - 0x8249DC 0x0>; + 0x82b268 0x2>; + switch_reg_update = <0x82C02C 0x4 + 0x824A0C 0x4>; }; };