All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/9] usb: ehci-mx6: introduce config for high active power pin
Date: Tue, 05 Jul 2016 13:35:36 -0700	[thread overview]
Message-ID: <1397041c8ff49bde89c143e2be539b75@agner.ch> (raw)
In-Reply-To: <aed4fb1f-7523-dc02-62b8-c66745d60513@denx.de>

On 2016-07-03 15:33, Marek Vasut wrote:
> On 07/03/2016 09:33 PM, Stefan Agner wrote:
>> From: Stefan Agner <stefan.agner@toradex.com>
>>
>> Add a new config CONFIG_MXC_USB_OTG_HACTIVE which configures the
>> OTG Power Pin to be high active. Low active is the reset value
>> of the affected configuration register, hence the config option
>> is named by the non-reset configuration.
>>
>> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
>> ---
>>
>>  drivers/usb/host/ehci-mx6.c   | 4 ++++
>>  include/configs/mx7dsabresd.h | 1 +
>>  include/configs/warp7.h       | 1 +
>>  3 files changed, 6 insertions(+)
>>
>> diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
>> index 0dbabb2..65aede7 100644
>> --- a/drivers/usb/host/ehci-mx6.c
>> +++ b/drivers/usb/host/ehci-mx6.c
>> @@ -212,7 +212,11 @@ static void usb_power_config(int index)
>>  	setbits_le32(phy_cfg2, USBNC_PHYCFG2_ACAENB);
>>
>>  	/* Set power polarity to high active */
>> +#ifdef CONFIG_MXC_USB_OTG_HACTIVE
>>  	setbits_le32(ctrl, UCTRL_PWR_POL);
>> +#else
>> +	clrbits_le32(ctrl, UCTRL_PWR_POL);
>> +#endif
> 
> This should go into 2/9

I consciously separated the two things: Move in which function we set
the polarity, add a new configuration to the polarity. But arguably,
they are so close that we could also just make one out of it.

> 
> Also, if it is at all possible already to configure this from DT, do it.

Agreed dt would be nicer. But currently i.MX 7 does not use dt by
default, so this would be rather bigger thing...

> If not, we'd have to deal with another macro, meh. At least convert this
> macro to Kconfig and document the Kconfig entry.
> 

Will go this route...

--
Stefan

>>  }
>>
>>  int usb_phy_mode(int port)
>> diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
>> index ece8a03..d8c9245 100644
>> --- a/include/configs/mx7dsabresd.h
>> +++ b/include/configs/mx7dsabresd.h
>> @@ -245,6 +245,7 @@
>>  #define CONFIG_USB_ETHER_ASIX
>>  #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
>>  #define CONFIG_MXC_USB_FLAGS   0
>> +#define CONFIG_MXC_USB_OTG_HACTIVE
>>  #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
>>
>>  #define CONFIG_IMX_THERMAL
>> diff --git a/include/configs/warp7.h b/include/configs/warp7.h
>> index fc0e51a..77db732 100644
>> --- a/include/configs/warp7.h
>> +++ b/include/configs/warp7.h
>> @@ -121,6 +121,7 @@
>>
>>  #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
>>  #define CONFIG_MXC_USB_FLAGS		0
>> +#define CONFIG_MXC_USB_OTG_HACTIVE
>>  #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Only OTG1 port enabled */
>>
>>  #define CONFIG_IMX_THERMAL
>>

  reply	other threads:[~2016-07-05 20:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-03 19:33 [U-Boot] [PATCH 0/9] mx7: add Colibri iMX7S/iMX7D support Stefan Agner
2016-07-03 19:33 ` [U-Boot] [PATCH 1/9] dm: imx: serial: Support DTE mode when using driver model Stefan Agner
2016-07-03 23:18   ` Simon Glass
2016-07-03 19:33 ` [U-Boot] [PATCH 2/9] usb: ehci-mx6: configure power polarity in usb_power_config Stefan Agner
2016-07-03 22:32   ` Marek Vasut
2016-07-05 20:28     ` Stefan Agner
2016-07-05 20:52       ` Marek Vasut
2016-07-03 19:33 ` [U-Boot] [PATCH 3/9] usb: ehci-mx6: introduce config for high active power pin Stefan Agner
2016-07-03 22:33   ` Marek Vasut
2016-07-05 20:35     ` Stefan Agner [this message]
2016-07-05 20:53       ` Marek Vasut
2016-07-03 19:33 ` [U-Boot] [PATCH 4/9] mx7: set soc environment according to exact SoC type Stefan Agner
2016-07-03 23:18   ` Simon Glass
2016-07-04 12:27   ` Fabio Estevam
2016-07-05 20:47     ` Stefan Agner
2016-07-05 20:56       ` Fabio Estevam
2016-07-05 23:14         ` Stefan Agner
2016-07-03 19:33 ` [U-Boot] [PATCH 5/9] mx7_common: Put display board info config into board file Stefan Agner
2016-07-03 19:33 ` [U-Boot] [PATCH 6/9] mx7_common: use Kconfig for ARMv7 non-secure mode Stefan Agner
2016-07-03 19:33 ` [U-Boot] [PATCH 7/9] imx_watchdog: add weak attribute to reset_cpu function Stefan Agner
2016-07-03 19:33 ` [U-Boot] [PATCH 8/9] power: pmic: add Ricoh RN5T567 PMIC support Stefan Agner
2016-07-03 23:18   ` Simon Glass
2016-07-13  6:10     ` Stefan Agner
2016-07-15  3:19       ` Simon Glass
2016-07-15  4:43         ` Stefan Agner
2016-07-17 14:13           ` Simon Glass
2016-07-03 19:33 ` [U-Boot] [PATCH 9/9] colibri_imx7: add Colibri iMX7S/iMX7D module support Stefan Agner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397041c8ff49bde89c143e2be539b75@agner.ch \
    --to=stefan@agner.ch \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.