linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] ti-sysc support for PRUSS
@ 2020-02-27 22:28 Suman Anna
  2020-02-27 22:28 ` [PATCH v2 1/5] dt-bindings: bus: ti-sysc: Add support for PRUSS SYSC type Suman Anna
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Suman Anna @ 2020-02-27 22:28 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Roger Quadros, Tero Kristo, linux-omap, linux-kernel, devicetree,
	Suman Anna

Hi Tony,

The following is a revised series of the ti-sysc support for PRUSS.
Please refer to the original series cover-letter [1] for details.

Following are the main changes in v2:
 - Drop the enabling of the interconnect nodes from various AM335x and
   AM437x board dts files (last 7 patches from original series)
 - Enable the target-module node for AM437x by default. None of the
   current AM437x board dts files use AM4372, so there should not be
   any regressions.

We can drop the status=disabled in the am33xx.dtsi file once we add the
SoC revision support for AM335x SoCs. This is already disabled before the
series as well. I have identified a few boards which use the older SoCs
that can disable the node in dts, but there were few others which can
use any of the SoCs, so those will definitely require the SoC device
match logic and an additional PRUSS disable quirk in the ti-sysc bus
driver.

regards
Suman

[1] https://patchwork.kernel.org/cover/11404569/

Roger Quadros (1):
  dt-bindings: bus: ti-sysc: Add support for PRUSS SYSC type

Suman Anna (4):
  bus: ti-sysc: Add support for PRUSS SYSC type
  ARM: dts: AM33xx-l4: Update PRUSS interconnect target-module node
  ARM: dts: AM4372: Add the PRU-ICSS interconnect target-module node
  ARM: dts: dra7: Add PRU-ICSS interconnect target-module nodes

 .../devicetree/bindings/bus/ti-sysc.txt       |  1 +
 arch/arm/boot/dts/am33xx-l4.dtsi              | 21 ++++++--
 arch/arm/boot/dts/am4372.dtsi                 | 22 ++++++++
 arch/arm/boot/dts/am57-pruss.dtsi             | 50 +++++++++++++++++++
 arch/arm/boot/dts/am5718.dtsi                 |  1 +
 arch/arm/boot/dts/am5728.dtsi                 |  1 +
 arch/arm/boot/dts/am5748.dtsi                 |  1 +
 arch/arm/boot/dts/dra7.dtsi                   |  2 +-
 drivers/bus/ti-sysc.c                         | 27 ++++++++++
 include/dt-bindings/bus/ti-sysc.h             |  4 ++
 include/linux/platform_data/ti-sysc.h         |  2 +
 11 files changed, 128 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/boot/dts/am57-pruss.dtsi

-- 
2.23.0


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

* [PATCH v2 1/5] dt-bindings: bus: ti-sysc: Add support for PRUSS SYSC type
  2020-02-27 22:28 [PATCH v2 0/5] ti-sysc support for PRUSS Suman Anna
@ 2020-02-27 22:28 ` Suman Anna
  2020-03-03 22:40   ` Rob Herring
  2020-02-27 22:28 ` [PATCH v2 2/5] " Suman Anna
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Suman Anna @ 2020-02-27 22:28 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Roger Quadros, Tero Kristo, linux-omap, linux-kernel, devicetree,
	Rob Herring, Suman Anna

From: Roger Quadros <rogerq@ti.com>

The PRUSS module has a SYSCFG which is unique. The SYSCFG
has two additional unique fields called STANDBY_INIT and
SUB_MWAIT in addition to regular IDLE_MODE and STANDBY_MODE
fields. Add the bindings for this new sysc type.

Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
---
v2: No changes

 Documentation/devicetree/bindings/bus/ti-sysc.txt | 1 +
 include/dt-bindings/bus/ti-sysc.h                 | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/bus/ti-sysc.txt b/Documentation/devicetree/bindings/bus/ti-sysc.txt
index 233eb8294204..c984143d08d2 100644
--- a/Documentation/devicetree/bindings/bus/ti-sysc.txt
+++ b/Documentation/devicetree/bindings/bus/ti-sysc.txt
@@ -38,6 +38,7 @@ Required standard properties:
 		"ti,sysc-dra7-mcasp"
 		"ti,sysc-usb-host-fs"
 		"ti,sysc-dra7-mcan"
