Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera01 #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ maintainer-clean : clean
$(RM) $(DTBS)

%.dtbo : %.dts
dtc -Wno-avoid_default_addr_size -Wno-avoid_unnecessary_addr_size \
ifndef KERNEL_PATH
$(error KERNEL_PATH is not set)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need an ifdef for this. Its better to conditionally assign (this won't interfere with make all since the error doesn't get reported unless something tries to expand KERNEL_PATH):

KERNEL_PATH ?= $(error KERNEL_PATH is not set)

However...

C pre-processing looks sensible but we don't have a single kernel tree to point KERNEL_PATH at. I know dt-update is currently only populated with examples from Dragonboard family... but we don't want things to stay that way.

I think its relatively easily solved by an approach based on target specific variables such as:

DB410C_KERNEL_PATH ?= $(error DB410C_KERNEL_PATH is not set)
DB410C_DTBS = $(wildcard scripts/db410/overlays/*dts
db410c_dtbs : KERNEL_PATH = $(DB410_KERNEL_PATH)

HIKEY620_KERNEL_PATH ?= $(error HIKEY620_KERNEL_PATH is not set)
HIKEY620_DTBS = $(wildcard scripts/hikey620/overlays/*dts
hikey620_dtbs : KERNEL_PATH = $(HIKEY620_KERNEL_PATH)

dtbs : db410c_dtbs hikey620_dtbs

I don't mind if both DB410C and DB820C share a DRAGONBOARD_KERNEL_PATH (since you have a unified kernel) but I'd like to leave space for other boards to be added.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Daniel,

Thank you for review. I'll create a new pull request with these suggestions implemented.

else
$(CC) -E -nostdinc -I$(KERNEL_PATH)/include/ -x assembler-with-cpp $< | \
$(KERNEL_PATH)/scripts/dtc/dtc -Wno-avoid_default_addr_size \
-Wno-reg_format -Wno-unit_address_vs_reg -Odtb\
-o $@ \
-@ $<
-@
endif
37 changes: 0 additions & 37 deletions scripts/db410c/enable-d3-mezzanine.sh

This file was deleted.

32 changes: 0 additions & 32 deletions scripts/db410c/enable-ov5645.sh

This file was deleted.

Binary file removed scripts/db410c/overlays/db410c-d3-mezzanine.dtbo
Binary file not shown.
34 changes: 0 additions & 34 deletions scripts/db410c/overlays/db410c-d3-mezzanine.dts

This file was deleted.

Binary file not shown.
93 changes: 93 additions & 0 deletions scripts/db410c/overlays/db410c-d3-rear-ov5640.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/clock/qcom,gcc-msm8916.h>
#include <dt-bindings/gpio/gpio.h>

/ {
compatible = "qcom,msm8916";

fragment@0 {
target-path = "/soc";
__overlay__ {
camera_rear_vdddo: fixedregulator_camera_rear@0 {
compatible = "regulator-fixed";
regulator-name = "camera_rear_vdddo";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

camera_rear_vdda: fixedregulator_camera_rear@1 {
compatible = "regulator-fixed";
regulator-name = "camera_rear_vdda";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-always-on;
};

camera_rear_vddd: fixedregulator_camera_rear@2 {
compatible = "regulator-fixed";
regulator-name = "camera_rear_vddd";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
regulator-always-on;
};
};
};

fragment@1 {
target-path = "/soc/cci@1b0c000";
__overlay__ {
status = "ok";

camera_rear@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;

powerdown-gpios = <&msmgpio 34 GPIO_ACTIVE_HIGH>;
reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&camera_rear_default>;

clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
clock-names = "xclk";

DOVDD-supply = <&camera_rear_vdddo>;
AVDD-supply = <&camera_rear_vdda>;
DVDD-supply = <&camera_rear_vddd>;

status = "ok";

port {
camera_rear_ep: endpoint {
clock-lanes = <0>;
data-lanes = <1 2>;
remote-endpoint = <&csiphy0_ep>;
};
};
};
};
};

fragment@2 {
target-path = "/soc/camss@1b00000";
__overlay__ {
status = "ok";

ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
csiphy0_ep: endpoint {
clock-lanes = <1>;
data-lanes = <0 2>;
remote-endpoint = <&camera_rear_ep>;
status = "ok";
};
};
};
};
};
};
Binary file removed scripts/db410c/overlays/db410c-ov5645.dtbo
Binary file not shown.
29 changes: 0 additions & 29 deletions scripts/db410c/overlays/db410c-ov5645.dts

This file was deleted.

Binary file not shown.
94 changes: 94 additions & 0 deletions scripts/db410c/overlays/db410c-stm32-front-ov5645.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/clock/qcom,gcc-msm8916.h>
#include <dt-bindings/gpio/gpio.h>

/ {
compatible = "qcom,msm8916";

fragment@0 {
target-path = "/soc";
__overlay__ {
camera_front_vdddo: fixedregulator_camera_front@0 {
compatible = "regulator-fixed";
regulator-name = "camera_front_vdddo";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

camera_front_vdda: fixedregulator_camera_front@1 {
compatible = "regulator-fixed";
regulator-name = "camera_front_vdda";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-always-on;
};

camera_front_vddd: fixedregulator_camera_front@2 {
compatible = "regulator-fixed";
regulator-name = "camera_front_vddd";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
regulator-always-on;
};
};
};

fragment@1 {
target-path = "/soc/cci@1b0c000";
__overlay__ {
status = "ok";

camera_front@3a {
compatible = "ovti,ov5645";
reg = <0x3a>;

enable-gpios = <&msmgpio 33 GPIO_ACTIVE_HIGH>;
reset-gpios = <&msmgpio 28 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&camera_front_default>;

clocks = <&gcc GCC_CAMSS_MCLK1_CLK>;
clock-names = "xclk";
clock-frequency = <23880000>;

vdddo-supply = <&camera_front_vdddo>;
vdda-supply = <&camera_front_vdda>;
vddd-supply = <&camera_front_vddd>;

status = "ok";

port {
camera_front_ep: endpoint {
clock-lanes = <1>;
data-lanes = <0 2>;
remote-endpoint = <&csiphy1_ep>;
};
};
};
};
};

fragment@2 {
target-path = "/soc/camss@1b00000";
__overlay__ {
status = "ok";

ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
csiphy1_ep: endpoint {
clock-lanes = <1>;
data-lanes = <0 2>;
remote-endpoint = <&camera_front_ep>;
status = "ok";
};
};
};
};
};
};
Binary file not shown.
Loading