linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] arm64: Simple additions to NS2 DT
@ 2015-10-02 17:54 Anup Patel
  2015-10-02 17:54 ` [PATCH 1/6] arm64: dts: Add L2-cache DT node for NS2 Anup Patel
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Anup Patel @ 2015-10-02 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

We add l2-cache, SMMU, reboot, PMUv3, RNG, and I2C DT nodes
for NS2 SVK.

This patchset is based on v4.3-rc3 and available in ns2_dt1_v1
branch of https://github.com/Broadcom/arm64-linux.git.

The patchset is tested on NS2 SVK.

Anup Patel (5):
  arm64: dts: Add L2-cache DT node for NS2
  arm64: dts: Add SMMU DT node for NS2
  arm64: dts: Add syscon based reboot in DT for NS2
  arm64: dts: Add ARM PMUv3 DT node in NS2 DT
  arm64: dts: Add IPROC RNG200 DT node for NS2

Ray Jui (1):
  arm64: dts: Add I2C nodes for NS2

 arch/arm64/boot/dts/broadcom/ns2-svk.dts |   8 +++
 arch/arm64/boot/dts/broadcom/ns2.dtsi    | 106 +++++++++++++++++++++++++++++--
 2 files changed, 110 insertions(+), 4 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/6] arm64: dts: Add L2-cache DT node for NS2
  2015-10-02 17:54 [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
@ 2015-10-02 17:54 ` Anup Patel
  2015-10-02 17:54 ` [PATCH 2/6] arm64: dts: Add SMMU " Anup Patel
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Anup Patel @ 2015-10-02 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

Recent kernels requires cache hierrachy to be defined via DT hence
this patch updates NS2 DT accordingly.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Sandeep Tripathy <tripathy@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
 arch/arm64/boot/dts/broadcom/ns2.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi b/arch/arm64/boot/dts/broadcom/ns2.dtsi
index 3c92d92..f759175 100644
--- a/arch/arm64/boot/dts/broadcom/ns2.dtsi
+++ b/arch/arm64/boot/dts/broadcom/ns2.dtsi
@@ -50,6 +50,7 @@
 			reg = <0 0>;
 			enable-method = "spin-table";
 			cpu-release-addr = <0 0x84b00000>;
+			next-level-cache = <&CLUSTER0_L2>;
 		};
 
 		cpu at 1 {
@@ -58,6 +59,7 @@
 			reg = <0 1>;
 			enable-method = "spin-table";
 			cpu-release-addr = <0 0x84b00000>;
+			next-level-cache = <&CLUSTER0_L2>;
 		};
 
 		cpu at 2 {
@@ -66,6 +68,7 @@
 			reg = <0 2>;
 			enable-method = "spin-table";
 			cpu-release-addr = <0 0x84b00000>;
+			next-level-cache = <&CLUSTER0_L2>;
 		};
 
 		cpu at 3 {
@@ -74,6 +77,11 @@
 			reg = <0 3>;
 			enable-method = "spin-table";
 			cpu-release-addr = <0 0x84b00000>;
+			next-level-cache = <&CLUSTER0_L2>;
+		};
+
+		CLUSTER0_L2: l2-cache at 000 {
+			compatible = "cache";
 		};
 	};
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/6] arm64: dts: Add SMMU DT node for NS2
  2015-10-02 17:54 [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
  2015-10-02 17:54 ` [PATCH 1/6] arm64: dts: Add L2-cache DT node for NS2 Anup Patel
@ 2015-10-02 17:54 ` Anup Patel
  2015-10-02 17:54 ` [PATCH 3/6] arm64: dts: Add syscon based reboot in DT " Anup Patel
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Anup Patel @ 2015-10-02 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

The SMMU-500 driver is already available in Linux kernel. Let's
enable it for NS2 in DT.

This patch keeps mmu-masters attribute empty so that driver patches
can later extend this attribute when adding device DT nodes.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
 arch/arm64/boot/dts/broadcom/ns2.dtsi | 41 +++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi b/arch/arm64/boot/dts/broadcom/ns2.dtsi
index f759175..c5d90e4 100644
--- a/arch/arm64/boot/dts/broadcom/ns2.dtsi
+++ b/arch/arm64/boot/dts/broadcom/ns2.dtsi
@@ -103,6 +103,47 @@
 		#size-cells = <1>;
 		ranges = <0 0 0 0xffffffff>;
 
