2020-09-01 22:32:24

by Nishanth Menon

[permalink] [raw]
Subject: [PATCH 6/7] arm64: dts: ti: k3-*: Use generic adc for node names

Use adc@ naming for nodes following standard conventions of device
tree (section 2.2.2 Generic Names recommendation in [1]).

[1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3

Suggested-by: Suman Anna <[email protected]>
Signed-off-by: Nishanth Menon <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 4 ++--
arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
index 51ca4b4d4c21..6dfec68ac865 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
@@ -80,7 +80,7 @@
#size-cells = <0>;
};

- tscadc0: tscadc@40200000 {
+ tscadc0: adc@40200000 {
compatible = "ti,am654-tscadc", "ti,am3359-tscadc";
reg = <0x0 0x40200000 0x0 0x1000>;
interrupts = <GIC_SPI 580 IRQ_TYPE_LEVEL_HIGH>;
@@ -98,7 +98,7 @@
};
};

- tscadc1: tscadc@40210000 {
+ tscadc1: adc@40210000 {
compatible = "ti,am654-tscadc", "ti,am3359-tscadc";
reg = <0x0 0x40210000 0x0 0x1000>;
interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
index 9ad0266598ad..81801f519a61 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
@@ -211,7 +211,7 @@
};
};

- tscadc0: tscadc@40200000 {
+ tscadc0: adc@40200000 {
compatible = "ti,am3359-tscadc";
reg = <0x0 0x40200000 0x0 0x1000>;
interrupts = <GIC_SPI 860 IRQ_TYPE_LEVEL_HIGH>;
@@ -230,7 +230,7 @@
};
};

