All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Przywara" <andre.przywara@arm.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Haojian Zhuang <haojian.zhuang@linaro.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Chanho Min <chanho.min@lge.com>,
	Liviu Dudau <liviu.dudau@arm.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Wei Xu <xuwei5@hisilicon.com>
Subject: Re: [PATCH v2 0/6] dt-bindings: Convert SP804 to Json-schema (and fix users)
Date: Fri, 28 Aug 2020 16:44:28 +0100	[thread overview]
Message-ID: <28acf821-fa6f-7259-ec1b-4810ca1ff48f@arm.com> (raw)
In-Reply-To: <CACRpkdZUrPeUbpNeCZcw8kq5k3egijAuh7R1_3TkbPz5wN+=Lw@mail.gmail.com>

On 28/08/2020 15:54, Linus Walleij wrote:

Hi,

> On Fri, Aug 28, 2020 at 4:20 PM Andre Przywara <andre.przywara@arm.com> wrote:
> 
>> This is the second attempt at converting the SP804 timer binding to yaml.
>> Compared to v1, I forbid additional properties, and included the primecell
>> binding. Also the clock-names property is now listed, although without
>> further requirements on the names. Changelog below.
> 
> The series:
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
>> I couldn't test any of those DT files on actual machines, but tried
>> to make the changes in a way that would be transparent to at least the
>> Linux driver. The only other SP804 DT user I could find is FreeBSD,
>> but they seem to use a different binding (no clocks, but a
>> clock-frequency property).
> 
> That's annoying. I suppose FreeBSD just made that up and doesn't
> even have a binding document for it?

I couldn't find bindings at all in their git tree. I don't think they
treat this very formally, it seems to be more use-case driven.
Their SP804 driver does not know how to handle clock properties, so most
of the DTs (in sys/gnu/dts, so apparently copied from Linux) would not
work really well, because the driver assumes a hardcoded frequency of
1MHz by default.
There is only one DT (Annapurna Alpine with Cortex-A15) that provides
this clock-frequency property. The Linux DT does not mention the SP804
in there at all, interestingly.

> In an ideal world I suppose we should go and fix FreeBSD but I have
> no idea how easy or hard that is.

It seems to be messy, at least in this case, and I guess unifying DTs
means some work on drivers as well.
But AFAIK most of the more modern platforms copy the DTs (and thus
implicitly the bindings) from Linux, so there is probably much less
deviation for many more relevant boards.

Cheers,
Andre

WARNING: multiple messages have this Message-ID (diff)
From: "André Przywara" <andre.przywara@arm.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Scott Branden <sbranden@broadcom.com>,
	Ray Jui <rjui@broadcom.com>, Chanho Min <chanho.min@lge.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Liviu Dudau <liviu.dudau@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Wei Xu <xuwei5@hisilicon.com>, Rob Herring <robh+dt@kernel.org>,
	Haojian Zhuang <haojian.zhuang@linaro.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 0/6] dt-bindings: Convert SP804 to Json-schema (and fix users)
Date: Fri, 28 Aug 2020 16:44:28 +0100	[thread overview]
Message-ID: <28acf821-fa6f-7259-ec1b-4810ca1ff48f@arm.com> (raw)
In-Reply-To: <CACRpkdZUrPeUbpNeCZcw8kq5k3egijAuh7R1_3TkbPz5wN+=Lw@mail.gmail.com>

On 28/08/2020 15:54, Linus Walleij wrote:

Hi,

> On Fri, Aug 28, 2020 at 4:20 PM Andre Przywara <andre.przywara@arm.com> wrote:
> 
>> This is the second attempt at converting the SP804 timer binding to yaml.
>> Compared to v1, I forbid additional properties, and included the primecell
>> binding. Also the clock-names property is now listed, although without
>> further requirements on the names. Changelog below.
> 
> The series:
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
>> I couldn't test any of those DT files on actual machines, but tried
>> to make the changes in a way that would be transparent to at least the
>> Linux driver. The only other SP804 DT user I could find is FreeBSD,
>> but they seem to use a different binding (no clocks, but a
>> clock-frequency property).
> 
> That's annoying. I suppose FreeBSD just made that up and doesn't
> even have a binding document for it?

