mediatek: filogic: enable thermal, I2C and PWM of the BPi-R3
authorDaniel Golle <daniel@makrotopia.org>
Thu, 6 Oct 2022 13:28:07 +0000 (14:28 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 7 Oct 2022 15:45:10 +0000 (16:45 +0100)
Setup thermal zone, select pins and enabled drivers for I2C (on 26-pin
GPIO bank) and PWM (1x fan and 1x GPIO bank).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts
target/linux/mediatek/image/filogic.mk

index 218fef5ceced7a20878822143e597cbbcddbb0b5..37588e2ac408f7a9810eebe7045bebe8afe2835d 100644 (file)
                };
        };
 
+       i2c0_pins: i2c0-pins {
+               mux {
+                       function = "i2c";
+                       groups = "i2c";
+               };
+       };
+
+       pwm_pins: pwm-pins {
+               mux {
+                       function = "pwm";
+                       groups = "pwm0", "pwm1_0";
+               };
+       };
+
        wf_led_pins: wf-led-pins {
                mux {
                        function = "led";
        status = "okay";
 };
 
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+       status = "okay";
+};
+
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm_pins>;
+       status = "okay";
+};
+
+&fan {
+       pwms = <&pwm 0 500000 0>;
+       status = "okay";
+};
+
 &wmac {
        mediatek,eeprom-data = <0x86790900 0xc4326 0x60000000 0x00 0x00 0x00 0x00 0x00
                                0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
index cd74da745073e440c4c4c3620af28abace1b8eda..df890a41523c5248c4c3891b1feaebf4d9a1b8c8 100644 (file)
@@ -45,7 +45,7 @@ define Device/bananapi_bpi-r3
   DEVICE_DTS_CONFIG := config-mt7986a-bananapi-bpi-r3
   DEVICE_DTS_OVERLAY:= mt7986a-bananapi-bpi-r3-nor mt7986a-bananapi-bpi-r3-emmc-nor mt7986a-bananapi-bpi-r3-emmc-snand mt7986a-bananapi-bpi-r3-snand
   DEVICE_DTS_DIR := ../dts
-  DEVICE_PACKAGES := kmod-usb3 kmod-i2c-gpio kmod-sfp e2fsprogs f2fsck mkf2fs
+  DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-i2c-gpio kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs
   IMAGES := sysupgrade.itb
   KERNEL_INITRAMFS_SUFFIX := -recovery.itb
   ARTIFACTS := \