LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] fs: use inode_set_user to set uid/gid of inode
From: David Miller @ 2013-08-23  5:21 UTC (permalink / raw)
  To: rui.xiang
  Cc: linux-s390, linux-ia64, linux-rdma, netdev, linux-usb,
	linux-kernel, linux-mm, viro, cgroups, linux-fsdevel,
	v9fs-developer, linuxppc-dev
In-Reply-To: <1377226118-43756-3-git-send-email-rui.xiang@huawei.com>

From: Rui Xiang <rui.xiang@huawei.com>
Date: Fri, 23 Aug 2013 10:48:38 +0800

> Use the new interface to set i_uid/i_gid in inode struct.
> 
> Signed-off-by: Rui Xiang <rui.xiang@huawei.com>

For the networking bits:

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: [PATCH v5 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
From: Sascha Hauer @ 2013-08-23  6:34 UTC (permalink / raw)
  To: Tomasz Figa
  Cc: Mark Rutland, devicetree@vger.kernel.org,
	alsa-devel@alsa-project.org, lars@metafoo.de, Mike Turquette,
	ian.campbell@citrix.com, Pawel Moll, swarren@wwwdotorg.org,
	festevam@gmail.com, Nicolin Chen, timur@tabi.org,
	rob.herring@calxeda.com, broonie@kernel.org,
	p.zabel@pengutronix.de, galak@codeaurora.org,
	shawn.guo@linaro.org, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <34430785.ApIqfgatMc@flatron>

On Fri, Aug 23, 2013 at 12:49:19AM +0200, Tomasz Figa wrote:
> On Thursday 22 of August 2013 15:43:31 Mike Turquette wrote:
> > Quoting Sascha Hauer (2013-08-22 14:00:35)
> > 
> > > On Thu, Aug 22, 2013 at 01:09:31PM +0100, Mark Rutland wrote:
> > > > On Thu, Aug 22, 2013 at 08:19:10AM +0100, Mike Turquette wrote:
> > > > > Quoting Tomasz Figa (2013-08-21 14:34:55)
> > > > > 
> > > > > > On Wednesday 21 of August 2013 09:50:15 Mark Rutland wrote:
> > > > > > > On Tue, Aug 20, 2013 at 01:06:25AM +0100, Mike Turquette 
> wrote:
> > > > > > > > Quoting Mark Rutland (2013-08-19 02:35:43)
> > > > > > > > 
> > > > > > > > > On Sat, Aug 17, 2013 at 04:17:18PM +0100, Tomasz Figa 
> wrote:
> > > > > > > > > > On Saturday 17 of August 2013 16:53:16 Sascha Hauer 
> wrote:
> > > > > > > > > > > On Sat, Aug 17, 2013 at 02:28:04PM +0200, Tomasz Figa 
> wrote:
> > > > > > > > > > > > > > > Also I would make this option required. Use a
> > > > > > > > > > > > > > > dummy
> > > > > > > > > > > > > > > clock for
> > > > > > > > > > > > > > > mux
> > > > > > > > > > > > > > > inputs that are grounded for a specific SoC.
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > Some clocks are not from CCM and we haven't
> > > > > > > > > > > > > > defined in
> > > > > > > > > > > > > > imx6q-clk.txt,
> > > > > > > > > > > > > > so in most cases we can't provide a phandle for
> > > > > > > > > > > > > > them, eg:
> > > > > > > > > > > > > > spdif_ext.
> > > > > > > > > > > > > > I think it's a bit hard to force it to be
> > > > > > > > > > > > > > 'required'. An
> > > > > > > > > > > > > > 'optional'
> > > > > > > > > > > > > > looks more flexible to me and a default one is
> > > > > > > > > > > > > > ensured
> > > > > > > > > > > > > > even if
> > > > > > > > > > > > > > it's
> > > > > > > > > > > > > > missing.
> > > > > > > > > > > > > 
> > > > > > > > > > > > > <&clks 0> is the dummy clock. This can be used for
> > > > > > > > > > > > > all input
> > > > > > > > > > > > > clocks
> > > > > > > > > > > > > not
> > > > > > > > > > > > > defined by the SoC.
> > > > > > > > > > > > 
> > > > > > > > > > > > Where does this assumption come from? Is it
> > > > > > > > > > > > documented
> > > > > > > > > > > > anywhere?
> > > > > > > > > > > 
> > > > > > > > > > > This is how all i.MX clock bindings currently are. See
> > > > > > > > > > > Documentation/devicetree/bindings/clock/imx*-clock.txt
> > > > > > > > > > 
> > > > > > > > > > OK, thanks.
> > > > > > > > > > 
> > > > > > > > > > I guess we need some discussion on dummy clocks vs
> > > > > > > > > > skipped clocks.
> > > > > > > > > > I think we want some consistency on this, don't we?
> > > > > > > > > > 
> > > > > > > > > > If we really need a dummy clock, then we might also want
> > > > > > > > > > a generic
> > > > > > > > > > way to specify it.
> > > > > > > > > 
> > > > > > > > > What do we actually mean by a "dummy clock"? We already
> > > > > > > > > have
> > > > > > > > > bindings
> > > > > > > > > for "fixed-clock" and co friends describe relatively
> > > > > > > > > simple
> > > > > > > > > preconfigured clocks.
> > > > > > > > 
> > > > > > > > Some platforms have a fake clock which defines noops
> > > > > > > > callbacks and
> > > > > > > > basically doesn't do anything. This is analogous to the
> > > > > > > > dummy
> > > > > > > > regulator
> > > > > > > > implementation. A central one could be registered by the
> > > > > > > > clock core,
> > > > > > > > as
> > > > > > > > is done by the regulator core.
> > > > > > > 
> > > > > > > When you say some platforms, you presumably mean the platform
> > > > > > > code in
> > > > > > > Linux? A dummy clock sounds like a completely Linux-specific
> > > > > > > abstraction rather than a description of the hardware, and I
> > > > > > > don't see why we need that in the DT:
> > > > > > > 
> > > > > > > * If a clock is wired up and running (as presumably the dummy
> > > > > > > clock is), then surely it's a fixed-clock (it's running, we
> > > > > > > and we have no control over it, but we presumably know its
> > > > > > > rate) and can be described as such?
> > > > > > > 
> > > > > > > * If no clock is wired up, then we should be able to describe
> > > > > > > that. If a driver believes that a clock is required when it
> > > > > > > isn't (for some level of functionality), then that driver
> > > > > > > should be fixed up to support the clock as being optional.
> > > > > > > 
> > > > > > > Am I missing something?
> > > > > > 
> > > > > > I second that.
> > > > > > 
> > > > > > Moreover, I don't think that device tree should deal with dummy
> > > > > > anything. It should be able to describe hardware that is
> > > > > > available on given system, not list what hardware is not
> > > > > > available.
> > > > > 
> > > > > I wasn't clear. The dummy clock IS a completely Linux-specific
> > > > > abstraction.
> > > > > 
> > > > > I'm not advocating a dummy clock in DT. I am advocating
> > > > > consolidation of the implementation of a clock that does nothing
> > > > > into the clock core. This code could easily live in
> > > > > drivers/clk/clk.c instead of having everyone open-code it.
> > > > > 
> > > > > As far as specifying a dummy clock in DT? I dunno. DT should
> > > > > describe
> > > > > real hardware so there isn't much use for a dummy clock.
> > > > 
> > > > Sorry, I misunderstood. Good to hear we're on the same page :)
> > > > 
> > > > > I'm guessing one of the reasons for such a clock are drivers do
> > > > > not
> > > > > honor the clk.h api and they freak out when clk_get gives them a
> > > > > NULL
> > > > > pointer?
> > > > 
> > > > I'm not sure. Sascha, could you shed some light on the matter?
> > > 
> > > The original reason introducing the dummy clocks in the i.MX dtbs
> > > was to provide devices a clock which the driver requests but is
> > > not software controllable. We often have the case where the same
> > > devices are on several SoCs, but not on all of them all clocks have
> > > a bit to en/disable them.
> > > 
> > > Anyway, to accomplish this we don't need dummy clocks. We can just
> > > describe the real clocks.
> > 
> > You could use a dummy clk for the Linux implementation, but the downside
> > is that a dummy clock has a rate of 0 always and a your clocks likely
> > have non-zero rates.
> > 
> > It is probably better for you define a clock which only implements the
> > .recalc_rate callback. If the rate of this clock changes without Linux
> > having knowledge of it you can use the CLK_GET_RATE_NOCACHE flag.
> 
> I doubt that rate of a dummy clock could ever change... unless it is a 
> rather smart dummy.
> 
> > > BTW with the S/PDIF core on which not all mux inputs are connected
> > > to actual clocks we could also describe the unconnected inputs as
> > > ground clocks with rate 0. This way we describe something which
> > > is really there instead of dummy clocks ;)
> > 
> > Again you could use a dummy clock for this OR a fixed-rate clock with a
> > rate of zero from the perspective of the Linux implementation.
> > 
> > Do you think it worthwhile to have a DT binding for a grounded clock?
> > That is not an entirely uncommon case.
> 
> Well, how would that differ from skipping a clock from clocks list, i.e. 
> not specifying it in clock-names and clocks properties?

The difference is that you can successfully grab it in your driver.

> 
> > > Background to why it might be a good idea to connect a ground clock
> > > to the unconnected input pins is that a driver has a chance to
> > > successfully grab all clocks. Otherwise how does the driver
> > > distinguish
> > > between an unconnected and an erroneous clock?
> > 
> > Sorry, I don't follow this last question. Do you mean how to distinguish
> > based on the value returned from clk_get?
> 
> Hmm, in theory, a driver could want to distinguish an error case (e.g. 
> clock specified, but there is a problem with it) from no clock (e.g. clock 
> not specified in DT, because it is not available on particular board).

Yes, that's what I meant. To illustrate the problem for this driver:

	for (i = 0; i < STC_TXCLK_SRC_MAX; i++) {
		sprintf(tmp, "rxtx%d", i);
		clk = devm_clk_get(&pdev->dev, tmp);
		if (IS_ERR(clk)) {
			/*
			 * This can either mean this clock is not wired
			 * up (skipped in the devicetree, *or* it is wired
			 * up, but there went something wrong requesting it.
			 * We can only ignore this error.
			 */
		}
	}

This could be solved by always specifying all input clocks in the
devicetree.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply

* Re: [PATCH 2/4 V2] mmc: esdhc: workaround for dma err in the last system transaction
From: Zhang Haijun @ 2013-08-23  6:39 UTC (permalink / raw)
  To: Zhang Haijun-B42677
  Cc: Wood Scott-B07421, linux-mmc@vger.kernel.org,
	cbouatmailru@gmail.com, cjb@laptop.org,
	linuxppc-dev@lists.ozlabs.org, Xie Xiaobo-R63061
In-Reply-To: <99E897753B6F7048BD8CCDB4661D02E13DF52C@039-SN2MPN1-022.039d.mgd.msft.net>

Hi, Anton and all

Is there any advice on these two patches ?

[PATCH 2/4 V2] mmc: esdhc: workaround for dma err in the last system 
transaction
[PATCH 3/4 V3] mmc: esdhc: Correct host version of T4240-R1.0-R2.0.


[PATCH 1/4 V4] powerpc/85xx: Add support for 85xx cpu type detection
This patch is Act-by Scott.
Patch 4/4 is split to four patches and Act-by Anton.


Thanks all.



On 07/19/2013 10:21 AM, Zhang Haijun-B42677 wrote:
> Hi, all
>
> Expect your advice and any comments.
>
>
> Thanks.
>
> Regards
> Haijun.
>
>
>> -----Original Message-----
>> From: Zhang Haijun-B42677
>> Sent: Wednesday, July 17, 2013 6:11 PM
>> To: linux-mmc@vger.kernel.org; linuxppc-dev@lists.ozlabs.org
>> Cc: cbouatmailru@gmail.com; cjb@laptop.org; Wood Scott-B07421; Fleming
>> Andy-AFLEMING; Zhang Haijun-B42677; Zhang Haijun-B42677
>> Subject: [PATCH 2/4 V2] mmc: esdhc: workaround for dma err in the last
>> system transaction
>>
>> A-004388: eSDHC DMA might not stop if error occurs on system transaction
>>
>> eSDHC DMA(SDMA/ADMA) might not stop if an error occurs in the last system
>> transaction. It may continue initiating additional transactions until
>> software reset for data/all is issued during error recovery. There is not
>> any data corruption to the SD data. The IRQSTAT[DMAE] is set when the
>> erratum occurs.
>> The only conditions under which issues occur are the following:
>> 1. SDMA - For SD Write , the error occurs in the last system transaction.
>> No issue for SD read
>> 2. ADMA
>> a. Block count is enabled: For SD write, the error occurs in the last
>> system transaction. There is no issue for SD read when block count is
>> enabled.
>> b. Block count is disabled: Block count is designated by the ADMA
>> descriptor table, and the error occurs in the last system transaction
>> when ADMA is executing last descriptor line of table.
>>
>> eSDHC may initiate additional system transactions. There is no data
>> integrity issue for case 1 and 2a described below. For case 2b, system
>> data might be corrupted.
>>
>> Workaround: Set eSDHC_SYSCTL[RSTD] when IRQSTAT[DMAE] is set. For cases
>> 2a and 2b above, add an extra descriptor line with zero data next to the
>> last descriptor line.
>>
>> Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
>> ---
>> changes for V2:
>> 	- Update the svr version list
>>
>>   drivers/mmc/host/sdhci-of-esdhc.c | 112
>> ++++++++++++++++++++++++++++++++++----
>>   1 file changed, 102 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-
>> of-esdhc.c
>> index 15039e2..adfaadd 100644
>> --- a/drivers/mmc/host/sdhci-of-esdhc.c
>> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
>> @@ -21,9 +21,13 @@
>>   #include <linux/mmc/host.h>
>>   #include "sdhci-pltfm.h"
>>   #include "sdhci-esdhc.h"
>> +#include <asm/mpc85xx.h>
>>
>>   #define VENDOR_V_22	0x12
>>   #define VENDOR_V_23	0x13
>> +
>> +static u32 svr;
>> +
>>   static u32 esdhc_readl(struct sdhci_host *host, int reg)  {
>>   	u32 ret;
>> @@ -142,6 +146,26 @@ static void esdhc_writeb(struct sdhci_host *host, u8
>> val, int reg)
>>   	sdhci_be32bs_writeb(host, val, reg);
>>   }
>>
>> +static void esdhc_reset(struct sdhci_host *host, u8 mask) {
>> +	u32 ier;
>> +	u32 uninitialized_var(isav);
>> +
>> +	if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET)
>> +		isav = esdhc_readl(host, SDHCI_INT_ENABLE);
>> +
>> +	esdhc_writeb(host, mask, SDHCI_SOFTWARE_RESET);
>> +	mdelay(100);
>> +
>> +	if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET) {
>> +		ier = esdhc_readl(host, SDHCI_INT_ENABLE);
>> +		ier &= ~SDHCI_INT_ALL_MASK;
>> +		ier |= isav;
>> +		esdhc_writel(host, ier, SDHCI_INT_ENABLE);
>> +		esdhc_writel(host, ier, SDHCI_SIGNAL_ENABLE);
>> +	}
>> +}
>> +
>>   /*
>>    * For Abort or Suspend after Stop at Block Gap, ignore the ADMA
>>    * error(IRQSTAT[ADMAE]) if both Transfer Complete(IRQSTAT[TC]) @@ -
>> 156,25 +180,92 @@ static void esdhci_of_adma_workaround(struct sdhci_host
>> *host, u32 intmask)
>>   	dma_addr_t dmastart;
>>   	dma_addr_t dmanow;
>>
>> -	tmp = in_be32(host->ioaddr + SDHCI_SLOT_INT_STATUS);
>> +	tmp = esdhc_readl(host, SDHCI_SLOT_INT_STATUS);
>>   	tmp = (tmp & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT;
>>
>>   	applicable = (intmask & SDHCI_INT_DATA_END) &&
>>   		(intmask & SDHCI_INT_BLK_GAP) &&
>>   		(tmp == VENDOR_V_23);
>> -	if (!applicable)
>> +	if (applicable) {
>> +
>> +		esdhc_reset(host, SDHCI_RESET_DATA);
>> +		host->data->error = 0;
>> +		dmastart = sg_dma_address(host->data->sg);
>> +		dmanow = dmastart + host->data->bytes_xfered;
>> +
>> +		/* Force update to the next DMA block boundary. */
>> +		dmanow = (dmanow & ~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1)) +
>> +			SDHCI_DEFAULT_BOUNDARY_SIZE;
>> +		host->data->bytes_xfered = dmanow - dmastart;
>> +		esdhc_writel(host, dmanow, SDHCI_DMA_ADDRESS);
>> +
>>   		return;
>> +	}
>>
>> -	host->data->error = 0;
>> -	dmastart = sg_dma_address(host->data->sg);
>> -	dmanow = dmastart + host->data->bytes_xfered;
>>   	/*
>> -	 * Force update to the next DMA block boundary.
>> +	 * Check for A-004388: eSDHC DMA might not stop if error
>> +	 * occurs on system transaction
>> +	 * Impact list:
>> +	 * T4240-R1.0 B4860-R1.0 P1010-R1.0
>> +	 * P3041-R1.0-R2.0-R1.1 P2041-R1.0-R1.1-R2.0
>> +	 * P5040-R2.0
>>   	 */
>> -	dmanow = (dmanow & ~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1)) +
>> -		SDHCI_DEFAULT_BOUNDARY_SIZE;
>> -	host->data->bytes_xfered = dmanow - dmastart;
>> -	sdhci_writel(host, dmanow, SDHCI_DMA_ADDRESS);
>> +	if (!(((SVR_SOC_VER(svr) == SVR_T4240) && (SVR_REV(svr) == 0x10))
>> ||
>> +		((SVR_SOC_VER(svr) == SVR_B4860) && (SVR_REV(svr) == 0x10))
>> ||
>> +		((SVR_SOC_VER(svr) == SVR_P1010) && (SVR_REV(svr) == 0x10))
>> ||
>> +		((SVR_SOC_VER(svr) == SVR_P3041) && (SVR_REV(svr) <= 0x20))
>> ||
>> +		((SVR_SOC_VER(svr) == SVR_P2041) && (SVR_REV(svr) <= 0x20))
>> ||
>> +		((SVR_SOC_VER(svr) == SVR_P5040) && SVR_REV(svr) == 0x20)))
>> +		return;
>> +
>> +	esdhc_reset(host, SDHCI_RESET_DATA);
>> +
>> +	if (host->flags & SDHCI_USE_ADMA) {
>> +		u32 mod, i, offset;
>> +		u8 *desc;
>> +		dma_addr_t addr;
>> +		struct scatterlist *sg;
>> +		__le32 *dataddr;
>> +		__le32 *cmdlen;
>> +
>> +		/*
>> +		 * If block count was enabled, in case read transfer there
>> +		 * is no data was corrupted
>> +		 */
>> +		mod = esdhc_readl(host, SDHCI_TRANSFER_MODE);
>> +		if ((mod & SDHCI_TRNS_BLK_CNT_EN) &&
>> +			(host->data->flags & MMC_DATA_READ))
>> +			host->data->error = 0;
>> +
>> +		BUG_ON(!host->data);
>> +		desc = host->adma_desc;
>> +		for_each_sg(host->data->sg, sg, host->sg_count, i) {
>> +			addr = sg_dma_address(sg);
>> +			offset = (4 - (addr & 0x3)) & 0x3;
>> +			if (offset)
>> +				desc += 8;
>> +			desc += 8;
>> +		}
>> +
>> +		/*
>> +		 * Add an extra zero descriptor next to the
>> +		 * terminating descriptor.
>> +		 */
>> +		desc += 8;
>> +		WARN_ON((desc - host->adma_desc) > (128 * 2 + 1) * 4);
>> +
>> +		dataddr = (__le32 __force *)(desc + 4);
>> +		cmdlen = (__le32 __force *)desc;
>> +
>> +		cmdlen[0] = cpu_to_le32(0);
>> +		dataddr[0] = cpu_to_le32(0);
>> +	}
>> +
>> +	if ((host->flags & SDHCI_USE_SDMA) &&
>> +		(host->data->flags & MMC_DATA_READ))
>> +		host->data->error = 0;
>> +
>> +	return;
>>   }
>>
>>   static int esdhc_of_enable_dma(struct sdhci_host *host) @@ -299,6 +390,7
>> @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
>>   	struct device_node *np;
>>   	int ret;
>>
>> +	svr = mfspr(SPRN_SVR);
>>   	host = sdhci_pltfm_init(pdev, &sdhci_esdhc_pdata, 0);
>>   	if (IS_ERR(host))
>>   		return PTR_ERR(host);
>> --
>> 1.8.0


-- 
Thanks & Regards

Haijun

^ permalink raw reply

* Re: [PATCH 0/2] fs: supply inode uid/gid setting interface
From: Rui Xiang @ 2013-08-23  7:32 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-s390, linux-ia64, linux-rdma, netdev, linux-usb,
	linux-kernel, linux-mm, viro, cgroups, linux-fsdevel,
	v9fs-developer, linuxppc-dev
In-Reply-To: <20130823041010.GA12296@kroah.com>

On 2013/8/23 12:10, Greg KH wrote:
> On Fri, Aug 23, 2013 at 10:48:36AM +0800, Rui Xiang wrote:
>> This patchset implements an accessor functions to set uid/gid
>> in inode struct. Just finish code clean up.
> 
> Why?
> 
It can introduce a new function to reduce some codes. 
 Just clean up. 


Thanks.

^ permalink raw reply

* [PATCH v11] ASoC: fsl: Add S/PDIF machine driver
From: Nicolin Chen @ 2013-08-23  8:04 UTC (permalink / raw)
  To: broonie, s.hauer, swarren
  Cc: mark.rutland, devicetree, alsa-devel, lars, tomasz.figa,
	rob.herring, p.zabel, shawn.guo, linuxppc-dev

This patch implements a device-tree-only machine driver for Freescale
i.MX series Soc. It works with spdif_transmitter/spdif_receiver and
fsl_spdif.c drivers.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
---
Changelog
v10->v11:
 * Use boolean properties for spdif-out/in switch instead of codec phandles.
 * Accordingly create dummy codec driver in probe() instead of DT nodes.

 .../devicetree/bindings/sound/imx-audio-spdif.txt  |   34 +++++
 sound/soc/fsl/Kconfig                              |   11 ++
 sound/soc/fsl/Makefile                             |    2 +
 sound/soc/fsl/imx-spdif.c                          |  152 ++++++++++++++++++++
 4 files changed, 199 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/imx-audio-spdif.txt
 create mode 100644 sound/soc/fsl/imx-spdif.c

diff --git a/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt b/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt
new file mode 100644
index 0000000..7d13479
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt
@@ -0,0 +1,34 @@
+Freescale i.MX audio complex with S/PDIF transceiver
+
+Required properties:
+
+  - compatible : "fsl,imx-audio-spdif"
+
+  - model : The user-visible name of this sound complex
+
+  - spdif-controller : The phandle of the i.MX S/PDIF controller
+
+
+Optional properties:
+
+  - spdif-out : This is a boolean property. If present, the transmitting
+    function of S/PDIF will be enabled, indicating there's a physical
+    S/PDIF out connector/jack on the board or it's connecting to some
+    other IP block, such as an HDMI encoder/display-controller.
+
+  - spdif-in : This is a boolean property. If present, the receiving
+    function of S/PDIF will be enabled, indicating there's a physical
+    S/PDIF in connector/jack on the board.
+
+* Note: At least one of these two properties should be set in the DT binding.
+
+
+Example:
+
+sound-spdif {
+	compatible = "fsl,imx-audio-spdif";
+	model = "imx-spdif";
+	spdif-controller = <&spdif>;
+	spdif-out;
+	spdif-in;
+};
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index cd088cc..a708380 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -193,6 +193,17 @@ config SND_SOC_IMX_SGTL5000
 	  Say Y if you want to add support for SoC audio on an i.MX board with
 	  a sgtl5000 codec.
 
+config SND_SOC_IMX_SPDIF
+	tristate "SoC Audio support for i.MX boards with S/PDIF"
+	select SND_SOC_IMX_PCM_DMA
+	select SND_SOC_FSL_SPDIF
+	select SND_SOC_FSL_UTILS
+	select SND_SOC_SPDIF
+	help
+	  SoC Audio support for i.MX boards with S/PDIF
+	  Say Y if you want to add support for SoC audio on an i.MX board with
+	  a S/DPDIF.
+
 config SND_SOC_IMX_MC13783
 	tristate "SoC Audio support for I.MX boards with mc13783"
 	depends on MFD_MC13783 && ARM
diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index 4b5970e..e2aaff7 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -45,6 +45,7 @@ snd-soc-mx27vis-aic32x4-objs := mx27vis-aic32x4.o
 snd-soc-wm1133-ev1-objs := wm1133-ev1.o
 snd-soc-imx-sgtl5000-objs := imx-sgtl5000.o
 snd-soc-imx-wm8962-objs := imx-wm8962.o
+snd-soc-imx-spdif-objs :=imx-spdif.o
 snd-soc-imx-mc13783-objs := imx-mc13783.o
 
 obj-$(CONFIG_SND_SOC_EUKREA_TLV320) += snd-soc-eukrea-tlv320.o
@@ -53,4 +54,5 @@ obj-$(CONFIG_SND_SOC_MX27VIS_AIC32X4) += snd-soc-mx27vis-aic32x4.o
 obj-$(CONFIG_SND_MXC_SOC_WM1133_EV1) += snd-soc-wm1133-ev1.o
 obj-$(CONFIG_SND_SOC_IMX_SGTL5000) += snd-soc-imx-sgtl5000.o
 obj-$(CONFIG_SND_SOC_IMX_WM8962) += snd-soc-imx-wm8962.o
+obj-$(CONFIG_SND_SOC_IMX_SPDIF) += snd-soc-imx-spdif.o
 obj-$(CONFIG_SND_SOC_IMX_MC13783) += snd-soc-imx-mc13783.o
diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c
new file mode 100644
index 0000000..af5b553
--- /dev/null
+++ b/sound/soc/fsl/imx-spdif.c
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <sound/soc.h>
+
+struct imx_spdif_data {
+	struct snd_soc_dai_link dai[2];
+	struct snd_soc_card card;
+	struct platform_device *txdev;
+	struct platform_device *rxdev;
+};
+
+static int imx_spdif_audio_probe(struct platform_device *pdev)
+{
+	struct device_node *spdif_np, *np = pdev->dev.of_node;
+	struct platform_device *spdif_pdev;
+	struct imx_spdif_data *data;
+	int ret = 0, num_links = 0;
+
+	spdif_np = of_parse_phandle(np, "spdif-controller", 0);
+	if (!spdif_np) {
+		dev_err(&pdev->dev, "failed to find spdif-controller\n");
+		ret = -EINVAL;
+		goto end;
+	}
+
+	spdif_pdev = of_find_device_by_node(spdif_np);
+	if (!spdif_pdev) {
+		dev_err(&pdev->dev, "failed to find S/PDIF device\n");
+		ret = -EINVAL;
+		goto end;
+	}
+
+	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
+	if (!data) {
+		dev_err(&pdev->dev, "failed to allocate memory\n");
+		ret = -ENOMEM;
+		goto end;
+	}
+
+	if (of_property_read_bool(np, "spdif-out")) {
+		data->dai[num_links].name = "S/PDIF TX";
+		data->dai[num_links].stream_name = "S/PDIF PCM Playback";
+		data->dai[num_links].codec_dai_name = "dit-hifi";
+		data->dai[num_links].codec_name = "spdif-dit";
+		data->dai[num_links].cpu_of_node = spdif_np;
+		data->dai[num_links].platform_of_node = spdif_np;
+		num_links++;
+	}
+
+	if (of_property_read_bool(np, "spdif-in")) {
+		data->dai[num_links].name = "S/PDIF RX";
+		data->dai[num_links].stream_name = "S/PDIF PCM Capture";
+		data->dai[num_links].codec_dai_name = "dir-hifi";
+		data->dai[num_links].codec_name = "spdif-dir";
+		data->dai[num_links].cpu_of_node = spdif_np;
+		data->dai[num_links].platform_of_node = spdif_np;
+		num_links++;
+	}
+
+	if (!num_links) {
+		dev_err(&pdev->dev, "no enabled S/PDIF DAI link\n");
+		goto end;
+	}
+
+	data->card.dev = &pdev->dev;
+	data->card.num_links = num_links;
+	data->card.dai_link = data->dai;
+
+	ret = snd_soc_of_parse_card_name(&data->card, "model");
+	if (ret)
+		goto end;
+
+	data->txdev = platform_device_register_simple("spdif-dit", -1, NULL, 0);
+	if (IS_ERR(data->txdev)) {
+		ret = PTR_ERR(data->txdev);
+		dev_err(&pdev->dev, "register spdif-dit failed (%d)\n", ret);
+		goto end;
+	}
+
+	data->rxdev = platform_device_register_simple("spdif-dir", -1, NULL, 0);
+	if (IS_ERR(data->rxdev)) {
+		ret = PTR_ERR(data->rxdev);
+		dev_err(&pdev->dev, "register spdif-dir failed (%d)\n", ret);
+		goto error_dit;
+	}
+
+	ret = snd_soc_register_card(&data->card);
+	if (ret) {
+		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
+		goto error_dir;
+	}
+
+	platform_set_drvdata(pdev, data);
+
+	goto end;
+
+error_dir:
+	platform_device_unregister(data->rxdev);
+error_dit:
+	platform_device_unregister(data->txdev);
+end:
+	if (spdif_np)
+		of_node_put(spdif_np);
+
+	return ret;
+}
+
+static int imx_spdif_audio_remove(struct platform_device *pdev)
+{
+	struct imx_spdif_data *data = platform_get_drvdata(pdev);
+
+	platform_device_unregister(data->rxdev);
+	platform_device_unregister(data->txdev);
+
+	snd_soc_unregister_card(&data->card);
+
+	return 0;
+}
+
+static const struct of_device_id imx_spdif_dt_ids[] = {
+	{ .compatible = "fsl,imx-audio-spdif", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, imx_spdif_dt_ids);
+
+static struct platform_driver imx_spdif_driver = {
+	.driver = {
+		.name = "imx-spdif",
+		.owner = THIS_MODULE,
+		.of_match_table = imx_spdif_dt_ids,
+	},
+	.probe = imx_spdif_audio_probe,
+	.remove = imx_spdif_audio_remove,
+};
+
+module_platform_driver(imx_spdif_driver);
+
+MODULE_AUTHOR("Freescale Semiconductor, Inc.");
+MODULE_DESCRIPTION("Freescale i.MX S/PDIF machine driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:imx-spdif");
-- 
1.7.1

^ permalink raw reply related

* Re: [PATCH V3] i2c: move of helpers into the core
From: Wolfram Sang @ 2013-08-23  8:52 UTC (permalink / raw)
  To: linux-i2c
  Cc: devel, devicetree, davinci-linux-open-source, linux-samsung-soc,
	alsa-devel, linux-doc, linux-kernel, dri-devel, linux-acpi,
	linux-tegra, linux-omap, linuxppc-dev, linux-arm-kernel,
	linux-media
In-Reply-To: <1377187217-31820-1-git-send-email-wsa@the-dreams.de>

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

On Thu, Aug 22, 2013 at 06:00:14PM +0200, Wolfram Sang wrote:
> I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
> that it is much cleaner to have this in the core. This also removes a
> circular dependency between the helpers and the core, and so we can
> finally register child nodes in the core instead of doing this manually
> in each driver. So, fix the drivers and documentation, too.
> 
> Acked-by: Rob Herring <rob.herring@calxeda.com>
> Reviewed-by: Felipe Balbi <balbi@ti.com>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Applied to for-next!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [RFC PATCH V3 3/5] powerpc/cpuidle: Generic powerpc backend cpuidle driver.
From: Deepthi Dharwar @ 2013-08-23 10:11 UTC (permalink / raw)
  To: Scott Wood
  Cc: Wood Scott-B07421, daniel.lezcano@linaro.org,
	Wang Dongsheng-B40534, preeti@linux.vnet.ibm.com,
	linux-pm@lists.linux-foundation.org,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <1377206679.20722.10.camel@snotra.buserror.net>

On 08/23/2013 02:54 AM, Scott Wood wrote:
> On Thu, 2013-08-22 at 11:20 +0530, Deepthi Dharwar wrote:
>> On 08/22/2013 01:38 AM, Scott Wood wrote:
>>> On Wed, 2013-08-21 at 10:23 +0530, Deepthi Dharwar wrote:
>>>> On 08/19/2013 11:47 PM, Scott Wood wrote:
>>>>> What actual functionality is common to all powerpc but not common to
>>>>> other arches?
>>>
>>
>> The functionality here is idle states on powerpc  like the snooze loop
>> that is common.
>> Also, the basic registration of the driver, hotplug notifier etc for
>> powerpc.
> 
> The snooze loop uses things like SPRN_PURR, get_lppaca(), and CTRL which
> aren't common to all PPC (they might be common to all book3s64).  I also
> don't see any hook for the low power mode entry -- is "snooze" just a
> busy loop plus the de-emphasis stuff like HMT and CTRL[RUN]?  I'm not
> familiar with the term "snooze" in this context.  I don't think we'd use
> anything like that on our chips; we'd always at least "wait" or "doze"
> depending on the chip.
>

Duly noted. Lot of stuff are common across book3s64. So my later
versions of this patchset does just that. (V5 posted out yesterday).
The driver is common only to IBM-POWER platform. Other PPC variants
can have their own driver.


> It's not clear what is powerpc-specific about the notifier -- perhaps it
> should go in drivers/cpuidle/.

Currently all the arcs have their own hotplug notifier. Unifying this
across all archs is a challenge that needs to be taken going forward.

Thanks for the review.
Regards,
Deepthi


>>> The way forward is to give this file a more appropriate name based on
>>> the hardware that it actually targets -- and to refactor it so that the
>>> answer to that question is not complicated.
>>
>> Sure, thanks.
>> Our idea was to have POWER archs idle states merged at the first go.
>> Only that is what is enabled in the current version (V4 posted out)
>> ( Code is enabled for PSERIES and POWERNV only)
>> If needed, other POWERPC archs might benefit by extending the same
>> driver, that is why it is named cpuidle-powerpc.c
>>
>> But if having cpuidle backend-driver separately for other powerpc arcs
>> makes sense such that each one have their own state information etc
>> then it makes sense to name the files as cpuidle-power.c,
>> cpuilde-ppc32.c and so on.
> 
> Thanks.
> 
> -Scott
> 
> 
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 
> 

^ permalink raw reply

* Re: [PATCH V4 3/5] powerpc/cpuidle: Generic powerpc backend cpuidle driver.
From: Deepthi Dharwar @ 2013-08-23 10:19 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: daniel.lezcano, linux-kernel, dongsheng.wang, rjw, scottwood,
	srivatsa.bhat, preeti, linux-pm, linuxppc-dev
In-Reply-To: <1510785.gFaG8Cehp1@amdc1032>

Hi Bartlomiej,

Thanks for the review.

On 08/22/2013 04:26 PM, Bartlomiej Zolnierkiewicz wrote:
> 
> Hi,
> 
> On Thursday, August 22, 2013 11:00:29 AM Deepthi Dharwar wrote:
>> This patch involves moving the current pseries_idle backend driver code
>> from pseries/processor_idle.c to drivers/cpuidle/cpuidle-powerpc.c,
>> and making the backend code generic enough to be able to extend this
>> driver code for both powernv and pseries.
>>
>> It enables the support for pseries platform, such that going forward the same code
>> with minimal efforts can be re-used for a common driver on powernv
>> and can be further extended to support cpuidle idle state mgmt for the rest
>> of the powerpc platforms in the future. This removes a lot of code duplicacy,
>> making the code elegant.
> 
> This patch mixes the code movement with the actual code changes which is
> not a good practice as it makes review more difficult and is generally bad
> from the long term maintainance POV.
> 
> Please split this patch on code movement and code changes parts.

Sure. I shall do so.

> V4 of this patch now also seems to contain changes which I posted on
> Tuesday as a part of dev->state_count removal patchset:
> 
> http://permalink.gmane.org/gmane.linux.power-management.general/37392
> http://permalink.gmane.org/gmane.linux.power-management.general/37393
> 
> so some work probably got duplicated. :(
> 

Sorry about that. I have been re-writing this driver over the last few
weeks and this cleanup was on my to-do list since V1 as pointed out by
Daniel. I have missed seeing your cleanup.

Thanks for patch !

Regards,
Deepthi


> Best regards,
> --
> Bartlomiej Zolnierkiewicz
> Samsung R&D Institute Poland
> Samsung Electronics
> 
>> Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
>> ---
>>  arch/powerpc/include/asm/paca.h                 |   23 +
>>  arch/powerpc/include/asm/processor.h            |    2 
>>  arch/powerpc/platforms/pseries/Kconfig          |    9 -
>>  arch/powerpc/platforms/pseries/Makefile         |    1 
>>  arch/powerpc/platforms/pseries/processor_idle.c |  360 -----------------------
>>  drivers/cpuidle/Kconfig                         |    7 
>>  drivers/cpuidle/Makefile                        |    2 
>>  drivers/cpuidle/cpuidle-powerpc.c               |  304 +++++++++++++++++++
>>  8 files changed, 337 insertions(+), 371 deletions(-)
>>  delete mode 100644 arch/powerpc/platforms/pseries/processor_idle.c
>>  create mode 100644 drivers/cpuidle/cpuidle-powerpc.c
>>
>> diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h
>> index 77c91e7..7bd83ff 100644
>> --- a/arch/powerpc/include/asm/paca.h
>> +++ b/arch/powerpc/include/asm/paca.h
>> @@ -175,6 +175,29 @@ extern void setup_paca(struct paca_struct *new_paca);
>>  extern void allocate_pacas(void);
>>  extern void free_unused_pacas(void);
>>  
>> +#ifdef CONFIG_PPC_BOOK3S
>> +#define get_lppaca_is_shared_proc()  get_paca()->lppaca_ptr->shared_proc
>> +static inline void set_lppaca_idle(u8  idle)
>> +{
>> +	get_paca()->lppaca_ptr->idle = idle;
>> +}
>> +
>> +static inline void add_lppaca_wait_state(u64 cycles)
>> +{
>> +	get_paca()->lppaca_ptr->wait_state_cycles += cycles;
>> +}
>> +
>> +static inline void set_lppaca_donate_dedicated_cpu(u8 value)
>> +{
>> +	get_paca()->lppaca_ptr->donate_dedicated_cpu = value;
>> +}
>> +#else
>> +#define get_lppaca_is_shared_proc()	-1
>> +static inline void set_lppaca_idle(u8 idle) { }
>> +static inline void  add_lppaca_wait_state(u64 cycles) { }
>> +static inline void  set_lppaca_donate_dedicated_cpu(u8 value) { }
>> +#endif
>> +
>>  #else /* CONFIG_PPC64 */
>>  
>>  static inline void allocate_pacas(void) { };
>> diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
>> index e378ccc..5f57c56 100644
>> --- a/arch/powerpc/include/asm/processor.h
>> +++ b/arch/powerpc/include/asm/processor.h
>> @@ -430,7 +430,7 @@ enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF};
>>  extern int powersave_nap;	/* set if nap mode can be used in idle loop */
>>  extern void power7_nap(void);
>>  
>> -#ifdef CONFIG_PSERIES_IDLE
>> +#ifdef CONFIG_CPU_IDLE_POWERPC
>>  extern void update_smt_snooze_delay(int cpu, int residency);
>>  #else
>>  static inline void update_smt_snooze_delay(int cpu, int residency) {}
>> diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
>> index 62b4f80..bb59bb0 100644
>> --- a/arch/powerpc/platforms/pseries/Kconfig
>> +++ b/arch/powerpc/platforms/pseries/Kconfig
>> @@ -119,12 +119,3 @@ config DTL
>>  	  which are accessible through a debugfs file.
>>  
>>  	  Say N if you are unsure.
>> -
>> -config PSERIES_IDLE
>> -	bool "Cpuidle driver for pSeries platforms"
>> -	depends on CPU_IDLE
>> -	depends on PPC_PSERIES
>> -	default y
>> -	help
>> -	  Select this option to enable processor idle state management
>> -	  through cpuidle subsystem.
>> diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
>> index 8ae0103..4b22379 100644
>> --- a/arch/powerpc/platforms/pseries/Makefile
>> +++ b/arch/powerpc/platforms/pseries/Makefile
>> @@ -21,7 +21,6 @@ obj-$(CONFIG_HCALL_STATS)	+= hvCall_inst.o
>>  obj-$(CONFIG_CMM)		+= cmm.o
>>  obj-$(CONFIG_DTL)		+= dtl.o
>>  obj-$(CONFIG_IO_EVENT_IRQ)	+= io_event_irq.o
>> -obj-$(CONFIG_PSERIES_IDLE)	+= processor_idle.o
>>  
>>  ifeq ($(CONFIG_PPC_PSERIES),y)
>>  obj-$(CONFIG_SUSPEND)		+= suspend.o
>> diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
>> deleted file mode 100644
>> index c905b99..0000000
>> --- a/arch/powerpc/platforms/pseries/processor_idle.c
>> +++ /dev/null
>> @@ -1,360 +0,0 @@
>> -/*
>> - *  processor_idle - idle state cpuidle driver.
>> - *  Adapted from drivers/idle/intel_idle.c and
>> - *  drivers/acpi/processor_idle.c
>> - *
>> - */
>> -
>> -#include <linux/kernel.h>
>> -#include <linux/module.h>
>> -#include <linux/init.h>
>> -#include <linux/moduleparam.h>
>> -#include <linux/cpuidle.h>
>> -#include <linux/cpu.h>
>> -#include <linux/notifier.h>
>> -
>> -#include <asm/paca.h>
>> -#include <asm/reg.h>
>> -#include <asm/machdep.h>
>> -#include <asm/firmware.h>
>> -#include <asm/runlatch.h>
>> -#include <asm/plpar_wrappers.h>
>> -
>> -struct cpuidle_driver pseries_idle_driver = {
>> -	.name             = "pseries_idle",
>> -	.owner            = THIS_MODULE,
>> -};
>> -
>> -#define MAX_IDLE_STATE_COUNT	2
>> -
>> -static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
>> -static struct cpuidle_device __percpu *pseries_cpuidle_devices;
>> -static struct cpuidle_state *cpuidle_state_table;
>> -
>> -static inline void idle_loop_prolog(unsigned long *in_purr)
>> -{
>> -	*in_purr = mfspr(SPRN_PURR);
>> -	/*
>> -	 * Indicate to the HV that we are idle. Now would be
>> -	 * a good time to find other work to dispatch.
>> -	 */
>> -	get_lppaca()->idle = 1;
>> -}
>> -
>> -static inline void idle_loop_epilog(unsigned long in_purr)
>> -{
>> -	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
>> -	get_lppaca()->idle = 0;
>> -}
>> -
>> -static int snooze_loop(struct cpuidle_device *dev,
>> -			struct cpuidle_driver *drv,
>> -			int index)
>> -{
>> -	unsigned long in_purr;
>> -	int cpu = dev->cpu;
>> -
>> -	idle_loop_prolog(&in_purr);
>> -	local_irq_enable();
>> -	set_thread_flag(TIF_POLLING_NRFLAG);
>> -
>> -	while ((!need_resched()) && cpu_online(cpu)) {
>> -		ppc64_runlatch_off();
>> -		HMT_low();
>> -		HMT_very_low();
>> -	}
>> -
>> -	HMT_medium();
>> -	clear_thread_flag(TIF_POLLING_NRFLAG);
>> -	smp_mb();
>> -
>> -	idle_loop_epilog(in_purr);
>> -
>> -	return index;
>> -}
>> -
>> -static void check_and_cede_processor(void)
>> -{
>> -	/*
>> -	 * Ensure our interrupt state is properly tracked,
>> -	 * also checks if no interrupt has occurred while we
>> -	 * were soft-disabled
>> -	 */
>> -	if (prep_irq_for_idle()) {
>> -		cede_processor();
>> -#ifdef CONFIG_TRACE_IRQFLAGS
>> -		/* Ensure that H_CEDE returns with IRQs on */
>> -		if (WARN_ON(!(mfmsr() & MSR_EE)))
>> -			__hard_irq_enable();
>> -#endif
>> -	}
>> -}
>> -
>> -static int dedicated_cede_loop(struct cpuidle_device *dev,
>> -				struct cpuidle_driver *drv,
>> -				int index)
>> -{
>> -	unsigned long in_purr;
>> -
>> -	idle_loop_prolog(&in_purr);
>> -	get_lppaca()->donate_dedicated_cpu = 1;
>> -
>> -	ppc64_runlatch_off();
>> -	HMT_medium();
>> -	check_and_cede_processor();
>> -
>> -	get_lppaca()->donate_dedicated_cpu = 0;
>> -
>> -	idle_loop_epilog(in_purr);
>> -
>> -	return index;
>> -}
>> -
>> -static int shared_cede_loop(struct cpuidle_device *dev,
>> -			struct cpuidle_driver *drv,
>> -			int index)
>> -{
>> -	unsigned long in_purr;
>> -
>> -	idle_loop_prolog(&in_purr);
>> -
>> -	/*
>> -	 * Yield the processor to the hypervisor.  We return if
>> -	 * an external interrupt occurs (which are driven prior
>> -	 * to returning here) or if a prod occurs from another
>> -	 * processor. When returning here, external interrupts
>> -	 * are enabled.
>> -	 */
>> -	check_and_cede_processor();
>> -
>> -	idle_loop_epilog(in_purr);
>> -
>> -	return index;
>> -}
>> -
>> -/*
>> - * States for dedicated partition case.
>> - */
>> -static struct cpuidle_state dedicated_states[MAX_IDLE_STATE_COUNT] = {
>> -	{ /* Snooze */
>> -		.name = "snooze",
>> -		.desc = "snooze",
>> -		.flags = CPUIDLE_FLAG_TIME_VALID,
>> -		.exit_latency = 0,
>> -		.target_residency = 0,
>> -		.enter = &snooze_loop },
>> -	{ /* CEDE */
>> -		.name = "CEDE",
>> -		.desc = "CEDE",
>> -		.flags = CPUIDLE_FLAG_TIME_VALID,
>> -		.exit_latency = 10,
>> -		.target_residency = 100,
>> -		.enter = &dedicated_cede_loop },
>> -};
>> -
>> -/*
>> - * States for shared partition case.
>> - */
>> -static struct cpuidle_state shared_states[MAX_IDLE_STATE_COUNT] = {
>> -	{ /* Shared Cede */
>> -		.name = "Shared Cede",
>> -		.desc = "Shared Cede",
>> -		.flags = CPUIDLE_FLAG_TIME_VALID,
>> -		.exit_latency = 0,
>> -		.target_residency = 0,
>> -		.enter = &shared_cede_loop },
>> -};
>> -
>> -void update_smt_snooze_delay(int cpu, int residency)
>> -{
>> -	struct cpuidle_driver *drv = cpuidle_get_driver();
>> -	struct cpuidle_device *dev = per_cpu(cpuidle_devices, cpu);
>> -
>> -	if (cpuidle_state_table != dedicated_states)
>> -		return;
>> -
>> -	if (residency < 0) {
>> -		/* Disable the Nap state on that cpu */
>> -		if (dev)
>> -			dev->states_usage[1].disable = 1;
>> -	} else
>> -		if (drv)
>> -			drv->states[1].target_residency = residency;
>> -}
>> -
>> -static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n,
>> -			unsigned long action, void *hcpu)
>> -{
>> -	int hotcpu = (unsigned long)hcpu;
>> -	struct cpuidle_device *dev =
>> -			per_cpu_ptr(pseries_cpuidle_devices, hotcpu);
>> -
>> -	if (dev && cpuidle_get_driver()) {
>> -		switch (action) {
>> -		case CPU_ONLINE:
>> -		case CPU_ONLINE_FROZEN:
>> -			cpuidle_pause_and_lock();
>> -			cpuidle_enable_device(dev);
>> -			cpuidle_resume_and_unlock();
>> -			break;
>> -
>> -		case CPU_DEAD:
>> -		case CPU_DEAD_FROZEN:
>> -			cpuidle_pause_and_lock();
>> -			cpuidle_disable_device(dev);
>> -			cpuidle_resume_and_unlock();
>> -			break;
>> -
>> -		default:
>> -			return NOTIFY_DONE;
>> -		}
>> -	}
>> -	return NOTIFY_OK;
>> -}
>> -
>> -static struct notifier_block setup_hotplug_notifier = {
>> -	.notifier_call = pseries_cpuidle_add_cpu_notifier,
>> -};
>> -
>> -/*
>> - * pseries_cpuidle_driver_init()
>> - */
>> -static int pseries_cpuidle_driver_init(void)
>> -{
>> -	int idle_state;
>> -	struct cpuidle_driver *drv = &pseries_idle_driver;
>> -
>> -	drv->state_count = 0;
>> -
>> -	for (idle_state = 0; idle_state < MAX_IDLE_STATE_COUNT; ++idle_state) {
>> -
>> -		if (idle_state > max_idle_state)
>> -			break;
>> -
>> -		/* is the state not enabled? */
>> -		if (cpuidle_state_table[idle_state].enter == NULL)
>> -			continue;
>> -
>> -		drv->states[drv->state_count] =	/* structure copy */
>> -			cpuidle_state_table[idle_state];
>> -
>> -		drv->state_count += 1;
>> -	}
>> -
>> -	return 0;
>> -}
>> -
>> -/* pseries_idle_devices_uninit(void)
>> - * unregister cpuidle devices and de-allocate memory
>> - */
>> -static void pseries_idle_devices_uninit(void)
>> -{
>> -	int i;
>> -	struct cpuidle_device *dev;
>> -
>> -	for_each_possible_cpu(i) {
>> -		dev = per_cpu_ptr(pseries_cpuidle_devices, i);
>> -		cpuidle_unregister_device(dev);
>> -	}
>> -
>> -	free_percpu(pseries_cpuidle_devices);
>> -	return;
>> -}
>> -
>> -/* pseries_idle_devices_init()
>> - * allocate, initialize and register cpuidle device
>> - */
>> -static int pseries_idle_devices_init(void)
>> -{
>> -	int i;
>> -	struct cpuidle_driver *drv = &pseries_idle_driver;
>> -	struct cpuidle_device *dev;
>> -
>> -	pseries_cpuidle_devices = alloc_percpu(struct cpuidle_device);
>> -	if (pseries_cpuidle_devices == NULL)
>> -		return -ENOMEM;
>> -
>> -	for_each_possible_cpu(i) {
>> -		dev = per_cpu_ptr(pseries_cpuidle_devices, i);
>> -		dev->state_count = drv->state_count;
>> -		dev->cpu = i;
>> -		if (cpuidle_register_device(dev)) {
>> -			printk(KERN_DEBUG \
>> -				"cpuidle_register_device %d failed!\n", i);
>> -			return -EIO;
>> -		}
>> -	}
>> -
>> -	return 0;
>> -}
>> -
>> -/*
>> - * pseries_idle_probe()
>> - * Choose state table for shared versus dedicated partition
>> - */
>> -static int pseries_idle_probe(void)
>> -{
>> -
>> -	if (!firmware_has_feature(FW_FEATURE_SPLPAR))
>> -		return -ENODEV;
>> -
>> -	if (cpuidle_disable != IDLE_NO_OVERRIDE)
>> -		return -ENODEV;
>> -
>> -	if (max_idle_state == 0) {
>> -		printk(KERN_DEBUG "pseries processor idle disabled.\n");
>> -		return -EPERM;
>> -	}
>> -
>> -	if (get_lppaca()->shared_proc)
>> -		cpuidle_state_table = shared_states;
>> -	else
>> -		cpuidle_state_table = dedicated_states;
>> -
>> -	return 0;
>> -}
>> -
>> -static int __init pseries_processor_idle_init(void)
>> -{
>> -	int retval;
>> -
>> -	retval = pseries_idle_probe();
>> -	if (retval)
>> -		return retval;
>> -
>> -	pseries_cpuidle_driver_init();
>> -	retval = cpuidle_register_driver(&pseries_idle_driver);
>> -	if (retval) {
>> -		printk(KERN_DEBUG "Registration of pseries driver failed.\n");
>> -		return retval;
>> -	}
>> -
>> -	retval = pseries_idle_devices_init();
>> -	if (retval) {
>> -		pseries_idle_devices_uninit();
>> -		cpuidle_unregister_driver(&pseries_idle_driver);
>> -		return retval;
>> -	}
>> -
>> -	register_cpu_notifier(&setup_hotplug_notifier);
>> -	printk(KERN_DEBUG "pseries_idle_driver registered\n");
>> -
>> -	return 0;
>> -}
>> -
>> -static void __exit pseries_processor_idle_exit(void)
>> -{
>> -
>> -	unregister_cpu_notifier(&setup_hotplug_notifier);
>> -	pseries_idle_devices_uninit();
>> -	cpuidle_unregister_driver(&pseries_idle_driver);
>> -
>> -	return;
>> -}
>> -
>> -module_init(pseries_processor_idle_init);
>> -module_exit(pseries_processor_idle_exit);
>> -
>> -MODULE_AUTHOR("Deepthi Dharwar <deepthi@linux.vnet.ibm.com>");
>> -MODULE_DESCRIPTION("Cpuidle driver for POWER");
>> -MODULE_LICENSE("GPL");
>> diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
>> index 0e2cd5c..53ce03d 100644
>> --- a/drivers/cpuidle/Kconfig
>> +++ b/drivers/cpuidle/Kconfig
>> @@ -42,6 +42,13 @@ config CPU_IDLE_ZYNQ
>>  	help
>>  	  Select this to enable cpuidle on Xilinx Zynq processors.
>>  
>> +config CPU_IDLE_POWERPC
>> +	bool "CPU Idle driver for POWERPC platforms"
>> +	depends on PPC_PSERIES || PPC_POWERNV
>> +	default y
>> +        help
>> +          Select this option to enable processor idle state management
>> +	  for POWERPC platform.
>>  endif
>>  
>>  config ARCH_NEEDS_CPU_IDLE_COUPLED
>> diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile
>> index 8767a7b..d12e205 100644
>> --- a/drivers/cpuidle/Makefile
>> +++ b/drivers/cpuidle/Makefile
>> @@ -8,3 +8,5 @@ obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o
>>  obj-$(CONFIG_CPU_IDLE_CALXEDA) += cpuidle-calxeda.o
>>  obj-$(CONFIG_ARCH_KIRKWOOD) += cpuidle-kirkwood.o
>>  obj-$(CONFIG_CPU_IDLE_ZYNQ) += cpuidle-zynq.o
>> +
>> +obj-$(CONFIG_CPU_IDLE_POWERPC) += cpuidle-powerpc.o
>> diff --git a/drivers/cpuidle/cpuidle-powerpc.c b/drivers/cpuidle/cpuidle-powerpc.c
>> new file mode 100644
>> index 0000000..3662aba
>> --- /dev/null
>> +++ b/drivers/cpuidle/cpuidle-powerpc.c
>> @@ -0,0 +1,304 @@
>> +/*
>> + *  processor_idle - idle state cpuidle driver.
>> + *  Adapted from drivers/idle/intel_idle.c and
>> + *  drivers/acpi/processor_idle.c
>> + *
>> + */
>> +
>> +#include <linux/kernel.h>
>> +#include <linux/module.h>
>> +#include <linux/init.h>
>> +#include <linux/moduleparam.h>
>> +#include <linux/cpuidle.h>
>> +#include <linux/cpu.h>
>> +#include <linux/notifier.h>
>> +
>> +#include <asm/paca.h>
>> +#include <asm/reg.h>
>> +#include <asm/machdep.h>
>> +#include <asm/firmware.h>
>> +#include <asm/runlatch.h>
>> +#include <asm/plpar_wrappers.h>
>> +
>> +struct cpuidle_driver powerpc_idle_driver = {
>> +	.name             = "powerpc_idle",
>> +	.owner            = THIS_MODULE,
>> +};
>> +
>> +#define MAX_IDLE_STATE_COUNT	2
>> +
>> +static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
>> +static struct cpuidle_state *cpuidle_state_table;
>> +
>> +static inline void idle_loop_prolog(unsigned long *in_purr)
>> +{
>> +	*in_purr = mfspr(SPRN_PURR);
>> +	/*
>> +	 * Indicate to the HV that we are idle. Now would be
>> +	 * a good time to find other work to dispatch.
>> +	 */
>> +	set_lppaca_idle(1);
>> +}
>> +
>> +static inline void idle_loop_epilog(unsigned long in_purr)
>> +{
>> +	add_lppaca_wait_state(mfspr(SPRN_PURR) - in_purr);
>> +	set_lppaca_idle(0);
>> +}
>> +
>> +static int snooze_loop(struct cpuidle_device *dev,
>> +			struct cpuidle_driver *drv,
>> +			int index)
>> +{
>> +	unsigned long in_purr;
>> +
>> +	idle_loop_prolog(&in_purr);
>> +	local_irq_enable();
>> +	set_thread_flag(TIF_POLLING_NRFLAG);
>> +
>> +	while (!need_resched()) {
>> +		ppc64_runlatch_off();
>> +		HMT_low();
>> +		HMT_very_low();
>> +	}
>> +
>> +	HMT_medium();
>> +	clear_thread_flag(TIF_POLLING_NRFLAG);
>> +	smp_mb();
>> +
>> +	idle_loop_epilog(in_purr);
>> +
>> +	return index;
>> +}
>> +
>> +static void check_and_cede_processor(void)
>> +{
>> +	/*
>> +	 * Ensure our interrupt state is properly tracked,
>> +	 * also checks if no interrupt has occurred while we
>> +	 * were soft-disabled
>> +	 */
>> +	if (prep_irq_for_idle()) {
>> +		cede_processor();
>> +#ifdef CONFIG_TRACE_IRQFLAGS
>> +		/* Ensure that H_CEDE returns with IRQs on */
>> +		if (WARN_ON(!(mfmsr() & MSR_EE)))
>> +			__hard_irq_enable();
>> +#endif
>> +	}
>> +}
>> +
>> +static int dedicated_cede_loop(struct cpuidle_device *dev,
>> +				struct cpuidle_driver *drv,
>> +				int index)
>> +{
>> +	unsigned long in_purr;
>> +
>> +	idle_loop_prolog(&in_purr);
>> +	set_lppaca_donate_dedicated_cpu(1);
>> +
>> +	ppc64_runlatch_off();
>> +	HMT_medium();
>> +	check_and_cede_processor();
>> +
>> +	set_lppaca_donate_dedicated_cpu(0);
>> +	idle_loop_epilog(in_purr);
>> +
>> +	return index;
>> +}
>> +
>> +static int shared_cede_loop(struct cpuidle_device *dev,
>> +			struct cpuidle_driver *drv,
>> +			int index)
>> +{
>> +	unsigned long in_purr;
>> +
>> +	idle_loop_prolog(&in_purr);
>> +
>> +	/*
>> +	 * Yield the processor to the hypervisor.  We return if
>> +	 * an external interrupt occurs (which are driven prior
>> +	 * to returning here) or if a prod occurs from another
>> +	 * processor. When returning here, external interrupts
>> +	 * are enabled.
>> +	 */
>> +	check_and_cede_processor();
>> +
>> +	idle_loop_epilog(in_purr);
>> +
>> +	return index;
>> +}
>> +
>> +/*
>> + * States for dedicated partition case.
>> + */
>> +static struct cpuidle_state dedicated_states[MAX_IDLE_STATE_COUNT] = {
>> +	{ /* Snooze */
>> +		.name = "snooze",
>> +		.desc = "snooze",
>> +		.flags = CPUIDLE_FLAG_TIME_VALID,
>> +		.exit_latency = 0,
>> +		.target_residency = 0,
>> +		.enter = &snooze_loop },
>> +	{ /* CEDE */
>> +		.name = "CEDE",
>> +		.desc = "CEDE",
>> +		.flags = CPUIDLE_FLAG_TIME_VALID,
>> +		.exit_latency = 10,
>> +		.target_residency = 100,
>> +		.enter = &dedicated_cede_loop },
>> +};
>> +
>> +/*
>> + * States for shared partition case.
>> + */
>> +static struct cpuidle_state shared_states[MAX_IDLE_STATE_COUNT] = {
>> +	{ /* Shared Cede */
>> +		.name = "Shared Cede",
>> +		.desc = "Shared Cede",
>> +		.flags = CPUIDLE_FLAG_TIME_VALID,
>> +		.exit_latency = 0,
>> +		.target_residency = 0,
>> +		.enter = &shared_cede_loop },
>> +};
>> +
>> +void update_smt_snooze_delay(int cpu, int residency)
>> +{
>> +	struct cpuidle_driver *drv = cpuidle_get_driver();
>> +	struct cpuidle_device *dev = per_cpu(cpuidle_devices, cpu);
>> +
>> +	if (cpuidle_state_table != dedicated_states)
>> +		return;
>> +
>> +	if (residency < 0) {
>> +		/* Disable the Nap state on that cpu */
>> +		if (dev)
>> +			dev->states_usage[1].disable = 1;
>> +	} else
>> +		if (drv)
>> +			drv->states[1].target_residency = residency;
>> +}
>> +
>> +static int powerpc_cpuidle_add_cpu_notifier(struct notifier_block *n,
>> +			unsigned long action, void *hcpu)
>> +{
>> +	int hotcpu = (unsigned long)hcpu;
>> +	struct cpuidle_device *dev =
>> +			per_cpu_ptr(cpuidle_devices, hotcpu);
>> +
>> +	if (dev && cpuidle_get_driver()) {
>> +		switch (action) {
>> +		case CPU_ONLINE:
>> +		case CPU_ONLINE_FROZEN:
>> +			cpuidle_pause_and_lock();
>> +			cpuidle_enable_device(dev);
>> +			cpuidle_resume_and_unlock();
>> +			break;
>> +
>> +		case CPU_DEAD:
>> +		case CPU_DEAD_FROZEN:
>> +			cpuidle_pause_and_lock();
>> +			cpuidle_disable_device(dev);
>> +			cpuidle_resume_and_unlock();
>> +			break;
>> +
>> +		default:
>> +			return NOTIFY_DONE;
>> +		}
>> +	}
>> +	return NOTIFY_OK;
>> +}
>> +
>> +static struct notifier_block setup_hotplug_notifier = {
>> +	.notifier_call = powerpc_cpuidle_add_cpu_notifier,
>> +};
>> +
>> +/*
>> + * powerpc_cpuidle_driver_init()
>> + */
>> +static int powerpc_cpuidle_driver_init(void)
>> +{
>> +	int idle_state;
>> +	struct cpuidle_driver *drv = &powerpc_idle_driver;
>> +
>> +	drv->state_count = 0;
>> +
>> +	for (idle_state = 0; idle_state < MAX_IDLE_STATE_COUNT; ++idle_state) {
>> +
>> +		if (idle_state > max_idle_state)
>> +			break;
>> +
>> +		/* is the state not enabled? */
>> +		if (cpuidle_state_table[idle_state].enter == NULL)
>> +			continue;
>> +
>> +		drv->states[drv->state_count] =	/* structure copy */
>> +			cpuidle_state_table[idle_state];
>> +
>> +		drv->state_count += 1;
>> +	}
>> +
>> +	return 0;
>> +}
>> +
>> +/*
>> + * powerpc_idle_probe()
>> + * Choose state table for shared versus dedicated partition
>> + */
>> +static int powerpc_idle_probe(void)
>> +{
>> +
>> +	if (cpuidle_disable != IDLE_NO_OVERRIDE)
>> +		return -ENODEV;
>> +
>> +	if (max_idle_state == 0) {
>> +		printk(KERN_DEBUG "powerpc processor idle disabled.\n");
>> +		return -EPERM;
>> +	}
>> +
>> +	if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
>> +		if (get_lppaca_is_shared_proc() == 1)
>> +			cpuidle_state_table = shared_states;
>> +		else if (get_lppaca_is_shared_proc() == 0)
>> +			cpuidle_state_table = dedicated_states;
>> +	} else
>> +		return -ENODEV;
>> +
>> +	return 0;
>> +}
>> +
>> +static int __init powerpc_processor_idle_init(void)
>> +{
>> +	int retval;
>> +
>> +	retval = powerpc_idle_probe();
>> +	if (retval)
>> +		return retval;
>> +
>> +	powerpc_cpuidle_driver_init();
>> +	retval = cpuidle_register(&powerpc_idle_driver, NULL);
>> +	if (retval) {
>> +		printk(KERN_DEBUG "Registration of powerpc driver failed.\n");
>> +		return retval;
>> +	}
>> +
>> +	register_cpu_notifier(&setup_hotplug_notifier);
>> +	printk(KERN_DEBUG "powerpc_idle_driver registered\n");
>> +
>> +	return 0;
>> +}
>> +
>> +static void __exit powerpc_processor_idle_exit(void)
>> +{
>> +
>> +	unregister_cpu_notifier(&setup_hotplug_notifier);
>> +	cpuidle_unregister(&powerpc_idle_driver);
>> +	return;
>> +}
>> +
>> +module_init(powerpc_processor_idle_init);
>> +module_exit(powerpc_processor_idle_exit);
>> +
>> +MODULE_AUTHOR("Deepthi Dharwar <deepthi@linux.vnet.ibm.com>");
>> +MODULE_DESCRIPTION("Cpuidle driver for powerpc");
>> +MODULE_LICENSE("GPL");
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 
> 

^ permalink raw reply

* Re: [PATCH V5 3/5] POWER/cpuidle: Generic IBM-POWER backend cpuidle driver.
From: Deepthi Dharwar @ 2013-08-23 10:32 UTC (permalink / raw)
  To: Wang Dongsheng-B40534
  Cc: Wood Scott-B07421, daniel.lezcano@linaro.org,
	linux-kernel@vger.kernel.org, preeti@linux.vnet.ibm.com,
	linux-pm@lists.linux-foundation.org,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <ABB05CD9C9F68C46A5CEDC7F154392590102822A@039-SN2MPN1-021.039d.mgd.msft.net>

On 08/23/2013 08:46 AM, Wang Dongsheng-B40534 wrote:
> 
>> diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
>> index 0e2cd5c..e805dcd 100644
>> --- a/drivers/cpuidle/Kconfig
>> +++ b/drivers/cpuidle/Kconfig
> 
> Maybe drivers/cpuidle/Kconfig.powerpc is better? Like arm.
> 

Yes will do that, going ahead other powerpc archs can use this Kconfig.

>> +obj-$(CONFIG_CPU_IDLE_IBM_POWER) += cpuidle-ibm-power.o
>> diff --git a/drivers/cpuidle/cpuidle-ibm-power.c
>> b/drivers/cpuidle/cpuidle-ibm-power.c
>> new file mode 100644
>> index 0000000..4ee5a94
>> --- /dev/null
>> +++ b/drivers/cpuidle/cpuidle-ibm-power.c
>> @@ -0,0 +1,304 @@
>> +/*
>> + *  cpuidle-ibm-power - idle state cpuidle driver.
>> + *  Adapted from drivers/idle/intel_idle.c and
>> + *  drivers/acpi/processor_idle.c
>> + *
>> + */
>> +
>> +#include <linux/kernel.h>
>> +#include <linux/module.h>
>> +#include <linux/init.h>
>> +#include <linux/moduleparam.h>
>> +#include <linux/cpuidle.h>
>> +#include <linux/cpu.h>
>> +#include <linux/notifier.h>
>> +
>> +#include <asm/paca.h>
>> +#include <asm/reg.h>
>> +#include <asm/machdep.h>
>> +#include <asm/firmware.h>
>> +#include <asm/runlatch.h>
>> +#include <asm/plpar_wrappers.h>
>> +
>> +struct cpuidle_driver power_idle_driver = {
>> +	.name             = "IBM-POWER-Idle",
>> +	.owner            = THIS_MODULE,
>> +};
>> +
>> +#define MAX_IDLE_STATE_COUNT	2
>> +
>> +static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
> 
> Again, do not use the macro.
> 

Yes, shall use ARRAY_SIZE instead and get away with this macro.
That should work


