ARM: imx: novena: Enable DM GPIO
authorMarek Vasut <marex@denx.de>
Fri, 17 May 2019 18:32:16 +0000 (20:32 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 11 Jun 2019 08:42:48 +0000 (10:42 +0200)
Enable DM GPIO support on iMX6Q Novena and fix up board code
where applicable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
board/kosagi/novena/novena.c
board/kosagi/novena/video.c
configs/novena_defconfig

index 9f2586521d4a9bac793cf615e5177cfb67710ff8..0750c4667ee5859ad24629b245d0d728aaee3c7a 100644 (file)
@@ -83,6 +83,8 @@ int drv_keyboard_init(void)
                .tstc   = novena_gpio_button_tstc,
        };
 
+       gpio_request(NOVENA_BUTTON_GPIO, "button");
+
        error = input_init(&button_input, 0);
        if (error) {
                debug("%s: Cannot set up input\n", __func__);
index f1351b9e287c7019aaf9f51e5a04d82c2c8f46fd..7083b6e103f58e8acdd0ed7a22c75fb50059dcb2 100644 (file)
@@ -270,6 +270,7 @@ static void enable_lvds(struct display_info_t const *dev)
                return;
 
        /* ITE IT6251 power enable. */
+       gpio_request(NOVENA_ITE6251_PWR_GPIO, "ite6251-power");
        gpio_direction_output(NOVENA_ITE6251_PWR_GPIO, 0);
        mdelay(10);
        gpio_direction_output(NOVENA_ITE6251_PWR_GPIO, 1);
@@ -447,6 +448,8 @@ void setup_display_lvds(void)
        /* Init the LVDS-to-eDP chip and if it succeeded, enable backlight. */
        ret = it6251_init();
        if (!ret) {
+               gpio_request(NOVENA_BACKLIGHT_PWR_GPIO, "backlight-power");
+               gpio_request(NOVENA_BACKLIGHT_PWM_GPIO, "backlight-pwm");
                /* Backlight power enable. */
                gpio_direction_output(NOVENA_BACKLIGHT_PWR_GPIO, 1);
                /* PWM backlight pin, always on for full brightness. */
index 31a32da0dc21253fec4396191d7f42c6baa6fcc7..c74f6351217c52a1abda2c33e5c0d1bcc780bd4f 100644 (file)
@@ -47,6 +47,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6q-novena"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
 CONFIG_DWC_AHSATA=y
+CONFIG_DM_GPIO=y
 CONFIG_FSL_ESDHC=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y