Skip to content
Closed
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
122 changes: 121 additions & 1 deletion arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,98 @@
};
};

&camss {
vdda-supply = <&pm8937_l2>;
status = "okay";

ports {
port@0 {
reg = <0>;

csiphy0_ep: endpoint {
clock-lanes = <7>;
data-lanes = <0 1 2 3>;
remote-endpoint = <&rear_cam_ep>;
};
};

port@1 {
reg = <1>;

csiphy1_ep: endpoint {
clock-lanes = <7>;
data-lanes = <0 1>;
remote-endpoint = <&front_cam_ep>;
};
};
};
};

&cci {
pinctrl-names = "default";
pinctrl-0 = <&cci0_default>;

status = "okay";
};

&cci_i2c0 {
camera-sensor@10 {
compatible = "samsung,s5k3l8";

reg = <0x10>;

clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
clock-frequency = <24000000>;

pinctrl-0 = <&cam_sensor_rear_default>, <&camss_mclk0_default>;
pinctrl-names = "default";

reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;

avdd-supply= <&pm8937_l22>;
dvdd-supply = <&pm8937_l23>;
vio-supply = <&pm8937_l6>;
aux-supply = <&pm8937_l17>;

orientation = <1>;
rotation = <90>;

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

camera-sensor@36 {
compatible = "ovti,ov5670";

reg = <0x36>;

clocks = <&gcc GCC_CAMSS_MCLK2_CLK>;

pinctrl-0 = <&cam_sensor_front_default>, <&camss_mclk2_default>;
pinctrl-names = "default";

reset-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;

avdd-supply= <&pm8937_l22>;
dvdd-supply = <&pm8937_l23>;
dovdd-supply = <&pm8937_l6>;
orientation = <0>;
rotation = <270>;

port {
front_cam_ep: endpoint {
data-lanes = <0 1>;
remote-endpoint = <&csiphy1_ep>;
link-frequencies = /bits/ 64 <450000000>;
};
};
};
};

&gpu {
status = "okay";
};
Expand Down Expand Up @@ -259,6 +351,21 @@
status = "okay";
};

&pmi8950_flash {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

led@0 {
reg = <0>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-max-microamp = <100000>;
flash-max-microamp = <595000>;
flash-max-timeout-us = <1280000>;
};
};

&pmi8950_smbcharger {
monitored-battery = <&battery>;
status = "okay";
Expand Down Expand Up @@ -317,7 +424,6 @@
pm8937_l6: l6 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

pm8937_l7: l7 {
Expand Down Expand Up @@ -451,6 +557,20 @@
&tlmm {
gpio-reserved-ranges = <0 4>, <20 4>;

cam_sensor_front_default: cam-sensor-front-default-state {
pins = "gpio39", "gpio40";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

cam_sensor_rear_default: cam-sensor-rear-default-state {
pins = "gpio35", "gpio36";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

gpio_keys_default: gpio-keys-default-state {
pins = "gpio91";
function = "gpio";
Expand Down
89 changes: 88 additions & 1 deletion arch/arm64/boot/dts/qcom/msm8937-xiaomi-prada.dts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
pinctrl-0 = <&tsp_int_rst_default>;
pinctrl-names = "default";

linux,keycodes = <KEY_APPSELECT KEY_HOME KEY_BACK>;
linux,keycodes = <KEY_BACK KEY_MENU KEY_CONTEXT_MENU>;
};
};

Expand Down Expand Up @@ -555,6 +555,34 @@
drive-strength = <8>;
bias-pull-up;
};

cam_sensor_front_default: cam_sensor_front_default {
pins = "gpio40";
function = "gpio";
bias-disable;
drive-strength = <2>;
};

camss_mclk0_default: camss-mclk0-default-state {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use mclk pinctrls from msm8937.dtsi

pins = "gpio26";
function = "cam_mclk";
drive-strength = <2>;
bias-disable;
};

camss_mclk1_default: camss-mclk1-default-state {
pins = "gpio27";
function = "cam_mclk";
drive-strength = <2>;
bias-disable;
};

camss_mclk2_default: camss-mclk2-default-state {
pins = "gpio28";
function = "cam_mclk";
drive-strength = <2>;
bias-disable;
};
};

&usb {
Expand Down Expand Up @@ -609,3 +637,62 @@
&xo_board {
clock-frequency = <19200000>;
};

&camss {
compatible = "qcom,msm8917-camss";
status = "okay";
vdda-supply = <&pm8937_s3>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
vdda-supply = <&pm8937_s3>;
vdda-supply = <&pm8937_l2>;


ports {
port@1 {
reg = <1>;
csiphy1_ep: endpoint {
clock-lanes = <7>;
data-lanes = <0 1>;
remote-endpoint = <&front_cam_ep>;
};
};
};
};


&cci {
pinctrl-names = "default";
pinctrl-0 = <&cci1_default>,
<&cci0_default>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<&cci0_default>,

<&camss_mclk2_default>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it should be moved to the camera pinctrl


status = "okay";
};

&cci_i2c1 {
camera-sensor@36 { // Front camera
compatible = "ovti,ov5670";

reg = <0x36>;

clocks = <&gcc GCC_CAMSS_MCLK2_CLK>;
clock-rates = <19200000>;

pinctrl-0 = <&cam_sensor_front_default>;
pinctrl-names = "default";

reset-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;

avdd-supply = <&pm8937_l22>;
dvdd-supply = <&pm8937_l23>;
dovdd-supply = <&pm8937_l6>;
orientation = <0>;
rotation = <270>;

status = "okay";

port {
front_cam_ep: endpoint {
data-lanes = <0 1>;
remote-endpoint = <&csiphy1_ep>;
link-frequencies = /bits/ 64 <450000000>;
};
};
};
};