driver/sar-sensor: sx937x bring up

1.update paramters
  2.adjust driver to match new params

Change-Id: I94246fd45911d05d121ef449496b618c0399abd6
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1801961
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
weimh1 2020-11-13 16:17:32 +08:00 • committed by panyq6
commit 1c8e9afb28

View file

@ -213,30 +213,36 @@
interrupt-names = "sx937x_irq";
Semtech,nirq-gpio = <&tlmm 24 0x02>;
cap_vdd-supply = <&pm6150a_l8>;
Semtech,button-flag = <0x3b>;
Semtech,ref-phases-a = <2>;
Semtech,ref-phases-b = <6>;
Semtech,reg-num = <24>;
/*use PH4/5/6 as the reference sensor
set it to 0xff if the ref-phases-x is not used*/
Semtech,ref-phases-a = <4>;
Semtech,ref-phases-b = <5>;
Semtech,ref-phases-c = <6>;
Semtech,button-flag = <0x0f>;
Semtech,reg-num = <25>;
Semtech,reg-init = <
0x8024 0xF700 /*PHEN*/
0x8024 0x7F00 /*PHEN, Disable all Phases*/
0x4004 0x74 /*irq mask*/
0x8028 0x85C /*AFE_PARAM_PH0*/
0x8034 0x85C /*AFE_PARAM_PH1*/
0x8040 0x85C /*AFE_PARAM_PH2*/
/* 0x804C 0x85C */ /*AFE_PARAM_PH3*/
0x804C 0x85C /*AFE_PARAM_PH3*/
0x8058 0x85C /*AFE_PARAM_PH4*/
0x8064 0x85C /*AFE_PARAM_PH5*/
0x8070 0x85C /*AFE_PARAM_PH6*/
0x807C 0x85C /*AFE_PARAM_PH7*/
/* 0x807C 0x85C */ /*AFE_PARAM_PH7*/
/*set CS3 to hiz, because it used as IRQ pin*/
0x8030 0xFFF9FD /*REG_AFEPH_PH0*/
0x803C 0xFFF9EF /*REG_AFEPH_PH1*/
0x8048 0xFFF97F /*REG_AFEPH_PH2*/
/* 0x8054 0xFFFBFF */ /*REG_AFEPH_PH3*/
0x8060 0xFFD9FF /*REG_AFEPH_PH4*/
0x806C 0xFEF9FF /*REG_AFEPH_PH5*/
0x8078 0xF7F9FF /*REG_AFEPH_PH6*/
0x8084 0xBFF9FF /*REG_AFEPH_PH7*/
0x8030 0xFFD9FF /*REG_AFEPH_PH0, CS4, ANT1, Bottom*/
0x803C 0xBFF9FF /*REG_AFEPH_PH1, CS7, ANT2, Top Right*/
0x8048 0xFFF9FD /*REG_AFEPH_PH2, CS0, ANT3, Top Left*/
0x8054 0xFEF9FF /*REG_AFEPH_PH3, CS5, ANT4, Top Right side*/
0x8060 0xF7F9FF /*REG_AFEPH_PH4, CS6, ANT1_REF, Bottom*/
0x806C 0xFFF97F /*REG_AFEPH_PH5, CS2, ANT2_REF, Top Right*/
0x8078 0xFFF9EF /*REG_AFEPH_PH6, CS1, ANT3_REF, Top Left*/
0x8084 0xBFF9FF /*REG_AFEPH_PH7, NOT USE*/
/*prox1 5000 0x64*/
/*prox2 10000 0x8D*/
/*prox3 15000 0xAD*/
@ -244,12 +250,13 @@
0x8098 0xC8AD8D64 /*prox threshold ph0*/
0x80B8 0xC8AD8D64 /*prox threshold ph1*/
0x80D8 0xC8AD8D64 /*prox threshold ph2*/
/* 0x80F8 0x64*/ /*prox threshold ph3*/
0x80F8 0xC8AD8D64 /*prox threshold ph3*/
0x8118 0xC8AD8D64 /*prox threshold ph4*/
0x8138 0xC8AD8D64 /*prox threshold ph5*/
0x8158 0xC8AD8D64 /*prox threshold ph6*/
0x8178 0xC8AD8D64 /*prox threshold ph7*/
0x8024 0xF7F7 /*PHEN*/
/*0x8178 0xC8AD8D64*/ /*prox threshold ph7*/
0x8024 0x7F7F /*PHEN, Enable PH0~PH6*/
>;
status = "ok"