All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND v6 0/3] ARM: dts: TI AM437X ADC1
@ 2021-11-26 14:24 Miquel Raynal
  2021-11-26 14:24 ` [RESEND v6 1/3] ARM: dts: am437x-cm-t43: Use a correctly spelled DT property Miquel Raynal
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Miquel Raynal @ 2021-11-26 14:24 UTC (permalink / raw)
  To: bcousson, Tony Lindgren
  Cc: Rob Herring, devicetree, linux-omap, Thomas Petazzoni,
	linux-kernel, Miquel Raynal

Hello, as part of a very big series, support for the AM437X ADC1 has
been merged in v5.16-rc1. It involved quite a few changes in the MFD and
IIO subsystems, as well as the acknowledgment of new bindings:
https://lkml.org/lkml/2021/10/15/217

Now that everything is upstream, it's time to merge the device tree
changes which I am resending today (already Acked-by Tony but not taken
by anybody yet).

BTW I received a robot report which will be fixed by this series:
https://lkml.kernel.org/lkml/202111210737.L4TuykRK-lkp@intel.com/T/

Thanks,
Miquèl

Miquel Raynal (3):
  ARM: dts: am437x-cm-t43: Use a correctly spelled DT property
  ARM: dts: am43xx: Describe the magnetic reader/ADC1 hardware module
  ARM: dts: am437x-gp-evm: enable ADC1

 arch/arm/boot/dts/am437x-cm-t43.dts  |  2 +-
 arch/arm/boot/dts/am437x-gp-evm.dts  |  8 +++++++
 arch/arm/boot/dts/am437x-l4.dtsi     | 31 ++++++++++++++++++++++++++--
 arch/arm/boot/dts/am43xx-clocks.dtsi |  7 +++++++
 4 files changed, 45 insertions(+), 3 deletions(-)

-- 
2.27.0


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

* [RESEND v6 1/3] ARM: dts: am437x-cm-t43: Use a correctly spelled DT property
  2021-11-26 14:24 [RESEND v6 0/3] ARM: dts: TI AM437X ADC1 Miquel Raynal
@ 2021-11-26 14:24 ` Miquel Raynal
  2021-11-26 14:24 ` [RESEND v6 2/3] ARM: dts: am43xx: Describe the magnetic reader/ADC1 hardware module Miquel Raynal
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Miquel Raynal @ 2021-11-26 14:24 UTC (permalink / raw)
  To: bcousson, Tony Lindgren
  Cc: Rob Herring, devicetree, linux-omap, Thomas Petazzoni,
	linux-kernel, Miquel Raynal

Back in 2014 a property got misspelled "ti,coordiante-readouts" instead
of "ti,coordinate-readouts".

The year after it got fixed but both are still supported, although this
is not a reason to continue using this old deprecated property.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/am437x-cm-t43.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am437x-cm-t43.dts b/arch/arm/boot/dts/am437x-cm-t43.dts
index 5ce8e684e7d3..3e3354780db8 100644
--- a/arch/arm/boot/dts/am437x-cm-t43.dts
+++ b/arch/arm/boot/dts/am437x-cm-t43.dts
@@ -399,7 +399,7 @@ &tscadc {
 	tsc {
 		ti,wires = <4>;
 		ti,x-plate-resistance = <200>;
-		ti,coordiante-readouts = <5>;
+		ti,coordinate-readouts = <5>;
 		ti,wire-config = <0x00 0x11 0x22 0x33>;
 	};
 
-- 
2.27.0


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

* [RESEND v6 2/3] ARM: dts: am43xx: Describe the magnetic reader/ADC1 hardware module
  2021-11-26 14:24 [RESEND v6 0/3] ARM: dts: TI AM437X ADC1 Miquel Raynal
  2021-11-26 14:24 ` [RESEND v6 1/3] ARM: dts: am437x-cm-t43: Use a correctly spelled DT property Miquel Raynal
