GNU bug report logs - #48050
Pinebook Pro LCD and Audio support

Previous Next

Package: guix;

Reported by: Vagrant Cascadian <vagrant <at> debian.org>

Date: Mon, 26 Apr 2021 23:45:02 UTC

Severity: normal

Done: Vagrant Cascadian <vagrant <at> debian.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48050 in the body.
You can then email your comments to 48050 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#48050; Package guix. (Mon, 26 Apr 2021 23:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vagrant Cascadian <vagrant <at> debian.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 26 Apr 2021 23:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: bug-guix <at> gnu.org
Cc: Leo Famulari <leo <at> famulari.name>
Subject: Pinebook Pro LCD and Audio support
Date: Mon, 26 Apr 2021 16:43:49 -0700
[Message part 1 (text/plain, inline)]
The attached patch enables support for LCD display and limited audio
support for pinebook-pro-rk3399.

With this, the Pinebook Pro gets display output on the built-in LCD.

Console works, wayland works (tested with sway), presumably X.org would
work as well (untested).

Audio output on headphones kind of works.

Trackpad is still a little sketchy; might require enabling some more
modules.

This should basically obsolete the need for the wip-pinebook-pro branch;
I haven't noticed any significant functionality difference.


I believe the same patches and changes apply and work more-or-less
unchanged for linux-libre 5.10 lts series (I tested against Debian's
5.10.x kernel), and it might be worth having an LTS kernel with this
enabled. If that's considered desireable, I can update the patch to add
that too.


Since this will require rebuilding the linux-libre tarball, it is
probably best to wait to merge this until the next batch of linux-libre
updates (e.g. linux-libre 5.11.x and 5.10.x, no need to wait till 5.12).


If USB-C DisplayPort ever becomes supported and working on pinebook-pro,
this patch will need to be removed.


live well,
  vagrant

[0001-gnu-linux-libre-Add-LCD-and-sound-support-for-Pinebo.patch (text/x-diff, inline)]
From 478b620eb4f52e76bde691262ebc793e4e3fd384 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant <at> debian.org>
Date: Mon, 26 Apr 2021 09:27:50 -0700
Subject: [PATCH] gnu: linux-libre: Add LCD and sound support for Pinebook Pro.

* gnu/packages/linux.scm (linux-libre-5.11-source): Add Pinebook Pro
  lcd patch.
  (linux-libre-arm64-generic): Enable audio module for Pinebook Pro.
* gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add patch.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/linux.scm                        |  9 ++++-
 ...nux-libre-arm64-generic-pinebook-lcd.patch | 40 +++++++++++++++++++
 3 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e8b6effb36..5a2ae6ef48 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1369,6 +1369,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/linkchecker-tests-require-network.patch	\
   %D%/packages/patches/linphone-desktop-without-sdk.patch           \
   %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \
