2022-05-17 09:08:59

by Neal Liu

[permalink] [raw]
Subject: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller node

Add USB2.0 device controller(udc) node to device tree
for AST2600.

Signed-off-by: Neal Liu <[email protected]>
---
arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
index 3d5ce9da42c3..5517313eb2b5 100644
--- a/arch/arm/boot/dts/aspeed-g6.dtsi
+++ b/arch/arm/boot/dts/aspeed-g6.dtsi
@@ -298,6 +298,16 @@ vhub: usb-vhub@1e6a0000 {
status = "disabled";
};

+ udc: udc@1e6a2000 {
+ compatible = "aspeed,ast2600-udc";
+ reg = <0x1e6a2000 0x300>;
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon ASPEED_CLK_GATE_USBPORT2CLK>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb2bd_default>;
+ status = "disabled";
+ };
+
apb {
compatible = "simple-bus";
#address-cells = <1>;
--
2.25.1



2022-05-17 19:08:17

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller node

On 17/05/2022 10:25, Neal Liu wrote:
> Add USB2.0 device controller(udc) node to device tree
> for AST2600.
>
> Signed-off-by: Neal Liu <[email protected]>
> ---
> arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
> index 3d5ce9da42c3..5517313eb2b5 100644
> --- a/arch/arm/boot/dts/aspeed-g6.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g6.dtsi
> @@ -298,6 +298,16 @@ vhub: usb-vhub@1e6a0000 {
> status = "disabled";
> };
>
> + udc: udc@1e6a2000 {

The same as DTS in bindings - generic node name, please.


Best regards,
Krzysztof

2022-05-17 20:11:04

by Neal Liu

[permalink] [raw]
Subject: RE: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller node

> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Tuesday, May 17, 2022 10:54 PM
> To: Neal Liu <[email protected]>; Greg Kroah-Hartman
> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> Kozlowski <[email protected]>; Joel Stanley <[email protected]>;
> Andrew Jeffery <[email protected]>; Felipe Balbi <[email protected]>; Sumit
> Semwal <[email protected]>; Christian König
> <[email protected]>; Geert Uytterhoeven <[email protected]>;
> Li Yang <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller
> node
>
> On 17/05/2022 16:50, Neal Liu wrote:
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <[email protected]>
> >> Sent: Tuesday, May 17, 2022 8:00 PM
> >> To: Neal Liu <[email protected]>; Greg Kroah-Hartman
> >> <[email protected]>; Rob Herring <[email protected]>;
> >> Krzysztof Kozlowski <[email protected]>; Joel Stanley
> >> <[email protected]>; Andrew Jeffery <[email protected]>; Felipe Balbi
> >> <[email protected]>; Sumit Semwal <[email protected]>; Christian
> >> König <[email protected]>; Geert Uytterhoeven
> >> <[email protected]>; Li Yang <[email protected]>
> >> Cc: [email protected]; [email protected];
> >> [email protected]; [email protected];
> >> [email protected]; [email protected];
> >> [email protected]; [email protected]
> >> Subject: Re: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device
> >> controller node
> >>
> >> On 17/05/2022 10:25, Neal Liu wrote:
> >>> Add USB2.0 device controller(udc) node to device tree for AST2600.
> >>>
> >>> Signed-off-by: Neal Liu <[email protected]>
> >>> ---
> >>> arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++++++++++
> >>> 1 file changed, 10 insertions(+)
> >>>
> >>> diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi
> >>> b/arch/arm/boot/dts/aspeed-g6.dtsi
> >>> index 3d5ce9da42c3..5517313eb2b5 100644
> >>> --- a/arch/arm/boot/dts/aspeed-g6.dtsi
> >>> +++ b/arch/arm/boot/dts/aspeed-g6.dtsi
> >>> @@ -298,6 +298,16 @@ vhub: usb-vhub@1e6a0000 {
> >>> status = "disabled";
> >>> };
> >>>
> >>> + udc: udc@1e6a2000 {
> >>
> >> The same as DTS in bindings - generic node name, please.
> >>
> >
> > Is it possible to use "udc: usb-udc@1e6a2000" to distinguish it between "vhub:
> usb-vhub@1e6a0000"?
>
> Possible yes :), but not recommended and not wanted. Nodes should be generic
> and prefixes are added only if there is no unit address. You can though use
> some more descriptive label.
>
"udc: usb@1e6a2000" is okay for you?

>
> Best regards,
> Krzysztof

2022-05-18 03:21:52

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller node

On 17/05/2022 16:50, Neal Liu wrote:
>> -----Original Message-----
>> From: Krzysztof Kozlowski <[email protected]>
>> Sent: Tuesday, May 17, 2022 8:00 PM
>> To: Neal Liu <[email protected]>; Greg Kroah-Hartman
>> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
>> Kozlowski <[email protected]>; Joel Stanley <[email protected]>;
>> Andrew Jeffery <[email protected]>; Felipe Balbi <[email protected]>; Sumit
>> Semwal <[email protected]>; Christian König
>> <[email protected]>; Geert Uytterhoeven <[email protected]>;
>> Li Yang <[email protected]>
>> Cc: [email protected]; [email protected];
>> [email protected]; [email protected];
>> [email protected]; [email protected];
>> [email protected]; [email protected]
>> Subject: Re: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller
>> node
>>
>> On 17/05/2022 10:25, Neal Liu wrote:
>>> Add USB2.0 device controller(udc) node to device tree for AST2600.
>>>
>>> Signed-off-by: Neal Liu <[email protected]>
>>> ---
>>> arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++++++++++
>>> 1 file changed, 10 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi
>>> b/arch/arm/boot/dts/aspeed-g6.dtsi
>>> index 3d5ce9da42c3..5517313eb2b5 100644
>>> --- a/arch/arm/boot/dts/aspeed-g6.dtsi
>>> +++ b/arch/arm/boot/dts/aspeed-g6.dtsi
>>> @@ -298,6 +298,16 @@ vhub: usb-vhub@1e6a0000 {
>>> status = "disabled";
>>> };
>>>
>>> + udc: udc@1e6a2000 {
>>
>> The same as DTS in bindings - generic node name, please.
>>
>
> Is it possible to use "udc: usb-udc@1e6a2000" to distinguish it between "vhub: usb-vhub@1e6a0000"?

Possible yes :), but not recommended and not wanted. Nodes should be
generic and prefixes are added only if there is no unit address. You can
though use some more descriptive label.


Best regards,
Krzysztof

2022-05-18 04:10:57

by Neal Liu

[permalink] [raw]
Subject: RE: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller node

> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Tuesday, May 17, 2022 8:00 PM
> To: Neal Liu <[email protected]>; Greg Kroah-Hartman
> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> Kozlowski <[email protected]>; Joel Stanley <[email protected]>;
> Andrew Jeffery <[email protected]>; Felipe Balbi <[email protected]>; Sumit
> Semwal <[email protected]>; Christian König
> <[email protected]>; Geert Uytterhoeven <[email protected]>;
> Li Yang <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller
> node
>
> On 17/05/2022 10:25, Neal Liu wrote:
> > Add USB2.0 device controller(udc) node to device tree for AST2600.
> >
> > Signed-off-by: Neal Liu <[email protected]>
> > ---
> > arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi
> > b/arch/arm/boot/dts/aspeed-g6.dtsi
> > index 3d5ce9da42c3..5517313eb2b5 100644
> > --- a/arch/arm/boot/dts/aspeed-g6.dtsi
> > +++ b/arch/arm/boot/dts/aspeed-g6.dtsi
> > @@ -298,6 +298,16 @@ vhub: usb-vhub@1e6a0000 {
> > status = "disabled";
> > };
> >
> > + udc: udc@1e6a2000 {
>
> The same as DTS in bindings - generic node name, please.
>

Is it possible to use "udc: usb-udc@1e6a2000" to distinguish it between "vhub: usb-vhub@1e6a0000"?

>
> Best regards,
> Krzysztof

2022-05-18 04:12:13

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller node

On 17/05/2022 17:21, Neal Liu wrote:
>>>>>
>>>>> + udc: udc@1e6a2000 {
>>>>
>>>> The same as DTS in bindings - generic node name, please.
>>>>
>>>
>>> Is it possible to use "udc: usb-udc@1e6a2000" to distinguish it between "vhub:
>> usb-vhub@1e6a0000"?
>>
>> Possible yes :), but not recommended and not wanted. Nodes should be generic
>> and prefixes are added only if there is no unit address. You can though use
>> some more descriptive label.
>>
> "udc: usb@1e6a2000" is okay for you?

Yes, it's perfect.


Best regards,
Krzysztof

2022-05-18 04:15:50

by Neal Liu

[permalink] [raw]
Subject: RE: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller node

> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Tuesday, May 17, 2022 11:26 PM
> To: Neal Liu <[email protected]>; Greg Kroah-Hartman
> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> Kozlowski <[email protected]>; Joel Stanley <[email protected]>;
> Andrew Jeffery <[email protected]>; Felipe Balbi <[email protected]>; Sumit
> Semwal <[email protected]>; Christian König
> <[email protected]>; Geert Uytterhoeven <[email protected]>;
> Li Yang <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: [PATCH v2 2/3] ARM: dts: aspeed: Add USB2.0 device controller
> node
>
> On 17/05/2022 17:21, Neal Liu wrote:
> >>>>>
> >>>>> + udc: udc@1e6a2000 {
> >>>>
> >>>> The same as DTS in bindings - generic node name, please.
> >>>>
> >>>
> >>> Is it possible to use "udc: usb-udc@1e6a2000" to distinguish it between
> "vhub:
> >> usb-vhub@1e6a0000"?
> >>
> >> Possible yes :), but not recommended and not wanted. Nodes should be
> >> generic and prefixes are added only if there is no unit address. You
> >> can though use some more descriptive label.
> >>
> > "udc: usb@1e6a2000" is okay for you?
>
> Yes, it's perfect.

Great ! I'll update it for next patch.
Thanks for your suggestion.
>
>
> Best regards,
> Krzysztof