Skip to contentSkip to conversation

clk/ARM: exynos: Add ADC to Exynos5410 (Odroid XU)

PATCH Applied Krzysztof Kozlowski 4 participants 11 messages Feb 12, 2019 – Mar 26, 2019

Subsystems (4)
lore
Share & tools
lore

Krzysztof Kozlowski

author maintainer
#0 lore raw

cover clk/ARM: exynos: Add ADC to Exynos5410 (Odroid XU)

Hi,

The DTS patch depends on bindings header with clock ID. I will take it through samsung-soc for consecutive release.

Best regards,
Krzysztof

Krzysztof Kozlowski (4):
dt-bindings: clock: exynos: Put CLK_UART3 in order
dt-bindings: clock: exynos: Add ADC clock ID to Exynos5410
clk: samsung: exynos5410: Add gate clock for ADC
ARM: dts: exynos: Add ADC node to Exynos5410 and Odroid XU

 arch/arm/boot/dts/exynos5410-odroidxu.dts |  5 +++++
 arch/arm/boot/dts/exynos5410.dtsi         |  6 ++++++
 arch/arm/boot/dts/exynos5420.dtsi         | 18 ++++++------------
 arch/arm/boot/dts/exynos54xx.dtsi         |  9 +++++++++
 drivers/clk/samsung/clk-exynos5410.c      |  1 +
 include/dt-bindings/clock/exynos5410.h    |  3 ++-
 6 files changed, 29 insertions(+), 13 deletions(-)
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH 1/4 dt-bindings: clock: exynos: Put CLK_UART3 in order

Order the CLK_UART3 by ID. No change in functionality.

---
 include/dt-bindings/clock/exynos5410.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/dt-bindings/clock/exynos5410.h +1 -1
index f179eabbcdb7..5b911ede0534 100644
@@ -36,6 +36,7 @@
 #define CLK_UART0		257
 #define CLK_UART1		258
 #define CLK_UART2		259
+#define CLK_UART3		260
 #define CLK_I2C0		261
 #define CLK_I2C1		262
 #define CLK_I2C2		263
@@ -44,7 +45,6 @@
 #define CLK_USI1		266
 #define CLK_USI2		267
 #define CLK_USI3		268
-#define CLK_UART3		260
 #define CLK_PWM			279
 #define CLK_MCT			315
 #define CLK_WDT			316
Signature · 1 line
2.17.1
author maintainer
#4 lore raw

PATCH 2/4 dt-bindings: clock: exynos: Add ADC clock ID to Exynos5410

In reply to Krzysztof Kozlowski

Add ID for TSADC clock to Exynos5410. Choose the same value of ID as in Exynos5420 to make it simpler/compatible in future (although clock driver code is not shared).

---
 include/dt-bindings/clock/exynos5410.h | 1 +
 1 file changed, 1 insertion(+)
include/dt-bindings/clock/exynos5410.h +1 -0
index 5b911ede0534..86c2ad56c5ef 100644
@@ -45,6 +45,7 @@
 #define CLK_USI1		266
 #define CLK_USI2		267
 #define CLK_USI3		268
+#define CLK_TSADC		270
 #define CLK_PWM			279
 #define CLK_MCT			315
 #define CLK_WDT			316
Signature · 1 line
2.17.1
author maintainer
#7 lore raw

PATCH 3/4 clk: samsung: exynos5410: Add gate clock for ADC

In reply to Krzysztof Kozlowski

Add the gate clock for ADC block on Exynos5410.

---
 drivers/clk/samsung/clk-exynos5410.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/samsung/clk-exynos5410.c +1 -0
