diff mbox

[U-Boot,PATCHv2,1/3] arm: socfpga: add reset manager defines for Arria10

Message ID 1452632204-22047-1-git-send-email-dinguyen@opensource.altera.com
State Deferred
Delegated to: Marek Vasut
Headers show

Commit Message

Dinh Nguyen Jan. 12, 2016, 8:56 p.m. UTC
From: Dinh Nguyen <dinguyen@opensource.altera.com>

Add the Arria10 reset manager defines that is used in Linux. Change the
license to SPDX.

[commit 007bb689b3dbad83cdab0ad192bc6ed0162451e0 from the Linux kernel]

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
---
v2: Add commit hash-id for original commit from Linux kernel
---
 include/dt-bindings/reset/altr,rst-mgr-a10.h | 103 +++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 include/dt-bindings/reset/altr,rst-mgr-a10.h

Comments

Marek Vasut Jan. 12, 2016, 10:02 p.m. UTC | #1
On Tuesday, January 12, 2016 at 09:56:42 PM, dinguyen@opensource.altera.com 
wrote:
> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> 
> Add the Arria10 reset manager defines that is used in Linux. Change the
> license to SPDX.
> 
> [commit 007bb689b3dbad83cdab0ad192bc6ed0162451e0 from the Linux kernel]
> 
> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>

Applied all three to u-boot-socfpga/02-arria10 , thanks!

btw what's the status of A10 ? What will I be able to compile it (and thus
merge the stuff into mainline and ev. use it on actual A10) ? A board would
be nice too ;-)

Best regards,
Marek Vasut
Dinh Nguyen Jan. 12, 2016, 10:11 p.m. UTC | #2
On 01/12/2016 04:02 PM, Marek Vasut wrote:
> On Tuesday, January 12, 2016 at 09:56:42 PM, dinguyen@opensource.altera.com 
> wrote:
>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>>
>> Add the Arria10 reset manager defines that is used in Linux. Change the
>> license to SPDX.
>>
>> [commit 007bb689b3dbad83cdab0ad192bc6ed0162451e0 from the Linux kernel]
>>
>> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> 
> Applied all three to u-boot-socfpga/02-arria10 , thanks!
> 
> btw what's the status of A10 ? What will I be able to compile it (and thus
> merge the stuff into mainline and ev. use it on actual A10) ? A board would
> be nice too ;-)

Here is my list of to-do that is left for A10:

- submit SDRAM controller
- rework FPGA manager for A10
- port an SPL for A10

I think the most work will be the SDRAM controller as it needs quite a
bit of cleanup. I'm about ~25% through with that.

As for HW, I'll see what I can do.

Dinh
Marek Vasut Jan. 12, 2016, 10:16 p.m. UTC | #3
On Tuesday, January 12, 2016 at 11:11:42 PM, Dinh Nguyen wrote:
> On 01/12/2016 04:02 PM, Marek Vasut wrote:
> > On Tuesday, January 12, 2016 at 09:56:42 PM,
> > dinguyen@opensource.altera.com
> > 
> > wrote:
> >> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> >> 
> >> Add the Arria10 reset manager defines that is used in Linux. Change the
> >> license to SPDX.
> >> 
> >> [commit 007bb689b3dbad83cdab0ad192bc6ed0162451e0 from the Linux kernel]
> >> 
> >> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> > 
> > Applied all three to u-boot-socfpga/02-arria10 , thanks!
> > 
> > btw what's the status of A10 ? What will I be able to compile it (and
> > thus merge the stuff into mainline and ev. use it on actual A10) ? A
> > board would be nice too ;-)
> 
> Here is my list of to-do that is left for A10:
> 
> - submit SDRAM controller
> - rework FPGA manager for A10
> - port an SPL for A10
> 
> I think the most work will be the SDRAM controller as it needs quite a
> bit of cleanup. I'm about ~25% through with that.

Didn't you mention that you use nios2 that magically does that init for you?
Shall I expect thousands of LoC SDRAM controller driver again or is there 
something "lighter" coming up ? ;-)

> As for HW, I'll see what I can do.

Don't worry about it too much. I also poked Chin about it some time ago, but
I dunno where he got with this.

Thanks!

