2022-03-24 07:26:57

by Ivan T. Ivanov

[permalink] [raw]
Subject: [PATCH 0/3] clk-raspberrypi: Add support for few more clocks

These patches inline functionality between driver available
on RaspberryPi repository and mainline.

Dave Stevenson (1):
clk: bcm: rpi: Add the BCM283x pixel clock.

Dom Cobley (2):
clk-raspberrypi: Also support HEVC clock
clk-raspberrypi: Support VEC clock

drivers/clk/bcm/clk-raspberrypi.c | 5 +++++
1 file changed, 5 insertions(+)

--
2.26.2


2022-03-24 20:32:41

by Ivan T. Ivanov

[permalink] [raw]
Subject: [PATCH 2/3] clk-raspberrypi: Support VEC clock

From: Dom Cobley <[email protected]>

Signed-off-by: Dom Cobley <[email protected]>
Signed-off-by: Ivan T. Ivanov <[email protected]>
---
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 9f08baef39ba..240128939d57 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -33,6 +33,7 @@ enum rpi_firmware_clk_id {
RPI_FIRMWARE_EMMC2_CLK_ID,
RPI_FIRMWARE_M2MC_CLK_ID,
RPI_FIRMWARE_PIXEL_BVB_CLK_ID,
+ RPI_FIRMWARE_VEC_CLK_ID,
RPI_FIRMWARE_NUM_CLK_ID,
};

@@ -51,6 +52,7 @@ static char *rpi_firmware_clk_names[] = {
[RPI_FIRMWARE_EMMC2_CLK_ID] = "emmc2",
[RPI_FIRMWARE_M2MC_CLK_ID] = "m2mc",
[RPI_FIRMWARE_PIXEL_BVB_CLK_ID] = "pixel-bvb",
+ [RPI_FIRMWARE_VEC_CLK_ID] = "vec",
};

#define RPI_FIRMWARE_STATE_ENABLE_BIT BIT(0)
@@ -273,6 +275,7 @@ static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,
case RPI_FIRMWARE_V3D_CLK_ID:
case RPI_FIRMWARE_HEVC_CLK_ID:
case RPI_FIRMWARE_PIXEL_BVB_CLK_ID:
+ case RPI_FIRMWARE_VEC_CLK_ID:
hw = raspberrypi_clk_register(rpi, clks->parent,
clks->id);
if (IS_ERR(hw))
--
2.26.2

2022-03-24 23:45:45

by Ivan T. Ivanov

[permalink] [raw]
Subject: [PATCH 3/3] clk: bcm: rpi: Add the BCM283x pixel clock.

From: Dave Stevenson <[email protected]>

The clk-bcm2835 handling of the pixel clock does not function
correctly when the HDMI power domain is disabled.

The firmware supports it correctly, so add it to the
firmware clock driver.

Signed-off-by: Dave Stevenson <[email protected]>
Signed-off-by: Ivan T. Ivanov <[email protected]>
---
drivers/clk/bcm/clk-raspberrypi.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index 240128939d57..658bfcde3616 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -276,6 +276,7 @@ static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,
case RPI_FIRMWARE_HEVC_CLK_ID:
case RPI_FIRMWARE_PIXEL_BVB_CLK_ID:
case RPI_FIRMWARE_VEC_CLK_ID:
+ case RPI_FIRMWARE_PIXEL_CLK_ID:
hw = raspberrypi_clk_register(rpi, clks->parent,
clks->id);
if (IS_ERR(hw))
--
2.26.2

2022-03-25 19:47:15

by Ivan T. Ivanov

[permalink] [raw]
Subject: [PATCH 1/3] clk-raspberrypi: Also support HEVC clock

From: Dom Cobley <[email protected]>

Signed-off-by: Dom Cobley <[email protected]>
Signed-off-by: Ivan T. Ivanov <[email protected]>
---
drivers/clk/bcm/clk-raspberrypi.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index dd3b71eafabf..9f08baef39ba 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -271,6 +271,7 @@ static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,
case RPI_FIRMWARE_CORE_CLK_ID:
case RPI_FIRMWARE_M2MC_CLK_ID:
case RPI_FIRMWARE_V3D_CLK_ID:
+ case RPI_FIRMWARE_HEVC_CLK_ID:
case RPI_FIRMWARE_PIXEL_BVB_CLK_ID:
hw = raspberrypi_clk_register(rpi, clks->parent,
clks->id);
--
2.26.2