Skip to content

Commit

Permalink
Merge pull request #139 from Ken-Vamrs/main
Browse files Browse the repository at this point in the history
rock 3b: update camera and display configuration
  • Loading branch information
RadxaYuntian authored Aug 3, 2023
2 parents dfadcfa + d25bb63 commit 59921e6
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 11 deletions.
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ dtb-$(CONFIG_CLK_RK3568) += \
rock-3a-sata1.dtbo \
rock-3a-sata2.dtbo \
rock-3ab-okdo-5mp-camera.dtbo \
rock-3ab-radxa-5inch-touchscreen.dtbo \
rock-3ab-raspberrypi-7inch-touchscreen.dtbo \
rock-3ab-rpi-camera-v1p3-ov5647.dtbo \
rock-3ab-rpi-camera-v2-imx219.dtbo \
rock-3b-enable-hdmicec.dtbo \
rock-3b-hdmi-and-sharp-lq133t1jw01-edp-lcd.dtbo \
rock-3b-radxa-5inch-touchscreen.dtbo \
rock-3c-okdo-5mp-camera.dtbo \
rock-3c-radxa-5inch-touchscreen.dtbo \
rock-3c-raspberrypi-7inch-touchscreen.dtbo \
Expand Down
164 changes: 163 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rock-3ab-okdo-5mp-camera.dts
Original file line number Diff line number Diff line change
@@ -1,13 +1,175 @@
/dts-v1/;
/plugin/;

#include "rock-3-ov5647.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>

/ {
metadata {
title = "Enable OKdo 5MP Camera";
compatible = "radxa,rock-3a", "radxa,rock-3b";
category = "camera";
exclusive = "csi2_dphy0";
description = "Enable OKdo 5MP Camera.";
};

fragment@0 {
target-path = "/";

__overlay__ {
clk_cam_25m: external-camera-clock-25m {
status = "okay";
compatible = "fixed-clock";
clock-frequency = <25000000>;
clock-output-names = "clk_cam_25m";
#clock-cells = <0>;
};

vcc_camera: vcc-camera {
status = "okay";
compatible = "regulator-fixed";
regulator-name = "vcc_camera";
gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
};
};
};

fragment@1 {
target = <&i2c5>;

__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c5m0_xfer>;
#address-cells = <1>;
#size-cells = <0>;

ov5647: ov5647@36 {
status = "okay";
compatible = "ovti,ov5647";
reg = <0x36>;
clocks = <&clk_cam_25m>;
pwdn-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_LOW>;
clock-names = "ext_cam_clk";
rockchip,camera-module-index = <0>;
rockchip,camera-module-facing = "back";
rockchip,camera-module-name = "OKDO-5MP";
rockchip,camera-module-lens-name = "default";

port {
ucam_out0: endpoint {
remote-endpoint = <&mipi_in_ucam0>;
data-lanes = <1 2>;
};
};
};
};
};

fragment@2 {
target = <&csi2_dphy_hw>;

__overlay__ {
status = "okay";
};
};

fragment@3 {
target = <&csi2_dphy0>;

__overlay__ {
status = "okay";

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;

mipi_in_ucam0: endpoint@1 {
reg = <1>;
remote-endpoint = <&ucam_out0>;
data-lanes = <1 2>;
};
};

port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;

dphy0_out: endpoint@1 {
reg = <1>;
remote-endpoint = <&isp0_in>;
};
};
};
};
};

fragment@4 {
target = <&rkisp_vir0>;

__overlay__ {
status = "okay";

port {
#address-cells = <1>;
#size-cells = <0>;

isp0_in: endpoint@0 {
reg = <0>;
remote-endpoint = <&dphy0_out>;
};
};
};
};

fragment@5 {
target = <&rkisp_vir0>;

__overlay__ {
status = "okay";
};
};

fragment@6 {
target = <&rkisp>;

__overlay__ {
status = "okay";
};
};

fragment@7 {
target = <&rkisp_mmu>;

__overlay__ {
status = "okay";
};
};

fragment@8 {
target = <&rkcif_mmu>;

__overlay__ {
status = "okay";
};
};

fragment@9 {
target = <&rkcif>;

__overlay__ {
status = "okay";
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@
pinctrl-0 = <&touch_gpio>;
focaltech,irq-gpio = <&gpio3 RK_PC4 IRQ_TYPE_LEVEL_LOW>;
focaltech,reset-gpio = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
focaltech,max-touch-number = <5>;
focaltech,display-coords = <0 0 800 1280>;
};
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/ {
metadata {
title = "Enable Radxa 5-inch Touchscreen";
compatible = "radxa,rock-3a", "radxa,rock-3b";
compatible = "radxa,rock-3b";
category = "display";
exclusive = "dsi1";
description = "Enable Radxa 5-inch Touchscreen.";
Expand All @@ -27,11 +27,6 @@
enable-active-high;
regulator-always-on;
gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc3v3_sys>;

regulator-state-mem {
regulator-off-in-suspend;
};
};
};
};
Expand All @@ -41,12 +36,11 @@

__overlay__ {
status = "okay";
power-supply = <&vcc_mipi>;
#address-cells = <1>;
#size-cells = <0>;

dsi1_panel: dsi-panel@0 {
compatible = "rockpi,tc358762";
compatible = "raspits,tc358762";
reg = <0x0>;
status = "okay";

Expand Down Expand Up @@ -134,4 +128,4 @@
status = "okay";
};
};
};
};

0 comments on commit 59921e6

Please sign in to comment.