linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712.
@ 2025-01-16 16:24 Dave Stevenson
  2025-01-16 16:24 ` [PATCH 1/5] clk: bcm: rpi: Add ISP to exported clocks Dave Stevenson
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Dave Stevenson @ 2025-01-16 16:24 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Dom Cobley, Maxime Ripard

These patches were Acked by Stephen as patches 30-34 of
https://lore.kernel.org/all/20241023-drm-vc4-2712-support-v1-0-1cc2d5594907@raspberrypi.com/
with v2 at
https://lore.kernel.org/all/20241025-drm-vc4-2712-support-v2-0-35efa83c8fc0@raspberrypi.com/

I'm a newbie on kernel processes and where the patches should be merged.

I'd asked Stephen on the v1 thread as to what needed to happen to get
them merged, and he asked me to resend the clk patches for the next merge
window.
I must confess to it having slipped my mind, but resending them now to
hopefully be merged in time.

Thanks.
  Dave

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
Dom Cobley (3):
      clk: bcm: rpi: Add ISP to exported clocks
      clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks
      clk: bcm: rpi: Enable minimize for all firmware clocks

Maxime Ripard (2):
      clk: bcm: rpi: Create helper to retrieve private data
      clk: bcm: rpi: Add disp clock

 drivers/clk/bcm/clk-raspberrypi.c          | 33 ++++++++++++++++++++++--------
 include/soc/bcm2835/raspberrypi-firmware.h |  1 +
 2 files changed, 25 insertions(+), 9 deletions(-)
---
base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
change-id: 20250115-bcm2712-clk-updates-98a47f32116d

Best regards,
-- 
Dave Stevenson <dave.stevenson@raspberrypi.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/5] clk: bcm: rpi: Add ISP to exported clocks
  2025-01-16 16:24 [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Dave Stevenson
@ 2025-01-16 16:24 ` Dave Stevenson
  2025-01-16 17:44   ` Florian Fainelli
  2025-01-16 21:28   ` Stephen Boyd
  2025-01-16 16:24 ` [PATCH 2/5] clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks Dave Stevenson
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Dave Stevenson @ 2025-01-16 16:24 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Dom Cobley

From: Dom Cobley <popcornmix@gmail.com>

The ISP clock can be controlled by the driver, so register it
with the clock subsystem.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/clk/bcm/clk-raspberrypi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index a18a8768feb4..6d5ee1cddded 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -118,6 +118,9 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NUM_CLK_ID] = {
 	[RPI_FIRMWARE_HEVC_CLK_ID] = {
 		.export = true,
 	},
+	[RPI_FIRMWARE_ISP_CLK_ID] = {
+		.export = true,
+	},
 	[RPI_FIRMWARE_PIXEL_BVB_CLK_ID] = {
 		.export = true,
 	},

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/5] clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks
  2025-01-16 16:24 [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Dave Stevenson
  2025-01-16 16:24 ` [PATCH 1/5] clk: bcm: rpi: Add ISP to exported clocks Dave Stevenson
@ 2025-01-16 16:24 ` Dave Stevenson
  2025-01-16 17:44   ` Florian Fainelli
  2025-01-16 21:28   ` Stephen Boyd
  2025-01-16 16:24 ` [PATCH 3/5] clk: bcm: rpi: Enable minimize for all firmware clocks Dave Stevenson
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Dave Stevenson @ 2025-01-16 16:24 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Dom Cobley

From: Dom Cobley <popcornmix@gmail.com>

For performance/power it is beneficial to adjust gpu clocks with arm clock.
This is how the downstream cpufreq driver works

Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/clk/bcm/clk-raspberrypi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index 6d5ee1cddded..d374538e7108 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -156,7 +156,6 @@ static int raspberrypi_clock_property(struct rpi_firmware *firmware,
 	struct raspberrypi_firmware_prop msg = {
 		.id = cpu_to_le32(data->id),
 		.val = cpu_to_le32(*val),
-		.disable_turbo = cpu_to_le32(1),
 	};
 	int ret;
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/5] clk: bcm: rpi: Enable minimize for all firmware clocks
  2025-01-16 16:24 [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Dave Stevenson
  2025-01-16 16:24 ` [PATCH 1/5] clk: bcm: rpi: Add ISP to exported clocks Dave Stevenson
  2025-01-16 16:24 ` [PATCH 2/5] clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks Dave Stevenson
@ 2025-01-16 16:24 ` Dave Stevenson
  2025-01-16 17:45   ` Florian Fainelli
  2025-01-16 21:28   ` Stephen Boyd
  2025-01-16 16:24 ` [PATCH 4/5] clk: bcm: rpi: Create helper to retrieve private data Dave Stevenson
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Dave Stevenson @ 2025-01-16 16:24 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Dom Cobley

From: Dom Cobley <popcornmix@gmail.com>

There isn't a reason not to minimise the clocks, and it saves
some power.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/clk/bcm/clk-raspberrypi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index d374538e7108..9f716b2223ae 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -111,21 +111,27 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NUM_CLK_ID] = {
 	},
 	[RPI_FIRMWARE_V3D_CLK_ID] = {
 		.export = true,
+		.minimize = true,
 	},
 	[RPI_FIRMWARE_PIXEL_CLK_ID] = {
 		.export = true,
+		.minimize = true,
 	},
 	[RPI_FIRMWARE_HEVC_CLK_ID] = {
 		.export = true,
+		.minimize = true,
 	},
 	[RPI_FIRMWARE_ISP_CLK_ID] = {
 		.export = true,
+		.minimize = true,
 	},
 	[RPI_FIRMWARE_PIXEL_BVB_CLK_ID] = {
 		.export = true,
+		.minimize = true,
 	},
 	[RPI_FIRMWARE_VEC_CLK_ID] = {
 		.export = true,
+		.minimize = true,
 	},
 };
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/5] clk: bcm: rpi: Create helper to retrieve private data
  2025-01-16 16:24 [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Dave Stevenson
                   ` (2 preceding siblings ...)
  2025-01-16 16:24 ` [PATCH 3/5] clk: bcm: rpi: Enable minimize for all firmware clocks Dave Stevenson
@ 2025-01-16 16:24 ` Dave Stevenson
  2025-01-16 17:45   ` Florian Fainelli
  2025-01-16 21:29   ` Stephen Boyd
  2025-01-16 16:24 ` [PATCH 5/5] clk: bcm: rpi: Add disp clock Dave Stevenson
  2025-01-16 19:11 ` [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Stefan Wahren
  5 siblings, 2 replies; 18+ messages in thread
From: Dave Stevenson @ 2025-01-16 16:24 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Maxime Ripard

From: Maxime Ripard <mripard@kernel.org>

The RaspberryPi firmware clocks driver uses in several instances a
container_of to retrieve the struct raspberrypi_clk_data from a pointer
to struct clk_hw. Let's create a small function to avoid duplicating it
all over the place.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/clk/bcm/clk-raspberrypi.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index 9f716b2223ae..b12d86720207 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -56,6 +56,12 @@ struct raspberrypi_clk_data {
 	struct raspberrypi_clk *rpi;
 };
 
+static inline
+const struct raspberrypi_clk_data *clk_hw_to_data(const struct clk_hw *hw)
+{
+	return container_of(hw, struct raspberrypi_clk_data, hw);
+}
+
 struct raspberrypi_clk_variant {
 	bool		export;
 	char		*clkdev;
@@ -176,8 +182,7 @@ static int raspberrypi_clock_property(struct rpi_firmware *firmware,
 
 static int raspberrypi_fw_is_prepared(struct clk_hw *hw)
 {
-	struct raspberrypi_clk_data *data =
-		container_of(hw, struct raspberrypi_clk_data, hw);
+	const struct raspberrypi_clk_data *data = clk_hw_to_data(hw);
 	struct raspberrypi_clk *rpi = data->rpi;
 	u32 val = 0;
 	int ret;
@@ -194,8 +199,7 @@ static int raspberrypi_fw_is_prepared(struct clk_hw *hw)
 static unsigned long raspberrypi_fw_get_rate(struct clk_hw *hw,
 					     unsigned long parent_rate)
 {
-	struct raspberrypi_clk_data *data =
-		container_of(hw, struct raspberrypi_clk_data, hw);
+	const struct raspberrypi_clk_data *data = clk_hw_to_data(hw);
 	struct raspberrypi_clk *rpi = data->rpi;
 	u32 val = 0;
 	int ret;
@@ -211,8 +215,7 @@ static unsigned long raspberrypi_fw_get_rate(struct clk_hw *hw,
 static int raspberrypi_fw_set_rate(struct clk_hw *hw, unsigned long rate,
 				   unsigned long parent_rate)
 {
-	struct raspberrypi_clk_data *data =
-		container_of(hw, struct raspberrypi_clk_data, hw);
+	const struct raspberrypi_clk_data *data = clk_hw_to_data(hw);
 	struct raspberrypi_clk *rpi = data->rpi;
 	u32 _rate = rate;
 	int ret;
@@ -229,8 +232,7 @@ static int raspberrypi_fw_set_rate(struct clk_hw *hw, unsigned long rate,
 static int raspberrypi_fw_dumb_determine_rate(struct clk_hw *hw,
 					      struct clk_rate_request *req)
 {
-	struct raspberrypi_clk_data *data =
-		container_of(hw, struct raspberrypi_clk_data, hw);
+	const struct raspberrypi_clk_data *data = clk_hw_to_data(hw);
 	struct raspberrypi_clk_variant *variant = data->variant;
 
 	/*

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 5/5] clk: bcm: rpi: Add disp clock
  2025-01-16 16:24 [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Dave Stevenson
                   ` (3 preceding siblings ...)
  2025-01-16 16:24 ` [PATCH 4/5] clk: bcm: rpi: Create helper to retrieve private data Dave Stevenson
@ 2025-01-16 16:24 ` Dave Stevenson
  2025-01-16 17:45   ` Florian Fainelli
  2025-01-16 21:29   ` Stephen Boyd
  2025-01-16 19:11 ` [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Stefan Wahren
  5 siblings, 2 replies; 18+ messages in thread
From: Dave Stevenson @ 2025-01-16 16:24 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Maxime Ripard

From: Maxime Ripard <mripard@kernel.org>

BCM2712 has an extra clock exposed by the firmware called DISP, and used
by (at least) the HVS. Let's add it to the list of clocks to register in
Linux.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/clk/bcm/clk-raspberrypi.c          | 5 +++++
 include/soc/bcm2835/raspberrypi-firmware.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index b12d86720207..0e1fe3759530 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -34,6 +34,7 @@ static char *rpi_firmware_clk_names[] = {
 	[RPI_FIRMWARE_M2MC_CLK_ID]	= "m2mc",
 	[RPI_FIRMWARE_PIXEL_BVB_CLK_ID]	= "pixel-bvb",
 	[RPI_FIRMWARE_VEC_CLK_ID]	= "vec",
+	[RPI_FIRMWARE_DISP_CLK_ID]	= "disp",
 };
 
 #define RPI_FIRMWARE_STATE_ENABLE_BIT	BIT(0)
@@ -139,6 +140,10 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NUM_CLK_ID] = {
 		.export = true,
 		.minimize = true,
 	},
+	[RPI_FIRMWARE_DISP_CLK_ID] = {
+		.export = true,
+		.minimize = true,
+	},
 };
 
 /*
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
index 73cac8d0287e..e1f87fbfe554 100644
--- a/include/soc/bcm2835/raspberrypi-firmware.h
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
@@ -152,6 +152,7 @@ enum rpi_firmware_clk_id {
 	RPI_FIRMWARE_M2MC_CLK_ID,
 	RPI_FIRMWARE_PIXEL_BVB_CLK_ID,
 	RPI_FIRMWARE_VEC_CLK_ID,
+	RPI_FIRMWARE_DISP_CLK_ID,
 	RPI_FIRMWARE_NUM_CLK_ID,
 };
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/5] clk: bcm: rpi: Add ISP to exported clocks
  2025-01-16 16:24 ` [PATCH 1/5] clk: bcm: rpi: Add ISP to exported clocks Dave Stevenson
@ 2025-01-16 17:44   ` Florian Fainelli
  2025-01-16 21:28   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2025-01-16 17:44 UTC (permalink / raw)
  To: Dave Stevenson, Michael Turquette, Stephen Boyd,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dom Cobley

On 1/16/25 08:24, 'Dave Stevenson' via BCM-KERNEL-FEEDBACK-LIST,PDL wrote:
> From: Dom Cobley <popcornmix@gmail.com>
> 
> The ISP clock can be controlled by the driver, so register it
> with the clock subsystem.
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/5] clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks
  2025-01-16 16:24 ` [PATCH 2/5] clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks Dave Stevenson
@ 2025-01-16 17:44   ` Florian Fainelli
  2025-01-16 21:28   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2025-01-16 17:44 UTC (permalink / raw)
  To: Dave Stevenson, Michael Turquette, Stephen Boyd,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dom Cobley

On 1/16/25 08:24, Dave Stevenson wrote:
> From: Dom Cobley <popcornmix@gmail.com>
> 
> For performance/power it is beneficial to adjust gpu clocks with arm clock.
> This is how the downstream cpufreq driver works
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/5] clk: bcm: rpi: Enable minimize for all firmware clocks
  2025-01-16 16:24 ` [PATCH 3/5] clk: bcm: rpi: Enable minimize for all firmware clocks Dave Stevenson
@ 2025-01-16 17:45   ` Florian Fainelli
  2025-01-16 21:28   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2025-01-16 17:45 UTC (permalink / raw)
  To: Dave Stevenson, Michael Turquette, Stephen Boyd,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dom Cobley

On 1/16/25 08:24, Dave Stevenson wrote:
> From: Dom Cobley <popcornmix@gmail.com>
> 
> There isn't a reason not to minimise the clocks, and it saves
> some power.
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 5/5] clk: bcm: rpi: Add disp clock
  2025-01-16 16:24 ` [PATCH 5/5] clk: bcm: rpi: Add disp clock Dave Stevenson
@ 2025-01-16 17:45   ` Florian Fainelli
  2025-01-16 21:29   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2025-01-16 17:45 UTC (permalink / raw)
  To: Dave Stevenson, Michael Turquette, Stephen Boyd,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Maxime Ripard

On 1/16/25 08:24, Dave Stevenson wrote:
> From: Maxime Ripard <mripard@kernel.org>
> 
> BCM2712 has an extra clock exposed by the firmware called DISP, and used
> by (at least) the HVS. Let's add it to the list of clocks to register in
> Linux.
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/5] clk: bcm: rpi: Create helper to retrieve private data
  2025-01-16 16:24 ` [PATCH 4/5] clk: bcm: rpi: Create helper to retrieve private data Dave Stevenson
@ 2025-01-16 17:45   ` Florian Fainelli
  2025-01-16 21:29   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2025-01-16 17:45 UTC (permalink / raw)
  To: Dave Stevenson, Michael Turquette, Stephen Boyd,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Maxime Ripard

On 1/16/25 08:24, Dave Stevenson wrote:
> From: Maxime Ripard <mripard@kernel.org>
> 
> The RaspberryPi firmware clocks driver uses in several instances a
> container_of to retrieve the struct raspberrypi_clk_data from a pointer
> to struct clk_hw. Let's create a small function to avoid duplicating it
> all over the place.
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712.
  2025-01-16 16:24 [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Dave Stevenson
                   ` (4 preceding siblings ...)
  2025-01-16 16:24 ` [PATCH 5/5] clk: bcm: rpi: Add disp clock Dave Stevenson
@ 2025-01-16 19:11 ` Stefan Wahren
  2025-01-16 19:30   ` Dave Stevenson
  5 siblings, 1 reply; 18+ messages in thread
From: Stefan Wahren @ 2025-01-16 19:11 UTC (permalink / raw)
  To: Dave Stevenson, Michael Turquette, Stephen Boyd, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dom Cobley, Maxime Ripard

Hi Dave,

Am 16.01.25 um 17:24 schrieb Dave Stevenson:
> These patches were Acked by Stephen as patches 30-34 of
> https://lore.kernel.org/all/20241023-drm-vc4-2712-support-v1-0-1cc2d5594907@raspberrypi.com/
> with v2 at
> https://lore.kernel.org/all/20241025-drm-vc4-2712-support-v2-0-35efa83c8fc0@raspberrypi.com/
>
> I'm a newbie on kernel processes and where the patches should be merged.
>
> I'd asked Stephen on the v1 thread as to what needed to happen to get
> them merged, and he asked me to resend the clk patches for the next merge
> window.
> I must confess to it having slipped my mind, but resending them now to
> hopefully be merged in time.
from my understanding, not all of these patches are specific to BCM2712
(Raspberry Pi 5).

Could you please clarify (no need to send a new version)?

Best regards
>
> Thanks.
>    Dave
>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
> Dom Cobley (3):
>        clk: bcm: rpi: Add ISP to exported clocks
>        clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks
>        clk: bcm: rpi: Enable minimize for all firmware clocks
>
> Maxime Ripard (2):
>        clk: bcm: rpi: Create helper to retrieve private data
>        clk: bcm: rpi: Add disp clock
>
>   drivers/clk/bcm/clk-raspberrypi.c          | 33 ++++++++++++++++++++++--------
>   include/soc/bcm2835/raspberrypi-firmware.h |  1 +
>   2 files changed, 25 insertions(+), 9 deletions(-)
> ---
> base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
> change-id: 20250115-bcm2712-clk-updates-98a47f32116d
>
> Best regards,


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712.
  2025-01-16 19:11 ` [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Stefan Wahren
@ 2025-01-16 19:30   ` Dave Stevenson
  0 siblings, 0 replies; 18+ messages in thread
From: Dave Stevenson @ 2025-01-16 19:30 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Michael Turquette, Stephen Boyd, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden,
	linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dom Cobley, Maxime Ripard

Hi Stefan

On Thu, 16 Jan 2025 at 19:11, Stefan Wahren <wahrenst@gmx.net> wrote:
>
> Hi Dave,
>
> Am 16.01.25 um 17:24 schrieb Dave Stevenson:
> > These patches were Acked by Stephen as patches 30-34 of
> > https://lore.kernel.org/all/20241023-drm-vc4-2712-support-v1-0-1cc2d5594907@raspberrypi.com/
> > with v2 at
> > https://lore.kernel.org/all/20241025-drm-vc4-2712-support-v2-0-35efa83c8fc0@raspberrypi.com/
> >
> > I'm a newbie on kernel processes and where the patches should be merged.
> >
> > I'd asked Stephen on the v1 thread as to what needed to happen to get
> > them merged, and he asked me to resend the clk patches for the next merge
> > window.
> > I must confess to it having slipped my mind, but resending them now to
> > hopefully be merged in time.
> from my understanding, not all of these patches are specific to BCM2712
> (Raspberry Pi 5).
>
> Could you please clarify (no need to send a new version)?

You're right that they aren't all specific to 2712.

The patches were all part of the series adding 2712 DRM support, and I
didn't check the details of exactly what was changed in each when
writing this cover letter. Sorry.

  Dave

> Best regards
> >
> > Thanks.
> >    Dave
> >
> > Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> > ---
> > Dom Cobley (3):
> >        clk: bcm: rpi: Add ISP to exported clocks
> >        clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks
> >        clk: bcm: rpi: Enable minimize for all firmware clocks
> >
> > Maxime Ripard (2):
> >        clk: bcm: rpi: Create helper to retrieve private data
> >        clk: bcm: rpi: Add disp clock
> >
> >   drivers/clk/bcm/clk-raspberrypi.c          | 33 ++++++++++++++++++++++--------
> >   include/soc/bcm2835/raspberrypi-firmware.h |  1 +
> >   2 files changed, 25 insertions(+), 9 deletions(-)
> > ---
> > base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
> > change-id: 20250115-bcm2712-clk-updates-98a47f32116d
> >
> > Best regards,
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/5] clk: bcm: rpi: Add ISP to exported clocks
  2025-01-16 16:24 ` [PATCH 1/5] clk: bcm: rpi: Add ISP to exported clocks Dave Stevenson
  2025-01-16 17:44   ` Florian Fainelli
@ 2025-01-16 21:28   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Stephen Boyd @ 2025-01-16 21:28 UTC (permalink / raw)
  To: Broadcom internal kernel review list, Dave Stevenson,
	Florian Fainelli, Michael Turquette, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Dom Cobley

Quoting Dave Stevenson (2025-01-16 08:24:08)
> From: Dom Cobley <popcornmix@gmail.com>
> 
> The ISP clock can be controlled by the driver, so register it
> with the clock subsystem.
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/5] clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks
  2025-01-16 16:24 ` [PATCH 2/5] clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks Dave Stevenson
  2025-01-16 17:44   ` Florian Fainelli
@ 2025-01-16 21:28   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Stephen Boyd @ 2025-01-16 21:28 UTC (permalink / raw)
  To: Broadcom internal kernel review list, Dave Stevenson,
	Florian Fainelli, Michael Turquette, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Dom Cobley

Quoting Dave Stevenson (2025-01-16 08:24:09)
> From: Dom Cobley <popcornmix@gmail.com>
> 
> For performance/power it is beneficial to adjust gpu clocks with arm clock.
> This is how the downstream cpufreq driver works
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/5] clk: bcm: rpi: Enable minimize for all firmware clocks
  2025-01-16 16:24 ` [PATCH 3/5] clk: bcm: rpi: Enable minimize for all firmware clocks Dave Stevenson
  2025-01-16 17:45   ` Florian Fainelli
@ 2025-01-16 21:28   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Stephen Boyd @ 2025-01-16 21:28 UTC (permalink / raw)
  To: Broadcom internal kernel review list, Dave Stevenson,
	Florian Fainelli, Michael Turquette, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Dom Cobley

Quoting Dave Stevenson (2025-01-16 08:24:10)
> From: Dom Cobley <popcornmix@gmail.com>
> 
> There isn't a reason not to minimise the clocks, and it saves
> some power.
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/5] clk: bcm: rpi: Create helper to retrieve private data
  2025-01-16 16:24 ` [PATCH 4/5] clk: bcm: rpi: Create helper to retrieve private data Dave Stevenson
  2025-01-16 17:45   ` Florian Fainelli
@ 2025-01-16 21:29   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Stephen Boyd @ 2025-01-16 21:29 UTC (permalink / raw)
  To: Broadcom internal kernel review list, Dave Stevenson,
	Florian Fainelli, Michael Turquette, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Maxime Ripard

Quoting Dave Stevenson (2025-01-16 08:24:11)
> From: Maxime Ripard <mripard@kernel.org>
> 
> The RaspberryPi firmware clocks driver uses in several instances a
> container_of to retrieve the struct raspberrypi_clk_data from a pointer
> to struct clk_hw. Let's create a small function to avoid duplicating it
> all over the place.
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 5/5] clk: bcm: rpi: Add disp clock
  2025-01-16 16:24 ` [PATCH 5/5] clk: bcm: rpi: Add disp clock Dave Stevenson
  2025-01-16 17:45   ` Florian Fainelli
@ 2025-01-16 21:29   ` Stephen Boyd
  1 sibling, 0 replies; 18+ messages in thread
From: Stephen Boyd @ 2025-01-16 21:29 UTC (permalink / raw)
  To: Broadcom internal kernel review list, Dave Stevenson,
	Florian Fainelli, Michael Turquette, Ray Jui, Scott Branden
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Dave Stevenson, Maxime Ripard

Quoting Dave Stevenson (2025-01-16 08:24:12)
> From: Maxime Ripard <mripard@kernel.org>
> 
> BCM2712 has an extra clock exposed by the firmware called DISP, and used
> by (at least) the HVS. Let's add it to the list of clocks to register in
> Linux.
> 
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-01-16 21:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16 16:24 [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Dave Stevenson
2025-01-16 16:24 ` [PATCH 1/5] clk: bcm: rpi: Add ISP to exported clocks Dave Stevenson
2025-01-16 17:44   ` Florian Fainelli
2025-01-16 21:28   ` Stephen Boyd
2025-01-16 16:24 ` [PATCH 2/5] clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks Dave Stevenson
2025-01-16 17:44   ` Florian Fainelli
2025-01-16 21:28   ` Stephen Boyd
2025-01-16 16:24 ` [PATCH 3/5] clk: bcm: rpi: Enable minimize for all firmware clocks Dave Stevenson
2025-01-16 17:45   ` Florian Fainelli
2025-01-16 21:28   ` Stephen Boyd
2025-01-16 16:24 ` [PATCH 4/5] clk: bcm: rpi: Create helper to retrieve private data Dave Stevenson
2025-01-16 17:45   ` Florian Fainelli
2025-01-16 21:29   ` Stephen Boyd
2025-01-16 16:24 ` [PATCH 5/5] clk: bcm: rpi: Add disp clock Dave Stevenson
2025-01-16 17:45   ` Florian Fainelli
2025-01-16 21:29   ` Stephen Boyd
2025-01-16 19:11 ` [PATCH 0/5] clk: bcm: rpi: Add additional clocks for 2712 Stefan Wahren
2025-01-16 19:30   ` Dave Stevenson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).