diff mbox

[U-Boot,3/3] sunxi: Enable usb ports on the Sinovoip BPI M3

Message ID 1459624248-13306-3-git-send-email-hdegoede@redhat.com
State Accepted
Commit b24f7f008d6d29d7fb70d42ef40bb51001f3ab0f
Delegated to: Hans de Goede
Headers show

Commit Message

Hans de Goede April 2, 2016, 7:10 p.m. UTC
DLDO3 is used to provide Port-D power and PD is used for the
usb-hub / sata-5v enable pins. The 2.5V comes from the schematic
and matches the factory image fex file.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/dts/sun8i-a83t-sinovoip-bpi-m3.dts | 8 ++++++++
 configs/Sinovoip_BPI_M3_defconfig           | 9 +++++++++
 2 files changed, 17 insertions(+)

Comments

Ian Campbell April 5, 2016, 9:44 a.m. UTC | #1
On Sat, 2016-04-02 at 21:10 +0200, Hans de Goede wrote:
> DLDO3 is used to provide Port-D power and PD is used for the
> usb-hub / sata-5v enable pins. The 2.5V comes from the schematic
> and matches the factory image fex file.

Is the dts update being sync'd from the kernel?

If yes:

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ian Campbell <ijc@hellion.org.uk>

If you also want to mention the kernel sync in the commit message, you
can also retain the ack (of course).
Hans de Goede April 5, 2016, 9:51 a.m. UTC | #2
Hi,

On 05-04-16 11:44, Ian Campbell wrote:
> On Sat, 2016-04-02 at 21:10 +0200, Hans de Goede wrote:
>> DLDO3 is used to provide Port-D power and PD is used for the
>> usb-hub / sata-5v enable pins. The 2.5V comes from the schematic
>> and matches the factory image fex file.
>
> Is the dts update being sync'd from the kernel?

Erm, no actually, the A83t USB support for the kernel is not entirely
ready, so we've some very minimal nodes in u-boot's a83t.dtsi for now,
which will get replaced with the real deal when we sync in the future.

The only thing u-boot cares about are controller base address and
the compatible string, and there is no discussion about those,
which is why I merged ChenYu's .dtsi patches with the minimal nodes,
this commit just enables these nodes in the M3 dts.

I do expect the eventual kernel m3.dts changes to be pretty much
identical.

> If yes:
>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
>
> If you also want to mention the kernel sync in the commit message, you
> can also retain the ack (of course).

Regards,

Hans
Ian Campbell April 5, 2016, 10:44 a.m. UTC | #3
On Tue, 2016-04-05 at 11:51 +0200, Hans de Goede wrote:
> Hi,
> 
> On 05-04-16 11:44, Ian Campbell wrote:
> > 
> > On Sat, 2016-04-02 at 21:10 +0200, Hans de Goede wrote:
> > > 
> > > DLDO3 is used to provide Port-D power and PD is used for the
> > > usb-hub / sata-5v enable pins. The 2.5V comes from the schematic
> > > and matches the factory image fex file.
> > Is the dts update being sync'd from the kernel?
> Erm, no actually, the A83t USB support for the kernel is not entirely
> ready, so we've some very minimal nodes in u-boot's a83t.dtsi for
> now,
> which will get replaced with the real deal when we sync in the
> future.
> 
> The only thing u-boot cares about are controller base address and
> the compatible string, and there is no discussion about those,
> which is why I merged ChenYu's .dtsi patches with the minimal nodes,
> this commit just enables these nodes in the M3 dts.

Ah, ok. Is it worth mentioning that in the commit log for clarity
(think of someone doing a resync with the kernel and getting confused
by the non-kernel bits)?

Maybe the commit message on the orignal addition makes it unnecessary?
If you think that's the case then you can keep my Ack.

Ian.
Hans de Goede April 9, 2016, 11:59 a.m. UTC | #4
Hi,

On 05-04-16 12:44, Ian Campbell wrote:
> On Tue, 2016-04-05 at 11:51 +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 05-04-16 11:44, Ian Campbell wrote:
>>>
>>> On Sat, 2016-04-02 at 21:10 +0200, Hans de Goede wrote:
>>>>
>>>> DLDO3 is used to provide Port-D power and PD is used for the
>>>> usb-hub / sata-5v enable pins. The 2.5V comes from the schematic
>>>> and matches the factory image fex file.
>>> Is the dts update being sync'd from the kernel?
>> Erm, no actually, the A83t USB support for the kernel is not entirely
>> ready, so we've some very minimal nodes in u-boot's a83t.dtsi for
>> now,
>> which will get replaced with the real deal when we sync in the
>> future.
>>
>> The only thing u-boot cares about are controller base address and
>> the compatible string, and there is no discussion about those,
>> which is why I merged ChenYu's .dtsi patches with the minimal nodes,
>> this commit just enables these nodes in the M3 dts.
>
> Ah, ok. Is it worth mentioning that in the commit log for clarity
> (think of someone doing a resync with the kernel and getting confused
> by the non-kernel bits)?

Ack, I've added the following paragraph to the commit msg now:

"The dts changes are the minimal changes needed for u-boot to
pick-up the usb host controllers. The upstream kernel does not
(yet) have usb host support."

Regards,

Hans
diff mbox

Patch

diff --git a/arch/arm/dts/sun8i-a83t-sinovoip-bpi-m3.dts b/arch/arm/dts/sun8i-a83t-sinovoip-bpi-m3.dts
index 91ff3a9..dfc16a0 100644
--- a/arch/arm/dts/sun8i-a83t-sinovoip-bpi-m3.dts
+++ b/arch/arm/dts/sun8i-a83t-sinovoip-bpi-m3.dts
@@ -57,8 +57,16 @@ 
 	};
 };
 
+&ehci0 {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_b>;
 	status = "okay";
 };
+
+&usb_otg {
+	status = "okay";
+};
diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig
index 3c7f167..d3fd857 100644
--- a/configs/Sinovoip_BPI_M3_defconfig
+++ b/configs/Sinovoip_BPI_M3_defconfig
@@ -5,6 +5,11 @@  CONFIG_DRAM_TYPE=7
 CONFIG_DRAM_CLK=480
 CONFIG_DRAM_ZQ=15355
 CONFIG_DRAM_ODT_EN=y
+CONFIG_INITIAL_USB_SCAN_DELAY=500
+CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_USB0_ID_DET="PH11"
+CONFIG_USB1_VBUS_PIN="PD24"
 CONFIG_AXP_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-sinovoip-bpi-m3"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
@@ -13,3 +18,7 @@  CONFIG_SPL=y
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 CONFIG_AXP_DCDC5_VOLT=1200
+CONFIG_AXP_DLDO3_VOLT=2500
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPD(25)"