Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp232293rwb; Tue, 25 Jul 2023 15:03:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlFfVVCWzRrndktHJNdicN8+cmfnimjIYCuAoQIbjod+k3cPvErqZSeri48BmQuHwiNE8kLE X-Received: by 2002:a17:90a:bf0a:b0:268:2b45:e606 with SMTP id c10-20020a17090abf0a00b002682b45e606mr348791pjs.38.1690322585573; Tue, 25 Jul 2023 15:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690322585; cv=none; d=google.com; s=arc-20160816; b=vcVS+25xd7S6X1o7YrA0lodyxPZCcAj5Y62nG9sslLK0PsL382D6bCB2Mx1fnCPT/S H66urTx3hH5QucUGr1SxbjkFVlt0r8k/asDQzghCOR2P4oYTRscidpneTIxOzf9GFL7o CEFegEMexM/0u71NB/plkxm1zVWzsDtQXyhr7HVyHgABcMCug6hx33PN6Jwo32i16Cwu ubj8d0+uPyry+6RpnE4k7NItMVN2tVMqEgUdgfaoLGSf8jgMi/9SPJ1EVkKJirvDW49y HrMQMyXBM5DoofVYGWRWsn8D2g39i7XxJTpW6j5kQssaPoFuJlRvl7eP0t6QQOQj549x agkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=tHqrqD8etAmFPoplWVHS6xgjs7yFI6bgpUy2PExyaBw=; fh=Jf+nebRxI7vMkOzoQsGeB4AxLxqDfHDBGg+hqiR6rKk=; b=Mfz9rFMT9CjJe/RxU7+i79VsiwE3/m13XQNRgRef0zZe574HBh8aPV/kt5KPHJgs6q hFVcdLGoli/txzdMyZZhZOds9uHfmUQwAzF/E6kdeq+/YlYFhscho8Q9QHL14kgcmz/D dTjZnOU5j9oCo9BN0dkTDeT0BquuEHFSTdFPqF0iJ77SzQNymbM9MPwd/m9z6VpUS4gE 1xZi11TQCXeT/6eoHViW5ZHyxd7dkMSM4tOYRlFUe3EW2BwTFPJQ/JD3iu/j9A1aFmr2 F0+j0O9B3maY4qD9Oi3eL6qR344rSJa5q8WfcN6MV5nWH84hUIZZhxtQ2ctnmYVtsJD0 MTaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@grimler.se header.s=key1 header.b=lpg23rv0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=grimler.se Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a17090a130d00b002684c664f2fsi97805pja.71.2023.07.25.15.02.53; Tue, 25 Jul 2023 15:03:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@grimler.se header.s=key1 header.b=lpg23rv0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=grimler.se Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230337AbjGYVWU (ORCPT + 99 others); Tue, 25 Jul 2023 17:22:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjGYVWS (ORCPT ); Tue, 25 Jul 2023 17:22:18 -0400 Received: from out-1.mta1.migadu.com (out-1.mta1.migadu.com [95.215.58.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78605E70 for ; Tue, 25 Jul 2023 14:22:16 -0700 (PDT) Date: Tue, 25 Jul 2023 23:22:09 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=grimler.se; s=key1; t=1690320134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tHqrqD8etAmFPoplWVHS6xgjs7yFI6bgpUy2PExyaBw=; b=lpg23rv0b5yAMBdEBTGiVqKzZ5nlcCQaUn5sXVFujyxLf4FUNyH5LGF4XT6sPC6RMkESeJ 2IlxEb8lyMvI59riJo1Mmds0qqAZHDNRJ2SjdDTcVYQqCEas+ezNDxtD/NMMSAa79N4ocg n+ssBDzw4ym09d16PDOwWeVMwKPw81E= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Henrik Grimler To: Krzysztof Kozlowski Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Szyprowski , replicant@osuosl.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Martin =?iso-8859-1?Q?J=FCcker?= , Artur Weber Subject: Re: [PATCH v2] ARM: dts: samsung: exynos4412-midas: add USB connector and USB OTG Message-ID: References: <20230723142417.97734-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Krzysztof, On Tue, Jul 25, 2023 at 10:08:00PM +0200, Krzysztof Kozlowski wrote: > On 25/07/2023 21:15, Henrik Grimler wrote: > > On Sun, Jul 23, 2023 at 04:24:17PM +0200, Krzysztof Kozlowski wrote: > >> Add full description of USB-MUIC (MAX77693 MUIC) and MUIC-MHL > >> connections, along with proper USB connector and OTG mode for DWC2 USB > >> controller. > >> > >> This fixes dtc W=1 warnings: > >> > >> Warning (graph_child_address): /i2c-mhl/hdmi-bridge@39/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary > >> > >> Cc: Marek Szyprowski > >> Cc: replicant@osuosl.org > >> Cc: phone-devel@vger.kernel.org > >> Cc: ~postmarketos/upstreaming@lists.sr.ht > >> Cc: Martin J?cker > >> Cc: Henrik Grimler > >> Cc: Artur Weber > >> Signed-off-by: Krzysztof Kozlowski > > > > Tested-by: Henrik Grimler > > > > * Peripheral mode (still) works > > * MHL somewhat works > > * OTG (still) does not work > > > > Further details for those interested: > > > > MHL works reliably if cable is attached before boot, but if cable is > > attached on already running device it sometimes work after detaching > > and attaching cable a few times. On cable attach, when it does not > > work, we get: > > > > [ 252.831734] max77693-muic max77693-muic: external connector is detached(chg_type:0x0, prev_chg_type:0x0) > > [ 253.733916] max77693-muic max77693-muic: external connector is attached(chg_type:0x1, prev_chg_type:0x1) > > [ 253.735232] max77693-muic max77693-muic: CONTROL1 : 0x09, CONTROL2 : 0x04, state : attached > > [ 254.691877] i2c i2c-15: sendbytes: NAK bailout. > > [ 254.692150] sii9234 15-0039: writebm: TPI[0x3d] <- 0x3e > > [ 255.984336] sii9234 15-0039: RGND is not 1k > > [ 256.068970] sii9234 15-0039: RSEN_HIGH without RGND_1K > > [ 256.104457] sii9234 15-0039: discovery failed, no power for MHL? > > [ 256.118272] i2c i2c-15: sendbytes: NAK bailout. > > [ 256.118539] sii9234 15-0039: writebm: TPI[0x3d] <- 0x3e > > [ 256.375966] sii9234 15-0039: RSEN_HIGH without RGND_1K > > [ 256.411561] sii9234 15-0039: discovery failed, no power for MHL? > > > > while when it works: > > > > [ 175.348307] max77693-muic max77693-muic: external connector is detached(chg_type:0x1, prev_chg_type:0x0) > > [ 175.349576] max77693-muic max77693-muic: CONTROL1 : 0x00, CONTROL2 : 0x01, state : detached > > [ 179.304373] dwc2 12480000.usb: new device is full-speed > > [ 179.305920] max77693-muic max77693-muic: external connector is detached(chg_type:0x0, prev_chg_type:0x0) > > [ 180.205735] max77693-muic max77693-muic: external connector is attached(chg_type:0x1, prev_chg_type:0x1) > > [ 180.207211] max77693-muic max77693-muic: CONTROL1 : 0x09, CONTROL2 : 0x04, state : attached > > [ 180.309727] i2c i2c-15: sendbytes: NAK bailout. > > [ 180.309996] sii9234 15-0039: writebm: TPI[0x3d] <- 0x3e > > > > Not sure if issue here is in muic driver or sii9234 driver. > > > > OTG still does not seem to work, the muic driver detects (only) a > > detach when OTG cable is attached: > > > > max77693-muic max77693-muic: external connector is detached(chg_type:0x0, prev_chg_type:0x0) > > > > Same happened when otg cable was attached before these hsotg changes > > as well. I suppose issue here is with max77693-muic driver. > > > > Thanks for testing. I miss here one important thing - did anything > regressed? Is MHL behaving not worse than before? OTG, as non-working, > matters less in such case. No regressions as far as I can tell, only improvements. We want the muic node and mhl_to_muic/muic_to_mhl ports so that muic can notify the mhl chip of cable attachment/detachment (with requires an additional patch to the sii9234 driver that I will send soon [1]). The alternative, having the mhl chip always on, has caused issues with some GUIs [2]. > Best regards, > Krzysztof [1] https://gitlab.com/exynos4-mainline/linux/-/commit/742d05797799 [2] https://gitlab.gnome.org/World/Phosh/phosh/-/issues/828#note_1542189 Best regards, Henrik Grimler