mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: ti: k3-j784s4: Add support for ADC nodes
@ 2023-04-12 10:09 Bhavya Kapoor
  2023-04-12 10:09 ` [PATCH 1/2] arm64: dts: ti: k3-j784s4-mcu-wakeup: " Bhavya Kapoor
  2023-04-12 10:09 ` [PATCH 2/2] arm64: dts: ti: k3-j784s4-evm: Add pinmux information for ADC Bhavya Kapoor
  0 siblings, 2 replies; 5+ messages in thread
From: Bhavya Kapoor @ 2023-04-12 10:09 UTC (permalink / raw)
  To: linux-kernel, devicetree
  Cc: b-kapoor, linux-arm-kernel, krzysztof.kozlowski+dt, robh+dt,
	kristo, vigneshr, nm

J784S4 has two instances of 8 channel ADCs in MCU domain. Add support
for both ADC nodes in dtsi file. Add pinmux information for both
instances of ADC in board dts file.

This series depends on DMA support patches for J784S4 which are
applied to linux-next. Tested on next-20230412.

Bhavya Kapoor (2):
  arm64: dts: ti: k3-j784s4-mcu-wakeup: Add support for ADC nodes
  arm64: dts: ti: k3-j784s4-evm: Add pinmux information for ADC

 arch/arm64/boot/dts/ti/k3-j784s4-evm.dts      | 44 +++++++++++++++++++
 .../boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi     | 40 +++++++++++++++++
 2 files changed, 84 insertions(+)

-- 
2.34.1


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

* [PATCH 1/2] arm64: dts: ti: k3-j784s4-mcu-wakeup: Add support for ADC nodes
  2023-04-12 10:09 [PATCH 0/2] arm64: dts: ti: k3-j784s4: Add support for ADC nodes Bhavya Kapoor
@ 2023-04-12 10:09 ` Bhavya Kapoor
  2023-04-28 17:49   ` Raghavendra, Vignesh
  2023-04-12 10:09 ` [PATCH 2/2] arm64: dts: ti: k3-j784s4-evm: Add pinmux information for ADC Bhavya Kapoor
  1 sibling, 1 reply; 5+ messages in thread
From: Bhavya Kapoor @ 2023-04-12 10:09 UTC (permalink / raw)
  To: linux-kernel, devicetree
  Cc: b-kapoor, linux-arm-kernel, krzysztof.kozlowski+dt, robh+dt,
	kristo, vigneshr, nm

J784S4 has two instances of 8 channel ADCs in MCU domain. Add support
for both ADC nodes.

Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
---
 .../boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi     | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi
index f04fcb614cbe..cb5ba5e94ec7 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi
@@ -342,4 +342,44 @@ cpts@3d000 {
 			ti,cpts-periodic-outputs = <2>;
 		};
 	};
+
+	tscadc0: tscadc@40200000 {
+		compatible = "ti,am3359-tscadc";
+		reg = <0x00 0x40200000 0x00 0x1000>;
+		interrupts = <GIC_SPI 860 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 0 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 0 0>;
+		assigned-clocks = <&k3_clks 0 2>;
+		assigned-clock-rates = <60000000>;
+		clock-names = "fck";
+		dmas = <&main_udmap 0x7400>,
+				<&main_udmap 0x7401>;
+		dma-names = "fifo0", "fifo1";
+		status = "disabled";
+
+		adc {
+				#io-channel-cells = <1>;
+				compatible = "ti,am3359-adc";
+		};
+	};
+
+	tscadc1: tscadc@40210000 {
+		compatible = "ti,am3359-tscadc";
+		reg = <0x00 0x40210000 0x00 0x1000>;
+		interrupts = <GIC_SPI 861 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 1 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 1 0>;
+		assigned-clocks = <&k3_clks 1 2>;
+		assigned-clock-rates = <60000000>;
+		clock-names = "fck";
+		dmas = <&main_udmap 0x7402>,
+				<&main_udmap 0x7403>;
+		dma-names = "fifo0", "fifo1";
+		status = "disabled";
+
+		adc {
+				#io-channel-cells = <1>;
+				compatible = "ti,am3359-adc";
+		};
+	};
 };
-- 
2.34.1


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

* [PATCH 2/2] arm64: dts: ti: k3-j784s4-evm: Add pinmux information for ADC
  2023-04-12 10:09 [PATCH 0/2] arm64: dts: ti: k3-j784s4: Add support for ADC nodes Bhavya Kapoor
  2023-04-12 10:09 ` [PATCH 1/2] arm64: dts: ti: k3-j784s4-mcu-wakeup: " Bhavya Kapoor
