Skip to content

Commit

Permalink
ath79: jj76pf2: enable TCN75 sensor
Browse files Browse the repository at this point in the history
This SBC has Microchip TCN75 sensor, wich measures ambient temperature.
Specify it in dts to allow readout by applications using kernel hwmon
API.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
  • Loading branch information
tmn505 authored and chunkeey committed Jun 24, 2022
1 parent f614332 commit 4cca094
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts
Expand Up @@ -32,6 +32,19 @@
clock-frequency = <40000000>;
};

i2c {
compatible = "i2c-gpio";
sda-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
scl-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
#address-cells = <1>;
#size-cells = <0>;

sensor@48 {
compatible = "microchip,tcn75";
reg = <0x48>;
};
};

leds {
compatible = "gpio-leds";

Expand Down
2 changes: 1 addition & 1 deletion target/linux/ath79/image/generic.mk
Expand Up @@ -1465,7 +1465,7 @@ define Device/jjplus_ja76pf2
SOC := ar7161
DEVICE_VENDOR := jjPlus
DEVICE_MODEL := JA76PF2
DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-basic-wolfssl -uboot-envtools fconfig
DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-basic-wolfssl -uboot-envtools fconfig kmod-hwmon-lm75
IMAGES += kernel.bin rootfs.bin
IMAGE/kernel.bin := append-kernel
IMAGE/rootfs.bin := append-rootfs | pad-rootfs
Expand Down

0 comments on commit 4cca094

Please sign in to comment.