|
9 | 9 | #include <st/mp13/stm32mp135.dtsi>
|
10 | 10 | #include <st/mp13/stm32mp135faex-pinctrl.dtsi>
|
11 | 11 | #include "zephyr/dt-bindings/display/panel.h"
|
| 12 | +#include <zephyr/dt-bindings/gpio/raspberrypi-csi-connector.h> |
12 | 13 | #include <zephyr/dt-bindings/input/input-event-codes.h>
|
| 14 | +#include <zephyr/dt-bindings/video/video-interfaces.h> |
13 | 15 |
|
14 | 16 | / {
|
15 | 17 | model = "STMicroelectronics STM32MP135-DK board";
|
|
62 | 64 | led1 = &red_led_2;
|
63 | 65 | sw0 = &user_button;
|
64 | 66 | };
|
| 67 | + |
| 68 | + csi_connector: connector_csi { |
| 69 | + compatible = "raspberrypi,csi-connector"; |
| 70 | + #gpio-cells = <2>; |
| 71 | + gpio-map-mask = <0xffffffff 0xffffffc0>; |
| 72 | + gpio-map-pass-thru = <0 0x3f>; |
| 73 | + gpio-map = <CSI_IO0 0 &mcp23017 4 0>, |
| 74 | + <CSI_IO1 0 &mcp23017 3 0>; |
| 75 | + }; |
65 | 76 | };
|
66 | 77 |
|
67 | 78 | &clk_hsi {
|
|
89 | 100 | status = "okay";
|
90 | 101 | };
|
91 | 102 |
|
| 103 | +&pll2 { |
| 104 | + clocks = <&clk_hse>; |
| 105 | + div-m = <3>; |
| 106 | + mul-n = <66>; |
| 107 | + div-p = <2>; |
| 108 | + div-q = <2>; |
| 109 | + div-r = <1>; |
| 110 | + fracn = <5120>; |
| 111 | + status = "okay"; |
| 112 | +}; |
| 113 | + |
92 | 114 | &rcc {
|
93 | 115 | clock-frequency = <DT_FREQ_M(1000)>;
|
94 | 116 | clocks = <&pll>;
|
|
124 | 146 | status = "okay";
|
125 | 147 | };
|
126 | 148 |
|
127 |
| -&i2c5 { |
| 149 | +csi_i2c: &i2c5 { |
128 | 150 | pinctrl-names = "default";
|
129 | 151 | pinctrl-0 = <&i2c5_scl_pd1 &i2c5_sda_ph6>;
|
130 | 152 | status = "okay";
|
| 153 | + |
| 154 | + mipid02: bridge@14 { |
| 155 | + compatible = "st,mipid02"; |
| 156 | + reg = <0x14>; |
| 157 | + reset-gpios = <&mcp23017 2 GPIO_ACTIVE_LOW>; |
| 158 | + |
| 159 | + ports { |
| 160 | + #address-cells = <1>; |
| 161 | + #size-cells = <0>; |
| 162 | + port@0 { |
| 163 | + reg = <0>; |
| 164 | + |
| 165 | + csi_ep_in: endpoint { |
| 166 | + remote-endpoint-label = ""; |
| 167 | + }; |
| 168 | + }; |
| 169 | + |
| 170 | + port@2 { |
| 171 | + reg = <2>; |
| 172 | + |
| 173 | + mipid02_2: endpoint { |
| 174 | + bus-width = <8>; |
| 175 | + hsync-active = <0>; |
| 176 | + vsync-active = <0>; |
| 177 | + pclk-sample = <0>; |
| 178 | + remote-endpoint-label = "dcmipp_ep_in"; |
| 179 | + }; |
| 180 | + }; |
| 181 | + }; |
| 182 | + }; |
| 183 | +}; |
| 184 | + |
| 185 | +csi_interface: &dcmipp { |
| 186 | + pinctrl-0 = <&dcmipp_d0_pa9 &dcmipp_d1_pd0 &dcmipp_d2_pg10 &dcmipp_d3_pe4 |
| 187 | + &dcmipp_d4_pd11 &dcmipp_d5_pd3 &dcmipp_d6_pb8 &dcmipp_d7_pe14 |
| 188 | + &dcmipp_pixclk_pb7 &dcmipp_vsync_pg9 &dcmipp_hsync_ph8>; |
| 189 | + pinctrl-names = "default"; |
| 190 | + |
| 191 | + ports { |
| 192 | + port@0 { |
| 193 | + dcmipp_ep_in: endpoint { |
| 194 | + bus-width = <8>; |
| 195 | + hsync-active = <0>; |
| 196 | + vsync-active = <0>; |
| 197 | + pclk-sample = <0>; |
| 198 | + bus-type = <VIDEO_BUS_TYPE_PARALLEL>; |
| 199 | + remote-endpoint-label = "mipid02_2"; |
| 200 | + }; |
| 201 | + }; |
| 202 | + |
| 203 | + port@1 { |
| 204 | + csi_capture_port: endpoint { }; |
| 205 | + }; |
| 206 | + }; |
131 | 207 | };
|
132 | 208 |
|
133 | 209 | <dc {
|
|
166 | 242 | def-back-color-green = <0xFF>;
|
167 | 243 | def-back-color-blue = <0xFF>;
|
168 | 244 | };
|
| 245 | + |
| 246 | +/* |
| 247 | + * MCO1 is used to clock ST-MIPID02, keep disabled here, will be |
| 248 | + * enabled by a shield when camera pipeline is enabled |
| 249 | + */ |
| 250 | +&mco1 { |
| 251 | + clocks = <&rcc STM32_SRC_HSE MCO1_SEL(MCO1_SEL_HSE)>; |
| 252 | + prescaler = <MCO1_PRE(MCO_PRE_DIV_1)>; |
| 253 | + pinctrl-0 = <&rcc_mco_1_pd7>; |
| 254 | + pinctrl-names = "default"; |
| 255 | + |
| 256 | + status = "disabled"; |
| 257 | +}; |
0 commit comments