diff --git a/Documentation/devicetree/bindings/sound/sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt index 5666da7b86059f..7a73a9d62015ec 100644 --- a/Documentation/devicetree/bindings/sound/sgtl5000.txt +++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt @@ -26,6 +26,15 @@ Optional properties: If this node is not mentioned or the value is unknown, then the value is set to 1.25V. +- lrclk-strength: the LRCLK pad strength. Possible values are: +0, 1, 2 and 3 as per the table below: + +VDDIO 1.8V 2.5V 3.3V +0 = Disable +1 = 1.66 mA 2.87 mA 4.02 mA +2 = 3.33 mA 5.74 mA 8.03 mA +3 = 4.99 mA 8.61 mA 12.05 mA + Example: codec: sgtl5000@0a { diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi index 2253804b85053a..83b34564857ee6 100644 --- a/arch/arm/boot/dts/imx6ull.dtsi +++ b/arch/arm/boot/dts/imx6ull.dtsi @@ -9,6 +9,7 @@ #include #include +#include #include #include "imx6ull-pinfunc.h" #include "imx6ull-pinfunc-snvs.h" @@ -446,8 +447,8 @@ compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; reg = <0x02084000 0x4000>; interrupts = ; - clocks = <&clks IMX6UL_CLK_DUMMY>, - <&clks IMX6UL_CLK_DUMMY>; + clocks = <&clks IMX6UL_CLK_PWM2>, + <&clks IMX6UL_CLK_PWM2>; clock-names = "ipg", "per"; #pwm-cells = <2>; }; @@ -466,8 +467,8 @@ compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; reg = <0x0208c000 0x4000>; interrupts = ; - clocks = <&clks IMX6UL_CLK_DUMMY>, - <&clks IMX6UL_CLK_DUMMY>; + clocks = <&clks IMX6UL_CLK_PWM4>, + <&clks IMX6UL_CLK_PWM4>; clock-names = "ipg", "per"; #pwm-cells = <2>; }; @@ -797,8 +798,8 @@ compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; reg = <0x020f0000 0x4000>; interrupts = ; - clocks = <&clks IMX6UL_CLK_DUMMY>, - <&clks IMX6UL_CLK_DUMMY>; + clocks = <&clks IMX6UL_CLK_PWM5>, + <&clks IMX6UL_CLK_PWM5>; clock-names = "ipg", "per"; #pwm-cells = <2>; }; @@ -807,8 +808,8 @@ compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; reg = <0x020f4000 0x4000>; interrupts = ; - clocks = <&clks IMX6UL_CLK_DUMMY>, - <&clks IMX6UL_CLK_DUMMY>; + clocks = <&clks IMX6UL_CLK_PWM6>, + <&clks IMX6UL_CLK_PWM6>; clock-names = "ipg", "per"; #pwm-cells = <2>; }; @@ -817,8 +818,8 @@ compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; reg = <0x020f8000 0x4000>; interrupts = ; - clocks = <&clks IMX6UL_CLK_DUMMY>, - <&clks IMX6UL_CLK_DUMMY>; + clocks = <&clks IMX6UL_CLK_PWM7>, + <&clks IMX6UL_CLK_PWM7>; clock-names = "ipg", "per"; #pwm-cells = <2>; }; @@ -827,8 +828,8 @@ compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; reg = <0x020fc000 0x4000>; interrupts = ; - clocks = <&clks IMX6UL_CLK_DUMMY>, - <&clks IMX6UL_CLK_DUMMY>; + clocks = <&clks IMX6UL_CLK_PWM8>, + <&clks IMX6UL_CLK_PWM8>; clock-names = "ipg", "per"; #pwm-cells = <2>; }; diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index a7974b2914127b..e4a26a151e9f91 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -355,7 +355,7 @@ config MV_XOR_V2 config MXS_DMA bool "MXS DMA support" - depends on SOC_IMX23 || SOC_IMX28 || SOC_IMX6 + depends on ARCH_MXS || ARCH_MXC || COMPILE_TEST select STMP_DEVICE select DMA_ENGINE help diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index 6c410be9fd43ee..c4847c51b3f1d3 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -123,6 +123,7 @@ struct ci_hdrc_imx_data { struct pm_qos_request pm_qos_req; }; +#ifdef CONFIG_POWER_SUPPLY static char *imx_usb_charger_supplied_to[] = { "imx_usb_charger", }; @@ -132,6 +133,7 @@ static enum power_supply_property imx_usb_charger_power_props[] = { POWER_SUPPLY_PROP_ONLINE, /* VBUS online */ POWER_SUPPLY_PROP_CURRENT_MAX, /* Maximum current in mA */ }; +#endif static inline bool is_imx6q_con(struct ci_hdrc_imx_data *imx_data) { @@ -335,6 +337,7 @@ static int ci_hdrc_imx_notify_event(struct ci_hdrc *ci, unsigned event) int ret = 0; switch (event) { +#ifdef CONFIG_POWER_SUPPLY case CI_HDRC_CONTROLLER_VBUS_EVENT: if (data->usbmisc_data && ci->vbus_active) { if (data->imx_usb_charger_detection) { @@ -355,6 +358,7 @@ static int ci_hdrc_imx_notify_event(struct ci_hdrc *ci, unsigned event) return ret; imx_usbmisc_charger_secondary_detection(data->usbmisc_data); break; +#endif case CI_HDRC_IMX_HSIC_ACTIVE_EVENT: if (!IS_ERR(data->pinctrl) && !IS_ERR(data->pinctrl_hsic_active)) { @@ -394,6 +398,7 @@ static int ci_hdrc_imx_notify_event(struct ci_hdrc *ci, unsigned event) return ret; } +#ifdef CONFIG_POWER_SUPPLY static int imx_usb_charger_get_property(struct power_supply *psy, enum power_supply_property psp, union power_supply_propval *val) @@ -457,6 +462,7 @@ static int imx_usb_register_charger(struct usb_charger *charger, return 0; } +#endif static int ci_hdrc_imx_probe(struct platform_device *pdev) { @@ -588,6 +594,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) if (of_find_property(np, "imx-usb-charger-detection", NULL) && data->usbmisc_data) { +#ifdef CONFIG_POWER_SUPPLY data->imx_usb_charger_detection = true; data->charger.dev = &pdev->dev; data->usbmisc_data->charger = &data->charger; @@ -598,6 +605,10 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) if (!ret) dev_dbg(&pdev->dev, "USB Charger is created\n"); +#else + dev_err(&pdev->dev, + "USB Charger requires CONFIG_POWER_SUPPLY\n"); +#endif } ret = imx_usbmisc_init(data->usbmisc_data); diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index ba0e71ccec0ec6..c467f09a9fb720 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -570,6 +570,7 @@ static int usbmisc_imx7d_power_lost_check(struct imx_usbmisc_data *data) /***************************************************************************/ /* imx usb charger detecton */ /***************************************************************************/ +#ifdef CONFIG_POWER_SUPPLY static void usb_charger_is_present(struct usb_charger *charger, bool present) { if (present) @@ -723,7 +724,9 @@ static int usbmisc_imx6sx_power_lost_check(struct imx_usbmisc_data *data) else return 0; } +#endif +#ifdef CONFIG_POWER_SUPPLY static void imx7_disable_charger_detector(struct imx_usbmisc_data *data) { struct imx_usbmisc *usbmisc = dev_get_drvdata(data->dev); @@ -880,6 +883,7 @@ int imx7d_charger_secondary_detection(struct imx_usbmisc_data *data) return 0; } +#endif static int usbmisc_term_select_override(struct imx_usbmisc_data *data, bool enable, int val) @@ -928,8 +932,10 @@ static const struct usbmisc_ops imx53_usbmisc_ops = { static const struct usbmisc_ops imx6q_usbmisc_ops = { .set_wakeup = usbmisc_imx6q_set_wakeup, .init = usbmisc_imx6q_init, +#ifdef CONFIG_POWER_SUPPLY .charger_primary_detection = imx6_charger_primary_detection, .charger_secondary_detection = imx6_charger_secondary_detection, +#endif .hsic_set_connect = usbmisc_imx6_hsic_set_connect, .hsic_set_clk = usbmisc_imx6_hsic_set_clk, }; @@ -941,9 +947,11 @@ static const struct usbmisc_ops vf610_usbmisc_ops = { static const struct usbmisc_ops imx6sx_usbmisc_ops = { .set_wakeup = usbmisc_imx6q_set_wakeup, .init = usbmisc_imx6sx_init, +#ifdef CONFIG_POWER_SUPPLY .charger_primary_detection = imx6_charger_primary_detection, .charger_secondary_detection = imx6_charger_secondary_detection, .power_lost_check = usbmisc_imx6sx_power_lost_check, +#endif .hsic_set_connect = usbmisc_imx6_hsic_set_connect, .hsic_set_clk = usbmisc_imx6_hsic_set_clk, }; @@ -951,9 +959,11 @@ static const struct usbmisc_ops imx6sx_usbmisc_ops = { static const struct usbmisc_ops imx7d_usbmisc_ops = { .init = usbmisc_imx7d_init, .set_wakeup = usbmisc_imx7d_set_wakeup, +#ifdef CONFIG_POWER_SUPPLY .power_lost_check = usbmisc_imx7d_power_lost_check, .charger_primary_detection = imx7d_charger_primary_detection, .charger_secondary_detection = imx7d_charger_secondary_detection, +#endif .term_select_override = usbmisc_term_select_override, }; @@ -1005,6 +1015,7 @@ int imx_usbmisc_set_wakeup(struct imx_usbmisc_data *data, bool enabled) } EXPORT_SYMBOL_GPL(imx_usbmisc_set_wakeup); +#ifdef CONFIG_POWER_SUPPLY int imx_usbmisc_charger_detection(struct imx_usbmisc_data *data, bool connect) { struct imx_usbmisc *usbmisc; @@ -1056,6 +1067,7 @@ int imx_usbmisc_charger_secondary_detection(struct imx_usbmisc_data *data) return usbmisc->ops->charger_secondary_detection(data); } EXPORT_SYMBOL_GPL(imx_usbmisc_charger_secondary_detection); +#endif int imx_usbmisc_power_lost_check(struct imx_usbmisc_data *data) { diff --git a/drivers/video/fbdev/mxc/Makefile b/drivers/video/fbdev/mxc/Makefile index a910a3a716ede0..6ec78c6305c101 100644 --- a/drivers/video/fbdev/mxc/Makefile +++ b/drivers/video/fbdev/mxc/Makefile @@ -1,3 +1,4 @@ +obj-y += mxc_dispdrv.o obj-$(CONFIG_FB_MXC_MIPI_DSI) += mipi_dsi.o obj-$(CONFIG_FB_MXC_MIPI_DSI_SAMSUNG) += mipi_dsi_samsung.o obj-$(CONFIG_FB_MXC_MIPI_DSI_NORTHWEST) += mipi_dsi_northwest.o @@ -8,7 +9,7 @@ obj-$(CONFIG_FB_MXC_LDB) += ldb.o obj-$(CONFIG_FB_MXC_HDMI) += mxc_hdmi.o obj-$(CONFIG_FB_MXC_EDID) += mxc_edid.o obj-$(CONFIG_FB_MXC_ADV7535) += adv7535.o -obj-$(CONFIG_FB_MXC_SYNC_PANEL) += mxc_dispdrv.o mxc_lcdif.o mxc_ipuv3_fb.o +obj-$(CONFIG_FB_MXC_SYNC_PANEL) += mxc_lcdif.o mxc_ipuv3_fb.o obj-$(CONFIG_FB_MXC_EINK_PANEL) += mxc_epdc_fb.o obj-$(CONFIG_FB_MXC_EINK_V2_PANEL) += mxc_epdc_v2_fb.o obj-$(CONFIG_FB_MXS_SII902X) += mxsfb_sii902x.o diff --git a/drivers/video/fbdev/mxsfb.c b/drivers/video/fbdev/mxsfb.c index 52ee3e5163bce6..853d395fa27348 100644 --- a/drivers/video/fbdev/mxsfb.c +++ b/drivers/video/fbdev/mxsfb.c @@ -1282,7 +1282,6 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host) struct device *dev = &host->pdev->dev; struct device_node *np = host->pdev->dev.of_node; struct device_node *display_np; - struct device_node *timings_np; struct display_timings *timings = NULL; const char *disp_dev, *disp_videomode; u32 width; @@ -1350,34 +1349,38 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host) goto put_display_node; } - timings_np = of_find_node_by_name(display_np, - "display-timings"); - if (!timings_np) { - dev_err(dev, "failed to find display-timings node\n"); - ret = -ENOENT; - goto put_display_node; - } - - for (i = 0; i < of_get_child_count(timings_np); i++) { + for (i = 0; i < timings->num_timings; i++) { struct videomode vm; struct fb_videomode fb_vm; + /* Only consider native mode */ + if (i != timings->native_mode) + continue; + ret = videomode_from_timings(timings, &vm, i); if (ret < 0) - goto put_timings_node; + goto put_display_node; + ret = fb_videomode_from_videomode(&vm, &fb_vm); if (ret < 0) - goto put_timings_node; + goto put_display_node; if (!(vm.flags & DISPLAY_FLAGS_DE_HIGH)) fb_vm.sync |= FB_SYNC_OE_LOW_ACT; - if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) + + /* + * The PIXDATA flags of the display_flags enum are controller + * centric, e.g. NEGEDGE means drive data on negative edge. + * However, the drivers flag is display centric: Sample the + * data on negative (falling) edge. Therefore, check for the + * POSEDGE flag: + * drive on positive edge => sample on negative edge + */ + if (vm.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE) fb_vm.sync |= FB_SYNC_CLK_LAT_FALL; fb_add_videomode(&fb_vm, &fb_info->modelist); } -put_timings_node: - of_node_put(timings_np); put_display_node: if (timings) kfree(timings); diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 1589325855bc10..5a2702edeb7709 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -99,6 +99,13 @@ enum sgtl5000_micbias_resistor { SGTL5000_MICBIAS_8K = 8, }; +enum { + I2S_LRCLK_STRENGTH_DISABLE, + I2S_LRCLK_STRENGTH_LOW, + I2S_LRCLK_STRENGTH_MEDIUM, + I2S_LRCLK_STRENGTH_HIGH, +}; + /* sgtl5000 private structure in codec */ struct sgtl5000_priv { int sysclk; /* sysclk rate */ @@ -111,6 +118,7 @@ struct sgtl5000_priv { int revision; u8 micbias_resistor; u8 micbias_voltage; + u8 lrclk_strength; }; /* @@ -1089,6 +1097,7 @@ static int sgtl5000_enable_regulators(struct i2c_client *client) static int sgtl5000_probe(struct snd_soc_codec *codec) { int ret; + u16 reg; struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec); /* power up sgtl5000 */ @@ -1118,7 +1127,8 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) SGTL5000_DAC_MUTE_RIGHT | SGTL5000_DAC_MUTE_LEFT); - snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, 0x015f); + reg = ((sgtl5000->lrclk_strength) << SGTL5000_PAD_I2S_LRCLK_SHIFT | 0x5f); + snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, reg); snd_soc_write(codec, SGTL5000_CHIP_ANA_CTRL, SGTL5000_HP_ZCD_EN | @@ -1347,6 +1357,13 @@ static int sgtl5000_i2c_probe(struct i2c_client *client, } } + sgtl5000->lrclk_strength = I2S_LRCLK_STRENGTH_LOW; + if (!of_property_read_u32(np, "lrclk-strength", &value)) { + if (value > I2S_LRCLK_STRENGTH_HIGH) + value = I2S_LRCLK_STRENGTH_LOW; + sgtl5000->lrclk_strength = value; + } + /* Ensure sgtl5000 will start with sane register values */ sgtl5000_fill_defaults(client);