+		"ti,sysc-pruss"
 
 - reg		shall have register areas implemented for the interconnect
 		target module in question such as revision, sysc and syss
diff --git a/include/dt-bindings/bus/ti-sysc.h b/include/dt-bindings/bus/ti-sysc.h
index babd08a1d226..76b07826ed05 100644
--- a/include/dt-bindings/bus/ti-sysc.h
+++ b/include/dt-bindings/bus/ti-sysc.h
@@ -18,6 +18,10 @@
 
 #define SYSC_DRA7_MCAN_ENAWAKEUP	(1 << 4)
 
+/* PRUSS sysc found on AM33xx/AM43xx/AM57xx */
+#define SYSC_PRUSS_SUB_MWAIT		(1 << 5)
+#define SYSC_PRUSS_STANDBY_INIT		(1 << 4)
+
 /* SYSCONFIG STANDBYMODE/MIDLEMODE/SIDLEMODE supported by hardware */
 #define SYSC_IDLE_FORCE			0
 #define SYSC_IDLE_NO			1
-- 
2.23.0


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

* [PATCH v2 2/5] bus: ti-sysc: Add support for PRUSS SYSC type
  2020-02-27 22:28 [PATCH v2 0/5] ti-sysc support for PRUSS Suman Anna
  2020-02-27 22:28 ` [PATCH v2 1/5] dt-bindings: bus: ti-sysc: Add support for PRUSS SYSC type Suman Anna
@ 2020-02-27 22:28 ` Suman Anna
  2020-02-27 22:28 ` [PATCH v2 3/5] ARM: dts: AM33xx-l4: Update PRUSS interconnect target-module node Suman Anna
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Suman Anna @ 2020-02-27 22:28 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Roger Quadros, Tero Kristo, linux-omap, linux-kernel, devicetree,
	Suman Anna

The PRU-ICSS present on AM33xx/AM43xx/AM57xx has a very unique
SYSCFG register. The register follows the OMAP4-style SYSC_TYPE3
for Master Standby and Slave Idle, but also has two additional
unique fields - STANDBY_INIT and SUB_MWAIT. The STANDBY_INIT is
a control bit that is used to initiate a Standby sequence (when
set) and trigger a MStandby request to the SoC's PRCM module. This
same bit is also used to enable the OCP master ports (when cleared)
to allow the PRU cores to access any peripherals or memory beyond
the PRU subsystem. The SUB_MWAIT is a ready status field for the
external access.

Add support for this SYSC type. The STANDBY_INIT has to be set
during suspend, without which it results in a hang in the resume
sequence on AM33xx/AM43xx boards and requires a board reset to
come out of the hang. Any PRU applications requiring external
access are supposed to clear the STANDBY_INIT bit. Note that
the PRUSS context is lost during a suspend sequence because the
PRUSS module is reset and/or disabled.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
v2: No changes

 drivers/bus/ti-sysc.c                 | 27 +++++++++++++++++++++++++++
 include/linux/platform_data/ti-sysc.h |  2 ++
 2 files changed, 29 insertions(+)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index f702c85c81b6..855f851e99be 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1272,6 +1272,9 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
 		   SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
 	SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
 		   SYSC_MODULE_QUIRK_WDT),
+	/* PRUSS on am3, am4 and am5 */
+	SYSC_QUIRK("pruss", 0, 0x26000, 0x26004, -1, 0x47000000, 0xff000000,
+		   SYSC_MODULE_QUIRK_PRUSS),
 	/* Watchdog on am3 and am4 */
 	SYSC_QUIRK("wdt", 0x44e35000, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
 		   SYSC_MODULE_QUIRK_WDT | SYSC_QUIRK_SWSUP_SIDLE),
@@ -1482,6 +1485,16 @@ static void sysc_reset_done_quirk_wdt(struct sysc *ddata)
 		dev_warn(ddata->dev, "wdt disable step2 failed\n");
 }
 
+/* PRUSS needs to set MSTANDBY_INIT inorder to idle properly */
+static void sysc_module_disable_quirk_pruss(struct sysc *ddata)
+{
+	u32 reg;
+
+	reg = sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
+	reg |= SYSC_PRUSS_STANDBY_INIT;
+	sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg);
+}
+
 static void sysc_init_module_quirks(struct sysc *ddata)
 {
 	if (ddata->legacy_mode || !ddata->name)
@@ -1510,6 +1523,9 @@ static void sysc_init_module_quirks(struct sysc *ddata)
 		ddata->reset_done_quirk = sysc_reset_done_quirk_wdt;
 		ddata->module_disable_quirk = sysc_reset_done_quirk_wdt;
 	}
+
+	if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_PRUSS)
+		ddata->module_disable_quirk = sysc_module_disable_quirk_pruss;
 }
 
 static int sysc_clockdomain_init(struct sysc *ddata)
@@ -2313,6 +2329,16 @@ static const struct sysc_capabilities sysc_dra7_mcan = {
 	.mod_quirks = SYSS_QUIRK_RESETDONE_INVERTED,
 };
 
+/*
+ * PRUSS found on some AM33xx, AM437x and AM57xx SoCs
+ */
+static const struct sysc_capabilities sysc_pruss = {
+	.type = TI_SYSC_PRUSS,
+	.sysc_mask = SYSC_PRUSS_STANDBY_INIT | SYSC_PRUSS_SUB_MWAIT,
+	.regbits = &sysc_regbits_omap4_simple,
+	.mod_quirks = SYSC_MODULE_QUIRK_PRUSS,
+};
+
 static int sysc_init_pdata(struct sysc *ddata)
 {
 	struct ti_sysc_platform_data *pdata = dev_get_platdata(ddata->dev);
@@ -2538,6 +2564,7 @@ static const struct of_device_id sysc_match[] = {
 	{ .compatible = "ti,sysc-usb-host-fs",
 	  .data = &sysc_omap4_usb_host_fs, },
 	{ .compatible = "ti,sysc-dra7-mcan", .data = &sysc_dra7_mcan, },
+	{ .compatible = "ti,sysc-pruss", .data = &sysc_pruss, },
 	{  },
 };
 MODULE_DEVICE_TABLE(of, sysc_match);
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 2cbde6542849..b04575fb9f73 100644
--- a/include/linux/platform_data/ti-sysc.h
+++ b/include/linux/platform_data/ti-sysc.h
@@ -17,6 +17,7 @@ enum ti_sysc_module_type {
 	TI_SYSC_OMAP4_MCASP,
 	TI_SYSC_OMAP4_USB_HOST_FS,
 	TI_SYSC_DRA7_MCAN,
+	TI_SYSC_PRUSS,
 };
 
 struct ti_sysc_cookie {
@@ -49,6 +50,7 @@ struct sysc_regbits {
 	s8 emufree_shift;
 };
 
+#define SYSC_MODULE_QUIRK_PRUSS		BIT(22)
 #define SYSC_QUIRK_CLKDM_NOAUTO		BIT(21)
 #define SYSC_QUIRK_FORCE_MSTANDBY	BIT(20)
 #define SYSC_MODULE_QUIRK_AESS		BIT(19)
-- 
2.23.0


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

* [PATCH v2 3/5] ARM: dts: AM33xx-l4: Update PRUSS interconnect target-module node
  2020-02-27 22:28 [PATCH v2 0/5] ti-sysc support for PRUSS Suman Anna
  2020-02-27 22:28 ` [PATCH v2 1/5] dt-bindings: bus: ti-sysc: Add support for PRUSS SYSC type Suman Anna
  2020-02-27 22:28 ` [PATCH v2 2/5] " Suman Anna
@ 2020-02-27 22:28 ` Suman Anna
  2020-02-28  8:33   ` Roger Quadros
  2020-02-27 22:28 ` [PATCH v2 4/5] ARM: dts: AM4372: Add the PRU-ICSS " Suman Anna
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Suman Anna @ 2020-02-27 22:28 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Roger Quadros, Tero Kristo, linux-omap, linux-kernel, devicetree,
	Suman Anna

