unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Vagrant Cascadian <vagrant@debian.org>
To: 48050@debbugs.gnu.org
Subject: bug#48050: Pinebook Pro LCD and Audio support
Date: Mon, 26 Apr 2021 23:38:16 -0700	[thread overview]
Message-ID: <87lf94p6zr.fsf@yucca> (raw)
In-Reply-To: <87o8e0mx1m.fsf@yucca>


[-- Attachment #1.1: Type: text/plain, Size: 215 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-linux-libre-Add-LCD-battery-and-sound-support-fo.patch --]
[-- Type: text/x-diff, Size: 4879 bytes --]

From 4c2a728e1186367a4bdc5c4416d6d58eee13b0e7 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@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@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@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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  parent reply	other threads:[~2021-04-27  6:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 23:43 bug#48050: Pinebook Pro LCD and Audio support Vagrant Cascadian
     [not found] ` <handler.48050.B.161948065514671.ack@debbugs.gnu.org>
2021-04-27  0:11   ` Vagrant Cascadian
2021-04-27  6:38 ` Vagrant Cascadian [this message]
2021-04-29 23:55   ` Vagrant Cascadian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf94p6zr.fsf@yucca \
    --to=vagrant@debian.org \
    --cc=48050@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).