Hi

Current rkpwm is assuming "pwm" clock and therefore requires
"clock-names" entry in dtb. This has been removed in
https://github.com/torvalds/linux/commit/ba0d527be and therefore rkpwm
fails with:
rkpwm0 at mainbus0: no clock
rkpwm1 at mainbus0: no clock
which in turn makes the brightness control on Pinebook Pro not present.

The following uses the only clock available and restores the
brightness control functionality.

Tomasz

Index: sys/dev/fdt/rkpwm.c
===================================================================
RCS file: /mnt/cvshome/src/sys/dev/fdt/rkpwm.c,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 rkpwm.c
--- sys/dev/fdt/rkpwm.c 8 Sep 2020 01:29:04 -0000 1.2
+++ sys/dev/fdt/rkpwm.c 27 Jul 2021 05:53:26 -0000
@@ -93,7 +93,7 @@ rkpwm_attach(struct device *parent, stru
  return;
  }

- sc->sc_clkin = clock_get_frequency(faa->fa_node, "pwm");
+ sc->sc_clkin = clock_get_frequency(faa->fa_node, NULL);
  if (sc->sc_clkin == 0) {
  printf(": no clock\n");
  return;

Reply via email to