Best regards,
Marek Vasut
Chin Liang See Jan. 13, 2016, 1:58 a.m. UTC | #4
On Tue, 2016-01-12 at 23:16 +0100, Marek Vasut wrote:
> On Tuesday, January 12, 2016 at 11:11:42 PM, Dinh Nguyen wrote:
> > On 01/12/2016 04:02 PM, Marek Vasut wrote:
> > > On Tuesday, January 12, 2016 at 09:56:42 PM,
> > > dinguyen@opensource.altera.com
> > > 
> > > wrote:
> > > > From: Dinh Nguyen <dinguyen@opensource.altera.com>
> > > > 
> > > > Add the Arria10 reset manager defines that is used in Linux.
> > > > Change the
> > > > license to SPDX.
> > > > 
> > > > [commit 007bb689b3dbad83cdab0ad192bc6ed0162451e0 from the Linux
> > > > kernel]
> > > > 
> > > > Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> > > 
> > > Applied all three to u-boot-socfpga/02-arria10 , thanks!
> > > 
> > > btw what's the status of A10 ? What will I be able to compile it
> > > (and
> > > thus merge the stuff into mainline and ev. use it on actual A10)
> > > ? A
> > > board would be nice too ;-)
> > 
> > Here is my list of to-do that is left for A10:
> > 
> > - submit SDRAM controller
> > - rework FPGA manager for A10
> > - port an SPL for A10
> > 
> > I think the most work will be the SDRAM controller as it needs
> > quite a
> > bit of cleanup. I'm about ~25% through with that.
> 
> Didn't you mention that you use nios2 that magically does that init
> for you?
> Shall I expect thousands of LoC SDRAM controller driver again or is
> there 
> something "lighter" coming up ? ;-)

Yah it should be lighter as all SDRAM configuration now part of
bitstream. Driver just need to derive the value from bitstream register
and setup the DDR controller. No more DDR handoff.

> 
> > As for HW, I'll see what I can do.
> 
> Don't worry about it too much. I also poked Chin about it some time
> ago, but
> I dunno where he got with this.

I am still working on this. We have limited boards as we will be
getting production board in a month time. Dinh, you have any boards to
spare? Most of boards here already went into test farms.

Thanks
Chin Liang

> 
> Thanks!
> 
> Best regards,
> Marek Vasut
Marek Vasut Jan. 13, 2016, 2:04 a.m. UTC | #5
On Wednesday, January 13, 2016 at 02:58:42 AM, Chin Liang See wrote:
> On Tue, 2016-01-12 at 23:16 +0100, Marek Vasut wrote:
> > On Tuesday, January 12, 2016 at 11:11:42 PM, Dinh Nguyen wrote:
> > > On 01/12/2016 04:02 PM, Marek Vasut wrote:
> > > > On Tuesday, January 12, 2016 at 09:56:42 PM,
> > > > dinguyen@opensource.altera.com
> > > > 
> > > > wrote:
> > > > > From: Dinh Nguyen <dinguyen@opensource.altera.com>
> > > > > 
> > > > > Add the Arria10 reset manager defines that is used in Linux.
> > > > > Change the
> > > > > license to SPDX.
> > > > > 
> > > > > [commit 007bb689b3dbad83cdab0ad192bc6ed0162451e0 from the Linux
> > > > > kernel]
> > > > > 
> > > > > Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> > > > 
> > > > Applied all three to u-boot-socfpga/02-arria10 , thanks!
> > > > 
> > > > btw what's the status of A10 ? What will I be able to compile it
> > > > (and
> > > > thus merge the stuff into mainline and ev. use it on actual A10)
> > > > ? A
> > > > board would be nice too ;-)
> > > 
> > > Here is my list of to-do that is left for A10:
> > > 
> > > - submit SDRAM controller
> > > - rework FPGA manager for A10
> > > - port an SPL for A10
> > > 
> > > I think the most work will be the SDRAM controller as it needs
> > > quite a
> > > bit of cleanup. I'm about ~25% through with that.
> > 
> > Didn't you mention that you use nios2 that magically does that init
> > for you?
> > Shall I expect thousands of LoC SDRAM controller driver again or is
> > there
> > something "lighter" coming up ? ;-)
> 
> Yah it should be lighter as all SDRAM configuration now part of
> bitstream. Driver just need to derive the value from bitstream register
> and setup the DDR controller. No more DDR handoff.

