diff mbox series

[v2,1/2] ARM: dts: Move interconnect target module for omap3 sgx to separate dtsi files

Message ID 20191230202037.28836-1-nerv@dawncrow.de (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] ARM: dts: Move interconnect target module for omap3 sgx to separate dtsi files | expand

Commit Message

André Hentschel Dec. 30, 2019, 8:20 p.m. UTC
Only dm3730 and am3715 come with SGX support

Signed-off-by: André Hentschel <nerv@dawncrow.de>
---

I changed some dtsi files where I could be sure it's dm3730

 arch/arm/boot/dts/am3715.dtsi            | 38 ++++++++++++++++++++++++
 arch/arm/boot/dts/dm3730.dtsi            |  6 ++++
 arch/arm/boot/dts/omap3-gta04.dtsi       |  2 +-
 arch/arm/boot/dts/omap3-lilly-a83x.dtsi  |  2 +-
 arch/arm/boot/dts/omap3-pandora-1ghz.dts |  2 +-
 arch/arm/boot/dts/omap36xx.dtsi          | 28 -----------------
 6 files changed, 47 insertions(+), 31 deletions(-)
 create mode 100644 arch/arm/boot/dts/am3715.dtsi
 create mode 100644 arch/arm/boot/dts/dm3730.dtsi

Comments

Tony Lindgren Jan. 2, 2020, 7:33 p.m. UTC | #1
* André Hentschel <nerv@dawncrow.de> [191230 20:22]:
> Only dm3730 and am3715 come with SGX support

AFAIK dm3730 is just a marketing name for a catalog version of
omap3630. So using omap36xx.dtsi is correct and we should not
change that.

Can you please just add a minimal dm3725.dtsi that your board dts
can include and avoid disabling sgx in the board specific file?
That is assuming you have dm3725 with dsp and isp but no sgx.

You can read the detected SoC with:

# cat /sys/bus/soc/devices/soc0/machine

This avoids somebody (probably me again) patching all over the
board specific files trying to guess which SoC the device might
have.

Regards,

Tony
André Hentschel Jan. 2, 2020, 9:15 p.m. UTC | #2
Am 02.01.20 um 20:33 schrieb Tony Lindgren:
> * André Hentschel <nerv@dawncrow.de> [191230 20:22]:
>> Only dm3730 and am3715 come with SGX support
> 
> AFAIK dm3730 is just a marketing name for a catalog version of
> omap3630. So using omap36xx.dtsi is correct and we should not
> change that.
> 
> Can you please just add a minimal dm3725.dtsi that your board dts
> can include and avoid disabling sgx in the board specific file?
> That is assuming you have dm3725 with dsp and isp but no sgx.

I removed the sgx disable part already in 2/2.
Consulting my table:
     DM3730 | DM3725 | AM3715 | AM3703
DSP    X    |   X    |        |    
SGX    X    |        |   X    |    
Where X is "supported"

So including omap63xx.dtsi seems right after this patch moves the
sgx part to separate dtsi. Or do you want to have the sxg
disabling in the dm3725.dtsi?

> You can read the detected SoC with:
> 
> # cat /sys/bus/soc/devices/soc0/machine

# cat /sys/bus/soc/devices/soc0/machine
DM3725
# cat /sys/bus/soc/devices/soc0/revision 
ES1.2
Tony Lindgren Jan. 2, 2020, 9:20 p.m. UTC | #3
* André Hentschel <nerv@dawncrow.de> [200102 21:16]:
> Am 02.01.20 um 20:33 schrieb Tony Lindgren:
> > * André Hentschel <nerv@dawncrow.de> [191230 20:22]:
> >> Only dm3730 and am3715 come with SGX support
> > 
> > AFAIK dm3730 is just a marketing name for a catalog version of
> > omap3630. So using omap36xx.dtsi is correct and we should not
> > change that.
> > 
> > Can you please just add a minimal dm3725.dtsi that your board dts
> > can include and avoid disabling sgx in the board specific file?
> > That is assuming you have dm3725 with dsp and isp but no sgx.
> 
> I removed the sgx disable part already in 2/2.
> Consulting my table:
>      DM3730 | DM3725 | AM3715 | AM3703
> DSP    X    |   X    |        |    
> SGX    X    |        |   X    |    
> Where X is "supported"
> 
> So including omap63xx.dtsi seems right after this patch moves the
> sgx part to separate dtsi. Or do you want to have the sxg
> disabling in the dm3725.dtsi?

Yes please just add a minimal dm3725.dtsi including omap36xx.dtsi
and setting sgx to status = "disabled". And then you can include
dm3725.dtsi from your board specific dts file.

