linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Nikhil Devshatwar <nikhil.nd@ti.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Marek Vasut" <marek.vasut@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Adam Ford" <aford173@gmail.com>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Tomi Valkeinen" <tomi.valkeinen@ti.com>
Subject: Re: [PATCH] gpio: pca953x: Use irqchip template
Date: Wed, 30 Sep 2020 15:51:15 +0200	[thread overview]
Message-ID: <CACRpkdaOAdcO4P-3MphdV7bq1-CfMr0KR96+iPvJrsEX1nZeNQ@mail.gmail.com> (raw)
In-Reply-To: <20200930104729.ajufkrklfhf25d55@NiksLab>

On Wed, Sep 30, 2020 at 12:47 PM Nikhil Devshatwar <nikhil.nd@ti.com> wrote:

> I am getting a kernel crash on K3 j721e common processor board
> when HDMI is plugged in. Following is the full log with crash
> for NULL pointer derefence
>
> https://pastebin.ubuntu.com/p/wBPS2ymmqR/
>
> Upon inspection, I found that the "irq_find_mapping" call
> in the "pca953x_irq_handler" returns 0 and the same is passed
> to "handle_nested_irq"

This would typically happen if the driver using an IRQ
from the PCA953x does not properly request it.

Is this caused by this IRQ 504 from your /proc/interrupts:

504:          0          0    4-0021  10 Edge      HPD

This seems to be requested directly by the HDMI bridge
and not by the TI display controller.

I look in the k3-am654-base-board.dts in the upstream
kernel and I find this:

&main_i2c0 {
        pinctrl-names = "default";
        pinctrl-0 = <&main_i2c0_pins_default>;
        clock-frequency = <400000>;

        pca9555: gpio@21 {
                compatible = "nxp,pca9555";
                reg = <0x21>;
                gpio-controller;
                #gpio-cells = <2>;
        };
};

This is the GPIO controller used here, right?

I notice the following:
- There are no HDMI bridges using this GPIO controller in
  the upstream kernel.
- The PCA9555 here lacks necessary attributes such as
  parent IRQ (another GPIO) and the "interrupt-controller"
  and "#interrupt-cells".

So this can not be the device tree you are using.

Can you point us to:
- The actual device tree you are booting from?
- The actual bridge that is requesting the HPD IRQ?
- The upstream code for this bridge?

Yours,
Linus Walleij

  parent reply	other threads:[~2020-09-30 13:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 14:40 [PATCH] gpio: pca953x: Use irqchip template Linus Walleij
2020-07-17 20:34 ` Andy Shevchenko
2020-09-30 10:47 ` Nikhil Devshatwar
2020-09-30 11:15   ` Andy Shevchenko
2020-09-30 13:51   ` Linus Walleij [this message]
2020-10-01 21:07     ` Grygorii Strashko
2020-10-02 10:40       ` Andy Shevchenko
2020-10-02 17:29         ` Grygorii Strashko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdaOAdcO4P-3MphdV7bq1-CfMr0KR96+iPvJrsEX1nZeNQ@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=aford173@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=nikhil.nd@ti.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).