Whew :)

> > > As for HW, I'll see what I can do.
> > 
> > Don't worry about it too much. I also poked Chin about it some time
> > ago, but
> > I dunno where he got with this.
> 
> I am still working on this. We have limited boards as we will be
> getting production board in a month time. Dinh, you have any boards to
> spare? Most of boards here already went into test farms.

I'll wait for the production ones , no need to hurry :)

Best regards,
Marek Vasut
Dinh Nguyen Jan. 13, 2016, 5:28 p.m. UTC | #6
On 01/12/2016 08:04 PM, Marek Vasut wrote:
> On Wednesday, January 13, 2016 at 02:58:42 AM, Chin Liang See wrote:
>> On Tue, 2016-01-12 at 23:16 +0100, Marek Vasut wrote:
>>> On Tuesday, January 12, 2016 at 11:11:42 PM, Dinh Nguyen wrote:
>>>> On 01/12/2016 04:02 PM, Marek Vasut wrote:
>>>>> On Tuesday, January 12, 2016 at 09:56:42 PM,
>>>>> dinguyen@opensource.altera.com
>>>>>
>>>>> wrote:
>>>>>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>>>>>>
>>>>>> Add the Arria10 reset manager defines that is used in Linux.
>>>>>> Change the
>>>>>> license to SPDX.
>>>>>>
>>>>>> [commit 007bb689b3dbad83cdab0ad192bc6ed0162451e0 from the Linux
>>>>>> kernel]
>>>>>>
>>>>>> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
>>>>>
>>>>> Applied all three to u-boot-socfpga/02-arria10 , thanks!
>>>>>
>>>>> btw what's the status of A10 ? What will I be able to compile it
>>>>> (and
>>>>> thus merge the stuff into mainline and ev. use it on actual A10)
>>>>> ? A
>>>>> board would be nice too ;-)
>>>>
>>>> Here is my list of to-do that is left for A10:
>>>>
>>>> - submit SDRAM controller
>>>> - rework FPGA manager for A10
>>>> - port an SPL for A10
>>>>
>>>> I think the most work will be the SDRAM controller as it needs
>>>> quite a
>>>> bit of cleanup. I'm about ~25% through with that.
>>>
>>> Didn't you mention that you use nios2 that magically does that init
>>> for you?
>>> Shall I expect thousands of LoC SDRAM controller driver again or is
>>> there
>>> something "lighter" coming up ? ;-)
>>
>> Yah it should be lighter as all SDRAM configuration now part of
>> bitstream. Driver just need to derive the value from bitstream register
>> and setup the DDR controller. No more DDR handoff.
> 
> Whew :)
> 

While all of the above is true, the *crap* that is in the current
implementation needs to get cleaned up. It's amazing to me how
we(Altera) continue to go down this path of having to do things twice,
instead of trying to upstream first!

>>>> As for HW, I'll see what I can do.
>>>
>>> Don't worry about it too much. I also poked Chin about it some time
>>> ago, but
>>> I dunno where he got with this.
>>
>> I am still working on this. We have limited boards as we will be
>> getting production board in a month time. Dinh, you have any boards to
>> spare? Most of boards here already went into test farms.
> 
> I'll wait for the production ones , no need to hurry :)
> 

That's probably best. I do have an extra Rev A hardware, but trust me,
you don't want to have anything do with that hardware.