+  %D%/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch \
   %D%/packages/patches/linux-pam-no-setfsuid.patch		\
   %D%/packages/patches/lirc-localstatedir.patch			\
   %D%/packages/patches/lirc-reproducible-build.patch		\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 080ffab527..1c6e1502b2 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -481,7 +481,10 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
 (define-public linux-libre-5.11-source
   (source-with-patches linux-libre-5.11-pristine-source
                        (list %boot-logo-patch
-                             %linux-libre-arm-export-__sync_icache_dcache-patch)))
+                             %linux-libre-arm-export-__sync_icache_dcache-patch
+                             ;; Pinebook Pro patch to fix LCD display
+                             (search-patch
+                              "linux-libre-arm64-generic-pinebook-lcd.patch"))))
 
 (define-public linux-libre-5.10-source
   (source-with-patches linux-libre-5.10-pristine-source
@@ -1044,7 +1047,9 @@ It has been modified to remove all non-free binary blobs.")
                         ("CONFIG_BATTERY_AXP20X" . m)
                         ("CONFIG_PINCTRL_AXP209" . m)
                         ("CONFIG_AXP20X_POWER" . m)
-                        ("CONFIG_AXP20X_ADC" . m))
+                        ("CONFIG_AXP20X_ADC" . m)
+                        ;; Pinebook PRO sound support
+                        ("CONFIG_SND_SOC_ES8316" . m))
                       %default-extra-linux-options)))
 
 (define-public linux-libre-arm64-generic-5.10
diff --git a/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch b/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch
new file mode 100644
index 0000000000..51ab544d5e
--- /dev/null
+++ b/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch
@@ -0,0 +1,40 @@
+From 3a75704e99a118f2d8a4d70f07781558bde85770 Mon Sep 17 00:00:00 2001
+From: Jian-Hong Pan <jhp <at> endlessos.org>
+Date: Thu, 24 Sep 2020 14:30:43 +0800
+Subject: [PATCH] arm64: dts: rockchip: disable USB type-c DisplayPort
+
+The cdn-dp sub driver probes the device failed on PINEBOOK Pro.
+
+kernel: cdn-dp fec00000.dp: [drm:cdn_dp_probe [rockchipdrm]] *ERROR* missing extcon or phy
+kernel: cdn-dp: probe of fec00000.dp failed with error -22
+
+Then, the device halts all of the DRM related device jobs. For example,
+the operations: vop_component_ops, vop_component_ops and
+rockchip_dp_component_ops cannot be bound to corresponding devices. So,
+Xorg cannot find the correct DRM device.
+
+The USB type-C DisplayPort does not work for now. So, disable the
+DisplayPort node until the type-C phy work has been done.
+
+Link: https://patchwork.kernel.org/patch/11794141/#23639877
+Signed-off-by: Jian-Hong Pan <jhp <at> endlessos.org>
+---
+ arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+index 219b7507a10f..45769764425d 100644
+--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+@@ -380,7 +380,7 @@
+ };
+ 
+ &cdn_dp {
+-	status = "okay";
++	status = "disabled";
+ };
+ 
+ &cpu_b0 {
+-- 
+2.30.2
+
-- 
2.30.2

[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#48050; Package guix. (Tue, 27 Apr 2021 00:12:01 GMT) Full text and rfc822 format available.

Message #8 received at 48050 <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: 48050 <at> debbugs.gnu.org
Subject: Re: bug#48050: Pinebook Pro LCD and Audio support
Date: Mon, 26 Apr 2021 17:11:35 -0700
[Message part 1 (text/plain, inline)]
Control: reassign 48050 guix-patches

Reassigning to guix-patches.

Unless this debbugs is all old-school and I have to send to instead
control <at> debbugs.gnu.org ... will know shortly!


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#48050; Package guix. (Tue, 27 Apr 2021 06:39:01 GMT) Full text and rfc822 format available.

Message #11 received at 48050 <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: 48050 <at> debbugs.gnu.org
Cc: Leo Famulari <leo <at> famulari.name>
Subject: Re: bug#48050: Pinebook Pro LCD and Audio support
Date: Mon, 26 Apr 2021 23:38:16 -0700
[Message part 1 (text/plain, inline)]
On 2021-04-26, Vagrant Cascadian wrote:
> The attached patch enables support for LCD display and limited audio
> support for pinebook-pro-rk3399.

Updated patch which adds battery support too.

live well,
  vagrant
[0001-gnu-linux-libre-Add-LCD-battery-and-sound-support-fo.patch (text/x-diff, inline)]
From 4c2a728e1186367a4bdc5c4416d6d58eee13b0e7 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant <at> debian.org>
Date: Mon, 26 Apr 2021 09:27:50 -0700
Subject: [PATCH] gnu: linux-libre: Add LCD, battery and sound support for
 Pinebook Pro.

* gnu/packages/linux.scm (linux-libre-5.11-source): Add Pinebook Pro
  lcd patch.
  (linux-libre-arm64-generic): Enable audio and battery modules for
  Pinebook Pro.
* gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add patch.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/linux.scm                        | 11 ++++-
 ...nux-libre-arm64-generic-pinebook-lcd.patch | 40 +++++++++++++++++++
 3 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e8b6effb36..5a2ae6ef48 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1369,6 +1369,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/linkchecker-tests-require-network.patch	\
   %D%/packages/patches/linphone-desktop-without-sdk.patch           \
   %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \
+  %D%/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch \
   %D%/packages/patches/linux-pam-no-setfsuid.patch		\
   %D%/packages/patches/lirc-localstatedir.patch			\
   %D%/packages/patches/lirc-reproducible-build.patch		\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 080ffab527..bd79b40ca6 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -481,7 +481,10 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
 (define-public linux-libre-5.11-source
   (source-with-patches linux-libre-5.11-pristine-source
                        (list %boot-logo-patch
-                             %linux-libre-arm-export-__sync_icache_dcache-patch)))
+                             %linux-libre-arm-export-__sync_icache_dcache-patch
+                             ;; Pinebook Pro patch to fix LCD display
+                             (search-patch
+                              "linux-libre-arm64-generic-pinebook-lcd.patch"))))
 
 (define-public linux-libre-5.10-source
   (source-with-patches linux-libre-5.10-pristine-source
@@ -1044,7 +1047,11 @@ It has been modified to remove all non-free binary blobs.")
                         ("CONFIG_BATTERY_AXP20X" . m)
                         ("CONFIG_PINCTRL_AXP209" . m)
                         ("CONFIG_AXP20X_POWER" . m)
-                        ("CONFIG_AXP20X_ADC" . m))
+                        ("CONFIG_AXP20X_ADC" . m)
+                        ;; Pinebook PRO battery and sound support
+                        ("CONFIG_BATTERY_CW2015" . m)
+                        ("CONFIG_CHARGER_GPIO" . m)
+                        ("CONFIG_SND_SOC_ES8316" . m))
                       %default-extra-linux-options)))
 
 (define-public linux-libre-arm64-generic-5.10
diff --git a/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch b/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch
new file mode 100644
index 0000000000..51ab544d5e
--- /dev/null
+++ b/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch
@@ -0,0 +1,40 @@
+From 3a75704e99a118f2d8a4d70f07781558bde85770 Mon Sep 17 00:00:00 2001
+From: Jian-Hong Pan <jhp <at> endlessos.org>
+Date: Thu, 24 Sep 2020 14:30:43 +0800
+Subject: [PATCH] arm64: dts: rockchip: disable USB type-c DisplayPort
+
+The cdn-dp sub driver probes the device failed on PINEBOOK Pro.
+
+kernel: cdn-dp fec00000.dp: [drm:cdn_dp_probe [rockchipdrm]] *ERROR* missing extcon or phy
+kernel: cdn-dp: probe of fec00000.dp failed with error -22
+
+Then, the device halts all of the DRM related device jobs. For example,
+the operations: vop_component_ops, vop_component_ops and
+rockchip_dp_component_ops cannot be bound to corresponding devices. So,
+Xorg cannot find the correct DRM device.
+
+The USB type-C DisplayPort does not work for now. So, disable the
+DisplayPort node until the type-C phy work has been done.
+
+Link: https://patchwork.kernel.org/patch/11794141/#23639877
+Signed-off-by: Jian-Hong Pan <jhp <at> endlessos.org>
+---
+ arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+index 219b7507a10f..45769764425d 100644
+--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+@@ -380,7 +380,7 @@
+ };
+ 
+ &cdn_dp {
+-	status = "okay";
++	status = "disabled";
+ };
+ 
+ &cpu_b0 {
+-- 
+2.30.2
+
-- 
2.30.2

[signature.asc (application/pgp-signature, inline)]

Reply sent to Vagrant Cascadian <vagrant <at> debian.org>:
You have taken responsibility. (Thu, 29 Apr 2021 23:57:02 GMT) Full text and rfc822 format available.

Notification sent to Vagrant Cascadian <vagrant <at> debian.org>:
bug acknowledged by developer. (Thu, 29 Apr 2021 23:57:02 GMT) Full text and rfc822 format available.

Message #16 received at 48050-done <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: 48050-done <at> debbugs.gnu.org
Cc: Leo Famulari <leo <at> famulari.name>
Subject: Re: bug#48050: Pinebook Pro LCD and Audio support
Date: Thu, 29 Apr 2021 16:55:57 -0700
[Message part 1 (text/plain, inline)]
On 2021-04-26, Vagrant Cascadian wrote:
> On 2021-04-26, Vagrant Cascadian wrote:
>> The attached patch enables support for LCD display and limited audio
>> support for pinebook-pro-rk3399.
>
> Updated patch which adds battery support too.

Fixed in linux-libre <at> 5.11 and linux-libre <at> 5.10, pushed to master.

d018a11ee065e0f6bafb33fcc1a130aa7900b5a3 gnu:
linux-libre-arm64-generic <at> 5.10: Add eDP panel, audio and battery support
for Pinebook Pro.

e7fbf10066e3634ec2d284c07afb4fa625d18574 gnu: linux-libre-arm64-generic:
Add eDP panel, battery and audio support for Pinebook Pro.


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 May 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.