ath79: jj76pf2: enable TCN75 sensor
authorTomasz Maciej Nowak <tmn505@gmail.com>
Tue, 7 Jun 2022 13:58:26 +0000 (15:58 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 24 Jun 2022 15:09:53 +0000 (17:09 +0200)
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>
target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts
target/linux/ath79/image/generic.mk

index 4ee99432d4da8ca4b8758602fa425afa3f93d810..8e861bad48ab11f380922e83efd0684e80c350b3 100644 (file)
                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";
 
index a6a6e5e4997908b79ade71ba6156fba8865fd210..6af90c9903d3780afe548b7bc59994030aa10207 100644 (file)
@@ -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