The PRU-ICSS present on some AM33xx SoCs has a very unique SYSC
register. The IP also uses a hard-reset line, and requires this
PRCM reset to be deasserted to be able to access any registers.
Update the existing PRUSS interconnect target-module with all
the required properties.

The PRUSS device itself shall be added as a child node to this
interconnect node in the future. PRU-ICSS is not supported on
AM3351/AM3352/AM3354 SoCs though in the AM33xx family, so the
target module node should be disabled in derivative board files
that use any of these SoCs.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
v2: Revise patch description, no code changes

 arch/arm/boot/dts/am33xx-l4.dtsi | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
index 4e2986f0c604..5ed7f3c58c0f 100644
--- a/arch/arm/boot/dts/am33xx-l4.dtsi
+++ b/arch/arm/boot/dts/am33xx-l4.dtsi
@@ -759,12 +759,27 @@
 			ranges = <0x0 0x200000 0x80000>;
 		};
 
-		target-module@300000 {			/* 0x4a300000, ap 9 04.0 */
-			compatible = "ti,sysc";
-			status = "disabled";
+		pruss_tm: target-module@300000 {	/* 0x4a300000, ap 9 04.0 */
+			compatible = "ti,sysc-pruss", "ti,sysc";
+			reg = <0x326000 0x4>,
+			      <0x326004 0x4>;
+			reg-names = "rev", "sysc";
+			ti,sysc-mask = <(SYSC_PRUSS_STANDBY_INIT |
+					 SYSC_PRUSS_SUB_MWAIT)>;
+			ti,sysc-midle = <SYSC_IDLE_FORCE>,
+					<SYSC_IDLE_NO>,
+					<SYSC_IDLE_SMART>;
+			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+					<SYSC_IDLE_NO>,
+					<SYSC_IDLE_SMART>;
+			clocks = <&pruss_ocp_clkctrl AM3_PRUSS_OCP_PRUSS_CLKCTRL 0>;
+			clock-names = "fck";
+			resets = <&prm_per 1>;
+			reset-names = "rstctrl";
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges = <0x0 0x300000 0x80000>;
+			status = "disabled";
 		};
 	};
 };
