Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further EMC2305 tweaks #5441

Merged
merged 2 commits into from
Apr 24, 2023
Merged

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Apr 21, 2023

The thermal subsystem and this driver still feel a little odd, so followups or amendments to this PR are likely.

The emc2305,pwm-max value only clips the max speed that can be set via sysfs (sys/class/hwmon/hwmonX/pwm), not the max state that can be requested by the thermal side.
emc2305,pwm-min does appear to set the minimum state that can be used.

I'm not fully understanding how the thermal subsystem is intending to control a fan such as this where we have 10 states. The PoE HAT fan driver maps specific trip temperatures to specific state values. That works, but feels a little course.
In defining the map as eg cooling-device = <&emc2301 2 6>;, once the trip is hit the subsystem is allowed to use states 2 to 6 to cool the device. The second trip then allows states 7 to max (10) once hit. Which state appears to be controlled via a PID loop, but the exact properties for that loop and how it chooses the state seem ill-defined.

If anyone has more knowledge on the thermal subsystem and fan control, then I'm open to input.

There is no DT binding for emc2305 as mainline are still
discussing how to do a generic fan binding.
The 5.15 driver was reading the "emc2305," properties
"cooling-levels", "pwm-max", "pwm-min", and "pwm-channel" as u8.
The overlay was writing them as u16 (;) so it was working.

The 6.1 driver was reading as u32, which failed as there is
insufficient data.

As this is all downstream only, revert to u8 to match 5.15.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
The driver is only reading a u8, so change the overlay to match.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
@pelwell pelwell merged commit e39b143 into raspberrypi:rpi-6.1.y Apr 24, 2023
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Apr 25, 2023
kernel: media: i2c: imx219: Scale the pixel clock rate for the 640x480 mode
See: raspberrypi/linux#5439

kernel: hwmon: emc2305: Add calls to initialise of cooling maps
See: raspberrypi/linux#5440

kernel: Create driver for Waveshare DSI screens
See: raspberrypi/linux#5433

kernel: arm/boot/dts/overlays/mipi-dbi-spi: fix default brightness
See: raspberrypi/linux#5442

kernel: i2c-mux and i2c-pwm overlay updates for alternate i2c buses
See: raspberrypi/linux#5443

kernel: Further EMC2305 tweaks
See: raspberrypi/linux#5441

kernel: drm/vc4: Limit max_bpc to 8 on Pi0-3
See: raspberrypi/linux#5444

kernel: Revert: amba_pl011: Round input clock up

firmware: arm_loader: Set local-bd-address if 6 zeroes found
firmware: arm_loader: Really check for a zero local-bd-address
See: raspberrypi/linux#5437

firmware: arm_dt: Don't overwrite existing i2c aliases
See: raspberrypi/linux#5428

firmware: arm_loader: Reduce CMA warning severity
See: #1807

userland: dtoverlay: Use os_prefix if set
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Apr 25, 2023
kernel: media: i2c: imx219: Scale the pixel clock rate for the 640x480 mode
See: raspberrypi/linux#5439

kernel: hwmon: emc2305: Add calls to initialise of cooling maps
See: raspberrypi/linux#5440

kernel: Create driver for Waveshare DSI screens
See: raspberrypi/linux#5433

kernel: arm/boot/dts/overlays/mipi-dbi-spi: fix default brightness
See: raspberrypi/linux#5442

kernel: i2c-mux and i2c-pwm overlay updates for alternate i2c buses
See: raspberrypi/linux#5443

kernel: Further EMC2305 tweaks
See: raspberrypi/linux#5441

kernel: drm/vc4: Limit max_bpc to 8 on Pi0-3
See: raspberrypi/linux#5444

kernel: Revert: amba_pl011: Round input clock up

firmware: arm_loader: Set local-bd-address if 6 zeroes found
firmware: arm_loader: Really check for a zero local-bd-address
See: raspberrypi/linux#5437

firmware: arm_dt: Don't overwrite existing i2c aliases
See: raspberrypi/linux#5428

firmware: arm_loader: Reduce CMA warning severity
See: raspberrypi/firmware#1807

userland: dtoverlay: Use os_prefix if set
@6by9 6by9 mentioned this pull request Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants