diff mbox series

[v3,5/5] clk: samsung: add exynos7870 CLKOUT support

Message ID 20250219-exynos7870-pmu-clocks-v3-5-0d1e415e9e3a@disroot.org (mailing list archive)
State New
Headers show
Series Introduce support for Exynos7870 clocks and PMU | expand

Commit Message

Kaustabh Chakraborty Feb. 18, 2025, 6:50 p.m. UTC
Exynos7870's CLKOUT registers are the same as Exynos5's. Add the PMU
compatible to the existing CLKOUT ID list.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 drivers/clk/samsung/clk-exynos-clkout.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Krzysztof Kozlowski Feb. 19, 2025, 8:11 a.m. UTC | #1
On Wed, Feb 19, 2025 at 12:20:32AM +0530, Kaustabh Chakraborty wrote:
> Exynos7870's CLKOUT registers are the same as Exynos5's. Add the PMU
> compatible to the existing CLKOUT ID list.
> 
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> ---
>  drivers/clk/samsung/clk-exynos-clkout.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
> index 2ef5748c139b37ca5429b9071ee0e06f44fcf28e..9a31b1c311b45096f1d680b6724571854c08725c 100644
> --- a/drivers/clk/samsung/clk-exynos-clkout.c
> +++ b/drivers/clk/samsung/clk-exynos-clkout.c
> @@ -75,6 +75,9 @@ static const struct of_device_id exynos_clkout_ids[] = {
>  	}, {
>  		.compatible = "samsung,exynos5433-pmu",
>  		.data = &exynos_clkout_exynos5,
> +	}, {
> +		.compatible = "samsung,exynos7870-pmu",
> +		.data = &exynos_clkout_exynos5,

I wonder why do we need to keep growing this list? All devices are
compatible, aren't they?

Do you use clkout, BTW?

Best regards,
Krzysztof
Kaustabh Chakraborty Feb. 24, 2025, 5:47 p.m. UTC | #2
On 2025-02-19 13:41, Krzysztof Kozlowski wrote:
> On Wed, Feb 19, 2025 at 12:20:32AM +0530, Kaustabh Chakraborty wrote:
>> Exynos7870's CLKOUT registers are the same as Exynos5's. Add the PMU
>> compatible to the existing CLKOUT ID list.
>> 
>> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
>> ---
>>  drivers/clk/samsung/clk-exynos-clkout.c | 3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
>> index 2ef5748c139b37ca5429b9071ee0e06f44fcf28e..9a31b1c311b45096f1d680b6724571854c08725c 100644
>> --- a/drivers/clk/samsung/clk-exynos-clkout.c
>> +++ b/drivers/clk/samsung/clk-exynos-clkout.c
>> @@ -75,6 +75,9 @@ static const struct of_device_id exynos_clkout_ids[] = {
>>  	}, {
>>  		.compatible = "samsung,exynos5433-pmu",
>>  		.data = &exynos_clkout_exynos5,
>> +	}, {
>> +		.compatible = "samsung,exynos7870-pmu",
>> +		.data = &exynos_clkout_exynos5,
> 
> I wonder why do we need to keep growing this list? All devices are
> compatible, aren't they?

Well, there are two variants of compatibility having different mask
values.

> Do you use clkout, BTW?

Using the clocks defined by clkout? No. I added it as downstream
had it too. And the devices work fine without it. If you want me
to remove this patch and send the PMU patch to its respective
series I'll do that then (unless you object or suggest something
else).

> Best regards,
> Krzysztof
Krzysztof Kozlowski Feb. 24, 2025, 7:13 p.m. UTC | #3
On 24/02/2025 18:47, Kaustabh Chakraborty wrote:
>>
>> I wonder why do we need to keep growing this list? All devices are
>> compatible, aren't they?
> 
> Well, there are two variants of compatibility having different mask
> values.
> 
>> Do you use clkout, BTW?
> 
> Using the clocks defined by clkout? No. I added it as downstream
> had it too. And the devices work fine without it. If you want me
> to remove this patch and send the PMU patch to its respective
> series I'll do that then (unless you object or suggest something
> else).

clkout is a testing tool and I doubt you can use it on a phone - finding
the actual clkout pins to connect the oscilloscope is tricky.

If this is about to grow and be used, then we should fix the
compatibility and do not duplicate the ID table.

Best regards,
Krzysztof
Kaustabh Chakraborty Feb. 25, 2025, 6:33 p.m. UTC | #4
On 2025-02-25 00:43, Krzysztof Kozlowski wrote:
>>> Do you use clkout, BTW?
>> 
>> Using the clocks defined by clkout? No. I added it as downstream
>> had it too. And the devices work fine without it. If you want me
>> to remove this patch and send the PMU patch to its respective
>> series I'll do that then (unless you object or suggest something
>> else).
> 
> clkout is a testing tool and I doubt you can use it on a phone - finding
> the actual clkout pins to connect the oscilloscope is tricky.

Ah, then it's of no apparent use. I guess it'd be better to remove it
now. If required, it can be added back later.
David Virag Feb. 28, 2025, 7:07 p.m. UTC | #5
On Mon, 2025-02-24 at 20:13 +0100, Krzysztof Kozlowski wrote:
> On 24/02/2025 18:47, Kaustabh Chakraborty wrote:
> > > 
> > > I wonder why do we need to keep growing this list? All devices
> > > are
> > > compatible, aren't they?
> > 
> > Well, there are two variants of compatibility having different mask
> > values.
> > 
> > > Do you use clkout, BTW?
> > 
> > Using the clocks defined by clkout? No. I added it as downstream
> > had it too. And the devices work fine without it. If you want me
> > to remove this patch and send the PMU patch to its respective
> > series I'll do that then (unless you object or suggest something
> > else).
> 
> clkout is a testing tool and I doubt you can use it on a phone -
> finding
> the actual clkout pins to connect the oscilloscope is tricky.

Actually, jackpotlte uses one of the clkout pins (7885 has two) to feed
it's NFC chip with a clock. 

Not sure if any 7870 (or any other Exynos) devices use it for something
similar but here we have at least one example of a non-debug use for
it. I will avoid it on 7885 though until it's actually needed and I can
test the functionality (and when I have the time to work on 7885
again).

Best Regards,
David
diff mbox series

Patch

diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
index 2ef5748c139b37ca5429b9071ee0e06f44fcf28e..9a31b1c311b45096f1d680b6724571854c08725c 100644
--- a/drivers/clk/samsung/clk-exynos-clkout.c
+++ b/drivers/clk/samsung/clk-exynos-clkout.c
@@ -75,6 +75,9 @@  static const struct of_device_id exynos_clkout_ids[] = {
 	}, {
 		.compatible = "samsung,exynos5433-pmu",
 		.data = &exynos_clkout_exynos5,
+	}, {
+		.compatible = "samsung,exynos7870-pmu",
+		.data = &exynos_clkout_exynos5,
 	}, { }
 };