> > You can read the detected SoC with:
> > 
> > # cat /sys/bus/soc/devices/soc0/machine
> 
> # cat /sys/bus/soc/devices/soc0/machine
> DM3725
> # cat /sys/bus/soc/devices/soc0/revision 
> ES1.2

OK yeah makes sense for that product as potentially only the dsp
is used for audio.

Regards,

Tony
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/am3715.dtsi b/arch/arm/boot/dts/am3715.dtsi
new file mode 100644
index 000000000000..f53d1f24dc53
--- /dev/null
+++ b/arch/arm/boot/dts/am3715.dtsi
@@ -0,0 +1,38 @@ 
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2019 André Hentschel <nerv@dawncrow.de>
+ */
+
+#include "omap36xx.dtsi"
+
+/ {
+	ocp@68000000 {
+		/*
+		 * Note that the sysconfig register layout is a subset of the
+		 * "ti,sysc-omap4" type register with just sidle and midle bits
+		 * available while omap34xx has "ti,sysc-omap2" type sysconfig.
+		 */
+		sgx_module: target-module@50000000 {
+			compatible = "ti,sysc-omap4", "ti,sysc";
+			reg = <0x5000fe00 0x4>,
+			      <0x5000fe10 0x4>;
+			reg-names = "rev", "sysc";
+			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 = <&sgx_fck>, <&sgx_ick>;
+			clock-names = "fck", "ick";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x50000000 0x2000000>;
+
+			/*
+			 * Closed source PowerVR driver, no child device
+			 * binding or driver in mainline
+			 */
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/dm3730.dtsi b/arch/arm/boot/dts/dm3730.dtsi
new file mode 100644
index 000000000000..8d278499965b
--- /dev/null
+++ b/arch/arm/boot/dts/dm3730.dtsi
@@ -0,0 +1,6 @@ 
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2019 André Hentschel <nerv@dawncrow.de>
+ */
+
+#include "am3715.dtsi"
diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index b6ef1a7ac8a4..564bce9164f9 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -6,7 +6,7 @@ 
  */
 /dts-v1/;
 
-#include "omap36xx.dtsi"
+#include "dm3730.dtsi"
 #include <dt-bindings/input/input.h>
 
 / {
diff --git a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
index c22833d4e568..1086cde24ba5 100644
--- a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
+++ b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
@@ -3,7 +3,7 @@ 
  * Copyright (C) 2014 Christoph Fritz <chf.fritzc@googlemail.com>
  */
 
-#include "omap36xx.dtsi"
+#include "dm3730.dtsi"
 
 / {
 	model = "INCOstartec LILLY-A83X module (DM3730)";
diff --git a/arch/arm/boot/dts/omap3-pandora-1ghz.dts b/arch/arm/boot/dts/omap3-pandora-1ghz.dts
index 81b957f33c9f..da71dd68a84a 100644
--- a/arch/arm/boot/dts/omap3-pandora-1ghz.dts
+++ b/arch/arm/boot/dts/omap3-pandora-1ghz.dts
@@ -10,7 +10,7 @@ 
 
 /dts-v1/;
 
-#include "omap36xx.dtsi"
+#include "dm3730.dtsi"
 #include "omap3-pandora-common.dtsi"
 
 / {
diff --git a/arch/arm/boot/dts/omap36xx.dtsi b/arch/arm/boot/dts/omap36xx.dtsi
index 1e552f08f120..6fb23ada1f64 100644
--- a/arch/arm/boot/dts/omap36xx.dtsi
+++ b/arch/arm/boot/dts/omap36xx.dtsi
@@ -139,34 +139,6 @@ 
 				interrupts = <18>;
 			};
 		};
-
-		/*
-		 * Note that the sysconfig register layout is a subset of the
-		 * "ti,sysc-omap4" type register with just sidle and midle bits
-		 * available while omap34xx has "ti,sysc-omap2" type sysconfig.
-		 */
-		sgx_module: target-module@50000000 {
-			compatible = "ti,sysc-omap4", "ti,sysc";
-			reg = <0x5000fe00 0x4>,
-			      <0x5000fe10 0x4>;
-			reg-names = "rev", "sysc";
-			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 = <&sgx_fck>, <&sgx_ick>;
-			clock-names = "fck", "ick";
-			#address-cells = <1>;
-			#size-cells = <1>;
-			ranges = <0 0x50000000 0x2000000>;
-
-			/*
-			 * Closed source PowerVR driver, no child device
-			 * binding or driver in mainline
-			 */
-		};
 	};
 
 	thermal_zones: thermal-zones {