How to change camera driver loading sequence?

Hi!

My custormer carrier board supports 6 cameras at most.In device tree,they are mount on i2c@0,i2c@1,i2c@2,i2c@3,i2c@6,i2c@7.
So the driver loding sequence also is 0,1,2,3,6,7.Now I want to exchange the order of 6 and 7.(Because my pcb has some problem).I want the order is 0,1,2,3,7,6.Do you have any idea?Thanks!

i2c@3180000 { 
			//avdd_dsi_csi-supply = <&max77620_ldo0>;
			//status = "okay";
			#address-cells = <1>;
			#size-cells = <0>;
			tca9548@70 {
				i2c@0 {
					camera_a@30 {
						compatible = "nvidia,calmcar-camera";
						/* I2C device address */
						reg = <0x30>;
						
						serializer-reg = <0x40>;
						
						deserializer-reg = <0x48>;
						
						dvp2mipier-reg = <0x0e>;
						
						
						//status = "okay";

						/* V4L2 device node location */
						devnode = "video0";

						/* Physical dimensions of sensor */
						physical_w = "3.674";
						physical_h = "2.738";

						/* Sensor output flip settings */
						vertical-flip = "true";

						/* Define any required hw resources needed by driver */
						/* ie. clocks, io pins, power sources */
						avdd-reg = "cam";
						
						
						ports {
							#address-cells = <1>;
							#size-cells = <0>;

							port@0 {
								reg = <0>;
								camera_out0: endpoint {
									csi-port = <5>;
									bus-width = <2>;
									remote-endpoint = <&camera_csi_in0>;
								};
							};
						};
					};
				};
				
				i2c@1{
					camera_b@30 {
						compatible = "nvidia,calmcar-camera";
						/* I2C device address */
						reg = <0x30>;
						
						
						serializer-reg = <0x40>;
						
						deserializer-reg = <0x48>;
						
						dvp2mipier-reg = <0x0e>;
						
						
						status = "okay";

						/* V4L2 device node location */
						devnode = "video1";

						/* Physical dimensions of sensor */
						physical_w = "3.674";
						physical_h = "2.738";

						/* Sensor output flip settings */
						vertical-flip = "true";

						/* Define any required hw resources needed by driver */
						/* ie. clocks, io pins, power sources */
						avdd-reg = "cam";
						
	
						ports {
							#address-cells = <1>;
							#size-cells = <0>;

							port@0 {
								reg = <0>;
								camera_out1: endpoint {
									csi-port = <4>;
									bus-width = <2>;
									remote-endpoint = <&camera_csi_in1>;
								};
							};
						};
					};
				};

				
				i2c@2{
					camera_c@30 {
						compatible = "nvidia,calmcar-camera";
						/* I2C device address */
						reg = <0x30>;
						
						
						serializer-reg = <0x40>;
						
						deserializer-reg = <0x48>;
						
						dvp2mipier-reg = <0x0e>;
						
						status = "okay";

						/* V4L2 device node location */
						devnode = "video2";

						/* Physical dimensions of sensor */
						physical_w = "3.674";
						physical_h = "2.738";

						/* Sensor output flip settings */
						vertical-flip = "true";

						/* Define any required hw resources needed by driver */
						/* ie. clocks, io pins, power sources */
						avdd-reg = "cam";
									
					
						
						ports {
							#address-cells = <1>;
							#size-cells = <0>;

							port@0 {
								reg = <0>;
								camera_out2: endpoint {
									csi-port = <3>;
									bus-width = <2>;
									remote-endpoint = <&camera_csi_in2>;
								};
							};
						};
					};
				};
			
				i2c@3{
					camera_d@30 {
						compatible = "nvidia,calmcar-camera";
						/* I2C device address */
						reg = <0x30>;
						
						
						
						serializer-reg = <0x40>;
						
						deserializer-reg = <0x48>;
						
						dvp2mipier-reg = <0x0e>;
						
						
						
						status = "okay";

						/* V4L2 device node location */
						devnode = "video3";

						/* Physical dimensions of sensor */
						physical_w = "3.674";
						physical_h = "2.738";

						/* Sensor output flip settings */
						vertical-flip = "true";

						/* Define any required hw resources needed by driver */
						/* ie. clocks, io pins, power sources */
						avdd-reg = "cam";

					
						
						ports {
							#address-cells = <1>;
							#size-cells = <0>;

							port@0 {
								reg = <0>;
								camera_out3: endpoint {
									csi-port = <2>;
									bus-width = <2>;
									remote-endpoint = <&camera_csi_in3>;
								};
							};
						};
					};
				
				};
				i2c@6{
					camera_e@30 {
						compatible = "nvidia,calmcar-camera";
						/* I2C device address */
						reg = <0x30>;
						
						
						serializer-reg = <0x40>;
						
						deserializer-reg = <0x48>;
						
						dvp2mipier-reg = <0x0e>;
						
						
						status = "okay";

						/* V4L2 device node location */
						devnode = "video4";

						/* Physical dimensions of sensor */
						physical_w = "3.674";
						physical_h = "2.738";

						/* Sensor output flip settings */
						vertical-flip = "true";

						/* Define any required hw resources needed by driver */
						/* ie. clocks, io pins, power sources */
						avdd-reg = "cam";

						
						ports {
							#address-cells = <1>;
							#size-cells = <0>;

							port@0 {
								reg = <0>;
								camera_out4: endpoint {
									csi-port = <0>;
									bus-width = <2>;
									remote-endpoint = <&camera_csi_in4>;
								};
							};
						};
					};
				};
				i2c@7{
					camera_f@30 {
						compatible = "nvidia,calmcar-camera";
						/* I2C device address */
						reg = <0x30>;
						
						
						serializer-reg = <0x40>;
						
						deserializer-reg = <0x48>;
						
						dvp2mipier-reg = <0x0e>;
						
						
						status = "okay";

						/* V4L2 device node location */
						devnode = "video5";

						/* Physical dimensions of sensor */
						physical_w = "3.674";
						physical_h = "2.738";

						/* Sensor output flip settings */
						vertical-flip = "true";

						/* Define any required hw resources needed by driver */
						/* ie. clocks, io pins, power sources */
						avdd-reg = "cam";
    
					
						
						ports {
							#address-cells = <1>;
							#size-cells = <0>;

							port@0 {
								reg = <0>;
								camera_out5: endpoint {
									csi-port = <1>;
									bus-width = <2>;
									remote-endpoint = <&camera_csi_in5>;
								};
							};
						};
					};
				}; 
			};
		};

Do you mean the driver loading sequence during kernel boot time?
What the order in the tegra-camera-platform in DT? What if try to switch the order in it.

Yes,I want to exchange loading sequence during kernel boot time.

I have removed the code of tegra-camera-platform in DT.I thought it was useless.

I add tegra-camera-platform in DT.The sequence is not change

[    5.294370] calmcar-camera 30-0030: 5:cannot detected max96705
[    7.898374] calmcar-camera 31-0030: 5:cannot detected max96705
[   10.498373] calmcar-camera 32-0030: 5:cannot detected max96705
[   13.183273] calmcar-camera 33-0030: 5:cannot detected max96705
[   13.224975] calmcar-camera 36-0030: 0:detected max96705 successfully
[   13.272747] calmcar-camera 37-0030: 0:detected max96705 successfully

The sequence is 30,31,32,33,36,37.It’s same as before

OK, I think there’s no other way but you can to trace the i2c driver framework to modify the sequence.