I've used your device tree on the BBxm with kernel 5.0.19 but I supsect that only 9 bits are captured instead of 12.
The doubt arise from the fact that even with Test Pattern I cannot see white but the highest value is 511 which is a dark gray.
+&i2c2 {
+ clock-frequency = <100000>;
+
+ mt9p031@48 {
+ compatible = "aptina,mt9p031";
+ reg = <0x48>;
+
+ clocks = <&isp 0>;
+ reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
+
+ vaa-supply = <&hsusb2_power>;
+ vdd-supply = <&vaux3>;
+ vdd_io-supply = <&vaux4>;
+
+ port {
+ mt9p031_out: endpoint {
+ input-clock-frequency = <21000000>;
+ pixel-clock-frequency = <48000000>;
+ remote-endpoint = <&ccdc_ep>;
+ };
+ };
+ };
+};
+
+&isp {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ port@0 {
+ reg = <0>;
+ ccdc_ep: endpoint {
+ remote-endpoint = <&mt9p031_out>;
+ bus-width = <12>;
+ hsync-active = <1>;
+ vsync-active = <1>;
+ pclk-sample = <0>;
+ };
+ };
+ };
+};
Thank you in advance for any hints.