Add S4 SoC clock controller driver
Subsystems (4)
v2 cover Add S4 SoC clock controller driver
1. Add clock controller driver for S4 SOC.
Yu Tu (3):
dt-bindings: clk: meson: add S4 SoC clock controller bindings
arm64: dts: meson: add S4 Soc clock controller in DT
clk: meson: s4: add s4 SoC clock controller driver
V1 -> V2: Change format as discussed in the email.
.../bindings/clock/amlogic,gxbb-clkc.txt | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 11 + drivers/clk/meson/Kconfig | 15 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4.c | 4732 +++++++++++++++++ drivers/clk/meson/s4.h | 296 ++ include/dt-bindings/clock/s4-clkc.h | 146 + 8 files changed, 5203 insertions(+) create mode 100644 drivers/clk/meson/s4.c create mode 100644 drivers/clk/meson/s4.h create mode 100644 include/dt-bindings/clock/s4-clkc.h
base-commit: b293bc9286ee21824e93f0fcfed3b78fdfee01e6
Signature · 1 line
2.33.1
PATCH v2 1/3 dt-bindings: clk: meson: add S4 SoC clock controller bindings
Add new clock controller compatible and dt-bindings header for the Everything-Else domain of the S4 SoC.
--- .../bindings/clock/amlogic,gxbb-clkc.txt | 1 + MAINTAINERS | 1 + include/dt-bindings/clock/s4-clkc.h | 146 ++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 include/dt-bindings/clock/s4-clkc.h
Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt +1 -0
@@ -12,6 +12,7 @@ Required Properties: "amlogic,g12a-clkc" for G12A SoC. "amlogic,g12b-clkc" for G12B SoC. "amlogic,sm1-clkc" for SM1 SoC. + "amlogic,s4-clkc" for S4 SoC. - clocks : list of clock phandle, one for each entry clock-names. - clock-names : should contain the following: * "xtal": the platform xtal
MAINTAINERS +1 -0
@@ -1775,6 +1775,7 @@ F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* +F: include/dt-bindings/clock/s4-clkc.h ARM/Amlogic Meson SoC Crypto Drivers M: Corentin Labbe <[email protected]>
include/dt-bindings/clock/s4-clkc.h new file +146 -0
146 lines not on this page · raw message
Signature · 1 line
2.33.1
Re: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
include/dt-bindings/clock/s4-clkc.h
Quoted 24 lines · Yu Tu
Add new clock controller compatible and dt-bindings header for the Everything-Else domain of the S4 SoC.
Signed-off-by Yu Tu <[email protected]>MAINTAINERS +1
-0@@ -1775,6 +1775,7 @@ F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* +F: include/dt-bindings/clock/s4-clkc.h ARM/Amlogic Meson SoC Crypto Drivers M: Corentin Labbe <[email protected]>include/dt-bindings/clock/s4-clkc.h new file +0
-0
Filename with vendor prefix, so:
amlogic,s4-clkc.h
Quoted 10 lines
include/dt-bindings/clock/s4-clkc.h new file +9
-0@@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* +* Copyright (c) 2021 Amlogic, Inc. All rights reserved. +* Author: Yu Tu <[email protected]> +*/ + +#ifndef _DT_BINDINGS_CLOCK_S4_CLKC_H +#define _DT_BINDINGS_CLOCK_S4_CLKC_H +
include/dt-bindings/clock/s4-clkc.h line 19
Quoted 10 lines
include/dt-bindings/clock/s4-clkc.h new file +10
-0+/* +* CLKID index values +*/ + +#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11
Why these aren't continuous? IDs are expected to be incremented by 1.
include/dt-bindings/clock/s4-clkc.h line 146
Quoted 2 lines
include/dt-bindings/clock/s4-clkc.h new file +2
-0+ +#endif /* _DT_BINDINGS_CLOCK_S4_CLKC_H */
Best regards,
Krzysztof
Jerome Brunet
maintainerRe: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 43 lines · Krzysztof Kozlowski
include/dt-bindings/clock/s4-clkc.h
Quoted 24 lines · Yu Tu
Add new clock controller compatible and dt-bindings header for the Everything-Else domain of the S4 SoC.
Signed-off-by Yu Tu <[email protected]>MAINTAINERS +1
-0@@ -1775,6 +1775,7 @@ F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* +F: include/dt-bindings/clock/s4-clkc.h ARM/Amlogic Meson SoC Crypto Drivers M: Corentin Labbe <[email protected]>include/dt-bindings/clock/s4-clkc.h new file +0
-0Filename with vendor prefix, so:
amlogic,s4-clkc.hQuoted 14 lines
include/dt-bindings/clock/s4-clkc.h new file +13
-0@@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* +* Copyright (c) 2021 Amlogic, Inc. All rights reserved. +* Author: Yu Tu <[email protected]> +*/ + +#ifndef _DT_BINDINGS_CLOCK_S4_CLKC_H +#define _DT_BINDINGS_CLOCK_S4_CLKC_H + +/* +* CLKID index values +*/ +
Quoted 9 lines
include/dt-bindings/clock/s4-clkc.h line 19
Quoted 6 lines
include/dt-bindings/clock/s4-clkc.h new file +6
-0+#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11Why these aren't continuous? IDs are expected to be incremented by 1.
All clocks have IDs, it is one big table in the driver, but we are not exposing them all. For example, with composite 'mux / div / gate' assembly, we usually need only the leaf.
Same has been done for the other AML controllers:
For ex:
Quoted 6 lines
include/dt-bindings/clock/s4-clkc.h line 146
Quoted 2 lines
include/dt-bindings/clock/s4-clkc.h new file +2
-0+ +#endif /* _DT_BINDINGS_CLOCK_S4_CLKC_H */ Best regards,
Krzysztof
Re: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 56 lines · Jerome Brunet
Quoted 43 lines · Krzysztof Kozlowski
include/dt-bindings/clock/s4-clkc.h
Quoted 24 lines · Yu Tu
Add new clock controller compatible and dt-bindings header for the Everything-Else domain of the S4 SoC.
Signed-off-by Yu Tu <[email protected]>MAINTAINERS +1
-0@@ -1775,6 +1775,7 @@ F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* +F: include/dt-bindings/clock/s4-clkc.h ARM/Amlogic Meson SoC Crypto Drivers M: Corentin Labbe <[email protected]>include/dt-bindings/clock/s4-clkc.h new file +0
-0Filename with vendor prefix, so:
amlogic,s4-clkc.hQuoted 14 lines
include/dt-bindings/clock/s4-clkc.h new file +13
-0@@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* +* Copyright (c) 2021 Amlogic, Inc. All rights reserved. +* Author: Yu Tu <[email protected]> +*/ + +#ifndef _DT_BINDINGS_CLOCK_S4_CLKC_H +#define _DT_BINDINGS_CLOCK_S4_CLKC_H + +/* +* CLKID index values +*/ +Quoted 9 lines
include/dt-bindings/clock/s4-clkc.h line 19
Quoted 6 lines
include/dt-bindings/clock/s4-clkc.h new file +6
-0+#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11Why these aren't continuous? IDs are expected to be incremented by 1.
Quoted 3 lines
All clocks have IDs, it is one big table in the driver, but we are not exposing them all. For example, with composite 'mux / div / gate' assembly, we usually need only the leaf.
I understand you do not expose them all, but that is not the reason to increment ID by 2 or 3... Otherwise these are not IDs and you are not expected to put register offsets into the bindings (you do not bindings in such case).
Quoted 4 lines
Same has been done for the other AML controllers:
For ex:
This cannot be fixed now, but it is very poor argument. Like saying "we had a bug in other driver, so we implemented the bug here as well".
Best regards,
Krzysztof
Jerome Brunet
maintainerRe: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Jerome Brunet
Quoted 1 line · Krzysztof Kozlowski
On 28/07/2022 07:42, Yu Tu wrote:
[...]
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
include/dt-bindings/clock/s4-clkc.h line 19
Quoted 10 lines
include/dt-bindings/clock/s4-clkc.h new file +10
-0+/* +* CLKID index values +*/ + +#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11Why these aren't continuous? IDs are expected to be incremented by 1.
Quoted 8 lines
Quoted 3 lines
All clocks have IDs, it is one big table in the driver, but we are not exposing them all. For example, with composite 'mux / div / gate' assembly, we usually need only the leaf.
I understand you do not expose them all, but that is not the reason to increment ID by 2 or 3... Otherwise these are not IDs and you are not expected to put register offsets into the bindings (you do not bindings in such case).
Why is it not an IDs if it not continuous in the bindings ?
If there is technical reason, we'll probably end up exposing everything. It would not be a dramatic change. I asked for this over v1 because we have done that is the past and I think it makes sense.
I'm happy to be convinced to do things differently. Just looking for the technical reason that require contiuous exposed IDs.
The other IDs exists, but we do not expose them as bindings.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/meson/gxbb.h#n125
Quoted 9 lines
Quoted 6 lines
Same has been done for the other AML controllers:
For ex:This cannot be fixed now, but it is very poor argument. Like saying "we had a bug in other driver, so we implemented the bug here as well".
I agree, "done before" is not a good argument. I was trying to provide a better picutre. I'm just surprised to have this new requirement that IDs have to be incremented by 1 (in the bindings) and I'd like to understand why what we had done could be considered a bug now.
For example the simple-reset driver compute the reset offset from the IDs:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/reset/reset-simple.c
There might be holes in the IDs if not all bits have reset maps. I don't think that would be a bug either.
Quoted 3 lines
Best regards,
Krzysztof
Re: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 38 lines · Jerome Brunet
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Jerome Brunet
Quoted 1 line · Krzysztof Kozlowski
On 28/07/2022 07:42, Yu Tu wrote:
[...]
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
include/dt-bindings/clock/s4-clkc.h line 19
Quoted 10 lines
include/dt-bindings/clock/s4-clkc.h new file +10
-0+/* +* CLKID index values +*/ + +#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11Why these aren't continuous? IDs are expected to be incremented by 1.
Quoted 8 lines
Quoted 3 lines
All clocks have IDs, it is one big table in the driver, but we are not exposing them all. For example, with composite 'mux / div / gate' assembly, we usually need only the leaf.
I understand you do not expose them all, but that is not the reason to increment ID by 2 or 3... Otherwise these are not IDs and you are not expected to put register offsets into the bindings (you do not bindings in such case).
Why is it not an IDs if it not continuous in the bindings ?
If there is technical reason, we'll probably end up exposing everything. It would not be a dramatic change. I asked for this over v1 because we have done that is the past and I think it makes sense.
Quoted 5 lines
I'm happy to be convinced to do things differently. Just looking for the technical reason that require contiuous exposed IDs.
The other IDs exists, but we do not expose them as bindings.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/meson/gxbb.h#n125
https://lore.kernel.org/linux-devicetree/[email protected]/
The IDs are abstract numbers, where the number does not matter because it is not tied to driver implementation or device programming model. The driver maps ID to respective clock.
Using some meaningful numbers as these IDs, means you tied bindings to your implementation and any change in implementation requires change in the bindings. This contradicts the idea of bindings.
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Same has been done for the other AML controllers:
For ex:
Quoted 7 lines
Quoted 2 lines
This cannot be fixed now, but it is very poor argument. Like saying "we had a bug in other driver, so we implemented the bug here as well".
I agree, "done before" is not a good argument. I was trying to provide a better picutre. I'm just surprised to have this new requirement that IDs have to be incremented by 1 (in the bindings) and I'd like to understand why what we had done could be considered a bug now.
It was always, just no one ever enforced it. And almost all clock and reset providers follow it. There are just literally few exceptions.
Quoted 2 lines
For example the simple-reset driver compute the reset offset from the IDs:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/reset/reset-simple.c
This is one of the exceptions where it actually made sense, but I would argue it still contradicts the bindings. You have now binding which is tied to both Linux implementation and to device programming model.
However fixing it would require creating huge mapping tables for each SoC, so obviously this exception is quite reasonable.
Clock drivers require tables and translation anyway. Almost all clock drivers did it, so such exception is not justified.
Quoted 2 lines
There might be holes in the IDs if not all bits have reset maps. I don't think that would be a bug either.
Bug was of course highly exaggerated example. :)
Best regards,
Krzysztof
Jerome Brunet
maintainerRe: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 51 lines · Krzysztof Kozlowski
Quoted 38 lines · Jerome Brunet
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Jerome Brunet
Quoted 1 line · Krzysztof Kozlowski
On 28/07/2022 07:42, Yu Tu wrote:
[...]
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
include/dt-bindings/clock/s4-clkc.h line 19
Quoted 10 lines
include/dt-bindings/clock/s4-clkc.h new file +10
-0+/* +* CLKID index values +*/ + +#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11Why these aren't continuous? IDs are expected to be incremented by 1.
Quoted 8 lines
Quoted 3 lines
All clocks have IDs, it is one big table in the driver, but we are not exposing them all. For example, with composite 'mux / div / gate' assembly, we usually need only the leaf.
I understand you do not expose them all, but that is not the reason to increment ID by 2 or 3... Otherwise these are not IDs and you are not expected to put register offsets into the bindings (you do not bindings in such case).
Why is it not an IDs if it not continuous in the bindings ?
If there is technical reason, we'll probably end up exposing everything. It would not be a dramatic change. I asked for this over v1 because we have done that is the past and I think it makes sense.
Quoted 5 lines
I'm happy to be convinced to do things differently. Just looking for the technical reason that require contiuous exposed IDs.
The other IDs exists, but we do not expose them as bindings.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/meson/gxbb.h#n125
Quoted 8 lines
The IDs are abstract numbers, where the number does not matter because it is not tied to driver implementation or device programming model. The driver maps ID to respective clock.
Using some meaningful numbers as these IDs, means you tied bindings to your implementation and any change in implementation requires change in the bindings. This contradicts the idea of bindings.
I totally agree. Bindings ID are abstract numbers. We do follow that. We even document it:
It is just a choice to not expose some IDs.
It is not tied to the implementation at all.
I think we actually follow the rules and the idea behind it.
We can expose then all If you still think what we are doing is not appropriate.
I'd like things to be consistent though. So if the decision is to expose everything, I'll probably end up doing the same for the old SoCs.
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Krzysztof Kozlowski
Acked-byRe: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 66 lines · Jerome Brunet
Quoted 51 lines · Krzysztof Kozlowski
Quoted 38 lines · Jerome Brunet
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Jerome Brunet
Quoted 1 line · Krzysztof Kozlowski
On 28/07/2022 07:42, Yu Tu wrote:
[...]
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
Review
Quoted 10 lines
(quoted diff) +10
-0+/* + * CLKID index values + */ + +#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11Why these aren't continuous? IDs are expected to be incremented by 1.
Quoted 8 lines
Quoted 3 lines
All clocks have IDs, it is one big table in the driver, but we are not exposing them all. For example, with composite 'mux / div / gate' assembly, we usually need only the leaf.
I understand you do not expose them all, but that is not the reason to increment ID by 2 or 3... Otherwise these are not IDs and you are not expected to put register offsets into the bindings (you do not bindings in such case).
Why is it not an IDs if it not continuous in the bindings ?
If there is technical reason, we'll probably end up exposing everything. It would not be a dramatic change. I asked for this over v1 because we have done that is the past and I think it makes sense.
Quoted 5 lines
I'm happy to be convinced to do things differently. Just looking for the technical reason that require contiuous exposed IDs.
The other IDs exists, but we do not expose them as bindings.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/meson/gxbb.h#n125Quoted 8 lines
The IDs are abstract numbers, where the number does not matter because it is not tied to driver implementation or device programming model. The driver maps ID to respective clock.
Using some meaningful numbers as these IDs, means you tied bindings to your implementation and any change in implementation requires change in the bindings. This contradicts the idea of bindings.
I totally agree. Bindings ID are abstract numbers. We do follow that. We even document it:
Quoted 7 lines
It is just a choice to not expose some IDs.
It is not tied to the implementation at all.
I think we actually follow the rules and the idea behind it.We can expose then all If you still think what we are doing is not appropriate.
No, no need. You are right and I took your not-by-one-increment-ID by other approaches I saw.
The IDs do not have to be incremental, they should not be tied to programming model.
You have it done and documented, so thanks for explanation:
Best regards,
Krzysztof
Re: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
In reply to Krzysztof KozlowskiHi Krzysztof,
Thanks for your reply.
Quoted 20 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 17 lines · Yu Tu
Add new clock controller compatible and dt-bindings header for the Everything-Else domain of the S4 SoC.
Signed-off-by Yu Tu <[email protected]>MAINTAINERS +1
-0@@ -1775,6 +1775,7 @@ F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* +F: include/dt-bindings/clock/s4-clkc.h
Quoted 10 lines
include/dt-bindings/clock/s4-clkc.h
Quoted 7 lines
MAINTAINERS +0
-0ARM/Amlogic Meson SoC Crypto Drivers M: Corentin Labbe <[email protected]>include/dt-bindings/clock/s4-clkc.h new file +0
-0Filename with vendor prefix, so:
amlogic,s4-clkc.h
It's fine with me. It's mainly Jerome's opinion.
Quoted 32 lines
Quoted 11 lines
include/dt-bindings/clock/s4-clkc.h new file +9
-0@@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* +* Copyright (c) 2021 Amlogic, Inc. All rights reserved. +* Author: Yu Tu <[email protected]> +*/ + +#ifndef _DT_BINDINGS_CLOCK_S4_CLKC_H +#define _DT_BINDINGS_CLOCK_S4_CLKC_H +include/dt-bindings/clock/s4-clkc.h line 19
Quoted 10 lines
include/dt-bindings/clock/s4-clkc.h new file +10
-0+/* +* CLKID index values +*/ + +#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11Why these aren't continuous? IDs are expected to be incremented by 1.
include/dt-bindings/clock/s4-clkc.h line 146
Quoted 2 lines
include/dt-bindings/clock/s4-clkc.h new file +2
-0+ +#endif /* _DT_BINDINGS_CLOCK_S4_CLKC_H */ Best regards,
Krzysztof.
Re: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 34 lines · Yu Tu
Hi Krzysztof,
Thanks for your reply.Quoted 20 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 17 lines · Yu Tu
Add new clock controller compatible and dt-bindings header for the Everything-Else domain of the S4 SoC.
Signed-off-by Yu Tu <[email protected]>MAINTAINERS +1
-0@@ -1775,6 +1775,7 @@ F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* +F: include/dt-bindings/clock/s4-clkc.hQuoted 10 lines
include/dt-bindings/clock/s4-clkc.h
Quoted 7 lines
MAINTAINERS +0
-0ARM/Amlogic Meson SoC Crypto Drivers M: Corentin Labbe <[email protected]>include/dt-bindings/clock/s4-clkc.h new file +0
-0Filename with vendor prefix, so:
amlogic,s4-clkc.h
Quoted 1 line
It's fine with me. It's mainly Jerome's opinion.
To clarify: I understand such naming might bring inconsistency, but we want to bring some order in the bindings directories. They keep growing and at some point the model names might start conflicting.
Best regards,
Krzysztof
Re: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 37 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 34 lines · Yu Tu
Hi Krzysztof,
Thanks for your reply.Quoted 30 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
include/dt-bindings/clock/s4-clkc.h
Quoted 24 lines · Yu Tu
Add new clock controller compatible and dt-bindings header for the Everything-Else domain of the S4 SoC.
Signed-off-by Yu Tu <[email protected]>MAINTAINERS +1
-0@@ -1775,6 +1775,7 @@ F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* +F: include/dt-bindings/clock/s4-clkc.h ARM/Amlogic Meson SoC Crypto Drivers M: Corentin Labbe <[email protected]>include/dt-bindings/clock/s4-clkc.h new file +0
-0Filename with vendor prefix, so:
amlogic,s4-clkc.h
Quoted 5 lines
Quoted 1 line
It's fine with me. It's mainly Jerome's opinion.
To clarify: I understand such naming might bring inconsistency, but we want to bring some order in the bindings directories. They keep growing and at some point the model names might start conflicting.
If Jerome agrees, I will change it according to your opinion and make another edition.
Quoted 6 lines
Best regards,
Krzysztof.
Jerome Brunet
maintainerRe: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 36 lines · Yu Tu
Quoted 35 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 33 lines · Yu Tu
Hi Krzysztof,
Thanks for your reply.Quoted 29 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
include/dt-bindings/clock/s4-clkc.h
Quoted 23 lines · Yu Tu
Add new clock controller compatible and dt-bindings header for the Everything-Else domain of the S4 SoC.
Signed-off-by Yu Tu <[email protected]>MAINTAINERS +1
-0@@ -1775,6 +1775,7 @@ F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* +F: include/dt-bindings/clock/s4-clkc.h ARM/Amlogic Meson SoC Crypto Drivers M: Corentin Labbe <[email protected]>include/dt-bindings/clock/s4-clkc.h new file +0
-0Filename with vendor prefix, so:
amlogic,s4-clkc.h
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It's fine with me. It's mainly Jerome's opinion.
To clarify: I understand such naming might bring inconsistency, but we want to bring some order in the bindings directories. They keep growing and at some point the model names might start conflicting.
If Jerome agrees, I will change it according to your opinion and make another edition.
I'm aligned with Krzysztof on this. Please add the vendor prefix.
It was mistake to omit the vendor prefix. Unfortunately, I don't think we can fix the old bindings now.
Quoted 5 lines
Quoted 5 lines
Best regards,
Krzysztof
.
Re: [PATCH V2 1/3] dt-bindings: clk: meson: add S4 SoC clock controller bindings
Quoted 41 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 36 lines · Yu Tu
Quoted 35 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
Quoted 33 lines · Yu Tu
Hi Krzysztof,
Thanks for your reply.Quoted 29 lines · Krzysztof Kozlowski
[ EXTERNAL EMAIL ]
include/dt-bindings/clock/s4-clkc.h
Quoted 23 lines · Yu Tu
Add new clock controller compatible and dt-bindings header for the Everything-Else domain of the S4 SoC.
Signed-off-by Yu Tu <[email protected]>MAINTAINERS +1
-0@@ -1775,6 +1775,7 @@ F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* +F: include/dt-bindings/clock/s4-clkc.h ARM/Amlogic Meson SoC Crypto Drivers M: Corentin Labbe <[email protected]>include/dt-bindings/clock/s4-clkc.h new file +0
-0Filename with vendor prefix, so:
amlogic,s4-clkc.h
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It's fine with me. It's mainly Jerome's opinion.
To clarify: I understand such naming might bring inconsistency, but we want to bring some order in the bindings directories. They keep growing and at some point the model names might start conflicting.
If Jerome agrees, I will change it according to your opinion and make another edition.
I'm aligned with Krzysztof on this. Please add the vendor prefix.
I will add it in next version.
Quoted 11 lines
It was mistake to omit the vendor prefix. Unfortunately, I don't think we can fix the old bindings now.
Quoted 5 lines
Quoted 5 lines
Best regards,
Krzysztof
..
PATCH v2 2/3 arm64: dts: meson: add S4 Soc clock controller in DT
In reply to Yu TuAdded information about the S4 SOC Clock controller in DT.
--- arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/amlogic/meson-s4.dtsi +11 -0
@@ -6,6 +6,7 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/clock/s4-clkc.h> / { cpus {
@@ -118,6 +119,16 @@ gpio_intc: interrupt-controller@4080 { <10 11 12 13 14 15 16 17 18 19 20 21>; }; + clkc: clock-controller { + compatible = "amlogic,s4-clkc"; + reg = <0x0 0x0 0x0 0x49c>, + <0x0 0x8000 0x0 0x348>; + reg-names = "basic", "pll"; + #clock-cells = <1>; + clocks = <&xtal>; + clock-names = "xtal"; + }; + uart_B: serial@7a000 { compatible = "amlogic,meson-s4-uart", "amlogic,meson-ao-uart";
Signature · 1 line
2.33.1
PATCH v2 3/3 clk: meson: s4: add s4 SoC clock controller driver
In reply to Yu TuAdd the peripheral clock controller found in the s4 SoC family.
--- drivers/clk/meson/Kconfig | 15 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4.c | 4732 ++++++++++++++++++++++++++++++++++++ drivers/clk/meson/s4.h | 296 +++ 4 files changed, 5044 insertions(+) create mode 100644 drivers/clk/meson/s4.c create mode 100644 drivers/clk/meson/s4.h
drivers/clk/meson/Kconfig +15 -0
@@ -115,4 +115,19 @@ config COMMON_CLK_G12A help Support for the clock controller on Amlogic S905D2, S905X2 and S905Y2 devices, aka g12a. Say Y if you want peripherals to work. + +config COMMON_CLK_S4 + tristate "S4 SoC clock controllers support" + depends on ARM64 + default y + select COMMON_CLK_MESON_REGMAP + select COMMON_CLK_MESON_DUALDIV + select COMMON_CLK_MESON_MPLL + select COMMON_CLK_MESON_PLL + select COMMON_CLK_MESON_VID_PLL_DIV + select MFD_SYSCON + help + Support for the clock controller on Amlogic S805X2 and S905Y4 devices, + aka s4. Amlogic S805X2 and S905Y4 devices include AQ222 and AQ229. + Say Y if you want peripherals and CPU frequency scaling to work. endmenu
drivers/clk/meson/Makefile +1 -0
@@ -19,3 +19,4 @@ obj-$(CONFIG_COMMON_CLK_AXG_AUDIO) += axg-audio.o obj-$(CONFIG_COMMON_CLK_GXBB) += gxbb.o gxbb-aoclk.o obj-$(CONFIG_COMMON_CLK_G12A) += g12a.o g12a-aoclk.o obj-$(CONFIG_COMMON_CLK_MESON8B) += meson8b.o meson8-ddr.o +obj-$(CONFIG_COMMON_CLK_S4) += s4.o
drivers/clk/meson/s4.c new file +4732 -0
2,977 lines not on this page · raw message
drivers/clk/meson/s4.h new file +296 -0
296 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.33.1
Part of the diff is not shown here. View the raw message.
Jerome Brunet
maintainerQuoted 25 lines · Yu Tu
1. Add clock controller driver for S4 SOC.
Yu Tu (3):
dt-bindings: clk: meson: add S4 SoC clock controller bindings
arm64: dts: meson: add S4 Soc clock controller in DT
clk: meson: s4: add s4 SoC clock controller driverV1 -> V2: Change format as discussed in the email.
.../bindings/clock/amlogic,gxbb-clkc.txt | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 11 + drivers/clk/meson/Kconfig | 15 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4.c | 4732 +++++++++++++++++ drivers/clk/meson/s4.h | 296 ++ include/dt-bindings/clock/s4-clkc.h | 146 + 8 files changed, 5203 insertions(+) create mode 100644 drivers/clk/meson/s4.c create mode 100644 drivers/clk/meson/s4.h create mode 100644 include/dt-bindings/clock/s4-clkc.h
Quoted 1 line
base-commit:
b293bc9286ee21824e93f0fcfed3b78fdfee01e6
Please don't post until you have addressed *ALL* the comments from the previous version.
At first glance, I can see that this is still a single driver for what is obviously 2 controllers with 2 register spaces. Simple comments like the "<< 2" in the register declaration have not been addressed either.
Seeing that, I have not reviewed this version further.
I won't until all the comments from v1 are either addressed or answered.
Regards
Jerome
Hi JB,
Quoted 30 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 25 lines · Yu Tu
1. Add clock controller driver for S4 SOC.
Yu Tu (3):
dt-bindings: clk: meson: add S4 SoC clock controller bindings
arm64: dts: meson: add S4 Soc clock controller in DT
clk: meson: s4: add s4 SoC clock controller driverV1 -> V2: Change format as discussed in the email.
.../bindings/clock/amlogic,gxbb-clkc.txt | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 11 + drivers/clk/meson/Kconfig | 15 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4.c | 4732 +++++++++++++++++ drivers/clk/meson/s4.h | 296 ++ include/dt-bindings/clock/s4-clkc.h | 146 + 8 files changed, 5203 insertions(+)create mode 100644
drivers/clk/meson/s4.ccreate mode 100644drivers/clk/meson/s4.hcreate mode 100644include/dt-bindings/clock/s4-clkc.h
Quoted 4 lines
Quoted 1 line
base-commit:
b293bc9286ee21824e93f0fcfed3b78fdfee01e6Please don't post until you have addressed *ALL* the comments from the previous version.
The last email asked you to adopt A1 method, but you did not reply?
Quoted 4 lines
At first glance, I can see that this is still a single driver for what is obviously 2 controllers with 2 register spaces. Simple comments like the "<< 2" in the register declaration have not been addressed either.
I understand that this should be a controller, just two address descriptions. One is the various PLL registers and one is the clock for the peripherals. And PLL is to provide a clock source for various peripheral clocks. So a clock controller is reasonable. I think you got it wrong.
Ok, if you insist on using two clock controllers,, please provide your the reason and example code?
Quoted 8 lines
Seeing that, I have not reviewed this version further.
I won't until all the comments from v1 are either addressed or answerRegards
Jerome.
Hi JB,
We suspect that you are not looking carefully. You only see two base
addresses for controllers, so you think you should use two clock controllers. But you're missing their direct connection.
Quoted 56 lines · Yu Tu
Hi JB,
Quoted 31 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 26 lines · Yu Tu
1. Add clock controller driver for S4 SOC.
Yu Tu (3):
dt-bindings: clk: meson: add S4 SoC clock controller bindings
arm64: dts: meson: add S4 Soc clock controller in DT
clk: meson: s4: add s4 SoC clock controller driverV1 -> V2: Change format as discussed in the email.
.../bindings/clock/amlogic,gxbb-clkc.txt | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 11 + drivers/clk/meson/Kconfig | 15 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4.c | 4732 +++++++++++++++++ drivers/clk/meson/s4.h | 296 ++ include/dt-bindings/clock/s4-clkc.h | 146 +
8 files changed, 5203 insertions(+)create mode 100644
drivers/clk/meson/s4.ccreate mode 100644drivers/clk/meson/s4.hcreate mode 100644include/dt-bindings/clock/s4-clkc.hQuoted 4 lines
Quoted 1 line
base-commit:
b293bc9286ee21824e93f0fcfed3b78fdfee01e6Please don't post until you have addressed *ALL* the comments from the previous version.
The last email asked you to adopt A1 method, but you did not reply?
Quoted 4 lines
At first glance, I can see that this is still a single driver for what is obviously 2 controllers with 2 register spaces. Simple comments like the "<< 2" in the register declaration have not been addressed either.
I understand that this should be a controller, just two address descriptions. One is the various PLL registers and one is the clock for the peripherals. And PLL is to provide a clock source for various peripheral clocks. So a clock controller is reasonable. I think you got it wrong.
Ok, if you insist on using two clock controllers,, please provide your the reason and example code?
Quoted 8 lines
Seeing that, I have not reviewed this version further.
I won't until all the comments from v1 are either addressed or answerRegards
Jerome.
Jerome Brunet
maintainerQuoted 37 lines · Yu Tu
Hi JB,
Quoted 29 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 25 lines · Yu Tu
1. Add clock controller driver for S4 SOC.
Yu Tu (3):
dt-bindings: clk: meson: add S4 SoC clock controller bindings
arm64: dts: meson: add S4 Soc clock controller in DT
clk: meson: s4: add s4 SoC clock controller driverV1 -> V2: Change format as discussed in the email.
.../bindings/clock/amlogic,gxbb-clkc.txt | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 11 + drivers/clk/meson/Kconfig | 15 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4.c | 4732 +++++++++++++++++ drivers/clk/meson/s4.h | 296 ++ include/dt-bindings/clock/s4-clkc.h | 146 + 8 files changed, 5203 insertions(+)create mode 100644
drivers/clk/meson/s4.ccreate mode 100644drivers/clk/meson/s4.hcreate mode 100644include/dt-bindings/clock/s4-clkc.hQuoted 3 lines
Quoted 1 line
base-commit:
b293bc9286ee21824e93f0fcfed3b78fdfee01e6Please don't post until you have addressed *ALL* the comments from the previous version.
The last email asked you to adopt A1 method, but you did not reply?
Quoted 8 lines
Quoted 3 lines
At first glance, I can see that this is still a single driver for what is obviously 2 controllers with 2 register spaces. Simple comments like the "<< 2" in the register declaration have not been addressed either.
I understand that this should be a controller, just two address descriptions. One is the various PLL registers and one is the clock for the peripherals. And PLL is to provide a clock source for various peripheral clocks. So a clock controller is reasonable. I think you got it wrong.
I don't think I do. This looks exactly like the A1.
The post of that controller are still in the archive and I am sure your colleagues can give you the history.
You clearly have register regions providing clock, separated by 0x8000. Claiming that as one big region is bad design.
There has been several remarks about using a big syscon on V1, unaddressed too.
CCF has everything necessary in place to handle each register region separately, properly and pass clock around.
You can handle it as a single controller, claiming the two regions individually but:
# 1 - handling 2 different regmaps in the controller is going to be
bigger mess than you think
# 2 - I am far from convinced there is any reason to do so
Quoted 9 lines
Ok, if you insist on using two clock controllers,, please provide your the reason and example code?
Quoted 5 lines
Seeing that, I have not reviewed this version further.
I won't until all the comments from v1 are either addressed or answer Regards
Jerome
.
Hi Jerome,
Thanks for your reply and explanation.
Quoted 61 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 37 lines · Yu Tu
Hi JB,
Quoted 29 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 25 lines · Yu Tu
1. Add clock controller driver for S4 SOC.
Yu Tu (3):
dt-bindings: clk: meson: add S4 SoC clock controller bindings
arm64: dts: meson: add S4 Soc clock controller in DT
clk: meson: s4: add s4 SoC clock controller driverV1 -> V2: Change format as discussed in the email.
.../bindings/clock/amlogic,gxbb-clkc.txt | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 11 + drivers/clk/meson/Kconfig | 15 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4.c | 4732 +++++++++++++++++ drivers/clk/meson/s4.h | 296 ++ include/dt-bindings/clock/s4-clkc.h | 146 + 8 files changed, 5203 insertions(+)create mode 100644
drivers/clk/meson/s4.ccreate mode 100644drivers/clk/meson/s4.hcreate mode 100644include/dt-bindings/clock/s4-clkc.hQuoted 3 lines
Quoted 1 line
base-commit:
b293bc9286ee21824e93f0fcfed3b78fdfee01e6Please don't post until you have addressed *ALL* the comments from the previous version.
The last email asked you to adopt A1 method, but you did not reply?
Quoted 8 lines
Quoted 3 lines
At first glance, I can see that this is still a single driver for what is obviously 2 controllers with 2 register spaces. Simple comments like the "<< 2" in the register declaration have not been addressed either.
I understand that this should be a controller, just two address descriptions. One is the various PLL registers and one is the clock for the peripherals. And PLL is to provide a clock source for various peripheral clocks. So a clock controller is reasonable. I think you got it wrong.
I don't think I do. This looks exactly like the A1.
The post of that controller are still in the archive and I am sure your colleagues can give you the history.You clearly have register regions providing clock, separated by
0x8000. Claiming that as one big region is bad design.There has been several remarks about using a big syscon on V1, unaddressed too.
Quoted 9 lines
CCF has everything necessary in place to handle each register region separately, properly and pass clock around.
You can handle it as a single controller, claiming the two regions individually but:
# 1 - handling 2 different regmaps in the controller is going to be
bigger mess than you think
# 2 - I am far from convinced there is any reason to do so
It makes sense, as you say, to separate the two controllers. But I think the only thing that was forced apart was that the digital designers didn't put these registers together when they were designing the chips.
I'm going to separate the two controllers like you said.
Quoted 12 lines
Quoted 10 lines
Ok, if you insist on using two clock controllers,, please provide your the reason and example code?
Quoted 5 lines
Seeing that, I have not reviewed this version further.
I won't until all the comments from v1 are either addressed or answer Regards
Jerome
..
Jerome Brunet
maintainerQuoted 68 lines · Yu Tu
Hi Jerome,
Thanks for your reply and explanation.Quoted 49 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 37 lines · Yu Tu
Hi JB,
Quoted 29 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 25 lines · Yu Tu
1. Add clock controller driver for S4 SOC.
Yu Tu (3):
dt-bindings: clk: meson: add S4 SoC clock controller bindings
arm64: dts: meson: add S4 Soc clock controller in DT
clk: meson: s4: add s4 SoC clock controller driverV1 -> V2: Change format as discussed in the email.
.../bindings/clock/amlogic,gxbb-clkc.txt | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 11 + drivers/clk/meson/Kconfig | 15 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4.c | 4732 +++++++++++++++++ drivers/clk/meson/s4.h | 296 ++ include/dt-bindings/clock/s4-clkc.h | 146 + 8 files changed, 5203 insertions(+)create mode 100644
drivers/clk/meson/s4.ccreate mode 100644drivers/clk/meson/s4.hcreate mode 100644include/dt-bindings/clock/s4-clkc.hQuoted 3 lines
Quoted 1 line
base-commit:
b293bc9286ee21824e93f0fcfed3b78fdfee01e6Please don't post until you have addressed *ALL* the comments from the previous version.
The last email asked you to adopt A1 method, but you did not reply?
Quoted 8 lines
Quoted 3 lines
At first glance, I can see that this is still a single driver for what is obviously 2 controllers with 2 register spaces. Simple comments like the "<< 2" in the register declaration have not been addressed either.
I understand that this should be a controller, just two address descriptions. One is the various PLL registers and one is the clock for the peripherals. And PLL is to provide a clock source for various peripheral clocks. So a clock controller is reasonable. I think you got it wrong.
Quoted 15 lines
I don't think I do. This looks exactly like the A1.
The post of that controller are still in the archive and I am sure your colleagues can give you the history.
You clearly have register regions providing clock, separated by0x8000. Claiming that as one big region is bad design.
There has been several remarks about using a big syscon on V1, unaddressed too.
CCF has everything necessary in place to handle each register region separately, properly and pass clock around.
You can handle it as a single controller, claiming the two regions individually but:
# 1 - handling 2 different regmaps in the controller is going to be
bigger mess than you think
# 2 - I am far from convinced there is any reason to do so
Quoted 4 lines
It makes sense, as you say, to separate the two controllers. But I think the only thing that was forced apart was that the digital designers didn't put these registers together when they were designing the chips.
One controller is providing all the base PLLs
The other is providing most (if not all) the devices clocks. This does not look like coincidence or mistake to me.
Quoted 13 lines
I'm going to separate the two controllers like you said.
Quoted 11 lines
Quoted 10 lines
Ok, if you insist on using two clock controllers,, please provide your the reason and example code?
Quoted 5 lines
Seeing that, I have not reviewed this version further.
I won't until all the comments from v1 are either addressed or answer Regards
Jerome
..
Quoted 73 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 68 lines · Yu Tu
Hi Jerome,
Thanks for your reply and explanation.Quoted 64 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 37 lines · Yu Tu
Hi JB,
Quoted 29 lines · Jerome Brunet
[ EXTERNAL EMAIL ]
Quoted 25 lines · Yu Tu
1. Add clock controller driver for S4 SOC.
Yu Tu (3):
dt-bindings: clk: meson: add S4 SoC clock controller bindings
arm64: dts: meson: add S4 Soc clock controller in DT
clk: meson: s4: add s4 SoC clock controller driverV1 -> V2: Change format as discussed in the email.
.../bindings/clock/amlogic,gxbb-clkc.txt | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 11 + drivers/clk/meson/Kconfig | 15 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/s4.c | 4732 +++++++++++++++++ drivers/clk/meson/s4.h | 296 ++ include/dt-bindings/clock/s4-clkc.h | 146 + 8 files changed, 5203 insertions(+) create mode 100644 drivers/clk/meson/s4.c create mode 100644 drivers/clk/meson/s4.h create mode 100644 include/dt-bindings/clock/s4-clkc.hQuoted 3 lines
Quoted 1 line
base-commit:
b293bc9286ee21824e93f0fcfed3b78fdfee01e6Please don't post until you have addressed *ALL* the comments from the previous version.
The last email asked you to adopt A1 method, but you did not reply?
Quoted 8 lines
Quoted 3 lines
At first glance, I can see that this is still a single driver for what is obviously 2 controllers with 2 register spaces. Simple comments like the "<< 2" in the register declaration have not been addressed either.
I understand that this should be a controller, just two address descriptions. One is the various PLL registers and one is the clock for the peripherals. And PLL is to provide a clock source for various peripheral clocks. So a clock controller is reasonable. I think you got it wrong.
I don't think I do. This looks exactly like the A1.
The post of that controller are still in the archive and I am sure your colleagues can give you the history.
You clearly have register regions providing clock, separated by0x8000. Claiming that as one big region is bad design.
There has been several remarks about using a big syscon on V1, unaddressed too.
CCF has everything necessary in place to handle each register region separately, properly and pass clock around.
You can handle it as a single controller, claiming the two regions individually but:
# 1 - handling 2 different regmaps in the controller is going to be
bigger mess than you think
# 2 - I am far from convinced there is any reason to do so
Quoted 8 lines
Quoted 4 lines
It makes sense, as you say, to separate the two controllers. But I think the only thing that was forced apart was that the digital designers didn't put these registers together when they were designing the chips.
One controller is providing all the base PLLs
The other is providing most (if not all) the devices clocks. This does not look like coincidence or mistake to me.
Thanks for your reply. Looks like I got it wrong. However, I will talk to the chip designer about whether it is possible to put these registers in the later chip so that it may be easier for our software to process.
Quoted 16 lines
Quoted 14 lines
I'm going to separate the two controllers like you said.
Quoted 11 lines
Quoted 10 lines
Ok, if you insist on using two clock controllers,, please provide your the reason and example code?
Quoted 5 lines
Seeing that, I have not reviewed this version further.
I won't until all the comments from v1 are either addressed or answer Regards
Jerome
..
.