Identity
| Part | Generic pwm-backlight binding (no dedicated controller IC) |
| Role | Drives the LED backlight of the HX8394 panel via PWM duty cycle |
| Bus / address | RK3399 PWM0 (MMIO 0xff420000, channel 0) |
| GPIO / IRQ | Backlight enable on a board GPIO; PWM output on PWM0 pin |
| Datasheet | RK3399 TRM (PWM block) |
| Pine64 wiki | PinePhone Pro hardware |
| Schematic | sheet 4 (panel + backlight) |
Status — ● working
The backlight tracks the PWM duty cycle on every boot — bring-up sets
a usable default level and the panel becomes visible. The backlight
node is wired into the panel node via backlight = <&backlight> in
DTS so the panel driver can drive on/off transitions, though we never
actually blank it.
Driver
- Our tree:
src/sys/arm64/conf/PINEPHONE_PROlistsdevice pwm_backlight; the driver itself is supplied by the upstream FreeBSD tree (no PinePhone-specific overlay). - DTS node:
src/sys/contrib/device-tree/src/arm64/rockchip/rk3399-pinephone-pro.dts— thebacklightnode withcompatible = "pwm-backlight"and the brightness levels table. - Linux mainline:
drivers/video/backlight/pwm_bl.c
There is nothing PinePhone-specific in our backlight code path; everything that distinguishes this device is in the DTS (PWM channel choice, polarity, levels table, default-brightness-level). The driver speaks PWM through FreeBSD’s PWM bus; the actual PWM controller is the RK3399 PWM block upstream.
Open work
- No userspace API to set brightness on the fly. Linux exposes
/sys/class/backlight/...; we have no equivalent. This blocks any UI brightness slider. - Untested across panel sleep entry/exit (because the panel never sleeps).
- Default brightness level is hard-coded in DTS; needs a per-session policy.
Related
- Display from black — backlight came up alongside the DSI panel.
- Component: HX8394 panel — the panel this lights.
- Component: DW MIPI DSI — display data path.
- Hardware reference — display block summary.