[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3192051.z32dL5alyl@wuerfel>
Date:	Wed, 11 Mar 2015 21:31:42 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Arun Ramamurthy <arun.ramamurthy@...adcom.com>,
	mark.rutland@....com, a.zummo@...ertech.it, sbranden@...adcom.com,
	pawel.moll@....com, devicetree@...r.kernel.org,
	rtc-linux@...glegroups.com, Ray Jui <rjui@...adcom.com>,
	ijc+devicetree@...lion.org.uk,
	Arun Ramamurthy <arunrama@...adcom.com>,
	linux-kernel@...r.kernel.org, robh+dt@...nel.org,
	bcm-kernel-feedback-list@...adcom.com, galak@...eaurora.org,
	grant.likely@...aro.org
Subject: Re: [PATCHv1] rtc: bcm-iproc: Add support for Broadcom iproc rtc
On Wednesday 11 March 2015 13:00:22 Arun Ramamurthy wrote:
> 
> Arnd, this is the device tree entry that I would end up with and I plan 
> to use syscon_regmap_lookup_by_phandle in the rtc driver. Does this look 
> acceptable?
> 
> rtc: iproc_rtc@...3026000 {
>                 compatible = "brcm,iproc-rtc";
>                 reg =   <0x03026000 0xC>,
>                 iso_cell_syscon = <&crmu_iso_cell_control>;
>                 bbl_auth_syscon = <&crmu_bbl_auth>
>                 status = "okay";
> 
> crmu_iso_cell_control:crmu@...301C02C {
>                 compatible = "syscon";
>                 reg = <0x0301C038 0x8>
> }
> 
> crmu_bbl_auth:crmu@...3024C74 {
>                 compatible = "syscon";
>                 reg = <0x03024C74 0x8>;
> }
This doesn't look right, sorry:
A syscon device is defined as a collection of registers that
have no logical grouping within them but that can be seen
as a single device. What you have here instead are two syscon
nodes that each have only a single 8-byte register.
What are the other registers surrounding those? I would expect
something like
	crmu0: syscon@...10000 {
                 compatible = "syscon";
                 reg = <0x03010000 0x10000>;
	};
and then use an offset into the syscon from the rtc node, like
	iproc_rtc: rtc@...26000 {
		compatible = "brcm,iproc-rtc";
		reg = <0x03026000 0x1000>;
		iso_cell_syscon = <&crmu0 0xc038>;
		bbl_auth_syscon = <&crmu1 0x4c74>;
	};
Note also that you got most of the naming wrong:
- node names should be generic strings like "rtc", "syscon", "pci" etc.
  The specific strings are defined in ePAPR.
- unit addresses should match the first 'reg' property and
  not start with '0x'.
- it seems strange that the rtc has only 12 bytes of registers,
  though that may actually be correct.
	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