- tscadc1: tscadc@40210000 {
+ tscadc1: adc@40210000 {
compatible = "ti,am3359-tscadc";
reg = <0x0 0x40210000 0x0 0x1000>;
interrupts = <GIC_SPI 861 IRQ_TYPE_LEVEL_HIGH>;
--
2.17.1


2020-09-02 16:54:27

by Suman Anna

[permalink] [raw]
Subject: Re: [PATCH 6/7] arm64: dts: ti: k3-*: Use generic adc for node names

On 9/1/20 5:30 PM, Nishanth Menon wrote:
> Use adc@ naming for nodes following standard conventions of device
> tree (section 2.2.2 Generic Names recommendation in [1]).
>
> [1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3
>
> Suggested-by: Suman Anna <[email protected]>
> Signed-off-by: Nishanth Menon <[email protected]>
> ---
> arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 4 ++--
> arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
> index 51ca4b4d4c21..6dfec68ac865 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
> @@ -80,7 +80,7 @@
> #size-cells = <0>;
> };
>
> - tscadc0: tscadc@40200000 {
> + tscadc0: adc@40200000 {

OK with these changes, since these seem to be only have the adc child nodes.
This node is essentially a parent node for touchscreen and adc child nodes. The
driver is currently looking for "tsc" on touchscreen child nodes, but none of
the K3 SoCs have them atm.

regards
Suman

> compatible = "ti,am654-tscadc", "ti,am3359-tscadc";
> reg = <0x0 0x40200000 0x0 0x1000>;
> interrupts = <GIC_SPI 580 IRQ_TYPE_LEVEL_HIGH>;
> @@ -98,7 +98,7 @@
> };
> };
>
> - tscadc1: tscadc@40210000 {
> + tscadc1: adc@40210000 {
> compatible = "ti,am654-tscadc", "ti,am3359-tscadc";
> reg = <0x0 0x40210000 0x0 0x1000>;
> interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>;
> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
> index 9ad0266598ad..81801f519a61 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
> @@ -211,7 +211,7 @@
> };
> };
>
> - tscadc0: tscadc@40200000 {
> + tscadc0: adc@40200000 {
> compatible = "ti,am3359-tscadc";
> reg = <0x0 0x40200000 0x0 0x1000>;
> interrupts = <GIC_SPI 860 IRQ_TYPE_LEVEL_HIGH>;
> @@ -230,7 +230,7 @@
> };
> };
>
> - tscadc1: tscadc@40210000 {
> + tscadc1: adc@40210000 {
> compatible = "ti,am3359-tscadc";
> reg = <0x0 0x40210000 0x0 0x1000>;
> interrupts = <GIC_SPI 861 IRQ_TYPE_LEVEL_HIGH>;
>

2020-09-02 18:22:19

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH 6/7] arm64: dts: ti: k3-*: Use generic adc for node names

On 11:51-20200902, Suman Anna wrote:
> On 9/1/20 5:30 PM, Nishanth Menon wrote:
> > Use adc@ naming for nodes following standard conventions of device
> > tree (section 2.2.2 Generic Names recommendation in [1]).
> >
> > [1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3
> >
> > Suggested-by: Suman Anna <[email protected]>
> > Signed-off-by: Nishanth Menon <[email protected]>
> > ---
> > arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 4 ++--
> > arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 4 ++--
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
> > index 51ca4b4d4c21..6dfec68ac865 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
> > +++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
> > @@ -80,7 +80,7 @@
> > #size-cells = <0>;
> > };
> >
> > - tscadc0: tscadc@40200000 {
> > + tscadc0: adc@40200000 {
>
> OK with these changes, since these seem to be only have the adc child nodes.
> This node is essentially a parent node for touchscreen and adc child nodes. The
> driver is currently looking for "tsc" on touchscreen child nodes, but none of
> the K3 SoCs have them atm.
>


Vignesh: are you ok with this, care to comment?

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

2020-09-03 05:26:30

by Vignesh Raghavendra

[permalink] [raw]
Subject: Re: [PATCH 6/7] arm64: dts: ti: k3-*: Use generic adc for node names

Hi Nishanth,

On 9/2/20 11:48 PM, Nishanth Menon wrote:
> On 11:51-20200902, Suman Anna wrote:
>> On 9/1/20 5:30 PM, Nishanth Menon wrote:
>>> Use adc@ naming for nodes following standard conventions of device
>>> tree (section 2.2.2 Generic Names recommendation in [1]).
>>>
>>> [1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3
>>>
>>> Suggested-by: Suman Anna <[email protected]>
>>> Signed-off-by: Nishanth Menon <[email protected]>
>>> ---
>>> arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 4 ++--
>>> arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 4 ++--
>>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
>>> index 51ca4b4d4c21..6dfec68ac865 100644
>>> --- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
>>> +++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
>>> @@ -80,7 +80,7 @@
>>> #size-cells = <0>;
>>> };
>>>
>>> - tscadc0: tscadc@40200000 {
>>> + tscadc0: adc@40200000 {
>>
>> OK with these changes, since these seem to be only have the adc child nodes.
>> This node is essentially a parent node for touchscreen and adc child nodes. The
>> driver is currently looking for "tsc" on touchscreen child nodes, but none of
>> the K3 SoCs have them atm.
>>
>
>
> Vignesh: are you ok with this, care to comment?
>

On K3 SoCs, ADC IP is reuse from AM335x but just lacks resistive
touchscreen interfaces. So, existing AM335x ADC driver is being reused
for K3 devices as well. Unfortunately, ADC driver cannot be used as
standalone and is dependent on MFD parent to be present...
Above node represents the MFD parent and ADC itself is the child node
(see arch/arm64/boot/dts/ti/k3-am654-base-board.dts). So, I recommend
that we keep this node's name as tscadc in order to avoid having same
name for parent and child node which will be quite confusing.

Regards
Vignesh

2020-09-03 15:23:35

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH 6/7] arm64: dts: ti: k3-*: Use generic adc for node names

On 10:55-20200903, Vignesh Raghavendra wrote:
> Hi Nishanth,
>
> On 9/2/20 11:48 PM, Nishanth Menon wrote:
> > On 11:51-20200902, Suman Anna wrote:
> >> On 9/1/20 5:30 PM, Nishanth Menon wrote:
> >>> Use adc@ naming for nodes following standard conventions of device
> >>> tree (section 2.2.2 Generic Names recommendation in [1]).
> >>>
> >>> [1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3
> >>>
> >>> Suggested-by: Suman Anna <[email protected]>
> >>> Signed-off-by: Nishanth Menon <[email protected]>
> >>> ---
> >>> arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 4 ++--
> >>> arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 4 ++--
> >>> 2 files changed, 4 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
> >>> index 51ca4b4d4c21..6dfec68ac865 100644
> >>> --- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
> >>> +++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
> >>> @@ -80,7 +80,7 @@
> >>> #size-cells = <0>;
> >>> };
> >>>
> >>> - tscadc0: tscadc@40200000 {
> >>> + tscadc0: adc@40200000 {
> >>
> >> OK with these changes, since these seem to be only have the adc child nodes.
> >> This node is essentially a parent node for touchscreen and adc child nodes. The
> >> driver is currently looking for "tsc" on touchscreen child nodes, but none of
> >> the K3 SoCs have them atm.
> >>
> >
> >
> > Vignesh: are you ok with this, care to comment?
> >
>
> On K3 SoCs, ADC IP is reuse from AM335x but just lacks resistive
> touchscreen interfaces. So, existing AM335x ADC driver is being reused
> for K3 devices as well. Unfortunately, ADC driver cannot be used as
> standalone and is dependent on MFD parent to be present...
> Above node represents the MFD parent and ADC itself is the child node
> (see arch/arm64/boot/dts/ti/k3-am654-base-board.dts). So, I recommend
> that we keep this node's name as tscadc in order to avoid having same
> name for parent and child node which will be quite confusing.


Thanks for your feedback. I will drop this patch.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D