@ 2023-04-12 10:09 ` Bhavya Kapoor
  2023-04-28 17:41   ` Raghavendra, Vignesh
  1 sibling, 1 reply; 5+ messages in thread
From: Bhavya Kapoor @ 2023-04-12 10:09 UTC (permalink / raw)
  To: linux-kernel, devicetree
  Cc: b-kapoor, linux-arm-kernel, krzysztof.kozlowski+dt, robh+dt,
	kristo, vigneshr, nm

J784S4 has two instances of 8 channel ADCs in MCU domain. Add pinmux
information for both ADC nodes.

Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
---
 arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 44 ++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
index f33815953e77..907a2153b41d 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
@@ -165,6 +165,32 @@ J784S4_WKUP_IOPAD(0x09c, PIN_OUTPUT, 0) /* (A36) MCU_MDIO0_MDC */
 			J784S4_WKUP_IOPAD(0x098, PIN_INPUT, 0) /* (B35) MCU_MDIO0_MDIO */
 		>;
 	};
+
+	mcu_adc0_pins_default: mcu-adc0-pins-default {
+		pinctrl-single,pins = <
+			J784S4_WKUP_IOPAD(0x134, PIN_INPUT, 0) /* (P36) MCU_ADC0_AIN0 */
+			J784S4_WKUP_IOPAD(0x138, PIN_INPUT, 0) /* (V36) MCU_ADC0_AIN1 */
+			J784S4_WKUP_IOPAD(0x13c, PIN_INPUT, 0) /* (T34) MCU_ADC0_AIN2 */
+			J784S4_WKUP_IOPAD(0x140, PIN_INPUT, 0) /* (T36) MCU_ADC0_AIN3 */
+			J784S4_WKUP_IOPAD(0x144, PIN_INPUT, 0) /* (P34) MCU_ADC0_AIN4 */
+			J784S4_WKUP_IOPAD(0x148, PIN_INPUT, 0) /* (R37) MCU_ADC0_AIN5 */
+			J784S4_WKUP_IOPAD(0x14c, PIN_INPUT, 0) /* (R33) MCU_ADC0_AIN6 */
+			J784S4_WKUP_IOPAD(0x150, PIN_INPUT, 0) /* (V38) MCU_ADC0_AIN7 */
+		>;
+	};
+
+	mcu_adc1_pins_default: mcu-adc1-pins-default {
+		pinctrl-single,pins = <
+			J784S4_WKUP_IOPAD(0x154, PIN_INPUT, 0) /* (Y38) MCU_ADC1_AIN0 */
+			J784S4_WKUP_IOPAD(0x158, PIN_INPUT, 0) /* (Y34) MCU_ADC1_AIN1 */
+			J784S4_WKUP_IOPAD(0x15c, PIN_INPUT, 0) /* (V34) MCU_ADC1_AIN2 */
+			J784S4_WKUP_IOPAD(0x160, PIN_INPUT, 0) /* (W37) MCU_ADC1_AIN3 */
+			J784S4_WKUP_IOPAD(0x164, PIN_INPUT, 0) /* (AA37) MCU_ADC1_AIN4 */
+			J784S4_WKUP_IOPAD(0x168, PIN_INPUT, 0) /* (W33) MCU_ADC1_AIN5 */
+			J784S4_WKUP_IOPAD(0x16c, PIN_INPUT, 0) /* (U33) MCU_ADC1_AIN6 */
+			J784S4_WKUP_IOPAD(0x170, PIN_INPUT, 0) /* (Y36) MCU_ADC1_AIN7 */
+		>;
+	};
 };
 
 &main_uart8 {
@@ -253,3 +279,21 @@ &mcu_cpsw_port1 {
 	phy-mode = "rgmii-rxid";
 	phy-handle = <&mcu_phy0>;
 };
+
+&tscadc0 {
+	pinctrl-0 = <&mcu_adc0_pins_default>;
+	pinctrl-names = "default";
+	status = "okay";
+	adc {
+			ti,adc-channels = <0 1 2 3 4 5 6 7>;
+	};
+};
+
+&tscadc1 {
+	pinctrl-0 = <&mcu_adc1_pins_default>;
+	pinctrl-names = "default";
+	status = "okay";
+	adc {
+			ti,adc-channels = <0 1 2 3 4 5 6 7>;
+	};
+};
-- 
2.34.1


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

* Re: [PATCH 2/2] arm64: dts: ti: k3-j784s4-evm: Add pinmux information for ADC
  2023-04-12 10:09 ` [PATCH 2/2] arm64: dts: ti: k3-j784s4-evm: Add pinmux information for ADC Bhavya Kapoor
@ 2023-04-28 17:41   ` Raghavendra, Vignesh
  0 siblings, 0 replies; 5+ messages in thread
From: Raghavendra, Vignesh @ 2023-04-28 17:41 UTC (permalink / raw)
  To: Bhavya Kapoor, linux-kernel, devicetree
  Cc: linux-arm-kernel, krzysztof.kozlowski+dt, robh+dt, kristo, nm



On 4/12/2023 3:39 PM, Bhavya Kapoor wrote:
> +
> +&tscadc0 {
> +	pinctrl-0 = <&mcu_adc0_pins_default>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +	adc {
> +			ti,adc-channels = <0 1 2 3 4 5 6 7>;

Excessive indentation

> +	};
> +};
> +
> +&tscadc1 {
> +	pinctrl-0 = <&mcu_adc1_pins_default>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +	adc {
> +			ti,adc-channels = <0 1 2 3 4 5 6 7>;

Same here

> +	};
> +};

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

* Re: [PATCH 1/2] arm64: dts: ti: k3-j784s4-mcu-wakeup: Add support for ADC nodes
  2023-04-12 10:09 ` [PATCH 1/2] arm64: dts: ti: k3-j784s4-mcu-wakeup: " Bhavya Kapoor
@ 2023-04-28 17:49   ` Raghavendra, Vignesh
  0 siblings, 0 replies; 5+ messages in thread
From: Raghavendra, Vignesh @ 2023-04-28 17:49 UTC (permalink / raw)
  To: Bhavya Kapoor, linux-kernel, devicetree
  Cc: linux-arm-kernel, krzysztof.kozlowski+dt, robh+dt, kristo, nm



On 4/12/2023 3:39 PM, Bhavya Kapoor wrote:
> J784S4 has two instances of 8 channel ADCs in MCU domain. Add support
> for both ADC nodes.
> 
> Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
> ---
>  .../boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi     | 40 +++++++++++++++++++
>  1 file changed, 40 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi
> index f04fcb614cbe..cb5ba5e94ec7 100644
> --- a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi
> @@ -342,4 +342,44 @@ cpts@3d000 {
>  			ti,cpts-periodic-outputs = <2>;
>  		};
>  	};
> +
> +	tscadc0: tscadc@40200000 {
> +		compatible = "ti,am3359-tscadc";
> +		reg = <0x00 0x40200000 0x00 0x1000>;
> +		interrupts = <GIC_SPI 860 IRQ_TYPE_LEVEL_HIGH>;
> +		power-domains = <&k3_pds 0 TI_SCI_PD_EXCLUSIVE>;
> +		clocks = <&k3_clks 0 0>;
> +		assigned-clocks = <&k3_clks 0 2>;
> +		assigned-clock-rates = <60000000>;
> +		clock-names = "fck";
> +		dmas = <&main_udmap 0x7400>,
> +				<&main_udmap 0x7401>;

Please fix alignment issue:

		dmas = <&main_udmap 0x7400>,
		       <&main_udmap 0x7401>;

> +		dma-names = "fifo0", "fifo1";
> +		status = "disabled";
> +
> +		adc {
> +				#io-channel-cells = <1>;
> +				compatible = "ti,am3359-adc";

Excessive indentation

> +		};
> +	};
> +
> +	tscadc1: tscadc@40210000 {
> +		compatible = "ti,am3359-tscadc";
> +		reg = <0x00 0x40210000 0x00 0x1000>;
> +		interrupts = <GIC_SPI 861 IRQ_TYPE_LEVEL_HIGH>;
> +		power-domains = <&k3_pds 1 TI_SCI_PD_EXCLUSIVE>;
> +		clocks = <&k3_clks 1 0>;
> +		assigned-clocks = <&k3_clks 1 2>;
> +		assigned-clock-rates = <60000000>;
> +		clock-names = "fck";
> +		dmas = <&main_udmap 0x7402>,
> +				<&main_udmap 0x7403>;

ditto

> +		dma-names = "fifo0", "fifo1";
> +		status = "disabled";
> +
> +		adc {
> +				#io-channel-cells = <1>;
> +				compatible = "ti,am3359-adc";

Same here

> +		};
> +	};
>  };

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

end of thread, other threads:[~2023-04-28 17:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 10:09 [PATCH 0/2] arm64: dts: ti: k3-j784s4: Add support for ADC nodes Bhavya Kapoor
2023-04-12 10:09 ` [PATCH 1/2] arm64: dts: ti: k3-j784s4-mcu-wakeup: " Bhavya Kapoor
2023-04-28 17:49   ` Raghavendra, Vignesh
2023-04-12 10:09 ` [PATCH 2/2] arm64: dts: ti: k3-j784s4-evm: Add pinmux information for ADC Bhavya Kapoor
2023-04-28 17:41   ` Raghavendra, Vignesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®