Bug 1215268 - [TRACKERBUG][aarch64][Lenovo-X13s] Some workaround patches [EFI, sound_clock] for the current kernel support on X13s
Summary: [TRACKERBUG][aarch64][Lenovo-X13s] Some workaround patches [EFI, sound_clock]...
Status: RESOLVED UPSTREAM
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: aarch64 Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Chester Lin
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-13 02:28 UTC by Chester Lin
Modified: 2023-10-31 05:29 UTC (History)
8 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chester Lin 2023-09-13 02:28:32 UTC
This is a tracer bug, which offers some information about the missing patches required by enabling openSUSE on Lenovo X13s [aarch64 laptop].

In summary, X13s needs the following reviewing patches to be backported in the current stable tree [v6.5]:

Link: https://lore.kernel.org/lkml/072b3df6-09fb-98a8-2b58-41dfcabd98c0@gmail.com/T/

This series adds basic support for the QSEECOM interface used to
communicate with secure applications running in the TrustZone on certain
Qualcomm devices. In addition to that, it also provides a driver for
"uefisecapp", the secure application managing access to UEFI variables
on such platforms.
....
<snip>
.....
Maximilian Luz (3):
  lib/ucs2_string: Add UCS-2 strscpy function
  firmware: qcom_scm: Add support for Qualcomm Secure Execution
    Environment SCM interface
  firmware: Add support for Qualcomm UEFI Secure Application
Comment 1 Chester Lin 2023-09-13 02:45:29 UTC
The following configs need to be enabled for audio support on X13s:

CONFIG_SND_SOC_LPASS_WSA_MACRO=m
CONFIG_SND_SOC_LPASS_VA_MACRO=m
CONFIG_SND_SOC_LPASS_RX_MACRO=m
CONFIG_SND_SOC_LPASS_TX_MACRO=m
Comment 2 Chester Lin 2023-09-13 03:44:20 UTC
The UEFI firmware of X13s has clk DT overlays that do not match the upstream DT (See as below example). Here we will need a downstream patch in order to enable audio system (LPASS) on X13s.


============
[In FDT overlaid by UEFI]

                clock-controller@3300000 {                                      
                        compatible = "qcom,sc8280xp-lpass-audio-csr";                                                                                                      
                        ......                                      
                };                                                              
                                                                                
                clock-controller@33e0000 {                                      
                        compatible = "qcom,sc8280xp-lpass-tcsr";                
                        ......                                     
                };

[Upstream DT]
                clock-controller@32a9000 {                                      
                        compatible = "qcom,sc8280xp-lpassaudiocc";                                                                                                         
                        reg = <0x00 0x32a9000 0x00 0x1000>;                     
                        #clock-cells = <0x01>;                                  
                        #reset-cells = <0x01>;                                  
                        phandle = <0x6f>;                                       
                };

                clock-controller@33e0000 {                                      
                        compatible = "qcom,sc8280xp-lpasscc";                                                                                                              
                        reg = <0x00 0x33e0000 0x00 0x12000>;                    
                        #clock-cells = <0x01>;                                  
                        #reset-cells = <0x01>;                                  
                        phandle = <0x76>;                                       
                };
Comment 3 Chester Lin 2023-09-13 03:50:10 UTC
pushed into users/clin/stable/for-next. Waiting for code merge.
Comment 4 Chester Lin 2023-09-13 06:01:05 UTC
(In reply to Chester Lin from comment #1)
> The following configs need to be enabled for audio support on X13s:
> 
> CONFIG_SND_SOC_LPASS_WSA_MACRO=m
> CONFIG_SND_SOC_LPASS_VA_MACRO=m
> CONFIG_SND_SOC_LPASS_RX_MACRO=m
> CONFIG_SND_SOC_LPASS_TX_MACRO=m

Rebased my for-next PR based on Takashi's  CONFIG_SND_SOC_LPASS* PR from bsc#1215256. Thanks for Ivan's reminder.
Comment 5 Jiri Slaby 2023-09-25 08:34:34 UTC
(In reply to Chester Lin from comment #2)
> The UEFI firmware of X13s has clk DT overlays that do not match the upstream
> DT (See as below example). Here we will need a downstream patch in order to
> enable audio system (LPASS) on X13s.

So how is this going to be handled in upstream? IOW, why do we need a downstream patch and keep upstream broken?
Comment 6 Chester Lin 2023-09-25 09:00:29 UTC
(In reply to Jiri Slaby from comment #5)
> (In reply to Chester Lin from comment #2)
> > The UEFI firmware of X13s has clk DT overlays that do not match the upstream
> > DT (See as below example). Here we will need a downstream patch in order to
> > enable audio system (LPASS) on X13s.
> 
> So how is this going to be handled in upstream? IOW, why do we need a
> downstream patch and keep upstream broken?

I think this issue must be fixed in Lenovo UEFI firmware since Lenovo should follow the upstream dt-bindings (since v6.5):

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml

I will contact ARM & Lenovo to see if this issue can be fixed in later releases.
Comment 7 Chester Lin 2023-10-20 09:00:47 UTC
(In reply to Chester Lin from comment #6)
> (In reply to Jiri Slaby from comment #5)
> > (In reply to Chester Lin from comment #2)
> > > The UEFI firmware of X13s has clk DT overlays that do not match the upstream
> > > DT (See as below example). Here we will need a downstream patch in order to
> > > enable audio system (LPASS) on X13s.
> > 
> > So how is this going to be handled in upstream? IOW, why do we need a
> > downstream patch and keep upstream broken?
> 
> I think this issue must be fixed in Lenovo UEFI firmware since Lenovo should
> follow the upstream dt-bindings (since v6.5):
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/
> Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
> 
> I will contact ARM & Lenovo to see if this issue can be fixed in later
> releases.

The compatible mismatch issue is now fixed in X13s UEFI FW v1.58.
Comment 8 Chester Lin 2023-10-31 05:29:42 UTC
(In reply to Chester Lin from comment #7)
> (In reply to Chester Lin from comment #6)
> > (In reply to Jiri Slaby from comment #5)
> > > (In reply to Chester Lin from comment #2)
> > > > The UEFI firmware of X13s has clk DT overlays that do not match the upstream
> > > > DT (See as below example). Here we will need a downstream patch in order to
> > > > enable audio system (LPASS) on X13s.
> > > 
> > > So how is this going to be handled in upstream? IOW, why do we need a
> > > downstream patch and keep upstream broken?
> > 
> > I think this issue must be fixed in Lenovo UEFI firmware since Lenovo should
> > follow the upstream dt-bindings (since v6.5):
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/
> > Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
> > 
> > I will contact ARM & Lenovo to see if this issue can be fixed in later
> > releases.
> 
> The compatible mismatch issue is now fixed in X13s UEFI FW v1.58.

I have dropped the workaround patch of lpasscc and confirmed that all QCOM EFI patches will be applied in v6.7-rc1. Let's close this bug, thank you.