summaryrefslogtreecommitdiff
path: root/zephyr/include
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/include')
-rw-r--r--zephyr/include/cros/thermistor/thermistor.dtsi81
-rw-r--r--zephyr/include/emul/emul_amd_fp6.h9
2 files changed, 87 insertions, 3 deletions
diff --git a/zephyr/include/cros/thermistor/thermistor.dtsi b/zephyr/include/cros/thermistor/thermistor.dtsi
index fb86c4f79a..42eb07f483 100644
--- a/zephyr/include/cros/thermistor/thermistor.dtsi
+++ b/zephyr/include/cros/thermistor/thermistor.dtsi
@@ -386,4 +386,85 @@
sample-index = <12>;
};
};
+
+ /omit-if-no-ref/ thermistor_1V8_100K_100K_4250B:
+ thermistor-1V9-100K-100K-4250B {
+ status = "disabled";
+ compatible = "cros-ec,thermistor";
+ scaling-factor = <7>;
+ num-pairs = <13>;
+ steinhart-reference-mv = <1800>;
+ steinhart-reference-res = <100000>;
+
+ /*
+ * Data derived from Steinhart-Hart equation in a resistor
+ * divider circuit with Vdd=1800mV, R = 100Kohm, and thermistor
+ * (B = 4250, T0 = 357 K, nominal resistance (R0) = 100Kohm).
+ */
+ sample-datum-0 {
+ milivolt = <(1406 / 7)>;
+ temp = <0>;
+ sample-index = <0>;
+ };
+ sample-datum-1 {
+ milivolt = <(1219 / 7)>;
+ temp = <10>;
+ sample-index = <1>;
+ };
+ sample-datum-2 {
+ milivolt = <(1007 / 7)>;
+ temp = <20>;
+ sample-index = <2>;
+ };
+ sample-datum-3 {
+ milivolt = <(796 / 7)>;
+ temp = <30>;
+ sample-index = <3>;
+ };
+ sample-datum-4 {
+ milivolt = <(606 / 7)>;
+ temp = <40>;
+ sample-index = <4>;
+ };
+ sample-datum-5 {
+ milivolt = <( 449 / 7)>;
+ temp = <50>;
+ sample-index = <5>;
+ };
+ sample-datum-6 {
+ milivolt = <( 327 / 7)>;
+ temp = <60>;
+ sample-index = <6>;
+ };
+ sample-datum-7 {
+ milivolt = <( 237 / 7)>;
+ temp = <70>;
+ sample-index = <7>;
+ };
+ sample-datum-8 {
+ milivolt = <( 172 / 7)>;
+ temp = <80>;
+ sample-index = <8>;
+ };
+ sample-datum-9 {
+ milivolt = <( 147 / 7)>;
+ temp = <85>;
+ sample-index = <9>;
+ };
+ sample-datum-10 {
+ milivolt = <( 125 / 7)>;
+ temp = <90>;
+ sample-index = <10>;
+ };
+ sample-datum-11 {
+ milivolt = <( 107 / 7)>;
+ temp = <95>;
+ sample-index = <11>;
+ };
+ sample-datum-12 {
+ milivolt = <( 92 / 7)>;
+ temp = <100>;
+ sample-index = <12>;
+ };
+ };
};
diff --git a/zephyr/include/emul/emul_amd_fp6.h b/zephyr/include/emul/emul_amd_fp6.h
index 6c63a6caab..04dcd5dd31 100644
--- a/zephyr/include/emul/emul_amd_fp6.h
+++ b/zephyr/include/emul/emul_amd_fp6.h
@@ -29,10 +29,13 @@ void amd_fp6_emul_set_xbar(const struct emul *emul, bool ready);
* Set how long a command will take to complete. On a real system this can be
* anywhere from 50-100ms and the datasheet defines it can take up to 250ms.
*
+ * Getting timing to sync consistently in unit testing is difficult, so use the
+ * number of reads to wait instead.
+ *
* @param emul - AMD FP6 emulator data
- * @param delay_ms - how long after a mux set to wait before reporting the
- * status of the set as complete.
+ * @param delay_reads - how long after a mux set to wait before reporting the
+ * status of the set as complete (in number of reads)
*/
-void amd_fp6_emul_set_delay(const struct emul *emul, int delay_ms);
+void amd_fp6_emul_set_delay(const struct emul *emul, int delay_reads);
#endif