From: Tony Lindgren <tony@atomide.com>
To: Tero Kristo <t-kristo@ti.com>
Cc: linux-omap@vger.kernel.org, paul@pwsan.com,
tomi.valkeinen@ti.com, nm@ti.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv2 25/33] ARM: dts: am33xx: add syscon support to scrm node
Date: Fri, 13 Feb 2015 10:29:24 -0800 [thread overview]
Message-ID: <20150213182923.GP2531@atomide.com> (raw)
In-Reply-To: <1423843973-6050-23-git-send-email-t-kristo@ti.com>
Hi Tero,
* Tero Kristo <t-kristo@ti.com> [150213 08:17]:
> Control module will be converted to use syscon, thus add compatible
> string for this. Also, remove the existing duplicate syscon entries
> at the same time, and change the users of these to use the real
> control module syscon.
We should not set the whole SCM as syscon, let's just map the
scm_conf areas. Those are the only ones that need to be shared
by various Linux generic framework implementing drivers. Those
need to be shared for regulators, clocks, PHYs and so on. For the
areas where we have a clearly separate area that can be ioremapped
by a framework implementing driver let's use that.
The reason is that I'd like to set up things so we can have standard
loadable Linux kernel modules working with just plaform_get_resource()
or of_ioremap() to take advantage of them protecting access with
request_mem_region(). We are already doing that but in an
uncoordinated fashion. See the example for dm816x below that has
things moved around to start standardizing things for the SCM
access.
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -83,11 +83,6 @@
> };
> };
>
> - am33xx_control_module: control_module@4a002000 {
> - compatible = "syscon";
> - reg = <0x44e10000 0x7fc>;
> - };
> -
> am33xx_pinmux: pinmux@44e10800 {
> compatible = "pinctrl-single";
> reg = <0x44e10800 0x0238>;
BTW, I have just this part as a separate fix in my series along
with few other fixes dts fixes for ranges, will post those around
-rc1.
Then back to making the SCM behave, we already have an example
with dm816x. the current Linux next plus a pending fix for
"[PATCH] ARM: dts: Fix USB dts configuration for dm816x" makes the
SCM look as below. I have also similar patches in works for omap3,
am33xx, am437x, and omap4.
Note that here we have already various framework implementing
drivers behaving in a standard way using request_mem_region() and
of_ioremap() with help of ranges.
We should still have a core SCM/bus driver take care of managing
the SCM clock, and trigger the save and restore of SCM registers
for PM.
Regards,
Tony
8<---------------
scrm: scrm@48140000 {
compatible = "ti,dm816-scrm", "simple-bus";
reg = <0x48140000 0x21000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x48140000 0x21000>;
dm816x_pinmux: pinmux@800 {
compatible = "pinctrl-single";
reg = <0x800 0x50a>;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-single,register-width = <16>;
pinctrl-single,function-mask = <0xf>;
};
/* Device Configuration Registers */
scm_conf: syscon@600 {
compatible = "syscon", "simple-bus";
reg = <0x600 0x110>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x600 0x110>;
usb_phy0: usb-phy@20 {
compatible = "ti,dm8168-usb-phy";
reg = <0x20 0x8>;
reg-names = "phy";
clocks = <&main_fapll 6>;
clock-names = "refclk";
#phy-cells = <0>;
syscon = <&scm_conf>;
};
usb_phy1: usb-phy@28 {
compatible = "ti,dm8168-usb-phy";
reg = <0x28 0x8>;
reg-names = "phy";
clocks = <&main_fapll 6>;
clock-names = "refclk";
#phy-cells = <0>;
syscon = <&scm_conf>;
};
};
scrm_clocks: clocks {
#address-cells = <1>;
#size-cells = <0>;
};
scrm_clockdomains: clockdomains {
};
};
next prev parent reply other threads:[~2015-02-13 18:34 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 16:12 [PATCHv2 00/33] ARM: OMAP2+: PRCM/omap ctrl cleanups against 3.19-rc1 Tero Kristo
2015-02-13 16:12 ` [PATCHv2 01/33] ARM: OMAP2+: clock: move clock provider infrastructure to clock driver Tero Kristo
2015-02-13 16:12 ` [PATCHv2 02/33] ARM: OMAP2+: PRCM: rename of_prcm_init to omap_prcm_init Tero Kristo
2015-02-13 16:12 ` [PATCHv2 03/33] ARM: OMAP2+: PRCM: split PRCM module init to their own driver files Tero Kristo
2015-02-13 16:12 ` [PATCHv2 06/33] ARM: OMAP3: PRM: invert the wkst_mask for the prm_clear_mod_irqs Tero Kristo
2015-02-13 16:12 ` [PATCHv2 07/33] ARM: OMAP2+: PRM: add generic API for clear_mod_irqs Tero Kristo
2015-02-13 16:12 ` [PATCHv2 09/33] ARM: OMAP3+: PRM: add common APIs for prm_vp_check/clear_txdone Tero Kristo
2015-02-13 16:12 ` [PATCHv2 10/33] ARM: OMAP4+: PRM: move omap_prm_base_init under OMAP4 PRM driver Tero Kristo
2015-02-13 16:12 ` [PATCHv2 11/33] ARM: OMAP4+: CM: move omap_cm_base_init under OMAP4 CM driver Tero Kristo
2015-02-13 16:12 ` [PATCHv2 12/33] ARM: OMAP2+: clock: add support for static clock memmap indexes Tero Kristo
2015-02-13 16:12 ` [PATCHv2 13/33] ARM: OMAP2+: CM: determine CM base address from device tree Tero Kristo
2015-02-13 16:12 ` [PATCHv2 14/33] ARM: OMAP4: PRM: move omap4xxx_prm_init earlier in init order Tero Kristo
2015-02-13 16:12 ` [PATCHv2 15/33] ARM: OMAP2+: PRM: determine PRM base address from device tree Tero Kristo
2015-02-13 16:12 ` [PATCHv2 16/33] ARM: OMAP2+: control: determine control module base address from DT Tero Kristo
2015-02-13 16:12 ` [PATCHv2 17/33] ARM: OMAP2+: PRM: move SoC specific init calls within a generic API Tero Kristo
2015-02-13 16:12 ` [PATCHv2 18/33] ARM: OMAP4+: PRM: determine prm_device_inst based on DT compatibility Tero Kristo
2015-02-13 16:12 ` [PATCHv2 19/33] ARM: OMAP2+: CM: move SoC specific init calls within a generic API Tero Kristo
2015-02-13 16:12 ` [PATCHv2 20/33] ARM: OMAP4+: PRM: setup prm_features from the PRM init time flags Tero Kristo
2015-02-13 16:12 ` [PATCHv2 21/33] ARM: OMAP4+: PRM: get rid of cpu_is_omap44xx calls from interrupt init Tero Kristo
2015-02-13 16:12 ` [PATCHv2 22/33] ARM: OMAP2+: clock: convert low-level clock APIs to use regmap Tero Kristo
2015-02-13 16:12 ` [PATCHv2 23/33] ARM: OMAP2+: control: remove API for getting control module base address Tero Kristo
2015-02-13 16:12 ` [PATCHv2 24/33] ARM: OMAP2+: id: cache omap_type value Tero Kristo
2015-02-13 16:12 ` [PATCHv2 25/33] ARM: dts: am33xx: add syscon support to scrm node Tero Kristo
2015-02-13 18:29 ` Tony Lindgren [this message]
2015-02-13 16:12 ` [PATCHv2 26/33] ARM: dts: am4372: add syscon support to control module node Tero Kristo
2015-02-13 16:12 ` [PATCHv2 27/33] ARM: dts: omap24xx: add syscon support to scrm node Tero Kristo
2015-02-13 16:12 ` [PATCHv2 28/33] ARM: dts: omap3: " Tero Kristo
2015-02-13 16:12 ` [PATCHv2 29/33] ARM: OMAP2+: control: convert to use syscon for register accesses Tero Kristo
2015-02-13 16:12 ` [PATCHv2 30/33] ARM: dts: omap4: add nodes for control module core instances Tero Kristo
2015-02-13 16:12 ` [PATCHv2 31/33] ARM: dts: omap5: " Tero Kristo
2015-02-13 16:12 ` [PATCHv2 32/33] ARM: dts: dra7: fix control module core instance nodes Tero Kristo
2015-02-13 16:12 ` [PATCHv2 33/33] ARM: OMAP4+: control: add support for initializing control module via DT Tero Kristo
2015-02-13 18:33 ` [PATCHv2 00/33] ARM: OMAP2+: PRCM/omap ctrl cleanups against 3.19-rc1 Tony Lindgren
2015-02-25 18:47 ` Tero Kristo
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=20150213182923.GP2531@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=paul@pwsan.com \
--cc=t-kristo@ti.com \
--cc=tomi.valkeinen@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).