Add support for ADL devices - SNDW and I2S - #2786
Conversation
|
Can one of the admins verify this patch?
|
|
will push update with checkpatch fixes |
ceb87f7 to
d58ff4c
Compare
kv2019i
left a comment
There was a problem hiding this comment.
Excellent, thank you @sathyap-chrome and @Vamshigopal ! I'll let @plbossart and @bardliao look at the sof_sdw changes, but rest looks good.
plbossart
left a comment
There was a problem hiding this comment.
looks mostly good, I just have 2 minor comments below.
| { | ||
| .callback = sof_sdw_quirk_cb, | ||
| .matches = { | ||
| DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_adlrvp"), |
There was a problem hiding this comment.
can we use the same match criteria as other platforms
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client"),
There was a problem hiding this comment.
The dmidecode on adlrvp didnt show vendor as INTEL. hence used the family. will talk to BIOS team and see if that can be fixed soon.
There was a problem hiding this comment.
this will be done by coreboot team.I'll verify the coreboot image and update V2 tomorrow
There was a problem hiding this comment.
@plbossart with coreboot being used, the DMI match for vendor wont be possible as suggested. The corresponding coreboot.org conversation for reference :
https://review.coreboot.org/c/coreboot/+/51408/comment/3a850ca7_f58f7f79
Hence i think we should go ahead with current FAMILY string or i can change to product name ONLY.
Let me know your thoughts and i can publish v2 as per that.
There was a problem hiding this comment.
sorry, I don't get the point at all. There is no reason why an Intel board should be named differently because of coreboot/UEFI changes.
@kv2019i what are the other RVPs using with the UEFI BIOS?
There was a problem hiding this comment.
@plbossart found the fix. now we can use Intel and adlrvp as match. posting v2 now
There was a problem hiding this comment.
For ADL UEFI BIOS,
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "Alder Lake Client Platform"),
There was a problem hiding this comment.
@sathyap-chrome Can you please revisit why we need to have different DMI names for CoreBoot? that's not good. Fix Coreboot!
There was a problem hiding this comment.
@fredoh9 can you try my patch and confirm it works with UEFI. let me talk to coreboot engineer on why there is a difference.
e1f6022 to
03a171a
Compare
ADL P has specific machines and hence having its own table will help separate the machines and FW Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
There are currently 2 customer boards of ADL Board 1 : RT5682 + MAX98373 Board 2 : RT5682 + MAX98357A Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Add quirks for jack detection, rt711 DAI and DMIC Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
03a171a to
3892f60
Compare
ADL customer boards are with below 2 configurations Board 1: RT5682 on SSP0 and MAX98373 on SSP1 Board 2: RT5682 on SSP0 and MAX98357A on SSP2 Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
plbossart
left a comment
There was a problem hiding this comment.
LGTM thanks @sathyap-chrome
bardliao
left a comment
There was a problem hiding this comment.
LGTM. Thanks @sathyap-chrome
|
@kv2019i can you also approve. Also can this be merged ? |
|
SOFCI TEST |
I'll merge when CI works. |
|
Jenkins works fine, sometime being throttled. good to go. |
|
Thanks @sathyap-chrome and reviewers. Merging this now. |
| .callback = sof_sdw_quirk_cb, | ||
| .matches = { | ||
| DMI_MATCH(DMI_SYS_VENDOR, "Intel"), | ||
| DMI_MATCH(DMI_PRODUCT_NAME, "adlrvp"), |
There was a problem hiding this comment.
merged too quickly @kv2019i: this doesn't work for a UEFI BIOS.
There was a problem hiding this comment.
Oops, sorry @plbossart , I read the comments in wrong order... the comment on this was more recent than your approval. Let's do a fixup for this before sending upstream. Should we have another match case for UEFI case? @sathyap-chrome and @libinyang ?
There was a problem hiding this comment.
@plbossart
I requested coreboot to fix the match to be same as UEFI BIOS. once the fix is merged, i can send the fixup. maybe a day or 2.
There was a problem hiding this comment.
@sathyap-chrome ping. we need the fix to upstream this series. We only have 2-3 days left before the next cycle. Thanks for prioritizing this.
When doing timestamping in lan966x and having PROVE_LOCKING enabled the following warning is shown. ======================================================== WARNING: possible irq lock inversion dependency detected 6.2.0-rc7-01749-gc54e1f7f7e36 thesofproject#2786 Tainted: G N -------------------------------------------------------- swapper/0/0 just changed the state of lock: c2609f5 (_xmit_ETHER#2){+.-.}-{2:2}, at: sch_direct_xmit+0x16c/0x2e8 but this lock took another, SOFTIRQ-unsafe lock in the past: (&lan966x->ptp_ts_id_lock){+.+.}-{2:2} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&lan966x->ptp_ts_id_lock); local_irq_disable(); lock(_xmit_ETHER#2); lock(&lan966x->ptp_ts_id_lock); <Interrupt> lock(_xmit_ETHER#2); *** DEADLOCK *** 5 locks held by swapper/0/0: #0: c1001e18 ((&ndev->rs_timer)){+.-.}-{0:0}, at: call_timer_fn+0x0/0x33c thesofproject#1: c105e7c4 (rcu_read_lock){....}-{1:2}, at: ndisc_send_skb+0x134/0x81c thesofproject#2: c105e7d8 (rcu_read_lock_bh){....}-{1:2}, at: ip6_finish_output2+0x17c/0xc64 thesofproject#3: c105e7d8 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x4c/0x1224 thesofproject#4: c3056174 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_queue_xmit+0x354/0x1224 the shortest dependencies between 2nd lock and 1st lock: -> (&lan966x->ptp_ts_id_lock){+.+.}-{2:2} { HARDIRQ-ON-W at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 lan966x_ptp_irq_handler+0x164/0x2a8 irq_thread_fn+0x1c/0x78 irq_thread+0x130/0x278 kthread+0xec/0x110 ret_from_fork+0x14/0x28 SOFTIRQ-ON-W at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 lan966x_ptp_irq_handler+0x164/0x2a8 irq_thread_fn+0x1c/0x78 irq_thread+0x130/0x278 kthread+0xec/0x110 ret_from_fork+0x14/0x28 INITIAL USE at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock_irqsave+0x4c/0x68 lan966x_ptp_txtstamp_request+0x128/0x1cc lan966x_port_xmit+0x224/0x43c dev_hard_start_xmit+0xa8/0x2f0 sch_direct_xmit+0x108/0x2e8 __dev_queue_xmit+0x41c/0x1224 packet_sendmsg+0xdb4/0x134c __sys_sendto+0xd0/0x154 sys_send+0x18/0x20 ret_fast_syscall+0x0/0x1c } ... key at: [<c174ba0c>] __key.2+0x0/0x8 ... acquired at: _raw_spin_lock_irqsave+0x4c/0x68 lan966x_ptp_txtstamp_request+0x128/0x1cc lan966x_port_xmit+0x224/0x43c dev_hard_start_xmit+0xa8/0x2f0 sch_direct_xmit+0x108/0x2e8 __dev_queue_xmit+0x41c/0x1224 packet_sendmsg+0xdb4/0x134c __sys_sendto+0xd0/0x154 sys_send+0x18/0x20 ret_fast_syscall+0x0/0x1c -> (_xmit_ETHER#2){+.-.}-{2:2} { HARDIRQ-ON-W at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 netif_freeze_queues+0x38/0x68 dev_deactivate_many+0xac/0x388 dev_deactivate+0x38/0x6c linkwatch_do_dev+0x70/0x8c __linkwatch_run_queue+0xd4/0x1e8 linkwatch_event+0x24/0x34 process_one_work+0x284/0x744 worker_thread+0x28/0x4bc kthread+0xec/0x110 ret_from_fork+0x14/0x28 IN-SOFTIRQ-W at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 sch_direct_xmit+0x16c/0x2e8 __dev_queue_xmit+0x41c/0x1224 ip6_finish_output2+0x5f4/0xc64 ndisc_send_skb+0x4cc/0x81c addrconf_rs_timer+0xb0/0x2f8 call_timer_fn+0xb4/0x33c expire_timers+0xb4/0x10c run_timer_softirq+0xf8/0x2a8 __do_softirq+0xd4/0x5fc __irq_exit_rcu+0x138/0x17c irq_exit+0x8/0x28 __irq_svc+0x90/0xbc arch_cpu_idle+0x30/0x3c default_idle_call+0x44/0xac do_idle+0xc8/0x138 cpu_startup_entry+0x18/0x1c rest_init+0xcc/0x168 arch_post_acpi_subsys_init+0x0/0x8 INITIAL USE at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 netif_freeze_queues+0x38/0x68 dev_deactivate_many+0xac/0x388 dev_deactivate+0x38/0x6c linkwatch_do_dev+0x70/0x8c __linkwatch_run_queue+0xd4/0x1e8 linkwatch_event+0x24/0x34 process_one_work+0x284/0x744 worker_thread+0x28/0x4bc kthread+0xec/0x110 ret_from_fork+0x14/0x28 } ... key at: [<c175974c>] netdev_xmit_lock_key+0x8/0x1c8 ... acquired at: __lock_acquire+0x978/0x2978 lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 sch_direct_xmit+0x16c/0x2e8 __dev_queue_xmit+0x41c/0x1224 ip6_finish_output2+0x5f4/0xc64 ndisc_send_skb+0x4cc/0x81c addrconf_rs_timer+0xb0/0x2f8 call_timer_fn+0xb4/0x33c expire_timers+0xb4/0x10c run_timer_softirq+0xf8/0x2a8 __do_softirq+0xd4/0x5fc __irq_exit_rcu+0x138/0x17c irq_exit+0x8/0x28 __irq_svc+0x90/0xbc arch_cpu_idle+0x30/0x3c default_idle_call+0x44/0xac do_idle+0xc8/0x138 cpu_startup_entry+0x18/0x1c rest_init+0xcc/0x168 arch_post_acpi_subsys_init+0x0/0x8 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Tainted: G N 6.2.0-rc7-01749-gc54e1f7f7e36 thesofproject#2786 Hardware name: Generic DT based system unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x58/0x70 dump_stack_lvl from mark_lock.part.0+0x59c/0x93c mark_lock.part.0 from __lock_acquire+0x978/0x2978 __lock_acquire from lock_acquire.part.0+0xb0/0x248 lock_acquire.part.0 from _raw_spin_lock+0x38/0x48 _raw_spin_lock from sch_direct_xmit+0x16c/0x2e8 sch_direct_xmit from __dev_queue_xmit+0x41c/0x1224 __dev_queue_xmit from ip6_finish_output2+0x5f4/0xc64 ip6_finish_output2 from ndisc_send_skb+0x4cc/0x81c ndisc_send_skb from addrconf_rs_timer+0xb0/0x2f8 addrconf_rs_timer from call_timer_fn+0xb4/0x33c call_timer_fn from expire_timers+0xb4/0x10c expire_timers from run_timer_softirq+0xf8/0x2a8 run_timer_softirq from __do_softirq+0xd4/0x5fc __do_softirq from __irq_exit_rcu+0x138/0x17c __irq_exit_rcu from irq_exit+0x8/0x28 irq_exit from __irq_svc+0x90/0xbc Exception stack(0xc1001f20 to 0xc1001f68) 1f20: ffffffff ffffffff 00000001 c011f840 c100e000 c100e000 c1009314 c1009370 1f40: c10f0c1a c0d5e564 c0f5da8c 00000000 00000000 c1001f70 c010f0bc c010f0c0 1f60: 600f0013 ffffffff __irq_svc from arch_cpu_idle+0x30/0x3c arch_cpu_idle from default_idle_call+0x44/0xac default_idle_call from do_idle+0xc8/0x138 do_idle from cpu_startup_entry+0x18/0x1c cpu_startup_entry from rest_init+0xcc/0x168 rest_init from arch_post_acpi_subsys_init+0x0/0x8 Fix this by using spin_lock_irqsave/spin_lock_irqrestore also inside lan966x_ptp_irq_handler. Fixes: e85a96e ("net: lan966x: Add support for ptp interrupts") Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Link: https://lore.kernel.org/r/20230217210917.2649365-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Commits add support for ADL match table and adds support for
(a) 2 customer boards with I2S codecs
(b) ADL P RVP with SNDW codec