public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] [PATCH RFC 00/17] sunxi: more AXP818 and A83T USB support
Date: Thu, 31 Mar 2016 16:59:50 +0200	[thread overview]
Message-ID: <56FD3B66.3070009@redhat.com> (raw)
In-Reply-To: <1459268822-25467-1-git-send-email-wens@csie.org>

Hi,

On 29-03-16 18:26, Chen-Yu Tsai wrote:
> Hi everyone,
>
> This series adds more support for axp818 regulators, and USB support
> for A83T. Normal EHCI/OHCI USB works, and so does OTG host mode.

Cool, thanks for working on this!

> I couldn't get my Cubietruck Plus to work in gadget mode though.
> No USB device appears on the host end when it enters fastboot.

Did you change CONFIG_USB_MUSB_HOST=y to CONFIG_USB_MUSB_GADGET=y ?
currently we support building either one or the other.

I would certainly welcome patches to make things more dynamic,
you could replace the

#ifdef CONFIG_USB_MUSB_HOST
#else
#endif

construct in drivers/usb/musb-new/sunxi.c: sunxi_musb_board_init()
with an id=pin check (but only when both CONFIG_USB_MUSB_HOST and
CONFIG_USB_MUSB_GADGET are defined, on some boards the port is
hardwired for a certain use).

If you take a shot at this, do not forget to also update musb_plat
dynamically, currently that is statically initialized depending
on CONFIG_USB_MUSB_HOST being defined.

You probably also want to check other places for
#ifdef CONFIG_USB_MUSB_HOST / #ifdef CONFIG_USB_MUSB_GADGET,
but I'm reasonably sure that defining both at the same time
should _mostly_ work, just as long as you only register either
the host or gadget part from sunxi_musb_board_init() (which
means that the right cable needs to be plugged in before
u-boot starts).

###

I've applied patches 1-12 to my tree, and I plan to include
these in my next pull-req I've not added 13-14 to give
you some time to figure out what todo with the otg, I guess
that on the h8_homlet_v2 you can just leave it as
CONFIG_USB_MUSB_HOST=y since it is wired to an USB A female
connector.

On the cubietruck you may want to make it CONFIG_USB_MUSB_GADGET=y
since the most likely use there is using it in gadget mode (for host
mode it has normal ports).

About patches 15-17 you've tagged these as "[DO NOT MERGE]" I understand
that the devicetree bits which will eventually go upstream will look
differently, but as long as the compatible and the base-address will
not change, we can pretty merge them in u-boot already, u-boot's dts
copy is only used internally and not passed to the kernel.

I will not merge them if you do not want me too, but we could have
these minimal nodes for now to get things to work. These can then
eventually be replaced with the real kernel dts when that is upstream.

Regards,

Hans