Dinh
Marek Vasut Jan. 13, 2016, 8:37 p.m. UTC | #7
On Wednesday, January 13, 2016 at 06:28:36 PM, Dinh Nguyen wrote:
> On 01/12/2016 08:04 PM, Marek Vasut wrote:
> > On Wednesday, January 13, 2016 at 02:58:42 AM, Chin Liang See wrote:
> >> On Tue, 2016-01-12 at 23:16 +0100, Marek Vasut wrote:
> >>> On Tuesday, January 12, 2016 at 11:11:42 PM, Dinh Nguyen wrote:
> >>>> On 01/12/2016 04:02 PM, Marek Vasut wrote:
> >>>>> On Tuesday, January 12, 2016 at 09:56:42 PM,
> >>>>> dinguyen@opensource.altera.com
> >>>>> 
> >>>>> wrote:
> >>>>>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> >>>>>> 
> >>>>>> Add the Arria10 reset manager defines that is used in Linux.
> >>>>>> Change the
> >>>>>> license to SPDX.
> >>>>>> 
> >>>>>> [commit 007bb689b3dbad83cdab0ad192bc6ed0162451e0 from the Linux
> >>>>>> kernel]
> >>>>>> 
> >>>>>> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> >>>>> 
> >>>>> Applied all three to u-boot-socfpga/02-arria10 , thanks!
> >>>>> 
> >>>>> btw what's the status of A10 ? What will I be able to compile it
> >>>>> (and
> >>>>> thus merge the stuff into mainline and ev. use it on actual A10)
> >>>>> ? A
> >>>>> board would be nice too ;-)
> >>>> 
> >>>> Here is my list of to-do that is left for A10:
> >>>> 
> >>>> - submit SDRAM controller
> >>>> - rework FPGA manager for A10
> >>>> - port an SPL for A10
> >>>> 
> >>>> I think the most work will be the SDRAM controller as it needs
> >>>> quite a
> >>>> bit of cleanup. I'm about ~25% through with that.
> >>> 
> >>> Didn't you mention that you use nios2 that magically does that init
> >>> for you?
> >>> Shall I expect thousands of LoC SDRAM controller driver again or is
> >>> there
> >>> something "lighter" coming up ? ;-)
> >> 
> >> Yah it should be lighter as all SDRAM configuration now part of
> >> bitstream. Driver just need to derive the value from bitstream register
> >> and setup the DDR controller. No more DDR handoff.
> > 
> > Whew :)
> 
> While all of the above is true, the *crap* that is in the current
> implementation needs to get cleaned up. It's amazing to me how
> we(Altera) continue to go down this path of having to do things twice,
> instead of trying to upstream first!

You'll soon be doing them thrice *smirk* , or maybe you already do ;-)

> >>>> As for HW, I'll see what I can do.
> >>> 
> >>> Don't worry about it too much. I also poked Chin about it some time
> >>> ago, but
> >>> I dunno where he got with this.
> >> 
> >> I am still working on this. We have limited boards as we will be
> >> getting production board in a month time. Dinh, you have any boards to
> >> spare? Most of boards here already went into test farms.
> > 
> > I'll wait for the production ones , no need to hurry :)
> 
> That's probably best. I do have an extra Rev A hardware, but trust me,
> you don't want to have anything do with that hardware.

You can save one collector's edition for me, it'd look nice right next to
the Excalibur XA10 ;-D
Marek Vasut Feb. 4, 2016, 11:46 a.m. UTC | #8
On Tuesday, January 12, 2016 at 09:56:42 PM, dinguyen@opensource.altera.com 
wrote:
> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> 
> Add the Arria10 reset manager defines that is used in Linux. Change the
> license to SPDX.
> 
> [commit 007bb689b3dbad83cdab0ad192bc6ed0162451e0 from the Linux kernel]
> 
> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>

Hi!

A10 branch is now u-boot-socfpga/01-arria10 .

What is the current status of Arria10 please ?

Best regards,
Marek Vasut
Dinh Nguyen Feb. 4, 2016, 8:59 p.m. UTC | #9
On 02/04/2016 05:46 AM, Marek Vasut wrote:
> 
> A10 branch is now u-boot-socfpga/01-arria10 .
> 

Thanks for carrying this.

> What is the current status of Arria10 please ?
> 

I haven't had time to work on Arria10 in the last 2 weeks. I hope to get
back to it next week. I think I may have to slim the patches down to
just fixing building for it.

Dinh
Marek Vasut Feb. 6, 2016, 7:43 a.m. UTC | #10
On Thursday, February 04, 2016 at 09:59:28 PM, Dinh Nguyen wrote:
> On 02/04/2016 05:46 AM, Marek Vasut wrote:
> > A10 branch is now u-boot-socfpga/01-arria10 .
> 
> Thanks for carrying this.
> 
> > What is the current status of Arria10 please ?
> 
> I haven't had time to work on Arria10 in the last 2 weeks. I hope to get
> back to it next week. I think I may have to slim the patches down to
> just fixing building for it.

