ARM: tegra: move i2c registration to DT for bonaire
Laxman Dewangan [Mon, 30 Dec 2013 11:50:47 +0000 (16:50 +0530)]
Move I2C registration to DT for bonaire.

Change-Id: Iee426abd0336bdedb1dd0151506b5dbcd84c4815
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/350883

arch/arm/boot/dts/tegra124-bonaire.dts
arch/arm/boot/dts/tegra124-bonaire_sim.dts
arch/arm/mach-tegra/board-bonaire.c

index b9eaf01..754380c 100644 (file)
                device_type = "memory";
                reg = <0x80000000 0x20000000>;
        };
+
+       i2c@7000c000 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000c400 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000c500 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000c700 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000d000 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000d100 {
+               status = "okay";
+               clock-frequency = <400000>;
+       };
 };
index c3e1bed..eacea2d 100644 (file)
                device_type = "memory";
                reg = <0x80000000 0x20000000>;
        };
+
+       i2c@7000c000 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000c400 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000c500 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000c700 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000d000 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000d100 {
+               status = "okay";
+               clock-frequency = <400000>;
+       };
 };
index 42c6687..461eada 100644 (file)
@@ -158,63 +158,9 @@ static struct i2c_board_info __initdata bonaire_i2c_bus1_board_info[] = {
        },
 };
 
-static struct tegra_i2c_platform_data bonaire_i2c1_platform_data = {
-       .bus_clk_rate   = 100000,
-};
-
-#if 0  /* !!!FIXME!!! THESE ARE VENTANA SETTINGS */
-static const struct tegra_pingroup_config i2c2_ddc = {
-       .pingroup       = TEGRA_PINGROUP_DDC,
-       .func           = TEGRA_MUX_I2C2,
-};
-
-static const struct tegra_pingroup_config i2c2_gen2 = {
-       .pingroup       = TEGRA_PINGROUP_PTA,
-       .func           = TEGRA_MUX_I2C2,
-};
-#endif
-
-static struct tegra_i2c_platform_data bonaire_i2c2_platform_data = {
-       .bus_clk_rate   = 100000,
-#if 0  /* !!!FIXME!!!! TESE ARE VENTANA SETTINGS */
-       .bus_mux        = { &i2c2_ddc, &i2c2_gen2 },
-       .bus_mux_len    = { 1, 1 },
-#endif
-};
-
-static struct tegra_i2c_platform_data bonaire_i2c3_platform_data = {
-       .bus_clk_rate   = 100000,
-};
-
-static struct tegra_i2c_platform_data bonaire_i2c4_platform_data = {
-       .bus_clk_rate   = 100000,
-};
-
-static struct tegra_i2c_platform_data bonaire_i2c5_platform_data = {
-       .bus_clk_rate   = 100000,
-};
-
-static struct tegra_i2c_platform_data bonaire_i2c6_platform_data = {
-       .bus_clk_rate   = 100000,
-};
-
 static void bonaire_i2c_init(void)
 {
-       tegra12_i2c_device1.dev.platform_data = &bonaire_i2c1_platform_data;
-       tegra12_i2c_device2.dev.platform_data = &bonaire_i2c2_platform_data;
-       tegra12_i2c_device3.dev.platform_data = &bonaire_i2c3_platform_data;
-       tegra12_i2c_device4.dev.platform_data = &bonaire_i2c4_platform_data;
-       tegra12_i2c_device5.dev.platform_data = &bonaire_i2c5_platform_data;
-       tegra12_i2c_device6.dev.platform_data = &bonaire_i2c6_platform_data;
-
        i2c_register_board_info(0, bonaire_i2c_bus1_board_info, 1);
-
-       platform_device_register(&tegra12_i2c_device6);
-       platform_device_register(&tegra12_i2c_device5);
-       platform_device_register(&tegra12_i2c_device4);
-       platform_device_register(&tegra12_i2c_device3);
-       platform_device_register(&tegra12_i2c_device2);
-       platform_device_register(&tegra12_i2c_device1);
 }
 
 static void bonaire_apbdma_init(void)
@@ -566,6 +512,7 @@ struct of_dev_auxdata tegra_bonaire_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("nvidia,tegra124-isp", TEGRA_ISP_BASE, "isp.0", NULL),
        OF_DEV_AUXDATA("nvidia,tegra124-isp", TEGRA_ISPB_BASE, "isp.1", NULL),
        OF_DEV_AUXDATA("nvidia,tegra124-tsec", TEGRA_TSEC_BASE, "tsec", NULL),
+       T124_I2C_OF_DEV_AUXDATA,
        {}
 };
 #endif