diff mbox series

[v2,3/3] arm64: dts: fsd: Add ADC device tree node

Message ID 20220520145820.67667-4-m.shams@samsung.com (mailing list archive)
State New
Headers show
Series [v2,1/3] dt-bindings: iio: adc: Add FSD-HW variant | expand

Commit Message

Tamseel Shams May 20, 2022, 2:58 p.m. UTC
From: Alim Akhtar <alim.akhtar@samsung.com>

This patch adds ADC device tree node and enables the same
on fsd platform.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Tamseel Shams <m.shams@samsung.com>
---
- Changes since v1
* Addressed Krzysztof's comment for corrections in dt files

 arch/arm64/boot/dts/tesla/fsd-evb.dts |  4 ++++
 arch/arm64/boot/dts/tesla/fsd.dtsi    | 11 +++++++++++
 2 files changed, 15 insertions(+)

Comments

Krzysztof Kozlowski May 23, 2022, 10:22 a.m. UTC | #1
On 20/05/2022 16:58, Tamseel Shams wrote:
> From: Alim Akhtar <alim.akhtar@samsung.com>
> 
> This patch adds ADC device tree node and enables the same
> on fsd platform.
> 
> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
> Signed-off-by: Tamseel Shams <m.shams@samsung.com>
> ---
> - Changes since v1
> * Addressed Krzysztof's comment for corrections in dt files
> 
>  arch/arm64/boot/dts/tesla/fsd-evb.dts |  4 ++++
>  arch/arm64/boot/dts/tesla/fsd.dtsi    | 11 +++++++++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts
> index 5af560c1b5e6..63f26a85053a 100644
> --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
> +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
> @@ -34,6 +34,10 @@
>  	clock-frequency = <24000000>;
>  };
>  
> +&adc {
> +	status = "okay";

Please test your bindings (`make dtbs_check`). There is no way it passes
since you miss at least supply (maybe more?).




Best regards,
Krzysztof
Tamseel Shams May 31, 2022, 8:32 a.m. UTC | #2
Hi Krzysztof,

On 20/05/2022 16:58, Tamseel Shams wrote:
>> From: Alim Akhtar <alim.akhtar@samsung.com>
>> 
>> This patch adds ADC device tree node and enables the same on fsd 
>> platform.
>> 
>> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>> Signed-off-by: Tamseel Shams <m.shams@samsung.com>
>> ---
>> - Changes since v1
>> * Addressed Krzysztof's comment for corrections in dt files
>> 
>>  arch/arm64/boot/dts/tesla/fsd-evb.dts |  4 ++++
>>  arch/arm64/boot/dts/tesla/fsd.dtsi    | 11 +++++++++++
>>  2 files changed, 15 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts 
>> b/arch/arm64/boot/dts/tesla/fsd-evb.dts
>> index 5af560c1b5e6..63f26a85053a 100644
>> --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
>> +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
>> @@ -34,6 +34,10 @@
>>  	clock-frequency = <24000000>;
>>  };
>>  
>> +&adc {
>> +	status = "okay";
>
> Please test your bindings (`make dtbs_check`). There is no way it passes since you miss at least supply (maybe more?).

Will add the "supply" field in dtsi file. Also will run dtbs check to see for any other missing field.


Thanks & Regards,
Tamseel Shams
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts
index 5af560c1b5e6..63f26a85053a 100644
--- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
+++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
@@ -34,6 +34,10 @@ 
 	clock-frequency = <24000000>;
 };
 
+&adc {
+	status = "okay";
+};
+
 &serial_0 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi
index 9a652abcbcac..f63624f2f414 100644
--- a/arch/arm64/boot/dts/tesla/fsd.dtsi
+++ b/arch/arm64/boot/dts/tesla/fsd.dtsi
@@ -748,6 +748,17 @@ 
 			clocks = <&fin_pll>, <&clock_imem IMEM_MCT_PCLK>;
 			clock-names = "fin_pll", "mct";
 		};
+
+		adc: adc@141a0000 {
+			compatible = "samsung,exynos-adc-fsd-hw";
+			reg = <0x0 0x141a0000 0x0 0x100>;
+			interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clock_peric PERIC_PCLK_ADCIF>;
+			clock-names = "adc";
+			#io-channel-cells = <1>;
+			io-channel-ranges;
+			status = "disabled";
+		};
 	};
 };