r28.1 what happened to en-vdd-cam-1v2-alt?

In r24.2 there were two 1v2 regulators for the camera connector, and only “alt” gave power correctly to my board.

regulator@209 {
                        compatible = "regulator-fixed-sync";
                        reg = <0xd1>;
                        regulator-name = "en-vdd-cam-1v2";
                        regulator-min-microvol = <0x124f80>;
                        regulator-max-microvol = <0x124f80>;
                        vin-supply = <0x5b>;
                        gpio = <0xa8 0x3 0x1>;
                        enable-active-high;
                };

regulator@211 {
                        compatible = "regulator-fixed-sync";
                        reg = <0xd3>;
                        regulator-name = "en-vdd-cam-1v2-alt";
                        regulator-min-microvol = <0x124f80>;
                        regulator-max-microvol = <0x124f80>;
                        gpio = <0xa8 0xa 0x1>;
                        enable-active-high;
                        linux,phandle = <0x81>;
                        phandle = <0x81>;
                };

Now in r28.1 there is only en-vdd-cam-1v2, where did alt go?

regulator@209 {
                        compatible = "regulator-fixed-sync";
                        reg = <0xd1>;
                        regulator-name = "en-vdd-cam-1v2";
                        regulator-min-microvolt = <0x124f80>;
                        regulator-max-microvolt = <0x124f80>;
                        vin-supply = <0x66>;
                        gpio = <0xc4 0x3 0x1>;
                        enable-active-high;
                        linux,phandle = <0x91>;
                        phandle = <0x91>;
                };

Ok my board is working again after adding the following to my device tree

regulators {
        en_vdd_cam_1v2_alt: regulator@211 {
            compatible = "regulator-fixed-sync";
            reg = <211>;
            regulator-name = "en-vdd-cam-1v2-alt";
            regulator-min-microvol = <1200000>;
            regulator-max-microvol = <1200000>;
            gpio = <&tca9539_77 10 1>;
            enable-active-high;
        };
    }

I would like to know why this was removed, and if this reflects an upcoming hardware change. Do I need to switch the 1v2 power rail on my board to a different pin?

The power depend on the HW specific. You need you know you board need what power and enable it.

Ok, but why was regulator@211 removed from the default device tree?

Is it in the …/hardware/nvidia/platform/t210/jetson/kernel-dts/jetson-platform/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi ?

Looks like it was fixed in Jetpack 3.2. So for Jetpack 3.1 we just have to add it manually.

Jetpack 3.1:

ww@Atrer:/mnt/data/l4t/3.1/64_TX1/Linux_for_Tegra_64_tx1/sources/hardware$ grep -e "regulator@211" -r *

Jetpack 3.2:

ww@Atrer:/mnt/data/l4t/3.2/64_TX1/Linux_for_Tegra/sources/hardware$ grep -e "regulator@211" -r *
nvidia/platform/t210/jetson/kernel-dts/jetson-platforms/tegra210-jetson-cv-power-<b>fixed</b>-p2180-p2597-a00.dtsi:		en_vdd_cam_1v2_alt: regulator@211 {

Another strange thing that happened in r28.1, regulator@210 (en_vdd_vcm_2v8) for some reason was given CAM1_RST_L as it’s GPIO. Even though it’s clearly stated in the docs that those pins are reserved for camera drivers. This stops modules that use the gpio from probing due to gpio_request() failing.

You have to clear it so you can use CAM1_RST_L as a reset for the camera.

/* Required for Jetpack 3.1, r28.1 (Fixed in r28.2) */
    regulators {
        /* Clear CAM1_RST_L as the regulator@210 gpio. */
        en_vdd_vcm_2v8: regulator@210 {
            gpio = <>;
        };
        /* Add the deleted regulator@211. */
        en_vdd_cam_1v2_alt: regulator@211 {
            compatible = "regulator-fixed-sync";
            reg = <211>;
            regulator-name = "en-vdd-cam-1v2-alt";
            regulator-min-microvol = <1200000>;
            regulator-max-microvol = <1200000>;
            gpio = <&tca9539_77 10 1>;
            enable-active-high;
        };
    };