devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Hawkins, Nick" <nick.hawkins@hpe.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	"Verdun, Jean-Marie" <verdun@hpe.com>,
	Olof Johansson <olof@lixom.net>,
	"soc@kernel.org" <soc@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 09/10] arch: arm: boot: dts: Introduce HPE GXP Device tree
Date: Tue, 5 Apr 2022 00:02:10 +0200	[thread overview]
Message-ID: <CAK8P3a3RSST6yvv8Oy13RFd6eZ6cS5yX9TOuK6wxXKUO-qdQ=Q@mail.gmail.com> (raw)
In-Reply-To: <PH0PR84MB1718925AA3C8FA998C486D7C88E59@PH0PR84MB1718.NAMPRD84.PROD.OUTLOOK.COM>

On Mon, Apr 4, 2022 at 10:22 PM Hawkins, Nick <nick.hawkins@hpe.com> wrote:
> > > I would put it into drivers/clocksource/, I don't think drivers/mtd would be any better, but there is a chance that the clocksource maintainers don't want to have the watchdog code in their tree.
>
> While trying to discover how to creating two devices in one driver I ran across an interesting .dtsi and I was wondering if this would be a valid approach for my situation as well. The pertinent files are:
> 1) drivers/clocksource/timer-digicolor.c
> 2) arch/arm/boot/dts/cx92755.dtsi
> 3) drivers/watchdog/digicolor_wdt.c
>
> Here they are just sharing the same register area:
>
> timer@f0000fc0 {
>         compatible = "cnxt,cx92755-timer";
>         reg = <0xf0000fc0 0x40>;
>         interrupts = <19>, <31>, <34>, <35>, <52>, <53>, <54>, <55>;
>         clocks = <&main_clk>;
> };
>
> rtc@f0000c30 {
>         compatible = "cnxt,cx92755-rtc";
>         reg = <0xf0000c30 0x18>;
>         interrupts = <25>;
> };
>
> watchdog@f0000fc0 {
>         compatible = "cnxt,cx92755-wdt";
>         reg = <0xf0000fc0 0x8>;
>         clocks = <&main_clk>;
>         timeout-sec = <15>;
> };

Right, it is possible to make this work, but it's not recommended, and you have
to work around the sanity checks in the code that try to keep you from doing it
wrong, as well as any tooling that tries to check for these in the DT.

         Arnd

  reply	other threads:[~2022-04-04 22:49 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220310195229.109477-1-nick.hawkins@hpe.com>
2022-03-10 19:52 ` [PATCH v3 05/10] dt-bindings: timer: Add HPE GXP Timer Binding nick.hawkins
2022-03-11  9:32   ` Krzysztof Kozlowski
2022-03-11 15:40   ` Rob Herring
2022-03-11 16:22     ` Hawkins, Nick
2022-03-11 17:13       ` Krzysztof Kozlowski
2022-03-10 19:52 ` [PATCH v3 06/10] dt-bindings: watchdog: Add HPE GXP Watchdog timer binding nick.hawkins
2022-03-11  9:34   ` Krzysztof Kozlowski
2022-03-10 19:52 ` [PATCH v3 07/10] dt-bindings: arm: Add HPE GXP Binding nick.hawkins
2022-03-11 10:20   ` Krzysztof Kozlowski
2022-03-10 19:52 ` [PATCH v3 08/10] dt-bindings: arm: Add HPE GXP CPU Init nick.hawkins
2022-03-11 10:22   ` Krzysztof Kozlowski
2022-03-16 21:33     ` Hawkins, Nick
2022-03-10 19:52 ` [PATCH v3 09/10] arch: arm: boot: dts: Introduce HPE GXP Device tree nick.hawkins
2022-03-11  8:17   ` Arnd Bergmann
2022-03-11 10:29   ` Krzysztof Kozlowski
2022-03-16 15:41     ` Hawkins, Nick
2022-03-16 15:50       ` Krzysztof Kozlowski
2022-03-16 20:10         ` Hawkins, Nick
2022-03-17  8:36           ` Krzysztof Kozlowski
2022-03-29 19:38             ` Hawkins, Nick
2022-03-29 21:13               ` Arnd Bergmann
2022-03-29 21:45                 ` Hawkins, Nick
2022-03-30 22:27                   ` Hawkins, Nick
2022-03-31  9:30                     ` Arnd Bergmann
2022-03-31 21:09                       ` Hawkins, Nick
2022-03-31 21:52                         ` Arnd Bergmann
2022-04-01 16:05                           ` Hawkins, Nick
2022-04-01 16:30                             ` Arnd Bergmann
2022-04-04 20:22                               ` Hawkins, Nick
2022-04-04 22:02                                 ` Arnd Bergmann [this message]
2022-04-05 21:21                                   ` Hawkins, Nick
2022-04-06  7:24                                     ` Arnd Bergmann
2022-04-13 16:48                                       ` Hawkins, Nick
2022-04-13 17:42                                         ` Arnd Bergmann

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='CAK8P3a3RSST6yvv8Oy13RFd6eZ6cS5yX9TOuK6wxXKUO-qdQ=Q@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick.hawkins@hpe.com \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=soc@kernel.org \
    --cc=verdun@hpe.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).