+		smmu: mmu at 64000000 {
+			compatible = "arm,mmu-500";
+			reg = <0x64000000 0x40000>;
+			#global-interrupts = <2>;
+			interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 230 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 232 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 234 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 236 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 237 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
+			mmu-masters;
+		};
+
 		gic: interrupt-controller at 65210000 {
 			compatible = "arm,gic-400";
 			#interrupt-cells = <3>;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/6] arm64: dts: Add syscon based reboot in DT for NS2
  2015-10-02 17:54 [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
  2015-10-02 17:54 ` [PATCH 1/6] arm64: dts: Add L2-cache DT node for NS2 Anup Patel
  2015-10-02 17:54 ` [PATCH 2/6] arm64: dts: Add SMMU " Anup Patel
@ 2015-10-02 17:54 ` Anup Patel
  2015-10-02 17:54 ` [PATCH 4/6] arm64: dts: Add ARM PMUv3 DT node in NS2 DT Anup Patel
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Anup Patel @ 2015-10-02 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

To reset NS2, we simply have to write '0' to BIT[1] at offset 0x90
of CRMU space.

The above can be easily achieved by writing 0xfffffffd at offset 0x90
using syscon-reboot driver. We don't need to have separate driver for
rebooting NS2.

This patch enables syscon-reboot driver for NS2 using DT.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
 arch/arm64/boot/dts/broadcom/ns2.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi b/arch/arm64/boot/dts/broadcom/ns2.dtsi
index c5d90e4..5d2ac6b 100644
--- a/arch/arm64/boot/dts/broadcom/ns2.dtsi
+++ b/arch/arm64/boot/dts/broadcom/ns2.dtsi
@@ -144,6 +144,18 @@
 			mmu-masters;
 		};
 
+		crmu: crmu at 65024000 {
+			compatible = "syscon";
+			reg = <0x65024000 0x100>;
+		};
+
+		reboot at 65024000 {
+			compatible ="syscon-reboot";
+			regmap = <&crmu>;
+			offset = <0x90>;
+			mask = <0xfffffffd>;
+		};
+
 		gic: interrupt-controller at 65210000 {
 			compatible = "arm,gic-400";
 			#interrupt-cells = <3>;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/6] arm64: dts: Add ARM PMUv3 DT node in NS2 DT
  2015-10-02 17:54 [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
                   ` (2 preceding siblings ...)
  2015-10-02 17:54 ` [PATCH 3/6] arm64: dts: Add syscon based reboot in DT " Anup Patel
@ 2015-10-02 17:54 ` Anup Patel
  2015-10-02 17:54 ` [PATCH 5/6] arm64: dts: Add IPROC RNG200 DT node for NS2 Anup Patel
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Anup Patel @ 2015-10-02 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

The NS2 SoC has Cortex-A57 CPUs which support ARM PMUv3 so,
lets enable ARM PMUv3 in NS2 DT.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Vikram Prakash <vikramp@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
 arch/arm64/boot/dts/broadcom/ns2.dtsi | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi b/arch/arm64/boot/dts/broadcom/ns2.dtsi
index 5d2ac6b..bc31c0e 100644
--- a/arch/arm64/boot/dts/broadcom/ns2.dtsi
+++ b/arch/arm64/boot/dts/broadcom/ns2.dtsi
@@ -44,7 +44,7 @@
 		#address-cells = <2>;
 		#size-cells = <0>;
 
-		cpu at 0 {
+		A57_0: cpu at 0 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a57", "arm,armv8";
 			reg = <0 0>;
@@ -53,7 +53,7 @@
 			next-level-cache = <&CLUSTER0_L2>;
 		};
 
-		cpu at 1 {
+		A57_1: cpu at 1 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a57", "arm,armv8";
 			reg = <0 1>;
@@ -62,7 +62,7 @@
 			next-level-cache = <&CLUSTER0_L2>;
 		};
 
-		cpu at 2 {
+		A57_2: cpu at 2 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a57", "arm,armv8";
 			reg = <0 2>;
@@ -71,7 +71,7 @@
 			next-level-cache = <&CLUSTER0_L2>;
 		};
 
-		cpu at 3 {
+		A57_3: cpu at 3 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a57", "arm,armv8";
 			reg = <0 3>;
@@ -97,6 +97,18 @@
 			      IRQ_TYPE_EDGE_RISING)>;
 	};
 
+	pmu {
+		compatible = "arm,armv8-pmuv3";
+		interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&A57_0>,
+				     <&A57_1>,
+				     <&A57_2>,
+				     <&A57_3>;
+	};
+
 	soc: soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/6] arm64: dts: Add IPROC RNG200 DT node for NS2
  2015-10-02 17:54 [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
                   ` (3 preceding siblings ...)
  2015-10-02 17:54 ` [PATCH 4/6] arm64: dts: Add ARM PMUv3 DT node in NS2 DT Anup Patel
@ 2015-10-02 17:54 ` Anup Patel
  2015-10-02 17:54 ` [PATCH 6/6] arm64: dts: Add I2C nodes " Anup Patel
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Anup Patel @ 2015-10-02 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

We have IPROC RNG200 hardware random number generation in
NS2 SoC, lets enable it for NS2 in NS2 DT.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Pramod KUMAR <pramodku@broadcom.com>
Reviewed-by: Vikram Prakash <vikramp@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
 arch/arm64/boot/dts/broadcom/ns2.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi b/arch/arm64/boot/dts/broadcom/ns2.dtsi
index bc31c0e..92ecf1c 100644
--- a/arch/arm64/boot/dts/broadcom/ns2.dtsi
+++ b/arch/arm64/boot/dts/broadcom/ns2.dtsi
@@ -187,5 +187,10 @@
 			clock-frequency = <23961600>;
 			status = "disabled";
 		};
+
+		hwrng: hwrng at 66220000 {
+			compatible = "brcm,iproc-rng200";
+			reg = <0x66220000 0x28>;
+		};
 	};
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/6] arm64: dts: Add I2C nodes for NS2
  2015-10-02 17:54 [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
                   ` (4 preceding siblings ...)
  2015-10-02 17:54 ` [PATCH 5/6] arm64: dts: Add IPROC RNG200 DT node for NS2 Anup Patel
@ 2015-10-02 17:54 ` Anup Patel
  2015-10-23  9:19 ` [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
  2015-11-03  8:10 ` Anup Patel
  7 siblings, 0 replies; 9+ messages in thread
From: Anup Patel @ 2015-10-02 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ray Jui <rjui@broadcom.com>

This patch adds iProc I2C DT nodes for NS2 and enable them for the NS2
SVK board

Signed-off-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Vikram Prakash <vikramp@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
 arch/arm64/boot/dts/broadcom/ns2-svk.dts |  8 ++++++++
 arch/arm64/boot/dts/broadcom/ns2.dtsi    | 20 ++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/ns2-svk.dts b/arch/arm64/boot/dts/broadcom/ns2-svk.dts
index 244baf8..e5950d5 100644
--- a/arch/arm64/boot/dts/broadcom/ns2-svk.dts
+++ b/arch/arm64/boot/dts/broadcom/ns2-svk.dts
@@ -52,6 +52,14 @@
 	};
 
 	soc: soc {
+		i2c0: i2c at 66080000 {
+			status = "ok";
+		};
+
+		i2c1: i2c at 660b0000 {
+			status = "ok";
+		};
+
 		uart3: serial at 66130000 {
 			status = "ok";
 		};
diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi b/arch/arm64/boot/dts/broadcom/ns2.dtsi
index 92ecf1c..f603277 100644
--- a/arch/arm64/boot/dts/broadcom/ns2.dtsi
+++ b/arch/arm64/boot/dts/broadcom/ns2.dtsi
@@ -178,6 +178,26 @@
 			      <0x65260000 0x1000>;
 		};
 
+		i2c0: i2c at 66080000 {
+			compatible = "brcm,iproc-i2c";
+			reg = <0x66080000 0x100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			interrupts = <GIC_SPI 394 IRQ_TYPE_NONE>;
+			clock-frequency = <100000>;
+			status = "disabled";
+		};
+
+		i2c1: i2c at 660b0000 {
+			compatible = "brcm,iproc-i2c";
+			reg = <0x660b0000 0x100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			interrupts = <GIC_SPI 395 IRQ_TYPE_NONE>;
+			clock-frequency = <100000>;
+			status = "disabled";
+		};
+
 		uart3: serial at 66130000 {
 			compatible = "snps,dw-apb-uart";
 			reg = <0x66130000 0x100>;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 0/6] arm64: Simple additions to NS2 DT
  2015-10-02 17:54 [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
                   ` (5 preceding siblings ...)
  2015-10-02 17:54 ` [PATCH 6/6] arm64: dts: Add I2C nodes " Anup Patel
@ 2015-10-23  9:19 ` Anup Patel
  2015-11-03  8:10 ` Anup Patel
  7 siblings, 0 replies; 9+ messages in thread
From: Anup Patel @ 2015-10-23  9:19 UTC (permalink / raw)
  To: linux-arm-kernel

Ping ???

Regards,
Anup

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 0/6] arm64: Simple additions to NS2 DT
  2015-10-02 17:54 [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
                   ` (6 preceding siblings ...)
  2015-10-23  9:19 ` [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
@ 2015-11-03  8:10 ` Anup Patel
  7 siblings, 0 replies; 9+ messages in thread
From: Anup Patel @ 2015-11-03  8:10 UTC (permalink / raw)
  To: linux-arm-kernel

+Arnd, +Olof

Ping?

Regards,
Anup

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-11-03  8:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 17:54 [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
2015-10-02 17:54 ` [PATCH 1/6] arm64: dts: Add L2-cache DT node for NS2 Anup Patel
2015-10-02 17:54 ` [PATCH 2/6] arm64: dts: Add SMMU " Anup Patel
2015-10-02 17:54 ` [PATCH 3/6] arm64: dts: Add syscon based reboot in DT " Anup Patel
2015-10-02 17:54 ` [PATCH 4/6] arm64: dts: Add ARM PMUv3 DT node in NS2 DT Anup Patel
2015-10-02 17:54 ` [PATCH 5/6] arm64: dts: Add IPROC RNG200 DT node for NS2 Anup Patel
2015-10-02 17:54 ` [PATCH 6/6] arm64: dts: Add I2C nodes " Anup Patel
2015-10-23  9:19 ` [PATCH 0/6] arm64: Simple additions to NS2 DT Anup Patel
2015-11-03  8:10 ` Anup Patel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).