> Patch 1 removes axp818_init() from the header file, as it is undefined
> and unused.
>
> Patch 2 fixes axp818's DCDC5 default voltage. DCDC5 normally supplies
> DRAM. This changes the default to match DDR3 DRAM.
>
> Patch 3 adds support for axp818's FLDOs, one of which powers the HSIC
> PHY.
>
> Patch 4 raises the DCDC1 voltage on h8_homlet_v2 to 3.3V, the default
> value.
>
> Patch 5 enables and sets DLDO4 to 3.3V on h8_homlet_v2. This powers
> the AC200 chip, which among other things, is the ethernet PHY.
>
> Patch 6 adds support for the USB PHYs on A83T.
>
> Patch 7 fixes some clock macros related to USB PHYs for A83T.
>
> Patch 8 & 9 add A83T compatible strings to sunxi EHCI & OHCI.
>
> Patch 10 adds support for A83T to musb sunxi glue.
>
> Patch 11 generalizes the VBUS function related macros for AXP PMICs.
>
> Patch 12 adds support for VBUS drive on AXP818.
>
> Patch 13 enables USB Kconfig options in h8_homlet_v2_defconfig.
>
> Patch 14 enables USB Kconfig options in Cubietruck_plus_defconfig.
>
> Patch 15 ~ 17 is the minimal changes needed to enable USB on the
> A83T boards I have. They are not the same as the kernel changes
> I will submit, and should not be merged without discussion.
>
> Regards
> ChenYu
>
>
> Chen-Yu Tsai (17):
>    power: axp818: Remove undefined axp818_init()
>    power: axp818: Fix DCDC5 default voltage
>    power: axp818: Add support for FLDOs
>    sunxi: h8_homlet_v2: Set DCDC1 to default voltage (3.3V)
>    sunxi: h8_homlet_v2: Set DLDO4 to 3.3V
>    sunxi: usb_phy: Add support for A83T USB PHYs
>    sunxi: clk: Fix USB PHY clock macros for A83T
>    sunxi: ehci: Add A83T compatible
>    sunxi: ohci: Add A83T compatible
>    musb: sunxi: Add support for A83T
>    sunxi: axp: Generalize register macros for VBUS drive GPIO
>    sunxi: axp: Support VBUS drive GPIO on AXP818
>    sunxi: h8_homlet_v2: Enable USB Kconfig options in defconfig
>    sunxi: Cubietruck Plus: Enable USB Kconfig options in defconfig
>    [DO NOT MERGE] sunxi: Add USB and R_PIO nodes to sun8i-a83t.dtsi
>    [DO NOT MERGE] sunxi: Enable USB on Cubietruck Plus
>    [DO NOT MERGE] sunxi: Enable USB nodes for H8Homlet v2
>
>   arch/arm/cpu/armv7/sunxi/usb_phy.c                 | 48 ++++++++++++++++++++++
>   arch/arm/dts/sun8i-a83t-allwinner-h8homlet-v2.dts  | 12 ++++++
>   arch/arm/dts/sun8i-a83t-cubietruck-plus.dts        | 12 ++++++
>   arch/arm/dts/sun8i-a83t.dtsi                       | 34 +++++++++++++++
>   arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h |  6 +--
>   board/sunxi/board.c                                |  6 +++
>   configs/Cubietruck_plus_defconfig                  | 10 ++++-
>   configs/h8_homlet_v2_defconfig                     |  8 +++-
>   drivers/gpio/axp_gpio.c                            | 25 ++++++-----
>   drivers/power/Kconfig                              | 30 +++++++++++++-
>   drivers/power/axp818.c                             | 34 +++++++++++++++
>   drivers/usb/host/ehci-sunxi.c                      |  1 +
>   drivers/usb/host/ohci-sunxi.c                      |  1 +
>   drivers/usb/musb-new/musb_regs.h                   |  2 +-
>   include/axp221.h                                   |  8 ++--
>   include/axp818.h                                   |  9 ++--
>   include/axp_pmic.h                                 |  1 +
>   include/configs/sun8i.h                            |  2 +
>   18 files changed, 222 insertions(+), 27 deletions(-)
>

  parent reply	other threads:[~2016-03-31 14:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 16:26 [U-Boot] [PATCH RFC 00/17] sunxi: more AXP818 and A83T USB support Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 01/17] power: axp818: Remove undefined axp818_init() Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 02/17] power: axp818: Fix DCDC5 default voltage Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 03/17] power: axp818: Add support for FLDOs Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 04/17] sunxi: h8_homlet_v2: Set DCDC1 to default voltage (3.3V) Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 05/17] sunxi: h8_homlet_v2: Set DLDO4 to 3.3V Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 06/17] sunxi: usb_phy: Add support for A83T USB PHYs Chen-Yu Tsai
2016-03-31 15:05   ` [U-Boot] [linux-sunxi] " Hans de Goede
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 07/17] sunxi: clk: Fix USB PHY clock macros for A83T Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 08/17] sunxi: ehci: Add A83T compatible Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 09/17] sunxi: ohci: " Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 10/17] musb: sunxi: Add support for A83T Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 11/17] sunxi: axp: Generalize register macros for VBUS drive GPIO Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 12/17] sunxi: axp: Support VBUS drive GPIO on AXP818 Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 13/17] sunxi: h8_homlet_v2: Enable USB Kconfig options in defconfig Chen-Yu Tsai
2016-03-29 16:26 ` [U-Boot] [PATCH RFC 14/17] sunxi: Cubietruck Plus: " Chen-Yu Tsai
2016-03-29 16:27 ` [U-Boot] [PATCH RFC 15/17] [DO NOT MERGE] sunxi: Add USB and R_PIO nodes to sun8i-a83t.dtsi Chen-Yu Tsai
2016-03-29 16:27 ` [U-Boot] [PATCH RFC 16/17] [DO NOT MERGE] sunxi: Enable USB on Cubietruck Plus Chen-Yu Tsai
2016-03-29 16:27 ` [U-Boot] [PATCH RFC 17/17] [DO NOT MERGE] sunxi: Enable USB nodes for H8Homlet v2 Chen-Yu Tsai
2016-03-31 14:59 ` Hans de Goede [this message]
2016-03-31 16:15   ` [U-Boot] [linux-sunxi] [PATCH RFC 00/17] sunxi: more AXP818 and A83T USB support Chen-Yu Tsai

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=56FD3B66.3070009@redhat.com \
    --to=hdegoede@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox