Skip to contentSkip to conversation

move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399

PATCH Applied Helen Koike 3 participants 14 messages Oct 20, 2020 – Nov 30, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v6 cover move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399

Move the bindings out of drivers/staging and place them in Documentation/devicetree/bindings instead.

Also, add DT nodes for RK3399 and verify with make ARCH=arm64 dtbs_check and make ARCH=arm64 dt_binding_check.

Tested by verifying images streamed from Scarlet Chromebook

Changes in v6:
- [PATCH v6 5/9] media: staging: rkisp1: remove unecessary clocks Define clocks in the top level, and use if/else schema to define how many for each compatible as sugested by Rob Herring on
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/#122626
- [PATCH v6 8/9] arm64: dts: rockchip: add isp0 node for rk3399 Add status = "disabled" in the isp0 node
- Added Reviewed-by tags from Tomasz Figa
- Added Acked-by tags from Rog Herring
- No changes for other patches in the serie.

Changes in v5:
- Drop unit addresses in dt-bindings example for simplification and fix errors as suggested by Rob Herring in previous version
- Fix typos
- Re-write clock organization with if/then schema

Changes in v4:
- simplify clocks with "isp", "aclk" and "hclk" as suggested by Robin Murphy on https://patchwork.kernel.org/patch/11475007/

Changes in v3:
- dropped accepted patches
- cleanup clocks
- fix "no reg" error in dt-bindings parent@0 example
- add linux-rockchip list in MAINTAINERS and reorder items
- add Scarlet sensors dt nodes to the series

Changes in v2:
Add patches modifying bindings, as sugested by Johan Jonker in v1, before moving them out of staging.

Eddie Cai (1):
arm64: dts: rockchip: add isp and sensors for Scarlet

Helen Koike (7):
media: staging: dt-bindings: rkisp1: add missing required nodes
media: staging: dt-bindings: rkisp1: drop i2c unit address
media: staging: dt-bindings: rkisp1: re-order properties
media: staging: dt-bindings: rkisp1: drop parent unit address
media: staging: rkisp1: remove unecessary clocks
dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging
media: MAINTAINERS: rkisp1: add path to dt-bindings

Shunqian Zheng (1):
arm64: dts: rockchip: add isp0 node for rk3399

 .../bindings/media/rockchip-isp1.yaml         | 81 ++++++++++++-------
 MAINTAINERS                                   |  2 +
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3399.dtsi      | 26 ++++++
 drivers/staging/media/rkisp1/rkisp1-dev.c     |  8 +-
 5 files changed, 157 insertions(+), 34 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (81%)
Signature · 1 line
2.28.0
#1 lore raw

PATCH v6 1/9 media: staging: dt-bindings: rkisp1: add missing required nodes

Add missing required nodes in json-schema yaml file for Rockchip ISP1 dt-bindings.

---
 .../devicetree/bindings/media/rockchip-isp1.yaml          | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml +8 -0
index af246b71eac6b..a77b6ec500c95 100644
@@ -94,11 +94,19 @@ properties:
 
               remote-endpoint: true
 
+        required:
+          - reg
+          - "#address-cells"
+          - "#size-cells"
+
     required:
+      - "#address-cells"
+      - "#size-cells"
       - port@0
 
 required:
   - compatible
+  - reg
   - interrupts
   - clocks
   - clock-names
Signature · 1 line
2.28.0
#2 lore raw

PATCH v6 2/9 media: staging: dt-bindings: rkisp1: drop i2c unit address

In reply to Helen Koike

Add missing required items in Rockchip ISP1 dt-bindings example for
a complete i2c node.
Drop unit address to Fix error:
/example-0/parent/i2c@ff160000: node has a unit name, but no reg or ranges property Remove unecessary fields for the example.

---
 .../Documentation/devicetree/bindings/media/rockchip-isp1.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml +1 -2
index a77b6ec500c95..4c31cfaee2709 100644
@@ -168,8 +168,7 @@ examples:
             };
         };
 
