mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-31 22:23:05 +00:00

Add Retronix R-Car V4H Sparrow Hawk board based on Renesas R-Car V4H ES3.0 (R8A779G3) SoC. This is a single-board computer with single gigabit ethernet, DSI-to-eDP bridge, DSI and two CSI2 interfaces, audio codec, two CANFD ports, micro SD card slot, USB PD supply, USB 3.0 ports, M.2 Key-M slot for NVMe SSD, debug UART and JTAG. Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250420173829.200553-4-marek.vasut+renesas@mailbox.org Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
/*
|
|
* Device Tree Overlay for the PWM controlled blower fan in connector J3:FAN
|
|
* on R-Car V4H ES3.0 Sparrow Hawk board
|
|
*
|
|
* Copyright (C) 2025 Marek Vasut <marek.vasut+renesas@mailbox.org>
|
|
*
|
|
* Example usage:
|
|
*
|
|
* # Localize hwmon sysfs directory that matches the PWM fan,
|
|
* # enable the PWM fan, and configure the fan speed manually.
|
|
* r8a779g3-sparrow-hawk$ grep -H . /sys/class/hwmon/hwmon?/name
|
|
* /sys/class/hwmon/hwmon0/name:sensor1_thermal
|
|
* /sys/class/hwmon/hwmon1/name:sensor2_thermal
|
|
* /sys/class/hwmon/hwmon2/name:sensor3_thermal
|
|
* /sys/class/hwmon/hwmon3/name:sensor4_thermal
|
|
* /sys/class/hwmon/hwmon4/name:pwmfan
|
|
* ^ ^^^^^^
|
|
*
|
|
* # Select mode 2 , enable fan PWM and regulator and keep them enabled.
|
|
* # For details, see Linux Documentation/hwmon/pwm-fan.rst
|
|
* r8a779g3-sparrow-hawk$ echo 2 > /sys/class/hwmon/hwmon4/pwm1_enable
|
|
*
|
|
* # Configure PWM fan speed in range 0..255 , 0 is stopped , 255 is full speed .
|
|
* # Fan speed 101 is about 2/5 of the PWM fan speed:
|
|
* r8a779g3-sparrow-hawk$ echo 101 > /sys/class/hwmon/hwmon4/pwm1
|
|
*/
|
|
|
|
/dts-v1/;
|
|
/plugin/;
|
|
|
|
/*
|
|
* Override default PWM fan settings. For a list of available properties,
|
|
* see schema Documentation/devicetree/bindings/hwmon/pwm-fan.yaml .
|
|
*/
|
|
&fan {
|
|
/* Available cooling levels */
|
|
cooling-levels = <0 50 100 150 200 255>;
|
|
/* Four pulses of tacho signal per one revolution */
|
|
pulses-per-revolution = <4>;
|
|
/* PWM period: 100us ~= 10 kHz */
|
|
pwms = <&pwm0 0 100000>;
|
|
};
|