>> +static struct cpuidle_state *cpuidle_state_table;
>> +
>> +static inline void idle_loop_prolog(unsigned long *in_purr)
>> +{
>> +	*in_purr = mfspr(SPRN_PURR);
>> +	/*
>> +	 * Indicate to the HV that we are idle. Now would be
>> +	 * a good time to find other work to dispatch.
>> +	 */
>> +	get_lppaca()->idle = 1;
>> +}
>> +
>> +static inline void idle_loop_epilog(unsigned long in_purr)
>> +{
>> +	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
>> +	get_lppaca()->idle = 0;
>> +}
>> +
>> +static int snooze_loop(struct cpuidle_device *dev,
>> +			struct cpuidle_driver *drv,
>> +			int index)
>> +{
>> +	unsigned long in_purr;
>> +
>> +	idle_loop_prolog(&in_purr);
>> +	local_irq_enable();
> 
> snooze_loop has already registered in cpuidle framework to handle snooze state.
> where disable the irq? Why do "enable" here?
> 

On POWER, snooze state is an infinte busy looping state. The CPUs keep
looping around lowering their priority until they are interrupted. For
this we need to enable irqs in the snooze loop. There is no way a CPU
can come out this state if the interrupts are not enabled.


>> +/*
>> + * States for dedicated partition case.
>> + */
>> +static struct cpuidle_state dedicated_states[MAX_IDLE_STATE_COUNT] = {
>> +	{ /* Snooze */
>> +		.name = "snooze",
>> +		.desc = "snooze",
>> +		.flags = CPUIDLE_FLAG_TIME_VALID,
>> +		.exit_latency = 0,
>> +		.target_residency = 0,
>> +		.enter = &snooze_loop },
>> +	{ /* CEDE */
>> +		.name = "CEDE",
>> +		.desc = "CEDE",
>> +		.flags = CPUIDLE_FLAG_TIME_VALID,
>> +		.exit_latency = 10,
>> +		.target_residency = 100,
>> +		.enter = &dedicated_cede_loop },
>> +};
>> +
>> +/*
>> + * States for shared partition case.
>> + */
>> +static struct cpuidle_state shared_states[MAX_IDLE_STATE_COUNT] = {
>> +	{ /* Shared Cede */
>> +		.name = "Shared Cede",
>> +		.desc = "Shared Cede",
>> +		.flags = CPUIDLE_FLAG_TIME_VALID,
>> +		.exit_latency = 0,
>> +		.target_residency = 0,
>> +		.enter = &shared_cede_loop },
>> +};
>> +
>> +static void __exit power_processor_idle_exit(void)
>> +{
>> +
>> +	unregister_cpu_notifier(&setup_hotplug_notifier);
> 
> Remove a blank line.
> 
>> +	cpuidle_unregister(&power_idle_driver);
>> +	return;
>> +}
>> +
>> +module_init(power_processor_idle_init);
>> +module_exit(power_processor_idle_exit);
>> +
> 
> Did you have tested the module? If not tested, please don't use the module.
> 
We do want to make it a module. But for now that cannot be done due to
some other dependencies. This feature needs to be built in.

Thanks for the review.


>> +MODULE_AUTHOR("Deepthi Dharwar <deepthi@linux.vnet.ibm.com>");
>> +MODULE_DESCRIPTION("Cpuidle driver for IBM POWER platforms");
>> +MODULE_LICENSE("GPL");
>>
> 
Regards,
Deepthi

^ permalink raw reply

* Re: [PATCH V5 3/5] POWER/cpuidle: Generic IBM-POWER backend cpuidle driver.
From: Deepthi Dharwar @ 2013-08-23 11:55 UTC (permalink / raw)
  To: Wang Dongsheng-B40534
  Cc: Wood Scott-B07421, daniel.lezcano@linaro.org,
	linux-kernel@vger.kernel.org, preeti@linux.vnet.ibm.com,
	linux-pm@lists.linux-foundation.org,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <ABB05CD9C9F68C46A5CEDC7F154392590102822A@039-SN2MPN1-021.039d.mgd.msft.net>

On 08/23/2013 08:46 AM, Wang Dongsheng-B40534 wrote:
> 
>> diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
>> index 0e2cd5c..e805dcd 100644
>> --- a/drivers/cpuidle/Kconfig
>> +++ b/drivers/cpuidle/Kconfig
> 
> Maybe drivers/cpuidle/Kconfig.powerpc is better? Like arm.
> 
>> +obj-$(CONFIG_CPU_IDLE_IBM_POWER) += cpuidle-ibm-power.o
>> diff --git a/drivers/cpuidle/cpuidle-ibm-power.c
>> b/drivers/cpuidle/cpuidle-ibm-power.c
>> new file mode 100644
>> index 0000000..4ee5a94
>> --- /dev/null
>> +++ b/drivers/cpuidle/cpuidle-ibm-power.c
>> @@ -0,0 +1,304 @@
>> +/*
>> + *  cpuidle-ibm-power - idle state cpuidle driver.
>> + *  Adapted from drivers/idle/intel_idle.c and
>> + *  drivers/acpi/processor_idle.c
>> + *
>> + */
>> +
>> +#include <linux/kernel.h>
>> +#include <linux/module.h>
>> +#include <linux/init.h>
>> +#include <linux/moduleparam.h>
>> +#include <linux/cpuidle.h>
>> +#include <linux/cpu.h>
>> +#include <linux/notifier.h>
>> +
>> +#include <asm/paca.h>
>> +#include <asm/reg.h>
>> +#include <asm/machdep.h>
>> +#include <asm/firmware.h>
>> +#include <asm/runlatch.h>
>> +#include <asm/plpar_wrappers.h>
>> +
>> +struct cpuidle_driver power_idle_driver = {
>> +	.name             = "IBM-POWER-Idle",
>> +	.owner            = THIS_MODULE,
>> +};
>> +
>> +#define MAX_IDLE_STATE_COUNT	2
>> +
>> +static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
> 
> Again, do not use the macro.

Wanting to re-use CPUIDLE_STATE_MAX macro, defined in linux/cpuidle.h
similar to what x86 uses. This is def scalable for various platforms ,
as demonstrated in drivers/idle/intel_idle.c

 >
>> +static struct cpuidle_state *cpuidle_state_table;
>> +
>> +static inline void idle_loop_prolog(unsigned long *in_purr)
>> +{
>> +	*in_purr = mfspr(SPRN_PURR);
>> +	/*
>> +	 * Indicate to the HV that we are idle. Now would be
>> +	 * a good time to find other work to dispatch.
>> +	 */
>> +	get_lppaca()->idle = 1;
>> +}
>> +
>> +static inline void idle_loop_epilog(unsigned long in_purr)
>> +{
>> +	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
>> +	get_lppaca()->idle = 0;
>> +}
>> +
>> +static int snooze_loop(struct cpuidle_device *dev,
>> +			struct cpuidle_driver *drv,
>> +			int index)
>> +{
>> +	unsigned long in_purr;
>> +
>> +	idle_loop_prolog(&in_purr);
>> +	local_irq_enable();
> 
> snooze_loop has already registered in cpuidle framework to handle snooze state.
> where disable the irq? Why do "enable" here?
> 
>> +/*
>> + * States for dedicated partition case.
>> + */
>> +static struct cpuidle_state dedicated_states[MAX_IDLE_STATE_COUNT] = {
>> +	{ /* Snooze */
>> +		.name = "snooze",
>> +		.desc = "snooze",
>> +		.flags = CPUIDLE_FLAG_TIME_VALID,
>> +		.exit_latency = 0,
>> +		.target_residency = 0,
>> +		.enter = &snooze_loop },
>> +	{ /* CEDE */
>> +		.name = "CEDE",
>> +		.desc = "CEDE",
>> +		.flags = CPUIDLE_FLAG_TIME_VALID,
>> +		.exit_latency = 10,
>> +		.target_residency = 100,
>> +		.enter = &dedicated_cede_loop },
>> +};
>> +
>> +/*
>> + * States for shared partition case.
>> + */
>> +static struct cpuidle_state shared_states[MAX_IDLE_STATE_COUNT] = {
>> +	{ /* Shared Cede */
>> +		.name = "Shared Cede",
>> +		.desc = "Shared Cede",
>> +		.flags = CPUIDLE_FLAG_TIME_VALID,
>> +		.exit_latency = 0,
>> +		.target_residency = 0,
>> +		.enter = &shared_cede_loop },
>> +};
>> +
>> +static void __exit power_processor_idle_exit(void)
>> +{
>> +
>> +	unregister_cpu_notifier(&setup_hotplug_notifier);
> 
> Remove a blank line.
> 
>> +	cpuidle_unregister(&power_idle_driver);
>> +	return;
>> +}
>> +
>> +module_init(power_processor_idle_init);
>> +module_exit(power_processor_idle_exit);
>> +
> 
> Did you have tested the module? If not tested, please don't use the module.
> 
>> +MODULE_AUTHOR("Deepthi Dharwar <deepthi@linux.vnet.ibm.com>");
>> +MODULE_DESCRIPTION("Cpuidle driver for IBM POWER platforms");
>> +MODULE_LICENSE("GPL");
>>
> 

^ permalink raw reply

* Re: [PATCH v5 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
From: Mark Rutland @ 2013-08-23 12:44 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	lars@metafoo.de, Mike Turquette, ian.campbell@citrix.com,
	Pawel Moll, swarren@wwwdotorg.org, festevam@gmail.com,
	Nicolin Chen, Tomasz Figa, rob.herring@calxeda.com,
	timur@tabi.org, broonie@kernel.org, p.zabel@pengutronix.de,
	galak@codeaurora.org, shawn.guo@linaro.org,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20130822210035.GB31036@pengutronix.de>

On Thu, Aug 22, 2013 at 10:00:35PM +0100, Sascha Hauer wrote:
> On Thu, Aug 22, 2013 at 01:09:31PM +0100, Mark Rutland wrote:
> > On Thu, Aug 22, 2013 at 08:19:10AM +0100, Mike Turquette wrote:
> > > Quoting Tomasz Figa (2013-08-21 14:34:55)
> > > > On Wednesday 21 of August 2013 09:50:15 Mark Rutland wrote:
> > > > > On Tue, Aug 20, 2013 at 01:06:25AM +0100, Mike Turquette wrote:
> > > > > > Quoting Mark Rutland (2013-08-19 02:35:43)
> > > > > > 
> > > > > > > On Sat, Aug 17, 2013 at 04:17:18PM +0100, Tomasz Figa wrote:
> > > > > > > > On Saturday 17 of August 2013 16:53:16 Sascha Hauer wrote:
> > > > > > > > > On Sat, Aug 17, 2013 at 02:28:04PM +0200, Tomasz Figa wrote:
> > > > > > > > > > > > > Also I would make this option required. Use a dummy
> > > > > > > > > > > > > clock for
> > > > > > > > > > > > > mux
> > > > > > > > > > > > > inputs that are grounded for a specific SoC.
> > > > > > > > > > > > 
> > > > > > > > > > > > Some clocks are not from CCM and we haven't defined in
> > > > > > > > > > > > imx6q-clk.txt,
> > > > > > > > > > > > so in most cases we can't provide a phandle for them, eg:
> > > > > > > > > > > > spdif_ext.
> > > > > > > > > > > > I think it's a bit hard to force it to be 'required'. An
> > > > > > > > > > > > 'optional'
> > > > > > > > > > > > looks more flexible to me and a default one is ensured
> > > > > > > > > > > > even if
> > > > > > > > > > > > it's
> > > > > > > > > > > > missing.
> > > > > > > > > > > 
> > > > > > > > > > > <&clks 0> is the dummy clock. This can be used for all input
> > > > > > > > > > > clocks
> > > > > > > > > > > not
> > > > > > > > > > > defined by the SoC.
> > > > > > > > > > 
> > > > > > > > > > Where does this assumption come from? Is it documented
> > > > > > > > > > anywhere?
> > > > > > > > > 
> > > > > > > > > This is how all i.MX clock bindings currently are. See
> > > > > > > > > Documentation/devicetree/bindings/clock/imx*-clock.txt
> > > > > > > > 
> > > > > > > > OK, thanks.
> > > > > > > > 
> > > > > > > > I guess we need some discussion on dummy clocks vs skipped clocks.
> > > > > > > > I think we want some consistency on this, don't we?
> > > > > > > > 
> > > > > > > > If we really need a dummy clock, then we might also want a generic
> > > > > > > > way to specify it.
> > > > > > > 
> > > > > > > What do we actually mean by a "dummy clock"? We already have
> > > > > > > bindings
> > > > > > > for "fixed-clock" and co friends describe relatively simple
> > > > > > > preconfigured clocks.
> > > > > > 
> > > > > > Some platforms have a fake clock which defines noops callbacks and
> > > > > > basically doesn't do anything. This is analogous to the dummy
> > > > > > regulator
> > > > > > implementation. A central one could be registered by the clock core,
> > > > > > as
> > > > > > is done by the regulator core.
> > > > > 
> > > > > When you say some platforms, you presumably mean the platform code in
> > > > > Linux? A dummy clock sounds like a completely Linux-specific abstraction
> > > > > rather than a description of the hardware, and I don't see why we need
> > > > > that in the DT:
> > > > > 
> > > > > * If a clock is wired up and running (as presumably the dummy clock is),
> > > > > then surely it's a fixed-clock (it's running, we and we have no control
> > > > > over it, but we presumably know its rate) and can be described as such?
> > > > > 
> > > > > * If no clock is wired up, then we should be able to describe that. If a
> > > > > driver believes that a clock is required when it isn't (for some level
> > > > > of functionality), then that driver should be fixed up to support the
> > > > > clock as being optional.
> > > > > 
> > > > > Am I missing something?
> > > > 
> > > > I second that.
> > > > 
> > > > Moreover, I don't think that device tree should deal with dummy anything. 
> > > > It should be able to describe hardware that is available on given system, 
> > > > not list what hardware is not available.
> > > 
> > > I wasn't clear. The dummy clock IS a completely Linux-specific
> > > abstraction.
> > > 
> > > I'm not advocating a dummy clock in DT. I am advocating consolidation of
> > > the implementation of a clock that does nothing into the clock core.
> > > This code could easily live in drivers/clk/clk.c instead of having
> > > everyone open-code it.
> > > 
> > > As far as specifying a dummy clock in DT? I dunno. DT should describe
> > > real hardware so there isn't much use for a dummy clock.
> > 
> > 
> > Sorry, I misunderstood. Good to hear we're on the same page :)
> > 
> > > 
> > > I'm guessing one of the reasons for such a clock are drivers do not
> > > honor the clk.h api and they freak out when clk_get gives them a NULL
> > > pointer?
> > 
> > I'm not sure. Sascha, could you shed some light on the matter?
> 
> The original reason introducing the dummy clocks in the i.MX dtbs
> was to provide devices a clock which the driver requests but is
> not software controllable. We often have the case where the same
> devices are on several SoCs, but not on all of them all clocks have
> a bit to en/disable them.

So those clocks are always on at some fixed rate?

> 
> Anyway, to accomplish this we don't need dummy clocks. We can just
> describe the real clocks.

Ok.

> 
> BTW with the S/PDIF core on which not all mux inputs are connected
> to actual clocks we could also describe the unconnected inputs as
> ground clocks with rate 0. This way we describe something which
> is really there instead of dummy clocks ;)
> 
> Background to why it might be a good idea to connect a ground clock
> to the unconnected input pins is that a driver has a chance to
> successfully grab all clocks. Otherwise how does the driver distinguish
> between an unconnected and an erroneous clock?

Surely the presence of a name in "clock-names" tells you that a clock is
connected, and if not listed it's not connected? If we don't have the
infrastructure for telling apart unconnected clocks from inability to
enable/configure clocks, that's a Linux issue rather than something that
should be hacked up in the dt.

Thanks,
Mark.

^ permalink raw reply

* Re: [PATCH v5 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
From: Mark Rutland @ 2013-08-23 12:58 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	lars@metafoo.de, Mike Turquette, ian.campbell@citrix.com,
	Pawel Moll, swarren@wwwdotorg.org, festevam@gmail.com,
	Nicolin Chen, Tomasz Figa, rob.herring@calxeda.com,
	timur@tabi.org, broonie@kernel.org, p.zabel@pengutronix.de,
	galak@codeaurora.org, shawn.guo@linaro.org,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20130823063421.GF31036@pengutronix.de>

On Fri, Aug 23, 2013 at 07:34:21AM +0100, Sascha Hauer wrote:
> On Fri, Aug 23, 2013 at 12:49:19AM +0200, Tomasz Figa wrote:
> > On Thursday 22 of August 2013 15:43:31 Mike Turquette wrote:
> > > Quoting Sascha Hauer (2013-08-22 14:00:35)
> > > 
> > > > On Thu, Aug 22, 2013 at 01:09:31PM +0100, Mark Rutland wrote:
> > > > > On Thu, Aug 22, 2013 at 08:19:10AM +0100, Mike Turquette wrote:
> > > > > > Quoting Tomasz Figa (2013-08-21 14:34:55)
> > > > > > 
> > > > > > > On Wednesday 21 of August 2013 09:50:15 Mark Rutland wrote:
> > > > > > > > On Tue, Aug 20, 2013 at 01:06:25AM +0100, Mike Turquette 
> > wrote:
> > > > > > > > > Quoting Mark Rutland (2013-08-19 02:35:43)
> > > > > > > > > 
> > > > > > > > > > On Sat, Aug 17, 2013 at 04:17:18PM +0100, Tomasz Figa 
> > wrote:
> > > > > > > > > > > On Saturday 17 of August 2013 16:53:16 Sascha Hauer 
> > wrote:
> > > > > > > > > > > > On Sat, Aug 17, 2013 at 02:28:04PM +0200, Tomasz Figa 
> > wrote:
> > > > > > > > > > > > > > > > Also I would make this option required. Use a
> > > > > > > > > > > > > > > > dummy
> > > > > > > > > > > > > > > > clock for
> > > > > > > > > > > > > > > > mux
> > > > > > > > > > > > > > > > inputs that are grounded for a specific SoC.
> > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > > Some clocks are not from CCM and we haven't
> > > > > > > > > > > > > > > defined in
> > > > > > > > > > > > > > > imx6q-clk.txt,
> > > > > > > > > > > > > > > so in most cases we can't provide a phandle for
> > > > > > > > > > > > > > > them, eg:
> > > > > > > > > > > > > > > spdif_ext.
> > > > > > > > > > > > > > > I think it's a bit hard to force it to be
> > > > > > > > > > > > > > > 'required'. An
> > > > > > > > > > > > > > > 'optional'
> > > > > > > > > > > > > > > looks more flexible to me and a default one is
> > > > > > > > > > > > > > > ensured
> > > > > > > > > > > > > > > even if
> > > > > > > > > > > > > > > it's
> > > > > > > > > > > > > > > missing.
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > <&clks 0> is the dummy clock. This can be used for
> > > > > > > > > > > > > > all input
> > > > > > > > > > > > > > clocks
> > > > > > > > > > > > > > not
> > > > > > > > > > > > > > defined by the SoC.
> > > > > > > > > > > > > 
> > > > > > > > > > > > > Where does this assumption come from? Is it
> > > > > > > > > > > > > documented
> > > > > > > > > > > > > anywhere?
> > > > > > > > > > > > 
> > > > > > > > > > > > This is how all i.MX clock bindings currently are. See
> > > > > > > > > > > > Documentation/devicetree/bindings/clock/imx*-clock.txt
> > > > > > > > > > > 
> > > > > > > > > > > OK, thanks.
> > > > > > > > > > > 
> > > > > > > > > > > I guess we need some discussion on dummy clocks vs
> > > > > > > > > > > skipped clocks.
> > > > > > > > > > > I think we want some consistency on this, don't we?
> > > > > > > > > > > 
> > > > > > > > > > > If we really need a dummy clock, then we might also want
> > > > > > > > > > > a generic
> > > > > > > > > > > way to specify it.
> > > > > > > > > > 
> > > > > > > > > > What do we actually mean by a "dummy clock"? We already
> > > > > > > > > > have
> > > > > > > > > > bindings
> > > > > > > > > > for "fixed-clock" and co friends describe relatively
> > > > > > > > > > simple
> > > > > > > > > > preconfigured clocks.
> > > > > > > > > 
> > > > > > > > > Some platforms have a fake clock which defines noops
> > > > > > > > > callbacks and
> > > > > > > > > basically doesn't do anything. This is analogous to the
> > > > > > > > > dummy
> > > > > > > > > regulator
> > > > > > > > > implementation. A central one could be registered by the
> > > > > > > > > clock core,
> > > > > > > > > as
> > > > > > > > > is done by the regulator core.
> > > > > > > > 
> > > > > > > > When you say some platforms, you presumably mean the platform
> > > > > > > > code in
> > > > > > > > Linux? A dummy clock sounds like a completely Linux-specific
> > > > > > > > abstraction rather than a description of the hardware, and I
> > > > > > > > don't see why we need that in the DT:
> > > > > > > > 
> > > > > > > > * If a clock is wired up and running (as presumably the dummy
> > > > > > > > clock is), then surely it's a fixed-clock (it's running, we
> > > > > > > > and we have no control over it, but we presumably know its
> > > > > > > > rate) and can be described as such?
> > > > > > > > 
> > > > > > > > * If no clock is wired up, then we should be able to describe
> > > > > > > > that. If a driver believes that a clock is required when it
> > > > > > > > isn't (for some level of functionality), then that driver
> > > > > > > > should be fixed up to support the clock as being optional.
> > > > > > > > 
> > > > > > > > Am I missing something?
> > > > > > > 
> > > > > > > I second that.
> > > > > > > 
> > > > > > > Moreover, I don't think that device tree should deal with dummy
> > > > > > > anything. It should be able to describe hardware that is
> > > > > > > available on given system, not list what hardware is not
> > > > > > > available.
> > > > > > 
> > > > > > I wasn't clear. The dummy clock IS a completely Linux-specific
> > > > > > abstraction.
> > > > > > 
> > > > > > I'm not advocating a dummy clock in DT. I am advocating
> > > > > > consolidation of the implementation of a clock that does nothing
> > > > > > into the clock core. This code could easily live in
> > > > > > drivers/clk/clk.c instead of having everyone open-code it.
> > > > > > 
> > > > > > As far as specifying a dummy clock in DT? I dunno. DT should
> > > > > > describe
> > > > > > real hardware so there isn't much use for a dummy clock.
> > > > > 
> > > > > Sorry, I misunderstood. Good to hear we're on the same page :)
> > > > > 
> > > > > > I'm guessing one of the reasons for such a clock are drivers do
> > > > > > not
> > > > > > honor the clk.h api and they freak out when clk_get gives them a
> > > > > > NULL
> > > > > > pointer?
> > > > > 
> > > > > I'm not sure. Sascha, could you shed some light on the matter?
> > > > 
> > > > The original reason introducing the dummy clocks in the i.MX dtbs
> > > > was to provide devices a clock which the driver requests but is
> > > > not software controllable. We often have the case where the same
> > > > devices are on several SoCs, but not on all of them all clocks have
> > > > a bit to en/disable them.
> > > > 
> > > > Anyway, to accomplish this we don't need dummy clocks. We can just
> > > > describe the real clocks.
> > > 
> > > You could use a dummy clk for the Linux implementation, but the downside
> > > is that a dummy clock has a rate of 0 always and a your clocks likely
> > > have non-zero rates.
> > > 
> > > It is probably better for you define a clock which only implements the
> > > .recalc_rate callback. If the rate of this clock changes without Linux
> > > having knowledge of it you can use the CLK_GET_RATE_NOCACHE flag.
> > 
> > I doubt that rate of a dummy clock could ever change... unless it is a 
> > rather smart dummy.
> > 
> > > > BTW with the S/PDIF core on which not all mux inputs are connected
> > > > to actual clocks we could also describe the unconnected inputs as
> > > > ground clocks with rate 0. This way we describe something which
> > > > is really there instead of dummy clocks ;)
> > > 
> > > Again you could use a dummy clock for this OR a fixed-rate clock with a
> > > rate of zero from the perspective of the Linux implementation.
> > > 
> > > Do you think it worthwhile to have a DT binding for a grounded clock?
> > > That is not an entirely uncommon case.
> > 
> > Well, how would that differ from skipping a clock from clocks list, i.e. 
> > not specifying it in clock-names and clocks properties?
> 
> The difference is that you can successfully grab it in your driver.

That's a driver-specific issue. The driver knows best which clocks it
can live without (if it's poking only a subset of the hardware, it may
not need some just yet, but could for extended functionality in future
when support is extended), and could assign a dummy to those clocks it
knows it doesn't need that aren't described. That doesn't need to be in
the dt, and shouldn't be, because it's OS and driver specific.