-- 
2.23.0


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

* [PATCH v2 4/5] ARM: dts: AM4372: Add the PRU-ICSS interconnect target-module node
  2020-02-27 22:28 [PATCH v2 0/5] ti-sysc support for PRUSS Suman Anna
                   ` (2 preceding siblings ...)
  2020-02-27 22:28 ` [PATCH v2 3/5] ARM: dts: AM33xx-l4: Update PRUSS interconnect target-module node Suman Anna
@ 2020-02-27 22:28 ` Suman Anna
  2020-02-28  8:33   ` Roger Quadros
  2020-02-27 22:28 ` [PATCH v2 5/5] ARM: dts: dra7: Add PRU-ICSS interconnect target-module nodes Suman Anna
  2020-03-04 16:28 ` [PATCH v2 0/5] ti-sysc support for PRUSS Tony Lindgren
  5 siblings, 1 reply; 10+ messages in thread
From: Suman Anna @ 2020-02-27 22:28 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Roger Quadros, Tero Kristo, linux-omap, linux-kernel, devicetree,
	Suman Anna

The AM437x family of SoCs contains two dissimilar PRU-ICSS instances,
but leverage a common reset line and SYSCFG from the larger PRU-ICSS1
instance. This SYSC register has also very unique bit-fields. Both
the IPs require the PRCM reset to be deasserted to be able to access
any registers. Add a common PRUSS interconnect target-module with all
the required properties.

The PRUSS devices themselves shall be added as child nodes to this
interconnect node in the future. The PRU-ICSS instances are not
supported on AM4372 SoC though in the AM437x family, so the target
module node should be disabled in any derivative board files that
use this SoC.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
v2: 
 - Remove status=disabled
 - Revise last para in patch description

 arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index faa14dc0faff..9f39413b0d0e 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -344,6 +344,28 @@
 			};
 		};
 
