|
| 1 | +/dts-v1/; |
| 2 | +/plugin/; |
| 3 | + |
| 4 | +#include <dt-bindings/clock/rk3588-cru.h> |
| 5 | +#include <dt-bindings/power/rk3588-power.h> |
| 6 | +#include <dt-bindings/gpio/gpio.h> |
| 7 | +#include <dt-bindings/pinctrl/rockchip.h> |
| 8 | + |
| 9 | +/ { |
| 10 | + metadata { |
| 11 | + title = "Enable Radxa Camera 12M 577"; |
| 12 | + compatible = "radxa,rock-5a", "radxa,rock-5c"; |
| 13 | + category = "camera"; |
| 14 | + exclusive = "GPIO1_D2","GPIO1_D3","csi2_dphy0","i2c3"; |
| 15 | + description = "Enable Radxa Camera 12M 577."; |
| 16 | + }; |
| 17 | +}; |
| 18 | + |
| 19 | +&{/} { |
| 20 | + camera_power_gpio: camera-power-gpio { |
| 21 | + compatible = "regulator-fixed"; |
| 22 | + regulator-name = "camera_power_gpio"; |
| 23 | + regulator-always-on; |
| 24 | + enable-active-high; |
| 25 | + gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>; |
| 26 | + pinctrl-names = "default"; |
| 27 | + pinctrl-0 = <&cam_power_gpio>; |
| 28 | + }; |
| 29 | +}; |
| 30 | + |
| 31 | +&i2c3 { |
| 32 | + status = "okay"; |
| 33 | + #address-cells = <1>; |
| 34 | + #size-cells = <0>; |
| 35 | + |
| 36 | + imx577: imx577@1a { |
| 37 | + status = "okay"; |
| 38 | + compatible = "sony,imx577"; |
| 39 | + reg = <0x1a>; |
| 40 | + clocks = <&cru CLK_MIPI_CAMARAOUT_M2>; |
| 41 | + clock-names = "xvclk"; |
| 42 | + pinctrl-names = "default"; |
| 43 | + pinctrl-0 = <&mipim0_camera2_clk>; |
| 44 | + power-domains = <&power RK3588_PD_VI>; |
| 45 | + reset-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; |
| 46 | + rockchip,camera-module-index = <0>; |
| 47 | + rockchip,camera-module-facing = "back"; |
| 48 | + rockchip,camera-module-name = "RADXA-CAMERA-12M"; |
| 49 | + rockchip,camera-module-lens-name = "default"; |
| 50 | + port { |
| 51 | + imx577_out0: endpoint { |
| 52 | + remote-endpoint = <&mipidphy0_in_ucam0>; |
| 53 | + data-lanes = <1 2 3 4>; |
| 54 | + }; |
| 55 | + }; |
| 56 | + }; |
| 57 | +}; |
| 58 | + |
| 59 | +&csi2_dphy0_hw { |
| 60 | + status = "okay"; |
| 61 | +}; |
| 62 | + |
| 63 | +&csi2_dphy0 { |
| 64 | + status = "okay"; |
| 65 | + |
| 66 | + ports { |
| 67 | + #address-cells = <1>; |
| 68 | + #size-cells = <0>; |
| 69 | + |
| 70 | + port@0 { |
| 71 | + reg = <0>; |
| 72 | + #address-cells = <1>; |
| 73 | + #size-cells = <0>; |
| 74 | + |
| 75 | + mipidphy0_in_ucam0: endpoint@1 { |
| 76 | + reg = <1>; |
| 77 | + remote-endpoint = <&imx577_out0>; |
| 78 | + data-lanes = <1 2 3 4>; |
| 79 | + }; |
| 80 | + }; |
| 81 | + |
| 82 | + port@1 { |
| 83 | + reg = <1>; |
| 84 | + #address-cells = <1>; |
| 85 | + #size-cells = <0>; |
| 86 | + |
| 87 | + csidphy0_out: endpoint@0 { |
| 88 | + reg = <0>; |
| 89 | + remote-endpoint = <&mipi2_csi2_input>; |
| 90 | + }; |
| 91 | + }; |
| 92 | + }; |
| 93 | +}; |
| 94 | + |
| 95 | +&mipi2_csi2 { |
| 96 | + status = "okay"; |
| 97 | + |
| 98 | + ports { |
| 99 | + #address-cells = <1>; |
| 100 | + #size-cells = <0>; |
| 101 | + |
| 102 | + port@0 { |
| 103 | + reg = <0>; |
| 104 | + #address-cells = <1>; |
| 105 | + #size-cells = <0>; |
| 106 | + |
| 107 | + mipi2_csi2_input: endpoint@1 { |
| 108 | + reg = <1>; |
| 109 | + remote-endpoint = <&csidphy0_out>; |
| 110 | + }; |
| 111 | + }; |
| 112 | + |
| 113 | + port@1 { |
| 114 | + reg = <1>; |
| 115 | + #address-cells = <1>; |
| 116 | + #size-cells = <0>; |
| 117 | + |
| 118 | + mipi2_csi2_output: endpoint@0 { |
| 119 | + reg = <0>; |
| 120 | + remote-endpoint = <&cif_mipi2_in0>; |
| 121 | + }; |
| 122 | + }; |
| 123 | + }; |
| 124 | +}; |
| 125 | + |
| 126 | +&rkcif { |
| 127 | + status = "okay"; |
| 128 | +}; |
| 129 | + |
| 130 | +&rkcif_mipi_lvds2 { |
| 131 | + status = "okay"; |
| 132 | + |
| 133 | + port { |
| 134 | + cif_mipi2_in0: endpoint { |
| 135 | + remote-endpoint = <&mipi2_csi2_output>; |
| 136 | + }; |
| 137 | + }; |
| 138 | +}; |
| 139 | + |
| 140 | +&rkcif_mipi_lvds2_sditf { |
| 141 | + status = "okay"; |
| 142 | + |
| 143 | + port { |
| 144 | + mipi_lvds2_sditf: endpoint { |
| 145 | + remote-endpoint = <&isp0_vir0>; |
| 146 | + }; |
| 147 | + }; |
| 148 | +}; |
| 149 | + |
| 150 | +&rkcif_mmu { |
| 151 | + status = "okay"; |
| 152 | +}; |
| 153 | + |
| 154 | +&isp0_mmu { |
| 155 | + status = "okay"; |
| 156 | +}; |
| 157 | + |
| 158 | +&rkisp0 { |
| 159 | + status = "okay"; |
| 160 | +}; |
| 161 | + |
| 162 | +&rkisp0_vir0 { |
| 163 | + status = "okay"; |
| 164 | + |
| 165 | + port { |
| 166 | + #address-cells = <1>; |
| 167 | + #size-cells = <0>; |
| 168 | + |
| 169 | + isp0_vir0: endpoint@0 { |
| 170 | + reg = <0>; |
| 171 | + remote-endpoint = <&mipi_lvds2_sditf>; |
| 172 | + }; |
| 173 | + }; |
| 174 | +}; |
| 175 | + |
| 176 | +&pinctrl { |
| 177 | + camera { |
| 178 | + cam_power_gpio: cam-power-gpio { |
| 179 | + rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; |
| 180 | + }; |
| 181 | + }; |
| 182 | +}; |
0 commit comments