ARM: dts: helios4: add regulator supplies and thermal cooling
Subsystems (2)
cover ARM: dts: helios4: add regulator supplies and thermal cooling
This series adds missing vcc-supply properties to the EEPROM and GPIO expander on the Helios4, adds SATA regulator supplies, and wires the on-board LM75 temperature sensor into a thermal zone with active fan cooling.
Rosen Penev (4):
ARM: dts: helios4: add vcc-supply to EEPROM
ARM: dts: helios4: add vcc-supply to GPIO expander
ARM: dts: helios4: add SATA regulator supplies
ARM: dts: helios4: wire LM75 into a thermal zone with fan cooling
.../boot/dts/marvell/armada-388-helios4.dts | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+)
Signature · 1 line
2.54.0
PATCH 1/4 ARM: dts: helios4: add vcc-supply to EEPROM
The at24 driver requests a 'vcc' supply for the EEPROM, producing 'supply vcc not found, using dummy regulator' at boot when the property is missing.
The EEPROM sits on the Helios 4 and is powered by the same always-on 3.3V rail used by other on-board I2C devices. Add vcc-supply = <®_3p3v> to silence the warning.
--- arch/arm/boot/dts/marvell/armada-388-helios4.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/marvell/armada-388-helios4.dts +4 -0
@@ -201,6 +201,10 @@ temp_sensor: temp@4c { reg = <0x4c>; vcc-supply = <®_3p3v>; }; + + eeprom@53 { + vcc-supply = <®_3p3v>; + }; }; i2c@11100 {
Signature · 1 line
2.54.0
PATCH 2/4 ARM: dts: helios4: add vcc-supply to GPIO expander
In reply to Rosen PenevThe pca953x driver requests a 'vcc' supply, producing:
pca953x 0-0020: supply vcc not found, using dummy regulator
The PCA9655 (PCA9555-compatible) expander is powered by the same always-on 3.3V rail as the other I2C devices on the bus. Add vcc-supply = <®_3p3v> to silence the warning.
--- arch/arm/boot/dts/marvell/armada-388-helios4.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/marvell/armada-388-helios4.dts +1 -0
@@ -169,6 +169,7 @@ expander0: gpio-expander@20 { gpio-controller; #gpio-cells = <2>; reg = <0x20>; + vcc-supply = <®_3p3v>; pinctrl-names = "default"; pinctrl-0 = <&pca0_pins>; interrupt-parent = <&gpio0>;
Signature · 1 line
2.54.0
PATCH 3/4 ARM: dts: helios4: add SATA regulator supplies
In reply to Rosen PenevThe ahci-mvebu driver and libahci_platform request three supplies on SATA controller and port nodes:
- ahci-supply (controller power)
- phy-supply (PHY power)
- target-supply (disk power per port)
Without them the regulator core prints notices at boot, e.g.:
supply ahci not found, using dummy regulator supply phy not found, using dummy regulator supply target not found, using dummy regulator
The SATA controller and PHY inside the Armada 388 SoC are powered by the 3.3V I/O rail; the four disk bays are powered by the 5V HDD rail. Wire the existing fixed regulators accordingly.
--- arch/arm/boot/dts/marvell/armada-388-helios4.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/marvell/armada-388-helios4.dts +8 -0
@@ -222,13 +222,17 @@ sata@a8000 { status = "okay"; #address-cells = <1>; #size-cells = <0>; + ahci-supply = <®_3p3v>; + phy-supply = <®_3p3v>; sata0: sata-port@0 { reg = <0>; + target-supply = <®_5p0v_hdd>; }; sata1: sata-port@1 { reg = <1>; + target-supply = <®_5p0v_hdd>; }; };
@@ -236,13 +240,17 @@ sata@e0000 { status = "okay"; #address-cells = <1>; #size-cells = <0>; + ahci-supply = <®_3p3v>; + phy-supply = <®_3p3v>; sata2: sata-port@0 { reg = <0>; + target-supply = <®_5p0v_hdd>; }; sata3: sata-port@1 { reg = <1>; + target-supply = <®_5p0v_hdd>; }; };
Signature · 1 line
2.54.0
PATCH 4/4 ARM: dts: helios4: wire LM75 into a thermal zone with fan cooling
In reply to Rosen PenevThe LM75 temperature sensor on i2c0 creates a hwmon interface but was not referenced by any thermal zone, producing:
hwmon hwmon0: temp1_input not attached to any thermal zone
--- .../boot/dts/marvell/armada-388-helios4.dts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+)
arch/arm/boot/dts/marvell/armada-388-helios4.dts +33 -0
@@ -8,6 +8,7 @@ */ /dts-v1/; +#include <dt-bindings/thermal/thermal.h> #include "armada-388.dtsi" #include "armada-38x-solidrun-microsom.dtsi"
@@ -68,6 +69,35 @@ reg_5p0v_usb: regulator-5v-usb { vin-supply = <®_12v>; }; + thermal-zones { + board-thermal { + polling-delay-passive = <2000>; + polling-delay = <10000>; + thermal-sensors = <&temp_sensor>; + + trips { + board_alert: board-alert { + temperature = <55000>; + hysteresis = <5000>; + type = "passive"; + }; + board_crit: board-crit { + temperature = <85000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&board_alert>; + cooling-device = <&fan1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&fan2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + system-leds { compatible = "gpio-leds"; pinctrl-names = "default";
@@ -129,6 +159,7 @@ fan1: j10-pwm { pwms = <&gpio1 9 40000>; /* Target freq:25 kHz */ pinctrl-names = "default"; pinctrl-0 = <&helios_fan1_pins>; + #cooling-cells = <2>; }; fan2: j17-pwm {
@@ -136,6 +167,7 @@ fan2: j17-pwm { pwms = <&gpio1 23 40000>; /* Target freq:25 kHz */ pinctrl-names = "default"; pinctrl-0 = <&helios_fan2_pins>; + #cooling-cells = <2>; }; usb2_phy: usb2-phy {
@@ -201,6 +233,7 @@ temp_sensor: temp@4c { compatible = "ti,lm75"; reg = <0x4c>; vcc-supply = <®_3p3v>; + #thermal-sensor-cells = <0>; }; eeprom@53 {
Signature · 1 line
2.54.0
[email protected]
AI reviewRe: [PATCH 4/4] ARM: dts: helios4: wire LM75 into a thermal zone with fan cooling
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] The `pwm-fan` nodes (`fan1` and `fan2`) are missing the `cooling-levels` property, rendering the…
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The pwm-fan nodes (fan1 and fan2) are missing the cooling-levels property, rendering the dynamic thermal fan cooling entirely non-functional.
- [Low] The #thermal-sensor-cells property is added to the LM75 node without documenting it in the lm75.yaml DT binding schema.
- [Low] The board_alert trip point incorrectly uses type = "passive" for active cooling fans.
--
commit 1aed98d24fa9eab58f80e2422b885b0e44e17d12
Author: Rosen Penev <[email protected]>
ARM: dts: helios4: wire LM75 into a thermal zone with fan cooling
The LM75 temperature sensor on i2c0 creates a hwmon interface but was not referenced by any thermal zone. This patch wires it into a thermal zone with fan cooling maps.
Quoted 4 lines
arch/arm/boot/dts/marvell/armada-388-helios4.dts +0
-0
[ ... ]
Quoted 5 lines
arch/arm/boot/dts/marvell/armada-388-helios4.dts +1
-0@@ -68,6 +69,35 @@ reg_5p0v_usb: regulator-5v-usb { vin-supply = <®_12v>; }; + thermal-zones {
arch/arm/boot/dts/marvell/armada-388-helios4.dts reg_5p0v_usb: regulator-5v-usb { · line 82
Quoted 10 lines
arch/arm/boot/dts/marvell/armada-388-helios4.dts +10
-0+ board-thermal { + polling-delay-passive = <2000>; + polling-delay = <10000>; + thermal-sensors = <&temp_sensor>; + + trips { + board_alert: board-alert { + temperature = <55000>; + hysteresis = <5000>; + type = "passive";
[Severity: Low]
Does this trip type match the intended use for active cooling fans?
The thermal-zones.yaml device tree binding explicitly designates type = active for fans and type = passive for CPU throttling. By using passive, the thermal framework will use polling-delay-passive intervals instead of standard active cooling intervals.
Quoted 1 line
arch/arm/boot/dts/marvell/armada-388-helios4.dts +1
-0+ };
[ ... ]
arch/arm/boot/dts/marvell/armada-388-helios4.dts fan1: j10-pwm { · line 162
Quoted 5 lines
arch/arm/boot/dts/marvell/armada-388-helios4.dts +1
-0@@ -129,6 +159,7 @@ fan1: j10-pwm { pwms = <&gpio1 9 40000>; /* Target freq:25 kHz */ pinctrl-names = "default"; pinctrl-0 = <&helios_fan1_pins>; + #cooling-cells = <2>;
[Severity: High]
Is the required cooling-levels property missing from this fan node?
Without cooling-levels defined in the pwm-fan nodes, the driver's pwm_fan_get_cooling_data() in drivers/hwmon/pwm-fan.c returns early.
This leaves pwm_fan_max_state at 0, causing the driver to set the fans to a 100% duty cycle and register the cooling device with a max state of 0. When the thermal governor attempts to change the state, it can only request state 0, leaving the fan permanently at full speed.
arch/arm/boot/dts/marvell/armada-388-helios4.dts fan2: j17-pwm { · line 170
Quoted 8 lines
arch/arm/boot/dts/marvell/armada-388-helios4.dts +1
-0}; fan2: j17-pwm {@@ -136,6 +167,7 @@ fan2: j17-pwm { pwms = <&gpio1 23 40000>; /* Target freq:25 kHz */ pinctrl-names = "default"; pinctrl-0 = <&helios_fan2_pins>; + #cooling-cells = <2>;
[Severity: High]
Will this fan also need the cooling-levels property to be controlled by the thermal zone?
Without the property, the same issue as above will prevent the thermal governor from adjusting this fan's speed.
Quoted 1 line
arch/arm/boot/dts/marvell/armada-388-helios4.dts +0
-0};
[ ... ]
arch/arm/boot/dts/marvell/armada-388-helios4.dts temp_sensor: temp@4c { · line 236
Quoted 5 lines
arch/arm/boot/dts/marvell/armada-388-helios4.dts +1
-0@@ -201,6 +233,7 @@ temp_sensor: temp@4c { compatible = "ti,lm75"; reg = <0x4c>; vcc-supply = <®_3p3v>; + #thermal-sensor-cells = <0>;
[Severity: Low]
Should the LM75 device tree binding schema be updated to document this new provider capability?
Adding an undocumented capability causes dtbs_check schema validation errors or warnings. The Documentation/devicetree/bindings/hwmon/lm75.yaml file needs to be updated to include #thermal-sensor-cells.
Quoted 1 line
arch/arm/boot/dts/marvell/armada-388-helios4.dts +0
-0};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4