index 0a0b09591e6f..b2da2c8fa0c7 100644
@@ -209,6 +209,7 @@ static const struct samsung_gate_clock exynos5410_gate_clks[] __initconst = {
 	GATE(CLK_USI1, "usi1", "aclk66", GATE_IP_PERIC, 11, 0, 0),
 	GATE(CLK_USI2, "usi2", "aclk66", GATE_IP_PERIC, 12, 0, 0),
 	GATE(CLK_USI3, "usi3", "aclk66", GATE_IP_PERIC, 13, 0, 0),
+	GATE(CLK_TSADC, "tsadc", "aclk66", GATE_IP_PERIC, 15, 0, 0),
 	GATE(CLK_PWM, "pwm", "aclk66", GATE_IP_PERIC, 24, 0, 0),
 
 	GATE(CLK_SCLK_UART0, "sclk_uart0", "div_uart0",
Signature · 1 line
2.17.1
author maintainer
#9 lore raw

PATCH 4/4 ARM: dts: exynos: Add ADC node to Exynos5410 and Odroid XU

In reply to Krzysztof Kozlowski

Move the ADC from exynos5420.dtsi to a shared file between Exynos5410 and
Exynos542x: exynos54xx.dtsi. Enable the ADC on Odroid XU board.

---
 arch/arm/boot/dts/exynos5410-odroidxu.dts |  5 +++++
 arch/arm/boot/dts/exynos5410.dtsi         |  6 ++++++
 arch/arm/boot/dts/exynos5420.dtsi         | 18 ++++++------------
 arch/arm/boot/dts/exynos54xx.dtsi         |  9 +++++++++
 4 files changed, 26 insertions(+), 12 deletions(-)
arch/arm/boot/dts/exynos5410-odroidxu.dts +5 -0
index 434a7591ff63..282600a1e08d 100644
@@ -87,6 +87,11 @@
 	};
 };
 
+&adc {
+	vdd-supply = <&ldo10_reg>;
+	status = "okay";
+};
+
 &audi2s0 {
 	status = "okay";
 };
arch/arm/boot/dts/exynos5410.dtsi +6 -0
index 57fc9c949e54..e6f78b1cee7c 100644
@@ -260,6 +260,12 @@
 	};
 };
 
+&adc {
+	clocks = <&clock CLK_TSADC>;
+	clock-names = "adc";
+	samsung,syscon-phandle = <&pmu_system_controller>;
+};
+
 &arm_a15_pmu {
 	interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
 	status = "okay";
arch/arm/boot/dts/exynos5420.dtsi +6 -12
index aaff15880761..149badfca74d 100644
@@ -548,18 +548,6 @@
 			status = "disabled";
 		};
 
-		adc: adc@12d10000 {
-			compatible = "samsung,exynos-adc-v2";
-			reg = <0x12D10000 0x100>;
-			interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&clock CLK_TSADC>;
-			clock-names = "adc";
-			#io-channel-cells = <1>;
-			io-channel-ranges;
-			samsung,syscon-phandle = <&pmu_system_controller>;
-			status = "disabled";
-		};
-
 		hsi2c_8: i2c@12e00000 {
 			compatible = "samsung,exynos5250-hsi2c";
 			reg = <0x12E00000 0x1000>;
@@ -1363,6 +1351,12 @@
 	};
 };
 