-        i2c7: i2c@ff160000 {
-            clock-frequency = <400000>;
+        i2c7: i2c {
             #address-cells = <1>;
             #size-cells = <0>;
 
Signature · 1 line
2.28.0
#3 lore raw

PATCH v6 3/9 media: staging: dt-bindings: rkisp1: re-order properties

In reply to Helen Koike

Organize properties order in dt-bindings to move it out of staging.

On top: compatible, reg and interrupts.
Then alphabetical order, then properties starting with '#'.

---
 .../bindings/media/rockchip-isp1.yaml         | 32 +++++++++----------
 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml +16 -16
index 4c31cfaee2709..79ebacab83cf3 100644
@@ -23,19 +23,6 @@ properties:
   interrupts:
     maxItems: 1
 
-  iommus:
-    maxItems: 1
-
-  power-domains:
-    maxItems: 1
-
-  phys:
-    maxItems: 1
-    description: phandle for the PHY port
-
-  phy-names:
-    const: dphy
-
   clocks:
     items:
       - description: ISP clock
@@ -52,6 +39,19 @@ properties:
       - const: hclk_isp
       - const: hclk_isp_wrap
 
+  iommus:
+    maxItems: 1
+
+  phys:
+    maxItems: 1
+    description: phandle for the PHY port
+
+  phy-names:
+    const: dphy
+
+  power-domains:
+    maxItems: 1
+
   # See ./video-interfaces.txt for details
   ports:
     type: object
@@ -110,10 +110,10 @@ required:
   - interrupts
   - clocks
   - clock-names
-  - power-domains
   - iommus
   - phys
   - phy-names
+  - power-domains
   - ports
 
 additionalProperties: false
@@ -139,19 +139,19 @@ examples:
             clock-names = "clk_isp",
                           "aclk_isp", "aclk_isp_wrap",
                           "hclk_isp", "hclk_isp_wrap";
-            power-domains = <&power RK3399_PD_ISP0>;
             iommus = <&isp0_mmu>;
             phys = <&dphy>;
             phy-names = "dphy";
+            power-domains = <&power RK3399_PD_ISP0>;
 
             ports {
                 #address-cells = <1>;
                 #size-cells = <0>;
 
                 port@0 {
+                    reg = <0>;
                     #address-cells = <1>;
                     #size-cells = <0>;
-                    reg = <0>;
 
                     mipi_in_wcam: endpoint@0 {
                         reg = <0>;
Signature · 1 line
2.28.0
#4 lore raw

PATCH v6 4/9 media: staging: dt-bindings: rkisp1: drop parent unit address

In reply to Helen Koike

Fix the following error found with make ARCH=arm64 dt_binding_check:

Documentation/devicetree/bindings/media/rockchip-isp1.example.dts:24.27-101.11:
Warning (unit_address_vs_reg): /example-0/parent@0: node has a unit name, but no reg or ranges property

---
 .../Documentation/devicetree/bindings/media/rockchip-isp1.yaml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml +1 -1
index 79ebacab83cf3..62a6b9c959498 100644
@@ -125,7 +125,7 @@ examples:
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/power/rk3399-power.h>
 
-    parent0: parent@0 {
+    parent0: parent {
         #address-cells = <2>;
         #size-cells = <2>;
 
Signature · 1 line
2.28.0
#5 lore raw

PATCH v6 5/9 media: staging: rkisp1: remove unecessary clocks

In reply to Helen Koike

aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of hclk_isp, thus we can remove parents from the list.

Also, for the isp0, we only need the ISP clock, ACLK and HCLK. In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG clock for RK3288.

So with the goal to cleanup the dt-bindings and remove it from staging, simplify clock names to isp, aclk and hclk.

Assigned clocks are meant to refer to the full path in the clock tree, i.e. the leaf in the tree.
For instance, in RK3399, the clock responsible for ACLK (ISP AXI CLOCK) is aclk_isp0_wrapper.

For reference, this is the isp clock topology on RK3399:

xin24m
pll_npll
npll
clk_isp1
clk_isp0
pll_cpll
cpll
aclk_isp1
aclk_isp1_noc
hclk_isp1
aclk_isp1_wrapper
hclk_isp1_noc
aclk_isp0
hclk_isp1_wrapper
aclk_isp0_wrapper
aclk_isp0_noc
hclk_isp0
hclk_isp0_wrapper
hclk_isp0_noc
pclkin_isp1_wrapper

---

Changes in V6:
- Define clocks in the top level, and use if/else schema to define how many for each compatible as sugested by Rob Herring on
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/#122626

---
 .../bindings/media/rockchip-isp1.yaml         | 44 +++++++++++++------
 drivers/staging/media/rkisp1/rkisp1-dev.c     |  8 ++--
 2 files changed, 33 insertions(+), 19 deletions(-)
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml +30 -14
index 62a6b9c959498..2004c054ed1a0 100644
@@ -24,20 +24,24 @@ properties:
     maxItems: 1
 
   clocks:
+    minItems: 3
     items:
+      # isp0 and isp1
       - description: ISP clock
-      - description: ISP AXI clock clock
-      - description: ISP AXI clock  wrapper clock
-      - description: ISP AHB clock clock
-      - description: ISP AHB wrapper clock
+      - description: ISP AXI clock
+      - description: ISP AHB clock
+      # only for isp1
+      - description: ISP Pixel clock
 
   clock-names:
+    minItems: 3
     items:
-      - const: clk_isp
-      - const: aclk_isp
-      - const: aclk_isp_wrap
-      - const: hclk_isp
-      - const: hclk_isp_wrap
+      # isp0 and isp1
+      - const: isp
+      - const: aclk
+      - const: hclk
+      # only for isp1
+      - const: pclk_isp
 
   iommus:
     maxItems: 1
@@ -116,6 +120,20 @@ required:
   - power-domains
   - ports
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: rockchip,rk3399-cif-isp
+then:
+  properties:
+    clocks:
+      minItems: 3
+      maxItems: 4
+    clock-names:
+      minItems: 3
+      maxItems: 4
+
 additionalProperties: false
 
 examples:
@@ -134,11 +152,9 @@ examples:
             reg = <0x0 0xff910000 0x0 0x4000>;
             interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
             clocks = <&cru SCLK_ISP0>,
-                     <&cru ACLK_ISP0>, <&cru ACLK_ISP0_WRAPPER>,
-                     <&cru HCLK_ISP0>, <&cru HCLK_ISP0_WRAPPER>;
-            clock-names = "clk_isp",
-                          "aclk_isp", "aclk_isp_wrap",
-                          "hclk_isp", "hclk_isp_wrap";
+                     <&cru ACLK_ISP0_WRAPPER>,
+                     <&cru HCLK_ISP0_WRAPPER>;
+            clock-names = "isp", "aclk", "hclk";
             iommus = <&isp0_mmu>;
             phys = <&dphy>;
             phy-names = "dphy";
drivers/staging/media/rkisp1/rkisp1-dev.c +3 -5
index 91584695804bb..90d6543465562 100644
@@ -405,11 +405,9 @@ static irqreturn_t rkisp1_isr(int irq, void *ctx)
 }
 
 static const char * const rk3399_isp_clks[] = {
-	"clk_isp",
-	"aclk_isp",
-	"hclk_isp",
-	"aclk_isp_wrap",
-	"hclk_isp_wrap",
+	"isp",
+	"aclk",
+	"hclk",
 };
 
 static const struct rkisp1_match_data rk3399_isp_clk_data = {
Signature · 1 line
2.28.0
Reviewed-by on v6 5/9
#6 lore raw

Re: [PATCH v6 5/9] media: staging: rkisp1: remove unecessary clocks

Quoted 44 lines · Helen Koike

aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of hclk_isp, thus we can remove parents from the list.

Also, for the isp0, we only need the ISP clock, ACLK and HCLK. In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG clock for RK3288.

So with the goal to cleanup the dt-bindings and remove it from staging, simplify clock names to isp, aclk and hclk.

Assigned clocks are meant to refer to the full path in the clock tree, i.e. the leaf in the tree.
For instance, in RK3399, the clock responsible for ACLK (ISP AXI CLOCK) is aclk_isp0_wrapper.

For reference, this is the isp clock topology on RK3399:

xin24m
pll_npll
npll
clk_isp1
clk_isp0
pll_cpll
cpll
aclk_isp1
aclk_isp1_noc
hclk_isp1
aclk_isp1_wrapper
hclk_isp1_noc
aclk_isp0
hclk_isp1_wrapper
aclk_isp0_wrapper
aclk_isp0_noc
hclk_isp0
hclk_isp0_wrapper
hclk_isp0_noc
pclkin_isp1_wrapper

---

Quoted 8 lines

Changes in V6:
- Define clocks in the top level, and use if/else schema to define how many for each compatible as sugested by Rob Herring on
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/#122626

---
 .../bindings/media/rockchip-isp1.yaml         | 44 +++++++++++++------
 drivers/staging/media/rkisp1/rkisp1-dev.c     |  8 ++--
 2 files changed, 33 insertions(+), 19 deletions(-)
#7 lore raw

PATCH v6 6/9 dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

In reply to Helen Koike

Move rkisp1 bindings to Documentation/devicetree/bindings/media

Verified with:
make ARCH=arm64 dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

---
 .../devicetree/bindings/media/rockchip-isp1.yaml                  | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (100%)
Documentation/devicetree/bindings/media/rockchip-isp1.yaml renamed from drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml +0 -0
similarity index 100%
rename from drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
rename to Documentation/devicetree/bindings/media/rockchip-isp1.yaml
Signature · 1 line
2.28.0
#8 lore raw

PATCH v6 7/9 media: MAINTAINERS: rkisp1: add path to dt-bindings

In reply to Helen Koike

The Rockchip ISP bindings was moved out of staging. Update MAINTAINERS file with the new path.

Fields sorted according to output of ./scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS --order

---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
index 7a12633747c80..df679b3626b9a 100644
@@ -14889,8 +14889,10 @@ ROCKCHIP ISP V1 DRIVER
 M:	Helen Koike <[email protected]>
 M:	Dafna Hirschfeld <[email protected]>
 L:	[email protected]
+L:	[email protected]
 S:	Maintained
 F:	Documentation/admin-guide/media/rkisp1.rst
+F:	Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 F:	Documentation/userspace-api/media/v4l/pixfmt-meta-rkisp1.rst
 F:	drivers/staging/media/rkisp1/
 
Signature · 1 line
2.28.0
#9 lore raw

PATCH v6 8/9 arm64: dts: rockchip: add isp0 node for rk3399

In reply to Helen Koike

From: Shunqian Zheng <[email protected]>

RK3399 has two ISPs, but only isp0 was tested. Add isp0 node in rk3399 dtsi

Verified with:
make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

---

Changes in v6:
- Add status = "disabled" in the isp0 node

---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 26 ++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +26 -0
index ada724b12f014..af5f8e2c5e64d 100644
@@ -1723,6 +1723,32 @@ vopb_mmu: iommu@ff903f00 {
 		status = "disabled";
 	};
 
+	isp0: isp0@ff910000 {
+		compatible = "rockchip,rk3399-cif-isp";
+		reg = <0x0 0xff910000 0x0 0x4000>;
+		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_ISP0>,
+			 <&cru ACLK_ISP0_WRAPPER>,
+			 <&cru HCLK_ISP0_WRAPPER>;
+		clock-names = "isp", "aclk", "hclk";
+		iommus = <&isp0_mmu>;
+		phys = <&mipi_dphy_rx0>;
+		phy-names = "dphy";
+		power-domains = <&power RK3399_PD_ISP0>;
+		status = "disabled";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+			};
+		};
+	};
+
 	isp0_mmu: iommu@ff914000 {
 		compatible = "rockchip,iommu";
 		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
Signature · 7 lines
2.28.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
maintainer
#10 lore raw

Re: [PATCH v6 8/9] arm64: dts: rockchip: add isp0 node for rk3399

Am Dienstag, 20. Oktober 2020, 21:38:49 CET schrieb Helen Koike:

Quoted 11 lines

From: Shunqian Zheng <[email protected]>

RK3399 has two ISPs, but only isp0 was tested. Add isp0 node in rk3399 dtsi

Verified with:
make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

looks good, and I'd like to apply this one after the drivers/media-patches of this series got applied.

Thanks
Heiko

Quoted 47 lines

---

Changes in v6:
- Add status = "disabled" in the isp0 node

---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 26 ++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +26 -0
index ada724b12f014..af5f8e2c5e64d 100644
@@ -1723,6 +1723,32 @@ vopb_mmu: iommu@ff903f00 {
 		status = "disabled";
 	};
 
+	isp0: isp0@ff910000 {
+		compatible = "rockchip,rk3399-cif-isp";
+		reg = <0x0 0xff910000 0x0 0x4000>;
+		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_ISP0>,
+			 <&cru ACLK_ISP0_WRAPPER>,
+			 <&cru HCLK_ISP0_WRAPPER>;
+		clock-names = "isp", "aclk", "hclk";
+		iommus = <&isp0_mmu>;
+		phys = <&mipi_dphy_rx0>;
+		phy-names = "dphy";
+		power-domains = <&power RK3399_PD_ISP0>;
+		status = "disabled";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+			};
+		};
+	};
+
 	isp0_mmu: iommu@ff914000 {
 		compatible = "rockchip,iommu";
 		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
#11 lore raw

PATCH v6 9/9 arm64: dts: rockchip: add isp and sensors for Scarlet

In reply to Helen Koike

From: Eddie Cai <[email protected]>

Enable ISP and camera sensor ov2685 and ov5695 for Scarlet Chromebook

Verified with:
make ARCH=arm64 dtbs_check

---
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi +74 -0
index 60cd1c18cd4e0..beee5fbb34437 100644
@@ -296,6 +296,52 @@ camera: &i2c7 {
 
 	/* 24M mclk is shared between world and user cameras */
 	pinctrl-0 = <&i2c7_xfer &test_clkout1>;
+
+	/* Rear-facing camera */
+	wcam: camera@36 {
+		compatible = "ovti,ov5695";
+		reg = <0x36>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&wcam_rst>;
+
+		clocks = <&cru SCLK_TESTCLKOUT1>;
+		clock-names = "xvclk";
+
+		avdd-supply = <&pp2800_cam>;
+		dvdd-supply = <&pp1250_cam>;
+		dovdd-supply = <&pp1800_s0>;
+		reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
+
+		port {
+			wcam_out: endpoint {
+				remote-endpoint = <&mipi_in_wcam>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+
+	/* Front-facing camera */
+	ucam: camera@3c {
+		compatible = "ovti,ov2685";
+		reg = <0x3c>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ucam_rst>;
+
+		clocks = <&cru SCLK_TESTCLKOUT1>;
+		clock-names = "xvclk";
+
+		avdd-supply = <&pp2800_cam>;
+		dovdd-supply = <&pp1800_s0>;
+		dvdd-supply = <&pp1800_s0>;
+		reset-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+
+		port {
+			ucam_out: endpoint {
+				remote-endpoint = <&mipi_in_ucam>;
+				data-lanes = <1>;
+			};
+		};
+	};
 };
 
 &cdn_dp {
@@ -353,10 +399,38 @@ &io_domains {
 	gpio1830-supply = <&pp1800_s0>;		/* APIO4_VDD;  4c 4d */
 };
 
+&isp0 {
+	status = "okay";
+
+	ports {
+		port@0 {
+			mipi_in_wcam: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&wcam_out>;
+				data-lanes = <1 2>;
+			};
+
+			mipi_in_ucam: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&ucam_out>;
+				data-lanes = <1>;
+			};
+		};
+	};
+};
+
+&isp0_mmu {
+	status = "okay";
+};
+
 &max98357a {
 	sdmode-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
 };
 
+&mipi_dphy_rx0 {
+	status = "okay";
+};
+
 &mipi_dsi {
 	status = "okay";
 	clock-master;
Signature · 1 line
2.28.0
maintainer
#12 lore raw

Re: [PATCH v6 9/9] arm64: dts: rockchip: add isp and sensors for Scarlet

Am Dienstag, 20. Oktober 2020, 21:38:50 CET schrieb Helen Koike:

Quoted 4 lines

From: Eddie Cai <[email protected]>

Enable ISP and camera sensor ov2685 and ov5695 for Scarlet Chromebook

Quoted 8 lines

Verified with:
make ARCH=arm64 dtbs_check

looks good, and I'd like to apply this one after the drivers/media-patches of this series got applied.

Thanks
Heiko

Quoted 101 lines
---
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi +74 -0
index 60cd1c18cd4e0..beee5fbb34437 100644
@@ -296,6 +296,52 @@ camera: &i2c7 {
 
 	/* 24M mclk is shared between world and user cameras */
 	pinctrl-0 = <&i2c7_xfer &test_clkout1>;
+
+	/* Rear-facing camera */
+	wcam: camera@36 {
+		compatible = "ovti,ov5695";
+		reg = <0x36>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&wcam_rst>;
+
+		clocks = <&cru SCLK_TESTCLKOUT1>;
+		clock-names = "xvclk";
+
+		avdd-supply = <&pp2800_cam>;
+		dvdd-supply = <&pp1250_cam>;
+		dovdd-supply = <&pp1800_s0>;
+		reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
+
+		port {
+			wcam_out: endpoint {
+				remote-endpoint = <&mipi_in_wcam>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+
+	/* Front-facing camera */
+	ucam: camera@3c {
+		compatible = "ovti,ov2685";
+		reg = <0x3c>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ucam_rst>;
+
+		clocks = <&cru SCLK_TESTCLKOUT1>;
+		clock-names = "xvclk";
+
+		avdd-supply = <&pp2800_cam>;
+		dovdd-supply = <&pp1800_s0>;
+		dvdd-supply = <&pp1800_s0>;
+		reset-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+
+		port {
+			ucam_out: endpoint {
+				remote-endpoint = <&mipi_in_ucam>;
+				data-lanes = <1>;
+			};
+		};
+	};
 };
 
 &cdn_dp {
@@ -353,10 +399,38 @@ &io_domains {
 	gpio1830-supply = <&pp1800_s0>;		/* APIO4_VDD;  4c 4d */
 };
 
+&isp0 {
+	status = "okay";
+
+	ports {
+		port@0 {
+			mipi_in_wcam: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&wcam_out>;
+				data-lanes = <1 2>;
+			};
+
+			mipi_in_ucam: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&ucam_out>;
+				data-lanes = <1>;
+			};
+		};
+	};
+};
+
+&isp0_mmu {
+	status = "okay";
+};
+
 &max98357a {
 	sdmode-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
 };
 
+&mipi_dphy_rx0 {
+	status = "okay";
+};
+
 &mipi_dsi {
 	status = "okay";
 	clock-master;
maintainer Applied
#13 lore raw

Re: (subset) [PATCH v6 0/9] move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399

In reply to Helen Koike
Quoted 9 lines · Helen Koike

Move the bindings out of drivers/staging and place them in Documentation/devicetree/bindings instead.

Also, add DT nodes for RK3399 and verify with make ARCH=arm64 dtbs_check and make ARCH=arm64 dt_binding_check.

Tested by verifying images streamed from Scarlet Chromebook

[...]

Applied, thanks!

[8/9] arm64: dts: rockchip: add isp0 node for rk3399

      commit: 97a0115cd96a173369ef30eee2290184921b3f24
[9/9] arm64: dts: rockchip: add isp and sensors for Scarlet
      commit: ef098edc9c245dd1c150001e22c78e6a3ffd7ff8

Best regards,

Signature · 6 lines
Heiko Stuebner <[email protected]>

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip