[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZEYqPU6Zr+a6fivZiz-hKx6-KVdYVR7j--y+k2KXZaPw@mail.gmail.com>
Date: Mon, 1 Mar 2021 10:19:04 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Michal Simek <michal.simek@...inx.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@...inx.com>
Subject: Re: DT overlay applied via pinctrl description
On Tue, Feb 16, 2021 at 4:35 PM Michal Simek <michal.simek@...inx.com> wrote:
> I have a question about expectations when pinctrl setting is applied. In
> DTS all nodes are described in the order available in DT.
>
> uart-default {
> mux {
> ...
> };
>
> conf {
> ...
> };
> };
>
> I don't know if this standard description or not. I definitely see other
> pinctrl drivers which are using different structure.
>
> Anyway when overlay is applied the order has changed to
> uart-default {
> conf {
> ...
> };
>
> mux {
> ...
> };
> };
>
> which is causing issue because pin is configured first via conf node
> before it is requested via mux. This is something what firmware is
> checking and error out.
As Frank says the DT ordering has no semantic meaning, it is essentially
a functional language, describes object relations not sequences.
The Linux kernel applies the mux and conf in that order because of how
the code is implemented (this order also makes a lot of sense for the
hardware). I would recommend to trace the execution of an overlay
being applied and try to find the reason conf goes before mux and fix
the bug there. I think it is a bug in how pinctrl handles DT overlays.
Yours,
Linus Walleij
Powered by blists - more mailing lists