+		pruss_tm: target-module@54400000 {
+			compatible = "ti,sysc-pruss", "ti,sysc";
+			reg = <0x54426000 0x4>,
+			      <0x54426004 0x4>;
+			reg-names = "rev", "sysc";
+			ti,sysc-mask = <(SYSC_PRUSS_STANDBY_INIT |
+					 SYSC_PRUSS_SUB_MWAIT)>;
+			ti,sysc-midle = <SYSC_IDLE_FORCE>,
+					<SYSC_IDLE_NO>,
+					<SYSC_IDLE_SMART>;
+			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+					<SYSC_IDLE_NO>,
+					<SYSC_IDLE_SMART>;
+			clocks = <&pruss_ocp_clkctrl AM4_PRUSS_OCP_PRUSS_CLKCTRL 0>;
+			clock-names = "fck";
+			resets = <&prm_per 1>;
+			reset-names = "rstctrl";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0x0 0x54400000 0x80000>;
+		};
+
 		gpmc: gpmc@50000000 {
 			compatible = "ti,am3352-gpmc";
 			ti,hwmods = "gpmc";
-- 
2.23.0


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

* [PATCH v2 5/5] ARM: dts: dra7: Add PRU-ICSS interconnect target-module nodes
  2020-02-27 22:28 [PATCH v2 0/5] ti-sysc support for PRUSS Suman Anna
                   ` (3 preceding siblings ...)
  2020-02-27 22:28 ` [PATCH v2 4/5] ARM: dts: AM4372: Add the PRU-ICSS " Suman Anna
@ 2020-02-27 22:28 ` Suman Anna
  2020-03-04 16:28 ` [PATCH v2 0/5] ti-sysc support for PRUSS Tony Lindgren
  5 siblings, 0 replies; 10+ messages in thread
From: Suman Anna @ 2020-02-27 22:28 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Roger Quadros, Tero Kristo, linux-omap, linux-kernel, devicetree,
	Suman Anna

The AM57xx family of SoCs contains two identical PRU-ICSS instances
that have a very unique SYSC register. The IPs do not have any
PRCM reset lines unlike those on AM33xx/AM437x SoCs. Add the PRUSS
interconnect target-module nodes with all the required properties.

Each of the PRUSS devices themselves shall be added as child nodes
to the corresponding interconnect node in the future. The PRU-ICSS
instances are only available on AM57xx family of SoCs and are not
supported on DRA7xx family of SoCs in general, so the target module
nodes are added in a separate dtsi file. This new dtsi file is
included in all the AM57xx SoC dtsi files, so the nodes are
automatically inherited and enabled on all AM57xx boards.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
v2: No changes

 arch/arm/boot/dts/am57-pruss.dtsi | 50 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/am5718.dtsi     |  1 +
 arch/arm/boot/dts/am5728.dtsi     |  1 +
 arch/arm/boot/dts/am5748.dtsi     |  1 +
 arch/arm/boot/dts/dra7.dtsi       |  2 +-
 5 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/am57-pruss.dtsi

diff --git a/arch/arm/boot/dts/am57-pruss.dtsi b/arch/arm/boot/dts/am57-pruss.dtsi
new file mode 100644
index 000000000000..b1c583dee10b
--- /dev/null
+++ b/arch/arm/boot/dts/am57-pruss.dtsi
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Common PRUSS data for TI AM57xx platforms
+ */
+
+&ocp {
+	pruss1_tm: target-module@4b226000 {
+		compatible = "ti,sysc-pruss", "ti,sysc";
+		reg = <0x4b226000 0x4>,
+		      <0x4b226004 0x4>;
+		reg-names = "rev", "sysc";
+		ti,sysc-mask = <(SYSC_PRUSS_STANDBY_INIT |
+				 SYSC_PRUSS_SUB_MWAIT)>;
+		ti,sysc-midle = <SYSC_IDLE_FORCE>,
+				<SYSC_IDLE_NO>,
+				<SYSC_IDLE_SMART>;
+		ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+				<SYSC_IDLE_NO>,
+				<SYSC_IDLE_SMART>;
+		/* Domains (P, C): coreaon_pwrdm, l4per2_clkdm */
+		clocks = <&l4per2_clkctrl DRA7_L4PER2_PRUSS1_CLKCTRL 0>;
+		clock-names = "fck";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x00000000 0x4b200000 0x80000>;
+	};
+
+	pruss2_tm: target-module@4b2a6000 {
+		compatible = "ti,sysc-pruss", "ti,sysc";
+		reg = <0x4b2a6000 0x4>,
+		      <0x4b2a6004 0x4>;
+		reg-names = "rev", "sysc";
+		ti,sysc-mask = <(SYSC_PRUSS_STANDBY_INIT |
+				 SYSC_PRUSS_SUB_MWAIT)>;
+		ti,sysc-midle = <SYSC_IDLE_FORCE>,
+				<SYSC_IDLE_NO>,
+				<SYSC_IDLE_SMART>;
+		ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+				<SYSC_IDLE_NO>,
+				<SYSC_IDLE_SMART>;
+		/* Domains (P, C): coreaon_pwrdm, l4per2_clkdm */
+		clocks = <&l4per2_clkctrl DRA7_L4PER2_PRUSS2_CLKCTRL 0>;
+		clock-names = "fck";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x00000000 0x4b280000 0x80000>;
+	};
+};
diff --git a/arch/arm/boot/dts/am5718.dtsi b/arch/arm/boot/dts/am5718.dtsi
index d51007c3e8c4..a80c2e3eee2e 100644
--- a/arch/arm/boot/dts/am5718.dtsi
+++ b/arch/arm/boot/dts/am5718.dtsi
@@ -4,6 +4,7 @@
  */
 
 #include "dra72x.dtsi"
+#include "am57-pruss.dtsi"
 
 / {
 	compatible = "ti,am5718", "ti,dra7";
diff --git a/arch/arm/boot/dts/am5728.dtsi b/arch/arm/boot/dts/am5728.dtsi
index 82e5427ef6a9..9a3810f5adcc 100644
--- a/arch/arm/boot/dts/am5728.dtsi
+++ b/arch/arm/boot/dts/am5728.dtsi
@@ -4,6 +4,7 @@
  */
 
 #include "dra74x.dtsi"
+#include "am57-pruss.dtsi"
 
 / {
 	compatible = "ti,am5728", "ti,dra7";
diff --git a/arch/arm/boot/dts/am5748.dtsi b/arch/arm/boot/dts/am5748.dtsi
index 5e129759d04a..2b65317b1513 100644
--- a/arch/arm/boot/dts/am5748.dtsi
+++ b/arch/arm/boot/dts/am5748.dtsi
@@ -4,6 +4,7 @@
  */
 
 #include "dra76x.dtsi"
+#include "am57-pruss.dtsi"
 
 / {
 	compatible = "ti,am5748", "ti,dra762", "ti,dra7";
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index d78b684e7fca..f2e44c0dcd1e 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -143,7 +143,7 @@
 	 * the moment, just use a fake OCP bus entry to represent the whole bus
 	 * hierarchy.
 	 */
-	ocp {
+	ocp: ocp {
 		compatible = "ti,dra7-l3-noc", "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-- 
2.23.0


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

* Re: [PATCH v2 3/5] ARM: dts: AM33xx-l4: Update PRUSS interconnect target-module node
  2020-02-27 22:28 ` [PATCH v2 3/5] ARM: dts: AM33xx-l4: Update PRUSS interconnect target-module node Suman Anna
@ 2020-02-28  8:33   ` Roger Quadros
  0 siblings, 0 replies; 10+ messages in thread
From: Roger Quadros @ 2020-02-28  8:33 UTC (permalink / raw)
  To: Suman Anna, Tony Lindgren
  Cc: Tero Kristo, linux-omap, linux-kernel, devicetree



On 28/02/2020 00:28, Suman Anna wrote:
> The PRU-ICSS present on some AM33xx SoCs has a very unique SYSC
> register. The IP also uses a hard-reset line, and requires this
> PRCM reset to be deasserted to be able to access any registers.
> Update the existing PRUSS interconnect target-module with all
> the required properties.
> 
> The PRUSS device itself shall be added as a child node to this
> interconnect node in the future. PRU-ICSS is not supported on
> AM3351/AM3352/AM3354 SoCs though in the AM33xx family, so the
> target module node should be disabled in derivative board files
> that use any of these SoCs.
> 
> Signed-off-by: Suman Anna <s-anna@ti.com>

Reviewed-by: Roger Quadros <rogerq@ti.com>

> ---
> v2: Revise patch description, no code changes
> 
>   arch/arm/boot/dts/am33xx-l4.dtsi | 21 ++++++++++++++++++---
>   1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
> index 4e2986f0c604..5ed7f3c58c0f 100644
> --- a/arch/arm/boot/dts/am33xx-l4.dtsi
> +++ b/arch/arm/boot/dts/am33xx-l4.dtsi
> @@ -759,12 +759,27 @@
>   			ranges = <0x0 0x200000 0x80000>;
>   		};
>   
> -		target-module@300000 {			/* 0x4a300000, ap 9 04.0 */
> -			compatible = "ti,sysc";
> -			status = "disabled";
> +		pruss_tm: target-module@300000 {	/* 0x4a300000, ap 9 04.0 */
> +			compatible = "ti,sysc-pruss", "ti,sysc";
> +			reg = <0x326000 0x4>,
> +			      <0x326004 0x4>;
> +			reg-names = "rev", "sysc";
> +			ti,sysc-mask = <(SYSC_PRUSS_STANDBY_INIT |
> +					 SYSC_PRUSS_SUB_MWAIT)>;
> +			ti,sysc-midle = <SYSC_IDLE_FORCE>,
> +					<SYSC_IDLE_NO>,
> +					<SYSC_IDLE_SMART>;
> +			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
> +					<SYSC_IDLE_NO>,
> +					<SYSC_IDLE_SMART>;
> +			clocks = <&pruss_ocp_clkctrl AM3_PRUSS_OCP_PRUSS_CLKCTRL 0>;
> +			clock-names = "fck";
> +			resets = <&prm_per 1>;
> +			reset-names = "rstctrl";
>   			#address-cells = <1>;
>   			#size-cells = <1>;
>   			ranges = <0x0 0x300000 0x80000>;
> +			status = "disabled";
>   		};
>   	};
>   };
> 

-- 
cheers,
-roger
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: [PATCH v2 4/5] ARM: dts: AM4372: Add the PRU-ICSS interconnect target-module node
  2020-02-27 22:28 ` [PATCH v2 4/5] ARM: dts: AM4372: Add the PRU-ICSS " Suman Anna
@ 2020-02-28  8:33   ` Roger Quadros
  0 siblings, 0 replies; 10+ messages in thread
From: Roger Quadros @ 2020-02-28  8:33 UTC (permalink / raw)
  To: Suman Anna, Tony Lindgren
  Cc: Tero Kristo, linux-omap, linux-kernel, devicetree



On 28/02/2020 00:28, Suman Anna wrote:
> The AM437x family of SoCs contains two dissimilar PRU-ICSS instances,
> but leverage a common reset line and SYSCFG from the larger PRU-ICSS1
> instance. This SYSC register has also very unique bit-fields. Both
> the IPs require the PRCM reset to be deasserted to be able to access
> any registers. Add a common PRUSS interconnect target-module with all
> the required properties.
> 
> The PRUSS devices themselves shall be added as child nodes to this
> interconnect node in the future. The PRU-ICSS instances are not
> supported on AM4372 SoC though in the AM437x family, so the target
> module node should be disabled in any derivative board files that
> use this SoC.
> 
> Signed-off-by: Suman Anna <s-anna@ti.com>

Reviewed-by: Roger Quadros <rogerq@ti.com>

> ---
> v2:
>   - Remove status=disabled
>   - Revise last para in patch description
> 
>   arch/arm/boot/dts/am4372.dtsi | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> index faa14dc0faff..9f39413b0d0e 100644
> --- a/arch/arm/boot/dts/am4372.dtsi
> +++ b/arch/arm/boot/dts/am4372.dtsi
> @@ -344,6 +344,28 @@
>   			};
>   		};
>   
> +		pruss_tm: target-module@54400000 {
> +			compatible = "ti,sysc-pruss", "ti,sysc";
> +			reg = <0x54426000 0x4>,
> +			      <0x54426004 0x4>;
> +			reg-names = "rev", "sysc";
> +			ti,sysc-mask = <(SYSC_PRUSS_STANDBY_INIT |
> +					 SYSC_PRUSS_SUB_MWAIT)>;
> +			ti,sysc-midle = <SYSC_IDLE_FORCE>,
> +					<SYSC_IDLE_NO>,
> +					<SYSC_IDLE_SMART>;
> +			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
> +					<SYSC_IDLE_NO>,
> +					<SYSC_IDLE_SMART>;
> +			clocks = <&pruss_ocp_clkctrl AM4_PRUSS_OCP_PRUSS_CLKCTRL 0>;
> +			clock-names = "fck";
> +			resets = <&prm_per 1>;
> +			reset-names = "rstctrl";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges = <0x0 0x54400000 0x80000>;
> +		};
> +
>   		gpmc: gpmc@50000000 {
>   			compatible = "ti,am3352-gpmc";
>   			ti,hwmods = "gpmc";
> 

-- 
cheers,
-roger

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: [PATCH v2 1/5] dt-bindings: bus: ti-sysc: Add support for PRUSS SYSC type
  2020-02-27 22:28 ` [PATCH v2 1/5] dt-bindings: bus: ti-sysc: Add support for PRUSS SYSC type Suman Anna
@ 2020-03-03 22:40   ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-03-03 22:40 UTC (permalink / raw)
  To: Suman Anna
  Cc: Tony Lindgren, Roger Quadros, Tero Kristo, linux-omap,
	linux-kernel, devicetree, Suman Anna

On Thu, 27 Feb 2020 16:28:33 -0600, Suman Anna wrote:
> From: Roger Quadros <rogerq@ti.com>
> 
> The PRUSS module has a SYSCFG which is unique. The SYSCFG
> has two additional unique fields called STANDBY_INIT and
> SUB_MWAIT in addition to regular IDLE_MODE and STANDBY_MODE
> fields. Add the bindings for this new sysc type.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Suman Anna <s-anna@ti.com>
> ---
> v2: No changes
> 
>  Documentation/devicetree/bindings/bus/ti-sysc.txt | 1 +
>  include/dt-bindings/bus/ti-sysc.h                 | 4 ++++
>  2 files changed, 5 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 0/5] ti-sysc support for PRUSS
  2020-02-27 22:28 [PATCH v2 0/5] ti-sysc support for PRUSS Suman Anna
                   ` (4 preceding siblings ...)
  2020-02-27 22:28 ` [PATCH v2 5/5] ARM: dts: dra7: Add PRU-ICSS interconnect target-module nodes Suman Anna
@ 2020-03-04 16:28 ` Tony Lindgren
  5 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2020-03-04 16:28 UTC (permalink / raw)
  To: Suman Anna
  Cc: Roger Quadros, Tero Kristo, linux-omap, linux-kernel, devicetree

* Suman Anna <s-anna@ti.com> [200227 14:29]:
> Hi Tony,
> 
> The following is a revised series of the ti-sysc support for PRUSS.
> Please refer to the original series cover-letter [1] for details.
> 
> Following are the main changes in v2:
>  - Drop the enabling of the interconnect nodes from various AM335x and
>    AM437x board dts files (last 7 patches from original series)
>  - Enable the target-module node for AM437x by default. None of the
>    current AM437x board dts files use AM4372, so there should not be
>    any regressions.
> 
> We can drop the status=disabled in the am33xx.dtsi file once we add the
> SoC revision support for AM335x SoCs. This is already disabled before the
> series as well. I have identified a few boards which use the older SoCs
> that can disable the node in dts, but there were few others which can
> use any of the SoCs, so those will definitely require the SoC device
> match logic and an additional PRUSS disable quirk in the ti-sysc bus
> driver.

OK thanks, applied and pushed out into omap-for-v5.7/ti-sysc-drop-pdata.

Regards,

Tony

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

end of thread, other threads:[~2020-03-04 16:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 22:28 [PATCH v2 0/5] ti-sysc support for PRUSS Suman Anna
2020-02-27 22:28 ` [PATCH v2 1/5] dt-bindings: bus: ti-sysc: Add support for PRUSS SYSC type Suman Anna
2020-03-03 22:40   ` Rob Herring
2020-02-27 22:28 ` [PATCH v2 2/5] " Suman Anna
2020-02-27 22:28 ` [PATCH v2 3/5] ARM: dts: AM33xx-l4: Update PRUSS interconnect target-module node Suman Anna
2020-02-28  8:33   ` Roger Quadros
2020-02-27 22:28 ` [PATCH v2 4/5] ARM: dts: AM4372: Add the PRU-ICSS " Suman Anna
2020-02-28  8:33   ` Roger Quadros
2020-02-27 22:28 ` [PATCH v2 5/5] ARM: dts: dra7: Add PRU-ICSS interconnect target-module nodes Suman Anna
2020-03-04 16:28 ` [PATCH v2 0/5] ti-sysc support for PRUSS Tony Lindgren

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).