[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#990536: linux: Please enable RK805 PMIC components for Rock64 SBC.



Source: linux
Version: 5.10.46-1
Severity: wishlist
Tags: patch

On Pine64's Rock64 SBC the RK805 Power Management IC is used, but it's
not enabled in arm64's config, so hereby the request to enable it.
It's about the following 2 settings:
- CONFIG_PINCTRL_RK805=y
- CONFIG_INPUT_RK805_PWRKEY=m

With those 2 settings enabled on an upstream kernel, the LEDs went from
always on to reacting as it is defined in the DeviceTree, which is 
'mmc0' and 'heartbeat'. It also made /sys/devices/platform/leds/leds/
available which allows one to configure the trigger.

Attached is the patch I applied to the upstream kernel source.

Regards,
  Diederik

-- System Information:
Debian Release: 11.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'testing'), (101, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-8-amd64 (SMP w/16 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
>From 3613d72806d37dcb7812c55513fcf232afb7746f Mon Sep 17 00:00:00 2001
From: Diederik de Haas <didi.debian@cknow.org>
Date: Sun, 23 May 2021 23:53:22 +0200
Subject: [PATCH 4/4] Enable Power Management ICs for RK805 components.

https://www.cnx-software.com/pdf/Rockchip-Roadmap-2019-.11_mts.pdf
says on page 3 that RK805 is used for RK3328/RK3228 SOCs and
Pine64's Rock64 is a SBC that uses that.
The PINCTRL_RK805 makes the LEDs work on the Rock64 and can be
managed/configured via /sys/devices/platform/leds/leds/.
The default is as configured in the DeviceTree.
There's (apparently) also a power button on the Rock64 and the
INPUT_RK805_PWRKEY is the module through which one can enable it.

Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
---
 arch/arm64/configs/defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 24ac86a3003f..90e7442ec38d 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -383,6 +383,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
 CONFIG_TOUCHSCREEN_ATMEL_MXT=m
 CONFIG_INPUT_MISC=y
 CONFIG_INPUT_PM8941_PWRKEY=y
+CONFIG_INPUT_RK805_PWRKEY=m
 CONFIG_INPUT_PM8XXX_VIBRATOR=m
 CONFIG_INPUT_HISI_POWERKEY=y
 # CONFIG_SERIO_SERPORT is not set
@@ -474,6 +475,7 @@ CONFIG_SPI_SPIDEV=m
 CONFIG_SPMI=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_PINCTRL_MAX77620=y
+CONFIG_PINCTRL_RK805=y
 CONFIG_PINCTRL_OWL=y
 CONFIG_PINCTRL_S700=y
 CONFIG_PINCTRL_S900=y
-- 
2.32.0.rc0


Reply to: