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