From 8144f9c665327cae94a4e4b27ed3789d3777f978 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Thu, 17 Feb 2022 21:15:54 +0100 Subject: mpc85xx: HiveAP-330: add tmp125 temperature sensor the Aerohive HiveAP-330 and HiveAP-350 come equipped with an TI TMP125 temperature chip. This patch wires up the necessary support for this sensor and exposes it through hwmon / thermal sensor framework. Upstream support is coming, but it has to go through hwmon-next first. Signed-off-by: Christian Lamparter --- target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts | 9 +++++++++ target/linux/mpc85xx/image/p1020.mk | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'target/linux/mpc85xx') diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts index bb2f2d0827..ccf60eaeed 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts @@ -24,6 +24,7 @@ led-running = &led_power_green; led-upgrade = &led_fault_red; label-mac-device = &enet0; + spi0 = &spi0; }; memory { @@ -113,6 +114,14 @@ board_soc: soc: soc@ffe00000 { ranges = <0x0 0x0 0xffe00000 0x100000>; + spi0: spi@7000 { + temperature-sensor@1 { + compatible = "ti,tmp125"; + reg = <1>; + spi-max-frequency = <5000000>; + }; + }; + i2c@3100 { tpm@29 { compatible = "atmel,at97sc3204t"; diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk index a50b489df1..64cad1ad9c 100644 --- a/target/linux/mpc85xx/image/p1020.mk +++ b/target/linux/mpc85xx/image/p1020.mk @@ -15,7 +15,7 @@ define Device/aerohive_hiveap-330 DEVICE_MODEL := HiveAP-330 DEVICE_ALT0_VENDOR := Aerohive DEVICE_ALT0_MODEL := HiveAP-350 - DEVICE_PACKAGES := kmod-tpm-i2c-atmel + DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-hwmon-lm70 BLOCKSIZE := 128k KERNEL := kernel-bin | uImage none KERNEL_INITRAMFS := kernel-bin | MultiImage none -- cgit v1.2.3