* [PATCH 1/2] dt-bindings: clock: add ID for eMMC for EN7581
@ 2024-12-11 11:22 Christian Marangi
2024-12-11 11:22 ` [PATCH 2/2] clk: en7523: Add clock " Christian Marangi
2024-12-13 11:01 ` [PATCH 1/2] dt-bindings: clock: add ID " Krzysztof Kozlowski
0 siblings, 2 replies; 5+ messages in thread
From: Christian Marangi @ 2024-12-11 11:22 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-clk, linux-kernel, devicetree, upstream
Cc: Christian Marangi
Add ID for eMMC for EN7581. This is to control clock selection of eMMC
between 200MHz and 150MHz.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
include/dt-bindings/clock/en7523-clk.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/dt-bindings/clock/en7523-clk.h b/include/dt-bindings/clock/en7523-clk.h
index 717d23a5e5ae..78d16068228a 100644
--- a/include/dt-bindings/clock/en7523-clk.h
+++ b/include/dt-bindings/clock/en7523-clk.h
@@ -11,7 +11,8 @@
#define EN7523_CLK_NPU 5
#define EN7523_CLK_CRYPTO 6
#define EN7523_CLK_PCIE 7
+#define EN7581_CLK_EMMC 8
-#define EN7523_NUM_CLOCKS 8
+#define EN7523_NUM_CLOCKS 9
#endif /* _DT_BINDINGS_CLOCK_AIROHA_EN7523_H_ */
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] clk: en7523: Add clock for eMMC for EN7581
2024-12-11 11:22 [PATCH 1/2] dt-bindings: clock: add ID for eMMC for EN7581 Christian Marangi
@ 2024-12-11 11:22 ` Christian Marangi
2024-12-13 11:01 ` [PATCH 1/2] dt-bindings: clock: add ID " Krzysztof Kozlowski
1 sibling, 0 replies; 5+ messages in thread
From: Christian Marangi @ 2024-12-11 11:22 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-clk, linux-kernel, devicetree, upstream
Cc: Christian Marangi
Add clock for eMMC for EN7581. This is used to give info of the current
eMMC source clock and to switch it from 200MHz or 150MHz.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/clk/clk-en7523.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
index e52c5460e927..a6f870f61a12 100644
--- a/drivers/clk/clk-en7523.c
+++ b/drivers/clk/clk-en7523.c
@@ -89,6 +89,7 @@ static const u32 npu_base[] = { 333000000, 400000000, 500000000 };
static const u32 emi7581_base[] = { 540000000, 480000000, 400000000, 300000000 };
static const u32 npu7581_base[] = { 800000000, 750000000, 720000000, 600000000 };
static const u32 crypto_base[] = { 540000000, 480000000 };
+static const u32 emmc_base[] = { 200000000, 150000000 };
static const struct en_clk_desc en7523_base_clks[] = {
{
@@ -279,6 +280,15 @@ static const struct en_clk_desc en7581_base_clks[] = {
.base_shift = 0,
.base_values = crypto_base,
.n_base_values = ARRAY_SIZE(crypto_base),
+ }, {
+ .id = EN7581_CLK_EMMC,
+ .name = "emmc",
+
+ .base_reg = REG_CRYPTO_CLKSRC2,
+ .base_bits = 1,
+ .base_shift = 12,
+ .base_values = emmc_base,
+ .n_base_values = ARRAY_SIZE(emmc_base),
}
};
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: clock: add ID for eMMC for EN7581
2024-12-11 11:22 [PATCH 1/2] dt-bindings: clock: add ID for eMMC for EN7581 Christian Marangi
2024-12-11 11:22 ` [PATCH 2/2] clk: en7523: Add clock " Christian Marangi
@ 2024-12-13 11:01 ` Krzysztof Kozlowski
2024-12-13 11:16 ` Christian Marangi
1 sibling, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-13 11:01 UTC (permalink / raw)
To: Christian Marangi
Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-clk, linux-kernel, devicetree, upstream
On Wed, Dec 11, 2024 at 12:22:37PM +0100, Christian Marangi wrote:
> Add ID for eMMC for EN7581. This is to control clock selection of eMMC
> between 200MHz and 150MHz.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> include/dt-bindings/clock/en7523-clk.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/dt-bindings/clock/en7523-clk.h b/include/dt-bindings/clock/en7523-clk.h
> index 717d23a5e5ae..78d16068228a 100644
> --- a/include/dt-bindings/clock/en7523-clk.h
> +++ b/include/dt-bindings/clock/en7523-clk.h
> @@ -11,7 +11,8 @@
> #define EN7523_CLK_NPU 5
> #define EN7523_CLK_CRYPTO 6
> #define EN7523_CLK_PCIE 7
> +#define EN7581_CLK_EMMC 8
>
> -#define EN7523_NUM_CLOCKS 8
> +#define EN7523_NUM_CLOCKS 9
This cannot change.
If this changes, then it is not a binding and first drop it in separate
patch.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: clock: add ID for eMMC for EN7581
2024-12-13 11:01 ` [PATCH 1/2] dt-bindings: clock: add ID " Krzysztof Kozlowski
@ 2024-12-13 11:16 ` Christian Marangi
2024-12-16 7:29 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Christian Marangi @ 2024-12-13 11:16 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-clk, linux-kernel, devicetree, upstream
On Fri, Dec 13, 2024 at 12:01:40PM +0100, Krzysztof Kozlowski wrote:
> On Wed, Dec 11, 2024 at 12:22:37PM +0100, Christian Marangi wrote:
> > Add ID for eMMC for EN7581. This is to control clock selection of eMMC
> > between 200MHz and 150MHz.
> >
> > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> > ---
> > include/dt-bindings/clock/en7523-clk.h | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/dt-bindings/clock/en7523-clk.h b/include/dt-bindings/clock/en7523-clk.h
> > index 717d23a5e5ae..78d16068228a 100644
> > --- a/include/dt-bindings/clock/en7523-clk.h
> > +++ b/include/dt-bindings/clock/en7523-clk.h
> > @@ -11,7 +11,8 @@
> > #define EN7523_CLK_NPU 5
> > #define EN7523_CLK_CRYPTO 6
> > #define EN7523_CLK_PCIE 7
> > +#define EN7581_CLK_EMMC 8
> >
> > -#define EN7523_NUM_CLOCKS 8
> > +#define EN7523_NUM_CLOCKS 9
>
> This cannot change.
>
> If this changes, then it is not a binding and first drop it in separate
> patch.
>
> Best regards,
> Krzysztof
>
Hi Krzysztof,
maybe I can introduce EN7581_NUM_CLOCKS with the correct number? Just to
give more info about this... It's not clear to me why NUM_CLOCKS is
needed considering is only needed in clk-en7523.c to probe the driver
and allock memory...
Anyway is a different define OK for you?
--
Ansuel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: clock: add ID for eMMC for EN7581
2024-12-13 11:16 ` Christian Marangi
@ 2024-12-16 7:29 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-16 7:29 UTC (permalink / raw)
To: Christian Marangi
Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-clk, linux-kernel, devicetree, upstream
On 13/12/2024 12:16, Christian Marangi wrote:
> On Fri, Dec 13, 2024 at 12:01:40PM +0100, Krzysztof Kozlowski wrote:
>> On Wed, Dec 11, 2024 at 12:22:37PM +0100, Christian Marangi wrote:
>>> Add ID for eMMC for EN7581. This is to control clock selection of eMMC
>>> between 200MHz and 150MHz.
>>>
>>> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
>>> ---
>>> include/dt-bindings/clock/en7523-clk.h | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/dt-bindings/clock/en7523-clk.h b/include/dt-bindings/clock/en7523-clk.h
>>> index 717d23a5e5ae..78d16068228a 100644
>>> --- a/include/dt-bindings/clock/en7523-clk.h
>>> +++ b/include/dt-bindings/clock/en7523-clk.h
>>> @@ -11,7 +11,8 @@
>>> #define EN7523_CLK_NPU 5
>>> #define EN7523_CLK_CRYPTO 6
>>> #define EN7523_CLK_PCIE 7
>>> +#define EN7581_CLK_EMMC 8
>>>
>>> -#define EN7523_NUM_CLOCKS 8
>>> +#define EN7523_NUM_CLOCKS 9
>>
>> This cannot change.
>>
>> If this changes, then it is not a binding and first drop it in separate
>> patch.
>>
>> Best regards,
>> Krzysztof
>>
>
> Hi Krzysztof,
>
> maybe I can introduce EN7581_NUM_CLOCKS with the correct number? Just to
> give more info about this... It's not clear to me why NUM_CLOCKS is
> needed considering is only needed in clk-en7523.c to probe the driver
> and allock memory...
>
> Anyway is a different define OK for you?
I don't understand. You just added that enum with corrected number...
Anyway, review does not change. Number of clocks is not a binding. Drop
or don't touch.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-16 7:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 11:22 [PATCH 1/2] dt-bindings: clock: add ID for eMMC for EN7581 Christian Marangi
2024-12-11 11:22 ` [PATCH 2/2] clk: en7523: Add clock " Christian Marangi
2024-12-13 11:01 ` [PATCH 1/2] dt-bindings: clock: add ID " Krzysztof Kozlowski
2024-12-13 11:16 ` Christian Marangi
2024-12-16 7:29 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox