dt-bindings: clock: add ID for eMMC for EN7581
Subsystems (2)
PATCH 1/2 dt-bindings: clock: add ID for eMMC for EN7581
Add ID for eMMC for EN7581. This is to control clock selection of eMMC between 200MHz and 150MHz.
--- include/dt-bindings/clock/en7523-clk.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/dt-bindings/clock/en7523-clk.h +2 -1
@@ -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_ */
Signature · 1 line
2.45.2
PATCH 2/2 clk: en7523: Add clock for eMMC for EN7581
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.
--- drivers/clk/clk-en7523.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/clk/clk-en7523.c +10 -0
@@ -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), } };
Signature · 1 line
2.45.2
Quoted 13 lines · 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 <[email protected]>--- include/dt-bindings/clock/en7523-clk.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/dt-bindings/clock/en7523-clk.h +0
-0
include/dt-bindings/clock/en7523-clk.h line 16
Quoted 7 lines
include/dt-bindings/clock/en7523-clk.h +2
-1@@ -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
Quoted 24 lines · Krzysztof Kozlowski
Quoted 13 lines · 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 <[email protected]>--- include/dt-bindings/clock/en7523-clk.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/dt-bindings/clock/en7523-clk.h +0
-0include/dt-bindings/clock/en7523-clk.h line 16
Quoted 7 lines
include/dt-bindings/clock/en7523-clk.h +2
-1@@ -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 9This cannot change.
Quoted 6 lines
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?
Signature · 1 line
Ansuel
Quoted 32 lines · Christian Marangi
Quoted 24 lines · Krzysztof Kozlowski
Quoted 13 lines · 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 <[email protected]>--- include/dt-bindings/clock/en7523-clk.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/dt-bindings/clock/en7523-clk.h +0
-0include/dt-bindings/clock/en7523-clk.h line 16
Quoted 7 lines
include/dt-bindings/clock/en7523-clk.h +2
-1@@ -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 9This cannot change.
Quoted 6 lines
If this changes, then it is not a binding and first drop it in separate patch.
Best regards,
Krzysztof
Quoted 8 lines
Hi Krzysztof,
maybe I can introduce
EN7581_NUM_CLOCKSwith the correct number? Just to give more info about this... It's not clear to me whyNUM_CLOCKSis needed considering is only needed inclk-en7523.cto 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