NetBSD Problem Report #54658

From tsutsui@ceres.dti.ne.jp  Tue Oct 29 16:27:47 2019
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6B5367A1BF
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 29 Oct 2019 16:27:47 +0000 (UTC)
Message-Id: <201910291627.x9TGRhbW023466@ceres.dti.ne.jp>
Date: Wed, 30 Oct 2019 01:27:43 +0900 (JST)
From: tsutsui@ceres.dti.ne.jp
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Subject: zaudio(4) attach failure (after MI i2c(4) changes?)
X-Send-Pr-Version: 3.95

>Number:         54658
>Category:       kern
>Synopsis:       zaudio(4) attach failure (after MI i2c(4) changes?)
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 29 16:30:00 +0000 2019
>Closed-Date:    Fri Nov 29 22:54:24 +0000 2019
>Last-Modified:  Fri Nov 29 22:54:24 +0000 2019
>Originator:     Izumi Tsutsui
>Release:        NetBSD 9.0_BETA
>Organization:
>Environment:
System: NetBSD 9.0_BETA (GENERIC_SMALL) #0: Fri Oct 25 00:10:42 JST 2019
	tsutsui@mirage:/s/netbsd-9/src/sys/arch/zaurus/compile/GENERIC_SMALL
Architecture: earm
Machine: zaurus
>Description:
On (patched) NetBSD/zaurus 9.0_BETA, zaudio(4) on both SL-C1000
and SL-C700 fails to attach:

SL-C700:
---
[   1.0000000] NetBSD 9.0_BETA (C700) #0: Fri Oct 25 00:06:47 JST 2019
[   1.0000000] 	tsutsui@mirage:/s/netbsd-9/src/sys/arch/zaurus/compile/C700
[   1.0000000] total memory = 32768 KB
[   1.0000000] avail memory = 24192 KB
[   1.0000000] timecounter: Timecounters tick every 10.000 msec
[   1.0000000] mainbus0 (root)
[   1.0000000] cpu0 at mainbus0 core 0: PXA250 step B-2 (XScale V5TE core)
 :
[   1.0000000] ziic0 at pxaip0 addr 0x40300000-0x403016a3: I2C controller
[   1.0000000] iic0 at ziic0: I2C bus
[   1.0000000] zaudio0 at iic0 addr 0x1b: I2S, WM8731 Audio
[   1.0000000] zaudio0: autoconfiguration error: codec failed to respond
---

SL-C1000
---
[   1.0000000] NetBSD 9.0_BETA (GENERIC_SMALL) #0: Fri Oct 25 00:10:42 JST 2019
[   1.0000000] 	tsutsui@mirage:/s/netbsd-9/src/sys/arch/zaurus/compile/GENERIC_SMALL
[   1.0000000] total memory = 65536 KB
[   1.0000000] avail memory = 58448 KB
[   1.0000000] timecounter: Timecounters tick every 10.000 msec
[   1.0000000] mainbus0 (root)
[   1.0000000] cpu0 at mainbus0 core 0: PXA27x rev 7 (XScale V5TE core)
 :
[   1.0000000] ziic0 at pxaip0 addr 0x40300000-0x403016a3: I2C controller
[   1.0000000] iic0 at ziic0: I2C bus
[   1.0000000] ioexp0 at iic0 addr 0x18: GPIO controller
[   1.0000000] zaudio0 at iic0 addr 0x1b: I2S, WM8750 Audio
[   1.0000000] zaudio0: autoconfiguration error: codec failed to respond
---

>How-To-Repeat:
Boot NetBSD/zaurus 9.0_BETA (with the following boot failure fixes):
 https://mail-index.netbsd.org/source-changes/2019/10/26/msg110277.html
 https://mail-index.netbsd.org/source-changes/2019/10/26/msg110278.html
 https://mail-index.netbsd.org/source-changes/2019/10/28/msg110352.html

>Fix:
Reverting MI i2c(4) changes between netbsd-8 and netbsd-9
seems to work around:
 https://gist.github.com/tsutsui/8455b390c32d18f80d0a73c588d73bce
 (but too many revisions to analyze)

