arm64: tegra: Add DPAUX pinctrl bindings
authorJon Hunter <jonathanh@nvidia.com>
Wed, 29 Jun 2016 09:17:57 +0000 (10:17 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 14 Jul 2016 14:20:25 +0000 (16:20 +0200)
Add the DPAUX pinctrl states for the DPAUX nodes defining all three
possible states of "aux", "i2c" and "off". Also add the 'i2c-bus'
node for the DPAUX nodes so that the I2C driver core does not attempt
to parse the pinctrl state nodes.

Populate the nodes for the pinctrl clients of the DPAUX pin controller.
There are two clients for each DPAUX instance, namely the SOR and one of
the I2C adapters. The SOR clients may used the DPAUX pins in either AUX
or I2C modes and so for these devices we don't define any of the generic
pinctrl states (default, idle, etc) because the SOR driver will directly
set the state needed. For I2C clients only the I2C mode is used and so
we can simplify matters by using the generic pinctrl states for default
and idle.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm64/boot/dts/nvidia/tegra210.dtsi

index cefae3bb335325f9b4256fffc01f8a4b8c3b087a..61ec48c4b5b7d3ae6a18a8e3e51786ab696c3cd0 100644 (file)
                        resets = <&tegra_car 207>;
                        reset-names = "dpaux";
                        status = "disabled";
+
+                       state_dpaux1_aux: pinmux-aux {
+                               groups = "dpaux-io";
+                               function = "aux";
+                       };
+
+                       state_dpaux1_i2c: pinmux-i2c {
+                               groups = "dpaux-io";
+                               function = "i2c";
+                       };
+
+                       state_dpaux1_off: pinmux-off {
+                               groups = "dpaux-io";
+                               function = "off";
+                       };
+
+                       i2c-bus {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
                };
 
                vi@54080000 {
                        clock-names = "sor", "parent", "dp", "safe";
                        resets = <&tegra_car 182>;
                        reset-names = "sor";
+                       pinctrl-0 = <&state_dpaux_aux>;
+                       pinctrl-1 = <&state_dpaux_i2c>;
+                       pinctrl-2 = <&state_dpaux_off>;
+                       pinctrl-names = "aux", "i2c", "off";
                        status = "disabled";
                };
 
                        clock-names = "sor", "parent", "dp", "safe";
                        resets = <&tegra_car 183>;
                        reset-names = "sor";
+                       pinctrl-0 = <&state_dpaux1_aux>;
+                       pinctrl-1 = <&state_dpaux1_i2c>;
+                       pinctrl-2 = <&state_dpaux1_off>;
+                       pinctrl-names = "aux", "i2c", "off";
                        status = "disabled";
                };
 
                        resets = <&tegra_car 181>;
                        reset-names = "dpaux";
                        status = "disabled";
+
+                       state_dpaux_aux: pinmux-aux {
+                               groups = "dpaux-io";
+                               function = "aux";
+                       };
+
+                       state_dpaux_i2c: pinmux-i2c {
+                               groups = "dpaux-io";
+                               function = "i2c";
+                       };
+
+                       state_dpaux_off: pinmux-off {
+                               groups = "dpaux-io";
+                               function = "off";
+                       };
+
+                       i2c-bus {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
                };
 
                isp@54600000 {
                reset-names = "i2c";
                dmas = <&apbdma 26>, <&apbdma 26>;
                dma-names = "rx", "tx";
+               pinctrl-0 = <&state_dpaux1_i2c>;
+               pinctrl-1 = <&state_dpaux1_off>;
+               pinctrl-names = "default", "idle";
                status = "disabled";
        };
 
                reset-names = "i2c";
                dmas = <&apbdma 30>, <&apbdma 30>;
                dma-names = "rx", "tx";
+               pinctrl-0 = <&state_dpaux_i2c>;
+               pinctrl-1 = <&state_dpaux_off>;
+               pinctrl-names = "default", "idle";
                status = "disabled";
        };