]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/samsung/trats/trats.c
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / board / samsung / trats / trats.c
index 920764664cc0ca69c0bf65dbd4359645eb44a5a4..7f61d17abb282a749c3c36caa4a9b964d8bb72c9 100644 (file)
@@ -4,23 +4,7 @@
  * Kyungmin Park <kyungmin.park@samsung.com>
  * Donghwa Lee <dh09.lee@samsung.com>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -58,12 +42,6 @@ u32 get_board_rev(void)
 #endif
 
 static void check_hw_revision(void);
-
-static int hwrevision(int rev)
-{
-       return (board_rev & 0xf) == rev;
-}
-
 struct s3c_plat_otg_data s5pc210_otg_data;
 
 int board_init(void)
@@ -83,10 +61,10 @@ void i2c_init_board(void)
        struct exynos4_gpio_part2 *gpio2 =
                (struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2();
 
-       /* I2C_5 -> PMIC */
+       /* I2C_5 -> PMIC -> Adapter 0 */
        s5p_gpio_direction_output(&gpio1->b, 7, 1);
        s5p_gpio_direction_output(&gpio1->b, 6, 1);
-       /* I2C_9 -> FG */
+       /* I2C_9 -> FG -> Adapter 1 */
        s5p_gpio_direction_output(&gpio2->y4, 0, 1);
        s5p_gpio_direction_output(&gpio2->y4, 1, 1);
 }
@@ -304,10 +282,17 @@ int power_init_board(void)
        struct power_battery *pb;
        struct pmic *p_fg, *p_chrg, *p_muic, *p_bat;
 
-       ret = pmic_init(I2C_5);
+       /*
+        * For PMIC/MUIC the I2C bus is named as I2C5, but it is connected
+        * to logical I2C adapter 0
+        *
+        * The FUEL_GAUGE is marked as I2C9 on the schematic, but connected
+        * to logical I2C adapter 1
+        */
+       ret = pmic_init(I2C_0);
        ret |= pmic_init_max8997();
-       ret |= power_fg_init(I2C_9);
-       ret |= power_muic_init(I2C_5);
+       ret |= power_fg_init(I2C_1);
+       ret |= power_muic_init(I2C_0);
        ret |= power_bat_init(0);
        if (ret)
                return ret;
@@ -635,7 +620,7 @@ int board_early_init_f(void)
        return 0;
 }
 
-static void lcd_reset(void)
+void exynos_reset_lcd(void)
 {
        struct exynos4_gpio_part2 *gpio2 =
                (struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2();
@@ -755,10 +740,6 @@ vidinfo_t panel_info = {
        .vl_cmd_allow_len = 0xf,
 
        .win_id         = 3,
-       .cfg_gpio       = NULL,
-       .backlight_on   = NULL,
-       .lcd_power_on   = NULL, /* lcd_power_on in mipi dsi driver */
-       .reset_lcd      = lcd_reset,
        .dual_lcd_enabled = 0,
 
        .init_delay     = 0,
@@ -777,9 +758,7 @@ void init_panel_info(vidinfo_t *vid)
 #ifdef CONFIG_TIZEN
        get_tizen_logo_info(vid);
 #endif
-
-       if (hwrevision(2))
-               mipi_lcd_device.reverse_panel = 1;
+       mipi_lcd_device.reverse_panel = 1;
 
        strcpy(s6e8ax0_platform_data.lcd_panel_name, mipi_lcd_device.name);
        s6e8ax0_platform_data.lcd_power = lcd_power;