Got it, thanks

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/include/dt-bindings/reset/altr,rst-mgr-a10.h b/include/dt-bindings/reset/altr,rst-mgr-a10.h
new file mode 100644
index 0000000..7619ca2
--- /dev/null
+++ b/include/dt-bindings/reset/altr,rst-mgr-a10.h
@@ -0,0 +1,103 @@ 
+/*
+ * Copyright (c) 2014, Steffen Trumtrar <s.trumtrar@pengutronix.de>
+ *
+ * SPDX-License-Identifier:	GPL-2.0
+ */
+
+#ifndef _DT_BINDINGS_RESET_ALTR_RST_MGR_A10_H
+#define _DT_BINDINGS_RESET_ALTR_RST_MGR_A10_H
+
+/* MPUMODRST */
+#define CPU0_RESET		0
+#define CPU1_RESET		1
+#define WDS_RESET		2
+#define SCUPER_RESET		3
+
+/* PER0MODRST */
+#define EMAC0_RESET		32
+#define EMAC1_RESET		33
+#define EMAC2_RESET		34
+#define USB0_RESET		35
+#define USB1_RESET		36
+#define NAND_RESET		37
+#define QSPI_RESET		38
+#define SDMMC_RESET		39
+#define EMAC0_OCP_RESET		40
+#define EMAC1_OCP_RESET		41
+#define EMAC2_OCP_RESET		42
+#define USB0_OCP_RESET		43
+#define USB1_OCP_RESET		44
+#define NAND_OCP_RESET		45
+#define QSPI_OCP_RESET		46
+#define SDMMC_OCP_RESET		47
+#define DMA_RESET		48
+#define SPIM0_RESET		49
+#define SPIM1_RESET		50
+#define SPIS0_RESET		51
+#define SPIS1_RESET		52
+#define DMA_OCP_RESET		53
+#define EMAC_PTP_RESET		54
+/* 55 is empty*/
+#define DMAIF0_RESET		56
+#define DMAIF1_RESET		57
+#define DMAIF2_RESET		58
+#define DMAIF3_RESET		59
+#define DMAIF4_RESET		60
+#define DMAIF5_RESET		61
+#define DMAIF6_RESET		62
+#define DMAIF7_RESET		63
+
+/* PER1MODRST */
+#define L4WD0_RESET		64
+#define L4WD1_RESET		65
+#define L4SYSTIMER0_RESET	66
+#define L4SYSTIMER1_RESET	67
+#define SPTIMER0_RESET		68
+#define SPTIMER1_RESET		69
+/* 70-71 is reserved */
+#define I2C0_RESET		72
+#define I2C1_RESET		73
+#define I2C2_RESET		74
+#define I2C3_RESET		75
+#define I2C4_RESET		76
+/* 77-79 is reserved */
+#define UART0_RESET		80
+#define UART1_RESET		81
+/* 82-87 is reserved */
+#define GPIO0_RESET		88
+#define GPIO1_RESET		89
+#define GPIO2_RESET		90
+
+/* BRGMODRST */
+#define HPS2FPGA_RESET		96
+#define LWHPS2FPGA_RESET	97
+#define FPGA2HPS_RESET		98
+#define F2SSDRAM0_RESET		99
+#define F2SSDRAM1_RESET		100
+#define F2SSDRAM2_RESET		101
+#define DDRSCH_RESET		102
+
+/* SYSMODRST*/
+#define ROM_RESET		128
+#define OCRAM_RESET		129
+/* 130 is reserved */
+#define FPGAMGR_RESET		131
+#define S2F_RESET		132
+#define SYSDBG_RESET		133
+#define OCRAM_OCP_RESET		134
+
+/* COLDMODRST */
+#define CLKMGRCOLD_RESET	160
+/* 161-162 is reserved */
+#define S2FCOLD_RESET		163
+#define TIMESTAMPCOLD_RESET	164
+#define TAPCOLD_RESET		165
+#define HMCCOLD_RESET		166
+#define IOMGRCOLD_RESET		167
+
+/* NRSTMODRST */
+#define NRSTPINOE_RESET		192
+
+/* DBGMODRST */
+#define DBG_RESET		224
+#endif