Re: [PATCH 4/6] arm64: dts: rockchip: Add devicetree for Pine64 Pinetab2
On Friday, December 22, 2023 11:05:44 AM UTC Manuel Traut wrote: > From: Segfault Using nickname is not allowed: https://www.kernel.org/doc/html/v6.6/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin > > This includes support for both the v0.1 units that were sent to developers > and the v2.0 units from production. > > v1.0 is not included as no units are known to exist. > > Working/Tested: > - SDMMC > - UART > - Buttons > - Charging/Battery/PMIC > - Audio > - USB > - Display > > WiFi is not added, since the driver is not ready for mainline. > > Signed-off-by: Segfault > Signed-off-by: Manuel Traut > --- > arch/arm64/boot/dts/rockchip/Makefile |2 + > .../boot/dts/rockchip/rk3566-pinetab2-v0.1.dts | 26 + > .../boot/dts/rockchip/rk3566-pinetab2-v2.0.dts | 46 + > arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi | 1032 > 4 files changed, 1106 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/Makefile > b/arch/arm64/boot/dts/rockchip/Makefile index a18f33bf0c0e..ef66c0937a9b > 100644 > --- a/arch/arm64/boot/dts/rockchip/Makefile > +++ b/arch/arm64/boot/dts/rockchip/Makefile > @@ -77,6 +77,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353vs.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg503.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinetab2-v0.1.dtb > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinetab2-v2.0.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb30.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts > b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts new file mode > 100644 > index ..ba244545ba26 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts > @@ -0,0 +1,26 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) Not sure if this is needed but there's no copyright header here (same with other files in this patch) > + > +/dts-v1/; > + > +#include "rk3566-pinetab2.dtsi" > + > +/ { > + model = "Pine64 PineTab2 v0.1"; > + compatible = "pine64,pinetab2-v0.1", "pine64,pinetab2", > "rockchip,rk3566"; > +}; > + > + { > + reset-gpios = < RK_PA6 GPIO_ACTIVE_LOW>; > +}; > + > + { > + display { > + lcd0_rst_l: lcd0-rst-l { > + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO _pull_none>; > + }; > + }; > +}; > + > +_wl { > + gpio = < RK_PA0 GPIO_ACTIVE_LOW>; > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts > b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts new file mode > 100644 > index ..f401ff802175 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts > @@ -0,0 +1,46 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > + > +/dts-v1/; > + > +#include "rk3566-pinetab2.dtsi" > + > +/ { > + model = "Pine64 PineTab2 v2.0"; > + compatible = "pine64,pinetab2-v2.0", "pine64,pinetab2", > "rockchip,rk3566"; > +}; > + > +_keys { > + pinctrl-0 = <_id_det>, <_int_l>; > + > + event-hall-sensor { > + debounce-interval = <20>; > + gpios = < RK_PA6 GPIO_ACTIVE_LOW>; > + label = "Hall Sensor"; > + linux,code = ; > + linux,input-type = ; > + wakeup-event-action = ; > + wakeup-source; > + }; > +}; > + > + { > + reset-gpios = < RK_PC6 GPIO_ACTIVE_LOW>; > +}; > + > + { > + display { > + lcd0_rst_l: lcd0-rst-l { > + rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO _pull_none>; > + }; > + }; > + > + hall { > + hall_int_l: hall-int-l { > + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO _pull_none>; > + }; > + }; > +}; > + > +_wl { > + gpio = < RK_PA0 GPIO_ACTIVE_HIGH>; > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi new file mode 100644 > index ..6d320cfee338 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > @@ -0,0 +1,1032 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include "rk3566.dtsi" > + > +/ { > + chassis-type = "tablet"; > + > + aliases { > + mmc0 = > + mmc1 = > + }; > + > + chosen { > + stdout-path = "serial2:150n8"; > + }; > + > + adc-keys { > + compatible = "adc-keys"; > + io-channels = < 0>; > + io-channel-names = "buttons"; > + keyup-threshold-microvolt = <180>; > + poll-interval = <25>; > + > + button-vol-up { > +
Re: [PATCH 4/6] arm64: dts: rockchip: Add devicetree for Pine64 Pinetab2
Hi Manuel, On Saturday, 23 December 2023 14:59:34 CET Manuel Traut wrote: > On Fri, Dec 22, 2023 at 06:01:54PM +0100, Diederik de Haas wrote: > > On Friday, 22 December 2023 12:05:44 CET Manuel Traut wrote: > > > + > > > + { > > > + assigned-clocks = < PLL_GPLL>, < PLL_PPLL>, < > > > PLL_VPLL>; + assigned-clock-rates = <12>, <2>, > > > <5>; +}; > > > > Attachment seem to work and for this I also have the attached patch in my > > patch set. > > IIRC without it you get an error in dmesg immediately at boot up which is > > visible on the PT2 *if* you have immediate visual output (which is not > > (yet?) the case in my image/kernel). > > you can see the message also by calling "dmesg --level err". > I could verify that your patch removes the error message. As I have been using that patch for a while, I couldn't verify it myself anymore ;-) If you use the (default) danctnix image, then you see it immediately at boot up (at least the last time I tried it). With my (WIP) image, I only get visual output after 5-7 seconds, so you'll likely miss that visual error if the image you use also has a delay before outputting things on the screen. But indeed, it would still show up in dmesg (without the patch). > I will pick the change for v2. Great :-) signature.asc Description: This is a digitally signed message part.
Re: [PATCH 4/6] arm64: dts: rockchip: Add devicetree for Pine64 Pinetab2
On Fri, Dec 22, 2023 at 05:49:35PM +0100, Diederik de Haas wrote: > On Friday, 22 December 2023 12:05:44 CET Manuel Traut wrote: > > + rk817-sound { > > + compatible = "simple-audio-card"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <_det_l>; > > + simple-audio-card,format = "i2s"; > > + simple-audio-card,name = "PineTab2"; > > + simple-audio-card,mclk-fs = <256>; > > + > > + simple-audio-card,widgets = > > + "Microphone", "Mic Jack", > > + "Headphone", "Headphones", > > + "Microphone", "Microphone", > > + "Speaker", "Speakers"; > > + > > + simple-audio-card,routing = > > + "MICL", "Microphone", > > + "MICR", "Mic Jack", > > + "Headphones", "HPOL", > > + "Headphones", "HPOR", > > + "Speaker Amplifier INL", "HPOL", > > + "Speaker Amplifier INR", "HPOR", > > + "Speakers", "Speaker Amplifier OUTL", > > + "Speakers", "Speaker Amplifier OUTR"; > > + > > + simple-audio-card,hp-det-gpio = < RK_PC6 > > GPIO_ACTIVE_HIGH>; + simple-audio-card,aux-devs = > > <_amp>; > > + simple-audio-card,pin-switches = "Speakers", "Microphone"; > > + > > + simple-audio-card,cpu { > > + sound-dai = <_8ch>; > > + }; > > + > > + simple-audio-card,codec { > > + sound-dai = <>; > > + }; > > + }; > > Not sure if it's right (or allowed) to post a different patch as attachment, > but I have been using a different audio configuration (see attachment). > I haven't yet tried if/how it works via HDMI yet, but the speakers and > headphones work fine. > This patch is based on the following commit: > https://github.com/TuxThePenguin0/linux/commit/ > 872b829a3511cfa853bd3af3bd4f30be1cb3d1ab Yes, this fixes the headphone detection. I cannot test HDMI because of a missing cable. I will pick the change in v2. > I've added 'Danct12' to the To list as they are the maintainer of the primary > PT2 image and we worked together to get to this audio config. > I don't if they still use it. > (I've been using my own kernel/image for a while now). Thanks. I just crossed this repo: https://github.com/dreemurrs-embedded/linux-pinetab2/tree/v6.6.7-danctnix1 It includes some more improvements I will pick for v2. Regards Manuel > From 17efeb0ae766886345ff0574c534079742539b56 Mon Sep 17 00:00:00 2001 > From: Scott Santucci > Date: Mon, 17 Jul 2023 13:06:20 +0200 > Subject: [PATCH 3/8] arm64: dts: rk3566-pinetab2: Fix audio configuration > > The audio configuration of the PineTab2 matches the `rk817_ext` alsa > ucm2 profile, so switch the configuration to that. Use `rk817_ext` and > not `rk817_int` as the PineTab2 uses an external amplifier. > > Also the headphones plugged/unplugged detection is backwards, so apply > the fix provided by Danct12 . > > Signed-off-by: Diederik de Haas > Link: https://github.com/dreemurrs-embedded/Pine64-Arch/pull/555 > --- > arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > index a766f21bd6f8..59e4bf2f77c7 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > @@ -116,14 +116,14 @@ rk817-sound { > pinctrl-names = "default"; > pinctrl-0 = <_det_l>; > simple-audio-card,format = "i2s"; > - simple-audio-card,name = "PineTab2"; > + simple-audio-card,name = "rk817_ext"; > simple-audio-card,mclk-fs = <256>; > > simple-audio-card,widgets = > "Microphone", "Mic Jack", > "Headphone", "Headphones", > "Microphone", "Microphone", > - "Speaker", "Speakers"; > + "Speaker", "Internal Speakers"; > > simple-audio-card,routing = > "MICL", "Microphone", > @@ -132,12 +132,12 @@ rk817-sound { > "Headphones", "HPOR", > "Speaker Amplifier INL", "HPOL", > "Speaker Amplifier INR", "HPOR", > - "Speakers", "Speaker Amplifier OUTL", > - "Speakers", "Speaker Amplifier OUTR"; > + "Internal Speakers", "Speaker Amplifier OUTL", > + "Internal Speakers", "Speaker Amplifier OUTR"; > > - simple-audio-card,hp-det-gpio = < RK_PC6 > GPIO_ACTIVE_HIGH>; > +
Re: [PATCH 4/6] arm64: dts: rockchip: Add devicetree for Pine64 Pinetab2
Hi Diederik, On Fri, Dec 22, 2023 at 06:01:54PM +0100, Diederik de Haas wrote: > On Friday, 22 December 2023 12:05:44 CET Manuel Traut wrote: > > + > > + { > > + assigned-clocks = < PLL_GPLL>, < PLL_PPLL>, < > > PLL_VPLL>; + assigned-clock-rates = <12>, <2>, > > <5>; +}; > > Attachment seem to work and for this I also have the attached patch in my > patch set. > IIRC without it you get an error in dmesg immediately at boot up which is > visible on the PT2 *if* you have immediate visual output (which is not (yet?) > the case in my image/kernel). you can see the message also by calling "dmesg --level err". I could verify that your patch removes the error message. I will pick the change for v2. > Cheers, > Diederik > From d782a64f3b51ffb2f33d3ba3e11e2ebc416542e3 Mon Sep 17 00:00:00 2001 > From: Jonas Karlman > Date: Thu, 17 Aug 2023 17:52:47 +0200 > Subject: [PATCH 6/8] arm64: dts: rk3566-pinetab2: Fix cru assigned clocks > > Jonas Karlman provided/linked to the patch on IRC. > Seems related to upstream commit 64b69474edf3b885c19a89bb165f978ba1b4be00. > > Signed-off-by: Diederik de Haas > Link: > https://github.com/Kwiboo/u-boot-rockchip/blob/rk3568-2023.10/arch/arm/dts/rk3566-pinetab2-u-boot.dtsi#L11-L15 > Link: https://lore.kernel.org/all/20230110225547.1563119-2-jo...@kwiboo.se/ > --- > arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > index bbd7ed53602a..4a5bee5a28a7 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi > @@ -288,8 +288,9 @@ { > }; > > { > - assigned-clocks = < PLL_GPLL>, < PLL_PPLL>, < PLL_VPLL>; > - assigned-clock-rates = <12>, <2>, <5>; > + assigned-clocks = < CLK_RTC_32K>, < PLL_GPLL>, < > PLL_PPLL>, < PLL_VPLL>; > + assigned-clock-rates = <32768>, <12>, <2>, <5>; > + assigned-clock-parents = < CLK_RTC32K_FRAC>; > }; > > _dphy { > -- > 2.42.0 >
[PATCH 4/6] arm64: dts: rockchip: Add devicetree for Pine64 Pinetab2
From: Segfault This includes support for both the v0.1 units that were sent to developers and the v2.0 units from production. v1.0 is not included as no units are known to exist. Working/Tested: - SDMMC - UART - Buttons - Charging/Battery/PMIC - Audio - USB - Display WiFi is not added, since the driver is not ready for mainline. Signed-off-by: Segfault Signed-off-by: Manuel Traut --- arch/arm64/boot/dts/rockchip/Makefile |2 + .../boot/dts/rockchip/rk3566-pinetab2-v0.1.dts | 26 + .../boot/dts/rockchip/rk3566-pinetab2-v2.0.dts | 46 + arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi | 1032 4 files changed, 1106 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index a18f33bf0c0e..ef66c0937a9b 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -77,6 +77,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353vs.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg503.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinetab2-v0.1.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinetab2-v2.0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb30.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts new file mode 100644 index ..ba244545ba26 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "rk3566-pinetab2.dtsi" + +/ { + model = "Pine64 PineTab2 v0.1"; + compatible = "pine64,pinetab2-v0.1", "pine64,pinetab2", "rockchip,rk3566"; +}; + + { + reset-gpios = < RK_PA6 GPIO_ACTIVE_LOW>; +}; + + { + display { + lcd0_rst_l: lcd0-rst-l { + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO _pull_none>; + }; + }; +}; + +_wl { + gpio = < RK_PA0 GPIO_ACTIVE_LOW>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts new file mode 100644 index ..f401ff802175 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "rk3566-pinetab2.dtsi" + +/ { + model = "Pine64 PineTab2 v2.0"; + compatible = "pine64,pinetab2-v2.0", "pine64,pinetab2", "rockchip,rk3566"; +}; + +_keys { + pinctrl-0 = <_id_det>, <_int_l>; + + event-hall-sensor { + debounce-interval = <20>; + gpios = < RK_PA6 GPIO_ACTIVE_LOW>; + label = "Hall Sensor"; + linux,code = ; + linux,input-type = ; + wakeup-event-action = ; + wakeup-source; + }; +}; + + { + reset-gpios = < RK_PC6 GPIO_ACTIVE_LOW>; +}; + + { + display { + lcd0_rst_l: lcd0-rst-l { + rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO _pull_none>; + }; + }; + + hall { + hall_int_l: hall-int-l { + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO _pull_none>; + }; + }; +}; + +_wl { + gpio = < RK_PA0 GPIO_ACTIVE_HIGH>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi new file mode 100644 index ..6d320cfee338 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi @@ -0,0 +1,1032 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +#include +#include +#include +#include +#include +#include +#include +#include "rk3566.dtsi" + +/ { + chassis-type = "tablet"; + + aliases { + mmc0 = + mmc1 = + }; + + chosen { + stdout-path = "serial2:150n8"; + }; + + adc-keys { + compatible = "adc-keys"; + io-channels = < 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <180>; + poll-interval = <25>; + + button-vol-up { + label = "Volume Up"; + linux,code = ; + press-threshold-microvolt = <297500>; + }; + + button-vol-down { + label = "Volume Down"; + linux,code = ; + press-threshold-microvolt = <1750>; + }; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = < 0 25000 0>; + brightness-levels = <20 220>; +
Re: [PATCH 4/6] arm64: dts: rockchip: Add devicetree for Pine64 Pinetab2
On Friday, 22 December 2023 12:05:44 CET Manuel Traut wrote: > + > + { > + assigned-clocks = < PLL_GPLL>, < PLL_PPLL>, < > PLL_VPLL>; + assigned-clock-rates = <12>, <2>, > <5>; +}; Attachment seem to work and for this I also have the attached patch in my patch set. IIRC without it you get an error in dmesg immediately at boot up which is visible on the PT2 *if* you have immediate visual output (which is not (yet?) the case in my image/kernel). Cheers, Diederik>From d782a64f3b51ffb2f33d3ba3e11e2ebc416542e3 Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Thu, 17 Aug 2023 17:52:47 +0200 Subject: [PATCH 6/8] arm64: dts: rk3566-pinetab2: Fix cru assigned clocks Jonas Karlman provided/linked to the patch on IRC. Seems related to upstream commit 64b69474edf3b885c19a89bb165f978ba1b4be00. Signed-off-by: Diederik de Haas Link: https://github.com/Kwiboo/u-boot-rockchip/blob/rk3568-2023.10/arch/arm/dts/rk3566-pinetab2-u-boot.dtsi#L11-L15 Link: https://lore.kernel.org/all/20230110225547.1563119-2-jo...@kwiboo.se/ --- arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi index bbd7ed53602a..4a5bee5a28a7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi @@ -288,8 +288,9 @@ { }; { - assigned-clocks = < PLL_GPLL>, < PLL_PPLL>, < PLL_VPLL>; - assigned-clock-rates = <12>, <2>, <5>; + assigned-clocks = < CLK_RTC_32K>, < PLL_GPLL>, < PLL_PPLL>, < PLL_VPLL>; + assigned-clock-rates = <32768>, <12>, <2>, <5>; + assigned-clock-parents = < CLK_RTC32K_FRAC>; }; _dphy { -- 2.42.0 signature.asc Description: This is a digitally signed message part.
Re: [PATCH 4/6] arm64: dts: rockchip: Add devicetree for Pine64 Pinetab2
On Friday, 22 December 2023 12:05:44 CET Manuel Traut wrote: > + rk817-sound { > + compatible = "simple-audio-card"; > + pinctrl-names = "default"; > + pinctrl-0 = <_det_l>; > + simple-audio-card,format = "i2s"; > + simple-audio-card,name = "PineTab2"; > + simple-audio-card,mclk-fs = <256>; > + > + simple-audio-card,widgets = > + "Microphone", "Mic Jack", > + "Headphone", "Headphones", > + "Microphone", "Microphone", > + "Speaker", "Speakers"; > + > + simple-audio-card,routing = > + "MICL", "Microphone", > + "MICR", "Mic Jack", > + "Headphones", "HPOL", > + "Headphones", "HPOR", > + "Speaker Amplifier INL", "HPOL", > + "Speaker Amplifier INR", "HPOR", > + "Speakers", "Speaker Amplifier OUTL", > + "Speakers", "Speaker Amplifier OUTR"; > + > + simple-audio-card,hp-det-gpio = < RK_PC6 > GPIO_ACTIVE_HIGH>; + simple-audio-card,aux-devs = > <_amp>; > + simple-audio-card,pin-switches = "Speakers", "Microphone"; > + > + simple-audio-card,cpu { > + sound-dai = <_8ch>; > + }; > + > + simple-audio-card,codec { > + sound-dai = <>; > + }; > + }; Not sure if it's right (or allowed) to post a different patch as attachment, but I have been using a different audio configuration (see attachment). I haven't yet tried if/how it works via HDMI yet, but the speakers and headphones work fine. This patch is based on the following commit: https://github.com/TuxThePenguin0/linux/commit/ 872b829a3511cfa853bd3af3bd4f30be1cb3d1ab I've added 'Danct12' to the To list as they are the maintainer of the primary PT2 image and we worked together to get to this audio config. I don't if they still use it. (I've been using my own kernel/image for a while now). Cheers, Diederik>From 17efeb0ae766886345ff0574c534079742539b56 Mon Sep 17 00:00:00 2001 From: Scott Santucci Date: Mon, 17 Jul 2023 13:06:20 +0200 Subject: [PATCH 3/8] arm64: dts: rk3566-pinetab2: Fix audio configuration The audio configuration of the PineTab2 matches the `rk817_ext` alsa ucm2 profile, so switch the configuration to that. Use `rk817_ext` and not `rk817_int` as the PineTab2 uses an external amplifier. Also the headphones plugged/unplugged detection is backwards, so apply the fix provided by Danct12 . Signed-off-by: Diederik de Haas Link: https://github.com/dreemurrs-embedded/Pine64-Arch/pull/555 --- arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi index a766f21bd6f8..59e4bf2f77c7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi @@ -116,14 +116,14 @@ rk817-sound { pinctrl-names = "default"; pinctrl-0 = <_det_l>; simple-audio-card,format = "i2s"; - simple-audio-card,name = "PineTab2"; + simple-audio-card,name = "rk817_ext"; simple-audio-card,mclk-fs = <256>; simple-audio-card,widgets = "Microphone", "Mic Jack", "Headphone", "Headphones", "Microphone", "Microphone", - "Speaker", "Speakers"; + "Speaker", "Internal Speakers"; simple-audio-card,routing = "MICL", "Microphone", @@ -132,12 +132,12 @@ rk817-sound { "Headphones", "HPOR", "Speaker Amplifier INL", "HPOL", "Speaker Amplifier INR", "HPOR", - "Speakers", "Speaker Amplifier OUTL", - "Speakers", "Speaker Amplifier OUTR"; + "Internal Speakers", "Speaker Amplifier OUTL", + "Internal Speakers", "Speaker Amplifier OUTR"; - simple-audio-card,hp-det-gpio = < RK_PC6 GPIO_ACTIVE_HIGH>; + simple-audio-card,hp-det-gpio = < RK_PC6 GPIO_ACTIVE_LOW>; simple-audio-card,aux-devs = <_amp>; - simple-audio-card,pin-switches = "Speakers", "Microphone"; + simple-audio-card,pin-switches = "Internal Speakers", "Microphone"; simple-audio-card,cpu { sound-dai = <_8ch>; -- 2.42.0 signature.asc Description: This is a digitally signed message part.