1d805ef70d
After verifying the minimal v7.0-rc3+pwm15+pwm-fan+RK806 baseline boots with display on ampere, extended via bisect-by-addition to include 3 more from linux-rk3588-marfrit's pre-cherry-pick set: 0004 enable speaker output (genbook dts + cm5 dtsi) 0005 USB-C PD charging (genbook dts: FUSB302, vcc5v0_otg) 0006 lid switch + USB3 lane mux (genbook dts: gpio-keys SW_LID, usbdp_phy1) ampere-minimal-devices branch on git.reauktion.de/marfrit/linux-rk3588-marfrit @ 7c241f2e2835 = the verified-working state with all 6 patches. Display continues to work — confirms regression source is in one of the 12 remaining linux-rk3588-marfrit commits (Shawn Lin pcie3 phy series, Cristian Ciocaltea clk/dts/dw-dp, Sebastian Reichel hdmirx, Pedro Alves btrtl, plus the WIP suspend/resume patch 0010). Generated-by: Claude Opus 4.7 <claude@reauktion.de>
101 lines
3.3 KiB
Diff
101 lines
3.3 KiB
Diff
From 7c241f2e28353aa2256682993d2546b96883ae27 Mon Sep 17 00:00:00 2001
|
|
From: Markus Fritsche <mfritsche@localhost>
|
|
Date: Tue, 24 Mar 2026 00:00:00 +0000
|
|
Subject: [PATCH 6/6] arm64: dts: rockchip: rk3588-coolpi-cm5-genbook: add lid
|
|
switch and USB3 PHY lane config
|
|
|
|
The GenBook laptop has two features missing from the mainline DTS:
|
|
|
|
1. Lid switch (MH248 hall-effect sensor on GPIO0_PB0)
|
|
The lid state is reported via a gpio-keys node using SW_LID / EV_SW.
|
|
The GPIO is active-low (low = lid closed) and pulled up.
|
|
wakeup-source is set so that opening the lid can wake the system from
|
|
suspend. A sensor pinctrl group is added for the GPIO configuration.
|
|
|
|
2. usbdp_phy1 lane mux (rockchip,dp-lane-mux = <2 3>)
|
|
The RK3588 usbdp_phy1 is a combo USB3 + DisplayPort PHY shared between
|
|
the USB3 host1 port (USB-A connector) and the DisplayPort output on the
|
|
GenBook board. Lanes 0+1 carry USB3 SuperSpeed to the USB-A socket;
|
|
lanes 2+3 are routed to the DP connector.
|
|
|
|
Without this property the phy-rockchip-usbdp driver selects
|
|
UDPHY_MODE_USB and configures all four lanes as USB3. That conflicts
|
|
with the physical routing on this board: lanes 2+3 are not connected to
|
|
the USB-A socket, so the 4-lane USB3 training fails silently and the
|
|
USB3 host1 DWC3 controller (usb_host1_xhci) cannot enumerate devices.
|
|
|
|
Setting rockchip,dp-lane-mux = <2 3> restricts USB3 to lanes 0+1,
|
|
matching the physical wiring, and enables correct SuperSpeed operation
|
|
on the USB-A port.
|
|
|
|
The USB2 EHCI host1 controller (usb_host1_ehci) shares the USB power
|
|
domain with usb_host1_xhci. A stalled USB3 DWC3 probe can delay
|
|
power-domain activation in a way that prevents the EHCI hub (which
|
|
carries the integrated webcam) from being enumerated. With the correct
|
|
lane mux both controllers probe cleanly and the webcam is detected.
|
|
|
|
Generated-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Signed-off-by: Markus Fritsche <mfritsche@localhost>
|
|
---
|
|
.../rockchip/rk3588-coolpi-cm5-genbook.dts | 23 +++++++++++++++++++
|
|
1 file changed, 23 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts b/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts
|
|
index 7c577a603cb5..e3954851b0cb 100644
|
|
--- a/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts
|
|
+++ b/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts
|
|
@@ -8,6 +8,7 @@
|
|
|
|
#include <dt-bindings/leds/common.h>
|
|
#include <dt-bindings/soc/rockchip,vop2.h>
|
|
+#include <dt-bindings/input/linux-event-codes.h>
|
|
#include <dt-bindings/usb/pd.h>
|
|
#include "rk3588-coolpi-cm5.dtsi"
|
|
|
|
@@ -166,6 +167,21 @@ vcc5v0_otg: regulator-vcc5v0-otg {
|
|
pinctrl-0 = <&typec5v_pwren>;
|
|
vin-supply = <&vcc5v0_sys>;
|
|
};
|
|
+
|
|
+ gpio-key-lid {
|
|
+ compatible = "gpio-keys";
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&mh248_irq_gpio>;
|
|
+
|
|
+ lid {
|
|
+ debounce-interval = <20>;
|
|
+ gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_LOW>;
|
|
+ label = "Lid";
|
|
+ linux,code = <SW_LID>;
|
|
+ linux,input-type = <EV_SW>;
|
|
+ wakeup-source;
|
|
+ };
|
|
+ };
|
|
};
|
|
|
|
&edp1 {
|
|
@@ -431,6 +447,12 @@ pcie_wake: pcie-wake {
|
|
rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
+
|
|
+ sensor {
|
|
+ mh248_irq_gpio: mh248-irq-gpio {
|
|
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
+ };
|
|
+ };
|
|
};
|
|
|
|
&pwm6 {
|
|
@@ -512,6 +534,7 @@ &u2phy3_host {
|
|
};
|
|
|
|
&usbdp_phy1 {
|
|
+ rockchip,dp-lane-mux = <2 3>;
|
|
status = "okay";
|
|
};
|
|
|
|
--
|
|
2.54.0
|
|
|