I couldn't find bindings at all in their git tree. I don't think they
treat this very formally, it seems to be more use-case driven.
Their SP804 driver does not know how to handle clock properties, so most
of the DTs (in sys/gnu/dts, so apparently copied from Linux) would not
work really well, because the driver assumes a hardcoded frequency of
1MHz by default.
There is only one DT (Annapurna Alpine with Cortex-A15) that provides
this clock-frequency property. The Linux DT does not mention the SP804
in there at all, interestingly.

> In an ideal world I suppose we should go and fix FreeBSD but I have
> no idea how easy or hard that is.

It seems to be messy, at least in this case, and I guess unifying DTs
means some work on drivers as well.
But AFAIK most of the more modern platforms copy the DTs (and thus
implicitly the bindings) from Linux, so there is probably much less
deviation for many more relevant boards.

Cheers,
Andre

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-08-28 15:45 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 14:20 [PATCH v2 0/6] dt-bindings: Convert SP804 to Json-schema (and fix users) Andre Przywara
2020-08-28 14:20 ` Andre Przywara
2020-08-28 14:20 ` [PATCH v2 1/6] dt-bindings: timers: sp-804: Convert to json-schema Andre Przywara
2020-08-28 14:20   ` Andre Przywara
2020-09-08 17:28   ` Rob Herring
2020-09-08 17:28     ` Rob Herring
2020-09-09 10:07     ` André Przywara
2020-09-09 10:07       ` André Przywara
2020-08-28 14:20 ` [PATCH v2 2/6] ARM: dts: arm: Fix SP804 users Andre Przywara
2020-08-28 14:20   ` Andre Przywara
2020-08-28 14:20 ` [PATCH v2 3/6] ARM: dts: NSP: Fix SP804 compatible node Andre Przywara
2020-08-28 14:20   ` Andre Przywara
2020-08-28 17:12   ` Florian Fainelli
2020-08-28 17:12     ` Florian Fainelli
2020-09-01 23:04     ` Florian Fainelli
2020-09-01 23:04       ` Florian Fainelli
2020-09-04  1:04       ` André Przywara
2020-09-04  1:04         ` André Przywara
2020-09-04 20:54         ` Florian Fainelli
2020-09-04 20:54           ` Florian Fainelli
2020-08-28 14:20 ` [PATCH v2 4/6] ARM: dts: hisilicon: Fix SP804 users Andre Przywara
2020-08-28 14:20   ` Andre Przywara
2020-08-28 14:20 ` [PATCH v2 5/6] ARM: dts: nspire: " Andre Przywara
2020-08-28 14:20   ` Andre Przywara
2020-08-28 14:20 ` [PATCH v2 6/6] arm64: dts: lg: " Andre Przywara
2020-08-28 14:20   ` Andre Przywara
2020-08-28 14:54 ` [PATCH v2 0/6] dt-bindings: Convert SP804 to Json-schema (and fix users) Linus Walleij
2020-08-28 14:54   ` Linus Walleij
2020-08-28 15:44   ` André Przywara [this message]
2020-08-28 15:44     ` André Przywara
2020-09-01  6:42     ` Emmanuel Vadot
2020-09-01  6:42       ` Emmanuel Vadot
2020-09-08 12:48 ` Sudeep Holla
2020-09-08 12:48   ` Sudeep Holla

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=28acf821-fa6f-7259-ec1b-4810ca1ff48f@arm.com \
    --to=andre.przywara@arm.com \
    --cc=chanho.min@lge.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=haojian.zhuang@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=sudeep.holla@arm.com \
    --cc=tglx@linutronix.de \
    --cc=xuwei5@hisilicon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.