devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v4] reset: Add i.MX7 SRC reset driver
Date: Wed, 01 Mar 2017 09:53:45 +0100	[thread overview]
Message-ID: <1488358425.2310.0.camel@pengutronix.de> (raw)
In-Reply-To: <CAHQ1cqG4VSr=E1U4CpruYtvzXK0xcJTow0VwurP1S4_Hi-TJzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, 2017-02-28 at 11:46 -0800, Andrey Smirnov wrote:
> On Tue, Feb 28, 2017 at 6:38 AM, Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote:
> > On Tue, 2017-02-21 at 08:13 -0800, Andrey Smirnov wrote:
> >> Add reset controller driver exposing various reset faculties,
> >> implemented by System Reset Controller IP block.
> >>
> >> Cc: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> >> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> >> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> >> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> >> Signed-off-by: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> ---
> >>
> >> Changes since v3 (see [v3]):
> >>
> >>       - Convert code IMX7_RESET_PCIEPHY to change G_RST and BTNRST
> >>           simultaneously to make all resets be representable as
> >>           signal->bit in signal->offset register
> >>
> >>       - Convert assert/deassert subroutines to be special cases of a
> >>           common reset subroutine
> >>
> >> Changes since v2 (see [v2]):
> >>
> >>       - Fix typos
> >>
> >>       - Kconfig/Makefile chagnes account for alphabetical sorting of
> >>           those files
> >>
> >>       - Remove redundant includes
> >>
> >>       - Make use of regmap_attach_dev and avoid storing refernce to
> >>           struct *dev in private data
> >>
> >>       - Change code and headers to expose almost all of the reset
> >>           related bits in SRC IP block
> >>
> >> Changes since v1 (see [v1]):
> >>
> >>       - Various small DT bindings description fixes as per feedback
> >>           from Rob Herring
> >>
> >>
> >> [v1] https://lkml.org/lkml/2017/2/6/554
> >> [v2] https://lkml.org/lkml/2017/2/13/488
> >> [v3] https://lkml.org/lkml/2017/2/20/344
> >>
> >>
> >>  .../devicetree/bindings/reset/fsl,imx7-src.txt     |  47 ++++++
> >>  drivers/reset/Kconfig                              |   8 ++
> >>  drivers/reset/Makefile                             |   2 +
> >>  drivers/reset/reset-imx7.c                         | 158 +++++++++++++++++++++
> >>  include/dt-bindings/reset/imx7-reset.h             |  62 ++++++++
> >>  5 files changed, 277 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/reset/fsl,imx7-src.txt
> >>  create mode 100644 drivers/reset/reset-imx7.c
> >>  create mode 100644 include/dt-bindings/reset/imx7-reset.h
> >>
> >> diff --git a/Documentation/devicetree/bindings/reset/fsl,imx7-src.txt b/Documentation/devicetree/bindings/reset/fsl,imx7-src.txt
> >> new file mode 100644
> >> index 0000000..5e1afc3
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/reset/fsl,imx7-src.txt
> >> @@ -0,0 +1,47 @@
> >> +Freescale i.MX7 System Reset Controller
> >> +======================================
> >> +
> >> +Please also refer to reset.txt in this directory for common reset
> >> +controller binding usage.
> >> +
> >> +Required properties:
> >> +- compatible: Should be "fsl,imx7-src", "syscon"
> >> +- reg: should be register base and length as documented in the
> >> +  datasheet
> >> +- interrupts: Should contain SRC interrupt
> >> +- #reset-cells: 1, see below
> >> +
> >> +example:
> >> +
> >> +src: reset-controller@30390000 {
> >> +     compatible = "fsl,imx7d-src", "syscon";
> >> +     reg = <0x30390000 0x2000>;
> >> +     interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
> >> +     #reset-cells = <1>;
> >> +};
> >> +
> >> +
> >> +Specifying reset lines connected to IP modules
> >> +==============================================
> >> +
> >> +The system reset controller can be used to reset various set of
> >> +peripherals. Device nodes that need access to reset lines should
> >> +specify them as a reset phandle in their corresponding node as
> >> +specified in reset.txt.
> >> +
> >> +Example:
> >> +
> >> +     pcie: pcie@33800000 {
> >> +
> >> +             ...
> >> +
> >> +             resets = <&src IMX7_RESET_PCIEPHY>,
> >> +                      <&src IMX7_RESET_PCIE_CTRL_APPS_EN>;
> >> +             reset-names = "pciephy", "apps";
> >> +
> >> +             ...
> >> +        };
> >> +
> >> +
> >> +For list of all valid reset indicies see
> >> +<dt-bindings/reset/imx7-reset.h>
> >> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> >> index 172dc96..bea1800 100644
> >> --- a/drivers/reset/Kconfig
> >> +++ b/drivers/reset/Kconfig
> >> @@ -27,6 +27,14 @@ config RESET_BERLIN
> >>       help
> >>         This enables the reset controller driver for Marvell Berlin SoCs.
> >>
> >> +config RESET_IMX7
> >> +     bool "i.MX7 Reset Driver"
> >> +     depends on SOC_IMX7D || COMPILE_TEST
> >> +     select MFD_SYSCON
> >> +     default SOC_IMX7D
> >
> > Can we make this
> >
> > config RESET_IMX7
> >         bool "i.MX7 Reset Driver" if COMPILE_TEST
> >         default SOC_IMX7D
> >         select MFD_SYSCON
> >
> > instead?
> >
> > If you agree, I can fix it up while applying.
> 
> Sure, I have no problem with that change.

Ok, thank you. Applied to reset/next.

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2017-03-01  8:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21 16:13 [PATCH v4] reset: Add i.MX7 SRC reset driver Andrey Smirnov
2017-02-27 20:54 ` Rob Herring
2017-02-28 14:38 ` Philipp Zabel
2017-02-28 19:46   ` Andrey Smirnov
     [not found]     ` <CAHQ1cqG4VSr=E1U4CpruYtvzXK0xcJTow0VwurP1S4_Hi-TJzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-01  8:53       ` Philipp Zabel [this message]

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=1488358425.2310.0.camel@pengutronix.de \
    --to=p.zabel-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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).