FILE
r8a779g3-sparrow-hawk-fan-pwm.dtso
File preview with syntax highlighting.
linux-6.19.14/arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk-fan-pwm.dtso
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2/* 3 * Device Tree Overlay for the PWM controlled blower fan on connector J3:FAN 4 * on R-Car V4H ES3.0 Sparrow Hawk board 5 * 6 * Copyright (C) 2025 Marek Vasut <marek.vasut+renesas@mailbox.org> 7 * 8 * Example usage: 9 * 10 * # Localize hwmon sysfs directory that matches the PWM fan, 11 * # enable the PWM fan, and configure the fan speed manually. 12 * r8a779g3-sparrow-hawk$ ls -1 /sys/devices/platform/pwm-fan/hwmon/hwmon?/pwm?_enable 13 * /sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1_enable 14 * 15 * # Select mode 2 , enable fan PWM and regulator and keep them enabled. 16 * # For details, see Linux Documentation/hwmon/pwm-fan.rst 17 * r8a779g3-sparrow-hawk$ echo 2 > /sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1_enable 18 * 19 * # Configure PWM fan speed in range 0..255 , 0 is stopped , 255 is full speed . 20 * # Fan speed 101 is about 2/5 of the PWM fan speed: 21 * r8a779g3-sparrow-hawk$ echo 101 > /sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1 22 */ 23 24/dts-v1/; 25/plugin/; 26 27/* 28 * Override default PWM fan settings. For a list of available properties, 29 * see schema Documentation/devicetree/bindings/hwmon/pwm-fan.yaml . 30 */ 31&fan { 32 /* Available cooling levels */ 33 cooling-levels = <0 50 100 150 200 255>; 34 /* Four pulses of tacho signal per one revolution */ 35 pulses-per-revolution = <4>; 36 /* PWM period: 100us ~= 10 kHz */ 37 pwms = <&pwm0 0 100000>; 38};
~/
Read-only file preview.