Skip to content

Commit 73e4a88

Browse files
pelwellpopcornmix
authored andcommitted
overlays: i2c-sensor: Add the jc42 class of sensor
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
1 parent 935bee2 commit 73e4a88

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

arch/arm/boot/dts/overlays/README

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,15 @@ Params: addr Set the address for the BH1750, BME280, BME680,
19701970
int_pin Set the GPIO to use for interrupts (max30102
19711971
only)
19721972

1973+
jc42 Select any of the many JEDEC JC42.4-compliant
1974+
temperature sensors, including:
1975+
ADT7408, AT30TS00, CAT34TS02, CAT6095,
1976+
MAX6604, MCP9804, MCP9805, MCP9808,
1977+
MCP98242, MCP98243, MCP98244, MCP9843,
1978+
SE97, SE98, STTS424(E), STTS2002, STTS3000,
1979+
TSE2002, TSE2004, TS3000, and TS3001.
1980+
The default address is 0x18.
1981+
19731982
lm75 Select the Maxim LM75 temperature sensor
19741983
Valid addresses 0x48-0x4f, default 0x4f
19751984

@@ -1982,7 +1991,9 @@ Params: addr Set the address for the BH1750, BME280, BME680,
19821991
and blood-oxygen sensor
19831992

19841993
mcp980x Select the Maxim MCP980x range of temperature
1985-
sensors (e.g. MCP9808).
1994+
sensors (i.e. MCP9800, MCP9801, MCP9802 and
1995+
MCP9803). N.B. For MCP9804, MCP9805 and MCP9808,
1996+
use the "jc42" option.
19861997
Valid addresses are 0x18-0x1f (default 0x18)
19871998

19881999
sht3x Select the Sensiron SHT3x temperature and

arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,21 @@
337337
};
338338
};
339339

340+
fragment@22 {
341+
target = <&i2cbus>;
342+
__dormant__ {
343+
#address-cells = <1>;
344+
#size-cells = <0>;
345+
status = "okay";
346+
347+
jc42: jc42@18 {
348+
compatible = "jedec,jc-42.4-temp";
349+
reg = <0x18>;
350+
smbus-timeout-disable;
351+
};
352+
};
353+
};
354+
340355
__overrides__ {
341356
bme280 = <0>,"+0";
342357
bmp085 = <0>,"+1";
@@ -361,11 +376,12 @@
361376
max30102 = <0>,"+19";
362377
aht10 = <0>,"+20";
363378
mcp980x = <0>,"+21";
379+
jc42 = <0>,"+22";
364380

365381
addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
366382
<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
367383
<&ds1621>,"reg:0", <&bme680>,"reg:0", <&ccs811>,"reg:0",
368-
<&bh1750>,"reg:0", <&mcp980x>,"reg:0";
384+
<&bh1750>,"reg:0", <&mcp980x>,"reg:0", <&jc42>,"reg:0";
369385
int_pin = <&max30102>, "interrupts:0";
370386
};
371387
};

0 commit comments

Comments
 (0)