Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3342486pxu; Mon, 30 Nov 2020 00:18:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBsNp8ZKfmjZWOc3XfFkMqtebXhwpUsqJHq+I0f1H2eJo16n7O/J+sS3GC7nyhiEq0rFPf X-Received: by 2002:a05:6402:1153:: with SMTP id g19mr20533778edw.312.1606724312941; Mon, 30 Nov 2020 00:18:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606724312; cv=none; d=google.com; s=arc-20160816; b=Pnk80Uq/N2OBwBZ9gEDVf21G97xyc4PKLtY4Gj5VkpEC4xv0OvaLVZkNhE0zi0E+md EUUdq0fY7BWgaJ3PvCRx95GoYgxfToqh2grFmqRIbUQKLemoy5NwanEQMdaCbOP/TNkB MktLSnX8wxR/gi3PIHURc0xPOAbeR59zGb01LDm9l9J3ncK1977TVnzVMK6mh+K68Qw8 0H70cAA5G5gtvpWNMNiXgcV9uCzByjd+8Dbn3Is8OKyfxidj//lvzfBocMagA7eXfpUH gZS68lWMAlRys6cf3wN5wNKqufaj00045AvqycNKmNnKgYZ6ReofKR8W2af5UtfK71pt q3SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1WW7NdGi1sFdQkUxxy6Ct166Jaa/cUFKVp9VOVJXhJY=; b=fMuN0oXN7QXotBJEUFn+yh01an+Zy0wkMsIXqx7hvHPnDaMjnkTnpT+BHExa6Y1Byh Qqa8fJe193ROOqZfJ8mWC/6lMjxeA6G/Nir41eVNhHoVHTrl8dWMFRmmmLYjmYFq14/J Db/iT3YG67m/PDSCy1oSIV4m76+hA5BQZbLhXBd72r79hmdDcV0VgHzWD/y/P7vNlmbr E9qpi9HkoOtGkFaj81oSz8FeN1Qb5EhW1d3ePtctw5HRcJb12XLBkK4VZqWaRkxroM58 EzbP8NSoyNvoX4cn8PV0dfgM/Axv1GzXj5jxNQnosAnGgWO3wxBD/tX0SqqbcrnFII9L bFww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k498odRk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rk28si10212836ejb.711.2020.11.30.00.18.09; Mon, 30 Nov 2020 00:18:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k498odRk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726560AbgK3IQm (ORCPT + 99 others); Mon, 30 Nov 2020 03:16:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725880AbgK3IQm (ORCPT ); Mon, 30 Nov 2020 03:16:42 -0500 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46115C0613D2 for ; Mon, 30 Nov 2020 00:16:02 -0800 (PST) Received: by mail-lf1-x141.google.com with SMTP id a9so19810416lfh.2 for ; Mon, 30 Nov 2020 00:16:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1WW7NdGi1sFdQkUxxy6Ct166Jaa/cUFKVp9VOVJXhJY=; b=k498odRkC4CWp5FzcznjTxr/pCBlxIwv/+Y/qvje5oKOjju0LdiGuUZ1lgnB94z0oy FWdK3JzZa5UHdKC63RBkuset2nF2DbNxmPfiyLMlqfjLE02AjSU7aLPPFDutBU1lyOKb BUNlxoa2kVxrLFqvmCALsrTKR3Jl2X8/2EieNgI9128E0mCuXmVL02S+wSLUJgIXPGvW y+FmnaOfNvvVveg6vytmTjZXJdzmeGnsrSvsziSsmhqcP48pE6farYihYXkVtSad14DD n3DogRhll2CSweTE94qOIrzRj58brTwTba+B3/GwxOEaOnqpEGhrbsh+8iRjFmrEhesw hiOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1WW7NdGi1sFdQkUxxy6Ct166Jaa/cUFKVp9VOVJXhJY=; b=URgGexu2OJYLwhCCypoV/1FNDkdMimVARKJaTJOGwkd3ebC/0Ax2Trs5DdlxbVFY4w +uDkdSUxt0s9FsSTd9/Zv9nj3+Thog7c0g+TKteVLC3+5tIC5PbXLSLwOzGIjiMhOC2W cZBkoS0m3h6Ch06waNBcEzVZ1Ds69H+2MGpA2uy6tTzitaq0wDrJhq0Z4D1tSzFAQoiQ W/h4jtRdZt2ph+8pMD+62IC5skCFjWPAxOyJ2Jo1eXqIVTEQ8cidaFqs/WtIvfjH1GK+ quFSJI/q/F95m5FxcF/EcaRQSHU9N/k3kwMZoZvpBffhcjgwYor/OPSDzxiMByHPhl+P xx4g== X-Gm-Message-State: AOAM532V7jm2WEKrtZzjKV+GWCz3t57u88UvuT0o9R80dRBCOwvP6gwB ybYQrYTUsIiNJwTGtDzxMkefeRS53K7K+aIHhzV+kN8dC1p8g/kt X-Received: by 2002:ac2:4578:: with SMTP id k24mr8355336lfm.502.1606724160610; Mon, 30 Nov 2020 00:16:00 -0800 (PST) MIME-Version: 1.0 References: <20201128235154.GF551434@darkstar.musicnaut.iki.fi> <20201129115748.GG551434@darkstar.musicnaut.iki.fi> In-Reply-To: <20201129115748.GG551434@darkstar.musicnaut.iki.fi> From: Linus Walleij Date: Mon, 30 Nov 2020 09:15:49 +0100 Message-ID: Subject: Re: [BISECTED REGRESSION] Broken USB/GPIO on OMAP1 OSK To: Aaro Koskinen Cc: Tony Lindgren , Alan Stern , Linux-OMAP , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 29, 2020 at 12:57 PM Aaro Koskinen wrote: > On Sun, Nov 29, 2020 at 01:51:54AM +0200, Aaro Koskinen wrote: > > I tried to upgrade my OMAP1 OSK board to v5.9, but the rootfs cannot > > be accessed anymore due to broken USB. It fails to probe with the > > following logs: > > > > [ 9.219940] ohci ohci: cannot find GPIO chip i2c-tps65010, deferring > > [ 9.250366] ohci ohci: cannot find GPIO chip i2c-tps65010, deferring > > [ 9.731445] ohci ohci: cannot find GPIO chip i2c-tps65010, deferring > > [ 10.342102] ohci ohci: cannot find GPIO chip i2c-tps65010, deferring > > [ 10.966430] ohci ohci: cannot find GPIO chip i2c-tps65010, deferring > > > > Bisected to: > > > > commit 15d157e874437e381643c37a10922388d6e55b29 > > Author: Linus Walleij > > Date: Mon Jul 20 15:55:24 2020 +0200 > > > > usb: ohci-omap: Convert to use GPIO descriptors > > > > I suspect one of the issues is the name "i2c-tps65010" vs "tps65010": > > > > # cat /sys/devices/platform/omap_i2c.1/i2c-1/i2c-tps65010/gpio/gpiochip208/label > > tps65010 > > > > However changing that in the lookup table still doesn't help much; I got rid > > of the "deferring" message but the USB still doesn't work. So far the only > > workaround I have is to revert the whole commit. > > GPIO numbering goes wrong... It's now trying to poke GPIO2. Hm the old code looked like this: #define GPIO1 1 tps65010_set_gpio_out_value(GPIO1, LOW); And I missed that the code inside the tps65010 driver subtracts 1 from the passed parameter and the standard gpiolib accessors add 1 before calling the same function. I missed this. > Also gpiod_set_value_cansleep() probably should be used as tps65010 > can sleep. OK I'll send a combined patch fixing all issues (I hope). Yours, Linus Walleij