@ 2021-11-26 14:24 ` Miquel Raynal
  2021-11-26 14:24 ` [RESEND v6 3/3] ARM: dts: am437x-gp-evm: enable ADC1 Miquel Raynal
  2021-12-09  7:43 ` [RESEND v6 0/3] ARM: dts: TI AM437X ADC1 Tony Lindgren
  3 siblings, 0 replies; 5+ messages in thread
From: Miquel Raynal @ 2021-11-26 14:24 UTC (permalink / raw)
  To: bcousson, Tony Lindgren
  Cc: Rob Herring, devicetree, linux-omap, Thomas Petazzoni,
	linux-kernel, Miquel Raynal

This hardware module is close to the am33xx ADC module but instead of
featuring a touchscreen it has a magnetic reader capability.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/am437x-l4.dtsi     | 31 ++++++++++++++++++++++++++--
 arch/arm/boot/dts/am43xx-clocks.dtsi |  7 +++++++
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/am437x-l4.dtsi b/arch/arm/boot/dts/am437x-l4.dtsi
index ba58e6b0da1d..8f2268c02778 100644
--- a/arch/arm/boot/dts/am437x-l4.dtsi
+++ b/arch/arm/boot/dts/am437x-l4.dtsi
@@ -2378,11 +2378,38 @@ hdq: hdq@0 {
 		};
 
 		target-module@4c000 {			/* 0x4834c000, ap 114 72.0 */
-			compatible = "ti,sysc";
-			status = "disabled";
+			compatible = "ti,sysc-omap4", "ti,sysc";
+			reg = <0x4c000 0x4>,
+			      <0x4c010 0x4>;
+			reg-names = "rev", "sysc";
+			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+					<SYSC_IDLE_NO>,
+					<SYSC_IDLE_SMART>;
+			clocks = <&l3s_clkctrl AM4_L3S_ADC1_CLKCTRL 0>;
+			clock-names = "fck";
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges = <0x0 0x4c000 0x2000>;
+
+			magadc: magadc@0 {
+				compatible = "ti,am4372-magadc";
+				reg = <0x0 0x2000>;
+				interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&adc_mag_fck>;
+				clock-names = "fck";
+				dmas = <&edma 54 0>, <&edma 55 0>;
+				dma-names = "fifo0", "fifo1";
+				status = "disabled";
+
+				mag {
+					compatible = "ti,am4372-mag";
+				};
+
+				adc {
+					#io-channel-cells = <1>;
+					compatible ="ti,am4372-adc";
+				};
+			};
 		};
 
 		target-module@80000 {			/* 0x48380000, ap 123 42.0 */
diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi
index 314fc5975acb..66e892fa3398 100644
--- a/arch/arm/boot/dts/am43xx-clocks.dtsi
+++ b/arch/arm/boot/dts/am43xx-clocks.dtsi
@@ -444,6 +444,13 @@ wdt1_fck: wdt1_fck@422c {
 		reg = <0x422c>;
 	};
 
+	adc_mag_fck: adc_mag_fck@424c {
+		#clock-cells = <0>;
+		compatible = "ti,mux-clock";
+		clocks = <&sys_clkin_ck>, <&dpll_per_m2_ck>;
+		reg = <0x424c>;
+	};
+
 	l3_gclk: l3_gclk {
 		#clock-cells = <0>;
 		compatible = "fixed-factor-clock";
-- 
2.27.0


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

* [RESEND v6 3/3] ARM: dts: am437x-gp-evm: enable ADC1
  2021-11-26 14:24 [RESEND v6 0/3] ARM: dts: TI AM437X ADC1 Miquel Raynal
  2021-11-26 14:24 ` [RESEND v6 1/3] ARM: dts: am437x-cm-t43: Use a correctly spelled DT property Miquel Raynal
  2021-11-26 14:24 ` [RESEND v6 2/3] ARM: dts: am43xx: Describe the magnetic reader/ADC1 hardware module Miquel Raynal
@ 2021-11-26 14:24 ` Miquel Raynal
  2021-12-09  7:43 ` [RESEND v6 0/3] ARM: dts: TI AM437X ADC1 Tony Lindgren
  3 siblings, 0 replies; 5+ messages in thread
From: Miquel Raynal @ 2021-11-26 14:24 UTC (permalink / raw)
  To: bcousson, Tony Lindgren
  Cc: Rob Herring, devicetree, linux-omap, Thomas Petazzoni,
	linux-kernel, Miquel Raynal

ADC0 and ADC1 pins are available on external connector J22.

Enable ADC1 which was missing.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 arch/arm/boot/dts/am437x-gp-evm.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index c2e4896076e7..4416ddb559e4 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -775,6 +775,14 @@ adc {
 	};
 };
 
+&magadc {
+	status = "okay";
+
+	adc {
+		ti,adc-channels = <0 1 2 3 4 5 6 7>;
+	};
+};
+
 &ecap0 {
 	status = "okay";
 	pinctrl-names = "default";
-- 
2.27.0


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

* Re: [RESEND v6 0/3] ARM: dts: TI AM437X ADC1
  2021-11-26 14:24 [RESEND v6 0/3] ARM: dts: TI AM437X ADC1 Miquel Raynal
                   ` (2 preceding siblings ...)
  2021-11-26 14:24 ` [RESEND v6 3/3] ARM: dts: am437x-gp-evm: enable ADC1 Miquel Raynal
@ 2021-12-09  7:43 ` Tony Lindgren
  3 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2021-12-09  7:43 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: bcousson, Rob Herring, devicetree, linux-omap, Thomas Petazzoni,
	linux-kernel

* Miquel Raynal <miquel.raynal@bootlin.com> [211126 16:24]:
> Hello, as part of a very big series, support for the AM437X ADC1 has
> been merged in v5.16-rc1. It involved quite a few changes in the MFD and
> IIO subsystems, as well as the acknowledgment of new bindings:
> https://lkml.org/lkml/2021/10/15/217
> 
> Now that everything is upstream, it's time to merge the device tree
> changes which I am resending today (already Acked-by Tony but not taken
> by anybody yet).

Thanks applying all three into omap-for-v5.17/dt.

Tony

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

end of thread, other threads:[~2021-12-09  7:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-26 14:24 [RESEND v6 0/3] ARM: dts: TI AM437X ADC1 Miquel Raynal
2021-11-26 14:24 ` [RESEND v6 1/3] ARM: dts: am437x-cm-t43: Use a correctly spelled DT property Miquel Raynal
2021-11-26 14:24 ` [RESEND v6 2/3] ARM: dts: am43xx: Describe the magnetic reader/ADC1 hardware module Miquel Raynal
2021-11-26 14:24 ` [RESEND v6 3/3] ARM: dts: am437x-gp-evm: enable ADC1 Miquel Raynal
2021-12-09  7:43 ` [RESEND v6 0/3] ARM: dts: TI AM437X ADC1 Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.