clk/ARM: exynos: Add ADC to Exynos5410 (Odroid XU)
Krzysztof Kozlowski
maintainercover 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
Krzysztof Kozlowski
maintainerPATCH 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
@@ -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
Krzysztof Kozlowski
maintainerPATCH 2/4 dt-bindings: clock: exynos: Add ADC clock ID to Exynos5410
In reply to Krzysztof KozlowskiAdd 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
@@ -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
Krzysztof Kozlowski
maintainerPATCH 3/4 clk: samsung: exynos5410: Add gate clock for ADC
In reply to Krzysztof KozlowskiAdd 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
@@ -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
Krzysztof Kozlowski
maintainerPATCH 4/4 ARM: dts: exynos: Add ADC node to Exynos5410 and Odroid XU
In reply to Krzysztof KozlowskiMove 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
@@ -87,6 +87,11 @@ }; }; +&adc { + vdd-supply = <&ldo10_reg>; + status = "okay"; +}; + &audi2s0 { status = "okay"; };
arch/arm/boot/dts/exynos5410.dtsi +6 -0
@@ -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
@@ -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
@@ -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
Re: [PATCH 1/4] dt-bindings: clock: exynos: Put CLK_UART3 in order
In reply to Krzysztof KozlowskiHi,
Quoted 21 lines · Krzysztof Kozlowski
Order the
CLK_UART3by ID. No change in functionality.Signed-off-by Krzysztof Kozlowski <[email protected]>--- include/dt-bindings/clock/exynos5410.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/dt-bindings/clock/exynos5410.h +1
-0@@ -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
Re: [PATCH 2/4] dt-bindings: clock: exynos: Add ADC clock ID to Exynos5410
In reply to Krzysztof KozlowskiHi,
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).
Signed-off-by Krzysztof Kozlowski <[email protected]>--- include/dt-bindings/clock/exynos5410.h | 1 + 1 file changed, 1 insertion(+)include/dt-bindings/clock/exynos5410.h +0
-0
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
Re: [PATCH 3/4] clk: samsung: exynos5410: Add gate clock for ADC
In reply to Krzysztof KozlowskiHi,
Quoted 13 lines · Krzysztof Kozlowski
Add the gate clock for ADC block on Exynos5410.
Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/clk/samsung/clk-exynos5410.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/samsung/clk-exynos5410.c +0
-0
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
Re: [PATCH 1/4] dt-bindings: clock: exynos: Put CLK_UART3 in order
In reply to Krzysztof KozlowskiQuoted 7 lines · Krzysztof Kozlowski
Order the
CLK_UART3by ID. No change in functionality.Signed-off-by Krzysztof Kozlowski <[email protected]>--- include/dt-bindings/clock/exynos5410.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Re: [PATCH 2/4] dt-bindings: clock: exynos: Add ADC clock ID to Exynos5410
In reply to Krzysztof KozlowskiQuoted 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).
Signed-off-by Krzysztof Kozlowski <[email protected]>--- include/dt-bindings/clock/exynos5410.h | 1 + 1 file changed, 1 insertion(+)
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: PutCLK_UART3in 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