devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Felipe Balbi <balbi@ti.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Lokesh Vutla <lokeshvutla@ti.com>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Linux ARM Kernel Mailing List
	<linux-arm-kernel@lists.infradead.org>,
	Paul Walmsley <paul@pwsan.com>, Nishanth Menon <nm@ti.com>,
	devicetree@vger.kernel.org
Subject: Re: [RFC/PATCH 2/7] arm: omap: devicetree: add new properties for OMAP devices
Date: Thu, 11 Dec 2014 09:11:45 -0800	[thread overview]
Message-ID: <20141211171145.GA2990@atomide.com> (raw)
In-Reply-To: <20141211142159.GD20762@saruman>

Hi,

* Felipe Balbi <balbi@ti.com> [141211 06:24]:
> On Thu, Dec 11, 2014 at 01:46:28AM +0100, Sebastian Reichel wrote:
> > 
> > Each IP-Core connected to the bus of OMAP processors has
> > three registers, which specify the IP-Core's version, its
> > status and setup of PM features.
> > 
> > Required Properties:
> > - ti,prcm-type: must be one of the following:
> >    1 for OMAP2+ register style,
> >    2 for OMAP4+ register style,
> >    3 for AM33xx register style

This is the simple part and tells the type of the wiring of
the device :)

> > - reg: offset to revision, config and status registers
> >        relative to module base address

I don't think we should set up the sysconf registers as a child
of the device. These registers are not a child of the device on
the bus. They are sprinkled within the driver reg space. And some
of these sysc registers are way into the driver registers, it's
not always 0-0x10-0x14 layout for the sysconfig register offsets.

> > Optional Properties:
> > - ti,idlemodes:                bit field of flags (SIDLE)
> >    PRCM_IDLE_FORCE               (1 << 0)
> >    PRCM_IDLE_NO                  (1 << 1)
> >    PRCM_IDLE_SMART               (1 << 2)
> >    PRCM_IDLE_SMART_WKUP          (1 << 3)
> > - ti,standbymodes:             bit field of flags (MIDLE)
> >    PRCM_STANDBY_FORCE            (1 << 0)
> >    PRCM_STANDBY_NO               (1 << 1)
> >    PRCM_STANDBY_SMART            (1 << 2)
> >    PRCM_STANDBY_SMART_WKUP       (1 << 3)

These look OK to me. They describe the features available in the
sysconfig registers that map in a different way depending of the
sysconfig type 1, 2 or 3.

Too bad we cannot autoprobe this information from the hardware.

> > - ti,sysc-has-autoidle:        config register has AUTOIDLE bit
> > - ti,sysc-has-softreset:       config register has SOFTRESET bit
> > - ti,sysc-has-enawakeup:       config register has ENAWAKEUP bit
> > - ti,sysc-has-emufree:         config register has EMUFREE bit
> > - ti,sysc-has-clock-activity:  config register has CLOCKACTIVITY bit
> > - ti,sysc-has-dma-disable:     config register has DMADISABLE bit
> > - ti,sysc-has-reset-status:    config register has RESETDONE bit
> > - ti,syss-has-reset-status:    status register has RESETDONE bit
> 
> I thought about having boolean flags like this but after talking to Tony
> we agreed that it would just increase the amount of string parsing
> during early initialization. Besides, why have two properties using an
> integer bitfield and another huge number of boolean properties ?

Yeah setting up individual register bits as strings is just too
much java like.. Setting them up like this means we are doing
devices * nr_sysc_feature_bits of string parsing. So I'd like to
avoid that by using bits like Felipe has done now that we have the
dts preprocessing happening.

> > - ti,reset-delay-us:           reset delay in us
> > 
> > Example:
> > 
> > ocp {
> > 	gpio1: gpio@48310000 {
> > 		compatible = "ti,omap3-gpio";
> > 
> > 		... /* IP-Core specific properties */
> > 
> > 		ti,sysconfig {
> 
> this is what I'm still waiting for comments from Tony. I'm not convinced
> we need this extra indentation level. It really brings nothing of value.

Me neither. It's also wrong from the register mapping point of
view like I explained above.

Cheers,

Tony

  reply	other threads:[~2014-12-11 17:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 22:27 [RFC/PATCH 0/7] arm: omap: move more HWMOD data to DT Felipe Balbi
2014-12-09 22:27 ` [RFC/PATCH 1/7] arm: omap: hwmod: add debugfs interface Felipe Balbi
2014-12-09 22:27 ` [RFC/PATCH 2/7] arm: omap: devicetree: add new properties for OMAP devices Felipe Balbi
2014-12-10 11:07   ` Lokesh Vutla
2014-12-10 15:00     ` Felipe Balbi
2014-12-11  0:46       ` Sebastian Reichel
2014-12-11 14:21         ` Felipe Balbi
2014-12-11 17:11           ` Tony Lindgren [this message]
2014-12-09 22:27 ` [RFC/PATCH 3/7] arm: omap: hwmod: drop 'const' qualifier from omap_hwmod_class name Felipe Balbi
2014-12-09 22:27 ` [RFC/PATCH 4/7] arm: omap: device: add support for generating sysconfig data from DT Felipe Balbi
     [not found]   ` <1418164072-19087-5-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2014-12-10 10:49     ` Lokesh Vutla
2014-12-10 14:48       ` Felipe Balbi
2014-12-09 22:27 ` [RFC/PATCH 5/7] arm: omap: hwmod: allow for registration of class-less hwmods Felipe Balbi
     [not found]   ` <1418164072-19087-6-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2014-12-10 10:50     ` Lokesh Vutla
2014-12-10 14:54       ` Felipe Balbi
2014-12-11  0:52         ` Sebastian Reichel
2014-12-11 14:23           ` Felipe Balbi
2014-12-11 17:44             ` Sebastian Reichel
2014-12-11 17:56               ` Tony Lindgren
2014-12-11 17:32           ` Tony Lindgren
2014-12-09 22:27 ` [RFC/PATCH 6/7] arm: boot: dts: am4372: add sysconfig data to all HWMODs Felipe Balbi
2014-12-09 22:27 ` [RFC/PATCH 7/7] arm: omap: hwmod: 43xx: remove sysc and class data Felipe Balbi
2014-12-09 22:30 ` [RFC/PATCH 0/7] arm: omap: move more HWMOD data to DT Felipe Balbi

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=20141211171145.GA2990@atomide.com \
    --to=tony@atomide.com \
    --cc=balbi@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=sre@kernel.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).