mbox series

[00/10] Add SM8475 clock controller drivers

Message ID 20240731175919.20333-1-danila@jiaxyga.com
Headers show
Series Add SM8475 clock controller drivers | expand

Message

Danila Tikhonov July 31, 2024, 5:59 p.m. UTC
This series adds support for SM8475 to SM8450 clock controller drivers.
Was tested on Nothing Phone (2) aka nothing-pong.

Based on this downstream commit:
https://git.codelinaro.org/clo/la/kernel/msm-5.10/-/commit/b051ec6bdc4b4884905002b2e75753e6f1238d20

To: Bjorn Andersson <andersson@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>
To: Stephen Boyd <sboyd@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Philipp Zabel <p.zabel@pengutronix.de>
To: Vinod Koul <vkoul@kernel.org>
To: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
To: Jagadeesh Kona <quic_jkona@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Konrad Dybcio <konradybcio@kernel.org>
To: Taniya Das <quic_tdas@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-clk@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux@mainlining.org

Danila Tikhonov (10):
  dt-bindings: clock: qcom,gcc-sm8450: Add SM8475 GCC bindings
  clk: qcom: gcc-sm8450: Add SM8475 support
  dt-bindings: clock: qcom,sm8450-dispcc: Add SM8475 DISPCC bindings
  clk: qcom: dispcc-sm8450: Add SM8475 support
  dt-bindings: clock: qcom,sm8450-gpucc: Add SM8475 GPUCC bindings
  clk: qcom: gpucc-sm8450: Add SM8475 support
  dt-bindings: clock: qcom,sm8450-videocc: Add SM8475 VIDEOCC bindings
  clk: qcom: videocc-sm8450: Add SM8475 support
  dt-bindings: clock: qcom,sm8450-camcc: Add SM8475 CAMCC bindings
  clk: qcom: camcc-sm8450: Add SM8475 support

 .../bindings/clock/qcom,gcc-sm8450.yaml       |   8 +-
 .../bindings/clock/qcom,sm8450-camcc.yaml     |   2 +
 .../bindings/clock/qcom,sm8450-dispcc.yaml    |   5 +-
 .../bindings/clock/qcom,sm8450-gpucc.yaml     |   3 +
 .../bindings/clock/qcom,sm8450-videocc.yaml   |   2 +
 drivers/clk/qcom/Kconfig                      |  12 +-
 drivers/clk/qcom/camcc-sm8450.c               | 231 +++++++++++++++++-
 drivers/clk/qcom/dispcc-sm8450.c              |  49 +++-
 drivers/clk/qcom/gcc-sm8450.c                 | 182 +++++++++++++-
 drivers/clk/qcom/gpucc-sm8450.c               |  25 +-
 drivers/clk/qcom/videocc-sm8450.c             |  31 ++-
 include/dt-bindings/clock/qcom,gcc-sm8450.h   |   2 +
 include/dt-bindings/clock/qcom,sm8475-camcc.h |   1 +
 .../dt-bindings/clock/qcom,sm8475-dispcc.h    |   1 +
 include/dt-bindings/clock/qcom,sm8475-gcc.h   |   1 +
 include/dt-bindings/clock/qcom,sm8475-gpucc.h |   1 +
 .../dt-bindings/clock/qcom,sm8475-videocc.h   |   1 +
 include/dt-bindings/reset/qcom,sm8475-gpucc.h |   1 +
 18 files changed, 532 insertions(+), 26 deletions(-)
 create mode 120000 include/dt-bindings/clock/qcom,sm8475-camcc.h
 create mode 120000 include/dt-bindings/clock/qcom,sm8475-dispcc.h
 create mode 120000 include/dt-bindings/clock/qcom,sm8475-gcc.h
 create mode 120000 include/dt-bindings/clock/qcom,sm8475-gpucc.h
 create mode 120000 include/dt-bindings/clock/qcom,sm8475-videocc.h
 create mode 120000 include/dt-bindings/reset/qcom,sm8475-gpucc.h

Comments

Krzysztof Kozlowski Aug. 2, 2024, 7:30 a.m. UTC | #1
On 31/07/2024 19:59, Danila Tikhonov wrote:
> Add SM8475 GCC bindings, which are simply a symlink to the SM8450
> bindings. Update the documentation with the new compatible.
> 
> Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
> ---
>  .../devicetree/bindings/clock/qcom,gcc-sm8450.yaml        | 8 ++++++--
>  include/dt-bindings/clock/qcom,gcc-sm8450.h               | 2 ++
>  include/dt-bindings/clock/qcom,sm8475-gcc.h               | 1 +
>  3 files changed, 9 insertions(+), 2 deletions(-)
>  create mode 120000 include/dt-bindings/clock/qcom,sm8475-gcc.h
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sm8450.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sm8450.yaml
> index d848361beeb3..c7d75ee2a23b 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sm8450.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sm8450.yaml
> @@ -13,11 +13,15 @@ description: |
>    Qualcomm global clock control module provides the clocks, resets and power
>    domains on SM8450
>  
> -  See also:: include/dt-bindings/clock/qcom,gcc-sm8450.h
> +  See also::

You can use one : (:: -> :). That was a mistake to use double colons.

> +    include/dt-bindings/clock/qcom,gcc-sm8450.h
> +    include/dt-bindings/clock/qcom,sm8475-gcc.h
>  
>  properties:
>    compatible:
> -    const: qcom,gcc-sm8450
> +    enum:
> +      - qcom,gcc-sm8450
> +      - qcom,sm8475-gcc
>  
>    clocks:
>      items:
> diff --git a/include/dt-bindings/clock/qcom,gcc-sm8450.h b/include/dt-bindings/clock/qcom,gcc-sm8450.h
> index 9679410843a0..5f1f9ab71a22 100644
> --- a/include/dt-bindings/clock/qcom,gcc-sm8450.h
> +++ b/include/dt-bindings/clock/qcom,gcc-sm8450.h
> @@ -194,6 +194,8 @@
>  #define GCC_VIDEO_AXI0_CLK					182
>  #define GCC_VIDEO_AXI1_CLK					183
>  #define GCC_VIDEO_XO_CLK					184
> +#define GCC_GPLL2						185
> +#define GCC_GPLL3						186

Are these valid for sm8450?

>  
>  /* GCC resets */
>  #define GCC_CAMERA_BCR						0
> diff --git a/include/dt-bindings/clock/qcom,sm8475-gcc.h b/include/dt-bindings/clock/qcom,sm8475-gcc.h
> new file mode 120000
> index 000000000000..daafdd881892
> --- /dev/null
> +++ b/include/dt-bindings/clock/qcom,sm8475-gcc.h

If the bindings are the same... then why having separate header? I
suggest dropping it.

Best regards,
Krzysztof
Krzysztof Kozlowski Aug. 2, 2024, 7:31 a.m. UTC | #2
On 31/07/2024 19:59, Danila Tikhonov wrote:
> Add SM8475 DISPCC bindings, which are simply a symlink to the SM8450
> bindings. Update the documentation with the new compatible.
> 
> Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
> ---

Same comments as for patch #1.

Best regards,
Krzysztof