SL-C700
---
[   1.0000000] ziic0 at pxaip0 addr 0x40300000-0x403016a3: I2C controller
[   1.0000000] iic0 at ziic0: I2C bus
[   1.0000000] zaudio0 at iic0 addr 0x1b: I2S, WM8731 Audio
[   1.0000000] audio0 at zaudio0: playback, capture, half duplex
[   1.0000000] audio0: slinear_le:16 2ch 48000Hz, blk 40ms for playback
[   1.0000000] audio0: slinear_le:16 2ch 48000Hz, blk 40ms for recording
[   1.0000000] spkr0 at audio0: PC Speaker (synthesized)
[   1.0000000] wsbell at spkr0 not configured
---

SL-C1000
---
[   1.0000000] ziic0 at pxaip0 addr 0x40300000-0x403016a3: I2C controller
[   1.0000000] iic0 at ziic0: I2C bus
[   1.0000000] ioexp0 at iic0 addr 0x18: GPIO controller
[   1.0000000] zaudio0 at iic0 addr 0x1b: I2S, WM8750 Audio
[   1.0000000] audio0 at zaudio0: playback, capture, half duplex
[   1.0000000] audio0: slinear_le:16 2ch 48000Hz, blk 40ms for playback
[   1.0000000] audio0: slinear_le:16 2ch 48000Hz, blk 40ms for recording
[   1.0000000] spkr0 at audio0: PC Speaker (synthesized)
[   1.0000000] wsbell at spkr0 not configured
---

>Release-Note:

>Audit-Trail:
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54658 CVS commit: src/sys/arch/zaurus/zaurus
Date: Wed, 13 Nov 2019 17:48:04 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Wed Nov 13 17:48:03 UTC 2019

 Modified Files:
 	src/sys/arch/zaurus/zaurus: autoconf.c

 Log Message:
 Fix attach failure of zaudio(4) WM8731 (C7x0/860) and WM8750 (C1000/3x00).

 The new MI iic(4) layer requires an explicit quirk info of PROBE_STRATEGY
 via device properties.  Fixes PR kern/54658.

 Should be pulled up to netbsd-9.


 To generate a diff of this commit:
 cvs rdiff -u -r1.12 -r1.13 src/sys/arch/zaurus/zaurus/autoconf.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54658 CVS commit: [netbsd-9] src/sys/arch
Date: Sat, 16 Nov 2019 16:55:47 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Nov 16 16:55:47 UTC 2019

 Modified Files:
 	src/sys/arch/arm/sa11x0 [netbsd-9]: sa11x0_ost.c
 	src/sys/arch/zaurus/zaurus [netbsd-9]: autoconf.c

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #430):

 	sys/arch/arm/sa11x0/sa11x0_ost.c: revision 1.33
 	sys/arch/zaurus/zaurus/autoconf.c: revision 1.13

 Fix attach failure of zaudio(4) WM8731 (C7x0/860) and WM8750 (C1000/3x00).

 The new MI iic(4) layer requires an explicit quirk info of PROBE_STRATEGY
 via device properties.  Fixes PR kern/54658.

 Should be pulled up to netbsd-9.

  -

 Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860.

 When kernels were configured for both CPU_XSCALE_PXA270 and
 CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9)
 then all delay(9) during configure(9) returned immediately.

 While here, use proper macro with description for readability.

 Should be pulled up to netbsd-8 and netbsd-9.
 (though zaudio(4) won't work on netbsd-8)


 To generate a diff of this commit:
 cvs rdiff -u -r1.32 -r1.32.20.1 src/sys/arch/arm/sa11x0/sa11x0_ost.c
 cvs rdiff -u -r1.12 -r1.12.44.1 src/sys/arch/zaurus/zaurus/autoconf.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Fri, 29 Nov 2019 22:54:24 +0000
State-Changed-Why:
Fixed and pulled up to netbsd-9.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.45 2018/12/21 14:23:33 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.