> 
> > 
> > > > Background to why it might be a good idea to connect a ground clock
> > > > to the unconnected input pins is that a driver has a chance to
> > > > successfully grab all clocks. Otherwise how does the driver
> > > > distinguish
> > > > between an unconnected and an erroneous clock?
> > > 
> > > Sorry, I don't follow this last question. Do you mean how to distinguish
> > > based on the value returned from clk_get?
> > 
> > Hmm, in theory, a driver could want to distinguish an error case (e.g. 
> > clock specified, but there is a problem with it) from no clock (e.g. clock 
> > not specified in DT, because it is not available on particular board).
> 
> Yes, that's what I meant. To illustrate the problem for this driver:
> 
> 	for (i = 0; i < STC_TXCLK_SRC_MAX; i++) {
> 		sprintf(tmp, "rxtx%d", i);
> 		clk = devm_clk_get(&pdev->dev, tmp);
> 		if (IS_ERR(clk)) {

		[...]

			/*
			 * ERR_PTR(-ENOENT) returned when clock not
			 * present in the dt (i.e. not wired up). We can
			 * live without this clock, so assign a dummy
			 * (NULL) to simplify the rest of the code. If
			 * the clock is present but something else went
			 * wrong, we'll get a different ERR_PTR value
			 * and actually fail.
			 */
			if (clk == ERR_PTR(-ENOENT)
				clk = NULL;

> 		}
> 	}
> 
> This could be solved by always specifying all input clocks in the
> devicetree.

As far as I can see, the above is sufficient, and leaves the knowledge
of skippable clocks in the driver, where I believe it should be.

Thanks,
Mark.

^ permalink raw reply

* Re: [RFC 11/14] powerpc: Eliminate NO_IRQ usage
From: Geert Uytterhoeven @ 2013-08-23 13:18 UTC (permalink / raw)
  To: Grant Likely
  Cc: Linux-Arch, Stephen Rothwell, Russell King,
	linux-kernel@vger.kernel.org, Rob Herring, Linux-Next,
	Thomas Gleixner, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <CACxGe6s3wit88ynuzYsBZBvijHmAfJNeY9LH2T5S9iY7kJtg=w@mail.gmail.com>

On Fri, Jul 26, 2013 at 5:56 AM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Thu, Jul 25, 2013 at 3:58 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> On Wed, Jan 11, 2012 at 9:22 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
>>> NO_IRQ is evil.  Stop using it in arch/powerpc and powerpc device drivers
>>
>>> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
>>> index 3e06696..55c6ff9 100644
>>> --- a/sound/soc/fsl/fsl_ssi.c
>>> +++ b/sound/soc/fsl/fsl_ssi.c
>>> @@ -666,7 +666,7 @@ static int __devinit fsl_ssi_probe(struct platform_device *pdev)
>>>         ssi_private->ssi_phys = res.start;
>>>
>>>         ssi_private->irq = irq_of_parse_and_map(np, 0);
>>> -       if (ssi_private->irq == NO_IRQ) {
>>> +       if (!ssi_private->irq) {
>>>                 dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
>>>                 ret = -ENXIO;
>>>                 goto error_iomap;
>>
>> What's the plan with this patch?
>>
>> This is now failing on xtensa, as it's one of the architectures that doesn't
>> define NO_IRQ. Only arm, c6x, mn10300, openrisc, parisc, powerpc, and sparc
>> define it.
>
> Wow. I'd pretty much dropped that patch because I didn't have time to
> chase it down. It should be pursued though.
>
> In that particular case it is safe I think to apply the change. PPC
> defines NO_IRQ to be 0 anyway.

Note that we still have arches that define it as nonzero:

arch/arm/include/asm/irq.h:#define NO_IRQ ((unsigned int)(-1))
arch/mn10300/include/asm/irq.h:#define NO_IRQ INT_MAX
arch/openrisc/include/asm/irq.h:#define NO_IRQ (-1)
arch/parisc/include/asm/irq.h:#define NO_IRQ (-1)
arch/sparc/include/asm/irq_32.h:#define NO_IRQ 0xffffffff
arch/sparc/include/asm/irq_64.h:#define NO_IRQ 0xffffffff

Only c6x and powerpc use zero, and thus are ready to drop NO_IRQ.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* Re: [RFC 11/14] powerpc: Eliminate NO_IRQ usage
From: Geert Uytterhoeven @ 2013-08-23 13:22 UTC (permalink / raw)
  To: Grant Likely
  Cc: Linux-Arch, Stephen Rothwell, Russell King, linux-s390,
	linux-kernel@vger.kernel.org, Rob Herring, Linux-Next,
	Thomas Gleixner, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <CAMuHMdW0EE9MiwoOzvg_2VBf5QvYpgJ8bHsjV1HL8iN5HyhxYA@mail.gmail.com>

On Fri, Aug 23, 2013 at 3:18 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Fri, Jul 26, 2013 at 5:56 AM, Grant Likely <grant.likely@secretlab.ca> wrote:
>> On Thu, Jul 25, 2013 at 3:58 PM, Geert Uytterhoeven
>> <geert@linux-m68k.org> wrote:
>>> On Wed, Jan 11, 2012 at 9:22 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
>>>> NO_IRQ is evil.  Stop using it in arch/powerpc and powerpc device drivers
>>>
>>>> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
>>>> index 3e06696..55c6ff9 100644
>>>> --- a/sound/soc/fsl/fsl_ssi.c
>>>> +++ b/sound/soc/fsl/fsl_ssi.c
>>>> @@ -666,7 +666,7 @@ static int __devinit fsl_ssi_probe(struct platform_device *pdev)
>>>>         ssi_private->ssi_phys = res.start;
>>>>
>>>>         ssi_private->irq = irq_of_parse_and_map(np, 0);
>>>> -       if (ssi_private->irq == NO_IRQ) {
>>>> +       if (!ssi_private->irq) {
>>>>                 dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
>>>>                 ret = -ENXIO;
>>>>                 goto error_iomap;
>>>
>>> What's the plan with this patch?
>>>
>>> This is now failing on xtensa, as it's one of the architectures that doesn't
>>> define NO_IRQ. Only arm, c6x, mn10300, openrisc, parisc, powerpc, and sparc
>>> define it.
>>
>> Wow. I'd pretty much dropped that patch because I didn't have time to
>> chase it down. It should be pursued though.
>>
>> In that particular case it is safe I think to apply the change. PPC
>> defines NO_IRQ to be 0 anyway.
>
> Note that we still have arches that define it as nonzero:
>
> arch/arm/include/asm/irq.h:#define NO_IRQ ((unsigned int)(-1))
> arch/mn10300/include/asm/irq.h:#define NO_IRQ INT_MAX
> arch/openrisc/include/asm/irq.h:#define NO_IRQ (-1)
> arch/parisc/include/asm/irq.h:#define NO_IRQ (-1)
> arch/sparc/include/asm/irq_32.h:#define NO_IRQ 0xffffffff
> arch/sparc/include/asm/irq_64.h:#define NO_IRQ 0xffffffff
>
> Only c6x and powerpc use zero, and thus are ready to drop NO_IRQ.

s390 just gained "NO_IRQ support" in -next, in commit
e15a9dcfdec29786d1830c5b7beaf02a288a89e1 ("s390: convert interrupt
handling to use generic hardirq"):

/* This number is used when no interrupt has been assigned */
#define NO_IRQ         0

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* Re: [alsa-devel] [PATCH v5 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
From: Sascha Hauer @ 2013-08-23 14:01 UTC (permalink / raw)
  To: Mark Rutland
  Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	lars@metafoo.de, Mike Turquette, ian.campbell@citrix.com,
	Pawel Moll, swarren@wwwdotorg.org, linuxppc-dev@lists.ozlabs.org,
	Nicolin Chen, Tomasz Figa, rob.herring@calxeda.com,
	timur@tabi.org, broonie@kernel.org, p.zabel@pengutronix.de,
	galak@codeaurora.org, shawn.guo@linaro.org, festevam@gmail.com
In-Reply-To: <20130823125815.GG25856@e106331-lin.cambridge.arm.com>

On Fri, Aug 23, 2013 at 01:58:15PM +0100, Mark Rutland wrote:
> On Fri, Aug 23, 2013 at 07:34:21AM +0100, Sascha Hauer wrote:
> > On Fri, Aug 23, 2013 at 12:49:19AM +0200, Tomasz Figa wrote:
> > > On Thursday 22 of August 2013 15:43:31 Mike Turquette wrote:
> > > > Quoting Sascha Hauer (2013-08-22 14:00:35)
> > > > 
> > > > > On Thu, Aug 22, 2013 at 01:09:31PM +0100, Mark Rutland wrote:
> > > > > > On Thu, Aug 22, 2013 at 08:19:10AM +0100, Mike Turquette wrote:
> > > > > > > Quoting Tomasz Figa (2013-08-21 14:34:55)
> > > > > > > 
> > > > > > > > On Wednesday 21 of August 2013 09:50:15 Mark Rutland wrote:
> > > > > > > > > On Tue, Aug 20, 2013 at 01:06:25AM +0100, Mike Turquette 
> > > wrote:
> > > > > > > > > > Quoting Mark Rutland (2013-08-19 02:35:43)
> > > > > > > > > > 
> > > > > > > > > > > On Sat, Aug 17, 2013 at 04:17:18PM +0100, Tomasz Figa 
> > > wrote:
> > > > > > > > > > > > On Saturday 17 of August 2013 16:53:16 Sascha Hauer 
> > > wrote:
> > > > > > > > > > > > > On Sat, Aug 17, 2013 at 02:28:04PM +0200, Tomasz Figa 
> > > wrote:
> > > > > > > > > > > > > > > > > Also I would make this option required. Use a
> > > > > > > > > > > > > > > > > dummy
> > > > > > > > > > > > > > > > > clock for
> > > > > > > > > > > > > > > > > mux
> > > > > > > > > > > > > > > > > inputs that are grounded for a specific SoC.
> > > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > > > Some clocks are not from CCM and we haven't
> > > > > > > > > > > > > > > > defined in
> > > > > > > > > > > > > > > > imx6q-clk.txt,
> > > > > > > > > > > > > > > > so in most cases we can't provide a phandle for
> > > > > > > > > > > > > > > > them, eg:
> > > > > > > > > > > > > > > > spdif_ext.
> > > > > > > > > > > > > > > > I think it's a bit hard to force it to be
> > > > > > > > > > > > > > > > 'required'. An
> > > > > > > > > > > > > > > > 'optional'
> > > > > > > > > > > > > > > > looks more flexible to me and a default one is
> > > > > > > > > > > > > > > > ensured
> > > > > > > > > > > > > > > > even if
> > > > > > > > > > > > > > > > it's
> > > > > > > > > > > > > > > > missing.
> > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > > <&clks 0> is the dummy clock. This can be used for
> > > > > > > > > > > > > > > all input
> > > > > > > > > > > > > > > clocks
> > > > > > > > > > > > > > > not
> > > > > > > > > > > > > > > defined by the SoC.
> > > > > > > > > > > > > > 
> > > > > > > > > > > > > > Where does this assumption come from? Is it
> > > > > > > > > > > > > > documented
> > > > > > > > > > > > > > anywhere?
> > > > > > > > > > > > > 
> > > > > > > > > > > > > This is how all i.MX clock bindings currently are. See
> > > > > > > > > > > > > Documentation/devicetree/bindings/clock/imx*-clock.txt
> > > > > > > > > > > > 
> > > > > > > > > > > > OK, thanks.
> > > > > > > > > > > > 
> > > > > > > > > > > > I guess we need some discussion on dummy clocks vs
> > > > > > > > > > > > skipped clocks.
> > > > > > > > > > > > I think we want some consistency on this, don't we?
> > > > > > > > > > > > 
> > > > > > > > > > > > If we really need a dummy clock, then we might also want
> > > > > > > > > > > > a generic
> > > > > > > > > > > > way to specify it.
> > > > > > > > > > > 
> > > > > > > > > > > What do we actually mean by a "dummy clock"? We already
> > > > > > > > > > > have
> > > > > > > > > > > bindings
> > > > > > > > > > > for "fixed-clock" and co friends describe relatively
> > > > > > > > > > > simple
> > > > > > > > > > > preconfigured clocks.
> > > > > > > > > > 
> > > > > > > > > > Some platforms have a fake clock which defines noops
> > > > > > > > > > callbacks and
> > > > > > > > > > basically doesn't do anything. This is analogous to the
> > > > > > > > > > dummy
> > > > > > > > > > regulator
> > > > > > > > > > implementation. A central one could be registered by the
> > > > > > > > > > clock core,
> > > > > > > > > > as
> > > > > > > > > > is done by the regulator core.
> > > > > > > > > 
> > > > > > > > > When you say some platforms, you presumably mean the platform
> > > > > > > > > code in
> > > > > > > > > Linux? A dummy clock sounds like a completely Linux-specific
> > > > > > > > > abstraction rather than a description of the hardware, and I
> > > > > > > > > don't see why we need that in the DT:
> > > > > > > > > 
> > > > > > > > > * If a clock is wired up and running (as presumably the dummy
> > > > > > > > > clock is), then surely it's a fixed-clock (it's running, we
> > > > > > > > > and we have no control over it, but we presumably know its
> > > > > > > > > rate) and can be described as such?
> > > > > > > > > 
> > > > > > > > > * If no clock is wired up, then we should be able to describe
> > > > > > > > > that. If a driver believes that a clock is required when it
> > > > > > > > > isn't (for some level of functionality), then that driver
> > > > > > > > > should be fixed up to support the clock as being optional.
> > > > > > > > > 
> > > > > > > > > Am I missing something?
> > > > > > > > 
> > > > > > > > I second that.
> > > > > > > > 
> > > > > > > > Moreover, I don't think that device tree should deal with dummy
> > > > > > > > anything. It should be able to describe hardware that is
> > > > > > > > available on given system, not list what hardware is not
> > > > > > > > available.
> > > > > > > 
> > > > > > > I wasn't clear. The dummy clock IS a completely Linux-specific
> > > > > > > abstraction.
> > > > > > > 
> > > > > > > I'm not advocating a dummy clock in DT. I am advocating
> > > > > > > consolidation of the implementation of a clock that does nothing
> > > > > > > into the clock core. This code could easily live in
> > > > > > > drivers/clk/clk.c instead of having everyone open-code it.
> > > > > > > 
> > > > > > > As far as specifying a dummy clock in DT? I dunno. DT should
> > > > > > > describe
> > > > > > > real hardware so there isn't much use for a dummy clock.
> > > > > > 
> > > > > > Sorry, I misunderstood. Good to hear we're on the same page :)
> > > > > > 
> > > > > > > I'm guessing one of the reasons for such a clock are drivers do
> > > > > > > not
> > > > > > > honor the clk.h api and they freak out when clk_get gives them a
> > > > > > > NULL
> > > > > > > pointer?
> > > > > > 
> > > > > > I'm not sure. Sascha, could you shed some light on the matter?
> > > > > 
> > > > > The original reason introducing the dummy clocks in the i.MX dtbs
> > > > > was to provide devices a clock which the driver requests but is
> > > > > not software controllable. We often have the case where the same
> > > > > devices are on several SoCs, but not on all of them all clocks have
> > > > > a bit to en/disable them.
> > > > > 
> > > > > Anyway, to accomplish this we don't need dummy clocks. We can just
> > > > > describe the real clocks.
> > > > 
> > > > You could use a dummy clk for the Linux implementation, but the downside
> > > > is that a dummy clock has a rate of 0 always and a your clocks likely
> > > > have non-zero rates.
> > > > 
> > > > It is probably better for you define a clock which only implements the
> > > > .recalc_rate callback. If the rate of this clock changes without Linux
> > > > having knowledge of it you can use the CLK_GET_RATE_NOCACHE flag.
> > > 
> > > I doubt that rate of a dummy clock could ever change... unless it is a 
> > > rather smart dummy.
> > > 
> > > > > BTW with the S/PDIF core on which not all mux inputs are connected
> > > > > to actual clocks we could also describe the unconnected inputs as
> > > > > ground clocks with rate 0. This way we describe something which
> > > > > is really there instead of dummy clocks ;)
> > > > 
> > > > Again you could use a dummy clock for this OR a fixed-rate clock with a
> > > > rate of zero from the perspective of the Linux implementation.
> > > > 
> > > > Do you think it worthwhile to have a DT binding for a grounded clock?
> > > > That is not an entirely uncommon case.
> > > 
> > > Well, how would that differ from skipping a clock from clocks list, i.e. 
> > > not specifying it in clock-names and clocks properties?
> > 
> > The difference is that you can successfully grab it in your driver.
> 
> That's a driver-specific issue. The driver knows best which clocks it
> can live without (if it's poking only a subset of the hardware, it may
> not need some just yet, but could for extended functionality in future
> when support is extended), and could assign a dummy to those clocks it
> knows it doesn't need that aren't described. That doesn't need to be in
> the dt, and shouldn't be, because it's OS and driver specific.
> 
> > 
> > > 
> > > > > Background to why it might be a good idea to connect a ground clock
> > > > > to the unconnected input pins is that a driver has a chance to
> > > > > successfully grab all clocks. Otherwise how does the driver
> > > > > distinguish
> > > > > between an unconnected and an erroneous clock?
> > > > 
> > > > Sorry, I don't follow this last question. Do you mean how to distinguish
> > > > based on the value returned from clk_get?
> > > 
> > > Hmm, in theory, a driver could want to distinguish an error case (e.g. 
> > > clock specified, but there is a problem with it) from no clock (e.g. clock 
> > > not specified in DT, because it is not available on particular board).
> > 
> > Yes, that's what I meant. To illustrate the problem for this driver:
> > 
> > 	for (i = 0; i < STC_TXCLK_SRC_MAX; i++) {
> > 		sprintf(tmp, "rxtx%d", i);
> > 		clk = devm_clk_get(&pdev->dev, tmp);
> > 		if (IS_ERR(clk)) {
> 
> 		[...]
> 
> 			/*
> 			 * ERR_PTR(-ENOENT) returned when clock not
> 			 * present in the dt (i.e. not wired up). We can
> 			 * live without this clock, so assign a dummy
> 			 * (NULL) to simplify the rest of the code. If
> 			 * the clock is present but something else went
> 			 * wrong, we'll get a different ERR_PTR value
> 			 * and actually fail.
> 			 */
> 			if (clk == ERR_PTR(-ENOENT)
> 				clk = NULL;
> 
> > 		}
> > 	}
> > 
> > This could be solved by always specifying all input clocks in the
> > devicetree.
> 
> As far as I can see, the above is sufficient, and leaves the knowledge
> of skippable clocks in the driver, where I believe it should be.

You miss my point. Once a clock is specified in the devicetree it is no
longer optional. The driver currently can't find out whether a clock
hasn't been specified (and it's ok that it's not there) or a clock has
been specified, but some error prevents actually grabbing the clock (in
which case the driver should bail out)

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply

* Re: [alsa-devel] [PATCH v5 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
From: Mark Rutland @ 2013-08-23 14:57 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	lars@metafoo.de, Mike Turquette, ian.campbell@citrix.com,
	Pawel Moll, swarren@wwwdotorg.org, linuxppc-dev@lists.ozlabs.org,
	Nicolin Chen, Tomasz Figa, rob.herring@calxeda.com,
	timur@tabi.org, broonie@kernel.org, p.zabel@pengutronix.de,
	galak@codeaurora.org, shawn.guo@linaro.org, festevam@gmail.com
In-Reply-To: <20130823140128.GI31036@pengutronix.de>

[trimming a bit of useless context]

> > > > > > Background to why it might be a good idea to connect a ground clock
> > > > > > to the unconnected input pins is that a driver has a chance to
> > > > > > successfully grab all clocks. Otherwise how does the driver
> > > > > > distinguish
> > > > > > between an unconnected and an erroneous clock?
> > > > >
> > > > > Sorry, I don't follow this last question. Do you mean how to distinguish
> > > > > based on the value returned from clk_get?
> > > >
> > > > Hmm, in theory, a driver could want to distinguish an error case (e.g.
> > > > clock specified, but there is a problem with it) from no clock (e.g. clock
> > > > not specified in DT, because it is not available on particular board).
> > >
> > > Yes, that's what I meant. To illustrate the problem for this driver:
> > >
> > >     for (i = 0; i < STC_TXCLK_SRC_MAX; i++) {
> > >             sprintf(tmp, "rxtx%d", i);
> > >             clk = devm_clk_get(&pdev->dev, tmp);
> > >             if (IS_ERR(clk)) {
> >
> >               [...]
> >
> >                       /*
> >                        * ERR_PTR(-ENOENT) returned when clock not
> >                        * present in the dt (i.e. not wired up). We can
> >                        * live without this clock, so assign a dummy
> >                        * (NULL) to simplify the rest of the code. If
> >                        * the clock is present but something else went
> >                        * wrong, we'll get a different ERR_PTR value
> >                        * and actually fail.
> >                        */
> >                       if (clk == ERR_PTR(-ENOENT)
> >                               clk = NULL;
> >
> > >             }
> > >     }
> > >
> > > This could be solved by always specifying all input clocks in the
> > > devicetree.
> >
> > As far as I can see, the above is sufficient, and leaves the knowledge
> > of skippable clocks in the driver, where I believe it should be.
> 
> You miss my point. Once a clock is specified in the devicetree it is no
> longer optional. The driver currently can't find out whether a clock
> hasn't been specified (and it's ok that it's not there) or a clock has
> been specified, but some error prevents actually grabbing the clock (in
> which case the driver should bail out)

Unless I've misunderstood, that's exactly what I was trying to implement
above. As I understand it, what we want is:

* If a clock is not specified in the DT, but it's a clock that we know
  we can live without if not wired up, then continue along with a dummy
  clock (NULL). This could be changed to a different dummy, what exactly
  is needed is driver-specific.

* If a clock is not specified in the DT, but it's *not* an optional
  clock, then we must fail. Whether or not a clock is optional is
  knowledge only the driver can have.

* If a clock is specified in the DT, but we can't get it for some
  reason, fail.
 
* If a clock is specified in the DT, and we get it, use it.

I see we might also get PTR_ERR(-ENOENT) indirectly from
__of_parse_phandle_with_args, if the "clocks" property isn't present
(but clock-names is), or we're given the empty phandle. The empty
phandle case is arguable, but it would be possible to add a check for
the clocks property in of_clk_get_by_name early on where we could return
-EINVAL to prevent that being a problem.

Otherwise, it's trivial to add a function to explicitly test for this
case (see below). I don't see that we need to leak what is a Linux issue
into the dt.

Thanks,
Mark.

---->8----
>From f0d46f36426ded4ba3609d79664888852f9925e2 Mon Sep 17 00:00:00 2001
From: Mark Rutland <mark.rutland@arm.com>
Date: Fri, 23 Aug 2013 15:46:33 +0100
Subject: [PATCH] clk: add of_clk_is_specified

There's currently no way to perfectly distinguish between an
of_clk_get_by_name that failed because a clock was not provided in
clock-names, or for some other reason (e.g. the clocks property itself
was missing). This is problematic for drivers for some pieces of
hardware that have optional clocks -- those which must be used if wired,
but may not be wired in all cases.

This patch adds a new function of_clk_is_specified, which may be used to
distinguish these cases.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
---
 drivers/clk/clkdev.c | 11 +++++++++++
 include/linux/clk.h  |  5 +++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 442a313..7fdeca9 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -91,6 +91,17 @@ struct clk *of_clk_get_by_name(struct device_node *np, const char *name)
 	return clk;
 }
 EXPORT_SYMBOL(of_clk_get_by_name);
+
+/**
+ *
+ * of_clk_is_specified - Test if a clock was provided by name in a device node
+ * @np: pointer to the clock consumer node
+ * @name: name of the consumer's clock input. Not NULL.
+ */
+bool of_clk_is_specified(struct device_node *np, const char *name)
+{
+	return of_property_match_string(np, "clock-names", name) >= 0;
+}
 #endif
 
 /*
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 9a6d045..bf44d94 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -368,6 +368,7 @@ struct of_phandle_args;
 struct clk *of_clk_get(struct device_node *np, int index);
 struct clk *of_clk_get_by_name(struct device_node *np, const char *name);
 struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec);
+bool of_clk_is_specified(struct device_node *np, const char *name);
 #else
 static inline struct clk *of_clk_get(struct device_node *np, int index)
 {
@@ -378,6 +379,10 @@ static inline struct clk *of_clk_get_by_name(struct device_node *np,
 {
 	return ERR_PTR(-ENOENT);
 }
+static bool of_clk_is_specified(struct device_node *np, const char *name)
+{
+	return false;
+}
 #endif
 
 #endif
-- 
1.8.1.1

^ permalink raw reply related

* Re: [PATCH 1/2] powerpc/85xx: add hardware automatically enter altivec idle state
From: Scott Wood @ 2013-08-23 15:31 UTC (permalink / raw)
  To: Wang Dongsheng-B40534
  Cc: Wood Scott-B07421, linuxppc-dev@lists.ozlabs.org,
	Zhao Chenhui-B35336
In-Reply-To: <ABB05CD9C9F68C46A5CEDC7F15439259010281F1@039-SN2MPN1-021.039d.mgd.msft.net>

On Thu, 2013-08-22 at 21:52 -0500, Wang Dongsheng-B40534 wrote:
> 
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Thursday, August 22, 2013 11:19 PM
> > To: Wang Dongsheng-B40534
> > Cc: Wood Scott-B07421; Kumar Gala; Zhao Chenhui-B35336; linuxppc-
> > dev@lists.ozlabs.org
> > Subject: Re: [PATCH 1/2] powerpc/85xx: add hardware automatically enter
> > altivec idle state
> > 
> > On Wed, 2013-08-21 at 22:13 -0500, Wang Dongsheng-B40534 wrote:
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Tuesday, August 20, 2013 8:39 AM
> > > > To: Wang Dongsheng-B40534
> > > > Cc: Wood Scott-B07421; Kumar Gala; linuxppc-dev@lists.ozlabs.org
> > > > Subject: Re: [PATCH 1/2] powerpc/85xx: add hardware automatically
> > > > enter altivec idle state
> > > >
> > > > It just seems wrong to have an ad-hoc mechanism for running
> > > > core-specific code when we have cputable...  If we really need this,
> > > > maybe we should add a "cpu_setup_late" function pointer.
> > > >
> > > > With your patch, when does the power management register get set
> > > > when hot plugging a cpu?
> > > >
> > > Um.. I don't deal with this situation. I will fix it.
> > > __setup/restore_cpu_e6500 looks good. But only bootcpu call
> > __setup_cpu_e6500, not on each cpu.
> > > I think this is a bug.
> > 
> > Other CPUs call __restore_cpu_e6500.
> > 
> No, there is bootcore of secondary thread, and other cores of first thread call __restore_cpu_e6500.

This is the upstream list -- there is no e6500 thread support yet. :-)

But in the SDK I do see generic_secondary_common_init being called from
generic_secondary_thread_init, which means __restore_cpu_e6500 will be
called.

-Scott

^ permalink raw reply

* What a new ethernet phy change to the device tree
From: Mercier Ivan @ 2013-08-23 15:39 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

Hi everybody,
I have 2 boards based on freescale p3041.
Ethernet works on uboot on the 2 of them but only the eval card
p3041ds works with linux.
So i start modifying the device tree on the other card (wp6.dts) and
now I can see the ethernet device in Linux but I can't configure it.

root@p3041ds:~# ifconfig fm1-gb3 10.0.0.1
fsl_dpa ethernet.14 fm1-gb3: Could not connect to PHY
/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@28/ethernet-phy@1f
fsl_dpa ethernet.14 fm1-gb3: init_phy() = -19
ifconfig: SIOCSIFFLAGS: No such device

It seems to be a phy address misconfiguration on mdio bus but I don't
exactly know what to change on my device tree.

Does anyone have an idea?

thanks a lot

[-- Attachment #2: wp6.dts --]
[-- Type: application/octet-stream, Size: 35142 bytes --]

/dts-v1/;

/ {
	compatible = "fsl,P3041DS";
	#address-cells = <0x2>;
	#size-cells = <0x2>;
	interrupt-parent = <0x1>;
	model = "fsl,P3041DS";

	cpus {
		power-isa-version = "2.06";
		power-isa-b;
		power-isa-e;
		power-isa-atb;
		power-isa-cs;
		power-isa-ds;
		power-isa-e.ed;
		power-isa-e.pd;
		power-isa-e.hv;
		power-isa-e.le;
		power-isa-e.pm;
		power-isa-e.pc;
		power-isa-ecl;
		power-isa-exp;
		power-isa-fp;
		power-isa-fp.r;
		power-isa-mmc;
		power-isa-scpm;
		power-isa-wt;
		fsl,eref-deo;
		mmu-type = "power-embedded";
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		PowerPC,e500mc@0 {
			device_type = "cpu";
			reg = <0x0>;
			clocks = <0x2>;
			next-level-cache = <0x3>;
			linux,phandle = <0xc>;
			phandle = <0xc>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x3>;
				phandle = <0x3>;
			};
		};

		PowerPC,e500mc@1 {
			device_type = "cpu";
			reg = <0x1>;
			clocks = <0x5>;
			next-level-cache = <0x6>;
			linux,phandle = <0xd>;
			phandle = <0xd>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x6>;
				phandle = <0x6>;
			};
		};

		PowerPC,e500mc@2 {
			device_type = "cpu";
			reg = <0x2>;
			clocks = <0x7>;
			next-level-cache = <0x8>;
			linux,phandle = <0xe>;
			phandle = <0xe>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x8>;
				phandle = <0x8>;
			};
		};

		PowerPC,e500mc@3 {
			device_type = "cpu";
			reg = <0x3>;
			clocks = <0x9>;
			next-level-cache = <0xa>;
			linux,phandle = <0xf>;
			phandle = <0xf>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0xa>;
				phandle = <0xa>;
			};
		};
	};

	aliases {
		ccsr = "/soc@ffe000000";
		dcsr = "/dcsr@f00000000";
		serial0 = "/soc@ffe000000/serial@11c500";
		serial1 = "/soc@ffe000000/serial@11c600";
		serial2 = "/soc@ffe000000/serial@11d500";
		serial3 = "/soc@ffe000000/serial@11d600";
		pci0 = "/pcie@ffe200000";
		pci1 = "/pcie@ffe201000";
		pci2 = "/pcie@ffe202000";
		pci3 = "/pcie@ffe203000";
		dma0 = "/soc@ffe000000/dma@100300";
		dma1 = "/soc@ffe000000/dma@101300";
		sdhc = "/soc@ffe000000/sdhc@114000";
		msi0 = "/soc@ffe000000/msi@41600";
		msi1 = "/soc@ffe000000/msi@41800";
		msi2 = "/soc@ffe000000/msi@41a00";
		crypto = "/soc@ffe000000/crypto@300000";
		sec_jr0 = "/soc@ffe000000/crypto@300000/jr@1000";
		sec_jr1 = "/soc@ffe000000/crypto@300000/jr@2000";
		sec_jr2 = "/soc@ffe000000/crypto@300000/jr@3000";
		sec_jr3 = "/soc@ffe000000/crypto@300000/jr@4000";
		rtic_a = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-a@0";
		rtic_b = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-b@20";
		rtic_c = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-c@40";
		rtic_d = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-d@60";
		sec_mon = "/soc@ffe000000/sec_mon@314000";
		rman = "/soc@ffe000000/rman@1e0000";
		pme = "/soc@ffe000000/pme@316000";
		qman = "/soc@ffe000000/qman@318000";
		bman = "/soc@ffe000000/bman@31a000";
		fman0 = "/soc@ffe000000/fman@400000";
		ethernet3 = "/soc@ffe000000/fman@400000/ethernet@e6000";
		phy_rgmii_1f = "/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@28/ethernet-phy@1f";
		emi1_rgmii = "/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@28";
	};

	memory {
		device_type = "memory";
	};

	dcsr@f00000000 {
		ranges = <0x0 0xf 0x0 0x1008000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "fsl,dcsr", "simple-bus";

		dcsr-epu@0 {
			compatible = "fsl,p3041-dcsr-epu", "fsl,dcsr-epu";
			interrupts = <0x34 0x2 0x0 0x0 0x54 0x2 0x0 0x0 0x55 0x2 0x0 0x0>;
			reg = <0x0 0x1000>;
		};

		dcsr-npc {
			compatible = "fsl,dcsr-npc";
			reg = <0x1000 0x1000 0x1000000 0x8000>;
		};

		dcsr-nxc@2000 {
			compatible = "fsl,dcsr-nxc";
			reg = <0x2000 0x1000>;
		};

		dcsr-corenet {
			compatible = "fsl,dcsr-corenet";
			reg = <0x8000 0x1000 0xb0000 0x1000>;
		};

		dcsr-dpaa@9000 {
			compatible = "fsl,p3041-dcsr-dpaa", "fsl,dcsr-dpaa";
			reg = <0x9000 0x1000>;
		};

		dcsr-ocn@11000 {
			compatible = "fsl,p3041-dcsr-ocn", "fsl,dcsr-ocn";
			reg = <0x11000 0x1000>;
		};

		dcsr-ddr@12000 {
			compatible = "fsl,dcsr-ddr";
			dev-handle = <0xb>;
			reg = <0x12000 0x1000>;
		};

		dcsr-nal@18000 {
			compatible = "fsl,p3041-dcsr-nal", "fsl,dcsr-nal";
			reg = <0x18000 0x1000>;
		};

		dcsr-rcpm@22000 {
			compatible = "fsl,p3041-dcsr-rcpm", "fsl,dcsr-rcpm";
			reg = <0x22000 0x1000>;
		};

		dcsr-cpu-sb-proxy@40000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xc>;
			reg = <0x40000 0x1000>;
		};

		dcsr-cpu-sb-proxy@41000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xd>;
			reg = <0x41000 0x1000>;
		};

		dcsr-cpu-sb-proxy@42000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xe>;
			reg = <0x42000 0x1000>;
		};

		dcsr-cpu-sb-proxy@43000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xf>;
			reg = <0x43000 0x1000>;
		};
	};

	bman-portals@ff4000000 {
		ranges = <0x0 0xf 0xf4000000 0x200000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "simple-bus";

		bman-portal@0 {
			cell-index = <0x0>;
			compatible = "fsl,bman-portal";
			reg = <0x0 0x4000 0x100000 0x1000>;
			interrupts = <0x69 0x2 0x0 0x0>;
		};

		bman-portal@4000 {
			cell-index = <0x1>;
			compatible = "fsl,bman-portal";
			reg = <0x4000 0x4000 0x101000 0x1000>;
			interrupts = <0x6b 0x2 0x0 0x0>;
		};

		bman-portal@8000 {
			cell-index = <0x2>;
			compatible = "fsl,bman-portal";
			reg = <0x8000 0x4000 0x102000 0x1000>;
			interrupts = <0x6d 0x2 0x0 0x0>;
		};

		bman-portal@c000 {
			cell-index = <0x3>;
			compatible = "fsl,bman-portal";
			reg = <0xc000 0x4000 0x103000 0x1000>;
			interrupts = <0x6f 0x2 0x0 0x0>;
		};

		bman-portal@10000 {
			cell-index = <0x4>;
			compatible = "fsl,bman-portal";
			reg = <0x10000 0x4000 0x104000 0x1000>;
			interrupts = <0x71 0x2 0x0 0x0>;
		};

		bman-portal@14000 {
			cell-index = <0x5>;
			compatible = "fsl,bman-portal";
			reg = <0x14000 0x4000 0x105000 0x1000>;
			interrupts = <0x73 0x2 0x0 0x0>;
		};

		bman-portal@18000 {
			cell-index = <0x6>;
			compatible = "fsl,bman-portal";
			reg = <0x18000 0x4000 0x106000 0x1000>;
			interrupts = <0x75 0x2 0x0 0x0>;
		};

		bman-portal@1c000 {
			cell-index = <0x7>;
			compatible = "fsl,bman-portal";
			reg = <0x1c000 0x4000 0x107000 0x1000>;
			interrupts = <0x77 0x2 0x0 0x0>;
		};

		bman-portal@20000 {
			cell-index = <0x8>;
			compatible = "fsl,bman-portal";
			reg = <0x20000 0x4000 0x108000 0x1000>;
			interrupts = <0x79 0x2 0x0 0x0>;
		};

		bman-portal@24000 {
			cell-index = <0x9>;
			compatible = "fsl,bman-portal";
			reg = <0x24000 0x4000 0x109000 0x1000>;
			interrupts = <0x7b 0x2 0x0 0x0>;
		};

		bman-bpids@0 {
			compatible = "fsl,bpid-range";
			fsl,bpid-range = <0x20 0x20>;
		};
	};

	qman-portals@ff4200000 {
		ranges = <0x0 0xf 0xf4200000 0x200000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "simple-bus";

		qman-portal@0 {
			cell-index = <0x0>;
			compatible = "fsl,qman-portal";
			reg = <0x0 0x4000 0x100000 0x1000>;
			interrupts = <0x68 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x0>;
		};

		qman-portal@4000 {
			cell-index = <0x1>;
			compatible = "fsl,qman-portal";
			reg = <0x4000 0x4000 0x101000 0x1000>;
			interrupts = <0x6a 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x1>;
		};

		qman-portal@8000 {
			cell-index = <0x2>;
			compatible = "fsl,qman-portal";
			reg = <0x8000 0x4000 0x102000 0x1000>;
			interrupts = <0x6c 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x2>;
		};

		qman-portal@c000 {
			cell-index = <0x3>;
			compatible = "fsl,qman-portal";
			reg = <0xc000 0x4000 0x103000 0x1000>;
			interrupts = <0x6e 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x3>;
		};

		qman-portal@10000 {
			cell-index = <0x4>;
			compatible = "fsl,qman-portal";
			reg = <0x10000 0x4000 0x104000 0x1000>;
			interrupts = <0x70 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x4>;
		};

		qman-portal@14000 {
			cell-index = <0x5>;
			compatible = "fsl,qman-portal";
			reg = <0x14000 0x4000 0x105000 0x1000>;
			interrupts = <0x72 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x5>;
		};

		qman-portal@18000 {
			cell-index = <0x6>;
			compatible = "fsl,qman-portal";
			reg = <0x18000 0x4000 0x106000 0x1000>;
			interrupts = <0x74 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x6>;
		};

		qman-portal@1c000 {
			cell-index = <0x7>;
			compatible = "fsl,qman-portal";
			reg = <0x1c000 0x4000 0x107000 0x1000>;
			interrupts = <0x76 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x7>;
		};

		qman-portal@20000 {
			cell-index = <0x8>;
			compatible = "fsl,qman-portal";
			reg = <0x20000 0x4000 0x108000 0x1000>;
			interrupts = <0x78 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x8>;
		};

		qman-portal@24000 {
			cell-index = <0x9>;
			compatible = "fsl,qman-portal";
			reg = <0x24000 0x4000 0x109000 0x1000>;
			interrupts = <0x7a 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x9>;
		};

		qman-fqids@0 {
			compatible = "fsl,fqid-range";
			fsl,fqid-range = <0x100 0x100>;
		};

		qman-fqids@1 {
			compatible = "fsl,fqid-range";
			fsl,fqid-range = <0x8000 0x8000>;
		};

		qman-pools@0 {
			compatible = "fsl,pool-channel-range";
			fsl,pool-channel-range = <0x21 0xf>;
		};

		qman-cgrids@0 {
			compatible = "fsl,cgrid-range";
			fsl,cgrid-range = <0x0 0x100>;
		};
	};

	soc@ffe000000 {
		ranges = <0x0 0xf 0xfe000000 0x1000000>;
		reg = <0xf 0xfe000000 0x0 0x1000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		device_type = "soc";
		compatible = "simple-bus";

		i2c@118100 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x1>;
			compatible = "fsl-i2c";
			reg = <0x118100 0x100>;
			interrupts = <0x26 0x2 0x0 0x0>;
			dfsrr;

			eeprom@51 {
				compatible = "at24,24c256";
				reg = <0x51>;
			};

			eeprom@52 {
				compatible = "at24,24c256";
				reg = <0x52>;
			};
		};

		i2c@119100 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x3>;
			compatible = "fsl-i2c";
			reg = <0x119100 0x100>;
			interrupts = <0x27 0x2 0x0 0x0>;
			dfsrr;

			rtc@68 {
				compatible = "dallas,ds3232";
				reg = <0x68>;
				interrupts = <0x1 0x1 0x0 0x0>;
			};

			adt7461@4c {
				compatible = "adi,adt7461";
				reg = <0x4c>;
			};
		};

		fman@400000 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			cell-index = <0x0>;
			compatible = "fsl,fman", "simple-bus";
			ranges = <0x0 0x400000 0x100000>;
			reg = <0x400000 0x100000>;
			clock-frequency = <0x0>;
			interrupts = <0x60 0x2 0x0 0x0 0x10 0x2 0x1 0x1>;

			ethernet@e0000 {
				tbi-handle = <0x10>;
				phy-handle = <0x11>;
				phy-connection-type = "sgmii";
				cell-index = <0x0>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe0000 0x1000>;
				fsl,port-handles = <0x12 0x13>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x2f>;
				phandle = <0x2f>;
			};

			mdio@e1120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-mdio";
				reg = <0xe1120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;
				linux,phandle = <0x2e>;
				phandle = <0x2e>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x10>;
					phandle = <0x10>;
				};
			};

			ethernet@e2000 {
				tbi-handle = <0x15>;
				phy-handle = <0x16>;
				phy-connection-type = "sgmii";
				cell-index = <0x1>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe2000 0x1000>;
				fsl,port-handles = <0x17 0x18>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x30>;
				phandle = <0x30>;
			};

			mdio@e3120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-tbi";
				reg = <0xe3120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x15>;
					phandle = <0x15>;
				};
			};

			ethernet@e4000 {
				tbi-handle = <0x19>;
				phy-handle = <0x1a>;
				phy-connection-type = "sgmii";
				cell-index = <0x2>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe4000 0x1000>;
				fsl,port-handles = <0x1b 0x1c>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x31>;
				phandle = <0x31>;
			};

			mdio@e5120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-tbi";
				reg = <0xe5120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x19>;
					phandle = <0x19>;
				};
			};


			ethernet@e6000 {
				tbi-handle = <0x1d>;
				phy-handle = <0x1e>;
				cell-index = <0x3>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe6000 0x1000>;
				fsl,port-handles = <0x1f 0x20>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x32>;
				phandle = <0x32>;
			};



			cc {
				compatible = "fsl,fman-cc";
			};

			muram@0 {
				compatible = "fsl,fman-muram";
				reg = <0x0 0x28000>;
			};

			bmi@80000 {
				compatible = "fsl,fman-bmi";
				reg = <0x80000 0x400>;
			};

			qmi@80400 {
				compatible = "fsl,fman-qmi";
				reg = <0x80400 0x400>;
			};

			port@81000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-oh";
				reg = <0x81000 0x1000>;
				fsl,qman-channel-id = <0x46>;
			};

			port@82000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-oh";
				reg = <0x82000 0x1000>;
				fsl,qman-channel-id = <0x47>;
			};

			port@83000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-oh";
				reg = <0x83000 0x1000>;
				fsl,qman-channel-id = <0x48>;
			};

			port@84000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-oh";
				reg = <0x84000 0x1000>;
				fsl,qman-channel-id = <0x49>;
			};

			port@85000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-oh";
				reg = <0x85000 0x1000>;
				status = "disabled";
				fsl,qman-channel-id = <0x4a>;
			};

			port@86000 {
				cell-index = <0x5>;
				compatible = "fsl,fman-port-oh";
				reg = <0x86000 0x1000>;
				status = "disabled";
				fsl,qman-channel-id = <0x4b>;
			};

			port@87000 {
				cell-index = <0x6>;
				compatible = "fsl,fman-port-oh";
				reg = <0x87000 0x1000>;
				status = "disabled";
			};

			policer@c0000 {
				compatible = "fsl,fman-policer";
				reg = <0xc0000 0x1000>;
			};

			keygen@c1000 {
				compatible = "fsl,fman-keygen";
				reg = <0xc1000 0x1000>;
			};

			dma@c2000 {
				compatible = "fsl,fman-dma";
				reg = <0xc2000 0x1000>;
			};

			fpm@c3000 {
				compatible = "fsl,fman-fpm";
				reg = <0xc3000 0x1000>;
			};

			parser@c7000 {
				compatible = "fsl,fman-parser";
				reg = <0xc7000 0x1000>;
			};

			rtc@fe000 {
				compatible = "fsl,fman-rtc";
				reg = <0xfe000 0x1000>;
				linux,phandle = <0x14>;
				phandle = <0x14>;
			};

			port@88000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x88000 0x1000>;
				linux,phandle = <0x12>;
				phandle = <0x12>;
			};

			port@a8000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xa8000 0x1000>;
				fsl,qman-channel-id = <0x41>;
				linux,phandle = <0x13>;
				phandle = <0x13>;
			};

			port@89000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x89000 0x1000>;
				linux,phandle = <0x17>;
				phandle = <0x17>;
			};

			port@a9000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xa9000 0x1000>;
				fsl,qman-channel-id = <0x42>;
				linux,phandle = <0x18>;
				phandle = <0x18>;
			};

			port@8a000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8a000 0x1000>;
				linux,phandle = <0x1b>;
				phandle = <0x1b>;
			};

			port@aa000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xaa000 0x1000>;
				fsl,qman-channel-id = <0x43>;
				linux,phandle = <0x1c>;
				phandle = <0x1c>;
			};

			port@8b000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8b000 0x1000>;
				linux,phandle = <0x1f>;
				phandle = <0x1f>;
			};

			port@ab000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xab000 0x1000>;
				fsl,qman-channel-id = <0x44>;
				linux,phandle = <0x20>;
				phandle = <0x20>;
			};

			port@8c000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8c000 0x1000>;
				linux,phandle = <0x23>;
				phandle = <0x23>;
			};

			port@ac000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xac000 0x1000>;
				fsl,qman-channel-id = <0x45>;
				linux,phandle = <0x24>;
				phandle = <0x24>;
			};

			port@90000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-10g-rx";
				reg = <0x90000 0x1000>;
				linux,phandle = <0x26>;
				phandle = <0x26>;
			};

			port@b0000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-10g-tx";
				reg = <0xb0000 0x1000>;
				fsl,qman-channel-id = <0x40>;
				linux,phandle = <0x27>;
				phandle = <0x27>;
			};
		};

		soc-sram-error {
			compatible = "fsl,soc-sram-error";
			interrupts = <0x10 0x2 0x1 0x1d>;
		};

		corenet-law@0 {
			compatible = "fsl,corenet-law";
			reg = <0x0 0x1000>;
			fsl,num-laws = <0x20>;
		};

		memory-controller@8000 {
			compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
			reg = <0x8000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x17>;
			linux,phandle = <0xb>;
			phandle = <0xb>;
		};

		l3-cache-controller@10000 {
			compatible = "fsl,p3041-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
			reg = <0x10000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x1b>;
			linux,phandle = <0x4>;
			phandle = <0x4>;
		};

		corenet-cf@18000 {
			compatible = "fsl,corenet-cf";
			reg = <0x18000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x1f>;
			fsl,ccf-num-csdids = <0x20>;
			fsl,ccf-num-snoopids = <0x20>;
		};

		iommu@20000 {
			compatible = "fsl,pamu-v1.0", "fsl,pamu";
			reg = <0x20000 0x4000>;
			ranges = <0x0 0x20000 0x4000>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			interrupts = <0x18 0x2 0x0 0x0 0x10 0x2 0x1 0x1e>;

			pamu@0 {
				reg = <0x0 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
				linux,phandle = <0x2b>;
				phandle = <0x2b>;
			};

			pamu@1000 {
				reg = <0x1000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
				linux,phandle = <0x2d>;
				phandle = <0x2d>;
			};

			pamu@2000 {
				reg = <0x2000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
			};

			pamu@3000 {
				reg = <0x3000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
			};
		};

		pic@40000 {
			interrupt-controller;
			#address-cells = <0x0>;
			#interrupt-cells = <0x4>;
			reg = <0x40000 0x40000>;
			compatible = "fsl,mpic", "chrp,open-pic";
			device_type = "open-pic";
			clock-frequency = <0x0>;
			linux,phandle = <0x1>;
			phandle = <0x1>;
		};

		timer@41100 {
			compatible = "fsl,mpic-global-timer";
			reg = <0x41100 0x100 0x41300 0x4>;
			interrupts = <0x0 0x0 0x3 0x0 0x1 0x0 0x3 0x0 0x2 0x0 0x3 0x0 0x3 0x0 0x3 0x0>;
		};

		msi@41600 {
			compatible = "fsl,mpic-msi";
			reg = <0x41600 0x200 0x44140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xe0 0x0 0x0 0x0 0xe1 0x0 0x0 0x0 0xe2 0x0 0x0 0x0 0xe3 0x0 0x0 0x0 0xe4 0x0 0x0 0x0 0xe5 0x0 0x0 0x0 0xe6 0x0 0x0 0x0 0xe7 0x0 0x0 0x0>;
		};

		msi@41800 {
			compatible = "fsl,mpic-msi";
			reg = <0x41800 0x200 0x45140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xe8 0x0 0x0 0x0 0xe9 0x0 0x0 0x0 0xea 0x0 0x0 0x0 0xeb 0x0 0x0 0x0 0xec 0x0 0x0 0x0 0xed 0x0 0x0 0x0 0xee 0x0 0x0 0x0 0xef 0x0 0x0 0x0>;
		};

		msi@41a00 {
			compatible = "fsl,mpic-msi";
			reg = <0x41a00 0x200 0x46140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xf0 0x0 0x0 0x0 0xf1 0x0 0x0 0x0 0xf2 0x0 0x0 0x0 0xf3 0x0 0x0 0x0 0xf4 0x0 0x0 0x0 0xf5 0x0 0x0 0x0 0xf6 0x0 0x0 0x0 0xf7 0x0 0x0 0x0>;
		};

		timer@42100 {
			compatible = "fsl,mpic-global-timer";
			reg = <0x42100 0x100 0x42300 0x4>;
			interrupts = <0x4 0x0 0x3 0x0 0x5 0x0 0x3 0x0 0x6 0x0 0x3 0x0 0x7 0x0 0x3 0x0>;
		};

		global-utilities@e0000 {
			compatible = "fsl,qoriq-device-config-1.0";
			reg = <0xe0000 0xe00>;
			fsl,has-rstcr;
			#sleep-cells = <0x1>;
			fsl,liodn-bits = <0xc>;
			linux,phandle = <0x2c>;
			phandle = <0x2c>;
		};

		global-utilities@e0e00 {
			compatible = "fsl,qoriq-pin-control-1.0";
			reg = <0xe0e00 0x200>;
			#sleep-cells = <0x2>;
		};

		global-utilities@e1000 {
			compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0", "fixed-clock";
			reg = <0xe1000 0x1000>;
			clock-frequency = <0x0>;
			clock-output-names = "sysclk";
			#clock-cells = <0x0>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			linux,phandle = <0x28>;
			phandle = <0x28>;

			pll1@800 {
				#clock-cells = <0x1>;
				reg = <0x800>;
				compatible = "fsl,core-pll-clock";
				clocks = <0x28>;
				clock-output-names = "pll0", "pll0-div2";
				linux,phandle = <0x29>;
				phandle = <0x29>;
			};

			pll1@820 {
				#clock-cells = <0x1>;
				reg = <0x820>;
				compatible = "fsl,core-pll-clock";
				clocks = <0x28>;
				clock-output-names = "pll1", "pll1-div2";
				linux,phandle = <0x2a>;
				phandle = <0x2a>;
			};

			mux0@0 {
				#clock-cells = <0x0>;
				reg = <0x0>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux0";
				linux,phandle = <0x2>;
				phandle = <0x2>;
			};

			mux1@20 {
				#clock-cells = <0x0>;
				reg = <0x20>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux1";
				linux,phandle = <0x5>;
				phandle = <0x5>;
			};

			mux2@40 {
				#clock-cells = <0x0>;
				reg = <0x40>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux2";
				linux,phandle = <0x7>;
				phandle = <0x7>;
			};

			mux3@60 {
				#clock-cells = <0x0>;
				reg = <0x60>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux3";
				linux,phandle = <0x9>;
				phandle = <0x9>;
			};
		};

		global-utilities@e2000 {
			compatible = "fsl,qoriq-rcpm-1.0";
			reg = <0xe2000 0x1000>;
			#sleep-cells = <0x1>;
		};

		sfp@e8000 {
			compatible = "fsl,p3041-sfp", "fsl,qoriq-sfp-1.0";
			reg = <0xe8000 0x1000>;
		};

		serdes@ea000 {
			compatible = "fsl,p3041-serdes";
			reg = <0xea000 0x1000>;
		};

		dma@100300 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,eloplus-dma";
			reg = <0x100300 0x4>;
			ranges = <0x0 0x100100 0x200>;
			cell-index = <0x0>;
			fsl,iommu-parent = <0x2b>;
			fsl,liodn-reg = <0x2c 0x580>;

			dma-channel@0 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x0 0x80>;
				cell-index = <0x0>;
				interrupts = <0x1c 0x2 0x0 0x0>;
			};

			dma-channel@80 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x80 0x80>;
				cell-index = <0x1>;
				interrupts = <0x1d 0x2 0x0 0x0>;
			};

			dma-channel@100 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x100 0x80>;
				cell-index = <0x2>;
				interrupts = <0x1e 0x2 0x0 0x0>;
			};

			dma-channel@180 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x180 0x80>;
				cell-index = <0x3>;
				interrupts = <0x1f 0x2 0x0 0x0>;
			};
		};

		dma@101300 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,eloplus-dma";
			reg = <0x101300 0x4>;
			ranges = <0x0 0x101100 0x200>;
			cell-index = <0x1>;
			fsl,iommu-parent = <0x2b>;
			fsl,liodn-reg = <0x2c 0x584>;

			dma-channel@0 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x0 0x80>;
				cell-index = <0x0>;
				interrupts = <0x20 0x2 0x0 0x0>;
			};

			dma-channel@80 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x80 0x80>;
				cell-index = <0x1>;
				interrupts = <0x21 0x2 0x0 0x0>;
			};

			dma-channel@100 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x100 0x80>;
				cell-index = <0x2>;
				interrupts = <0x22 0x2 0x0 0x0>;
			};

			dma-channel@180 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x180 0x80>;
				cell-index = <0x3>;
				interrupts = <0x23 0x2 0x0 0x0>;
			};
		};

		sdhc@114000 {
			compatible = "fsl,p3041-esdhc", "fsl,esdhc";
			reg = <0x114000 0x1000>;
			interrupts = <0x30 0x2 0x0 0x0>;
			clock-frequency = <0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x530>;
			sdhci,auto-cmd12;
		};

		i2c@118000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x0>;
			compatible = "fsl-i2c";
			reg = <0x118000 0x100>;
			interrupts = <0x26 0x2 0x0 0x0>;
			dfsrr;
		};

		i2c@119000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x2>;
			compatible = "fsl-i2c";
			reg = <0x119000 0x100>;
			interrupts = <0x27 0x2 0x0 0x0>;
			dfsrr;
		};

		serial@11c500 {
			cell-index = <0x0>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11c500 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x24 0x2 0x0 0x0>;
		};

		serial@11c600 {
			cell-index = <0x1>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11c600 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x24 0x2 0x0 0x0>;
		};

		serial@11d500 {
			cell-index = <0x2>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11d500 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x25 0x2 0x0 0x0>;
		};

		serial@11d600 {
			cell-index = <0x3>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11d600 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x25 0x2 0x0 0x0>;
		};

		gpio@130000 {
			compatible = "fsl,qoriq-gpio";
			reg = <0x130000 0x1000>;
			interrupts = <0x37 0x2 0x0 0x0>;
			#gpio-cells = <0x2>;
			gpio-controller;
		};

		rman@1e0000 {
			compatible = "fsl,rman";
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			ranges = <0x0 0x1e0000 0x20000>;
			reg = <0x1e0000 0x20000>;
			interrupts = <0x10 0x2 0x1 0xb>;
			fsl,qman-channels-id = <0x62 0x63>;

			inbound-block@0 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x0 0x800>;
			};

			global-cfg@b00 {
				compatible = "fsl,rman-global-cfg";
				reg = <0xb00 0x500>;
			};

			inbound-block@1000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x1000 0x800>;
			};

			inbound-block@2000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x2000 0x800>;
			};

			inbound-block@3000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x3000 0x800>;
			};
		};


		sata@220000 {
			compatible = "fsl,pq-sata-v2";
			reg = <0x220000 0x1000>;
			interrupts = <0x44 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x550>;
		};

		sata@221000 {
			compatible = "fsl,pq-sata-v2";
			reg = <0x221000 0x1000>;
			interrupts = <0x45 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x554>;
		};

		crypto@300000 {
			compatible = "fsl,sec-v4.2", "fsl,sec-v4.0";
			fsl,sec-era = <0x3>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			reg = <0x300000 0x10000>;
			ranges = <0x0 0x300000 0x10000>;
			interrupts = <0x5c 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;

			jr@1000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x1000 0x1000>;
				interrupts = <0x58 0x2 0x0 0x0>;
			};

			jr@2000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x2000 0x1000>;
				interrupts = <0x59 0x2 0x0 0x0>;
			};

			jr@3000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x3000 0x1000>;
				interrupts = <0x5a 0x2 0x0 0x0>;
			};

			jr@4000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x4000 0x1000>;
				interrupts = <0x5b 0x2 0x0 0x0>;
			};

			rtic@6000 {
				compatible = "fsl,sec-v4.2-rtic", "fsl,sec-v4.0-rtic";
				#address-cells = <0x1>;
				#size-cells = <0x1>;
				reg = <0x6000 0x100>;
				ranges = <0x0 0x6100 0xe00>;

				rtic-a@0 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x0 0x20 0x100 0x80>;
				};

				rtic-b@20 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x20 0x20 0x200 0x80>;
				};

				rtic-c@40 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x40 0x20 0x300 0x80>;
				};

				rtic-d@60 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x60 0x20 0x500 0x80>;
				};
			};
		};

		sec_mon@314000 {
			compatible = "fsl,sec-v4.2-mon", "fsl,sec-v4.0-mon";
			reg = <0x314000 0x1000>;
			interrupts = <0x5d 0x2 0x0 0x0>;
		};

		pme@316000 {
			compatible = "fsl,pme";
			reg = <0x316000 0x10000>;
			interrupts = <0x10 0x2 0x1 0x5>;
		};

		qman@318000 {
			compatible = "fsl,qman";
			reg = <0x318000 0x2000>;
			interrupts = <0x10 0x2 0x1 0x3>;
		};

		bman@31a000 {
			compatible = "fsl,bman";
			reg = <0x31a000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x2>;
		};
	};


	localbus@ffe124000 {
		reg = <0xf 0xfe124000 0x0 0x1000>;
		ranges = <0x0 0x0 0xf 0xe8000000 0x8000000 0x2 0x0 0xf 0xffa00000 0x40000 0x3 0x0 0xf 0xffdf0000 0x8000>;
		compatible = "fsl,p3041-elbc", "fsl,elbc", "simple-bus";
		interrupts = <0x19 0x2 0x0 0x0>;
		#address-cells = <0x2>;
		#size-cells = <0x1>;

		flash@0,0 {
			compatible = "cfi-flash";
			reg = <0x0 0x0 0x8000000>;
			bank-width = <0x2>;
			device-width = <0x2>;
		};

		nand@2,0 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,elbc-fcm-nand";
			reg = <0x2 0x0 0x40000>;

			partition@0 {
				label = "NAND U-Boot Image";
				reg = <0x0 0x2000000>;
				read-only;
			};

			partition@2000000 {
				label = "NAND Root File System";
				reg = <0x2000000 0x10000000>;
			};

			partition@12000000 {
				label = "NAND Compressed RFS Image";
				reg = <0x12000000 0x8000000>;
			};

			partition@1a000000 {
				label = "NAND Linux Kernel Image";
				reg = <0x1a000000 0x4000000>;
			};

			partition@1e000000 {
				label = "NAND DTB Image";
				reg = <0x1e000000 0x1000000>;
			};

			partition@1f000000 {
				label = "NAND Writable User area";
				reg = <0x1f000000 0x21000000>;
			};
		};

		board-control@3,0 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,p3041ds-fpga";
			reg = <0x3 0x0 0x30>;
			ranges = <0x0 0x3 0x0 0x30>;

			mdio-mux-emi1 {
				compatible = "mdio-mux-mmioreg", "mdio-mux";
				mdio-parent-bus = <0x2e>;
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				reg = <0x9 0x1>;
				mux-mask = <0x78>;

				rgmii-mdio@28 {
					reg = <0x28>;
					#address-cells = <0x1>;
					#size-cells = <0x0>;

					ethernet-phy@1f {
						reg = <0x1f>;
						linux,phandle = <0x1e>;
						phandle = <0x1e>;
					};
				};
			};
		};
	};

	pcie@ffe200000 {
		reg = <0xf 0xfe200000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x0 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8000000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xf>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x500>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xf>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x28 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x1 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x2 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x3 0x1 0x0 0x0>;
		};
	};

	pcie@ffe201000 {
		reg = <0xf 0xfe201000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8010000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xe>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x504>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xe>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x29 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x5 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x6 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x7 0x1 0x0 0x0>;
		};
	};

	pcie@ffe202000 {
		reg = <0xf 0xfe202000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x40000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8020000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xd>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x508>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xd>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2a 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x9 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0xa 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0xb 0x1 0x0 0x0>;
		};
	};

	pcie@ffe203000 {
		reg = <0xf 0xfe203000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x60000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8030000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xc>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xc>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2b 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x4 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x8 0x1 0x0 0x0>;
		};
	};

	fsl,dpaa {
		compatible = "fsl,p3041-dpaa", "fsl,dpaa";


		ethernet@3 {
			compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet";
			fsl,fman-mac = <0x32>;
		};

	};
};

[-- Attachment #3: p3041ds.dts --]
[-- Type: application/octet-stream, Size: 37048 bytes --]

/dts-v1/;

/ {
	compatible = "fsl,P3041DS";
	#address-cells = <0x2>;
	#size-cells = <0x2>;
	interrupt-parent = <0x1>;
	model = "fsl,P3041DS";

	cpus {
		power-isa-version = "2.06";
		power-isa-b;
		power-isa-e;
		power-isa-atb;
		power-isa-cs;
		power-isa-ds;
		power-isa-e.ed;
		power-isa-e.pd;
		power-isa-e.hv;
		power-isa-e.le;
		power-isa-e.pm;
		power-isa-e.pc;
		power-isa-ecl;
		power-isa-exp;
		power-isa-fp;
		power-isa-fp.r;
		power-isa-mmc;
		power-isa-scpm;
		power-isa-wt;
		fsl,eref-deo;
		mmu-type = "power-embedded";
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		PowerPC,e500mc@0 {
			device_type = "cpu";
			reg = <0x0>;
			clocks = <0x2>;
			next-level-cache = <0x3>;
			linux,phandle = <0xc>;
			phandle = <0xc>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x3>;
				phandle = <0x3>;
			};
		};

		PowerPC,e500mc@1 {
			device_type = "cpu";
			reg = <0x1>;
			clocks = <0x5>;
			next-level-cache = <0x6>;
			linux,phandle = <0xd>;
			phandle = <0xd>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x6>;
				phandle = <0x6>;
			};
		};

		PowerPC,e500mc@2 {
			device_type = "cpu";
			reg = <0x2>;
			clocks = <0x7>;
			next-level-cache = <0x8>;
			linux,phandle = <0xe>;
			phandle = <0xe>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x8>;
				phandle = <0x8>;
			};
		};

		PowerPC,e500mc@3 {
			device_type = "cpu";
			reg = <0x3>;
			clocks = <0x9>;
			next-level-cache = <0xa>;
			linux,phandle = <0xf>;
			phandle = <0xf>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0xa>;
				phandle = <0xa>;
			};
		};
	};

	aliases {
		ccsr = "/soc@ffe000000";
		dcsr = "/dcsr@f00000000";
		serial0 = "/soc@ffe000000/serial@11c500";
		serial1 = "/soc@ffe000000/serial@11c600";
		serial2 = "/soc@ffe000000/serial@11d500";
		serial3 = "/soc@ffe000000/serial@11d600";
		pci0 = "/pcie@ffe200000";
		pci1 = "/pcie@ffe201000";
		pci2 = "/pcie@ffe202000";
		pci3 = "/pcie@ffe203000";
		usb0 = "/soc@ffe000000/usb@210000";
		usb1 = "/soc@ffe000000/usb@211000";
		dma0 = "/soc@ffe000000/dma@100300";
		dma1 = "/soc@ffe000000/dma@101300";
		sdhc = "/soc@ffe000000/sdhc@114000";
		msi0 = "/soc@ffe000000/msi@41600";
		msi1 = "/soc@ffe000000/msi@41800";
		msi2 = "/soc@ffe000000/msi@41a00";
		crypto = "/soc@ffe000000/crypto@300000";
		sec_jr0 = "/soc@ffe000000/crypto@300000/jr@1000";
		sec_jr1 = "/soc@ffe000000/crypto@300000/jr@2000";
		sec_jr2 = "/soc@ffe000000/crypto@300000/jr@3000";
		sec_jr3 = "/soc@ffe000000/crypto@300000/jr@4000";
		rtic_a = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-a@0";
		rtic_b = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-b@20";
		rtic_c = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-c@40";
		rtic_d = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-d@60";
		sec_mon = "/soc@ffe000000/sec_mon@314000";
		rman = "/soc@ffe000000/rman@1e0000";
		pme = "/soc@ffe000000/pme@316000";
		qman = "/soc@ffe000000/qman@318000";
		bman = "/soc@ffe000000/bman@31a000";
		fman0 = "/soc@ffe000000/fman@400000";
		ethernet3 = "/soc@ffe000000/fman@400000/ethernet@e6000";
		phy_rgmii_0 = "/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@8/ethernet-phy@0";
		emi1_rgmii = "/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@8";
	};

	memory {
		device_type = "memory";
	};

	dcsr@f00000000 {
		ranges = <0x0 0xf 0x0 0x1008000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "fsl,dcsr", "simple-bus";

		dcsr-epu@0 {
			compatible = "fsl,p3041-dcsr-epu", "fsl,dcsr-epu";
			interrupts = <0x34 0x2 0x0 0x0 0x54 0x2 0x0 0x0 0x55 0x2 0x0 0x0>;
			reg = <0x0 0x1000>;
		};

		dcsr-npc {
			compatible = "fsl,dcsr-npc";
			reg = <0x1000 0x1000 0x1000000 0x8000>;
		};

		dcsr-nxc@2000 {
			compatible = "fsl,dcsr-nxc";
			reg = <0x2000 0x1000>;
		};

		dcsr-corenet {
			compatible = "fsl,dcsr-corenet";
			reg = <0x8000 0x1000 0xb0000 0x1000>;
		};

		dcsr-dpaa@9000 {
			compatible = "fsl,p3041-dcsr-dpaa", "fsl,dcsr-dpaa";
			reg = <0x9000 0x1000>;
		};

		dcsr-ocn@11000 {
			compatible = "fsl,p3041-dcsr-ocn", "fsl,dcsr-ocn";
			reg = <0x11000 0x1000>;
		};

		dcsr-ddr@12000 {
			compatible = "fsl,dcsr-ddr";
			dev-handle = <0xb>;
			reg = <0x12000 0x1000>;
		};

		dcsr-nal@18000 {
			compatible = "fsl,p3041-dcsr-nal", "fsl,dcsr-nal";
			reg = <0x18000 0x1000>;
		};

		dcsr-rcpm@22000 {
			compatible = "fsl,p3041-dcsr-rcpm", "fsl,dcsr-rcpm";
			reg = <0x22000 0x1000>;
		};

		dcsr-cpu-sb-proxy@40000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xc>;
			reg = <0x40000 0x1000>;
		};

		dcsr-cpu-sb-proxy@41000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xd>;
			reg = <0x41000 0x1000>;
		};

		dcsr-cpu-sb-proxy@42000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xe>;
			reg = <0x42000 0x1000>;
		};

		dcsr-cpu-sb-proxy@43000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xf>;
			reg = <0x43000 0x1000>;
		};
	};

	bman-portals@ff4000000 {
		ranges = <0x0 0xf 0xf4000000 0x200000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "simple-bus";

		bman-portal@0 {
			cell-index = <0x0>;
			compatible = "fsl,bman-portal";
			reg = <0x0 0x4000 0x100000 0x1000>;
			interrupts = <0x69 0x2 0x0 0x0>;
		};

		bman-portal@4000 {
			cell-index = <0x1>;
			compatible = "fsl,bman-portal";
			reg = <0x4000 0x4000 0x101000 0x1000>;
			interrupts = <0x6b 0x2 0x0 0x0>;
		};

		bman-portal@8000 {
			cell-index = <0x2>;
			compatible = "fsl,bman-portal";
			reg = <0x8000 0x4000 0x102000 0x1000>;
			interrupts = <0x6d 0x2 0x0 0x0>;
		};

		bman-portal@c000 {
			cell-index = <0x3>;
			compatible = "fsl,bman-portal";
			reg = <0xc000 0x4000 0x103000 0x1000>;
			interrupts = <0x6f 0x2 0x0 0x0>;
		};

		bman-portal@10000 {
			cell-index = <0x4>;
			compatible = "fsl,bman-portal";
			reg = <0x10000 0x4000 0x104000 0x1000>;
			interrupts = <0x71 0x2 0x0 0x0>;
		};

		bman-portal@14000 {
			cell-index = <0x5>;
			compatible = "fsl,bman-portal";
			reg = <0x14000 0x4000 0x105000 0x1000>;
			interrupts = <0x73 0x2 0x0 0x0>;
		};

		bman-portal@18000 {
			cell-index = <0x6>;
			compatible = "fsl,bman-portal";
			reg = <0x18000 0x4000 0x106000 0x1000>;
			interrupts = <0x75 0x2 0x0 0x0>;
		};

		bman-portal@1c000 {
			cell-index = <0x7>;
			compatible = "fsl,bman-portal";
			reg = <0x1c000 0x4000 0x107000 0x1000>;
			interrupts = <0x77 0x2 0x0 0x0>;
		};

		bman-portal@20000 {
			cell-index = <0x8>;
			compatible = "fsl,bman-portal";
			reg = <0x20000 0x4000 0x108000 0x1000>;
			interrupts = <0x79 0x2 0x0 0x0>;
		};

		bman-portal@24000 {
			cell-index = <0x9>;
			compatible = "fsl,bman-portal";
			reg = <0x24000 0x4000 0x109000 0x1000>;
			interrupts = <0x7b 0x2 0x0 0x0>;
		};

		bman-bpids@0 {
			compatible = "fsl,bpid-range";
			fsl,bpid-range = <0x20 0x20>;
		};
	};

	qman-portals@ff4200000 {
		ranges = <0x0 0xf 0xf4200000 0x200000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "simple-bus";

		qman-portal@0 {
			cell-index = <0x0>;
			compatible = "fsl,qman-portal";
			reg = <0x0 0x4000 0x100000 0x1000>;
			interrupts = <0x68 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x0>;
		};

		qman-portal@4000 {
			cell-index = <0x1>;
			compatible = "fsl,qman-portal";
			reg = <0x4000 0x4000 0x101000 0x1000>;
			interrupts = <0x6a 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x1>;
		};

		qman-portal@8000 {
			cell-index = <0x2>;
			compatible = "fsl,qman-portal";
			reg = <0x8000 0x4000 0x102000 0x1000>;
			interrupts = <0x6c 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x2>;
		};

		qman-portal@c000 {
			cell-index = <0x3>;
			compatible = "fsl,qman-portal";
			reg = <0xc000 0x4000 0x103000 0x1000>;
			interrupts = <0x6e 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x3>;
		};

		qman-portal@10000 {
			cell-index = <0x4>;
			compatible = "fsl,qman-portal";
			reg = <0x10000 0x4000 0x104000 0x1000>;
			interrupts = <0x70 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x4>;
		};

		qman-portal@14000 {
			cell-index = <0x5>;
			compatible = "fsl,qman-portal";
			reg = <0x14000 0x4000 0x105000 0x1000>;
			interrupts = <0x72 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x5>;
		};

		qman-portal@18000 {
			cell-index = <0x6>;
			compatible = "fsl,qman-portal";
			reg = <0x18000 0x4000 0x106000 0x1000>;
			interrupts = <0x74 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x6>;
		};

		qman-portal@1c000 {
			cell-index = <0x7>;
			compatible = "fsl,qman-portal";
			reg = <0x1c000 0x4000 0x107000 0x1000>;
			interrupts = <0x76 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x7>;
		};

		qman-portal@20000 {
			cell-index = <0x8>;
			compatible = "fsl,qman-portal";
			reg = <0x20000 0x4000 0x108000 0x1000>;
			interrupts = <0x78 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x8>;
		};

		qman-portal@24000 {
			cell-index = <0x9>;
			compatible = "fsl,qman-portal";
			reg = <0x24000 0x4000 0x109000 0x1000>;
			interrupts = <0x7a 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x9>;
		};

		qman-fqids@0 {
			compatible = "fsl,fqid-range";
			fsl,fqid-range = <0x100 0x100>;
		};

		qman-fqids@1 {
			compatible = "fsl,fqid-range";
			fsl,fqid-range = <0x8000 0x8000>;
		};

		qman-pools@0 {
			compatible = "fsl,pool-channel-range";
			fsl,pool-channel-range = <0x21 0xf>;
		};

		qman-cgrids@0 {
			compatible = "fsl,cgrid-range";
			fsl,cgrid-range = <0x0 0x100>;
		};
	};

	soc@ffe000000 {
		ranges = <0x0 0xf 0xfe000000 0x1000000>;
		reg = <0xf 0xfe000000 0x0 0x1000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		device_type = "soc";
		compatible = "simple-bus";

		spi@110000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			compatible = "fsl,mpc8536-espi";
			reg = <0x110000 0x1000>;
			interrupts = <0x35 0x2 0x0 0x0>;
			fsl,espi-num-chipselects = <0x4>;

			flash@0 {
				#address-cells = <0x1>;
				#size-cells = <0x1>;
				compatible = "spansion,s25sl12801";
				reg = <0x0>;
				spi-max-frequency = <0x2160ec0>;

				partition@u-boot {
					label = "u-boot";
					reg = <0x0 0x100000>;
					read-only;
				};

				partition@kernel {
					label = "kernel";
					reg = <0x100000 0x500000>;
					read-only;
				};

				partition@dtb {
					label = "dtb";
					reg = <0x600000 0x100000>;
					read-only;
				};

				partition@fs {
					label = "file system";
					reg = <0x700000 0x900000>;
				};
			};
		};

		i2c@118100 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x1>;
			compatible = "fsl-i2c";
			reg = <0x118100 0x100>;
			interrupts = <0x26 0x2 0x0 0x0>;
			dfsrr;

			eeprom@51 {
				compatible = "at24,24c256";
				reg = <0x51>;
			};

			eeprom@52 {
				compatible = "at24,24c256";
				reg = <0x52>;
			};
		};

		i2c@119100 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x3>;
			compatible = "fsl-i2c";
			reg = <0x119100 0x100>;
			interrupts = <0x27 0x2 0x0 0x0>;
			dfsrr;

			rtc@68 {
				compatible = "dallas,ds3232";
				reg = <0x68>;
				interrupts = <0x1 0x1 0x0 0x0>;
			};

			adt7461@4c {
				compatible = "adi,adt7461";
				reg = <0x4c>;
			};
		};

		fman@400000 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			cell-index = <0x0>;
			compatible = "fsl,fman", "simple-bus";
			ranges = <0x0 0x400000 0x100000>;
			reg = <0x400000 0x100000>;
			clock-frequency = <0x0>;
			interrupts = <0x60 0x2 0x0 0x0 0x10 0x2 0x1 0x1>;

			ethernet@e0000 {
				tbi-handle = <0x10>;
				phy-handle = <0x11>;
				phy-connection-type = "sgmii";
				cell-index = <0x0>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe0000 0x1000>;
				fsl,port-handles = <0x12 0x13>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x2f>;
				phandle = <0x2f>;
			};

			mdio@e1120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-mdio";
				reg = <0xe1120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;
				linux,phandle = <0x2e>;
				phandle = <0x2e>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x10>;
					phandle = <0x10>;
				};
			};

			ethernet@e2000 {
				tbi-handle = <0x15>;
				phy-handle = <0x16>;
				phy-connection-type = "sgmii";
				cell-index = <0x1>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe2000 0x1000>;
				fsl,port-handles = <0x17 0x18>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x30>;
				phandle = <0x30>;
			};

			mdio@e3120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-tbi";
				reg = <0xe3120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x15>;
					phandle = <0x15>;
				};
			};

			ethernet@e4000 {
				tbi-handle = <0x19>;
				phy-handle = <0x1a>;
				phy-connection-type = "sgmii";
				cell-index = <0x2>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe4000 0x1000>;
				fsl,port-handles = <0x1b 0x1c>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x31>;
				phandle = <0x31>;
			};

			mdio@e5120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-tbi";
				reg = <0xe5120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x19>;
					phandle = <0x19>;
				};
			};


			ethernet@e6000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe6000 0x1000>;
				fsl,port-handles = <0x1f 0x20>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x32>;
				phandle = <0x32>;
			};



			cc {
				compatible = "fsl,fman-cc";
			};

			muram@0 {
				compatible = "fsl,fman-muram";
				reg = <0x0 0x28000>;
			};

			bmi@80000 {
				compatible = "fsl,fman-bmi";
				reg = <0x80000 0x400>;
			};

			qmi@80400 {
				compatible = "fsl,fman-qmi";
				reg = <0x80400 0x400>;
			};

			port@81000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-oh";
				reg = <0x81000 0x1000>;
				fsl,qman-channel-id = <0x46>;
			};

			port@82000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-oh";
				reg = <0x82000 0x1000>;
				fsl,qman-channel-id = <0x47>;
			};

			port@83000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-oh";
				reg = <0x83000 0x1000>;
				fsl,qman-channel-id = <0x48>;
			};

			port@84000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-oh";
				reg = <0x84000 0x1000>;
				fsl,qman-channel-id = <0x49>;
			};

			port@85000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-oh";
				reg = <0x85000 0x1000>;
				status = "disabled";
				fsl,qman-channel-id = <0x4a>;
			};

			port@86000 {
				cell-index = <0x5>;
				compatible = "fsl,fman-port-oh";
				reg = <0x86000 0x1000>;
				status = "disabled";
				fsl,qman-channel-id = <0x4b>;
			};

			port@87000 {
				cell-index = <0x6>;
				compatible = "fsl,fman-port-oh";
				reg = <0x87000 0x1000>;
				status = "disabled";
			};

			policer@c0000 {
				compatible = "fsl,fman-policer";
				reg = <0xc0000 0x1000>;
			};

			keygen@c1000 {
				compatible = "fsl,fman-keygen";
				reg = <0xc1000 0x1000>;
			};

			dma@c2000 {
				compatible = "fsl,fman-dma";
				reg = <0xc2000 0x1000>;
			};

			fpm@c3000 {
				compatible = "fsl,fman-fpm";
				reg = <0xc3000 0x1000>;
			};

			parser@c7000 {
				compatible = "fsl,fman-parser";
				reg = <0xc7000 0x1000>;
			};

			rtc@fe000 {
				compatible = "fsl,fman-rtc";
				reg = <0xfe000 0x1000>;
				linux,phandle = <0x14>;
				phandle = <0x14>;
			};

			port@88000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x88000 0x1000>;
				linux,phandle = <0x12>;
				phandle = <0x12>;
			};

			port@a8000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xa8000 0x1000>;
				fsl,qman-channel-id = <0x41>;
				linux,phandle = <0x13>;
				phandle = <0x13>;
			};

			port@89000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x89000 0x1000>;
				linux,phandle = <0x17>;
				phandle = <0x17>;
			};

			port@a9000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xa9000 0x1000>;
				fsl,qman-channel-id = <0x42>;
				linux,phandle = <0x18>;
				phandle = <0x18>;
			};

			port@8a000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8a000 0x1000>;
				linux,phandle = <0x1b>;
				phandle = <0x1b>;
			};

			port@aa000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xaa000 0x1000>;
				fsl,qman-channel-id = <0x43>;
				linux,phandle = <0x1c>;
				phandle = <0x1c>;
			};

			port@8b000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8b000 0x1000>;
				linux,phandle = <0x1f>;
				phandle = <0x1f>;
			};

			port@ab000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xab000 0x1000>;
				fsl,qman-channel-id = <0x44>;
				linux,phandle = <0x20>;
				phandle = <0x20>;
			};

			port@8c000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8c000 0x1000>;
				linux,phandle = <0x23>;
				phandle = <0x23>;
			};

			port@ac000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xac000 0x1000>;
				fsl,qman-channel-id = <0x45>;
				linux,phandle = <0x24>;
				phandle = <0x24>;
			};

			port@90000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-10g-rx";
				reg = <0x90000 0x1000>;
				linux,phandle = <0x26>;
				phandle = <0x26>;
			};

			port@b0000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-10g-tx";
				reg = <0xb0000 0x1000>;
				fsl,qman-channel-id = <0x40>;
				linux,phandle = <0x27>;
				phandle = <0x27>;
			};
		};

		soc-sram-error {
			compatible = "fsl,soc-sram-error";
			interrupts = <0x10 0x2 0x1 0x1d>;
		};

		corenet-law@0 {
			compatible = "fsl,corenet-law";
			reg = <0x0 0x1000>;
			fsl,num-laws = <0x20>;
		};

		memory-controller@8000 {
			compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
			reg = <0x8000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x17>;
			linux,phandle = <0xb>;
			phandle = <0xb>;
		};

		l3-cache-controller@10000 {
			compatible = "fsl,p3041-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
			reg = <0x10000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x1b>;
			linux,phandle = <0x4>;
			phandle = <0x4>;
		};

		corenet-cf@18000 {
			compatible = "fsl,corenet-cf";
			reg = <0x18000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x1f>;
			fsl,ccf-num-csdids = <0x20>;
			fsl,ccf-num-snoopids = <0x20>;
		};

		iommu@20000 {
			compatible = "fsl,pamu-v1.0", "fsl,pamu";
			reg = <0x20000 0x4000>;
			ranges = <0x0 0x20000 0x4000>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			interrupts = <0x18 0x2 0x0 0x0 0x10 0x2 0x1 0x1e>;

			pamu@0 {
				reg = <0x0 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
				linux,phandle = <0x2b>;
				phandle = <0x2b>;
			};

			pamu@1000 {
				reg = <0x1000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
				linux,phandle = <0x2d>;
				phandle = <0x2d>;
			};

			pamu@2000 {
				reg = <0x2000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
			};

			pamu@3000 {
				reg = <0x3000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
			};
		};

		pic@40000 {
			interrupt-controller;
			#address-cells = <0x0>;
			#interrupt-cells = <0x4>;
			reg = <0x40000 0x40000>;
			compatible = "fsl,mpic", "chrp,open-pic";
			device_type = "open-pic";
			clock-frequency = <0x0>;
			linux,phandle = <0x1>;
			phandle = <0x1>;
		};

		timer@41100 {
			compatible = "fsl,mpic-global-timer";
			reg = <0x41100 0x100 0x41300 0x4>;
			interrupts = <0x0 0x0 0x3 0x0 0x1 0x0 0x3 0x0 0x2 0x0 0x3 0x0 0x3 0x0 0x3 0x0>;
		};

		msi@41600 {
			compatible = "fsl,mpic-msi";
			reg = <0x41600 0x200 0x44140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xe0 0x0 0x0 0x0 0xe1 0x0 0x0 0x0 0xe2 0x0 0x0 0x0 0xe3 0x0 0x0 0x0 0xe4 0x0 0x0 0x0 0xe5 0x0 0x0 0x0 0xe6 0x0 0x0 0x0 0xe7 0x0 0x0 0x0>;
		};

		msi@41800 {
			compatible = "fsl,mpic-msi";
			reg = <0x41800 0x200 0x45140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xe8 0x0 0x0 0x0 0xe9 0x0 0x0 0x0 0xea 0x0 0x0 0x0 0xeb 0x0 0x0 0x0 0xec 0x0 0x0 0x0 0xed 0x0 0x0 0x0 0xee 0x0 0x0 0x0 0xef 0x0 0x0 0x0>;
		};

		msi@41a00 {
			compatible = "fsl,mpic-msi";
			reg = <0x41a00 0x200 0x46140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xf0 0x0 0x0 0x0 0xf1 0x0 0x0 0x0 0xf2 0x0 0x0 0x0 0xf3 0x0 0x0 0x0 0xf4 0x0 0x0 0x0 0xf5 0x0 0x0 0x0 0xf6 0x0 0x0 0x0 0xf7 0x0 0x0 0x0>;
		};

		timer@42100 {
			compatible = "fsl,mpic-global-timer";
			reg = <0x42100 0x100 0x42300 0x4>;
			interrupts = <0x4 0x0 0x3 0x0 0x5 0x0 0x3 0x0 0x6 0x0 0x3 0x0 0x7 0x0 0x3 0x0>;
		};

		global-utilities@e0000 {
			compatible = "fsl,qoriq-device-config-1.0";
			reg = <0xe0000 0xe00>;
			fsl,has-rstcr;
			#sleep-cells = <0x1>;
			fsl,liodn-bits = <0xc>;
			linux,phandle = <0x2c>;
			phandle = <0x2c>;
		};

		global-utilities@e0e00 {
			compatible = "fsl,qoriq-pin-control-1.0";
			reg = <0xe0e00 0x200>;
			#sleep-cells = <0x2>;
		};

		global-utilities@e1000 {
			compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0", "fixed-clock";
			reg = <0xe1000 0x1000>;
			clock-frequency = <0x0>;
			clock-output-names = "sysclk";
			#clock-cells = <0x0>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			linux,phandle = <0x28>;
			phandle = <0x28>;

			pll1@800 {
				#clock-cells = <0x1>;
				reg = <0x800>;
				compatible = "fsl,core-pll-clock";
				clocks = <0x28>;
				clock-output-names = "pll0", "pll0-div2";
				linux,phandle = <0x29>;
				phandle = <0x29>;
			};

			pll1@820 {
				#clock-cells = <0x1>;
				reg = <0x820>;
				compatible = "fsl,core-pll-clock";
				clocks = <0x28>;
				clock-output-names = "pll1", "pll1-div2";
				linux,phandle = <0x2a>;
				phandle = <0x2a>;
			};

			mux0@0 {
				#clock-cells = <0x0>;
				reg = <0x0>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux0";
				linux,phandle = <0x2>;
				phandle = <0x2>;
			};

			mux1@20 {
				#clock-cells = <0x0>;
				reg = <0x20>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux1";
				linux,phandle = <0x5>;
				phandle = <0x5>;
			};

			mux2@40 {
				#clock-cells = <0x0>;
				reg = <0x40>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux2";
				linux,phandle = <0x7>;
				phandle = <0x7>;
			};

			mux3@60 {
				#clock-cells = <0x0>;
				reg = <0x60>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux3";
				linux,phandle = <0x9>;
				phandle = <0x9>;
			};
		};

		global-utilities@e2000 {
			compatible = "fsl,qoriq-rcpm-1.0";
			reg = <0xe2000 0x1000>;
			#sleep-cells = <0x1>;
		};

		sfp@e8000 {
			compatible = "fsl,p3041-sfp", "fsl,qoriq-sfp-1.0";
			reg = <0xe8000 0x1000>;
		};

		serdes@ea000 {
			compatible = "fsl,p3041-serdes";
			reg = <0xea000 0x1000>;
		};

		dma@100300 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,eloplus-dma";
			reg = <0x100300 0x4>;
			ranges = <0x0 0x100100 0x200>;
			cell-index = <0x0>;
			fsl,iommu-parent = <0x2b>;
			fsl,liodn-reg = <0x2c 0x580>;

			dma-channel@0 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x0 0x80>;
				cell-index = <0x0>;
				interrupts = <0x1c 0x2 0x0 0x0>;
			};

			dma-channel@80 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x80 0x80>;
				cell-index = <0x1>;
				interrupts = <0x1d 0x2 0x0 0x0>;
			};

			dma-channel@100 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x100 0x80>;
				cell-index = <0x2>;
				interrupts = <0x1e 0x2 0x0 0x0>;
			};

			dma-channel@180 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x180 0x80>;
				cell-index = <0x3>;
				interrupts = <0x1f 0x2 0x0 0x0>;
			};
		};

		dma@101300 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,eloplus-dma";
			reg = <0x101300 0x4>;
			ranges = <0x0 0x101100 0x200>;
			cell-index = <0x1>;
			fsl,iommu-parent = <0x2b>;
			fsl,liodn-reg = <0x2c 0x584>;

			dma-channel@0 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x0 0x80>;
				cell-index = <0x0>;
				interrupts = <0x20 0x2 0x0 0x0>;
			};

			dma-channel@80 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x80 0x80>;
				cell-index = <0x1>;
				interrupts = <0x21 0x2 0x0 0x0>;
			};

			dma-channel@100 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x100 0x80>;
				cell-index = <0x2>;
				interrupts = <0x22 0x2 0x0 0x0>;
			};

			dma-channel@180 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x180 0x80>;
				cell-index = <0x3>;
				interrupts = <0x23 0x2 0x0 0x0>;
			};
		};

		sdhc@114000 {
			compatible = "fsl,p3041-esdhc", "fsl,esdhc";
			reg = <0x114000 0x1000>;
			interrupts = <0x30 0x2 0x0 0x0>;
			clock-frequency = <0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x530>;
			sdhci,auto-cmd12;
		};

		i2c@118000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x0>;
			compatible = "fsl-i2c";
			reg = <0x118000 0x100>;
			interrupts = <0x26 0x2 0x0 0x0>;
			dfsrr;
		};

		i2c@119000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x2>;
			compatible = "fsl-i2c";
			reg = <0x119000 0x100>;
			interrupts = <0x27 0x2 0x0 0x0>;
			dfsrr;
		};

		serial@11c500 {
			cell-index = <0x0>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11c500 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x24 0x2 0x0 0x0>;
		};

		serial@11c600 {
			cell-index = <0x1>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11c600 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x24 0x2 0x0 0x0>;
		};

		serial@11d500 {
			cell-index = <0x2>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11d500 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x25 0x2 0x0 0x0>;
		};

		serial@11d600 {
			cell-index = <0x3>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11d600 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x25 0x2 0x0 0x0>;
		};

		gpio@130000 {
			compatible = "fsl,qoriq-gpio";
			reg = <0x130000 0x1000>;
			interrupts = <0x37 0x2 0x0 0x0>;
			#gpio-cells = <0x2>;
			gpio-controller;
		};

		rman@1e0000 {
			compatible = "fsl,rman";
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			ranges = <0x0 0x1e0000 0x20000>;
			reg = <0x1e0000 0x20000>;
			interrupts = <0x10 0x2 0x1 0xb>;
			fsl,qman-channels-id = <0x62 0x63>;

			inbound-block@0 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x0 0x800>;
			};

			global-cfg@b00 {
				compatible = "fsl,rman-global-cfg";
				reg = <0xb00 0x500>;
			};

			inbound-block@1000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x1000 0x800>;
			};

			inbound-block@2000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x2000 0x800>;
			};

			inbound-block@3000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x3000 0x800>;
			};
		};

		usb@210000 {
			compatible = "fsl-usb2-mph-v1.6", "fsl-usb2-mph";
			reg = <0x210000 0x1000>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			interrupts = <0x2c 0x2 0x0 0x0>;
			phy_type = "utmi";
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x520>;
			port0;
		};

		usb@211000 {
			compatible = "fsl-usb2-dr-v1.6", "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr";
			reg = <0x211000 0x1000>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			interrupts = <0x2d 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x524>;
			dr_mode = "host";
			phy_type = "utmi";
		};

		sata@220000 {
			compatible = "fsl,pq-sata-v2";
			reg = <0x220000 0x1000>;
			interrupts = <0x44 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x550>;
		};

		sata@221000 {
			compatible = "fsl,pq-sata-v2";
			reg = <0x221000 0x1000>;
			interrupts = <0x45 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x554>;
		};

		crypto@300000 {
			compatible = "fsl,sec-v4.2", "fsl,sec-v4.0";
			fsl,sec-era = <0x3>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			reg = <0x300000 0x10000>;
			ranges = <0x0 0x300000 0x10000>;
			interrupts = <0x5c 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;

			jr@1000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x1000 0x1000>;
				interrupts = <0x58 0x2 0x0 0x0>;
			};

			jr@2000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x2000 0x1000>;
				interrupts = <0x59 0x2 0x0 0x0>;
			};

			jr@3000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x3000 0x1000>;
				interrupts = <0x5a 0x2 0x0 0x0>;
			};

			jr@4000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x4000 0x1000>;
				interrupts = <0x5b 0x2 0x0 0x0>;
			};

			rtic@6000 {
				compatible = "fsl,sec-v4.2-rtic", "fsl,sec-v4.0-rtic";
				#address-cells = <0x1>;
				#size-cells = <0x1>;
				reg = <0x6000 0x100>;
				ranges = <0x0 0x6100 0xe00>;

				rtic-a@0 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x0 0x20 0x100 0x80>;
				};

				rtic-b@20 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x20 0x20 0x200 0x80>;
				};

				rtic-c@40 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x40 0x20 0x300 0x80>;
				};

				rtic-d@60 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x60 0x20 0x500 0x80>;
				};
			};
		};

		sec_mon@314000 {
			compatible = "fsl,sec-v4.2-mon", "fsl,sec-v4.0-mon";
			reg = <0x314000 0x1000>;
			interrupts = <0x5d 0x2 0x0 0x0>;
		};

		pme@316000 {
			compatible = "fsl,pme";
			reg = <0x316000 0x10000>;
			interrupts = <0x10 0x2 0x1 0x5>;
		};

		qman@318000 {
			compatible = "fsl,qman";
			reg = <0x318000 0x2000>;
			interrupts = <0x10 0x2 0x1 0x3>;
		};

		bman@31a000 {
			compatible = "fsl,bman";
			reg = <0x31a000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x2>;
		};
	};

	rapidio@ffe0c0000 {
		reg = <0xf 0xfe0c0000 0x0 0x11000>;
		compatible = "fsl,srio";
		interrupts = <0x10 0x2 0x1 0xb>;
		#address-cells = <0x2>;
		#size-cells = <0x2>;
		fsl,iommu-parent = <0x2b>;
		ranges;

		port1 {
			ranges = <0x0 0x0 0xc 0x20000000 0x0 0x10000000>;
			#address-cells = <0x2>;
			#size-cells = <0x2>;
			cell-index = <0x1>;
			fsl,liodn-reg = <0x2c 0x510>;
		};

		port2 {
			ranges = <0x0 0x0 0xc 0x30000000 0x0 0x10000000>;
			#address-cells = <0x2>;
			#size-cells = <0x2>;
			cell-index = <0x2>;
			fsl,liodn-reg = <0x2c 0x514>;
		};
	};

	localbus@ffe124000 {
		reg = <0xf 0xfe124000 0x0 0x1000>;
		ranges = <0x0 0x0 0xf 0xe8000000 0x8000000 0x2 0x0 0xf 0xffa00000 0x40000 0x3 0x0 0xf 0xffdf0000 0x8000>;
		compatible = "fsl,p3041-elbc", "fsl,elbc", "simple-bus";
		interrupts = <0x19 0x2 0x0 0x0>;
		#address-cells = <0x2>;
		#size-cells = <0x1>;

		flash@0,0 {
			compatible = "cfi-flash";
			reg = <0x0 0x0 0x8000000>;
			bank-width = <0x2>;
			device-width = <0x2>;
		};

		nand@2,0 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,elbc-fcm-nand";
			reg = <0x2 0x0 0x40000>;

			partition@0 {
				label = "NAND U-Boot Image";
				reg = <0x0 0x2000000>;
				read-only;
			};

			partition@2000000 {
				label = "NAND Root File System";
				reg = <0x2000000 0x10000000>;
			};

			partition@12000000 {
				label = "NAND Compressed RFS Image";
				reg = <0x12000000 0x8000000>;
			};

			partition@1a000000 {
				label = "NAND Linux Kernel Image";
				reg = <0x1a000000 0x4000000>;
			};

			partition@1e000000 {
				label = "NAND DTB Image";
				reg = <0x1e000000 0x1000000>;
			};

			partition@1f000000 {
				label = "NAND Writable User area";
				reg = <0x1f000000 0x21000000>;
			};
		};

		board-control@3,0 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,p3041ds-fpga", "fsl,fpga-ngpixis";
			reg = <0x3 0x0 0x30>;
			ranges = <0x0 0x3 0x0 0x30>;

			mdio-mux-emi1 {
				compatible = "mdio-mux-mmioreg", "mdio-mux";
				mdio-parent-bus = <0x2e>;
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				reg = <0x9 0x1>;
				mux-mask = <0x78>;

				rgmii-mdio@8 {
					reg = <0x8>;
					#address-cells = <0x1>;
					#size-cells = <0x0>;

					ethernet-phy@0 {
						reg = <0x0>;
					};
				};
			};
		};
	};

	pcie@ffe200000 {
		reg = <0xf 0xfe200000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x0 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8000000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xf>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x500>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xf>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x28 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x1 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x2 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x3 0x1 0x0 0x0>;
		};
	};

	pcie@ffe201000 {
		reg = <0xf 0xfe201000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8010000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xe>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x504>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xe>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x29 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x5 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x6 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x7 0x1 0x0 0x0>;
		};
	};

	pcie@ffe202000 {
		reg = <0xf 0xfe202000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x40000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8020000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xd>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x508>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xd>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2a 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x9 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0xa 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0xb 0x1 0x0 0x0>;
		};
	};

	pcie@ffe203000 {
		reg = <0xf 0xfe203000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x60000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8030000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xc>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xc>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2b 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x4 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x8 0x1 0x0 0x0>;
		};
	};

	fsl,dpaa {
		compatible = "fsl,p3041-dpaa", "fsl,dpaa";


		ethernet@3 {
			compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet";
			fsl,fman-mac = <0x32>;
		};

	};
};

^ permalink raw reply

* Re: [PATCH 2/4 V2] mmc: esdhc: workaround for dma err in the last system transaction
From: Scott Wood @ 2013-08-23 15:40 UTC (permalink / raw)
  To: Zhang Haijun
  Cc: Wood Scott-B07421, linux-mmc@vger.kernel.org,
	cbouatmailru@gmail.com, cjb@laptop.org,
	linuxppc-dev@lists.ozlabs.org, Xie Xiaobo-R63061
In-Reply-To: <521703AB.8030702@freescale.com>

On Fri, 2013-08-23 at 14:39 +0800, Zhang Haijun wrote:
> Hi, Anton and all
> 
> Is there any advice on these two patches ?
> 
> [PATCH 2/4 V2] mmc: esdhc: workaround for dma err in the last system 
> transaction
> [PATCH 3/4 V3] mmc: esdhc: Correct host version of T4240-R1.0-R2.0.
> 
> 
> [PATCH 1/4 V4] powerpc/85xx: Add support for 85xx cpu type detection
> This patch is Act-by Scott.
> Patch 4/4 is split to four patches and Act-by Anton.
> 
> 
> Thanks all.
> 
> 
> 
[snip]
> >> +	if (!(((SVR_SOC_VER(svr) == SVR_T4240) && (SVR_REV(svr) == 0x10))
> >> ||
> >> +		((SVR_SOC_VER(svr) == SVR_B4860) && (SVR_REV(svr) == 0x10))
> >> ||
> >> +		((SVR_SOC_VER(svr) == SVR_P1010) && (SVR_REV(svr) == 0x10))
> >> ||
> >> +		((SVR_SOC_VER(svr) == SVR_P3041) && (SVR_REV(svr) <= 0x20))
> >> ||
> >> +		((SVR_SOC_VER(svr) == SVR_P2041) && (SVR_REV(svr) <= 0x20))
> >> ||
> >> +		((SVR_SOC_VER(svr) == SVR_P5040) && SVR_REV(svr) == 0x20)))
> >> +		return;

You need to include variants here.  If P5040 is affected, then P5021 is
affected.  If P2041 is affected, then P2040 is affected, etc.

-Scott

^ permalink raw reply

* P3041 What a new ethernet phy change to the device tree
From: Mercier Ivan @ 2013-08-23 15:49 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

Hi everybody,
I have 2 boards based on freescale p3041.
Ethernet works on uboot on the 2 of them but only the eval card
p3041ds works with linux.
So i start modifying the device tree on the other card (wp6.dts) and
now I can see the ethernet device in Linux but I can't configure it.

root@p3041ds:~# ifconfig fm1-gb3 10.0.0.1
fsl_dpa ethernet.14 fm1-gb3: Could not connect to PHY
/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@28/ethernet-phy@1f
fsl_dpa ethernet.14 fm1-gb3: init_phy() = -19
ifconfig: SIOCSIFFLAGS: No such device

It seems to be a phy address misconfiguration on mdio bus but I don't
exactly know what to change on my device tree.
Can anyone look at my two device trees?

thanks a lot

[-- Attachment #2: wp6.dts --]
[-- Type: application/octet-stream, Size: 35142 bytes --]

/dts-v1/;

/ {
	compatible = "fsl,P3041DS";
	#address-cells = <0x2>;
	#size-cells = <0x2>;
	interrupt-parent = <0x1>;
	model = "fsl,P3041DS";

	cpus {
		power-isa-version = "2.06";
		power-isa-b;
		power-isa-e;
		power-isa-atb;
		power-isa-cs;
		power-isa-ds;
		power-isa-e.ed;
		power-isa-e.pd;
		power-isa-e.hv;
		power-isa-e.le;
		power-isa-e.pm;
		power-isa-e.pc;
		power-isa-ecl;
		power-isa-exp;
		power-isa-fp;
		power-isa-fp.r;
		power-isa-mmc;
		power-isa-scpm;
		power-isa-wt;
		fsl,eref-deo;
		mmu-type = "power-embedded";
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		PowerPC,e500mc@0 {
			device_type = "cpu";
			reg = <0x0>;
			clocks = <0x2>;
			next-level-cache = <0x3>;
			linux,phandle = <0xc>;
			phandle = <0xc>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x3>;
				phandle = <0x3>;
			};
		};

		PowerPC,e500mc@1 {
			device_type = "cpu";
			reg = <0x1>;
			clocks = <0x5>;
			next-level-cache = <0x6>;
			linux,phandle = <0xd>;
			phandle = <0xd>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x6>;
				phandle = <0x6>;
			};
		};

		PowerPC,e500mc@2 {
			device_type = "cpu";
			reg = <0x2>;
			clocks = <0x7>;
			next-level-cache = <0x8>;
			linux,phandle = <0xe>;
			phandle = <0xe>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x8>;
				phandle = <0x8>;
			};
		};

		PowerPC,e500mc@3 {
			device_type = "cpu";
			reg = <0x3>;
			clocks = <0x9>;
			next-level-cache = <0xa>;
			linux,phandle = <0xf>;
			phandle = <0xf>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0xa>;
				phandle = <0xa>;
			};
		};
	};

	aliases {
		ccsr = "/soc@ffe000000";
		dcsr = "/dcsr@f00000000";
		serial0 = "/soc@ffe000000/serial@11c500";
		serial1 = "/soc@ffe000000/serial@11c600";
		serial2 = "/soc@ffe000000/serial@11d500";
		serial3 = "/soc@ffe000000/serial@11d600";
		pci0 = "/pcie@ffe200000";
		pci1 = "/pcie@ffe201000";
		pci2 = "/pcie@ffe202000";
		pci3 = "/pcie@ffe203000";
		dma0 = "/soc@ffe000000/dma@100300";
		dma1 = "/soc@ffe000000/dma@101300";
		sdhc = "/soc@ffe000000/sdhc@114000";
		msi0 = "/soc@ffe000000/msi@41600";
		msi1 = "/soc@ffe000000/msi@41800";
		msi2 = "/soc@ffe000000/msi@41a00";
		crypto = "/soc@ffe000000/crypto@300000";
		sec_jr0 = "/soc@ffe000000/crypto@300000/jr@1000";
		sec_jr1 = "/soc@ffe000000/crypto@300000/jr@2000";
		sec_jr2 = "/soc@ffe000000/crypto@300000/jr@3000";
		sec_jr3 = "/soc@ffe000000/crypto@300000/jr@4000";
		rtic_a = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-a@0";
		rtic_b = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-b@20";
		rtic_c = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-c@40";
		rtic_d = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-d@60";
		sec_mon = "/soc@ffe000000/sec_mon@314000";
		rman = "/soc@ffe000000/rman@1e0000";
		pme = "/soc@ffe000000/pme@316000";
		qman = "/soc@ffe000000/qman@318000";
		bman = "/soc@ffe000000/bman@31a000";
		fman0 = "/soc@ffe000000/fman@400000";
		ethernet3 = "/soc@ffe000000/fman@400000/ethernet@e6000";
		phy_rgmii_1f = "/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@28/ethernet-phy@1f";
		emi1_rgmii = "/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@28";
	};

	memory {
		device_type = "memory";
	};

	dcsr@f00000000 {
		ranges = <0x0 0xf 0x0 0x1008000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "fsl,dcsr", "simple-bus";

		dcsr-epu@0 {
			compatible = "fsl,p3041-dcsr-epu", "fsl,dcsr-epu";
			interrupts = <0x34 0x2 0x0 0x0 0x54 0x2 0x0 0x0 0x55 0x2 0x0 0x0>;
			reg = <0x0 0x1000>;
		};

		dcsr-npc {
			compatible = "fsl,dcsr-npc";
			reg = <0x1000 0x1000 0x1000000 0x8000>;
		};

		dcsr-nxc@2000 {
			compatible = "fsl,dcsr-nxc";
			reg = <0x2000 0x1000>;
		};

		dcsr-corenet {
			compatible = "fsl,dcsr-corenet";
			reg = <0x8000 0x1000 0xb0000 0x1000>;
		};

		dcsr-dpaa@9000 {
			compatible = "fsl,p3041-dcsr-dpaa", "fsl,dcsr-dpaa";
			reg = <0x9000 0x1000>;
		};

		dcsr-ocn@11000 {
			compatible = "fsl,p3041-dcsr-ocn", "fsl,dcsr-ocn";
			reg = <0x11000 0x1000>;
		};

		dcsr-ddr@12000 {
			compatible = "fsl,dcsr-ddr";
			dev-handle = <0xb>;
			reg = <0x12000 0x1000>;
		};

		dcsr-nal@18000 {
			compatible = "fsl,p3041-dcsr-nal", "fsl,dcsr-nal";
			reg = <0x18000 0x1000>;
		};

		dcsr-rcpm@22000 {
			compatible = "fsl,p3041-dcsr-rcpm", "fsl,dcsr-rcpm";
			reg = <0x22000 0x1000>;
		};

		dcsr-cpu-sb-proxy@40000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xc>;
			reg = <0x40000 0x1000>;
		};

		dcsr-cpu-sb-proxy@41000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xd>;
			reg = <0x41000 0x1000>;
		};

		dcsr-cpu-sb-proxy@42000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xe>;
			reg = <0x42000 0x1000>;
		};

		dcsr-cpu-sb-proxy@43000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xf>;
			reg = <0x43000 0x1000>;
		};
	};

	bman-portals@ff4000000 {
		ranges = <0x0 0xf 0xf4000000 0x200000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "simple-bus";

		bman-portal@0 {
			cell-index = <0x0>;
			compatible = "fsl,bman-portal";
			reg = <0x0 0x4000 0x100000 0x1000>;
			interrupts = <0x69 0x2 0x0 0x0>;
		};

		bman-portal@4000 {
			cell-index = <0x1>;
			compatible = "fsl,bman-portal";
			reg = <0x4000 0x4000 0x101000 0x1000>;
			interrupts = <0x6b 0x2 0x0 0x0>;
		};

		bman-portal@8000 {
			cell-index = <0x2>;
			compatible = "fsl,bman-portal";
			reg = <0x8000 0x4000 0x102000 0x1000>;
			interrupts = <0x6d 0x2 0x0 0x0>;
		};

		bman-portal@c000 {
			cell-index = <0x3>;
			compatible = "fsl,bman-portal";
			reg = <0xc000 0x4000 0x103000 0x1000>;
			interrupts = <0x6f 0x2 0x0 0x0>;
		};

		bman-portal@10000 {
			cell-index = <0x4>;
			compatible = "fsl,bman-portal";
			reg = <0x10000 0x4000 0x104000 0x1000>;
			interrupts = <0x71 0x2 0x0 0x0>;
		};

		bman-portal@14000 {
			cell-index = <0x5>;
			compatible = "fsl,bman-portal";
			reg = <0x14000 0x4000 0x105000 0x1000>;
			interrupts = <0x73 0x2 0x0 0x0>;
		};

		bman-portal@18000 {
			cell-index = <0x6>;
			compatible = "fsl,bman-portal";
			reg = <0x18000 0x4000 0x106000 0x1000>;
			interrupts = <0x75 0x2 0x0 0x0>;
		};

		bman-portal@1c000 {
			cell-index = <0x7>;
			compatible = "fsl,bman-portal";
			reg = <0x1c000 0x4000 0x107000 0x1000>;
			interrupts = <0x77 0x2 0x0 0x0>;
		};

		bman-portal@20000 {
			cell-index = <0x8>;
			compatible = "fsl,bman-portal";
			reg = <0x20000 0x4000 0x108000 0x1000>;
			interrupts = <0x79 0x2 0x0 0x0>;
		};

		bman-portal@24000 {
			cell-index = <0x9>;
			compatible = "fsl,bman-portal";
			reg = <0x24000 0x4000 0x109000 0x1000>;
			interrupts = <0x7b 0x2 0x0 0x0>;
		};

		bman-bpids@0 {
			compatible = "fsl,bpid-range";
			fsl,bpid-range = <0x20 0x20>;
		};
	};

	qman-portals@ff4200000 {
		ranges = <0x0 0xf 0xf4200000 0x200000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "simple-bus";

		qman-portal@0 {
			cell-index = <0x0>;
			compatible = "fsl,qman-portal";
			reg = <0x0 0x4000 0x100000 0x1000>;
			interrupts = <0x68 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x0>;
		};

		qman-portal@4000 {
			cell-index = <0x1>;
			compatible = "fsl,qman-portal";
			reg = <0x4000 0x4000 0x101000 0x1000>;
			interrupts = <0x6a 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x1>;
		};

		qman-portal@8000 {
			cell-index = <0x2>;
			compatible = "fsl,qman-portal";
			reg = <0x8000 0x4000 0x102000 0x1000>;
			interrupts = <0x6c 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x2>;
		};

		qman-portal@c000 {
			cell-index = <0x3>;
			compatible = "fsl,qman-portal";
			reg = <0xc000 0x4000 0x103000 0x1000>;
			interrupts = <0x6e 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x3>;
		};

		qman-portal@10000 {
			cell-index = <0x4>;
			compatible = "fsl,qman-portal";
			reg = <0x10000 0x4000 0x104000 0x1000>;
			interrupts = <0x70 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x4>;
		};

		qman-portal@14000 {
			cell-index = <0x5>;
			compatible = "fsl,qman-portal";
			reg = <0x14000 0x4000 0x105000 0x1000>;
			interrupts = <0x72 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x5>;
		};

		qman-portal@18000 {
			cell-index = <0x6>;
			compatible = "fsl,qman-portal";
			reg = <0x18000 0x4000 0x106000 0x1000>;
			interrupts = <0x74 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x6>;
		};

		qman-portal@1c000 {
			cell-index = <0x7>;
			compatible = "fsl,qman-portal";
			reg = <0x1c000 0x4000 0x107000 0x1000>;
			interrupts = <0x76 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x7>;
		};

		qman-portal@20000 {
			cell-index = <0x8>;
			compatible = "fsl,qman-portal";
			reg = <0x20000 0x4000 0x108000 0x1000>;
			interrupts = <0x78 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x8>;
		};

		qman-portal@24000 {
			cell-index = <0x9>;
			compatible = "fsl,qman-portal";
			reg = <0x24000 0x4000 0x109000 0x1000>;
			interrupts = <0x7a 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x9>;
		};

		qman-fqids@0 {
			compatible = "fsl,fqid-range";
			fsl,fqid-range = <0x100 0x100>;
		};

		qman-fqids@1 {
			compatible = "fsl,fqid-range";
			fsl,fqid-range = <0x8000 0x8000>;
		};

		qman-pools@0 {
			compatible = "fsl,pool-channel-range";
			fsl,pool-channel-range = <0x21 0xf>;
		};

		qman-cgrids@0 {
			compatible = "fsl,cgrid-range";
			fsl,cgrid-range = <0x0 0x100>;
		};
	};

	soc@ffe000000 {
		ranges = <0x0 0xf 0xfe000000 0x1000000>;
		reg = <0xf 0xfe000000 0x0 0x1000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		device_type = "soc";
		compatible = "simple-bus";

		i2c@118100 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x1>;
			compatible = "fsl-i2c";
			reg = <0x118100 0x100>;
			interrupts = <0x26 0x2 0x0 0x0>;
			dfsrr;

			eeprom@51 {
				compatible = "at24,24c256";
				reg = <0x51>;
			};

			eeprom@52 {
				compatible = "at24,24c256";
				reg = <0x52>;
			};
		};

		i2c@119100 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x3>;
			compatible = "fsl-i2c";
			reg = <0x119100 0x100>;
			interrupts = <0x27 0x2 0x0 0x0>;
			dfsrr;

			rtc@68 {
				compatible = "dallas,ds3232";
				reg = <0x68>;
				interrupts = <0x1 0x1 0x0 0x0>;
			};

			adt7461@4c {
				compatible = "adi,adt7461";
				reg = <0x4c>;
			};
		};

		fman@400000 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			cell-index = <0x0>;
			compatible = "fsl,fman", "simple-bus";
			ranges = <0x0 0x400000 0x100000>;
			reg = <0x400000 0x100000>;
			clock-frequency = <0x0>;
			interrupts = <0x60 0x2 0x0 0x0 0x10 0x2 0x1 0x1>;

			ethernet@e0000 {
				tbi-handle = <0x10>;
				phy-handle = <0x11>;
				phy-connection-type = "sgmii";
				cell-index = <0x0>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe0000 0x1000>;
				fsl,port-handles = <0x12 0x13>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x2f>;
				phandle = <0x2f>;
			};

			mdio@e1120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-mdio";
				reg = <0xe1120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;
				linux,phandle = <0x2e>;
				phandle = <0x2e>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x10>;
					phandle = <0x10>;
				};
			};

			ethernet@e2000 {
				tbi-handle = <0x15>;
				phy-handle = <0x16>;
				phy-connection-type = "sgmii";
				cell-index = <0x1>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe2000 0x1000>;
				fsl,port-handles = <0x17 0x18>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x30>;
				phandle = <0x30>;
			};

			mdio@e3120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-tbi";
				reg = <0xe3120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x15>;
					phandle = <0x15>;
				};
			};

			ethernet@e4000 {
				tbi-handle = <0x19>;
				phy-handle = <0x1a>;
				phy-connection-type = "sgmii";
				cell-index = <0x2>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe4000 0x1000>;
				fsl,port-handles = <0x1b 0x1c>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x31>;
				phandle = <0x31>;
			};

			mdio@e5120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-tbi";
				reg = <0xe5120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x19>;
					phandle = <0x19>;
				};
			};


			ethernet@e6000 {
				tbi-handle = <0x1d>;
				phy-handle = <0x1e>;
				cell-index = <0x3>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe6000 0x1000>;
				fsl,port-handles = <0x1f 0x20>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x32>;
				phandle = <0x32>;
			};



			cc {
				compatible = "fsl,fman-cc";
			};

			muram@0 {
				compatible = "fsl,fman-muram";
				reg = <0x0 0x28000>;
			};

			bmi@80000 {
				compatible = "fsl,fman-bmi";
				reg = <0x80000 0x400>;
			};

			qmi@80400 {
				compatible = "fsl,fman-qmi";
				reg = <0x80400 0x400>;
			};

			port@81000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-oh";
				reg = <0x81000 0x1000>;
				fsl,qman-channel-id = <0x46>;
			};

			port@82000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-oh";
				reg = <0x82000 0x1000>;
				fsl,qman-channel-id = <0x47>;
			};

			port@83000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-oh";
				reg = <0x83000 0x1000>;
				fsl,qman-channel-id = <0x48>;
			};

			port@84000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-oh";
				reg = <0x84000 0x1000>;
				fsl,qman-channel-id = <0x49>;
			};

			port@85000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-oh";
				reg = <0x85000 0x1000>;
				status = "disabled";
				fsl,qman-channel-id = <0x4a>;
			};

			port@86000 {
				cell-index = <0x5>;
				compatible = "fsl,fman-port-oh";
				reg = <0x86000 0x1000>;
				status = "disabled";
				fsl,qman-channel-id = <0x4b>;
			};

			port@87000 {
				cell-index = <0x6>;
				compatible = "fsl,fman-port-oh";
				reg = <0x87000 0x1000>;
				status = "disabled";
			};

			policer@c0000 {
				compatible = "fsl,fman-policer";
				reg = <0xc0000 0x1000>;
			};

			keygen@c1000 {
				compatible = "fsl,fman-keygen";
				reg = <0xc1000 0x1000>;
			};

			dma@c2000 {
				compatible = "fsl,fman-dma";
				reg = <0xc2000 0x1000>;
			};

			fpm@c3000 {
				compatible = "fsl,fman-fpm";
				reg = <0xc3000 0x1000>;
			};

			parser@c7000 {
				compatible = "fsl,fman-parser";
				reg = <0xc7000 0x1000>;
			};

			rtc@fe000 {
				compatible = "fsl,fman-rtc";
				reg = <0xfe000 0x1000>;
				linux,phandle = <0x14>;
				phandle = <0x14>;
			};

			port@88000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x88000 0x1000>;
				linux,phandle = <0x12>;
				phandle = <0x12>;
			};

			port@a8000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xa8000 0x1000>;
				fsl,qman-channel-id = <0x41>;
				linux,phandle = <0x13>;
				phandle = <0x13>;
			};

			port@89000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x89000 0x1000>;
				linux,phandle = <0x17>;
				phandle = <0x17>;
			};

			port@a9000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xa9000 0x1000>;
				fsl,qman-channel-id = <0x42>;
				linux,phandle = <0x18>;
				phandle = <0x18>;
			};

			port@8a000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8a000 0x1000>;
				linux,phandle = <0x1b>;
				phandle = <0x1b>;
			};

			port@aa000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xaa000 0x1000>;
				fsl,qman-channel-id = <0x43>;
				linux,phandle = <0x1c>;
				phandle = <0x1c>;
			};

			port@8b000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8b000 0x1000>;
				linux,phandle = <0x1f>;
				phandle = <0x1f>;
			};

			port@ab000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xab000 0x1000>;
				fsl,qman-channel-id = <0x44>;
				linux,phandle = <0x20>;
				phandle = <0x20>;
			};

			port@8c000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8c000 0x1000>;
				linux,phandle = <0x23>;
				phandle = <0x23>;
			};

			port@ac000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xac000 0x1000>;
				fsl,qman-channel-id = <0x45>;
				linux,phandle = <0x24>;
				phandle = <0x24>;
			};

			port@90000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-10g-rx";
				reg = <0x90000 0x1000>;
				linux,phandle = <0x26>;
				phandle = <0x26>;
			};

			port@b0000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-10g-tx";
				reg = <0xb0000 0x1000>;
				fsl,qman-channel-id = <0x40>;
				linux,phandle = <0x27>;
				phandle = <0x27>;
			};
		};

		soc-sram-error {
			compatible = "fsl,soc-sram-error";
			interrupts = <0x10 0x2 0x1 0x1d>;
		};

		corenet-law@0 {
			compatible = "fsl,corenet-law";
			reg = <0x0 0x1000>;
			fsl,num-laws = <0x20>;
		};

		memory-controller@8000 {
			compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
			reg = <0x8000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x17>;
			linux,phandle = <0xb>;
			phandle = <0xb>;
		};

		l3-cache-controller@10000 {
			compatible = "fsl,p3041-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
			reg = <0x10000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x1b>;
			linux,phandle = <0x4>;
			phandle = <0x4>;
		};

		corenet-cf@18000 {
			compatible = "fsl,corenet-cf";
			reg = <0x18000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x1f>;
			fsl,ccf-num-csdids = <0x20>;
			fsl,ccf-num-snoopids = <0x20>;
		};

		iommu@20000 {
			compatible = "fsl,pamu-v1.0", "fsl,pamu";
			reg = <0x20000 0x4000>;
			ranges = <0x0 0x20000 0x4000>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			interrupts = <0x18 0x2 0x0 0x0 0x10 0x2 0x1 0x1e>;

			pamu@0 {
				reg = <0x0 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
				linux,phandle = <0x2b>;
				phandle = <0x2b>;
			};

			pamu@1000 {
				reg = <0x1000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
				linux,phandle = <0x2d>;
				phandle = <0x2d>;
			};

			pamu@2000 {
				reg = <0x2000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
			};

			pamu@3000 {
				reg = <0x3000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
			};
		};

		pic@40000 {
			interrupt-controller;
			#address-cells = <0x0>;
			#interrupt-cells = <0x4>;
			reg = <0x40000 0x40000>;
			compatible = "fsl,mpic", "chrp,open-pic";
			device_type = "open-pic";
			clock-frequency = <0x0>;
			linux,phandle = <0x1>;
			phandle = <0x1>;
		};

		timer@41100 {
			compatible = "fsl,mpic-global-timer";
			reg = <0x41100 0x100 0x41300 0x4>;
			interrupts = <0x0 0x0 0x3 0x0 0x1 0x0 0x3 0x0 0x2 0x0 0x3 0x0 0x3 0x0 0x3 0x0>;
		};

		msi@41600 {
			compatible = "fsl,mpic-msi";
			reg = <0x41600 0x200 0x44140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xe0 0x0 0x0 0x0 0xe1 0x0 0x0 0x0 0xe2 0x0 0x0 0x0 0xe3 0x0 0x0 0x0 0xe4 0x0 0x0 0x0 0xe5 0x0 0x0 0x0 0xe6 0x0 0x0 0x0 0xe7 0x0 0x0 0x0>;
		};

		msi@41800 {
			compatible = "fsl,mpic-msi";
			reg = <0x41800 0x200 0x45140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xe8 0x0 0x0 0x0 0xe9 0x0 0x0 0x0 0xea 0x0 0x0 0x0 0xeb 0x0 0x0 0x0 0xec 0x0 0x0 0x0 0xed 0x0 0x0 0x0 0xee 0x0 0x0 0x0 0xef 0x0 0x0 0x0>;
		};

		msi@41a00 {
			compatible = "fsl,mpic-msi";
			reg = <0x41a00 0x200 0x46140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xf0 0x0 0x0 0x0 0xf1 0x0 0x0 0x0 0xf2 0x0 0x0 0x0 0xf3 0x0 0x0 0x0 0xf4 0x0 0x0 0x0 0xf5 0x0 0x0 0x0 0xf6 0x0 0x0 0x0 0xf7 0x0 0x0 0x0>;
		};

		timer@42100 {
			compatible = "fsl,mpic-global-timer";
			reg = <0x42100 0x100 0x42300 0x4>;
			interrupts = <0x4 0x0 0x3 0x0 0x5 0x0 0x3 0x0 0x6 0x0 0x3 0x0 0x7 0x0 0x3 0x0>;
		};

		global-utilities@e0000 {
			compatible = "fsl,qoriq-device-config-1.0";
			reg = <0xe0000 0xe00>;
			fsl,has-rstcr;
			#sleep-cells = <0x1>;
			fsl,liodn-bits = <0xc>;
			linux,phandle = <0x2c>;
			phandle = <0x2c>;
		};

		global-utilities@e0e00 {
			compatible = "fsl,qoriq-pin-control-1.0";
			reg = <0xe0e00 0x200>;
			#sleep-cells = <0x2>;
		};

		global-utilities@e1000 {
			compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0", "fixed-clock";
			reg = <0xe1000 0x1000>;
			clock-frequency = <0x0>;
			clock-output-names = "sysclk";
			#clock-cells = <0x0>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			linux,phandle = <0x28>;
			phandle = <0x28>;

			pll1@800 {
				#clock-cells = <0x1>;
				reg = <0x800>;
				compatible = "fsl,core-pll-clock";
				clocks = <0x28>;
				clock-output-names = "pll0", "pll0-div2";
				linux,phandle = <0x29>;
				phandle = <0x29>;
			};

			pll1@820 {
				#clock-cells = <0x1>;
				reg = <0x820>;
				compatible = "fsl,core-pll-clock";
				clocks = <0x28>;
				clock-output-names = "pll1", "pll1-div2";
				linux,phandle = <0x2a>;
				phandle = <0x2a>;
			};

			mux0@0 {
				#clock-cells = <0x0>;
				reg = <0x0>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux0";
				linux,phandle = <0x2>;
				phandle = <0x2>;
			};

			mux1@20 {
				#clock-cells = <0x0>;
				reg = <0x20>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux1";
				linux,phandle = <0x5>;
				phandle = <0x5>;
			};

			mux2@40 {
				#clock-cells = <0x0>;
				reg = <0x40>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux2";
				linux,phandle = <0x7>;
				phandle = <0x7>;
			};

			mux3@60 {
				#clock-cells = <0x0>;
				reg = <0x60>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux3";
				linux,phandle = <0x9>;
				phandle = <0x9>;
			};
		};

		global-utilities@e2000 {
			compatible = "fsl,qoriq-rcpm-1.0";
			reg = <0xe2000 0x1000>;
			#sleep-cells = <0x1>;
		};

		sfp@e8000 {
			compatible = "fsl,p3041-sfp", "fsl,qoriq-sfp-1.0";
			reg = <0xe8000 0x1000>;
		};

		serdes@ea000 {
			compatible = "fsl,p3041-serdes";
			reg = <0xea000 0x1000>;
		};

		dma@100300 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,eloplus-dma";
			reg = <0x100300 0x4>;
			ranges = <0x0 0x100100 0x200>;
			cell-index = <0x0>;
			fsl,iommu-parent = <0x2b>;
			fsl,liodn-reg = <0x2c 0x580>;

			dma-channel@0 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x0 0x80>;
				cell-index = <0x0>;
				interrupts = <0x1c 0x2 0x0 0x0>;
			};

			dma-channel@80 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x80 0x80>;
				cell-index = <0x1>;
				interrupts = <0x1d 0x2 0x0 0x0>;
			};

			dma-channel@100 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x100 0x80>;
				cell-index = <0x2>;
				interrupts = <0x1e 0x2 0x0 0x0>;
			};

			dma-channel@180 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x180 0x80>;
				cell-index = <0x3>;
				interrupts = <0x1f 0x2 0x0 0x0>;
			};
		};

		dma@101300 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,eloplus-dma";
			reg = <0x101300 0x4>;
			ranges = <0x0 0x101100 0x200>;
			cell-index = <0x1>;
			fsl,iommu-parent = <0x2b>;
			fsl,liodn-reg = <0x2c 0x584>;

			dma-channel@0 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x0 0x80>;
				cell-index = <0x0>;
				interrupts = <0x20 0x2 0x0 0x0>;
			};

			dma-channel@80 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x80 0x80>;
				cell-index = <0x1>;
				interrupts = <0x21 0x2 0x0 0x0>;
			};

			dma-channel@100 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x100 0x80>;
				cell-index = <0x2>;
				interrupts = <0x22 0x2 0x0 0x0>;
			};

			dma-channel@180 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x180 0x80>;
				cell-index = <0x3>;
				interrupts = <0x23 0x2 0x0 0x0>;
			};
		};

		sdhc@114000 {
			compatible = "fsl,p3041-esdhc", "fsl,esdhc";
			reg = <0x114000 0x1000>;
			interrupts = <0x30 0x2 0x0 0x0>;
			clock-frequency = <0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x530>;
			sdhci,auto-cmd12;
		};

		i2c@118000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x0>;
			compatible = "fsl-i2c";
			reg = <0x118000 0x100>;
			interrupts = <0x26 0x2 0x0 0x0>;
			dfsrr;
		};

		i2c@119000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x2>;
			compatible = "fsl-i2c";
			reg = <0x119000 0x100>;
			interrupts = <0x27 0x2 0x0 0x0>;
			dfsrr;
		};

		serial@11c500 {
			cell-index = <0x0>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11c500 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x24 0x2 0x0 0x0>;
		};

		serial@11c600 {
			cell-index = <0x1>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11c600 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x24 0x2 0x0 0x0>;
		};

		serial@11d500 {
			cell-index = <0x2>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11d500 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x25 0x2 0x0 0x0>;
		};

		serial@11d600 {
			cell-index = <0x3>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11d600 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x25 0x2 0x0 0x0>;
		};

		gpio@130000 {
			compatible = "fsl,qoriq-gpio";
			reg = <0x130000 0x1000>;
			interrupts = <0x37 0x2 0x0 0x0>;
			#gpio-cells = <0x2>;
			gpio-controller;
		};

		rman@1e0000 {
			compatible = "fsl,rman";
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			ranges = <0x0 0x1e0000 0x20000>;
			reg = <0x1e0000 0x20000>;
			interrupts = <0x10 0x2 0x1 0xb>;
			fsl,qman-channels-id = <0x62 0x63>;

			inbound-block@0 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x0 0x800>;
			};

			global-cfg@b00 {
				compatible = "fsl,rman-global-cfg";
				reg = <0xb00 0x500>;
			};

			inbound-block@1000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x1000 0x800>;
			};

			inbound-block@2000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x2000 0x800>;
			};

			inbound-block@3000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x3000 0x800>;
			};
		};


		sata@220000 {
			compatible = "fsl,pq-sata-v2";
			reg = <0x220000 0x1000>;
			interrupts = <0x44 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x550>;
		};

		sata@221000 {
			compatible = "fsl,pq-sata-v2";
			reg = <0x221000 0x1000>;
			interrupts = <0x45 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x554>;
		};

		crypto@300000 {
			compatible = "fsl,sec-v4.2", "fsl,sec-v4.0";
			fsl,sec-era = <0x3>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			reg = <0x300000 0x10000>;
			ranges = <0x0 0x300000 0x10000>;
			interrupts = <0x5c 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;

			jr@1000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x1000 0x1000>;
				interrupts = <0x58 0x2 0x0 0x0>;
			};

			jr@2000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x2000 0x1000>;
				interrupts = <0x59 0x2 0x0 0x0>;
			};

			jr@3000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x3000 0x1000>;
				interrupts = <0x5a 0x2 0x0 0x0>;
			};

			jr@4000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x4000 0x1000>;
				interrupts = <0x5b 0x2 0x0 0x0>;
			};

			rtic@6000 {
				compatible = "fsl,sec-v4.2-rtic", "fsl,sec-v4.0-rtic";
				#address-cells = <0x1>;
				#size-cells = <0x1>;
				reg = <0x6000 0x100>;
				ranges = <0x0 0x6100 0xe00>;

				rtic-a@0 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x0 0x20 0x100 0x80>;
				};

				rtic-b@20 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x20 0x20 0x200 0x80>;
				};

				rtic-c@40 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x40 0x20 0x300 0x80>;
				};

				rtic-d@60 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x60 0x20 0x500 0x80>;
				};
			};
		};

		sec_mon@314000 {
			compatible = "fsl,sec-v4.2-mon", "fsl,sec-v4.0-mon";
			reg = <0x314000 0x1000>;
			interrupts = <0x5d 0x2 0x0 0x0>;
		};

		pme@316000 {
			compatible = "fsl,pme";
			reg = <0x316000 0x10000>;
			interrupts = <0x10 0x2 0x1 0x5>;
		};

		qman@318000 {
			compatible = "fsl,qman";
			reg = <0x318000 0x2000>;
			interrupts = <0x10 0x2 0x1 0x3>;
		};

		bman@31a000 {
			compatible = "fsl,bman";
			reg = <0x31a000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x2>;
		};
	};


	localbus@ffe124000 {
		reg = <0xf 0xfe124000 0x0 0x1000>;
		ranges = <0x0 0x0 0xf 0xe8000000 0x8000000 0x2 0x0 0xf 0xffa00000 0x40000 0x3 0x0 0xf 0xffdf0000 0x8000>;
		compatible = "fsl,p3041-elbc", "fsl,elbc", "simple-bus";
		interrupts = <0x19 0x2 0x0 0x0>;
		#address-cells = <0x2>;
		#size-cells = <0x1>;

		flash@0,0 {
			compatible = "cfi-flash";
			reg = <0x0 0x0 0x8000000>;
			bank-width = <0x2>;
			device-width = <0x2>;
		};

		nand@2,0 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,elbc-fcm-nand";
			reg = <0x2 0x0 0x40000>;

			partition@0 {
				label = "NAND U-Boot Image";
				reg = <0x0 0x2000000>;
				read-only;
			};

			partition@2000000 {
				label = "NAND Root File System";
				reg = <0x2000000 0x10000000>;
			};

			partition@12000000 {
				label = "NAND Compressed RFS Image";
				reg = <0x12000000 0x8000000>;
			};

			partition@1a000000 {
				label = "NAND Linux Kernel Image";
				reg = <0x1a000000 0x4000000>;
			};

			partition@1e000000 {
				label = "NAND DTB Image";
				reg = <0x1e000000 0x1000000>;
			};

			partition@1f000000 {
				label = "NAND Writable User area";
				reg = <0x1f000000 0x21000000>;
			};
		};

		board-control@3,0 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,p3041ds-fpga";
			reg = <0x3 0x0 0x30>;
			ranges = <0x0 0x3 0x0 0x30>;

			mdio-mux-emi1 {
				compatible = "mdio-mux-mmioreg", "mdio-mux";
				mdio-parent-bus = <0x2e>;
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				reg = <0x9 0x1>;
				mux-mask = <0x78>;

				rgmii-mdio@28 {
					reg = <0x28>;
					#address-cells = <0x1>;
					#size-cells = <0x0>;

					ethernet-phy@1f {
						reg = <0x1f>;
						linux,phandle = <0x1e>;
						phandle = <0x1e>;
					};
				};
			};
		};
	};

	pcie@ffe200000 {
		reg = <0xf 0xfe200000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x0 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8000000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xf>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x500>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xf>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x28 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x1 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x2 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x3 0x1 0x0 0x0>;
		};
	};

	pcie@ffe201000 {
		reg = <0xf 0xfe201000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8010000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xe>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x504>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xe>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x29 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x5 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x6 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x7 0x1 0x0 0x0>;
		};
	};

	pcie@ffe202000 {
		reg = <0xf 0xfe202000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x40000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8020000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xd>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x508>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xd>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2a 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x9 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0xa 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0xb 0x1 0x0 0x0>;
		};
	};

	pcie@ffe203000 {
		reg = <0xf 0xfe203000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x60000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8030000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xc>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xc>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2b 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x4 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x8 0x1 0x0 0x0>;
		};
	};

	fsl,dpaa {
		compatible = "fsl,p3041-dpaa", "fsl,dpaa";


		ethernet@3 {
			compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet";
			fsl,fman-mac = <0x32>;
		};

	};
};

[-- Attachment #3: p3041ds.dts --]
[-- Type: application/octet-stream, Size: 37048 bytes --]

/dts-v1/;

/ {
	compatible = "fsl,P3041DS";
	#address-cells = <0x2>;
	#size-cells = <0x2>;
	interrupt-parent = <0x1>;
	model = "fsl,P3041DS";

	cpus {
		power-isa-version = "2.06";
		power-isa-b;
		power-isa-e;
		power-isa-atb;
		power-isa-cs;
		power-isa-ds;
		power-isa-e.ed;
		power-isa-e.pd;
		power-isa-e.hv;
		power-isa-e.le;
		power-isa-e.pm;
		power-isa-e.pc;
		power-isa-ecl;
		power-isa-exp;
		power-isa-fp;
		power-isa-fp.r;
		power-isa-mmc;
		power-isa-scpm;
		power-isa-wt;
		fsl,eref-deo;
		mmu-type = "power-embedded";
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		PowerPC,e500mc@0 {
			device_type = "cpu";
			reg = <0x0>;
			clocks = <0x2>;
			next-level-cache = <0x3>;
			linux,phandle = <0xc>;
			phandle = <0xc>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x3>;
				phandle = <0x3>;
			};
		};

		PowerPC,e500mc@1 {
			device_type = "cpu";
			reg = <0x1>;
			clocks = <0x5>;
			next-level-cache = <0x6>;
			linux,phandle = <0xd>;
			phandle = <0xd>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x6>;
				phandle = <0x6>;
			};
		};

		PowerPC,e500mc@2 {
			device_type = "cpu";
			reg = <0x2>;
			clocks = <0x7>;
			next-level-cache = <0x8>;
			linux,phandle = <0xe>;
			phandle = <0xe>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0x8>;
				phandle = <0x8>;
			};
		};

		PowerPC,e500mc@3 {
			device_type = "cpu";
			reg = <0x3>;
			clocks = <0x9>;
			next-level-cache = <0xa>;
			linux,phandle = <0xf>;
			phandle = <0xf>;

			l2-cache {
				next-level-cache = <0x4>;
				linux,phandle = <0xa>;
				phandle = <0xa>;
			};
		};
	};

	aliases {
		ccsr = "/soc@ffe000000";
		dcsr = "/dcsr@f00000000";
		serial0 = "/soc@ffe000000/serial@11c500";
		serial1 = "/soc@ffe000000/serial@11c600";
		serial2 = "/soc@ffe000000/serial@11d500";
		serial3 = "/soc@ffe000000/serial@11d600";
		pci0 = "/pcie@ffe200000";
		pci1 = "/pcie@ffe201000";
		pci2 = "/pcie@ffe202000";
		pci3 = "/pcie@ffe203000";
		usb0 = "/soc@ffe000000/usb@210000";
		usb1 = "/soc@ffe000000/usb@211000";
		dma0 = "/soc@ffe000000/dma@100300";
		dma1 = "/soc@ffe000000/dma@101300";
		sdhc = "/soc@ffe000000/sdhc@114000";
		msi0 = "/soc@ffe000000/msi@41600";
		msi1 = "/soc@ffe000000/msi@41800";
		msi2 = "/soc@ffe000000/msi@41a00";
		crypto = "/soc@ffe000000/crypto@300000";
		sec_jr0 = "/soc@ffe000000/crypto@300000/jr@1000";
		sec_jr1 = "/soc@ffe000000/crypto@300000/jr@2000";
		sec_jr2 = "/soc@ffe000000/crypto@300000/jr@3000";
		sec_jr3 = "/soc@ffe000000/crypto@300000/jr@4000";
		rtic_a = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-a@0";
		rtic_b = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-b@20";
		rtic_c = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-c@40";
		rtic_d = "/soc@ffe000000/crypto@300000/rtic@6000/rtic-d@60";
		sec_mon = "/soc@ffe000000/sec_mon@314000";
		rman = "/soc@ffe000000/rman@1e0000";
		pme = "/soc@ffe000000/pme@316000";
		qman = "/soc@ffe000000/qman@318000";
		bman = "/soc@ffe000000/bman@31a000";
		fman0 = "/soc@ffe000000/fman@400000";
		ethernet3 = "/soc@ffe000000/fman@400000/ethernet@e6000";
		phy_rgmii_0 = "/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@8/ethernet-phy@0";
		emi1_rgmii = "/localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@8";
	};

	memory {
		device_type = "memory";
	};

	dcsr@f00000000 {
		ranges = <0x0 0xf 0x0 0x1008000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "fsl,dcsr", "simple-bus";

		dcsr-epu@0 {
			compatible = "fsl,p3041-dcsr-epu", "fsl,dcsr-epu";
			interrupts = <0x34 0x2 0x0 0x0 0x54 0x2 0x0 0x0 0x55 0x2 0x0 0x0>;
			reg = <0x0 0x1000>;
		};

		dcsr-npc {
			compatible = "fsl,dcsr-npc";
			reg = <0x1000 0x1000 0x1000000 0x8000>;
		};

		dcsr-nxc@2000 {
			compatible = "fsl,dcsr-nxc";
			reg = <0x2000 0x1000>;
		};

		dcsr-corenet {
			compatible = "fsl,dcsr-corenet";
			reg = <0x8000 0x1000 0xb0000 0x1000>;
		};

		dcsr-dpaa@9000 {
			compatible = "fsl,p3041-dcsr-dpaa", "fsl,dcsr-dpaa";
			reg = <0x9000 0x1000>;
		};

		dcsr-ocn@11000 {
			compatible = "fsl,p3041-dcsr-ocn", "fsl,dcsr-ocn";
			reg = <0x11000 0x1000>;
		};

		dcsr-ddr@12000 {
			compatible = "fsl,dcsr-ddr";
			dev-handle = <0xb>;
			reg = <0x12000 0x1000>;
		};

		dcsr-nal@18000 {
			compatible = "fsl,p3041-dcsr-nal", "fsl,dcsr-nal";
			reg = <0x18000 0x1000>;
		};

		dcsr-rcpm@22000 {
			compatible = "fsl,p3041-dcsr-rcpm", "fsl,dcsr-rcpm";
			reg = <0x22000 0x1000>;
		};

		dcsr-cpu-sb-proxy@40000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xc>;
			reg = <0x40000 0x1000>;
		};

		dcsr-cpu-sb-proxy@41000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xd>;
			reg = <0x41000 0x1000>;
		};

		dcsr-cpu-sb-proxy@42000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xe>;
			reg = <0x42000 0x1000>;
		};

		dcsr-cpu-sb-proxy@43000 {
			compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
			cpu-handle = <0xf>;
			reg = <0x43000 0x1000>;
		};
	};

	bman-portals@ff4000000 {
		ranges = <0x0 0xf 0xf4000000 0x200000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "simple-bus";

		bman-portal@0 {
			cell-index = <0x0>;
			compatible = "fsl,bman-portal";
			reg = <0x0 0x4000 0x100000 0x1000>;
			interrupts = <0x69 0x2 0x0 0x0>;
		};

		bman-portal@4000 {
			cell-index = <0x1>;
			compatible = "fsl,bman-portal";
			reg = <0x4000 0x4000 0x101000 0x1000>;
			interrupts = <0x6b 0x2 0x0 0x0>;
		};

		bman-portal@8000 {
			cell-index = <0x2>;
			compatible = "fsl,bman-portal";
			reg = <0x8000 0x4000 0x102000 0x1000>;
			interrupts = <0x6d 0x2 0x0 0x0>;
		};

		bman-portal@c000 {
			cell-index = <0x3>;
			compatible = "fsl,bman-portal";
			reg = <0xc000 0x4000 0x103000 0x1000>;
			interrupts = <0x6f 0x2 0x0 0x0>;
		};

		bman-portal@10000 {
			cell-index = <0x4>;
			compatible = "fsl,bman-portal";
			reg = <0x10000 0x4000 0x104000 0x1000>;
			interrupts = <0x71 0x2 0x0 0x0>;
		};

		bman-portal@14000 {
			cell-index = <0x5>;
			compatible = "fsl,bman-portal";
			reg = <0x14000 0x4000 0x105000 0x1000>;
			interrupts = <0x73 0x2 0x0 0x0>;
		};

		bman-portal@18000 {
			cell-index = <0x6>;
			compatible = "fsl,bman-portal";
			reg = <0x18000 0x4000 0x106000 0x1000>;
			interrupts = <0x75 0x2 0x0 0x0>;
		};

		bman-portal@1c000 {
			cell-index = <0x7>;
			compatible = "fsl,bman-portal";
			reg = <0x1c000 0x4000 0x107000 0x1000>;
			interrupts = <0x77 0x2 0x0 0x0>;
		};

		bman-portal@20000 {
			cell-index = <0x8>;
			compatible = "fsl,bman-portal";
			reg = <0x20000 0x4000 0x108000 0x1000>;
			interrupts = <0x79 0x2 0x0 0x0>;
		};

		bman-portal@24000 {
			cell-index = <0x9>;
			compatible = "fsl,bman-portal";
			reg = <0x24000 0x4000 0x109000 0x1000>;
			interrupts = <0x7b 0x2 0x0 0x0>;
		};

		bman-bpids@0 {
			compatible = "fsl,bpid-range";
			fsl,bpid-range = <0x20 0x20>;
		};
	};

	qman-portals@ff4200000 {
		ranges = <0x0 0xf 0xf4200000 0x200000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		compatible = "simple-bus";

		qman-portal@0 {
			cell-index = <0x0>;
			compatible = "fsl,qman-portal";
			reg = <0x0 0x4000 0x100000 0x1000>;
			interrupts = <0x68 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x0>;
		};

		qman-portal@4000 {
			cell-index = <0x1>;
			compatible = "fsl,qman-portal";
			reg = <0x4000 0x4000 0x101000 0x1000>;
			interrupts = <0x6a 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x1>;
		};

		qman-portal@8000 {
			cell-index = <0x2>;
			compatible = "fsl,qman-portal";
			reg = <0x8000 0x4000 0x102000 0x1000>;
			interrupts = <0x6c 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x2>;
		};

		qman-portal@c000 {
			cell-index = <0x3>;
			compatible = "fsl,qman-portal";
			reg = <0xc000 0x4000 0x103000 0x1000>;
			interrupts = <0x6e 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x3>;
		};

		qman-portal@10000 {
			cell-index = <0x4>;
			compatible = "fsl,qman-portal";
			reg = <0x10000 0x4000 0x104000 0x1000>;
			interrupts = <0x70 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x4>;
		};

		qman-portal@14000 {
			cell-index = <0x5>;
			compatible = "fsl,qman-portal";
			reg = <0x14000 0x4000 0x105000 0x1000>;
			interrupts = <0x72 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x5>;
		};

		qman-portal@18000 {
			cell-index = <0x6>;
			compatible = "fsl,qman-portal";
			reg = <0x18000 0x4000 0x106000 0x1000>;
			interrupts = <0x74 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x6>;
		};

		qman-portal@1c000 {
			cell-index = <0x7>;
			compatible = "fsl,qman-portal";
			reg = <0x1c000 0x4000 0x107000 0x1000>;
			interrupts = <0x76 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x7>;
		};

		qman-portal@20000 {
			cell-index = <0x8>;
			compatible = "fsl,qman-portal";
			reg = <0x20000 0x4000 0x108000 0x1000>;
			interrupts = <0x78 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x8>;
		};

		qman-portal@24000 {
			cell-index = <0x9>;
			compatible = "fsl,qman-portal";
			reg = <0x24000 0x4000 0x109000 0x1000>;
			interrupts = <0x7a 0x2 0x0 0x0>;
			fsl,qman-channel-id = <0x9>;
		};

		qman-fqids@0 {
			compatible = "fsl,fqid-range";
			fsl,fqid-range = <0x100 0x100>;
		};

		qman-fqids@1 {
			compatible = "fsl,fqid-range";
			fsl,fqid-range = <0x8000 0x8000>;
		};

		qman-pools@0 {
			compatible = "fsl,pool-channel-range";
			fsl,pool-channel-range = <0x21 0xf>;
		};

		qman-cgrids@0 {
			compatible = "fsl,cgrid-range";
			fsl,cgrid-range = <0x0 0x100>;
		};
	};

	soc@ffe000000 {
		ranges = <0x0 0xf 0xfe000000 0x1000000>;
		reg = <0xf 0xfe000000 0x0 0x1000>;
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		device_type = "soc";
		compatible = "simple-bus";

		spi@110000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			compatible = "fsl,mpc8536-espi";
			reg = <0x110000 0x1000>;
			interrupts = <0x35 0x2 0x0 0x0>;
			fsl,espi-num-chipselects = <0x4>;

			flash@0 {
				#address-cells = <0x1>;
				#size-cells = <0x1>;
				compatible = "spansion,s25sl12801";
				reg = <0x0>;
				spi-max-frequency = <0x2160ec0>;

				partition@u-boot {
					label = "u-boot";
					reg = <0x0 0x100000>;
					read-only;
				};

				partition@kernel {
					label = "kernel";
					reg = <0x100000 0x500000>;
					read-only;
				};

				partition@dtb {
					label = "dtb";
					reg = <0x600000 0x100000>;
					read-only;
				};

				partition@fs {
					label = "file system";
					reg = <0x700000 0x900000>;
				};
			};
		};

		i2c@118100 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x1>;
			compatible = "fsl-i2c";
			reg = <0x118100 0x100>;
			interrupts = <0x26 0x2 0x0 0x0>;
			dfsrr;

			eeprom@51 {
				compatible = "at24,24c256";
				reg = <0x51>;
			};

			eeprom@52 {
				compatible = "at24,24c256";
				reg = <0x52>;
			};
		};

		i2c@119100 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x3>;
			compatible = "fsl-i2c";
			reg = <0x119100 0x100>;
			interrupts = <0x27 0x2 0x0 0x0>;
			dfsrr;

			rtc@68 {
				compatible = "dallas,ds3232";
				reg = <0x68>;
				interrupts = <0x1 0x1 0x0 0x0>;
			};

			adt7461@4c {
				compatible = "adi,adt7461";
				reg = <0x4c>;
			};
		};

		fman@400000 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			cell-index = <0x0>;
			compatible = "fsl,fman", "simple-bus";
			ranges = <0x0 0x400000 0x100000>;
			reg = <0x400000 0x100000>;
			clock-frequency = <0x0>;
			interrupts = <0x60 0x2 0x0 0x0 0x10 0x2 0x1 0x1>;

			ethernet@e0000 {
				tbi-handle = <0x10>;
				phy-handle = <0x11>;
				phy-connection-type = "sgmii";
				cell-index = <0x0>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe0000 0x1000>;
				fsl,port-handles = <0x12 0x13>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x2f>;
				phandle = <0x2f>;
			};

			mdio@e1120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-mdio";
				reg = <0xe1120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;
				linux,phandle = <0x2e>;
				phandle = <0x2e>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x10>;
					phandle = <0x10>;
				};
			};

			ethernet@e2000 {
				tbi-handle = <0x15>;
				phy-handle = <0x16>;
				phy-connection-type = "sgmii";
				cell-index = <0x1>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe2000 0x1000>;
				fsl,port-handles = <0x17 0x18>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x30>;
				phandle = <0x30>;
			};

			mdio@e3120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-tbi";
				reg = <0xe3120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x15>;
					phandle = <0x15>;
				};
			};

			ethernet@e4000 {
				tbi-handle = <0x19>;
				phy-handle = <0x1a>;
				phy-connection-type = "sgmii";
				cell-index = <0x2>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe4000 0x1000>;
				fsl,port-handles = <0x1b 0x1c>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x31>;
				phandle = <0x31>;
			};

			mdio@e5120 {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "fsl,fman-tbi";
				reg = <0xe5120 0xee0>;
				interrupts = <0x64 0x1 0x0 0x0>;

				tbi-phy@8 {
					reg = <0x8>;
					device_type = "tbi-phy";
					linux,phandle = <0x19>;
					phandle = <0x19>;
				};
			};


			ethernet@e6000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-1g-mac";
				reg = <0xe6000 0x1000>;
				fsl,port-handles = <0x1f 0x20>;
				ptimer-handle = <0x14>;
				linux,phandle = <0x32>;
				phandle = <0x32>;
			};



			cc {
				compatible = "fsl,fman-cc";
			};

			muram@0 {
				compatible = "fsl,fman-muram";
				reg = <0x0 0x28000>;
			};

			bmi@80000 {
				compatible = "fsl,fman-bmi";
				reg = <0x80000 0x400>;
			};

			qmi@80400 {
				compatible = "fsl,fman-qmi";
				reg = <0x80400 0x400>;
			};

			port@81000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-oh";
				reg = <0x81000 0x1000>;
				fsl,qman-channel-id = <0x46>;
			};

			port@82000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-oh";
				reg = <0x82000 0x1000>;
				fsl,qman-channel-id = <0x47>;
			};

			port@83000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-oh";
				reg = <0x83000 0x1000>;
				fsl,qman-channel-id = <0x48>;
			};

			port@84000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-oh";
				reg = <0x84000 0x1000>;
				fsl,qman-channel-id = <0x49>;
			};

			port@85000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-oh";
				reg = <0x85000 0x1000>;
				status = "disabled";
				fsl,qman-channel-id = <0x4a>;
			};

			port@86000 {
				cell-index = <0x5>;
				compatible = "fsl,fman-port-oh";
				reg = <0x86000 0x1000>;
				status = "disabled";
				fsl,qman-channel-id = <0x4b>;
			};

			port@87000 {
				cell-index = <0x6>;
				compatible = "fsl,fman-port-oh";
				reg = <0x87000 0x1000>;
				status = "disabled";
			};

			policer@c0000 {
				compatible = "fsl,fman-policer";
				reg = <0xc0000 0x1000>;
			};

			keygen@c1000 {
				compatible = "fsl,fman-keygen";
				reg = <0xc1000 0x1000>;
			};

			dma@c2000 {
				compatible = "fsl,fman-dma";
				reg = <0xc2000 0x1000>;
			};

			fpm@c3000 {
				compatible = "fsl,fman-fpm";
				reg = <0xc3000 0x1000>;
			};

			parser@c7000 {
				compatible = "fsl,fman-parser";
				reg = <0xc7000 0x1000>;
			};

			rtc@fe000 {
				compatible = "fsl,fman-rtc";
				reg = <0xfe000 0x1000>;
				linux,phandle = <0x14>;
				phandle = <0x14>;
			};

			port@88000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x88000 0x1000>;
				linux,phandle = <0x12>;
				phandle = <0x12>;
			};

			port@a8000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xa8000 0x1000>;
				fsl,qman-channel-id = <0x41>;
				linux,phandle = <0x13>;
				phandle = <0x13>;
			};

			port@89000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x89000 0x1000>;
				linux,phandle = <0x17>;
				phandle = <0x17>;
			};

			port@a9000 {
				cell-index = <0x1>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xa9000 0x1000>;
				fsl,qman-channel-id = <0x42>;
				linux,phandle = <0x18>;
				phandle = <0x18>;
			};

			port@8a000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8a000 0x1000>;
				linux,phandle = <0x1b>;
				phandle = <0x1b>;
			};

			port@aa000 {
				cell-index = <0x2>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xaa000 0x1000>;
				fsl,qman-channel-id = <0x43>;
				linux,phandle = <0x1c>;
				phandle = <0x1c>;
			};

			port@8b000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8b000 0x1000>;
				linux,phandle = <0x1f>;
				phandle = <0x1f>;
			};

			port@ab000 {
				cell-index = <0x3>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xab000 0x1000>;
				fsl,qman-channel-id = <0x44>;
				linux,phandle = <0x20>;
				phandle = <0x20>;
			};

			port@8c000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-1g-rx";
				reg = <0x8c000 0x1000>;
				linux,phandle = <0x23>;
				phandle = <0x23>;
			};

			port@ac000 {
				cell-index = <0x4>;
				compatible = "fsl,fman-port-1g-tx";
				reg = <0xac000 0x1000>;
				fsl,qman-channel-id = <0x45>;
				linux,phandle = <0x24>;
				phandle = <0x24>;
			};

			port@90000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-10g-rx";
				reg = <0x90000 0x1000>;
				linux,phandle = <0x26>;
				phandle = <0x26>;
			};

			port@b0000 {
				cell-index = <0x0>;
				compatible = "fsl,fman-port-10g-tx";
				reg = <0xb0000 0x1000>;
				fsl,qman-channel-id = <0x40>;
				linux,phandle = <0x27>;
				phandle = <0x27>;
			};
		};

		soc-sram-error {
			compatible = "fsl,soc-sram-error";
			interrupts = <0x10 0x2 0x1 0x1d>;
		};

		corenet-law@0 {
			compatible = "fsl,corenet-law";
			reg = <0x0 0x1000>;
			fsl,num-laws = <0x20>;
		};

		memory-controller@8000 {
			compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
			reg = <0x8000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x17>;
			linux,phandle = <0xb>;
			phandle = <0xb>;
		};

		l3-cache-controller@10000 {
			compatible = "fsl,p3041-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
			reg = <0x10000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x1b>;
			linux,phandle = <0x4>;
			phandle = <0x4>;
		};

		corenet-cf@18000 {
			compatible = "fsl,corenet-cf";
			reg = <0x18000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x1f>;
			fsl,ccf-num-csdids = <0x20>;
			fsl,ccf-num-snoopids = <0x20>;
		};

		iommu@20000 {
			compatible = "fsl,pamu-v1.0", "fsl,pamu";
			reg = <0x20000 0x4000>;
			ranges = <0x0 0x20000 0x4000>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			interrupts = <0x18 0x2 0x0 0x0 0x10 0x2 0x1 0x1e>;

			pamu@0 {
				reg = <0x0 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
				linux,phandle = <0x2b>;
				phandle = <0x2b>;
			};

			pamu@1000 {
				reg = <0x1000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
				linux,phandle = <0x2d>;
				phandle = <0x2d>;
			};

			pamu@2000 {
				reg = <0x2000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
			};

			pamu@3000 {
				reg = <0x3000 0x1000>;
				fsl,primary-cache-geometry = <0x20 0x1>;
				fsl,secondary-cache-geometry = <0x80 0x2>;
			};
		};

		pic@40000 {
			interrupt-controller;
			#address-cells = <0x0>;
			#interrupt-cells = <0x4>;
			reg = <0x40000 0x40000>;
			compatible = "fsl,mpic", "chrp,open-pic";
			device_type = "open-pic";
			clock-frequency = <0x0>;
			linux,phandle = <0x1>;
			phandle = <0x1>;
		};

		timer@41100 {
			compatible = "fsl,mpic-global-timer";
			reg = <0x41100 0x100 0x41300 0x4>;
			interrupts = <0x0 0x0 0x3 0x0 0x1 0x0 0x3 0x0 0x2 0x0 0x3 0x0 0x3 0x0 0x3 0x0>;
		};

		msi@41600 {
			compatible = "fsl,mpic-msi";
			reg = <0x41600 0x200 0x44140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xe0 0x0 0x0 0x0 0xe1 0x0 0x0 0x0 0xe2 0x0 0x0 0x0 0xe3 0x0 0x0 0x0 0xe4 0x0 0x0 0x0 0xe5 0x0 0x0 0x0 0xe6 0x0 0x0 0x0 0xe7 0x0 0x0 0x0>;
		};

		msi@41800 {
			compatible = "fsl,mpic-msi";
			reg = <0x41800 0x200 0x45140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xe8 0x0 0x0 0x0 0xe9 0x0 0x0 0x0 0xea 0x0 0x0 0x0 0xeb 0x0 0x0 0x0 0xec 0x0 0x0 0x0 0xed 0x0 0x0 0x0 0xee 0x0 0x0 0x0 0xef 0x0 0x0 0x0>;
		};

		msi@41a00 {
			compatible = "fsl,mpic-msi";
			reg = <0x41a00 0x200 0x46140 0x4>;
			msi-available-ranges = <0x0 0x100>;
			interrupts = <0xf0 0x0 0x0 0x0 0xf1 0x0 0x0 0x0 0xf2 0x0 0x0 0x0 0xf3 0x0 0x0 0x0 0xf4 0x0 0x0 0x0 0xf5 0x0 0x0 0x0 0xf6 0x0 0x0 0x0 0xf7 0x0 0x0 0x0>;
		};

		timer@42100 {
			compatible = "fsl,mpic-global-timer";
			reg = <0x42100 0x100 0x42300 0x4>;
			interrupts = <0x4 0x0 0x3 0x0 0x5 0x0 0x3 0x0 0x6 0x0 0x3 0x0 0x7 0x0 0x3 0x0>;
		};

		global-utilities@e0000 {
			compatible = "fsl,qoriq-device-config-1.0";
			reg = <0xe0000 0xe00>;
			fsl,has-rstcr;
			#sleep-cells = <0x1>;
			fsl,liodn-bits = <0xc>;
			linux,phandle = <0x2c>;
			phandle = <0x2c>;
		};

		global-utilities@e0e00 {
			compatible = "fsl,qoriq-pin-control-1.0";
			reg = <0xe0e00 0x200>;
			#sleep-cells = <0x2>;
		};

		global-utilities@e1000 {
			compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0", "fixed-clock";
			reg = <0xe1000 0x1000>;
			clock-frequency = <0x0>;
			clock-output-names = "sysclk";
			#clock-cells = <0x0>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			linux,phandle = <0x28>;
			phandle = <0x28>;

			pll1@800 {
				#clock-cells = <0x1>;
				reg = <0x800>;
				compatible = "fsl,core-pll-clock";
				clocks = <0x28>;
				clock-output-names = "pll0", "pll0-div2";
				linux,phandle = <0x29>;
				phandle = <0x29>;
			};

			pll1@820 {
				#clock-cells = <0x1>;
				reg = <0x820>;
				compatible = "fsl,core-pll-clock";
				clocks = <0x28>;
				clock-output-names = "pll1", "pll1-div2";
				linux,phandle = <0x2a>;
				phandle = <0x2a>;
			};

			mux0@0 {
				#clock-cells = <0x0>;
				reg = <0x0>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux0";
				linux,phandle = <0x2>;
				phandle = <0x2>;
			};

			mux1@20 {
				#clock-cells = <0x0>;
				reg = <0x20>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux1";
				linux,phandle = <0x5>;
				phandle = <0x5>;
			};

			mux2@40 {
				#clock-cells = <0x0>;
				reg = <0x40>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux2";
				linux,phandle = <0x7>;
				phandle = <0x7>;
			};

			mux3@60 {
				#clock-cells = <0x0>;
				reg = <0x60>;
				compatible = "fsl,core-mux-clock";
				clocks = <0x29 0x0 0x29 0x1 0x2a 0x0 0x2a 0x1>;
				clock-names = "pll0_0", "pll0_1", "pll1_0", "pll1_1";
				clock-output-names = "cmux3";
				linux,phandle = <0x9>;
				phandle = <0x9>;
			};
		};

		global-utilities@e2000 {
			compatible = "fsl,qoriq-rcpm-1.0";
			reg = <0xe2000 0x1000>;
			#sleep-cells = <0x1>;
		};

		sfp@e8000 {
			compatible = "fsl,p3041-sfp", "fsl,qoriq-sfp-1.0";
			reg = <0xe8000 0x1000>;
		};

		serdes@ea000 {
			compatible = "fsl,p3041-serdes";
			reg = <0xea000 0x1000>;
		};

		dma@100300 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,eloplus-dma";
			reg = <0x100300 0x4>;
			ranges = <0x0 0x100100 0x200>;
			cell-index = <0x0>;
			fsl,iommu-parent = <0x2b>;
			fsl,liodn-reg = <0x2c 0x580>;

			dma-channel@0 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x0 0x80>;
				cell-index = <0x0>;
				interrupts = <0x1c 0x2 0x0 0x0>;
			};

			dma-channel@80 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x80 0x80>;
				cell-index = <0x1>;
				interrupts = <0x1d 0x2 0x0 0x0>;
			};

			dma-channel@100 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x100 0x80>;
				cell-index = <0x2>;
				interrupts = <0x1e 0x2 0x0 0x0>;
			};

			dma-channel@180 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x180 0x80>;
				cell-index = <0x3>;
				interrupts = <0x1f 0x2 0x0 0x0>;
			};
		};

		dma@101300 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,eloplus-dma";
			reg = <0x101300 0x4>;
			ranges = <0x0 0x101100 0x200>;
			cell-index = <0x1>;
			fsl,iommu-parent = <0x2b>;
			fsl,liodn-reg = <0x2c 0x584>;

			dma-channel@0 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x0 0x80>;
				cell-index = <0x0>;
				interrupts = <0x20 0x2 0x0 0x0>;
			};

			dma-channel@80 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x80 0x80>;
				cell-index = <0x1>;
				interrupts = <0x21 0x2 0x0 0x0>;
			};

			dma-channel@100 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x100 0x80>;
				cell-index = <0x2>;
				interrupts = <0x22 0x2 0x0 0x0>;
			};

			dma-channel@180 {
				compatible = "fsl,eloplus-dma-channel";
				reg = <0x180 0x80>;
				cell-index = <0x3>;
				interrupts = <0x23 0x2 0x0 0x0>;
			};
		};

		sdhc@114000 {
			compatible = "fsl,p3041-esdhc", "fsl,esdhc";
			reg = <0x114000 0x1000>;
			interrupts = <0x30 0x2 0x0 0x0>;
			clock-frequency = <0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x530>;
			sdhci,auto-cmd12;
		};

		i2c@118000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x0>;
			compatible = "fsl-i2c";
			reg = <0x118000 0x100>;
			interrupts = <0x26 0x2 0x0 0x0>;
			dfsrr;
		};

		i2c@119000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			cell-index = <0x2>;
			compatible = "fsl-i2c";
			reg = <0x119000 0x100>;
			interrupts = <0x27 0x2 0x0 0x0>;
			dfsrr;
		};

		serial@11c500 {
			cell-index = <0x0>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11c500 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x24 0x2 0x0 0x0>;
		};

		serial@11c600 {
			cell-index = <0x1>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11c600 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x24 0x2 0x0 0x0>;
		};

		serial@11d500 {
			cell-index = <0x2>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11d500 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x25 0x2 0x0 0x0>;
		};

		serial@11d600 {
			cell-index = <0x3>;
			device_type = "serial";
			compatible = "fsl,ns16550", "ns16550";
			reg = <0x11d600 0x100>;
			clock-frequency = <0x0>;
			interrupts = <0x25 0x2 0x0 0x0>;
		};

		gpio@130000 {
			compatible = "fsl,qoriq-gpio";
			reg = <0x130000 0x1000>;
			interrupts = <0x37 0x2 0x0 0x0>;
			#gpio-cells = <0x2>;
			gpio-controller;
		};

		rman@1e0000 {
			compatible = "fsl,rman";
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			ranges = <0x0 0x1e0000 0x20000>;
			reg = <0x1e0000 0x20000>;
			interrupts = <0x10 0x2 0x1 0xb>;
			fsl,qman-channels-id = <0x62 0x63>;

			inbound-block@0 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x0 0x800>;
			};

			global-cfg@b00 {
				compatible = "fsl,rman-global-cfg";
				reg = <0xb00 0x500>;
			};

			inbound-block@1000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x1000 0x800>;
			};

			inbound-block@2000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x2000 0x800>;
			};

			inbound-block@3000 {
				compatible = "fsl,rman-inbound-block";
				reg = <0x3000 0x800>;
			};
		};

		usb@210000 {
			compatible = "fsl-usb2-mph-v1.6", "fsl-usb2-mph";
			reg = <0x210000 0x1000>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			interrupts = <0x2c 0x2 0x0 0x0>;
			phy_type = "utmi";
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x520>;
			port0;
		};

		usb@211000 {
			compatible = "fsl-usb2-dr-v1.6", "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr";
			reg = <0x211000 0x1000>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			interrupts = <0x2d 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x524>;
			dr_mode = "host";
			phy_type = "utmi";
		};

		sata@220000 {
			compatible = "fsl,pq-sata-v2";
			reg = <0x220000 0x1000>;
			interrupts = <0x44 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x550>;
		};

		sata@221000 {
			compatible = "fsl,pq-sata-v2";
			reg = <0x221000 0x1000>;
			interrupts = <0x45 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;
			fsl,liodn-reg = <0x2c 0x554>;
		};

		crypto@300000 {
			compatible = "fsl,sec-v4.2", "fsl,sec-v4.0";
			fsl,sec-era = <0x3>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			reg = <0x300000 0x10000>;
			ranges = <0x0 0x300000 0x10000>;
			interrupts = <0x5c 0x2 0x0 0x0>;
			fsl,iommu-parent = <0x2d>;

			jr@1000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x1000 0x1000>;
				interrupts = <0x58 0x2 0x0 0x0>;
			};

			jr@2000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x2000 0x1000>;
				interrupts = <0x59 0x2 0x0 0x0>;
			};

			jr@3000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x3000 0x1000>;
				interrupts = <0x5a 0x2 0x0 0x0>;
			};

			jr@4000 {
				compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
				reg = <0x4000 0x1000>;
				interrupts = <0x5b 0x2 0x0 0x0>;
			};

			rtic@6000 {
				compatible = "fsl,sec-v4.2-rtic", "fsl,sec-v4.0-rtic";
				#address-cells = <0x1>;
				#size-cells = <0x1>;
				reg = <0x6000 0x100>;
				ranges = <0x0 0x6100 0xe00>;

				rtic-a@0 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x0 0x20 0x100 0x80>;
				};

				rtic-b@20 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x20 0x20 0x200 0x80>;
				};

				rtic-c@40 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x40 0x20 0x300 0x80>;
				};

				rtic-d@60 {
					compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
					reg = <0x60 0x20 0x500 0x80>;
				};
			};
		};

		sec_mon@314000 {
			compatible = "fsl,sec-v4.2-mon", "fsl,sec-v4.0-mon";
			reg = <0x314000 0x1000>;
			interrupts = <0x5d 0x2 0x0 0x0>;
		};

		pme@316000 {
			compatible = "fsl,pme";
			reg = <0x316000 0x10000>;
			interrupts = <0x10 0x2 0x1 0x5>;
		};

		qman@318000 {
			compatible = "fsl,qman";
			reg = <0x318000 0x2000>;
			interrupts = <0x10 0x2 0x1 0x3>;
		};

		bman@31a000 {
			compatible = "fsl,bman";
			reg = <0x31a000 0x1000>;
			interrupts = <0x10 0x2 0x1 0x2>;
		};
	};

	rapidio@ffe0c0000 {
		reg = <0xf 0xfe0c0000 0x0 0x11000>;
		compatible = "fsl,srio";
		interrupts = <0x10 0x2 0x1 0xb>;
		#address-cells = <0x2>;
		#size-cells = <0x2>;
		fsl,iommu-parent = <0x2b>;
		ranges;

		port1 {
			ranges = <0x0 0x0 0xc 0x20000000 0x0 0x10000000>;
			#address-cells = <0x2>;
			#size-cells = <0x2>;
			cell-index = <0x1>;
			fsl,liodn-reg = <0x2c 0x510>;
		};

		port2 {
			ranges = <0x0 0x0 0xc 0x30000000 0x0 0x10000000>;
			#address-cells = <0x2>;
			#size-cells = <0x2>;
			cell-index = <0x2>;
			fsl,liodn-reg = <0x2c 0x514>;
		};
	};

	localbus@ffe124000 {
		reg = <0xf 0xfe124000 0x0 0x1000>;
		ranges = <0x0 0x0 0xf 0xe8000000 0x8000000 0x2 0x0 0xf 0xffa00000 0x40000 0x3 0x0 0xf 0xffdf0000 0x8000>;
		compatible = "fsl,p3041-elbc", "fsl,elbc", "simple-bus";
		interrupts = <0x19 0x2 0x0 0x0>;
		#address-cells = <0x2>;
		#size-cells = <0x1>;

		flash@0,0 {
			compatible = "cfi-flash";
			reg = <0x0 0x0 0x8000000>;
			bank-width = <0x2>;
			device-width = <0x2>;
		};

		nand@2,0 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,elbc-fcm-nand";
			reg = <0x2 0x0 0x40000>;

			partition@0 {
				label = "NAND U-Boot Image";
				reg = <0x0 0x2000000>;
				read-only;
			};

			partition@2000000 {
				label = "NAND Root File System";
				reg = <0x2000000 0x10000000>;
			};

			partition@12000000 {
				label = "NAND Compressed RFS Image";
				reg = <0x12000000 0x8000000>;
			};

			partition@1a000000 {
				label = "NAND Linux Kernel Image";
				reg = <0x1a000000 0x4000000>;
			};

			partition@1e000000 {
				label = "NAND DTB Image";
				reg = <0x1e000000 0x1000000>;
			};

			partition@1f000000 {
				label = "NAND Writable User area";
				reg = <0x1f000000 0x21000000>;
			};
		};

		board-control@3,0 {
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			compatible = "fsl,p3041ds-fpga", "fsl,fpga-ngpixis";
			reg = <0x3 0x0 0x30>;
			ranges = <0x0 0x3 0x0 0x30>;

			mdio-mux-emi1 {
				compatible = "mdio-mux-mmioreg", "mdio-mux";
				mdio-parent-bus = <0x2e>;
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				reg = <0x9 0x1>;
				mux-mask = <0x78>;

				rgmii-mdio@8 {
					reg = <0x8>;
					#address-cells = <0x1>;
					#size-cells = <0x0>;

					ethernet-phy@0 {
						reg = <0x0>;
					};
				};
			};
		};
	};

	pcie@ffe200000 {
		reg = <0xf 0xfe200000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x0 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8000000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xf>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x500>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xf>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x28 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x1 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x2 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x3 0x1 0x0 0x0>;
		};
	};

	pcie@ffe201000 {
		reg = <0xf 0xfe201000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8010000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xe>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x504>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xe>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x29 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x5 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x6 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x7 0x1 0x0 0x0>;
		};
	};

	pcie@ffe202000 {
		reg = <0xf 0xfe202000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x40000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8020000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xd>;
		fsl,iommu-parent = <0x2b>;
		fsl,liodn-reg = <0x2c 0x508>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xd>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2a 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x9 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0xa 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0xb 0x1 0x0 0x0>;
		};
	};

	pcie@ffe203000 {
		reg = <0xf 0xfe203000 0x0 0x1000>;
		ranges = <0x2000000 0x0 0xe0000000 0xc 0x60000000 0x0 0x20000000 0x1000000 0x0 0x0 0xf 0xf8030000 0x0 0x10000>;
		compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2", "fsl,qoriq-pcie";
		device_type = "pci";
		#size-cells = <0x2>;
		#address-cells = <0x3>;
		bus-range = <0x0 0xff>;
		clock-frequency = <0x1fca055>;
		interrupts = <0x10 0x2 0x1 0xc>;

		pcie@0 {
			ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#interrupt-cells = <0x1>;
			#size-cells = <0x2>;
			#address-cells = <0x3>;
			device_type = "pci";
			interrupts = <0x10 0x2 0x1 0xc>;
			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
			interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2b 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x4 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x8 0x1 0x0 0x0>;
		};
	};

	fsl,dpaa {
		compatible = "fsl,p3041-dpaa", "fsl,dpaa";


		ethernet@3 {
			compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet";
			fsl,fman-mac = <0x32>;
		};

	};
};

^ permalink raw reply

* Re: P3041 What a new ethernet phy change to the device tree
From: Scott Wood @ 2013-08-23 18:04 UTC (permalink / raw)
  To: Mercier Ivan; +Cc: linuxppc-dev
In-Reply-To: <CAMc2ieqb=_8PDMi9QCGxiYDPx2E56F=WFqYzzw5aUicuKDmsTw@mail.gmail.com>

On Fri, 2013-08-23 at 17:49 +0200, Mercier Ivan wrote:
> Hi everybody,
> I have 2 boards based on freescale p3041.
> Ethernet works on uboot on the 2 of them but only the eval card
> p3041ds works with linux.
> So i start modifying the device tree on the other card (wp6.dts) and
> now I can see the ethernet device in Linux but I can't configure it.
> 
> root@p3041ds:~# ifconfig fm1-gb3 10.0.0.1
> fsl_dpa ethernet.14 fm1-gb3: Could not connect to PHY
> /localbus@ffe124000/board-control@3,0/mdio-mux-emi1/rgmii-mdio@28/ethernet-phy@1f
> fsl_dpa ethernet.14 fm1-gb3: init_phy() = -19
> ifconfig: SIOCSIFFLAGS: No such device
> 
> It seems to be a phy address misconfiguration on mdio bus but I don't
> exactly know what to change on my device tree.
> Can anyone look at my two device trees?

It sounds like you're using the Freescale SDK rather than the upstream
kernel (there's no datapath support upstream yet).  For SDK support
please contact support@freescale.com or post a question on
https://community.freescale.com/

-Scott

^ permalink raw reply

* Re: [PATCH v11] ASoC: fsl: Add S/PDIF machine driver
From: Stephen Warren @ 2013-08-23 19:08 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: mark.rutland, devicetree, alsa-devel, lars, s.hauer, tomasz.figa,
	rob.herring, broonie, p.zabel, shawn.guo, linuxppc-dev
In-Reply-To: <fac39ed91818630e03f81a5f0cf9ddde0e6a3c3a.1377244995.git.b42378@freescale.com>

On 08/23/2013 02:04 AM, Nicolin Chen wrote:
> This patch implements a device-tree-only machine driver for Freescale
> i.MX series Soc. It works with spdif_transmitter/spdif_receiver and
> fsl_spdif.c drivers.

The binding looks reasonable to me now. Thanks.

> diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c

> +	if (of_property_read_bool(np, "spdif-out")) {

I'd be tempted to safe those property values into a variable so that ...

> +	data->txdev = platform_device_register_simple("spdif-dit", -1, NULL, 0);
...
> +	data->rxdev = platform_device_register_simple("spdif-dir", -1, NULL, 0);

... those two statements could be conditional upon whether TX/RX were
required too.

However, this isn't a big deal, and could be cleaned up later.

^ permalink raw reply

* Re: [alsa-devel] [PATCH v11] ASoC: fsl: Add S/PDIF machine driver
From: Mark Brown @ 2013-08-23 19:13 UTC (permalink / raw)
  To: Stephen Warren
  Cc: mark.rutland, devicetree, alsa-devel, lars, s.hauer, Nicolin Chen,
	tomasz.figa, rob.herring, p.zabel, shawn.guo, linuxppc-dev
In-Reply-To: <5217B32C.5070300@wwwdotorg.org>

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

On Fri, Aug 23, 2013 at 01:08:28PM -0600, Stephen Warren wrote:
> On 08/23/2013 02:04 AM, Nicolin Chen wrote:
> > This patch implements a device-tree-only machine driver for Freescale
> > i.MX series Soc. It works with spdif_transmitter/spdif_receiver and
> > fsl_spdif.c drivers.

> The binding looks reasonable to me now. Thanks.

Is that a Reviewed-by?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: ppc/sata-fsl: orphan config value: CONFIG_MPC8315_DS
From: Scott Wood @ 2013-08-23 19:25 UTC (permalink / raw)
  To: Anthony Foiani
  Cc: Shaohui.Xie, Robert P.J.Day, linuxppc-dev@lists.ozlabs.org,
	Li Yang-R58472, Adrian Bunk

Bcc: 
Subject: Re: ppc/sata-fsl: orphan config value: CONFIG_MPC8315_DS
Reply-To: 
In-Reply-To: <g7gj9smnc.fsf@dworkin.scrye.com>

On Wed, May 08, 2013 at 06:04:39AM -0600, Anthony Foiani wrote:
> Anthony Foiani <tkil@scrye.com> writes:
> > Maybe I need to call ata_set_sata_spd as well.  Can I do that before
> > discovery, or should it be a part of the port_start callback?  And
> > if the latter, shouldn't it be handled within the ata core, instead
> > of expecting each host driver to do that call?
> 
> My final version calls sata_set_spd from within the hard reset
> callback for the fsl sata driver.
> 
> If there's a better place to put it, please let me know.
> 
> With this patch (and an appropriate entry in the device tree), the
> machine comes up and reports:
> 
>   # cd /sys/devices/e0000000.immr/e0019000.sata
> 
>   # find * -name '*_spd*' -print | xargs grep .
>   ata2/link2/ata_link/link2/sata_spd:1.5 Gbps
>   ata2/link2/ata_link/link2/hw_sata_spd_limit:1.5 Gbps
>   ata2/link2/ata_link/link2/sata_spd_limit:1.5 Gbps
> 
> Which is what I needed to see.
> 
> Thanks for the hints!
> 
> Best regards,
> Anthony Foiani
> 
> ---
> >From 357c96b4f31b457eca0b96147c749c21d0f4f086 Mon Sep 17 00:00:00 2001
> From: Anthony Foiani <anthony.foiani@gmail.com>
> Date: Wed, 8 May 2013 05:24:20 -0600
> Subject: [PATCH] sata: fsl: allow device tree to limit sata speed.
> 
> There used to be an "orphan" config symbol (CONFIG_MPC8315_DS) that
> would artificially limit SATA speed to generation 1 (1.5Gbps).
> 
> Since that config symbol got lost whenever any sort of configuration
> was done, we instead extract the limitation from the device tree,
> using a new name "sata-spd-limit".
> 
> Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
> ---
>  .../devicetree/bindings/powerpc/fsl/board.txt      | 23 ++++++++++++++++++
>  drivers/ata/sata_fsl.c                             | 28 +++++++++++-----------
>  2 files changed, 37 insertions(+), 14 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
> index 380914e..9c9fed4 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
> @@ -67,3 +67,26 @@ Example:
>  			gpio-controller;
>  		};
>  	};
> +
> +* Maximum SATA Generation workaround
> +
> +Some boards advertise SATA speeds that they cannot actually achieve.
> +Previously, this was dealt with via the orphaned config symbol
> +CONFIG_MPC8315_DS.  We now have a device tree property
> +"sata-spd-limit" to control this.  It should live within the "sata"
> +block.
> +
> +Example:
> +
> +		sata@18000 {
> +			compatible = "fsl,mpc8315-sata", "fsl,pq-sata";
> +			reg = <0x18000 0x1000>;
> +			cell-index = <1>;
> +			interrupts = <44 0x8>;
> +			interrupt-parent = <&ipic>;
> +			sata-spd-limit = <1>;
> +		};
>
> +By default, there is no limitation; if a value is given, it indicates
> +the maximum "generation" that should be negotiated.  Gen 1 is 1.5Gbps,
> +Gen 2 is 3.0Gbps.

This should go in Documentation/devicetree/bindings/ata/fsl-sata.txt.

As for the property name, I'd prefer "fsl,sata-speed-limit" or
"fsl,sata-max-generation".  Shaohui, do the driver bits look OK?

This patch should go via the linux-scsi list (note that Tejun Heo is now
the SATA maintainer).

-Scott

> diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
> index d6577b9..9e3f3ec 100644
> --- a/drivers/ata/sata_fsl.c
> +++ b/drivers/ata/sata_fsl.c
> @@ -726,20 +726,6 @@ static int sata_fsl_port_start(struct ata_port *ap)
>  	VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
>  	VPRINTK("CHBA  = 0x%x\n", ioread32(hcr_base + CHBA));
>  
> -#ifdef CONFIG_MPC8315_DS
> -	/*
> -	 * Workaround for 8315DS board 3gbps link-up issue,
> -	 * currently limit SATA port to GEN1 speed
> -	 */
> -	sata_fsl_scr_read(&ap->link, SCR_CONTROL, &temp);
> -	temp &= ~(0xF << 4);
> -	temp |= (0x1 << 4);
> -	sata_fsl_scr_write(&ap->link, SCR_CONTROL, temp);
> -
> -	sata_fsl_scr_read(&ap->link, SCR_CONTROL, &temp);
> -	dev_warn(dev, "scr_control, speed limited to %x\n", temp);
> -#endif
> -
>  	return 0;
>  }
>  
> @@ -836,6 +822,11 @@ try_offline_again:
>  	 */
>  	ata_msleep(ap, 1);
>  
> +	/* if the device tree forces a speed limit, set it here. */
> +	ata_link_info(link, "setting speed (in hard reset)\n");
> +	DPRINTK("setting spd_limit\n");
> +	sata_set_spd(link);
> +
>  	/*
>  	 * Now, bring the host controller online again, this can take time
>  	 * as PHY reset and communication establishment, 1st D2H FIS and
> @@ -1444,6 +1435,15 @@ static int sata_fsl_probe(struct platform_device *ofdev)
>  		goto error_exit_with_cleanup;
>  	}
>  
> +	/* record speed limit if requested by device tree */
> +	if (!of_property_read_u32(ofdev->dev.of_node, "sata-spd-limit",
> +				  &temp)) {
> +		int i;
> +		for (i = 0; i < SATA_FSL_MAX_PORTS; ++i)
> +			host->ports[i]->link.hw_sata_spd_limit = temp;
> +		dev_warn(&ofdev->dev, "speed limit set to gen %u\n", temp);
> +	}
> +
>  	/* host->iomap is not used currently */
>  	host->private_data = host_priv;
>  

^ permalink raw reply

* Re: [alsa-devel] [PATCH v11] ASoC: fsl: Add S/PDIF machine driver
From: Stephen Warren @ 2013-08-23 19:53 UTC (permalink / raw)
  To: Mark Brown
  Cc: mark.rutland, devicetree, alsa-devel, lars, s.hauer, Nicolin Chen,
	tomasz.figa, rob.herring, p.zabel, shawn.guo, linuxppc-dev
In-Reply-To: <20130823191353.GK25263@sirena.org.uk>

On 08/23/2013 01:13 PM, Mark Brown wrote:
> On Fri, Aug 23, 2013 at 01:08:28PM -0600, Stephen Warren wrote:
>> On 08/23/2013 02:04 AM, Nicolin Chen wrote:
>>> This patch implements a device-tree-only machine driver for
>>> Freescale i.MX series Soc. It works with
>>> spdif_transmitter/spdif_receiver and fsl_spdif.c drivers.
> 
>> The binding looks reasonable to me now. Thanks.
> 
> Is that a Reviewed-by?

Sure, it can be,
Acked-by: Stephen Warren <swarren@nvidia.com>

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox