diff mbox series

[2/4] media: staging: rkisp1: add rk3288 support

Message ID CAFP0Ok_b0rCws15=Jojj0xFOZjvfT75HRi1PMEO6w5JP+qXbXQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/4] media: staging: phy-rockchip-dphy-rx0: add rk3288 support to DPHY driver | expand

Commit Message

karthik poduval March 31, 2020, 7:53 a.m. UTC
Add rk3288 support to the rkisp1 driver.
ported over from (https://github.com/TinkerBoard/debian_kernel.git)

Reported-by: Karthik Poduval <karthik.poduval@gmail.com>
Signed-off-by: Karthik Poduval <karthik.poduval@gmail.com>
---
 .../bindings/media/rockchip-isp1.yaml          |  1 +
 drivers/staging/media/rkisp1/rkisp1-dev.c      | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

         .data = &rk3399_isp_clk_data,
diff mbox series

Patch

diff --git a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index af246b71eac6..4c31294cf14b 100644
--- a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -16,6 +16,7 @@  description: |
 properties:
   compatible:
     const: rockchip,rk3399-cif-isp
+    const: rockchip,rk3288-rkisp1

   reg:
     maxItems: 1
diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c
b/drivers/staging/media/rkisp1/rkisp1-dev.c
index b1b3c058e957..1df4f5906fd0 100644
--- a/drivers/staging/media/rkisp1/rkisp1-dev.c
+++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
@@ -403,6 +403,20 @@  static irqreturn_t rkisp1_isr(int irq, void *ctx)
     return IRQ_HANDLED;
 }

+
+static const char * const rk3288_isp_clks[] = {
+    "clk_isp",
+    "aclk_isp",
+    "hclk_isp",
+    "pclk_isp_in",
+    "sclk_isp_jpe",
+};
+
+static const struct rkisp1_match_data rk3288_isp_clk_data = {
+    .clks = rk3288_isp_clks,
+    .size = ARRAY_SIZE(rk3288_isp_clks),
+};
+
 static const char * const rk3399_isp_clks[] = {
     "clk_isp",
     "aclk_isp",
@@ -417,6 +431,10 @@  static const struct rkisp1_match_data
rk3399_isp_clk_data = {
 };

 static const struct of_device_id rkisp1_of_match[] = {
+    {
+        .compatible = "rockchip,rk3288-rkisp1",
+        .data = &rk3288_isp_clk_data,
+    },
     {
         .compatible = "rockchip,rk3399-cif-isp",