+&adc {
+	clocks = <&clock CLK_TSADC>;
+	clock-names = "adc";
+	samsung,syscon-phandle = <&pmu_system_controller>;
+};
+
 &dp {
 	clocks = <&clock CLK_DP1>;
 	clock-names = "dp";
arch/arm/boot/dts/exynos54xx.dtsi +9 -0
index de26e5ee0d2d..e21ed6eb6c4c 100644
@@ -96,6 +96,15 @@
 			interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		adc: adc@12d10000 {
+			compatible = "samsung,exynos-adc-v2";
+			reg = <0x12d10000 0x100>;
+			interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+			#io-channel-cells = <1>;
+			io-channel-ranges;
+			status = "disabled";
+		};
+
 		/* i2c_0-3 are defined in exynos5.dtsi */
 		hsi2c_4: i2c@12ca0000 {
 			compatible = "samsung,exynos5250-hsi2c";
Signature · 1 line
2.17.1
maintainer Acked-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] dt-bindings: clock: exynos: Put CLK_UART3 in order

In reply to Krzysztof Kozlowski

Hi,

Quoted 21 lines · Krzysztof Kozlowski

Order the CLK_UART3 by ID. No change in functionality.

---
 include/dt-bindings/clock/exynos5410.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/dt-bindings/clock/exynos5410.h +1 -0
index f179eabbcdb7..5b911ede0534 100644
@@ -36,6 +36,7 @@
 #define CLK_UART0		257
 #define CLK_UART1		258
 #define CLK_UART2		259
+#define CLK_UART3		260
 #define CLK_I2C0		261
 #define CLK_I2C1		262
 #define CLK_I2C2		263

include/dt-bindings/clock/exynos5410.h line 50

Quoted 7 lines
include/dt-bindings/clock/exynos5410.h +0 -1
@@ -44,7 +45,6 @@
 #define CLK_USI1		266
 #define CLK_USI2		267
 #define CLK_USI3		268
-#define CLK_UART3		260
 #define CLK_PWM			279
 #define CLK_MCT			315
 #define CLK_WDT			316
Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics
maintainer Acked-by on v1 2/4
#5 lore raw

Re: [PATCH 2/4] dt-bindings: clock: exynos: Add ADC clock ID to Exynos5410

In reply to Krzysztof Kozlowski

Hi,

Quoted 15 lines · Krzysztof Kozlowski

Add ID for TSADC clock to Exynos5410. Choose the same value of ID as in Exynos5420 to make it simpler/compatible in future (although clock driver code is not shared).

---
 include/dt-bindings/clock/exynos5410.h | 1 +
 1 file changed, 1 insertion(+)
include/dt-bindings/clock/exynos5410.h +0 -0
index 5b911ede0534..86c2ad56c5ef 100644

include/dt-bindings/clock/exynos5410.h line 51

Quoted 7 lines
include/dt-bindings/clock/exynos5410.h +1 -0
@@ -45,6 +45,7 @@
 #define CLK_USI1		266
 #define CLK_USI2		267
 #define CLK_USI3		268
+#define CLK_TSADC		270
 #define CLK_PWM			279
 #define CLK_MCT			315
 #define CLK_WDT			316
Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics
maintainer Acked-by on v1 3/4
#8 lore raw

Re: [PATCH 3/4] clk: samsung: exynos5410: Add gate clock for ADC

In reply to Krzysztof Kozlowski

Hi,

Quoted 13 lines · Krzysztof Kozlowski

Add the gate clock for ADC block on Exynos5410.

---
 drivers/clk/samsung/clk-exynos5410.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/samsung/clk-exynos5410.c +0 -0
index 0a0b09591e6f..b2da2c8fa0c7 100644

drivers/clk/samsung/clk-exynos5410.c static const struct samsung_gate_clock exynos5410_gate_clks[] __initconst = { · line 215

Quoted 7 lines
drivers/clk/samsung/clk-exynos5410.c +1 -0
@@ -209,6 +209,7 @@ static const struct samsung_gate_clock exynos5410_gate_clks[] __initconst = {
 	GATE(CLK_USI1, "usi1", "aclk66", GATE_IP_PERIC, 11, 0, 0),
 	GATE(CLK_USI2, "usi2", "aclk66", GATE_IP_PERIC, 12, 0, 0),
 	GATE(CLK_USI3, "usi3", "aclk66", GATE_IP_PERIC, 13, 0, 0),
+	GATE(CLK_TSADC, "tsadc", "aclk66", GATE_IP_PERIC, 15, 0, 0),
 	GATE(CLK_PWM, "pwm", "aclk66", GATE_IP_PERIC, 24, 0, 0),
 
 	GATE(CLK_SCLK_UART0, "sclk_uart0", "div_uart0",

I checked it on Exynos5410 TRM. Looks good to me.

Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics
maintainer Reviewed-by on v1 2/4
#6 lore raw

Re: [PATCH 2/4] dt-bindings: clock: exynos: Add ADC clock ID to Exynos5410

In reply to Krzysztof Kozlowski
Quoted 9 lines · Krzysztof Kozlowski

Add ID for TSADC clock to Exynos5410. Choose the same value of ID as in Exynos5420 to make it simpler/compatible in future (although clock driver code is not shared).

---
 include/dt-bindings/clock/exynos5410.h | 1 +
 1 file changed, 1 insertion(+)
maintainer Applied
#10 lore raw
In reply to Krzysztof Kozlowski
Quoted 8 lines · Krzysztof Kozlowski

The DTS patch depends on bindings header with clock ID. I will take it through samsung-soc for consecutive release.

Krzysztof Kozlowski (4):
dt-bindings: clock: exynos: Put CLK_UART3 in order
dt-bindings: clock: exynos: Add ADC clock ID to Exynos5410
clk: samsung: exynos5410: Add gate clock for ADC
ARM: dts: exynos: Add ADC node to Exynos5410 and Odroid XU

I have applied first 3 patches to clk/samsung tree, thanks! With prefix in summary line of the first 2 commits changed to "clk: samsung: dt-bindings:".

Signature · 2 lines
Regards
Sylwester