linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: ti: k3-am64-main: Add ADC nodes
@ 2021-03-09 13:07 Vignesh Raghavendra
  2021-03-11 11:35 ` Lokesh Vutla
  0 siblings, 1 reply; 3+ messages in thread
From: Vignesh Raghavendra @ 2021-03-09 13:07 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo
  Cc: Rob Herring, linux-arm-kernel, devicetree, linux-kernel,
	Vignesh Raghavendra, Lokesh Vutla

AM64 SoC has a single ADC IP with 8 channels. Add DT node for the same.

Default usecase is to control ADC from non Linux core on the system on
AM642 GP EVM, therefore mark the node as reserved in k3-am642-evm.dts
file. ADC lines are not pinned out on AM642 SK board, therefore disable
the node in k3-am642-sk.dts file.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 17 +++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts  |  5 +++++
 arch/arm64/boot/dts/ti/k3-am642-sk.dts   |  4 ++++
 3 files changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index bcec4fa444b5..1bb1e292547d 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -427,4 +427,21 @@ ospi0: spi@fc40000 {
 			power-domains = <&k3_pds 75 TI_SCI_PD_EXCLUSIVE>;
 		};
 	};
+
+	tscadc0: tscadc@28001000 {
+		compatible = "ti,am654-tscadc", "ti,am3359-tscadc";
+		reg = <0x00 0x28001000 0x00 0x1000>;
+		interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 0 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 0 0>;
+		assigned-clocks = <&k3_clks 0 0>;
+		assigned-clock-parents = <&k3_clks 0 3>;
+		assigned-clock-rates = <60000000>;
+		clock-names = "adc_tsc_fck";
+
+		adc {
+			#io-channel-cells = <1>;
+			compatible = "ti,am654-adc", "ti,am3359-adc";
+		};
+	};
 };
diff --git a/arch/arm64/boot/dts/ti/k3-am642-evm.dts b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
index 7dd8e94b108d..7154d34faf4c 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
@@ -280,3 +280,8 @@ flash@0{
 		#size-cells = <1>;
 	};
 };
+
+&tscadc0 {
+	/* ADC is reserved for R5 usage */
+	status = "reserved";
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am642-sk.dts b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
index fc27470fc083..28059f07bef1 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
@@ -207,3 +207,7 @@ flash@0{
 		#size-cells = <1>;
 	};
 };
+
+&tscadc0 {
+	status = "disabled";
+};
-- 
2.30.1


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

* Re: [PATCH] arm64: dts: ti: k3-am64-main: Add ADC nodes
  2021-03-09 13:07 [PATCH] arm64: dts: ti: k3-am64-main: Add ADC nodes Vignesh Raghavendra
@ 2021-03-11 11:35 ` Lokesh Vutla
  2021-03-16 11:47   ` Nishanth Menon
  0 siblings, 1 reply; 3+ messages in thread
From: Lokesh Vutla @ 2021-03-11 11:35 UTC (permalink / raw)
  To: Vignesh Raghavendra, Nishanth Menon, Tero Kristo
  Cc: Rob Herring, linux-arm-kernel, devicetree, linux-kernel



On 09/03/21 6:37 pm, Vignesh Raghavendra wrote:
> AM64 SoC has a single ADC IP with 8 channels. Add DT node for the same.
> 
> Default usecase is to control ADC from non Linux core on the system on
> AM642 GP EVM, therefore mark the node as reserved in k3-am642-evm.dts
> file. ADC lines are not pinned out on AM642 SK board, therefore disable
> the node in k3-am642-sk.dts file.
> 
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh


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

* Re: [PATCH] arm64: dts: ti: k3-am64-main: Add ADC nodes
  2021-03-11 11:35 ` Lokesh Vutla
@ 2021-03-16 11:47   ` Nishanth Menon
  0 siblings, 0 replies; 3+ messages in thread
From: Nishanth Menon @ 2021-03-16 11:47 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: Vignesh Raghavendra, Tero Kristo, Rob Herring, linux-arm-kernel,
	devicetree, linux-kernel

On 17:05-20210311, Lokesh Vutla wrote:
> 
> 
> On 09/03/21 6:37 pm, Vignesh Raghavendra wrote:
> > AM64 SoC has a single ADC IP with 8 channels. Add DT node for the same.
> > 
> > Default usecase is to control ADC from non Linux core on the system on
> > AM642 GP EVM, therefore mark the node as reserved in k3-am642-evm.dts
> > file. ADC lines are not pinned out on AM642 SK board, therefore disable
> > the node in k3-am642-sk.dts file.
> > 
> > Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> 
> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


Looks like the patch wont apply anymore after all the cpsw nodes got in.
could you rebase and repost?

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D)/Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

end of thread, other threads:[~2021-03-16 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 13:07 [PATCH] arm64: dts: ti: k3-am64-main: Add ADC nodes Vignesh Raghavendra
2021-03-11 11:35 ` Lokesh Vutla
2021-03-16 11:47   ` Nishanth Menon

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